Patchwork [6,of,6] localrepo: remove checkpush()

login
register
mail settings
Submitter Gregory Szorc
Date July 12, 2014, 8:12 p.m.
Message ID <6be5c6a52ff4b48be147.1405195946@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/5153/
State Changes Requested
Headers show

Comments

Gregory Szorc - July 12, 2014, 8:12 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1405195026 25200
#      Sat Jul 12 12:57:06 2014 -0700
# Node ID 6be5c6a52ff4b48be147dbcc671f48aa4bc62b74
# Parent  be71c972fa2c2fe40060626ac4d150fa39b29c14
localrepo: remove checkpush()

The beforepush pyhook does what checkpush did. There are no more
in-tree users of localrepo.checkpush(). We are trying to limit the
number of methods on localrepo, so localrepo.checkpush() has been
removed.

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -120,9 +120,8 @@  def push(repo, remote, force=False, revs
         # synchronisation.
         msg = 'cannot lock source repository: %s\n' % err
         pushop.ui.debug(msg)
     try:
-        pushop.repo.checkpush(pushop)
         pushop.repo.runpyhook('beforepush', pushop=pushop)
         lock = None
         unbundle = pushop.remote.capable('unbundle')
         if not unbundle:
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1625,15 +1625,8 @@  class localrepository(object):
 
     def pull(self, remote, heads=None, force=False):
         return exchange.pull (self, remote, heads, force)
 
-    def checkpush(self, pushop):
-        """Extensions can override this function if additional checks have
-        to be performed before pushing, or call it if they override push
-        command.
-        """
-        pass
-
     @unfilteredpropertycache
     def prepushoutgoinghooks(self):
         """Return util.hooks consists of "(repo, remote, outgoing)"
         functions, which are called before pushing changesets.