changeset 41880:55919b96c02a

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 28 Feb 2019 00:12:12 +0100
parents e5ece0f46b40
children e514799e4e07
files mercurial/setdiscovery.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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