mercurial/commands.py
changeset 30618 1112ff99d965
parent 30616 cbc61b1b52ea
child 30623 201b44c8875c
--- a/mercurial/commands.py	Sat Dec 17 19:47:17 2016 +0530
+++ b/mercurial/commands.py	Sat Dec 17 19:56:30 2016 +0530
@@ -2356,7 +2356,7 @@
     def complete(path, acceptable):
         dirstate = repo.dirstate
         spec = os.path.normpath(os.path.join(pycompat.getcwd(), path))
-        rootdir = repo.root + os.sep
+        rootdir = repo.root + pycompat.ossep
         if spec != repo.root and not spec.startswith(rootdir):
             return [], []
         if os.path.isdir(spec):
@@ -2364,7 +2364,7 @@
         spec = spec[len(rootdir):]
         fixpaths = pycompat.ossep != '/'
         if fixpaths:
-            spec = spec.replace(os.sep, '/')
+            spec = spec.replace(pycompat.ossep, '/')
         speclen = len(spec)
         fullpaths = opts['full']
         files, dirs = set(), set()
@@ -2372,11 +2372,11 @@
         for f, st in dirstate.iteritems():
             if f.startswith(spec) and st[0] in acceptable:
                 if fixpaths:
-                    f = f.replace('/', os.sep)
+                    f = f.replace('/', pycompat.ossep)
                 if fullpaths:
                     addfile(f)
                     continue
-                s = f.find(os.sep, speclen)
+                s = f.find(pycompat.ossep, speclen)
                 if s >= 0:
                     adddir(f[:s])
                 else: