# HG changeset patch # User Jun Wu # Date 2017-03-26 23:55:56 # Node ID e960eba3581c9f29a9bc500ff2cb2028ffe5500a # Parent 7095e783958df1a083dec417fd82fbeec52cf190 merge: use ProgrammingError diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -315,13 +315,15 @@ class mergestate(object): @util.propertycache 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] @util.propertycache 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] def active(self):