Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 41638:f92844cb942c
subrepo: adjust subrepo prefix before calling subrepo.forget() (API)
Differential Revision: https://phab.mercurial-scm.org/D5883
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 09:52:22 -0800 |
parents | 2c549abc6b85 |
children | ed046348675c |
comparison
equal
deleted
inserted
replaced
41637:2c549abc6b85 | 41638:f92844cb942c |
---|---|
2095 if explicitonly: | 2095 if explicitonly: |
2096 forget = [f for f in forget if match.exact(f)] | 2096 forget = [f for f in forget if match.exact(f)] |
2097 | 2097 |
2098 for subpath in sorted(wctx.substate): | 2098 for subpath in sorted(wctx.substate): |
2099 sub = wctx.sub(subpath) | 2099 sub = wctx.sub(subpath) |
2100 submatch = matchmod.subdirmatcher(subpath, match) | |
2101 subprefix = repo.wvfs.reljoin(prefix, subpath) | |
2100 try: | 2102 try: |
2101 submatch = matchmod.subdirmatcher(subpath, match) | 2103 subbad, subforgot = sub.forget(submatch, subprefix, dryrun=dryrun, |
2102 subbad, subforgot = sub.forget(submatch, prefix, dryrun=dryrun, | |
2103 interactive=interactive) | 2104 interactive=interactive) |
2104 bad.extend([subpath + '/' + f for f in subbad]) | 2105 bad.extend([subpath + '/' + f for f in subbad]) |
2105 forgot.extend([subpath + '/' + f for f in subforgot]) | 2106 forgot.extend([subpath + '/' + f for f in subforgot]) |
2106 except error.LookupError: | 2107 except error.LookupError: |
2107 ui.status(_("skipping missing subrepository: %s\n") | 2108 ui.status(_("skipping missing subrepository: %s\n") |