[PATCH 4 of 5] subrepo: add a match parameter to archive() (API)
Matt Harbison
matt_harbison at yahoo.com
Tue Jun 19 23:45:32 CDT 2012
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1339900446 14400
# Node ID 8d07024897537dc44357830c4c57f13160c629e1
# Parent f4bc770430b15cdabf07676f5ae1d6611696aba2
subrepo: add a match parameter to archive() (API)
This will allow the -X and -I options to be honored inside subrepos when
archiving. They currently only affect the top level repo.
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -811,7 +811,7 @@
archiver.done()
-def hgsubrepoarchive(orig, repo, ui, archiver, prefix):
+def hgsubrepoarchive(orig, repo, ui, archiver, prefix, match=None):
rev = repo._state[1]
ctx = repo._repo[rev]
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -351,7 +351,7 @@
"""return file flags"""
return ''
- def archive(self, ui, archiver, prefix):
+ def archive(self, ui, archiver, prefix, match=None):
files = self.files()
total = len(files)
relpath = subrelpath(self)
@@ -445,7 +445,7 @@
self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n')
% (inst, subrelpath(self)))
- def archive(self, ui, archiver, prefix):
+ def archive(self, ui, archiver, prefix, match=None):
self._get(self._state + ('hg',))
abstractsubrepo.archive(self, ui, archiver, prefix)
@@ -1183,7 +1183,7 @@
else:
os.remove(path)
- def archive(self, ui, archiver, prefix):
+ def archive(self, ui, archiver, prefix, match=None):
source, revision = self._state
if not revision:
return
More information about the Mercurial-devel
mailing list