[PATCH 2 of 5] merge: use ProgrammingError
Jun Wu
quark at fb.com
Sun Mar 26 20:14:51 EDT 2017
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1490572556 25200
# Sun Mar 26 16:55:56 2017 -0700
# Node ID 14659f3ffd6070d6e153f633e18fef9e8df29485
# Parent 92d7eff3f4c7e44e8aab62b486bda78a37b73b83
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 14659f3ffd60
merge: use ProgrammingError
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -316,5 +316,6 @@ class mergestate(object):
def localctx(self):
if self._local is None:
- raise RuntimeError("localctx accessed but self._local isn't set")
+ msg = "localctx accessed but self._local isn't set"
+ raise error.ProgrammingError(msg)
return self._repo[self._local]
@@ -322,5 +323,6 @@ class mergestate(object):
def otherctx(self):
if self._other is None:
- raise RuntimeError("otherctx accessed but self._other isn't set")
+ msg = "otherctx accessed but self._other isn't set"
+ raise error.ProgrammingError(msg)
return self._repo[self._other]
More information about the Mercurial-devel
mailing list