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

login
register
mail settings
Submitter Anton Shestakov
Date April 27, 2018, 10:26 a.m.
Message ID <65ddff799cfd4d8c47b2.1524824802@neuro>
Download mbox | patch
Permalink /patch/31240/
State Accepted
Headers show

Comments

Anton Shestakov - April 27, 2018, 10:26 a.m.
# HG changeset patch
# User Anton Shestakov <av6@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.

Patch

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