Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 52455:e3b45916c375
config: return component from `repo_components`
We used to returns just paths. However using the same return types as
`rccomponents` will be quite useful later in this series.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 23 Oct 2024 01:12:52 +0200 |
parents | 0b791c90280a |
children | 22129ce9f86d |
line wrap: on
line diff
--- a/mercurial/dispatch.py Tue Oct 22 23:42:15 2024 +0200 +++ b/mercurial/dispatch.py Wed Oct 23 01:12:52 2024 +0200 @@ -954,7 +954,8 @@ else: lui = ui.copy() if rcutil.use_repo_hgrc(): - for rc_path in rcutil.repo_components(path): + for c_type, rc_path in rcutil.repo_components(path): + assert c_type == b'path' lui.readconfig(rc_path, root=path) if rpath: @@ -965,7 +966,8 @@ path = path_obj.rawloc lui = ui.copy() if rcutil.use_repo_hgrc(): - for rc_path in rcutil.repo_components(path): + for c_type, rc_path in rcutil.repo_components(path): + assert c_type == b'path' lui.readconfig(rc_path, root=path) if oldcwd: