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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 15 Feb 2014 19:29:20 +0100
changeset 3276
1b7002ea389d
parent 3273
075758282fdb
child 3277
b7d9c75223e3

Return the output of 'hg cat' with universal newline support.
(grafted from 186e0b3611b37a4a0c5dd81864f03941c720dfc9)

Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
--- 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
@@ -1775,7 +1775,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