changeset 33809:1bf5c5507614

bundle2: raise ProgrammingError for invalid call of addhookargs() It should be hard error. Also fixed the error message as s/hooks/hookargs/.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 13 Aug 2017 11:05:56 +0900
parents 055fee3547df
children b3a41f4d837b
files mercurial/bundle2.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Fri Jul 14 19:27:28 2017 +0000
+++ b/mercurial/bundle2.py	Sun Aug 13 11:05:56 2017 +0900
@@ -318,9 +318,8 @@
 
     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):