comparison mercurial/upgrade.py @ 31867:cc60b6c36637

upgrade: drop the prefix to the 'supportremovedrequirements' function Now that we are in the 'upgrade' module we can simplify the name.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 10 Apr 2017 18:00:27 +0200
parents 1454726b6d7c
children 9f84ccb1b282
comparison
equal deleted inserted replaced
31866:1454726b6d7c 31867:cc60b6c36637
51 'parentdelta', 51 'parentdelta',
52 # Upgrade should operate on the actual store, not the shared link. 52 # Upgrade should operate on the actual store, not the shared link.
53 'shared', 53 'shared',
54 ]) 54 ])
55 55
56 def upgradesupportremovedrequirements(repo): 56 def supportremovedrequirements(repo):
57 """Obtain requirements that can be removed during an upgrade. 57 """Obtain requirements that can be removed during an upgrade.
58 58
59 If an upgrade were to create a repository that dropped a requirement, 59 If an upgrade were to create a repository that dropped a requirement,
60 the dropped requirement must appear in the returned set for the upgrade 60 the dropped requirement must appear in the returned set for the upgrade
61 to be allowed. 61 to be allowed.
605 # FUTURE there is potentially a need to control the wanted requirements via 605 # FUTURE there is potentially a need to control the wanted requirements via
606 # command arguments or via an extension hook point. 606 # command arguments or via an extension hook point.
607 newreqs = localrepo.newreporequirements(repo) 607 newreqs = localrepo.newreporequirements(repo)
608 608
609 noremovereqs = (repo.requirements - newreqs - 609 noremovereqs = (repo.requirements - newreqs -
610 upgradesupportremovedrequirements(repo)) 610 supportremovedrequirements(repo))
611 if noremovereqs: 611 if noremovereqs:
612 raise error.Abort(_('cannot upgrade repository; requirement would be ' 612 raise error.Abort(_('cannot upgrade repository; requirement would be '
613 'removed: %s') % _(', ').join(sorted(noremovereqs))) 613 'removed: %s') % _(', ').join(sorted(noremovereqs)))
614 614
615 noaddreqs = (newreqs - repo.requirements - 615 noaddreqs = (newreqs - repo.requirements -