D5177: archive: create alwaysmatcher when no matcher provided
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Oct 22 15:16:01 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0e01abf9f783: archive: create alwaysmatcher when no matcher provided (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5177?vs=12291&id=12312
REVISION DETAIL
https://phab.mercurial-scm.org/D5177
AFFECTED FILES
mercurial/archival.py
CHANGE DETAILS
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -27,6 +27,7 @@
pycompat,
scmutil,
util,
+ scmutil,
vfs as vfsmod,
)
stringio = util.stringio
@@ -313,15 +314,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()
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list