[PATCH 1 of 2] bundle2: raise ProgrammingError for invalid call of addhookargs()
Yuya Nishihara
yuya at tcha.org
Mon Aug 14 07:53:49 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1502589956 -32400
# Sun Aug 13 11:05:56 2017 +0900
# Node ID 1643bad8116707fb6e162a509682b470e9223fba
# Parent 9d9186f859585f2513e3bde3a304cc72cb534565
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):
More information about the Mercurial-devel
mailing list