Mercurial > hg
comparison contrib/perf.py @ 40719:578646b1e2b6
perf: prewarm the branchmap in perfbranchmapload
It is not very interesting to have the command randomly failing because the
branchmap for the tested filter happens to be cold. So we make sure to have a
valid up to date branchmap before going further.
The data might still be missing from disk if a subset was equivalent. See next
changeset for details and fix.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 23 Nov 2018 02:11:11 +0100 |
parents | cfaf3843491b |
children | 0a3cc351d718 |
comparison
equal
deleted
inserted
replaced
40718:5bcf264bb1a0 | 40719:578646b1e2b6 |
---|---|
2249 return | 2249 return |
2250 if filter: | 2250 if filter: |
2251 repo = repoview.repoview(repo, filter) | 2251 repo = repoview.repoview(repo, filter) |
2252 else: | 2252 else: |
2253 repo = repo.unfiltered() | 2253 repo = repo.unfiltered() |
2254 | |
2255 repo.branchmap() # make sure we have a relevant, up to date branchmap | |
2256 | |
2254 # try once without timer, the filter may not be cached | 2257 # try once without timer, the filter may not be cached |
2255 if branchmap.read(repo) is None: | 2258 if branchmap.read(repo) is None: |
2256 raise error.Abort(b'No branchmap cached for %s repo' | 2259 raise error.Abort(b'No branchmap cached for %s repo' |
2257 % (filter or b'unfiltered')) | 2260 % (filter or b'unfiltered')) |
2258 timer, fm = gettimer(ui, opts) | 2261 timer, fm = gettimer(ui, opts) |