Comments
Patch
@@ -121,8 +121,9 @@ def push(repo, remote, force=False, revs
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:
lock = pushop.remote.lock()
@@ -302,8 +302,9 @@ class localrepository(object):
self.filteredrevcache = {}
# Maps names to list of callables.
self._hooks = {
+ 'beforepush': [],
'afterpush': [],
}
def close(self):