##// END OF EJS Templates
narrow: use diffmatcher to send only new filelogs in non-ellipses widening...
Pulkit Goyal -
r39701:c73c7653 default
parent child Browse files
Show More
@@ -21,6 +21,7 b' from mercurial import ('
21 error,
21 error,
22 exchange,
22 exchange,
23 extensions,
23 extensions,
24 match as matchmod,
24 narrowspec,
25 narrowspec,
25 repair,
26 repair,
26 repository,
27 repository,
@@ -72,6 +73,9 b' def getbundlechangegrouppart_widen(bundl'
72 newmatch = narrowspec.match(repo.root, include=include, exclude=exclude)
73 newmatch = narrowspec.match(repo.root, include=include, exclude=exclude)
73 oldinclude = sorted(filter(bool, kwargs.get(r'oldincludepats', [])))
74 oldinclude = sorted(filter(bool, kwargs.get(r'oldincludepats', [])))
74 oldexclude = sorted(filter(bool, kwargs.get(r'oldexcludepats', [])))
75 oldexclude = sorted(filter(bool, kwargs.get(r'oldexcludepats', [])))
76 oldmatch = narrowspec.match(repo.root, include=oldinclude,
77 exclude=oldexclude)
78 diffmatch = matchmod.differencematcher(newmatch, oldmatch)
75 common = set(common or [nullid])
79 common = set(common or [nullid])
76
80
77 if (oldinclude != include or oldexclude != exclude):
81 if (oldinclude != include or oldexclude != exclude):
@@ -84,7 +88,7 b' def getbundlechangegrouppart_widen(bundl'
84 # XXX: we should only send the filelogs (and treemanifest). user
88 # XXX: we should only send the filelogs (and treemanifest). user
85 # already has the changelog and manifest
89 # already has the changelog and manifest
86 packer = changegroup.getbundler(version, repo,
90 packer = changegroup.getbundler(version, repo,
87 filematcher=newmatch,
91 filematcher=diffmatch,
88 fullnodes=commonnodes)
92 fullnodes=commonnodes)
89 cgdata = packer.generate(set([nullid]), list(commonnodes), False,
93 cgdata = packer.generate(set([nullid]), list(commonnodes), False,
90 source)
94 source)
@@ -95,7 +95,7 b' added upstream revisions.'
95 adding changesets
95 adding changesets
96 adding manifests
96 adding manifests
97 adding file changes
97 adding file changes
98 added 0 changesets with 1 changes to 2 files
98 added 0 changesets with 1 changes to 1 files
99 3 local changesets published
99 3 local changesets published
100 $ hg tracked
100 $ hg tracked
101 I path:inside
101 I path:inside
@@ -154,7 +154,7 b' widen the narrow spec to include the wid'
154 adding changesets
154 adding changesets
155 adding manifests
155 adding manifests
156 adding file changes
156 adding file changes
157 added 0 changesets with 1 changes to 3 files
157 added 0 changesets with 1 changes to 1 files
158 5 local changesets published
158 5 local changesets published
159 $ hg tracked
159 $ hg tracked
160 I path:inside
160 I path:inside
@@ -259,7 +259,7 b' make narrow clone with every third node.'
259 adding changesets
259 adding changesets
260 adding manifests
260 adding manifests
261 adding file changes
261 adding file changes
262 added 0 changesets with 1 changes to 5 files
262 added 0 changesets with 1 changes to 1 files
263 11 local changesets published
263 11 local changesets published
264 $ hg tracked
264 $ hg tracked
265 I path:d0
265 I path:d0
@@ -351,7 +351,7 b' Widening that fails can be recovered fro'
351 adding changesets
351 adding changesets
352 adding manifests
352 adding manifests
353 adding file changes
353 adding file changes
354 added 0 changesets with 1 changes to 2 files
354 added 0 changesets with 1 changes to 1 files
355 11 local changesets published
355 11 local changesets published
356 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
356 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
357 11: local
357 11: local
General Comments 0
You need to be logged in to leave comments. Login now