push: `exchange.push` now returns the `pushoperation` object
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 25 Sep 2014 02:21:59 -0700
changeset 22616 cda85cfc8252
parent 22615 4f14303e8954
child 22617 1625770c2ce1
push: `exchange.push` now returns the `pushoperation` object Returning the pushop object gives access to more information (upcoming bookmark push result for example). `localrepo.push` currently extracts the `cgresult` for callers.
mercurial/exchange.py
mercurial/localrepo.py
--- a/mercurial/exchange.py	Thu Sep 25 00:55:39 2014 -0700
+++ b/mercurial/exchange.py	Thu Sep 25 02:21:59 2014 -0700
@@ -211,7 +211,7 @@
         if locallock is not None:
             locallock.release()
 
-    return pushop.cgresult
+    return pushop
 
 # list of steps to perform discovery before push
 pushdiscoveryorder = []
--- a/mercurial/localrepo.py	Thu Sep 25 00:55:39 2014 -0700
+++ b/mercurial/localrepo.py	Thu Sep 25 02:21:59 2014 -0700
@@ -1592,7 +1592,7 @@
         return util.hooks()
 
     def push(self, remote, force=False, revs=None, newbranch=False):
-        return exchange.push(self, remote, force, revs, newbranch)
+        return exchange.push(self, remote, force, revs, newbranch).cgresult
 
     def stream_in(self, remote, requirements):
         lock = self.lock()