# HG changeset patch # User Anton Shestakov # Date 1576825717 -25200 # Node ID a8ac174010a512aad9b6215798555da51d665ce5 # Parent ebd0f5c6098f568c37b23af8e3adeb88bc46af43 pullbundle: random.sample() chokes on a spanset, turn it into a list instead On Python 3. diff -r ebd0f5c6098f -r a8ac174010a5 hgext3rd/pullbundle.py --- a/hgext3rd/pullbundle.py Fri Dec 20 13:50:31 2019 +0700 +++ b/hgext3rd/pullbundle.py Fri Dec 20 14:08:37 2019 +0700 @@ -592,6 +592,7 @@ 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]