From patchwork Sat Feb 9 21:45:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D5883: subrepo: adjust subrepo prefix before calling subrepo.forget() (API) From: phabricator X-Patchwork-Id: 38594 Message-Id: <95ab712a24e4f019e754d941e653057f@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sat, 9 Feb 2019 21:45:22 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGf92844cb942c: subrepo: adjust subrepo prefix before calling subrepo.forget() (API) (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5883?vs=13894&id=13958 REVISION DETAIL https://phab.mercurial-scm.org/D5883 AFFECTED FILES mercurial/cmdutil.py mercurial/subrepo.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -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 diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -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])