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