diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1522,7 +1522,7 @@ def config(ui, repo, *values, **opts): if os.path.exists(f): break else: - from config import samplehgrcs + from ui import samplehgrcs if opts.get('global'): samplehgrc = samplehgrcs['global'] diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -9,39 +9,6 @@ from i18n import _ 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 -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 = {} diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -10,6 +10,39 @@ import errno, getpass, os, socket, sys, 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 +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