[PATCH] graphmod: move the graphstyle options to experimental

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Mar 24 03:22:10 EDT 2016


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1458803398 25200
#      Thu Mar 24 00:09:58 2016 -0700
# Node ID e79c295294bba1de80249a46ca7a593eb9b52264
# Parent  b927fe8bf0b95c29f7e271d75f554a08cfc4dfda
# EXP-Topic graphstyle
# Available At http://mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull http://mercurial-scm.org/repo/users/marmoute/mercurial/ -r e79c295294bb
graphmod: move the graphstyle options to experimental

I let this slip in the [ui] section during the review, as far as I understand we
don't plan to actually support customisation of the output on we are happy with
our choice.  The option are just here to help people tests various options so we
can decide which one we'll actually use.

I'm moving the config option in the experimental section to make this clearer
and avoid making them part of the public API by mistake.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2225,12 +2225,13 @@ def displaygraph(ui, repo, dag, displaye
         'parent': graphmod.PARENT,
         'grandparent': graphmod.GRANDPARENT,
         'missing': graphmod.MISSINGPARENT
     }
     for name, key in edgetypes.items():
-        # experimental config: ui.graphstyle.*
-        styles[key] = ui.config('ui', 'graphstyle.%s' % name, styles[key])
+        # experimental config: experimental.graphstyle.*
+        styles[key] = ui.config('experimental', 'graphstyle.%s' % name,
+                                styles[key])
         if not styles[key]:
             styles[key] = None
     for rev, type, ctx, parents in dag:
         char = formatnode(repo, ctx)
         copies = None
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -2418,11 +2418,11 @@ label() should just work in node templat
 
 change graph edge styling
 
   $ cd repo
   $ cat << EOF >> $HGRCPATH
-  > [ui]
+  > [experimental]
   > graphstyle.parent = |
   > graphstyle.grandparent = :
   > graphstyle.missing =
   > EOF
   $ hg log -G -r 'file("a")' -m


More information about the Mercurial-devel mailing list