obshistory: use a more appropriate type for obslog entries stable
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 27 Apr 2018 16:14:10 +0800
branchstable
changeset 3728 0fc78fdca4b8
parent 3725 3b220226bbec
child 3729 1b1badb3d2fc
obshistory: use a more appropriate type for obslog entries cand is actually a regular changeset and not 'M' (graphmod.MISSINGPARENT). And 'M' is only used for graph edges, but cand is drawn as a graph node. Visually there's no effect, but the code makes more sense this way.
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Wed Apr 25 14:16:35 2018 +0100
+++ b/hgext3rd/evolve/obshistory.py	Fri Apr 27 16:14:10 2018 +0800
@@ -285,7 +285,7 @@
                 changectx = missingchangectx(repo, cand)
 
             childrens = [(graphmod.PARENT, x) for x in nodeprec.get(cand, ())]
-            yield (cand, 'M', changectx, childrens)
+            yield (cand, graphmod.CHANGESET, changectx, childrens)
 
 def _obshistorywalker_links(repo, revs, walksuccessors=False):
     """ Iterate the obs history tree starting from revs, traversing