Show More
@@ -1252,8 +1252,11 b' def overridearchive(' | |||||
1252 | else: |
|
1252 | else: | |
1253 | prefix = archival.tidyprefix(dest, kind, prefix) |
|
1253 | prefix = archival.tidyprefix(dest, kind, prefix) | |
1254 |
|
1254 | |||
|
1255 | if not match: | |||
|
1256 | match = scmutil.matchall(repo) | |||
|
1257 | ||||
1255 | def write(name, mode, islink, getdata): |
|
1258 | def write(name, mode, islink, getdata): | |
1256 |
if |
|
1259 | if not match(name): | |
1257 | return |
|
1260 | return | |
1258 | data = getdata() |
|
1261 | data = getdata() | |
1259 | if decode: |
|
1262 | if decode: | |
@@ -1314,7 +1317,7 b' def overridearchive(' | |||||
1314 |
|
1317 | |||
1315 |
|
1318 | |||
1316 | @eh.wrapfunction(subrepo.hgsubrepo, 'archive') |
|
1319 | @eh.wrapfunction(subrepo.hgsubrepo, 'archive') | |
1317 |
def hgsubrepoarchive(orig, repo, archiver, prefix, match |
|
1320 | def hgsubrepoarchive(orig, repo, archiver, prefix, match, decode=True): | |
1318 | lfenabled = hasattr(repo._repo, '_largefilesenabled') |
|
1321 | lfenabled = hasattr(repo._repo, '_largefilesenabled') | |
1319 | if not lfenabled or not repo._repo.lfstatus: |
|
1322 | if not lfenabled or not repo._repo.lfstatus: | |
1320 | return orig(repo, archiver, prefix, match, decode) |
|
1323 | return orig(repo, archiver, prefix, match, decode) | |
@@ -1329,7 +1332,7 b' def hgsubrepoarchive(orig, repo, archive' | |||||
1329 | def write(name, mode, islink, getdata): |
|
1332 | def write(name, mode, islink, getdata): | |
1330 | # At this point, the standin has been replaced with the largefile name, |
|
1333 | # At this point, the standin has been replaced with the largefile name, | |
1331 | # so the normal matcher works here without the lfutil variants. |
|
1334 | # so the normal matcher works here without the lfutil variants. | |
1332 |
if |
|
1335 | if not match(f): | |
1333 | return |
|
1336 | return | |
1334 | data = getdata() |
|
1337 | data = getdata() | |
1335 | if decode: |
|
1338 | if decode: |
@@ -363,11 +363,8 b' class abstractsubrepo:' | |||||
363 | """handle the files command for this subrepo""" |
|
363 | """handle the files command for this subrepo""" | |
364 | return 1 |
|
364 | return 1 | |
365 |
|
365 | |||
366 |
def archive(self, archiver, prefix, match |
|
366 | def archive(self, archiver, prefix, match, decode=True): | |
367 | if match is not None: |
|
367 | files = [f for f in self.files() if match(f)] | |
368 | files = [f for f in self.files() if match(f)] |
|
|||
369 | else: |
|
|||
370 | files = self.files() |
|
|||
371 | total = len(files) |
|
368 | total = len(files) | |
372 | relpath = subrelpath(self) |
|
369 | relpath = subrelpath(self) | |
373 | progress = self.ui.makeprogress( |
|
370 | progress = self.ui.makeprogress( | |
@@ -652,11 +649,9 b' class hgsubrepo(abstractsubrepo):' | |||||
652 | ) |
|
649 | ) | |
653 |
|
650 | |||
654 | @annotatesubrepoerror |
|
651 | @annotatesubrepoerror | |
655 |
def archive(self, archiver, prefix, match |
|
652 | def archive(self, archiver, prefix, match, decode=True): | |
656 | self._get(self._state + (b'hg',)) |
|
653 | self._get(self._state + (b'hg',)) | |
657 | files = self.files() |
|
654 | files = [f for f in self.files() if match(f)] | |
658 | if match: |
|
|||
659 | files = [f for f in files if match(f)] |
|
|||
660 | rev = self._state[1] |
|
655 | rev = self._state[1] | |
661 | ctx = self._repo[rev] |
|
656 | ctx = self._repo[rev] | |
662 | scmutil.prefetchfiles( |
|
657 | scmutil.prefetchfiles( | |
@@ -1911,7 +1906,7 b' class gitsubrepo(abstractsubrepo):' | |||||
1911 | else: |
|
1906 | else: | |
1912 | self.wvfs.unlink(f) |
|
1907 | self.wvfs.unlink(f) | |
1913 |
|
1908 | |||
1914 |
def archive(self, archiver, prefix, match |
|
1909 | def archive(self, archiver, prefix, match, decode=True): | |
1915 | total = 0 |
|
1910 | total = 0 | |
1916 | source, revision = self._state |
|
1911 | source, revision = self._state | |
1917 | if not revision: |
|
1912 | if not revision: | |
@@ -1932,7 +1927,7 b' class gitsubrepo(abstractsubrepo):' | |||||
1932 | if info.isdir(): |
|
1927 | if info.isdir(): | |
1933 | continue |
|
1928 | continue | |
1934 | bname = pycompat.fsencode(info.name) |
|
1929 | bname = pycompat.fsencode(info.name) | |
1935 |
if |
|
1930 | if not match(bname): | |
1936 | continue |
|
1931 | continue | |
1937 | if info.issym(): |
|
1932 | if info.issym(): | |
1938 | data = info.linkname |
|
1933 | data = info.linkname |
General Comments 0
You need to be logged in to leave comments.
Login now