mercurial/scmutil.py
changeset 41640 5ee3c49fc9cd
parent 41617 e944cf4ce1a8
child 41660 799e156785f7
--- a/mercurial/scmutil.py	Thu Feb 07 09:59:27 2019 -0800
+++ b/mercurial/scmutil.py	Thu Feb 07 10:01:55 2019 -0800
@@ -1047,8 +1047,9 @@
         submatch = matchmod.subdirmatcher(subpath, m)
         if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()):
             sub = wctx.sub(subpath)
+            subprefix = repo.wvfs.reljoin(prefix, subpath)
             try:
-                if sub.addremove(submatch, prefix, opts):
+                if sub.addremove(submatch, subprefix, opts):
                     ret = 1
             except error.LookupError:
                 repo.ui.status(_("skipping missing subrepository: %s\n")