Show More
@@ -129,7 +129,7 b' class dirstate(object):' | |||||
129 | def _map(self): |
|
129 | def _map(self): | |
130 | '''Return the dirstate contents as a map from filename to |
|
130 | '''Return the dirstate contents as a map from filename to | |
131 | (state, mode, size, time).''' |
|
131 | (state, mode, size, time).''' | |
132 | self._read() |
|
132 | self._map = dirstatemap(self._ui, self._opener, self._root) | |
133 | return self._map |
|
133 | return self._map | |
134 |
|
134 | |||
135 | @property |
|
135 | @property | |
@@ -353,10 +353,6 b' class dirstate(object):' | |||||
353 | f.discard() |
|
353 | f.discard() | |
354 | raise |
|
354 | raise | |
355 |
|
355 | |||
356 | def _read(self): |
|
|||
357 | self._map = dirstatemap(self._ui, self._opener, self._root) |
|
|||
358 | self._map.read() |
|
|||
359 |
|
||||
360 | def invalidate(self): |
|
356 | def invalidate(self): | |
361 | '''Causes the next access to reread the dirstate. |
|
357 | '''Causes the next access to reread the dirstate. | |
362 |
|
358 | |||
@@ -1201,14 +1197,24 b' class dirstatemap(object):' | |||||
1201 | self._root = root |
|
1197 | self._root = root | |
1202 | self._filename = 'dirstate' |
|
1198 | self._filename = 'dirstate' | |
1203 |
|
1199 | |||
1204 | self._map = {} |
|
|||
1205 | self.copymap = {} |
|
|||
1206 | self._parents = None |
|
1200 | self._parents = None | |
1207 | self._dirtyparents = False |
|
1201 | self._dirtyparents = False | |
1208 |
|
1202 | |||
1209 | # for consistent view between _pl() and _read() invocations |
|
1203 | # for consistent view between _pl() and _read() invocations | |
1210 | self._pendingmode = None |
|
1204 | self._pendingmode = None | |
1211 |
|
1205 | |||
|
1206 | @propertycache | |||
|
1207 | def _map(self): | |||
|
1208 | self._map = {} | |||
|
1209 | self.read() | |||
|
1210 | return self._map | |||
|
1211 | ||||
|
1212 | @propertycache | |||
|
1213 | def copymap(self): | |||
|
1214 | self.copymap = {} | |||
|
1215 | self._map | |||
|
1216 | return self.copymap | |||
|
1217 | ||||
1212 | def clear(self): |
|
1218 | def clear(self): | |
1213 | self._map = {} |
|
1219 | self._map = {} | |
1214 | self.copymap = {} |
|
1220 | self.copymap = {} | |
@@ -1388,7 +1394,7 b' class dirstatemap(object):' | |||||
1388 |
|
1394 | |||
1389 | @propertycache |
|
1395 | @propertycache | |
1390 | def identity(self): |
|
1396 | def identity(self): | |
1391 |
self. |
|
1397 | self._map | |
1392 | return self.identity |
|
1398 | return self.identity | |
1393 |
|
1399 | |||
1394 | @propertycache |
|
1400 | @propertycache |
General Comments 0
You need to be logged in to leave comments.
Login now