##// END OF EJS Templates
py3: use pycompat.ossep at certain places...
Pulkit Goyal -
r30304:ba2c0405 default
parent child Browse files
Show More
@@ -61,6 +61,7 b' from . import ('
61 61 phases,
62 62 policy,
63 63 pvec,
64 pycompat,
64 65 repair,
65 66 revlog,
66 67 revset,
@@ -3160,7 +3161,7 b' def debugpathcomplete(ui, repo, *specs, '
3160 3161 if os.path.isdir(spec):
3161 3162 spec += '/'
3162 3163 spec = spec[len(rootdir):]
3163 fixpaths = os.sep != '/'
3164 fixpaths = pycompat.ossep != '/'
3164 3165 if fixpaths:
3165 3166 spec = spec.replace(os.sep, '/')
3166 3167 speclen = len(spec)
@@ -3755,7 +3756,7 b' def debugwalk(ui, repo, *pats, **opts):'
3755 3756 if not items:
3756 3757 return
3757 3758 f = lambda fn: fn
3758 if ui.configbool('ui', 'slash') and os.sep != '/':
3759 if ui.configbool('ui', 'slash') and pycompat.ossep != '/':
3759 3760 f = lambda fn: util.normpath(fn)
3760 3761 fmt = 'f %%-%ds %%-%ds %%s' % (
3761 3762 max([len(abs) for abs in items]),
@@ -21,6 +21,7 b' from . import ('
21 21 osutil,
22 22 parsers,
23 23 pathutil,
24 pycompat,
24 25 scmutil,
25 26 util,
26 27 )
@@ -215,7 +216,7 b' class dirstate(object):'
215 216
216 217 @propertycache
217 218 def _slash(self):
218 return self._ui.configbool('ui', 'slash') and os.sep != '/'
219 return self._ui.configbool('ui', 'slash') and pycompat.ossep != '/'
219 220
220 221 @propertycache
221 222 def _checklink(self):
@@ -14,7 +14,11 b' import socket'
14 14 import stat as statmod
15 15 import sys
16 16
17 from . import policy
17 from . import (
18 policy,
19 pycompat,
20 )
21
18 22 modulepolicy = policy.policy
19 23 policynocffi = policy.policynocffi
20 24
@@ -51,8 +55,8 b' def listdirpure(path, stat=False, skip=N'
51 55 '''
52 56 result = []
53 57 prefix = path
54 if not prefix.endswith(os.sep):
55 prefix += os.sep
58 if not prefix.endswith(pycompat.ossep):
59 prefix += pycompat.ossep
56 60 names = os.listdir(path)
57 61 names.sort()
58 62 for fn in names:
General Comments 0
You need to be logged in to leave comments. Login now