equal
deleted
inserted
replaced
42 requirements = repo.requirements |
42 requirements = repo.requirements |
43 auto_upgrade_share_source = ui.configbool( |
43 auto_upgrade_share_source = ui.configbool( |
44 b'format', |
44 b'format', |
45 b'use-share-safe.automatic-upgrade-of-mismatching-repositories', |
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 action = None |
52 action = None |
49 |
53 |
50 if ( |
54 if ( |
51 auto_upgrade_share_source |
55 auto_upgrade_share_source |
59 b" feature\n" |
63 b" feature\n" |
60 ) |
64 ) |
61 hint = b"(see `hg help config.format.use-share-safe` for details)\n" |
65 hint = b"(see `hg help config.format.use-share-safe` for details)\n" |
62 |
66 |
63 def action(): |
67 def action(): |
64 if not ui.quiet: |
68 if not (ui.quiet or auto_upgrade_quiet): |
65 ui.write_err(msg) |
69 ui.write_err(msg) |
66 ui.write_err(hint) |
70 ui.write_err(hint) |
67 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) |
71 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) |
68 scmutil.writereporequirements(repo, requirements) |
72 scmutil.writereporequirements(repo, requirements) |
69 |
73 |
73 b" feature\n" |
77 b" feature\n" |
74 ) |
78 ) |
75 hint = b"(see `hg help config.format.use-share-safe` for details)\n" |
79 hint = b"(see `hg help config.format.use-share-safe` for details)\n" |
76 |
80 |
77 def action(): |
81 def action(): |
78 if not ui.quiet: |
82 if not (ui.quiet or auto_upgrade_quiet): |
79 ui.write_err(msg) |
83 ui.write_err(msg) |
80 ui.write_err(hint) |
84 ui.write_err(hint) |
81 requirements.discard(requirementsmod.SHARESAFE_REQUIREMENT) |
85 requirements.discard(requirementsmod.SHARESAFE_REQUIREMENT) |
82 scmutil.writereporequirements(repo, requirements) |
86 scmutil.writereporequirements(repo, requirements) |
83 |
87 |