mercurial/bundlerepo.py
changeset 23633 96c3cbec006f
parent 23632 e7fcf58acd71
child 23878 37a92908a382
--- a/mercurial/bundlerepo.py	Thu Dec 18 12:22:43 2014 -0800
+++ b/mercurial/bundlerepo.py	Thu Dec 18 12:33:17 2014 -0800
@@ -350,6 +350,16 @@
         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 @@
 
     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()