Patchwork graphmod: move the graphstyle options to experimental

login
register
mail settings
Submitter Pierre-Yves David
Date March 24, 2016, 7:22 a.m.
Message ID <e79c295294bba1de8024.1458804130@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/14053/
State Accepted
Commit 1a1e4350b560cf2f49fe235d2e5168471877462d
Delegated to: Kevin Bullock
Headers show

Comments

Pierre-Yves David - March 24, 2016, 7:22 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.
Martijn Pieters - March 24, 2016, 3:06 p.m.
On 24 March 2016 at 07:42, Kevin Bullock
<kbullock+mercurial@ringworld.org> wrote:
>> 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.
>
> Looks right. Martijn?

Yup, experimental is a better place for these.
Pierre-Yves David - March 24, 2016, 3:51 p.m.
On 03/24/2016 08:06 AM, Martijn Pieters wrote:
> On 24 March 2016 at 07:42, Kevin Bullock
> <kbullock+mercurial@ringworld.org> wrote:
>>> 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.
>>
>> Looks right. Martijn?
>
> Yup, experimental is a better place for these.

Okay, I pushed it.

Patch

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