Mercurial > hg
comparison mercurial/upgrade.py @ 31865:5dcaa0f4455b
upgrade: drop the prefix to the 'requiredsourcerequirements' 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 17:55:47 +0200 |
parents | 70d163b86316 |
children | 1454726b6d7c |
comparison
equal
deleted
inserted
replaced
31864:70d163b86316 | 31865:5dcaa0f4455b |
---|---|
20 scmutil, | 20 scmutil, |
21 util, | 21 util, |
22 vfs as vfsmod, | 22 vfs as vfsmod, |
23 ) | 23 ) |
24 | 24 |
25 def upgraderequiredsourcerequirements(repo): | 25 def requiredsourcerequirements(repo): |
26 """Obtain requirements required to be present to upgrade a repo. | 26 """Obtain requirements required to be present to upgrade a repo. |
27 | 27 |
28 An upgrade will not be allowed if the repository doesn't have the | 28 An upgrade will not be allowed if the repository doesn't have the |
29 requirements returned by this function. | 29 requirements returned by this function. |
30 """ | 30 """ |
589 | 589 |
590 optimize = set(optimize or []) | 590 optimize = set(optimize or []) |
591 repo = repo.unfiltered() | 591 repo = repo.unfiltered() |
592 | 592 |
593 # Ensure the repository can be upgraded. | 593 # Ensure the repository can be upgraded. |
594 missingreqs = upgraderequiredsourcerequirements(repo) - repo.requirements | 594 missingreqs = requiredsourcerequirements(repo) - repo.requirements |
595 if missingreqs: | 595 if missingreqs: |
596 raise error.Abort(_('cannot upgrade repository; requirement ' | 596 raise error.Abort(_('cannot upgrade repository; requirement ' |
597 'missing: %s') % _(', ').join(sorted(missingreqs))) | 597 'missing: %s') % _(', ').join(sorted(missingreqs))) |
598 | 598 |
599 blockedreqs = upgradeblocksourcerequirements(repo) & repo.requirements | 599 blockedreqs = upgradeblocksourcerequirements(repo) & repo.requirements |