Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 23426:19ebd2f88fc7
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 01 Dec 2014 19:34:11 -0600 |
parents | 86c6f06feb04 53a65929ef1f |
children | 065c0334846f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Nov 28 20:16:15 2014 +0100 +++ b/mercurial/localrepo.py Mon Dec 01 19:34:11 2014 -0600 @@ -1767,8 +1767,14 @@ return ret def pushkey(self, namespace, key, old, new): - self.hook('prepushkey', throw=True, namespace=namespace, key=key, - old=old, new=new) + try: + self.hook('prepushkey', throw=True, namespace=namespace, key=key, + old=old, new=new) + except error.HookAbort, exc: + self.ui.write_err(_("pushkey-abort: %s\n") % exc) + if exc.hint: + self.ui.write_err(_("(%s)\n") % exc.hint) + return False self.ui.debug('pushing key for "%s:%s"\n' % (namespace, key)) ret = pushkey.push(self, namespace, key, old, new) self.hook('pushkey', namespace=namespace, key=key, old=old, new=new,