D4321: setdiscovery: use revsets for computing a subset's heads and roots

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat Aug 18 04:07:14 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG56279660d264: setdiscovery: use revsets for computing a subset's heads and roots (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4321?vs=10415&id=10442

REVISION DETAIL
  https://phab.mercurial-scm.org/D4321

AFFECTED FILES
  mercurial/setdiscovery.py

CHANGE DETAILS

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -114,11 +114,11 @@
     sample = set(repo.revs('heads(%ld)', revs))
 
     # update from heads
-    _updatesample(dag, revs, dag.headsetofconnecteds(revs), sample)
+    revsheads = set(repo.revs('heads(%ld)', revs))
+    _updatesample(dag, revs, revsheads, sample)
     # update from roots
-    inverteddag = dag.inverse()
-    _updatesample(inverteddag, revs, inverteddag.headsetofconnecteds(revs),
-                  sample)
+    revsroots = set(repo.revs('roots(%ld)', revs))
+    _updatesample(dag.inverse(), revs, revsroots, sample)
     assert sample
     sample = _limitsample(sample, size)
     if len(sample) < size:



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list