Show More
@@ -251,6 +251,14 b' def _narrow(ui, repo, remote, commoninc,' | |||||
251 | def _widen(ui, repo, remote, commoninc, newincludes, newexcludes): |
|
251 | def _widen(ui, repo, remote, commoninc, newincludes, newexcludes): | |
252 | newmatch = narrowspec.match(repo.root, newincludes, newexcludes) |
|
252 | newmatch = narrowspec.match(repo.root, newincludes, newexcludes) | |
253 |
|
253 | |||
|
254 | # for now we assume that if a server has ellipses enabled, we will be | |||
|
255 | # exchanging ellipses nodes. In future we should add ellipses as a client | |||
|
256 | # side requirement (maybe) to distinguish a client is shallow or not and | |||
|
257 | # then send that information to server whether we want ellipses or not. | |||
|
258 | # Theoretically a non-ellipses repo should be able to use narrow | |||
|
259 | # functionality from an ellipses enabled server | |||
|
260 | ellipsesremote = wireprotoserver.ELLIPSESCAP in remote.capabilities() | |||
|
261 | ||||
254 | def pullbundle2extraprepare_widen(orig, pullop, kwargs): |
|
262 | def pullbundle2extraprepare_widen(orig, pullop, kwargs): | |
255 | orig(pullop, kwargs) |
|
263 | orig(pullop, kwargs) | |
256 | # The old{in,ex}cludepats have already been set by orig() |
|
264 | # The old{in,ex}cludepats have already been set by orig() | |
@@ -269,15 +277,21 b' def _widen(ui, repo, remote, commoninc, ' | |||||
269 | overrides = {('devel', 'all-warnings'): False} |
|
277 | overrides = {('devel', 'all-warnings'): False} | |
270 |
|
278 | |||
271 | with ui.uninterruptable(): |
|
279 | with ui.uninterruptable(): | |
272 | ds = repo.dirstate |
|
|||
273 | p1, p2 = ds.p1(), ds.p2() |
|
|||
274 | with ds.parentchange(): |
|
|||
275 | ds.setparents(node.nullid, node.nullid) |
|
|||
276 | common = commoninc[0] |
|
280 | common = commoninc[0] | |
277 | with wrappedextraprepare, repo.ui.configoverride(overrides, 'widen'): |
|
281 | if ellipsesremote: | |
278 | exchange.pull(repo, remote, heads=common) |
|
282 | ds = repo.dirstate | |
279 | with ds.parentchange(): |
|
283 | p1, p2 = ds.p1(), ds.p2() | |
280 |
ds. |
|
284 | with ds.parentchange(): | |
|
285 | ds.setparents(node.nullid, node.nullid) | |||
|
286 | with wrappedextraprepare,\ | |||
|
287 | repo.ui.configoverride(overrides, 'widen'): | |||
|
288 | exchange.pull(repo, remote, heads=common) | |||
|
289 | with ds.parentchange(): | |||
|
290 | ds.setparents(p1, p2) | |||
|
291 | else: | |||
|
292 | with wrappedextraprepare,\ | |||
|
293 | repo.ui.configoverride(overrides, 'widen'): | |||
|
294 | exchange.pull(repo, remote, heads=common) | |||
281 |
|
295 | |||
282 | repo.setnewnarrowpats() |
|
296 | repo.setnewnarrowpats() | |
283 | actions = {k: [] for k in 'a am f g cd dc r dm dg m e k p pr'.split()} |
|
297 | actions = {k: [] for k in 'a am f g cd dc r dm dg m e k p pr'.split()} |
@@ -88,6 +88,9 b' Widen the narrow spec to see the widest ' | |||||
88 | added upstream revisions. |
|
88 | added upstream revisions. | |
89 |
|
89 | |||
90 | $ cd narrow |
|
90 | $ cd narrow | |
|
91 | $ hg id -n | |||
|
92 | 2 | |||
|
93 | ||||
91 | $ hg tracked --addinclude widest/f --debug |
|
94 | $ hg tracked --addinclude widest/f --debug | |
92 | comparing with ssh://user@dummy/master |
|
95 | comparing with ssh://user@dummy/master | |
93 | running python "*dummyssh" *user@dummy* *hg -R master serve --stdio* (glob) |
|
96 | running python "*dummyssh" *user@dummy* *hg -R master serve --stdio* (glob) | |
@@ -127,6 +130,9 b' added upstream revisions.' | |||||
127 | $ cat widest/f |
|
130 | $ cat widest/f | |
128 | widest |
|
131 | widest | |
129 |
|
132 | |||
|
133 | $ hg id -n | |||
|
134 | 2 | |||
|
135 | ||||
130 | Pull down the newly added upstream revision. |
|
136 | Pull down the newly added upstream revision. | |
131 |
|
137 | |||
132 | $ hg pull |
|
138 | $ hg pull |
General Comments 0
You need to be logged in to leave comments.
Login now