##// END OF EJS Templates
ui: move samplehgrcs from config...
Matt Mackall -
r22419:fdfc9fac default
parent child Browse files
Show More
@@ -1522,7 +1522,7 b' def config(ui, repo, *values, **opts):'
1522 if os.path.exists(f):
1522 if os.path.exists(f):
1523 break
1523 break
1524 else:
1524 else:
1525 from config import samplehgrcs
1525 from ui import samplehgrcs
1526
1526
1527 if opts.get('global'):
1527 if opts.get('global'):
1528 samplehgrc = samplehgrcs['global']
1528 samplehgrc = samplehgrcs['global']
@@ -9,39 +9,6 b' from i18n import _'
9 import error, util
9 import error, util
10 import os, errno
10 import os, errno
11
11
12 samplehgrcs = {
13 'user':
14 """# example user config (see "hg help config" for more info)
15 [ui]
16 # name and email, e.g.
17 # username = Jane Doe <jdoe@example.com>
18 username =
19
20 [extensions]
21 # uncomment these lines to enable some popular extensions
22 # (see "hg help extensions" for more info)
23 #
24 # pager =
25 # progress =
26 # color =""",
27
28 'local':
29 """# example repository config (see "hg help config" for more info)
30 """,
31
32 'global':
33 """# example system-wide hg config (see "hg help config" for more info)
34
35 [extensions]
36 # uncomment these lines to enable some popular extensions
37 # (see "hg help extensions" for more info)
38 #
39 # blackbox =
40 # progress =
41 # color =
42 # pager =""",
43 }
44
45 class config(object):
12 class config(object):
46 def __init__(self, data=None):
13 def __init__(self, data=None):
47 self._data = {}
14 self._data = {}
@@ -10,6 +10,39 b' import errno, getpass, os, socket, sys, '
10 import config, scmutil, util, error, formatter
10 import config, scmutil, util, error, formatter
11 from node import hex
11 from node import hex
12
12
13 samplehgrcs = {
14 'user':
15 """# example user config (see "hg help config" for more info)
16 [ui]
17 # name and email, e.g.
18 # username = Jane Doe <jdoe@example.com>
19 username =
20
21 [extensions]
22 # uncomment these lines to enable some popular extensions
23 # (see "hg help extensions" for more info)
24 #
25 # pager =
26 # progress =
27 # color =""",
28
29 'local':
30 """# example repository config (see "hg help config" for more info)
31 """,
32
33 'global':
34 """# example system-wide hg config (see "hg help config" for more info)
35
36 [extensions]
37 # uncomment these lines to enable some popular extensions
38 # (see "hg help extensions" for more info)
39 #
40 # blackbox =
41 # progress =
42 # color =
43 # pager =""",
44 }
45
13 class ui(object):
46 class ui(object):
14 def __init__(self, src=None):
47 def __init__(self, src=None):
15 # _buffers: used for temporary capture of output
48 # _buffers: used for temporary capture of output
General Comments 0
You need to be logged in to leave comments. Login now