[PATCH 2 of 2] discovery: reference relevant bug in the faulty code

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Oct 9 17:59:43 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1444430640 25200
#      Fri Oct 09 15:44:00 2015 -0700
# Node ID bda683d8299902137ec5710c0558c127f2b7aae5
# Parent  bfde4c287d34ea09716861af2fd63e38f27439fb
# EXP-Topic disc.cleanup
discovery: reference relevant bug in the faulty code

We extend the comment about this code flaw with more code flaw.

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -317,10 +317,13 @@ def checkheads(repo, remote, outgoing, r
             # (2) if the new heads have ancestors which are not obsolete and
             #     not ancestors of any other heads we will have a new head too.
             #
             # These two cases will be easy to handle for known changeset but
             # much more tricky for unsynced changes.
+            #
+            # In addition, this code is confused by prune as it only look for
+            # successors of the heads (none if pruned) leading to issue4354
             newhs = set()
             for nh in candidate_newhs:
                 if nh in repo and repo[nh].phase() <= phases.public:
                     newhs.add(nh)
                 else:


More information about the Mercurial-devel mailing list