comparison mercurial/config.py @ 11224:f23f87462c18

config: expand hgrc %include paths
author Chad Dombrova <chadrik@gmail.com>
date Wed, 26 May 2010 14:03:29 -0700
parents 44c923eeb81d
children 2123aad24d56
comparison
equal deleted inserted replaced
11223:0d09f2244805 11224:f23f87462c18
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from i18n import _ 8 from i18n import _
9 import error 9 import error, util
10 import re, os 10 import re, os
11 11
12 class sortdict(dict): 12 class sortdict(dict):
13 'a simple sorted dictionary' 13 'a simple sorted dictionary'
14 def __init__(self, data=None): 14 def __init__(self, data=None):
94 continue 94 continue
95 item = None 95 item = None
96 cont = False 96 cont = False
97 m = includere.match(l) 97 m = includere.match(l)
98 if m: 98 if m:
99 inc = m.group(1) 99 inc = util.expandpath(m.group(1))
100 base = os.path.dirname(src) 100 base = os.path.dirname(src)
101 inc = os.path.normpath(os.path.join(base, inc)) 101 inc = os.path.normpath(os.path.join(base, inc))
102 if include: 102 if include:
103 try: 103 try:
104 include(inc, remap=remap, sections=sections) 104 include(inc, remap=remap, sections=sections)