Fixed an issue in the various diff dialogs writing the patch (this time properly). 5_1_x

Wed, 07 Sep 2011 18:08:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 07 Sep 2011 18:08:56 +0200
branch
5_1_x
changeset 1301
a2b0aceba6a2
parent 1298
090b37850a89
child 1306
2136f10a9110

Fixed an issue in the various diff dialogs writing the patch (this time properly).
(transplanted from 9083f6b7ea3ba0274761eb49e2728e71dab9e54d)

Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py	Tue Sep 06 18:33:27 2011 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py	Wed Sep 07 18:08:56 2011 +0200
@@ -292,7 +292,7 @@
         
         eol = e5App().getObject("Project").getEolString()
         try:
-            f = open(fname, "w", encoding = "utf-8")
+            f = open(fname, "w", encoding = "utf-8", newline = "")
             f.write(eol.join(self.contents.toPlainText().splitlines()))
             f.close()
         except IOError as why:
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py	Tue Sep 06 18:33:27 2011 +0200
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py	Wed Sep 07 18:08:56 2011 +0200
@@ -341,7 +341,7 @@
         
         eol = e5App().getObject("Project").getEolString()
         try:
-            f = open(fname, "w", encoding = "utf-8")
+            f = open(fname, "w", encoding = "utf-8", newline = "")
             f.write(eol.join(self.contents.toPlainText().splitlines()))
             f.close()
         except IOError as why:
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py	Tue Sep 06 18:33:27 2011 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py	Wed Sep 07 18:08:56 2011 +0200
@@ -301,7 +301,7 @@
         
         eol = e5App().getObject("Project").getEolString()
         try:
-            f = open(fname, "w", encoding = "utf-8")
+            f = open(fname, "w", encoding = "utf-8", newline = "")
             f.write(eol.join(self.contents.toPlainText().splitlines()))
             f.close()
         except IOError as why:

eric ide

mercurial