Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/dispatch.py @ 52457:22129ce9f86d
config: include the component level when returning them
This will be useful when modifying them.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 23 Oct 2024 01:32:33 +0200 |
parents | e3b45916c375 |
children | 24ee91ba9aa8 |
comparison
equal
deleted
inserted
replaced
52456:3e79ca017157 | 52457:22129ce9f86d |
---|---|
952 if not path: | 952 if not path: |
953 lui = ui | 953 lui = ui |
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 c_type, 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 assert c_type == b'path' |
959 lui.readconfig(rc_path, root=path) | 959 lui.readconfig(rc_path, root=path) |
960 | 960 |
961 if rpath: | 961 if rpath: |
962 # the specified path, might be defined in the [paths] section of the | 962 # the specified path, might be defined in the [paths] section of the |
964 # get overriden here. | 964 # get overriden here. |
965 path_obj = urlutil.get_clone_path_obj(lui, rpath) | 965 path_obj = urlutil.get_clone_path_obj(lui, rpath) |
966 path = path_obj.rawloc | 966 path = path_obj.rawloc |
967 lui = ui.copy() | 967 lui = ui.copy() |
968 if rcutil.use_repo_hgrc(): | 968 if rcutil.use_repo_hgrc(): |
969 for c_type, rc_path in rcutil.repo_components(path): | 969 for __, c_type, rc_path in rcutil.repo_components(path): |
970 assert c_type == b'path' | 970 assert c_type == b'path' |
971 lui.readconfig(rc_path, root=path) | 971 lui.readconfig(rc_path, root=path) |
972 | 972 |
973 if oldcwd: | 973 if oldcwd: |
974 os.chdir(oldcwd) | 974 os.chdir(oldcwd) |