Commit 7365a87a authored by Anton Shestakov's avatar Anton Shestakov
Browse files

pullbundle: random.sample() chokes on a spanset, turn it into a list instead

On Python 3.
parent ebd0f5c6098f
Pipeline #2154 passed with stage
in 4 minutes and 39 seconds
......@@ -592,6 +592,7 @@ def debugpullbundlecacheoverlap(ui, repo, *revs, **opts):
def takeonesample(repo, revs):
node = repo.changelog.node
revs = list(revs)
pulled = random.sample(revs, max(4, len(revs) // 1000))
pulled = repo.revs(b'%ld::%ld', pulled, pulled)
nodes = [node(r) for r in pulled]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment