checkheads: clarify that we no longer touch the head unknown locally
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 29 May 2017 05:20:09 +0200
changeset 32673 bd966b9f3274
parent 32672 315d74d0f059
child 32674 7a7c4f3afb98
checkheads: clarify that we no longer touch the head unknown locally Since c6cb21ddf74a, heads unknown locally no longer get any post processing from obsolescence markers. We clarify this fact by only feeding the list of locally known new heads to the function. This simplification of the input will help moving that post-processing earlier in the function.
mercurial/discovery.py
--- a/mercurial/discovery.py	Mon May 29 05:33:59 2017 +0200
+++ b/mercurial/discovery.py	Mon May 29 05:20:09 2017 +0200
@@ -340,22 +340,21 @@
         allfuturecommon.update(allmissing)
     for branch, heads in sorted(headssum.iteritems()):
         remoteheads, newheads, unsyncedheads = heads
-        candidate_newhs = set(newheads)
         # add unsynced data
         if remoteheads is None:
             oldhs = set()
         else:
             oldhs = set(remoteheads)
         oldhs.update(unsyncedheads)
-        candidate_newhs.update(unsyncedheads)
         dhs = None # delta heads, the new heads on branch
         if not repo.obsstore:
             discardedheads = set()
-            newhs = candidate_newhs
+            newhs = set(newheads)
         else:
             newhs, discardedheads = _postprocessobsolete(pushop,
                                                          allfuturecommon,
-                                                         candidate_newhs)
+                                                         newheads)
+        newhs.update(unsyncedheads)
         unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
         if unsynced:
             if None in unsynced: