##// END OF EJS Templates
mergestate: add accessors for local and other nodeid, not just contexts...
Martin von Zweigbergk -
r44696:b1069b36 default
parent child Browse files
Show More
@@ -386,18 +386,26 b' class mergestate(object):'
386 return configmergedriver
386 return configmergedriver
387
387
388 @util.propertycache
388 @util.propertycache
389 def localctx(self):
389 def local(self):
390 if self._local is None:
390 if self._local is None:
391 msg = b"localctx accessed but self._local isn't set"
391 msg = b"local accessed but self._local isn't set"
392 raise error.ProgrammingError(msg)
392 raise error.ProgrammingError(msg)
393 return self._repo[self._local]
393 return self._local
394
395 @util.propertycache
396 def localctx(self):
397 return self._repo[self.local]
398
399 @util.propertycache
400 def other(self):
401 if self._other is None:
402 msg = b"other accessed but self._other isn't set"
403 raise error.ProgrammingError(msg)
404 return self._other
394
405
395 @util.propertycache
406 @util.propertycache
396 def otherctx(self):
407 def otherctx(self):
397 if self._other is None:
408 return self._repo[self.other]
398 msg = b"otherctx accessed but self._other isn't set"
399 raise error.ProgrammingError(msg)
400 return self._repo[self._other]
401
409
402 def active(self):
410 def active(self):
403 """Whether mergestate is active.
411 """Whether mergestate is active.
General Comments 0
You need to be logged in to leave comments. Login now