diff mercurial/commands.py @ 30304:ba2c04059317

py3: use pycompat.ossep at certain places Certain instances of os.sep has been converted to pycompat.ossep where it was sure to use bytes only. There are more such instances which needs some more attention and will get surely.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 06 Nov 2016 04:10:33 +0530
parents 27addd7e8eca
children 318a24b52eeb
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Nov 06 03:44:44 2016 +0530
+++ b/mercurial/commands.py	Sun Nov 06 04:10:33 2016 +0530
@@ -61,6 +61,7 @@
     phases,
     policy,
     pvec,
+    pycompat,
     repair,
     revlog,
     revset,
@@ -3160,7 +3161,7 @@
         if os.path.isdir(spec):
             spec += '/'
         spec = spec[len(rootdir):]
-        fixpaths = os.sep != '/'
+        fixpaths = pycompat.ossep != '/'
         if fixpaths:
             spec = spec.replace(os.sep, '/')
         speclen = len(spec)
@@ -3755,7 +3756,7 @@
     if not items:
         return
     f = lambda fn: fn
-    if ui.configbool('ui', 'slash') and os.sep != '/':
+    if ui.configbool('ui', 'slash') and pycompat.ossep != '/':
         f = lambda fn: util.normpath(fn)
     fmt = 'f  %%-%ds  %%-%ds  %%s' % (
         max([len(abs) for abs in items]),