Show More
@@ -2043,13 +2043,10 b' def reposetup(ui, repo):' | |||||
2043 |
|
2043 | |||
2044 | return tagscache |
|
2044 | return tagscache | |
2045 |
|
2045 | |||
2046 | def branchtags(self): |
|
2046 | def _branchtags(self): | |
2047 | if self.branchcache != None: |
|
|||
2048 | return self.branchcache |
|
|||
2049 |
|
||||
2050 | q = self.mq |
|
2047 | q = self.mq | |
2051 | if not q.applied: |
|
2048 | if not q.applied: | |
2052 | return super(mqrepo, self).branchtags() |
|
2049 | return super(mqrepo, self)._branchtags() | |
2053 |
|
2050 | |||
2054 | self.branchcache = {} # avoid recursion in changectx |
|
2051 | self.branchcache = {} # avoid recursion in changectx | |
2055 | cl = self.changelog |
|
2052 | cl = self.changelog | |
@@ -2069,8 +2066,7 b' def reposetup(ui, repo):' | |||||
2069 | # update the cache up to the tip |
|
2066 | # update the cache up to the tip | |
2070 | self._updatebranchcache(partial, start, cl.count()) |
|
2067 | self._updatebranchcache(partial, start, cl.count()) | |
2071 |
|
2068 | |||
2072 |
|
|
2069 | return partial | |
2073 | return self.branchcache |
|
|||
2074 |
|
2070 | |||
2075 | if repo.local(): |
|
2071 | if repo.local(): | |
2076 | repo.__class__ = mqrepo |
|
2072 | repo.__class__ = mqrepo |
@@ -312,12 +312,7 b' class localrepository(repo.repository):' | |||||
312 | self.nodetagscache.setdefault(n, []).append(t) |
|
312 | self.nodetagscache.setdefault(n, []).append(t) | |
313 | return self.nodetagscache.get(node, []) |
|
313 | return self.nodetagscache.get(node, []) | |
314 |
|
314 | |||
315 | def branchtags(self): |
|
315 | def _branchtags(self): | |
316 | if self.branchcache != None: |
|
|||
317 | return self.branchcache |
|
|||
318 |
|
||||
319 | self.branchcache = {} # avoid recursion in changectx |
|
|||
320 |
|
||||
321 | partial, last, lrev = self._readbranchcache() |
|
316 | partial, last, lrev = self._readbranchcache() | |
322 |
|
317 | |||
323 | tiprev = self.changelog.count() - 1 |
|
318 | tiprev = self.changelog.count() - 1 | |
@@ -325,6 +320,15 b' class localrepository(repo.repository):' | |||||
325 | self._updatebranchcache(partial, lrev+1, tiprev+1) |
|
320 | self._updatebranchcache(partial, lrev+1, tiprev+1) | |
326 | self._writebranchcache(partial, self.changelog.tip(), tiprev) |
|
321 | self._writebranchcache(partial, self.changelog.tip(), tiprev) | |
327 |
|
322 | |||
|
323 | return partial | |||
|
324 | ||||
|
325 | def branchtags(self): | |||
|
326 | if self.branchcache is not None: | |||
|
327 | return self.branchcache | |||
|
328 | ||||
|
329 | self.branchcache = {} # avoid recursion in changectx | |||
|
330 | partial = self._branchtags() | |||
|
331 | ||||
328 | # the branch cache is stored on disk as UTF-8, but in the local |
|
332 | # the branch cache is stored on disk as UTF-8, but in the local | |
329 | # charset internally |
|
333 | # charset internally | |
330 | for k, v in partial.items(): |
|
334 | for k, v in partial.items(): |
General Comments 0
You need to be logged in to leave comments.
Login now