equal
deleted
inserted
replaced
59 continue |
59 continue |
60 result.append((section, configname, env[envname], b'$%s' % envname)) |
60 result.append((section, configname, env[envname], b'$%s' % envname)) |
61 return result |
61 return result |
62 |
62 |
63 |
63 |
64 def defaultrcpath(): |
|
65 '''return rc paths in defaultrc''' |
|
66 defaultpath = os.path.join(resourceutil.datapath, b'defaultrc') |
|
67 return _expandrcpath(defaultpath) |
|
68 |
|
69 |
|
70 def default_rc_resources(): |
64 def default_rc_resources(): |
71 """return rc resource IDs in defaultrc""" |
65 """return rc resource IDs in defaultrc""" |
72 rsrcs = resourceutil.contents(b'mercurial.defaultrc') |
66 rsrcs = resourceutil.contents(b'mercurial.defaultrc') |
73 return [ |
67 return [ |
74 (b'mercurial.defaultrc', r) |
68 (b'mercurial.defaultrc', r) |
105 _rccomponents = [(b'resource', r) for r in default_rc_resources()] |
99 _rccomponents = [(b'resource', r) for r in default_rc_resources()] |
106 |
100 |
107 normpaths = lambda paths: [ |
101 normpaths = lambda paths: [ |
108 (b'path', os.path.normpath(p)) for p in paths |
102 (b'path', os.path.normpath(p)) for p in paths |
109 ] |
103 ] |
110 _rccomponents.extend(normpaths(defaultrcpath() + systemrcpath())) |
104 _rccomponents.extend(normpaths(systemrcpath())) |
111 _rccomponents.append(envrc) |
105 _rccomponents.append(envrc) |
112 _rccomponents.extend(normpaths(userrcpath())) |
106 _rccomponents.extend(normpaths(userrcpath())) |
113 return _rccomponents |
107 return _rccomponents |
114 |
108 |
115 |
109 |