Mercurial > hg
diff hgext/largefiles/overrides.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 | 7b2580e0dbbd |
children | f8b18583049f |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Thu Feb 07 09:52:36 2019 -0800 +++ b/hgext/largefiles/overrides.py Thu Feb 07 10:20:57 2019 -0800 @@ -998,8 +998,9 @@ for subpath in sorted(ctx.substate): sub = ctx.workingsub(subpath) submatch = matchmod.subdirmatcher(subpath, match) + subprefix = prefix + subpath + '/' sub._repo.lfstatus = True - sub.archive(archiver, prefix, submatch) + sub.archive(archiver, subprefix, submatch) archiver.done() @@ -1025,7 +1026,7 @@ if decode: data = repo._repo.wwritedata(name, data) - archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data) + archiver.addfile(prefix + name, mode, islink, data) for f in ctx: ff = ctx.flags(f) @@ -1051,8 +1052,9 @@ for subpath in sorted(ctx.substate): sub = ctx.workingsub(subpath) submatch = matchmod.subdirmatcher(subpath, match) + subprefix = prefix + subpath + '/' sub._repo.lfstatus = True - sub.archive(archiver, prefix + repo._path + '/', submatch, decode) + sub.archive(archiver, subprefix, submatch, decode) # If a largefile is modified, the change is not reflected in its # standin until a commit. cmdutil.bailifchanged() raises an exception