Submitter | Gregory Szorc |
---|---|
Date | July 12, 2014, 8:12 p.m. |
Message ID | <5a9b80c2b3e681e15a62.1405195943@vm-ubuntu-main.gateway.sonic.net> |
Download | mbox | patch |
Permalink | /patch/5150/ |
State | Changes Requested |
Headers | show |
Comments
On Sat, 2014-07-12 at 13:12 -0700, Gregory Szorc wrote: > # Maps names to list of callables. > - self._hooks = {} > + self._hooks = { > + 'afterpush': [], > + } Seems like we should handle missing entries instead.
Patch
diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -148,8 +148,9 @@ def push(repo, remote, force=False, revs if locallock is not None: locallock.release() _pushbookmark(pushop) + pushop.repo.runpyhook('afterpush', pushop=pushop) return pushop.ret def _pushdiscovery(pushop): # discovery diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -301,9 +301,11 @@ class localrepository(object): # - bookmark changes self.filteredrevcache = {} # Maps names to list of callables. - self._hooks = {} + self._hooks = { + 'afterpush': [], + } def close(self): pass