diff mercurial/archival.py @ 41631:3d9d5e612e67

subrepo: adjust subrepo prefix before calling subrepo.archive() (API) Differential Revision: https://phab.mercurial-scm.org/D5887
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Feb 2019 10:20:57 -0800
parents d9eda1c6dfca
children c04e0836f039
line wrap: on
line diff
--- a/mercurial/archival.py	Thu Feb 07 09:52:36 2019 -0800
+++ b/mercurial/archival.py	Thu Feb 07 10:20:57 2019 -0800
@@ -340,7 +340,8 @@
         for subpath in sorted(ctx.substate):
             sub = ctx.workingsub(subpath)
             submatch = matchmod.subdirmatcher(subpath, match)
-            total += sub.archive(archiver, prefix, submatch, decode)
+            subprefix = prefix + subpath + '/'
+            total += sub.archive(archiver, subprefix, submatch, decode)
 
     if total == 0:
         raise error.Abort(_('no files match the archive pattern'))