Mercurial > public > mercurial-scm > hg
diff mercurial/configuration/rcutil.py @ 52424: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 | 3e79ca017157 |
line wrap: on
line diff
--- a/mercurial/configuration/rcutil.py Tue Oct 22 23:42:15 2024 +0200 +++ b/mercurial/configuration/rcutil.py Wed Oct 23 01:12:52 2024 +0200 @@ -152,13 +152,13 @@ return [] -def repo_components(repo_path: bytes) -> List[FileRCT]: +def repo_components(repo_path: bytes) -> List[ComponentT]: """return the list of config file to read for a repository""" components = [] components.extend(_shared_source_component(repo_path)) components.append(os.path.join(repo_path, b".hg", b"hgrc")) components.append(os.path.join(repo_path, b".hg", b"hgrc-not-shared")) - return components + return [(b'path', c) for c in components] def defaultpagerenv() -> Dict[bytes, bytes]: