changeset 31652:4dbef666c6c9

bundle2: use ProgrammingError
author Jun Wu <quark@fb.com>
date Sun, 26 Mar 2017 16:57:25 -0700
parents e960eba3581c
children 8defc7d9adae
files mercurial/bundle2.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Sun Mar 26 16:55:56 2017 -0700
+++ b/mercurial/bundle2.py	Sun Mar 26 16:57:25 2017 -0700
@@ -855,7 +855,7 @@
         self._seenparams = set()
         for pname, __ in self._mandatoryparams + self._advisoryparams:
             if pname in self._seenparams:
-                raise RuntimeError('duplicated params: %s' % pname)
+                raise error.ProgrammingError('duplicated params: %s' % pname)
             self._seenparams.add(pname)
         # status of the part's generation:
         # - None: not started,
@@ -913,7 +913,7 @@
     # methods used to generates the bundle2 stream
     def getchunks(self, ui):
         if self._generated is not None:
-            raise RuntimeError('part can only be consumed once')
+            raise error.ProgrammingError('part can only be consumed once')
         self._generated = False
 
         if ui.debugflag:
@@ -1082,7 +1082,7 @@
 
     @property
     def repo(self):
-        raise RuntimeError('no repo access from stream interruption')
+        raise error.ProgrammingError('no repo access from stream interruption')
 
     def gettransaction(self):
         raise TransactionUnavailable('no repo access from stream interruption')