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