fetch: use exchange.pull
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 03 Oct 2014 11:16:57 -0500
changeset 22697 6ea41d41aba1
parent 22696 73b5b8312ce6
child 22698 32a8ad782260
fetch: use exchange.pull localrepo.pull is going away. See 4d52e6eb98ea for details.
hgext/fetch.py
--- a/hgext/fetch.py	Fri Oct 03 11:15:33 2014 -0500
+++ b/hgext/fetch.py	Fri Oct 03 11:16:57 2014 -0500
@@ -11,6 +11,7 @@
 from mercurial.node import short
 from mercurial import commands, cmdutil, hg, util, error
 from mercurial.lock import release
+from mercurial import exchange
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
@@ -84,7 +85,7 @@
                 raise util.Abort(err)
 
         # Are there any changes at all?
-        modheads = repo.pull(other, heads=revs)
+        modheads = exchange.pull(repo, other, heads=revs).cgresult
         if modheads == 0:
             return 0