comparison mercurial/merge.py @ 31651:e960eba3581c

merge: use ProgrammingError
author Jun Wu <quark@fb.com>
date Sun, 26 Mar 2017 16:55:56 -0700
parents 527a247f114f
children 4d504e541d3d
comparison
equal deleted inserted replaced
31650:7095e783958d 31651:e960eba3581c
313 return configmergedriver 313 return configmergedriver
314 314
315 @util.propertycache 315 @util.propertycache
316 def localctx(self): 316 def localctx(self):
317 if self._local is None: 317 if self._local is None:
318 raise RuntimeError("localctx accessed but self._local isn't set") 318 msg = "localctx accessed but self._local isn't set"
319 raise error.ProgrammingError(msg)
319 return self._repo[self._local] 320 return self._repo[self._local]
320 321
321 @util.propertycache 322 @util.propertycache
322 def otherctx(self): 323 def otherctx(self):
323 if self._other is None: 324 if self._other is None:
324 raise RuntimeError("otherctx accessed but self._other isn't set") 325 msg = "otherctx accessed but self._other isn't set"
326 raise error.ProgrammingError(msg)
325 return self._repo[self._other] 327 return self._repo[self._other]
326 328
327 def active(self): 329 def active(self):
328 """Whether mergestate is active. 330 """Whether mergestate is active.
329 331