Mercurial > hg-stable
changeset 40484:997997eb8367
archive: create alwaysmatcher when no matcher provided
Differential Revision: https://phab.mercurial-scm.org/D5177
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 05 Sep 2017 15:24:22 -0700 |
parents | 3d76a8e627a6 |
children | 5eefd32cb382 |
files | mercurial/archival.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/archival.py Tue Sep 05 15:21:21 2017 -0700 +++ b/mercurial/archival.py Tue Sep 05 15:24:22 2017 -0700 @@ -313,15 +313,15 @@ ctx = repo[node] archiver = archivers[kind](dest, mtime or ctx.date()[0]) + if not match: + match = scmutil.matchall(repo) + if repo.ui.configbool("ui", "archivemeta"): name = '.hg_archival.txt' - if not match or match(name): + if match(name): write(name, 0o644, False, lambda: buildmetadata(ctx)) - if match: - files = [f for f in ctx.manifest().keys() if match(f)] - else: - files = ctx.manifest().keys() + files = [f for f in ctx.manifest().keys() if match(f)] total = len(files) if total: files.sort()