equal
deleted
inserted
replaced
99 requirements = set(repo.requirements) |
99 requirements = set(repo.requirements) |
100 auto_upgrade_tracked_hint = ui.configbool( |
100 auto_upgrade_tracked_hint = ui.configbool( |
101 b'format', |
101 b'format', |
102 b'use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories', |
102 b'use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories', |
103 ) |
103 ) |
|
104 auto_upgrade_quiet = ui.configbool( |
|
105 b'format', |
|
106 b'use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet', |
|
107 ) |
104 |
108 |
105 action = None |
109 action = None |
106 |
110 |
107 if auto_upgrade_tracked_hint: |
111 if auto_upgrade_tracked_hint: |
108 th_config = ui.configbool(b'format', b'use-dirstate-tracked-hint') |
112 th_config = ui.configbool(b'format', b'use-dirstate-tracked-hint') |
113 b" feature\n" |
117 b" feature\n" |
114 ) |
118 ) |
115 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n" |
119 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n" |
116 |
120 |
117 def action(): |
121 def action(): |
118 if not ui.quiet: |
122 if not (ui.quiet or auto_upgrade_quiet): |
119 ui.write_err(msg) |
123 ui.write_err(msg) |
120 ui.write_err(hint) |
124 ui.write_err(hint) |
121 requirements.add(requirementsmod.DIRSTATE_TRACKED_HINT_V1) |
125 requirements.add(requirementsmod.DIRSTATE_TRACKED_HINT_V1) |
122 op = AutoUpgradeOperation(requirements) |
126 op = AutoUpgradeOperation(requirements) |
123 engine.upgrade_tracked_hint(ui, repo, op, add=True) |
127 engine.upgrade_tracked_hint(ui, repo, op, add=True) |
128 b" feature\n" |
132 b" feature\n" |
129 ) |
133 ) |
130 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n" |
134 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n" |
131 |
135 |
132 def action(): |
136 def action(): |
133 if not ui.quiet: |
137 if not (ui.quiet or auto_upgrade_quiet): |
134 ui.write_err(msg) |
138 ui.write_err(msg) |
135 ui.write_err(hint) |
139 ui.write_err(hint) |
136 requirements.discard(requirementsmod.DIRSTATE_TRACKED_HINT_V1) |
140 requirements.discard(requirementsmod.DIRSTATE_TRACKED_HINT_V1) |
137 op = AutoUpgradeOperation(requirements) |
141 op = AutoUpgradeOperation(requirements) |
138 engine.upgrade_tracked_hint(ui, repo, op, add=False) |
142 engine.upgrade_tracked_hint(ui, repo, op, add=False) |