comparison 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
comparison
equal deleted inserted replaced
41630:3d094bfaf885 41631:3d9d5e612e67
338 338
339 if subrepos: 339 if subrepos:
340 for subpath in sorted(ctx.substate): 340 for subpath in sorted(ctx.substate):
341 sub = ctx.workingsub(subpath) 341 sub = ctx.workingsub(subpath)
342 submatch = matchmod.subdirmatcher(subpath, match) 342 submatch = matchmod.subdirmatcher(subpath, match)
343 total += sub.archive(archiver, prefix, submatch, decode) 343 subprefix = prefix + subpath + '/'
344 total += sub.archive(archiver, subprefix, submatch, decode)
344 345
345 if total == 0: 346 if total == 0:
346 raise error.Abort(_('no files match the archive pattern')) 347 raise error.Abort(_('no files match the archive pattern'))
347 348
348 archiver.done() 349 archiver.done()