[PATCH 6 of 6] locarepo: remove the `push` method

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Sep 25 13:46:47 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1411634604 25200
#      Thu Sep 25 01:43:24 2014 -0700
# Node ID 2b7fdbb82a100550e2171280c10ab4221f2d6962
# Parent  3cf57b53c3cfbc9933bb0a46eb8814aac9897ac0
locarepo: remove the `push` method

All the logic of this function is in the exchange.push function for some time.
We just stop calling `localrepo.push` in `command.push` to have access to more
information. Leaving `localrepo.push` in place will let third party extensions
wrap it but it would never be called by `hg push` making the wrapping useless.
Therefore, the method is removed so that third party codes fail noisily and
get properly upgraded.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1589,13 +1589,10 @@ class localrepository(object):
         """Return util.hooks consists of "(repo, remote, outgoing)"
         functions, which are called before pushing changesets.
         """
         return util.hooks()
 
-    def push(self, remote, force=False, revs=None, newbranch=False):
-        return exchange.push(self, remote, force, revs, newbranch).cgresult
-
     def stream_in(self, remote, requirements):
         lock = self.lock()
         try:
             # Save remote branchmap. We will use it later
             # to speed up branchcache creation


More information about the Mercurial-devel mailing list