[PATCH 1 of 3 evolve-ext] obshistory: use a more appropriate type for obslog entries

Anton Shestakov av6 at dwimlabs.net
Fri Apr 27 10:26:42 UTC 2018


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1524816850 -28800
#      Fri Apr 27 16:14:10 2018 +0800
# Node ID 65ddff799cfd4d8c47b246350f8df8581c0c3c78
# Parent  3f26434bdf5cfcff3cf09aba84cc6121e5ffae32
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.

diff --git a/hgext3rd/evolve/obshistory.py b/hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py
+++ b/hgext3rd/evolve/obshistory.py
@@ -285,7 +285,7 @@ def _obshistorywalker(repo, revs, walksu
                 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


More information about the Mercurial-devel mailing list