Mercurial > hg
comparison mercurial/debugcommands.py @ 44009:e685fac56693
match: resolve filesets against the passed `cwd`, not the current one
This allows filesets to be resolved relative to `repo.root`, the same as other
patterns are since f02d3c0eed18. The current example in contrib/ wasn't working
from the tests directory because of this.
Differential Revision: https://phab.mercurial-scm.org/D7570
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 06 Dec 2019 20:40:02 -0500 |
parents | 7a2c49a3cbae |
children | 52f8b07ad2f9 |
comparison
equal
deleted
inserted
replaced
44008:ac72e17457e5 | 44009:e685fac56693 |
---|---|
1169 files.update(wctx.substate) | 1169 files.update(wctx.substate) |
1170 else: | 1170 else: |
1171 files.update(ctx.files()) | 1171 files.update(ctx.files()) |
1172 files.update(ctx.substate) | 1172 files.update(ctx.substate) |
1173 | 1173 |
1174 m = ctx.matchfileset(expr) | 1174 m = ctx.matchfileset(repo.getcwd(), expr) |
1175 if opts[b'show_matcher'] or (opts[b'show_matcher'] is None and ui.verbose): | 1175 if opts[b'show_matcher'] or (opts[b'show_matcher'] is None and ui.verbose): |
1176 ui.writenoi18n(b'* matcher:\n', stringutil.prettyrepr(m), b'\n') | 1176 ui.writenoi18n(b'* matcher:\n', stringutil.prettyrepr(m), b'\n') |
1177 for f in sorted(files): | 1177 for f in sorted(files): |
1178 if not m(f): | 1178 if not m(f): |
1179 continue | 1179 continue |