##// END OF EJS Templates
branchmap: drop `_cacheabletip` usage in `updatecache`...
Pierre-Yves David -
r18218:d5655e74 default
parent child Browse files
Show More
@@ -68,21 +68,11 b' def updatecache(repo):'
68 68 if partial is None:
69 69 partial = branchcache()
70 70
71 catip = repo._cacheabletip()
72 # if partial.tiprev == catip: cache is already up to date
73 # if partial.tiprev > catip: we have uncachable element in `partial` can't
74 # write on disk
75 if partial.tiprev < catip:
76 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, catip))
71 revs = list(cl.revs(start=partial.tiprev +1))
72 if revs:
73 ctxgen = (repo[r] for r in revs)
77 74 partial.update(repo, ctxgen)
78 75 partial.write(repo)
79 # If cacheable tip were lower than actual tip, we need to update the
80 # cache up to tip. This update (from cacheable to actual tip) is not
81 # written to disk since it's not cacheable.
82 tiprev = cl.rev(cl.tip())
83 if partial.tiprev < tiprev:
84 ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, tiprev))
85 partial.update(repo, ctxgen)
86 76 repo._branchcaches[repo.filtername] = partial
87 77
88 78 class branchcache(dict):
General Comments 0
You need to be logged in to leave comments. Login now