# HG changeset patch # User Martin von Zweigbergk # Date 1549561942 28800 # Node ID f92844cb942c6d99586c05cb8ef8f5d8c575cde4 # Parent 2c549abc6b8551738b1e46ab1812c1f02255eeb4 subrepo: adjust subrepo prefix before calling subrepo.forget() (API) Differential Revision: https://phab.mercurial-scm.org/D5883 diff -r 2c549abc6b85 -r f92844cb942c mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu Feb 07 09:40:37 2019 -0800 +++ b/mercurial/cmdutil.py Thu Feb 07 09:52:22 2019 -0800 @@ -2097,9 +2097,10 @@ for subpath in sorted(wctx.substate): sub = wctx.sub(subpath) + submatch = matchmod.subdirmatcher(subpath, match) + subprefix = repo.wvfs.reljoin(prefix, subpath) try: - submatch = matchmod.subdirmatcher(subpath, match) - subbad, subforgot = sub.forget(submatch, prefix, dryrun=dryrun, + subbad, subforgot = sub.forget(submatch, subprefix, dryrun=dryrun, interactive=interactive) bad.extend([subpath + '/' + f for f in subbad]) forgot.extend([subpath + '/' + f for f in subforgot]) diff -r 2c549abc6b85 -r f92844cb942c mercurial/subrepo.py --- a/mercurial/subrepo.py Thu Feb 07 09:40:37 2019 -0800 +++ b/mercurial/subrepo.py Thu Feb 07 09:52:22 2019 -0800 @@ -840,8 +840,7 @@ @annotatesubrepoerror def forget(self, match, prefix, dryrun, interactive): - return cmdutil.forget(self.ui, self._repo, match, - self.wvfs.reljoin(prefix, self._path), + return cmdutil.forget(self.ui, self._repo, match, prefix, True, dryrun=dryrun, interactive=interactive) @annotatesubrepoerror