##// END OF EJS Templates
streamclone: pass narrowing related info in _walkstreamfiles()...
Pulkit Goyal -
r40375:f0e8f277 default
parent child Browse files
Show More
@@ -16,6 +16,7 b' from . import ('
16 16 branchmap,
17 17 cacheutil,
18 18 error,
19 narrowspec,
19 20 phases,
20 21 pycompat,
21 22 repository,
@@ -194,8 +195,8 b' def allowservergeneration(repo):'
194 195 return True
195 196
196 197 # This is it's own function so extensions can override it.
197 def _walkstreamfiles(repo):
198 return repo.store.walk()
198 def _walkstreamfiles(repo, matcher=None):
199 return repo.store.walk(matcher)
199 200
200 201 def generatev1(repo):
201 202 """Emit content for version 1 of a streaming clone.
@@ -553,8 +554,12 b' def generatev2(repo, includes, excludes)'
553 554 entries = []
554 555 totalfilesize = 0
555 556
557 matcher = None
558 if includes or excludes:
559 matcher = narrowspec.match(repo.root, includes, excludes)
560
556 561 repo.ui.debug('scanning\n')
557 for name, ename, size in _walkstreamfiles(repo):
562 for name, ename, size in _walkstreamfiles(repo, matcher):
558 563 if size:
559 564 entries.append((_srcstore, name, _fileappend, size))
560 565 totalfilesize += size
General Comments 0
You need to be logged in to leave comments. Login now