transplant: use exchange.pull
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 03 Oct 2014 11:21:52 -0500
changeset 22699 74da54e52d7c
parent 22698 32a8ad782260
child 22700 41421bd9c42e
transplant: use exchange.pull localrepo.pull is going away. See 4d52e6eb98ea for details.
hgext/transplant.py
--- a/hgext/transplant.py	Fri Oct 03 11:19:25 2014 -0500
+++ b/hgext/transplant.py	Fri Oct 03 11:21:52 2014 -0500
@@ -19,7 +19,7 @@
 from mercurial.node import short
 from mercurial import bundlerepo, hg, merge, match
 from mercurial import patch, revlog, scmutil, util, error, cmdutil
-from mercurial import revset, templatekw
+from mercurial import revset, templatekw, exchange
 
 class TransplantError(error.Abort):
     pass
@@ -145,7 +145,7 @@
                         continue
                     if pulls:
                         if source != repo:
-                            repo.pull(source.peer(), heads=pulls)
+                            exchange.pull(repo, source.peer(), heads=pulls)
                         merge.update(repo, pulls[-1], False, False, None)
                         p1, p2 = repo.dirstate.parents()
                         pulls = []
@@ -157,7 +157,7 @@
                     # transplants before them fail.
                     domerge = True
                     if not hasnode(repo, node):
-                        repo.pull(source.peer(), heads=[node])
+                        exchange.pull(repo, source.peer(), heads=[node])
 
                 skipmerge = False
                 if parents[1] != revlog.nullid:
@@ -209,7 +209,7 @@
                             os.unlink(patchfile)
             tr.close()
             if pulls:
-                repo.pull(source.peer(), heads=pulls)
+                exchange.pull(repo, source.peer(), heads=pulls)
                 merge.update(repo, pulls[-1], False, False, None)
         finally:
             self.saveseries(revmap, merges)