equal
deleted
inserted
replaced
59 obsolete, |
59 obsolete, |
60 patch, |
60 patch, |
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, |
67 scmutil, |
68 scmutil, |
68 setdiscovery, |
69 setdiscovery, |
3158 if spec != repo.root and not spec.startswith(rootdir): |
3159 if spec != repo.root and not spec.startswith(rootdir): |
3159 return [], [] |
3160 return [], [] |
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) |
3167 fullpaths = opts['full'] |
3168 fullpaths = opts['full'] |
3168 files, dirs = set(), set() |
3169 files, dirs = set(), set() |
3753 m = scmutil.match(repo[None], pats, opts) |
3754 m = scmutil.match(repo[None], pats, opts) |
3754 items = list(repo.walk(m)) |
3755 items = list(repo.walk(m)) |
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]), |
3762 max([len(m.rel(abs)) for abs in items])) |
3763 max([len(m.rel(abs)) for abs in items])) |
3763 for abs in items: |
3764 for abs in items: |