diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2028,7 +2028,7 @@ def forget(ui, repo, match, prefix, expl sub = wctx.sub(subpath) try: submatch = matchmod.narrowmatcher(subpath, match) - subbad, subforgot = sub.forget(ui, submatch, prefix) + subbad, subforgot = sub.forget(submatch, prefix) bad.extend([subpath + '/' + f for f in subbad]) forgot.extend([subpath + '/' + f for f in subforgot]) except error.LookupError: diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -496,7 +496,7 @@ class abstractsubrepo(object): ''' pass - def forget(self, ui, match, prefix): + def forget(self, match, prefix): return ([], []) def removefiles(self, ui, matcher, prefix, after, force, subrepos): @@ -850,8 +850,8 @@ class hgsubrepo(abstractsubrepo): return ctx.walk(match) @annotatesubrepoerror - def forget(self, ui, match, prefix): - return cmdutil.forget(ui, self._repo, match, + def forget(self, match, prefix): + return cmdutil.forget(self.ui, self._repo, match, os.path.join(prefix, self._path), True) @annotatesubrepoerror