##// END OF EJS Templates
rcutil: unindent a block...
Jun Wu -
r31693:67f0377b default
parent child Browse files
Show More
@@ -76,20 +76,18 def rccomponents():
76 '''
76 '''
77 envrc = ('items', envrcitems())
77 envrc = ('items', envrcitems())
78
78
79 _rccomponents = None
79 if 'HGRCPATH' in encoding.environ:
80 if _rccomponents is None:
80 # assume HGRCPATH is all about user configs so environments can be
81 if 'HGRCPATH' in encoding.environ:
81 # overridden.
82 # assume HGRCPATH is all about user configs so environments can be
82 _rccomponents = [envrc]
83 # overridden.
83 for p in encoding.environ['HGRCPATH'].split(pycompat.ospathsep):
84 _rccomponents = [envrc]
84 if not p:
85 for p in encoding.environ['HGRCPATH'].split(pycompat.ospathsep):
85 continue
86 if not p:
86 _rccomponents.extend(('path', p) for p in _expandrcpath(p))
87 continue
87 else:
88 _rccomponents.extend(('path', p) for p in _expandrcpath(p))
88 paths = defaultrcpath() + systemrcpath()
89 else:
89 _rccomponents = [('path', os.path.normpath(p)) for p in paths]
90 paths = defaultrcpath() + systemrcpath()
90 _rccomponents.append(envrc)
91 _rccomponents = [('path', os.path.normpath(p)) for p in paths]
91 paths = userrcpath()
92 _rccomponents.append(envrc)
92 _rccomponents.extend(('path', os.path.normpath(p)) for p in paths)
93 paths = userrcpath()
94 _rccomponents.extend(('path', os.path.normpath(p)) for p in paths)
95 return _rccomponents
93 return _rccomponents
General Comments 0
You need to be logged in to leave comments. Login now