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.
--- a/contrib/perf.py Sun Nov 25 22:39:54 2018 +0900
+++ b/contrib/perf.py Fri Nov 23 02:11:11 2018 +0100
@@ -2251,6 +2251,9 @@
repo = repoview.repoview(repo, filter)
else:
repo = repo.unfiltered()
+
+ repo.branchmap() # make sure we have a relevant, up to date branchmap
+
# try once without timer, the filter may not be cached
if branchmap.read(repo) is None:
raise error.Abort(b'No branchmap cached for %s repo'