Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py

branch
Py2 comp.
changeset 2575
cbdf5b8a5bc5
parent 2525
8b507a9a2d40
child 2677
3d4277929fb3
equal deleted inserted replaced
2574:9d6b6cf31ec6 2575:cbdf5b8a5bc5
428 return 428 return
429 fname = Utilities.toNativeSeparators(fname) 429 fname = Utilities.toNativeSeparators(fname)
430 430
431 eol = e5App().getObject("Project").getEolString() 431 eol = e5App().getObject("Project").getEolString()
432 try: 432 try:
433 f = open(fname, "w", encoding="utf-8", newline="") 433 f = open(fname, "w", encoding="utf-8")
434 f.write(eol.join(self.contents.toPlainText().splitlines())) 434 f.write(eol.join(self.contents.toPlainText().splitlines()))
435 f.close() 435 f.close()
436 except IOError as why: 436 except IOError as why:
437 E5MessageBox.critical(self, self.trUtf8('Save Diff'), 437 E5MessageBox.critical(self, self.trUtf8('Save Diff'),
438 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' 438 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.'

eric ide

mercurial