[PATCH 6 of 6] localrepo: remove checkpush()
Gregory Szorc
gregory.szorc at gmail.com
Sat Jul 12 15:12:26 CDT 2014
# HG changeset patch
# User Gregory Szorc <gregory.szorc at 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.
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.
More information about the Mercurial-devel
mailing list