Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py

branch
5_1_x
changeset 1301
a2b0aceba6a2
parent 1298
090b37850a89
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
1298:090b37850a89 1301:a2b0aceba6a2
299 return 299 return
300 fname = Utilities.toNativeSeparators(fname) 300 fname = Utilities.toNativeSeparators(fname)
301 301
302 eol = e5App().getObject("Project").getEolString() 302 eol = e5App().getObject("Project").getEolString()
303 try: 303 try:
304 f = open(fname, "w", encoding = "utf-8") 304 f = open(fname, "w", encoding = "utf-8", newline = "")
305 f.write(eol.join(self.contents.toPlainText().splitlines())) 305 f.write(eol.join(self.contents.toPlainText().splitlines()))
306 f.close() 306 f.close()
307 except IOError as why: 307 except IOError as why:
308 E5MessageBox.critical(self, self.trUtf8('Save Diff'), 308 E5MessageBox.critical(self, self.trUtf8('Save Diff'),
309 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' 309 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.'

eric ide

mercurial