# HG changeset patch # User Siddharth Agarwal # Date 1448906709 28800 # Node ID 1bf1a7c3df430227f6aec068d28fb6f59abdf1c6 # Parent efceacd6a0c6558f35c68bfc90361669e583f8db mergestate: raise exception if otherctx is accessed but _other isn't set We don't want to inadvertently return the workingctx (self._repo[None]). diff -r efceacd6a0c6 -r 1bf1a7c3df43 mercurial/merge.py --- a/mercurial/merge.py Mon Nov 30 18:47:33 2015 +0000 +++ b/mercurial/merge.py Mon Nov 30 10:05:09 2015 -0800 @@ -288,6 +288,8 @@ @util.propertycache def otherctx(self): + if self._other is None: + raise RuntimeError("localctx accessed but self._local isn't set") return self._repo[self._other] def active(self):