##// END OF EJS Templates
bundle2: use ProgrammingError
Jun Wu -
r31647:4dbef666 default
parent child Browse files
Show More
@@ -855,7 +855,7 b' class bundlepart(object):'
855 self._seenparams = set()
855 self._seenparams = set()
856 for pname, __ in self._mandatoryparams + self._advisoryparams:
856 for pname, __ in self._mandatoryparams + self._advisoryparams:
857 if pname in self._seenparams:
857 if pname in self._seenparams:
858 raise RuntimeError('duplicated params: %s' % pname)
858 raise error.ProgrammingError('duplicated params: %s' % pname)
859 self._seenparams.add(pname)
859 self._seenparams.add(pname)
860 # status of the part's generation:
860 # status of the part's generation:
861 # - None: not started,
861 # - None: not started,
@@ -913,7 +913,7 b' class bundlepart(object):'
913 # methods used to generates the bundle2 stream
913 # methods used to generates the bundle2 stream
914 def getchunks(self, ui):
914 def getchunks(self, ui):
915 if self._generated is not None:
915 if self._generated is not None:
916 raise RuntimeError('part can only be consumed once')
916 raise error.ProgrammingError('part can only be consumed once')
917 self._generated = False
917 self._generated = False
918
918
919 if ui.debugflag:
919 if ui.debugflag:
@@ -1082,7 +1082,7 b' class interruptoperation(object):'
1082
1082
1083 @property
1083 @property
1084 def repo(self):
1084 def repo(self):
1085 raise RuntimeError('no repo access from stream interruption')
1085 raise error.ProgrammingError('no repo access from stream interruption')
1086
1086
1087 def gettransaction(self):
1087 def gettransaction(self):
1088 raise TransactionUnavailable('no repo access from stream interruption')
1088 raise TransactionUnavailable('no repo access from stream interruption')
General Comments 0
You need to be logged in to leave comments. Login now