Show More
@@ -152,13 +152,13 def _shared_source_component(path: bytes | |||||
152 | return [] |
|
152 | return [] | |
153 |
|
153 | |||
154 |
|
154 | |||
155 |
def repo_components(repo_path: bytes) -> List[ |
|
155 | def repo_components(repo_path: bytes) -> List[ComponentT]: | |
156 | """return the list of config file to read for a repository""" |
|
156 | """return the list of config file to read for a repository""" | |
157 | components = [] |
|
157 | components = [] | |
158 | components.extend(_shared_source_component(repo_path)) |
|
158 | components.extend(_shared_source_component(repo_path)) | |
159 | components.append(os.path.join(repo_path, b".hg", b"hgrc")) |
|
159 | components.append(os.path.join(repo_path, b".hg", b"hgrc")) | |
160 | components.append(os.path.join(repo_path, b".hg", b"hgrc-not-shared")) |
|
160 | components.append(os.path.join(repo_path, b".hg", b"hgrc-not-shared")) | |
161 | return components |
|
161 | return [(b'path', c) for c in components] | |
162 |
|
162 | |||
163 |
|
163 | |||
164 | def defaultpagerenv() -> Dict[bytes, bytes]: |
|
164 | def defaultpagerenv() -> Dict[bytes, bytes]: |
@@ -954,7 +954,8 def _getlocal(ui, rpath, wd=None): | |||||
954 | else: |
|
954 | else: | |
955 | lui = ui.copy() |
|
955 | lui = ui.copy() | |
956 | if rcutil.use_repo_hgrc(): |
|
956 | if rcutil.use_repo_hgrc(): | |
957 | for rc_path in rcutil.repo_components(path): |
|
957 | for c_type, rc_path in rcutil.repo_components(path): | |
|
958 | assert c_type == b'path' | |||
958 | lui.readconfig(rc_path, root=path) |
|
959 | lui.readconfig(rc_path, root=path) | |
959 |
|
960 | |||
960 | if rpath: |
|
961 | if rpath: | |
@@ -965,7 +966,8 def _getlocal(ui, rpath, wd=None): | |||||
965 | path = path_obj.rawloc |
|
966 | path = path_obj.rawloc | |
966 | lui = ui.copy() |
|
967 | lui = ui.copy() | |
967 | if rcutil.use_repo_hgrc(): |
|
968 | if rcutil.use_repo_hgrc(): | |
968 | for rc_path in rcutil.repo_components(path): |
|
969 | for c_type, rc_path in rcutil.repo_components(path): | |
|
970 | assert c_type == b'path' | |||
969 | lui.readconfig(rc_path, root=path) |
|
971 | lui.readconfig(rc_path, root=path) | |
970 |
|
972 | |||
971 | if oldcwd: |
|
973 | if oldcwd: |
General Comments 0
You need to be logged in to leave comments.
Login now