Show More
@@ -2347,6 +2347,20 b' def perfbranchmapupdate(ui, repo, base=(' | |||||
2347 | baserepo = repo.filtered(b'__perf_branchmap_update_base') |
|
2347 | baserepo = repo.filtered(b'__perf_branchmap_update_base') | |
2348 | targetrepo = repo.filtered(b'__perf_branchmap_update_target') |
|
2348 | targetrepo = repo.filtered(b'__perf_branchmap_update_target') | |
2349 |
|
2349 | |||
|
2350 | # try to find an existing branchmap to reuse | |||
|
2351 | subsettable = getbranchmapsubsettable() | |||
|
2352 | candidatefilter = subsettable.get(None) | |||
|
2353 | while candidatefilter is not None: | |||
|
2354 | candidatebm = repo.filtered(candidatefilter).branchmap() | |||
|
2355 | if candidatebm.validfor(baserepo): | |||
|
2356 | filtered = repoview.filterrevs(repo, candidatefilter) | |||
|
2357 | missing = [r for r in allbaserevs if r in filtered] | |||
|
2358 | base = candidatebm.copy() | |||
|
2359 | base.update(baserepo, missing) | |||
|
2360 | break | |||
|
2361 | candidatefilter = subsettable.get(candidatefilter) | |||
|
2362 | else: | |||
|
2363 | # no suitable subset where found | |||
2350 | base = branchmap.branchcache() |
|
2364 | base = branchmap.branchcache() | |
2351 | base.update(baserepo, allbaserevs) |
|
2365 | base.update(baserepo, allbaserevs) | |
2352 |
|
2366 |
General Comments 0
You need to be logged in to leave comments.
Login now