##// END OF EJS Templates
config: add example config file when -e called with no config
Matt Mackall -
r20573:02d0d3aa default
parent child Browse files
Show More
@@ -1489,6 +1489,22 b' def config(ui, repo, *values, **opts):'
1489 break
1489 break
1490 else:
1490 else:
1491 f = paths[0]
1491 f = paths[0]
1492 fp = open(f, "w")
1493 fp.write(
1494 '# example config (see "hg help config" for more info)\n'
1495 '\n'
1496 '[ui]\n'
1497 '# set this to your full email address\n'
1498 'username =\n'
1499 '\n'
1500 '[extensions]\n'
1501 '# uncomment these lines to enable some popular extensions\n'
1502 '# (see "hg help extensions" for more info)\n'
1503 '# pager =\n'
1504 '# progress =\n'
1505 '# color =\n')
1506 fp.close()
1507
1492 editor = ui.geteditor()
1508 editor = ui.geteditor()
1493 util.system("%s \"%s\"" % (editor, f),
1509 util.system("%s \"%s\"" % (editor, f),
1494 onerr=util.Abort, errprefix=_("edit failed"),
1510 onerr=util.Abort, errprefix=_("edit failed"),
General Comments 0
You need to be logged in to leave comments. Login now