push: `exchange.push` instead of `localrepo.push`
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 25 Sep 2014 01:42:49 -0700
changeset 22619 f6cf96804d27
parent 22618 ce95c15f680b
child 22620 4d52e6eb98ea
push: `exchange.push` instead of `localrepo.push` The latter is going away.
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Thu Sep 25 01:41:26 2014 -0700
+++ b/mercurial/subrepo.py	Thu Sep 25 01:42:49 2014 -0700
@@ -12,6 +12,7 @@
 import config, util, node, error, cmdutil, bookmarks, match as matchmod
 import phases
 import pathutil
+import exchange
 hg = None
 propertycache = util.propertycache
 
@@ -817,11 +818,11 @@
         self._repo.ui.status(_('pushing subrepo %s to %s\n') %
             (subrelpath(self), dsturl))
         other = hg.peer(self._repo, {'ssh': ssh}, dsturl)
-        res = self._repo.push(other, force, newbranch=newbranch)
+        res = exchange.push(self._repo, other, force, newbranch=newbranch)
 
         # the repo is now clean
         self._cachestorehash(dsturl)
-        return res
+        return res.cgresult
 
     @annotatesubrepoerror
     def outgoing(self, ui, dest, opts):