Show More
@@ -103,8 +103,9 b' class mergestate(object):' | |||||
103 | self._state = {} |
|
103 | self._state = {} | |
104 | self._local = None |
|
104 | self._local = None | |
105 | self._other = None |
|
105 | self._other = None | |
106 | if 'otherctx' in vars(self): |
|
106 | for var in ('localctx', 'otherctx'): | |
107 | del self.otherctx |
|
107 | if var in vars(self): | |
|
108 | delattr(self, var) | |||
108 | if node: |
|
109 | if node: | |
109 | self._local = node |
|
110 | self._local = node | |
110 | self._other = other |
|
111 | self._other = other | |
@@ -126,8 +127,9 b' class mergestate(object):' | |||||
126 | self._state = {} |
|
127 | self._state = {} | |
127 | self._local = None |
|
128 | self._local = None | |
128 | self._other = None |
|
129 | self._other = None | |
129 | if 'otherctx' in vars(self): |
|
130 | for var in ('localctx', 'otherctx'): | |
130 | del self.otherctx |
|
131 | if var in vars(self): | |
|
132 | delattr(self, var) | |||
131 | self._readmergedriver = None |
|
133 | self._readmergedriver = None | |
132 | self._mdstate = 's' |
|
134 | self._mdstate = 's' | |
133 | unsupported = set() |
|
135 | unsupported = set() | |
@@ -287,6 +289,12 b' class mergestate(object):' | |||||
287 | return configmergedriver |
|
289 | return configmergedriver | |
288 |
|
290 | |||
289 | @util.propertycache |
|
291 | @util.propertycache | |
|
292 | def localctx(self): | |||
|
293 | if self._local is None: | |||
|
294 | raise RuntimeError("localctx accessed but self._local isn't set") | |||
|
295 | return self._repo[self._local] | |||
|
296 | ||||
|
297 | @util.propertycache | |||
290 | def otherctx(self): |
|
298 | def otherctx(self): | |
291 | if self._other is None: |
|
299 | if self._other is None: | |
292 | raise RuntimeError("localctx accessed but self._local isn't set") |
|
300 | raise RuntimeError("localctx accessed but self._local isn't set") |
General Comments 0
You need to be logged in to leave comments.
Login now