[PATCH 5 of 6] discovery: ensure that missingheads are always heads of everything we tried

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Jan 20 14:30:57 CST 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1327084878 -3600
# Branch stable
# Node ID f1bb4628eab4bd82c80d8d3880714c45daf6ea61
# Parent  5989cd1e37ab11526c336d32ccd395c087e05792
discovery: ensure that missingheads are always heads of everything we tried

This only alter the third block executed when:
    * repo have secret changeset
    * onlyheads is not None

In other case findcommonoutgoing already had this behavior

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -124,8 +124,7 @@
                 missing.append(node)
         if excluded:
             # update missing heads
-            rset = repo.set('heads(%ln)', missing)
-            missingheads = [ctx.node() for ctx in rset]
+            missingheads = phases.newheads(repo, onlyheads, excluded)
         else:
             missingheads = onlyheads
         og.missingheads = missingheads


More information about the Mercurial-devel mailing list