Patchwork [5,of,6] push: `exchange.push` instead of `localrepo.push`

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 25, 2014, 6:46 p.m.
Message ID <3cf57b53c3cfbc9933bb.1411670806@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5985/
State Accepted
Commit f6cf96804d27e8e9c53c695d3d9632870ac9b236
Headers show

Comments

Pierre-Yves David - Sept. 25, 2014, 6:46 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1411634569 25200
#      Thu Sep 25 01:42:49 2014 -0700
# Node ID 3cf57b53c3cfbc9933bb0a46eb8814aac9897ac0
# Parent  299c97274dae147b286f3162ffc9ac232f31f556
push: `exchange.push` instead of `localrepo.push`

The later is going away.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -10,10 +10,11 @@  import xml.dom.minidom
 import stat, subprocess, tarfile
 from i18n import _
 import config, util, node, error, cmdutil, bookmarks, match as matchmod
 import phases
 import pathutil
+import exchange
 hg = None
 propertycache = util.propertycache
 
 nullstate = ('', '', 'empty')
 
@@ -815,15 +816,15 @@  class hgsubrepo(abstractsubrepo):
                     % (subrelpath(self), dsturl))
                 return None
         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):
         return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)