##// END OF EJS Templates
config: read configs from directories in lexicographical order...
Martin von Zweigbergk -
r42647:edbcf5b2 default
parent child Browse files
Show More
@@ -29,7 +29,8 b' def _expandrcpath(path):'
29 p = util.expandpath(path)
29 p = util.expandpath(path)
30 if os.path.isdir(p):
30 if os.path.isdir(p):
31 join = os.path.join
31 join = os.path.join
32 return [join(p, f) for f, k in util.listdir(p) if f.endswith('.rc')]
32 return sorted(join(p, f) for f, k in util.listdir(p)
33 if f.endswith('.rc'))
33 return [p]
34 return [p]
34
35
35 def envrcitems(env=None):
36 def envrcitems(env=None):
@@ -211,3 +211,12 b' alias has lower priority'
211 $ hg log --template '{author}\n'
211 $ hg log --template '{author}\n'
212 repo user
212 repo user
213 $ cd ..
213 $ cd ..
214
215 configs should be read in lexicographical order
216
217 $ mkdir configs
218 $ for i in `$TESTDIR/seq.py 10 99`; do
219 > printf "[section]\nkey=$i" > configs/$i.rc
220 > done
221 $ HGRCPATH=configs hg config section.key
222 99
General Comments 0
You need to be logged in to leave comments. Login now