##// END OF EJS Templates
narrow: pass 'narrow_widen' as source while generating changegroup...
Pulkit Goyal -
r39998:fa239565 default
parent child Browse files
Show More
@@ -51,7 +51,7 b' def getrepocaps_narrow(orig, repo, **kwa'
51 caps[NARROWCAP] = ['v0']
51 caps[NARROWCAP] = ['v0']
52 return caps
52 return caps
53
53
54 def widen_bundle(repo, diffmatcher, common, known, cgversion, source, ellipses):
54 def widen_bundle(repo, diffmatcher, common, known, cgversion, ellipses):
55 """generates changegroup for widening a narrow clone
55 """generates changegroup for widening a narrow clone
56
56
57 repo is the localrepository instance
57 repo is the localrepository instance
@@ -60,7 +60,6 b' def widen_bundle(repo, diffmatcher, comm'
60 common is set of common revs between server and client
60 common is set of common revs between server and client
61 known is a set of revs known on the client side (used in ellipses)
61 known is a set of revs known on the client side (used in ellipses)
62 cgversion is the changegroup version to send
62 cgversion is the changegroup version to send
63 source is the command which called this codepath
64 ellipses is boolean value telling whether to send ellipses data or not
63 ellipses is boolean value telling whether to send ellipses data or not
65
64
66 returns changegroup data of the changegroup built or return None if there
65 returns changegroup data of the changegroup built or return None if there
@@ -80,7 +79,7 b' def widen_bundle(repo, diffmatcher, comm'
80 filematcher=diffmatcher,
79 filematcher=diffmatcher,
81 fullnodes=commonnodes)
80 fullnodes=commonnodes)
82 cgdata = packer.generate(set([nullid]), list(commonnodes), False,
81 cgdata = packer.generate(set([nullid]), list(commonnodes), False,
83 source, changelog=False)
82 'narrow_widen', changelog=False)
84
83
85 return cgdata
84 return cgdata
86
85
@@ -114,8 +113,7 b' def getbundlechangegrouppart_widen(bundl'
114 common = set(common or [nullid])
113 common = set(common or [nullid])
115
114
116 if (oldinclude != include or oldexclude != exclude):
115 if (oldinclude != include or oldexclude != exclude):
117 cgdata = widen_bundle(repo, diffmatch, common, [], version,
116 cgdata = widen_bundle(repo, diffmatch, common, [], version, False)
118 source, False)
119 if cgdata is not None:
117 if cgdata is not None:
120 part = bundler.newpart('changegroup', data=cgdata)
118 part = bundler.newpart('changegroup', data=cgdata)
121 part.addparam('version', version)
119 part.addparam('version', version)
@@ -194,7 +192,7 b' def getbundlechangegrouppart_narrow(bund'
194 shallow=depth is not None,
192 shallow=depth is not None,
195 ellipsisroots=newellipsis,
193 ellipsisroots=newellipsis,
196 fullnodes=newfull)
194 fullnodes=newfull)
197 cgdata = packer.generate(common, newvisit, False, source)
195 cgdata = packer.generate(common, newvisit, False, 'narrow_widen')
198
196
199 part = bundler.newpart('changegroup', data=cgdata)
197 part = bundler.newpart('changegroup', data=cgdata)
200 part.addparam('version', version)
198 part.addparam('version', version)
@@ -212,7 +210,7 b' def getbundlechangegrouppart_narrow(bund'
212 shallow=depth is not None,
210 shallow=depth is not None,
213 ellipsisroots=ellipsisroots,
211 ellipsisroots=ellipsisroots,
214 fullnodes=relevant_nodes)
212 fullnodes=relevant_nodes)
215 cgdata = packer.generate(common, visitnodes, False, source)
213 cgdata = packer.generate(common, visitnodes, False, 'narrow_widen')
216
214
217 part = bundler.newpart('changegroup', data=cgdata)
215 part = bundler.newpart('changegroup', data=cgdata)
218 part.addparam('version', version)
216 part.addparam('version', version)
General Comments 0
You need to be logged in to leave comments. Login now