mercurial/upgrade_utils/auto_upgrade.py
changeset 49340 1b9114709428
parent 49339 9e203cda3238
child 49341 b38f5063a0c6
equal deleted inserted replaced
49339:9e203cda3238 49340:1b9114709428
   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`"