discovery: avoid computing identical sets of heads twice
The very same set of heads is computed in the previous statement, it seems more
efficient to just copy that result.
--- a/mercurial/setdiscovery.py Wed Feb 27 23:55:19 2019 +0100
+++ b/mercurial/setdiscovery.py Thu Feb 28 00:12:12 2019 +0100
@@ -193,7 +193,7 @@
sample = set(repo.revs('heads(%ld)', revs))
# update from heads
- revsheads = set(repo.revs('heads(%ld)', revs))
+ revsheads = sample.copy()
_updatesample(revs, revsheads, sample, repo.changelog.parentrevs)
# update from roots