Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 41626:2c549abc6b85
subrepo: adjust subrepo prefix before calling subrepo.removefiles() (API)
That's what we do with the matcher so it seems more consistent.
Differential Revision: https://phab.mercurial-scm.org/D5882
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 09:40:37 -0800 |
parents | 93620a4ba88d |
children | f92844cb942c |
comparison
equal
deleted
inserted
replaced
41625:93620a4ba88d | 41626:2c549abc6b85 |
---|---|
2206 subs = sorted(wctx.substate) | 2206 subs = sorted(wctx.substate) |
2207 progress = ui.makeprogress(_('searching'), total=len(subs), | 2207 progress = ui.makeprogress(_('searching'), total=len(subs), |
2208 unit=_('subrepos')) | 2208 unit=_('subrepos')) |
2209 for subpath in subs: | 2209 for subpath in subs: |
2210 submatch = matchmod.subdirmatcher(subpath, m) | 2210 submatch = matchmod.subdirmatcher(subpath, m) |
2211 subprefix = repo.wvfs.reljoin(prefix, subpath) | |
2211 if subrepos or m.exact(subpath) or any(submatch.files()): | 2212 if subrepos or m.exact(subpath) or any(submatch.files()): |
2212 progress.increment() | 2213 progress.increment() |
2213 sub = wctx.sub(subpath) | 2214 sub = wctx.sub(subpath) |
2214 try: | 2215 try: |
2215 if sub.removefiles(submatch, prefix, after, force, subrepos, | 2216 if sub.removefiles(submatch, subprefix, after, force, subrepos, |
2216 dryrun, warnings): | 2217 dryrun, warnings): |
2217 ret = 1 | 2218 ret = 1 |
2218 except error.LookupError: | 2219 except error.LookupError: |
2219 warnings.append(_("skipping missing subrepository: %s\n") | 2220 warnings.append(_("skipping missing subrepository: %s\n") |
2220 % join(subpath)) | 2221 % join(subpath)) |