# HG changeset patch # User Yuya Nishihara # Date 2017-08-13 02:05:56 # Node ID 1bf5c5507614e9ae452178d4f1fb14c71c969029 # Parent 055fee3547df71562343141b06b16988b61d8150 bundle2: raise ProgrammingError for invalid call of addhookargs() It should be hard error. Also fixed the error message as s/hooks/hookargs/. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -318,9 +318,8 @@ class bundleoperation(object): def addhookargs(self, hookargs): if self.hookargs is None: - raise error.Abort( - _('attempted to add hooks to operation after transaction ' - 'started')) + raise error.ProgrammingError('attempted to add hookargs to ' + 'operation after transaction started') self.hookargs.update(hookargs) class TransactionUnavailable(RuntimeError):