##// END OF EJS Templates
auto-upgrade: add an option to silence the share-safe message...
marmoute -
r50234:9e203cda default
parent child Browse files
Show More
@@ -1409,6 +1409,12 b' coreconfigitem('
1409 1409 )
1410 1410 coreconfigitem(
1411 1411 b'format',
1412 b'use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet',
1413 default=False,
1414 experimental=True,
1415 )
1416 coreconfigitem(
1417 b'format',
1412 1418 b'internal-phase',
1413 1419 default=False,
1414 1420 experimental=True,
@@ -1098,6 +1098,9 b' https://www.mercurial-scm.org/wiki/Missi'
1098 1098 `share-safe` requirement if `format.use-share-safe=no`. So we recommend
1099 1099 setting both this value and `format.use-share-safe` at the same time.
1100 1100
1101 ``use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet``
1102 Hide message when performing such automatic upgrade.
1103
1101 1104 ``usestore``
1102 1105 Enable or disable the "store" repository format which improves
1103 1106 compatibility with systems that fold case or otherwise mangle
@@ -44,6 +44,10 b' def get_share_safe_action(repo):'
44 44 b'format',
45 45 b'use-share-safe.automatic-upgrade-of-mismatching-repositories',
46 46 )
47 auto_upgrade_quiet = ui.configbool(
48 b'format',
49 b'use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet',
50 )
47 51
48 52 action = None
49 53
@@ -61,7 +65,7 b' def get_share_safe_action(repo):'
61 65 hint = b"(see `hg help config.format.use-share-safe` for details)\n"
62 66
63 67 def action():
64 if not ui.quiet:
68 if not (ui.quiet or auto_upgrade_quiet):
65 69 ui.write_err(msg)
66 70 ui.write_err(hint)
67 71 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT)
@@ -75,7 +79,7 b' def get_share_safe_action(repo):'
75 79 hint = b"(see `hg help config.format.use-share-safe` for details)\n"
76 80
77 81 def action():
78 if not ui.quiet:
82 if not (ui.quiet or auto_upgrade_quiet):
79 83 ui.write_err(msg)
80 84 ui.write_err(hint)
81 85 requirements.discard(requirementsmod.SHARESAFE_REQUIREMENT)
@@ -1615,6 +1615,8 b' Separate sections from subsections'
1615 1615
1616 1616 "use-share-safe.automatic-upgrade-of-mismatching-repositories"
1617 1617
1618 "use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet"
1619
1618 1620 "usestore"
1619 1621
1620 1622 "sparse-revlog"
@@ -2075,11 +2075,10 b' Quiet upgrade and downgrade'
2075 2075 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2076 2076 > --config format.use-dirstate-tracked-hint=yes \
2077 2077 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2078 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2078 2079 > --config format.use-share-safe=no
2079 2080 automatically downgrading repository from the `dirstate-v2` feature
2080 2081 (see `hg help config.format.use-dirstate-v2` for details)
2081 automatically downgrading repository from the `share-safe` feature
2082 (see `hg help config.format.use-share-safe` for details)
2083 2082 automatically upgrading repository to the `tracked-hint` feature
2084 2083 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2085 2084
@@ -2094,11 +2093,10 b' Quiet upgrade and downgrade'
2094 2093 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2095 2094 > --config format.use-dirstate-tracked-hint=no\
2096 2095 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2096 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2097 2097 > --config format.use-share-safe=yes
2098 2098 automatically upgrading repository to the `dirstate-v2` feature
2099 2099 (see `hg help config.format.use-dirstate-v2` for details)
2100 automatically upgrading repository to the `share-safe` feature
2101 (see `hg help config.format.use-share-safe` for details)
2102 2100 automatically downgrading repository from the `tracked-hint` feature
2103 2101 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2104 2102 $ 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