diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -350,6 +350,16 @@ def instance(ui, path, create): repopath, bundlename = parentpath, path return bundlerepository(ui, repopath, bundlename) +class bundletransactionmanager(object): + def transaction(self): + return None + + def close(self): + raise NotImplementedError + + def release(self): + raise NotImplementedError + def getremotechanges(ui, repo, other, onlyheads=None, bundlename=None, force=False): '''obtains a bundle of changes incoming from other @@ -418,6 +428,14 @@ def getremotechanges(ui, repo, other, on csets = localrepo.changelog.findmissing(common, rheads) + if bundlerepo: + reponodes = [ctx.node() for ctx in bundlerepo[bundlerepo.firstnewrev:]] + remotephases = other.listkeys('phases') + + pullop = exchange.pulloperation(bundlerepo, other, heads=reponodes) + pullop.trmanager = bundletransactionmanager() + exchange._pullapplyphases(pullop, remotephases) + def cleanup(): if bundlerepo: bundlerepo.close() diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t --- a/tests/test-setdiscovery.t +++ b/tests/test-setdiscovery.t @@ -354,6 +354,7 @@ Test actual protocol when pulling one ne "GET /?cmd=capabilities HTTP/1.1" 200 - "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 + "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases $ cat errors.log $ cd .. diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t --- a/tests/test-treediscovery.t +++ b/tests/test-treediscovery.t @@ -509,6 +509,7 @@ Both have new stuff in existing named br "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 + "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases "GET /?cmd=capabilities HTTP/1.1" 200 - "GET /?cmd=heads HTTP/1.1" 200 - "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961