##// END OF EJS Templates
auto-upgrade: add an option to silence the dirstate-v2 message...
marmoute -
r50236:b38f5063 default
parent child Browse files
Show More
@@ -1289,6 +1289,12 b' coreconfigitem('
1289 1289 )
1290 1290 coreconfigitem(
1291 1291 b'format',
1292 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet',
1293 default=False,
1294 experimental=True,
1295 )
1296 coreconfigitem(
1297 b'format',
1292 1298 b'use-dirstate-tracked-hint',
1293 1299 default=False,
1294 1300 experimental=True,
@@ -965,6 +965,9 b' https://www.mercurial-scm.org/wiki/Missi'
965 965 `dirstate-v2` requirement if `format.use-dirstate-v2=no`. So we recommend
966 966 setting both this value and `format.use-dirstate-v2` at the same time.
967 967
968 ``use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet``
969 Hide message when performing such automatic upgrade.
970
968 971 ``use-dirstate-tracked-hint``
969 972 Enable or disable the writing of "tracked key" file alongside the dirstate.
970 973 (default to disabled)
@@ -153,6 +153,10 b' def get_dirstate_v2_action(repo):'
153 153 b'format',
154 154 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories',
155 155 )
156 auto_upgrade_dv2_quiet = ui.configbool(
157 b'format',
158 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet',
159 )
156 160
157 161 action = None
158 162
@@ -169,7 +173,7 b' def get_dirstate_v2_action(repo):'
169 173 )
170 174
171 175 def action():
172 if not ui.quiet:
176 if not (ui.quiet or auto_upgrade_dv2_quiet):
173 177 ui.write_err(msg)
174 178 ui.write_err(hint)
175 179 requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT)
@@ -186,7 +190,7 b' def get_dirstate_v2_action(repo):'
186 190 )
187 191
188 192 def action():
189 if not ui.quiet:
193 if not (ui.quiet or auto_upgrade_dv2_quiet):
190 194 ui.write_err(msg)
191 195 ui.write_err(hint)
192 196 requirements.discard(requirementsmod.DIRSTATE_V2_REQUIREMENT)
@@ -1605,6 +1605,8 b' Separate sections from subsections'
1605 1605
1606 1606 "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories"
1607 1607
1608 "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet"
1609
1608 1610 "use-dirstate-tracked-hint"
1609 1611
1610 1612 "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories"
@@ -2071,14 +2071,13 b' Quiet upgrade and downgrade'
2071 2071 share-safe: yes
2072 2072 $ hg status -R auto-upgrade \
2073 2073 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2074 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2074 2075 > --config format.use-dirstate-v2=no \
2075 2076 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2076 2077 > --config format.use-dirstate-tracked-hint=yes \
2077 2078 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2078 2079 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2079 2080 > --config format.use-share-safe=no
2080 automatically downgrading repository from the `dirstate-v2` feature
2081 (see `hg help config.format.use-dirstate-v2` for details)
2082 2081 automatically upgrading repository to the `tracked-hint` feature
2083 2082 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2084 2083
@@ -2089,14 +2088,13 b' Quiet upgrade and downgrade'
2089 2088
2090 2089 $ hg status -R auto-upgrade \
2091 2090 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2091 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2092 2092 > --config format.use-dirstate-v2=yes \
2093 2093 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2094 2094 > --config format.use-dirstate-tracked-hint=no\
2095 2095 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2096 2096 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2097 2097 > --config format.use-share-safe=yes
2098 automatically upgrading repository to the `dirstate-v2` feature
2099 (see `hg help config.format.use-dirstate-v2` for details)
2100 2098 automatically downgrading repository from the `tracked-hint` feature
2101 2099 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2102 2100 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
General Comments 0
You need to be logged in to leave comments. Login now