Show More
@@ -1101,8 +1101,11 b' class localrepository(object):' | |||||
1101 |
|
1101 | |||
1102 | self.unfiltered()._branchcache = None # in UTF-8 |
|
1102 | self.unfiltered()._branchcache = None # in UTF-8 | |
1103 | self.unfiltered()._branchcachetip = None |
|
1103 | self.unfiltered()._branchcachetip = None | |
|
1104 | self.invalidatevolatilesets() | |||
|
1105 | ||||
|
1106 | def invalidatevolatilesets(self): | |||
|
1107 | self.filteredrevcache.clear() | |||
1104 | obsolete.clearobscaches(self) |
|
1108 | obsolete.clearobscaches(self) | |
1105 | self.filteredrevcache.clear() |
|
|||
1106 |
|
1109 | |||
1107 | def invalidatedirstate(self): |
|
1110 | def invalidatedirstate(self): | |
1108 | '''Invalidates the dirstate, causing the next call to dirstate |
|
1111 | '''Invalidates the dirstate, causing the next call to dirstate | |
@@ -1868,7 +1871,7 b' class localrepository(object):' | |||||
1868 | if key.startswith('dump'): |
|
1871 | if key.startswith('dump'): | |
1869 | data = base85.b85decode(remoteobs[key]) |
|
1872 | data = base85.b85decode(remoteobs[key]) | |
1870 | self.obsstore.mergemarkers(tr, data) |
|
1873 | self.obsstore.mergemarkers(tr, data) | |
1871 |
self. |
|
1874 | self.invalidatevolatilesets() | |
1872 | if tr is not None: |
|
1875 | if tr is not None: | |
1873 | tr.close() |
|
1876 | tr.close() | |
1874 | finally: |
|
1877 | finally: | |
@@ -2480,8 +2483,7 b' class localrepository(object):' | |||||
2480 | self.ui.status(_("added %d changesets" |
|
2483 | self.ui.status(_("added %d changesets" | |
2481 | " with %d changes to %d files%s\n") |
|
2484 | " with %d changes to %d files%s\n") | |
2482 | % (changesets, revisions, files, htext)) |
|
2485 | % (changesets, revisions, files, htext)) | |
2483 | obsolete.clearobscaches(self) |
|
2486 | self.invalidatevolatilesets() | |
2484 | self.filteredrevcache.clear() |
|
|||
2485 |
|
2487 | |||
2486 | if changesets > 0: |
|
2488 | if changesets > 0: | |
2487 | p = lambda: cl.writepending() and self.root or "" |
|
2489 | p = lambda: cl.writepending() and self.root or "" |
@@ -104,7 +104,6 b' import errno' | |||||
104 | from node import nullid, nullrev, bin, hex, short |
|
104 | from node import nullid, nullrev, bin, hex, short | |
105 | from i18n import _ |
|
105 | from i18n import _ | |
106 | import util, error |
|
106 | import util, error | |
107 | import obsolete |
|
|||
108 |
|
107 | |||
109 | allphases = public, draft, secret = range(3) |
|
108 | allphases = public, draft, secret = range(3) | |
110 | trackedphases = allphases[1:] |
|
109 | trackedphases = allphases[1:] | |
@@ -248,8 +247,7 b' class phasecache(object):' | |||||
248 | # declare deleted root in the target phase |
|
247 | # declare deleted root in the target phase | |
249 | if targetphase != 0: |
|
248 | if targetphase != 0: | |
250 | self.retractboundary(repo, targetphase, delroots) |
|
249 | self.retractboundary(repo, targetphase, delroots) | |
251 | obsolete.clearobscaches(repo) |
|
250 | repo.invalidatevolatilesets() | |
252 | repo.filteredrevcache.clear() |
|
|||
253 |
|
251 | |||
254 | def retractboundary(self, repo, targetphase, nodes): |
|
252 | def retractboundary(self, repo, targetphase, nodes): | |
255 | # Be careful to preserve shallow-copied values: do not update |
|
253 | # Be careful to preserve shallow-copied values: do not update | |
@@ -267,8 +265,7 b' class phasecache(object):' | |||||
267 | ctxs = repo.set('roots(%ln::)', currentroots) |
|
265 | ctxs = repo.set('roots(%ln::)', currentroots) | |
268 | currentroots.intersection_update(ctx.node() for ctx in ctxs) |
|
266 | currentroots.intersection_update(ctx.node() for ctx in ctxs) | |
269 | self._updateroots(targetphase, currentroots) |
|
267 | self._updateroots(targetphase, currentroots) | |
270 | obsolete.clearobscaches(repo) |
|
268 | repo.invalidatevolatilesets() | |
271 | repo.filteredrevcache.clear() |
|
|||
272 |
|
269 | |||
273 | def advanceboundary(repo, targetphase, nodes): |
|
270 | def advanceboundary(repo, targetphase, nodes): | |
274 | """Add nodes to a phase changing other nodes phases if necessary. |
|
271 | """Add nodes to a phase changing other nodes phases if necessary. |
General Comments 0
You need to be logged in to leave comments.
Login now