Show More
@@ -133,11 +133,6 b' class dirstate(object):' | |||||
133 | return self._map |
|
133 | return self._map | |
134 |
|
134 | |||
135 | @propertycache |
|
135 | @propertycache | |
136 | def _identity(self): |
|
|||
137 | self._read() |
|
|||
138 | return self._identity |
|
|||
139 |
|
||||
140 | @propertycache |
|
|||
141 | def _filefoldmap(self): |
|
136 | def _filefoldmap(self): | |
142 | return self._map.filefoldmap() |
|
137 | return self._map.filefoldmap() | |
143 |
|
138 | |||
@@ -375,9 +370,6 b' class dirstate(object):' | |||||
375 | raise |
|
370 | raise | |
376 |
|
371 | |||
377 | def _read(self): |
|
372 | def _read(self): | |
378 | # ignore HG_PENDING because identity is used only for writing |
|
|||
379 | self._identity = util.filestat.frompath( |
|
|||
380 | self._opener.join(self._filename)) |
|
|||
381 | self._map = dirstatemap(self._ui, self._opener, self._root) |
|
373 | self._map = dirstatemap(self._ui, self._opener, self._root) | |
382 | self._map.read() |
|
374 | self._map.read() | |
383 |
|
375 | |||
@@ -388,8 +380,7 b' class dirstate(object):' | |||||
388 | rereads the dirstate. Use localrepo.invalidatedirstate() if you want to |
|
380 | rereads the dirstate. Use localrepo.invalidatedirstate() if you want to | |
389 | check whether the dirstate has changed before rereading it.''' |
|
381 | check whether the dirstate has changed before rereading it.''' | |
390 |
|
382 | |||
391 |
for a in ("_map", "_ |
|
383 | for a in ("_map", "_filefoldmap", "_dirfoldmap", "_branch", | |
392 | "_filefoldmap", "_dirfoldmap", "_branch", |
|
|||
393 | "_dirs", "_ignore"): |
|
384 | "_dirs", "_ignore"): | |
394 | if a in self.__dict__: |
|
385 | if a in self.__dict__: | |
395 | delattr(self, a) |
|
386 | delattr(self, a) | |
@@ -652,7 +643,7 b' class dirstate(object):' | |||||
652 | If identity of previous dirstate is equal to this, writing |
|
643 | If identity of previous dirstate is equal to this, writing | |
653 | changes based on the former dirstate out can keep consistency. |
|
644 | changes based on the former dirstate out can keep consistency. | |
654 | ''' |
|
645 | ''' | |
655 | return self._identity |
|
646 | return self._map.identity | |
656 |
|
647 | |||
657 | def write(self, tr): |
|
648 | def write(self, tr): | |
658 | if not self._dirty: |
|
649 | if not self._dirty: | |
@@ -1342,6 +1333,10 b' class dirstatemap(object):' | |||||
1342 | self._dirtyparents = True |
|
1333 | self._dirtyparents = True | |
1343 |
|
1334 | |||
1344 | def read(self): |
|
1335 | def read(self): | |
|
1336 | # ignore HG_PENDING because identity is used only for writing | |||
|
1337 | self.identity = util.filestat.frompath( | |||
|
1338 | self._opener.join(self._filename)) | |||
|
1339 | ||||
1345 | try: |
|
1340 | try: | |
1346 | fp = self._opendirstatefile() |
|
1341 | fp = self._opendirstatefile() | |
1347 | try: |
|
1342 | try: | |
@@ -1404,3 +1399,8 b' class dirstatemap(object):' | |||||
1404 | self.nonnormalset = nonnorm |
|
1399 | self.nonnormalset = nonnorm | |
1405 | return otherparents |
|
1400 | return otherparents | |
1406 |
|
1401 | |||
|
1402 | @propertycache | |||
|
1403 | def identity(self): | |||
|
1404 | self.read() | |||
|
1405 | return self.identity | |||
|
1406 |
General Comments 0
You need to be logged in to leave comments.
Login now