# HG changeset patch # User Matt Mackall # Date 1393531312 21600 # Node ID 02d0d3aa42e3c02f326f7e71d8374acf28e20a32 # Parent c724cb0141ee91cb0bb57fe44f752fd5f99861c8 config: add example config file when -e called with no config diff -r c724cb0141ee -r 02d0d3aa42e3 mercurial/commands.py --- a/mercurial/commands.py Thu Feb 27 13:46:32 2014 -0600 +++ b/mercurial/commands.py Thu Feb 27 14:01:52 2014 -0600 @@ -1489,6 +1489,22 @@ break else: f = paths[0] + fp = open(f, "w") + fp.write( + '# example config (see "hg help config" for more info)\n' + '\n' + '[ui]\n' + '# set this to your full email address\n' + 'username =\n' + '\n' + '[extensions]\n' + '# uncomment these lines to enable some popular extensions\n' + '# (see "hg help extensions" for more info)\n' + '# pager =\n' + '# progress =\n' + '# color =\n') + fp.close() + editor = ui.geteditor() util.system("%s \"%s\"" % (editor, f), onerr=util.Abort, errprefix=_("edit failed"),