convert-hg: use localrepo.pull
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 03 Oct 2014 11:19:25 -0500
changeset 22698 32a8ad782260
parent 22697 6ea41d41aba1
child 22699 74da54e52d7c
convert-hg: use localrepo.pull localrepo.pull is going away. See 4d52e6eb98ea for details.
hgext/convert/hg.py
--- a/hgext/convert/hg.py	Fri Oct 03 11:16:57 2014 -0500
+++ b/hgext/convert/hg.py	Fri Oct 03 11:19:25 2014 -0500
@@ -21,7 +21,7 @@
 import os, time, cStringIO
 from mercurial.i18n import _
 from mercurial.node import bin, hex, nullid
-from mercurial import hg, util, context, bookmarks, error, scmutil
+from mercurial import hg, util, context, bookmarks, error, scmutil, exchange
 
 from common import NoRepo, commit, converter_source, converter_sink
 
@@ -113,7 +113,8 @@
                 pbranchpath = os.path.join(self.path, pbranch)
                 prepo = hg.peer(self.ui, {}, pbranchpath)
                 self.ui.note(_('pulling from %s into %s\n') % (pbranch, branch))
-                self.repo.pull(prepo, [prepo.lookup(h) for h in heads])
+                exchange.pull(self.repo, prepo,
+                              [prepo.lookup(h) for h in heads])
             self.before()
 
     def _rewritetags(self, source, revmap, data):