mercurial/cmdutil.py
changeset 41627 f92844cb942c
parent 41626 2c549abc6b85
child 41628 ed046348675c
--- 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])