[PATCH 3 of 5] bundle2: use ProgrammingError
Jun Wu
quark at fb.com
Sun Mar 26 20:14:52 EDT 2017
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1490572645 25200
# Sun Mar 26 16:57:25 2017 -0700
# Node ID 79b332a45f07401b16e0b8cdb861655057773ff7
# Parent 14659f3ffd6070d6e153f633e18fef9e8df29485
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 79b332a45f07
bundle2: use ProgrammingError
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -856,5 +856,5 @@ class bundlepart(object):
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:
@@ -914,5 +914,5 @@ class bundlepart(object):
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
@@ -1083,5 +1083,5 @@ class interruptoperation(object):
@property
def repo(self):
- raise RuntimeError('no repo access from stream interruption')
+ raise error.ProgrammingError('no repo access from stream interruption')
def gettransaction(self):
More information about the Mercurial-devel
mailing list