diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2075,8 +2075,7 @@ def remove(ui, repo, m, prefix, after, f sub = wctx.sub(subpath) try: submatch = matchmod.narrowmatcher(subpath, m) - if sub.removefiles(ui, submatch, prefix, after, force, - subrepos): + if sub.removefiles(submatch, prefix, after, force, subrepos): ret = 1 except error.LookupError: ui.status(_("skipping missing subrepository: %s\n") diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -499,7 +499,7 @@ class abstractsubrepo(object): def forget(self, match, prefix): return ([], []) - def removefiles(self, ui, matcher, prefix, after, force, subrepos): + def removefiles(self, matcher, prefix, after, force, subrepos): """remove the matched files from the subrepository and the filesystem, possibly by force and/or after the file has been removed from the filesystem. Return 0 on success, 1 on any warning. @@ -855,8 +855,8 @@ class hgsubrepo(abstractsubrepo): os.path.join(prefix, self._path), True) @annotatesubrepoerror - def removefiles(self, ui, matcher, prefix, after, force, subrepos): - return cmdutil.remove(ui, self._repo, matcher, + def removefiles(self, matcher, prefix, after, force, subrepos): + return cmdutil.remove(self.ui, self._repo, matcher, os.path.join(prefix, self._path), after, force, subrepos)