Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py

branch
5_1_x
changeset 1301
a2b0aceba6a2
parent 1298
090b37850a89
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
1298:090b37850a89 1301:a2b0aceba6a2
339 return 339 return
340 fname = Utilities.toNativeSeparators(fname) 340 fname = Utilities.toNativeSeparators(fname)
341 341
342 eol = e5App().getObject("Project").getEolString() 342 eol = e5App().getObject("Project").getEolString()
343 try: 343 try:
344 f = open(fname, "w", encoding = "utf-8") 344 f = open(fname, "w", encoding = "utf-8", newline = "")
345 f.write(eol.join(self.contents.toPlainText().splitlines())) 345 f.write(eol.join(self.contents.toPlainText().splitlines()))
346 f.close() 346 f.close()
347 except IOError as why: 347 except IOError as why:
348 E5MessageBox.critical(self, self.trUtf8('Save Diff'), 348 E5MessageBox.critical(self, self.trUtf8('Save Diff'),
349 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' 349 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.'

eric ide

mercurial