Return the output of 'hg cat' with universal newline support. 5_4_x

Sat, 15 Feb 2014 19:29:20 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 15 Feb 2014 19:29:20 +0100
branch
5_4_x
changeset 3275
186e0b3611b3
parent 3274
f73cb16b37b4
child 3285
9e5b6fc3e74f

Return the output of 'hg cat' with universal newline support.

Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
diff -r f73cb16b37b4 -r 186e0b3611b3 Plugins/VcsPlugins/vcsMercurial/hg.py
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat Feb 15 18:21:59 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat Feb 15 19:29:20 2014 +0100
@@ -1743,7 +1743,8 @@
         else:
             output, error = self.__client.runcommand(args)
         
-        return output, error
+        # return file contents with 'universal newlines'
+        return output.replace('\r\n', '\n').replace('\r', '\n'), error
     
     def hgSbsDiff(self, name, extended=False, revisions=None):
         """

eric ide

mercurial