checkheads: add a small debug message in case were we give up fast
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 31 Mar 2017 15:02:39 +0200
changeset 2257 7980ca5b1217
parent 2256 7ec214ea5d67
child 2258 446824c5e0b8
checkheads: add a small debug message in case were we give up fast When node is unknown we assume it will stay. Yet, we might have markers to it that are going to be pushed. However, we do not have branch (ancestors) information unless we are very lucky an all of them are pruned. So for now we do not do anything assuming this will be rare. We still add a small debug message to help detecting such situation in the future.
hgext3rd/evolve/checkheads.py
--- a/hgext3rd/evolve/checkheads.py	Fri Mar 31 13:46:51 2017 +0200
+++ b/hgext3rd/evolve/checkheads.py	Fri Mar 31 15:02:39 2017 +0200
@@ -204,6 +204,7 @@
     getphase = unfi._phasecache.phase
     ispublic = (lambda r: getphase(unfi, r) == public)
     hasoutmarker = functools.partial(pushingmarkerfor, unfi.obsstore, futurecommon)
+    successorsmarkers = unfi.obsstore.successors
     newhs = set()
     discarded = set()
     # I leave the print in the code because they are so handy at debugging
@@ -215,6 +216,10 @@
         if h in unfi:
             localcandidate.add(h)
         else:
+            if successorsmarkers.get(h) is not None:
+                msg = ('checkheads: remote head unknown locally has'
+                       ' local marker: %s\n')
+                repo.ui.debug(msg % nodemod.hex(h))
             unknownheads.add(h)
     if len(localcandidate) == 1:
         return unknownheads | set(candidate), set()