Patchwork D11872: upgrade: drop some dead code

login
register
mail settings
Submitter phabricator
Date Dec. 7, 2021, 8:53 a.m.
Message ID <differential-rev-PHID-DREV-cl5amhgby7ay3jopwrck-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50197/
State Superseded
Headers show

Comments

phabricator - Dec. 7, 2021, 8:53 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Everything done by this block is now done by earlier code. So we don't need it anymore.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11872

AFFECTED FILES
  mercurial/upgrade.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -85,9 +85,6 @@ 
     )
     removed_actions = upgrade_actions.find_format_downgrades(repo)
 
-    removedreqs = repo.requirements - newreqs
-    addedreqs = newreqs - repo.requirements
-
     # check if we need to touch revlog and if so, which ones
 
     touched_revlogs = set()
@@ -161,20 +158,6 @@ 
     elif msg_issued >= 1:
         ui.status((b"\n"))
 
-    # check the consistency of the revlog selection with the planned action
-
-    if touched_revlogs != upgrade_engine.UPGRADE_ALL_REVLOGS:
-        incompatible = upgrade_actions.RECLONES_REQUIREMENTS & (
-            removedreqs | addedreqs
-        )
-        if incompatible:
-            msg = _(
-                b'ignoring revlogs selection flags, format requirements '
-                b'change: %s\n'
-            )
-            ui.warn(msg % b', '.join(sorted(incompatible)))
-            touched_revlogs = upgrade_engine.UPGRADE_ALL_REVLOGS
-
     upgrade_op = upgrade_actions.UpgradeOperation(
         ui,
         newreqs,