diff mercurial/configuration/__init__.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 3e79ca017157
children 8c509a70b6fa
line wrap: on
line diff
--- a/mercurial/configuration/__init__.py	Wed Oct 23 00:43:17 2024 +0200
+++ b/mercurial/configuration/__init__.py	Wed Oct 23 01:32:33 2024 +0200
@@ -10,11 +10,15 @@
 
 # keep typing simple for now
 ConfigLevelT = str
-LEVEL_USER = 'user'  # "user" is the default level and never passed explicitly
+LEVEL_BUNDLED_RESOURCE = 'RESOURCE'
+LEVEL_ENV_OVERWRITE = 'ENV-HGRCPATH'
+LEVEL_USER = 'user'
 LEVEL_LOCAL = 'local'
 LEVEL_GLOBAL = 'global'
 LEVEL_SHARED = 'shared'
 LEVEL_NON_SHARED = 'non_shared'
+# only include level that it make sense to edit
+# note: "user" is the default level and never passed explicitly
 EDIT_LEVELS = (
     LEVEL_USER,
     LEVEL_LOCAL,
@@ -27,6 +31,7 @@
 ResourceIDT = Tuple[bytes, bytes]
 FileRCT = bytes
 ComponentT = Tuple[
+    ConfigLevelT,
     bytes,
     Union[
         List[ConfigItemT],