equal
deleted
inserted
replaced
147 or downgrade the repository according the configuration and repository |
147 or downgrade the repository according the configuration and repository |
148 format. |
148 format. |
149 """ |
149 """ |
150 ui = repo.ui |
150 ui = repo.ui |
151 requirements = set(repo.requirements) |
151 requirements = set(repo.requirements) |
152 auto_upgrade_tracked_hint = ui.configbool( |
152 auto_upgrade_dv2 = ui.configbool( |
153 b'format', |
153 b'format', |
154 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories', |
154 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories', |
155 ) |
155 ) |
156 |
156 |
157 action = None |
157 action = None |
158 |
158 |
159 if auto_upgrade_tracked_hint: |
159 if auto_upgrade_dv2: |
160 d2_config = ui.configbool(b'format', b'use-dirstate-v2') |
160 d2_config = ui.configbool(b'format', b'use-dirstate-v2') |
161 d2_local = requirementsmod.DIRSTATE_V2_REQUIREMENT in requirements |
161 d2_local = requirementsmod.DIRSTATE_V2_REQUIREMENT in requirements |
162 if d2_config and not d2_local: |
162 if d2_config and not d2_local: |
163 msg = _( |
163 msg = _( |
164 b"automatically upgrading repository to the `dirstate-v2`" |
164 b"automatically upgrading repository to the `dirstate-v2`" |