Patchwork [1,of,8,V2] perf: prewarm the branchmap in perfbranchmapload

mail settings
Submitter Boris Feld
Date Nov. 26, 2018, 6:44 p.m.
Message ID <578646b1e2b685f8d499.1543257872@localhost.localdomain>
Download mbox | patch
Permalink /patch/36792/
State Accepted
Headers show


Boris Feld - Nov. 26, 2018, 6:44 p.m.
# HG changeset patch
# User Boris Feld <>
# Date 1542935471 -3600
#      Fri Nov 23 02:11:11 2018 +0100
# Node ID 578646b1e2b685f8d499e38ee210d3ec5847a550
# Parent  5bcf264bb1a0b1f57f01b4d20f28d9db9a74f47b
# EXP-Topic perf-branchmap
# Available At
#              hg pull -r 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.


diff --git a/contrib/ b/contrib/
--- a/contrib/
+++ b/contrib/
@@ -2251,6 +2251,9 @@  def perfbranchmapload(ui, repo, filter=b
         repo = repoview.repoview(repo, filter)
         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 is None:
         raise error.Abort(b'No branchmap cached for %s repo'