mercurial/upgrade.py
changeset 48449 dc2ef4b4d9a9
parent 48448 62e6222cc5b6
child 48468 9dd151a39950
equal deleted inserted replaced
48448:62e6222cc5b6 48449:dc2ef4b4d9a9
    82     format_upgrades = upgrade_actions.find_format_upgrades(repo)
    82     format_upgrades = upgrade_actions.find_format_upgrades(repo)
    83     up_actions = upgrade_actions.determine_upgrade_actions(
    83     up_actions = upgrade_actions.determine_upgrade_actions(
    84         repo, format_upgrades, optimizations, repo.requirements, newreqs
    84         repo, format_upgrades, optimizations, repo.requirements, newreqs
    85     )
    85     )
    86     removed_actions = upgrade_actions.find_format_downgrades(repo)
    86     removed_actions = upgrade_actions.find_format_downgrades(repo)
    87 
       
    88     removedreqs = repo.requirements - newreqs
       
    89     addedreqs = newreqs - repo.requirements
       
    90 
    87 
    91     # check if we need to touch revlog and if so, which ones
    88     # check if we need to touch revlog and if so, which ones
    92 
    89 
    93     touched_revlogs = set()
    90     touched_revlogs = set()
    94     overwrite_msg = _(b'warning: ignoring %14s, as upgrade is changing: %s\n')
    91     overwrite_msg = _(b'warning: ignoring %14s, as upgrade is changing: %s\n')
   156             touched_revlogs.add(CL)
   153             touched_revlogs.add(CL)
   157     if msg_issued >= 2:
   154     if msg_issued >= 2:
   158         ui.warn((b"\n"))
   155         ui.warn((b"\n"))
   159     elif msg_issued >= 1:
   156     elif msg_issued >= 1:
   160         ui.status((b"\n"))
   157         ui.status((b"\n"))
   161 
       
   162     # check the consistency of the revlog selection with the planned action
       
   163 
       
   164     if touched_revlogs != upgrade_engine.UPGRADE_ALL_REVLOGS:
       
   165         incompatible = upgrade_actions.RECLONES_REQUIREMENTS & (
       
   166             removedreqs | addedreqs
       
   167         )
       
   168         if incompatible:
       
   169             msg = _(
       
   170                 b'ignoring revlogs selection flags, format requirements '
       
   171                 b'change: %s\n'
       
   172             )
       
   173             ui.warn(msg % b', '.join(sorted(incompatible)))
       
   174             touched_revlogs = upgrade_engine.UPGRADE_ALL_REVLOGS
       
   175 
   158 
   176     upgrade_op = upgrade_actions.UpgradeOperation(
   159     upgrade_op = upgrade_actions.UpgradeOperation(
   177         ui,
   160         ui,
   178         newreqs,
   161         newreqs,
   179         repo.requirements,
   162         repo.requirements,