##// END OF EJS Templates
incoming: handle phases the same as pull...
Eric Sumner -
r23633:96c3cbec default
parent child Browse files
Show More
@@ -350,6 +350,16 b' def instance(ui, path, create):'
350 repopath, bundlename = parentpath, path
350 repopath, bundlename = parentpath, path
351 return bundlerepository(ui, repopath, bundlename)
351 return bundlerepository(ui, repopath, bundlename)
352
352
353 class bundletransactionmanager(object):
354 def transaction(self):
355 return None
356
357 def close(self):
358 raise NotImplementedError
359
360 def release(self):
361 raise NotImplementedError
362
353 def getremotechanges(ui, repo, other, onlyheads=None, bundlename=None,
363 def getremotechanges(ui, repo, other, onlyheads=None, bundlename=None,
354 force=False):
364 force=False):
355 '''obtains a bundle of changes incoming from other
365 '''obtains a bundle of changes incoming from other
@@ -418,6 +428,14 b' def getremotechanges(ui, repo, other, on'
418
428
419 csets = localrepo.changelog.findmissing(common, rheads)
429 csets = localrepo.changelog.findmissing(common, rheads)
420
430
431 if bundlerepo:
432 reponodes = [ctx.node() for ctx in bundlerepo[bundlerepo.firstnewrev:]]
433 remotephases = other.listkeys('phases')
434
435 pullop = exchange.pulloperation(bundlerepo, other, heads=reponodes)
436 pullop.trmanager = bundletransactionmanager()
437 exchange._pullapplyphases(pullop, remotephases)
438
421 def cleanup():
439 def cleanup():
422 if bundlerepo:
440 if bundlerepo:
423 bundlerepo.close()
441 bundlerepo.close()
@@ -354,6 +354,7 b' Test actual protocol when pulling one ne'
354 "GET /?cmd=capabilities HTTP/1.1" 200 -
354 "GET /?cmd=capabilities HTTP/1.1" 200 -
355 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
355 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
356 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477
356 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
357 $ cat errors.log
358 $ cat errors.log
358
359
359 $ cd ..
360 $ cd ..
@@ -509,6 +509,7 b' Both have new stuff in existing named br'
509 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
509 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
510 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
510 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
511 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961
511 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961
512 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
512 "GET /?cmd=capabilities HTTP/1.1" 200 -
513 "GET /?cmd=capabilities HTTP/1.1" 200 -
513 "GET /?cmd=heads HTTP/1.1" 200 -
514 "GET /?cmd=heads HTTP/1.1" 200 -
514 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
515 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
General Comments 0
You need to be logged in to leave comments. Login now