##// END OF EJS Templates
upgrade: directly use the upgrade action constant...
marmoute -
r46595:53bde3ad default
parent child Browse files
Show More
@@ -1154,25 +1154,22 b' def upgraderepo('
1154 repo = repo.unfiltered()
1154 repo = repo.unfiltered()
1155
1155
1156 revlogs = set(UPGRADE_ALL_REVLOGS)
1156 revlogs = set(UPGRADE_ALL_REVLOGS)
1157 specentries = ((b'c', changelog), (b'm', manifest))
1157 specentries = (
1158 (UPGRADE_CHANGELOG, changelog),
1159 (UPGRADE_MANIFEST, manifest)
1160 )
1158 specified = [(y, x) for (y, x) in specentries if x is not None]
1161 specified = [(y, x) for (y, x) in specentries if x is not None]
1159 if specified:
1162 if specified:
1160 # we have some limitation on revlogs to be recloned
1163 # we have some limitation on revlogs to be recloned
1161 if any(x for y, x in specified):
1164 if any(x for y, x in specified):
1162 revlogs = set()
1165 revlogs = set()
1163 for r, enabled in specified:
1166 for upgrade, enabled in specified:
1164 if enabled:
1167 if enabled:
1165 if r == b'c':
1168 revlogs.add(upgrade)
1166 revlogs.add(UPGRADE_CHANGELOG)
1167 elif r == b'm':
1168 revlogs.add(UPGRADE_MANIFEST)
1169 else:
1169 else:
1170 # none are enabled
1170 # none are enabled
1171 for r, __ in specified:
1171 for upgrade, __ in specified:
1172 if r == b'c':
1172 revlogs.discard(upgrade)
1173 revlogs.discard(UPGRADE_CHANGELOG)
1174 elif r == b'm':
1175 revlogs.discard(UPGRADE_MANIFEST)
1176
1173
1177 # Ensure the repository can be upgraded.
1174 # Ensure the repository can be upgraded.
1178 missingreqs = requiredsourcerequirements(repo) - repo.requirements
1175 missingreqs = requiredsourcerequirements(repo) - repo.requirements
General Comments 0
You need to be logged in to leave comments. Login now