Mercurial > hg-stable
changeset 22419:fdfc9faca273
ui: move samplehgrcs from config
config is generic code that doesn't know about Mercurial usage, so
this was at the wrong layer
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 11 Sep 2014 12:26:12 -0500 |
parents | 192c798aabee |
children | 4669e26747c3 |
files | mercurial/commands.py mercurial/config.py mercurial/ui.py |
diffstat | 3 files changed, 34 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Sep 11 12:21:15 2014 -0500 +++ b/mercurial/commands.py Thu Sep 11 12:26:12 2014 -0500 @@ -1522,7 +1522,7 @@ if os.path.exists(f): break else: - from config import samplehgrcs + from ui import samplehgrcs if opts.get('global'): samplehgrc = samplehgrcs['global']
--- a/mercurial/config.py Thu Sep 11 12:21:15 2014 -0500 +++ b/mercurial/config.py Thu Sep 11 12:26:12 2014 -0500 @@ -9,39 +9,6 @@ import error, util import os, errno -samplehgrcs = { - 'user': -"""# example user config (see "hg help config" for more info) -[ui] -# name and email, e.g. -# username = Jane Doe <jdoe@example.com> -username = - -[extensions] -# uncomment these lines to enable some popular extensions -# (see "hg help extensions" for more info) -# -# pager = -# progress = -# color =""", - - 'local': -"""# example repository config (see "hg help config" for more info) -""", - - 'global': -"""# example system-wide hg config (see "hg help config" for more info) - -[extensions] -# uncomment these lines to enable some popular extensions -# (see "hg help extensions" for more info) -# -# blackbox = -# progress = -# color = -# pager =""", -} - class config(object): def __init__(self, data=None): self._data = {}
--- a/mercurial/ui.py Thu Sep 11 12:21:15 2014 -0500 +++ b/mercurial/ui.py Thu Sep 11 12:26:12 2014 -0500 @@ -10,6 +10,39 @@ import config, scmutil, util, error, formatter from node import hex +samplehgrcs = { + 'user': +"""# example user config (see "hg help config" for more info) +[ui] +# name and email, e.g. +# username = Jane Doe <jdoe@example.com> +username = + +[extensions] +# uncomment these lines to enable some popular extensions +# (see "hg help extensions" for more info) +# +# pager = +# progress = +# color =""", + + 'local': +"""# example repository config (see "hg help config" for more info) +""", + + 'global': +"""# example system-wide hg config (see "hg help config" for more info) + +[extensions] +# uncomment these lines to enable some popular extensions +# (see "hg help extensions" for more info) +# +# blackbox = +# progress = +# color = +# pager =""", +} + class ui(object): def __init__(self, src=None): # _buffers: used for temporary capture of output