Mercurial > hg
comparison mercurial/upgrade.py @ 31866:1454726b6d7c
upgrade: drop the prefix to the 'blocksourcerequirements' 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:56:29 +0200 |
parents | 5dcaa0f4455b |
children | cc60b6c36637 |
comparison
equal
deleted
inserted
replaced
31865:5dcaa0f4455b | 31866:1454726b6d7c |
---|---|
33 'revlogv1', | 33 'revlogv1', |
34 # Introduced in Mercurial 0.9.2. | 34 # Introduced in Mercurial 0.9.2. |
35 'store', | 35 'store', |
36 ]) | 36 ]) |
37 | 37 |
38 def upgradeblocksourcerequirements(repo): | 38 def blocksourcerequirements(repo): |
39 """Obtain requirements that will prevent an upgrade from occurring. | 39 """Obtain requirements that will prevent an upgrade from occurring. |
40 | 40 |
41 An upgrade cannot be performed if the source repository contains a | 41 An upgrade cannot be performed if the source repository contains a |
42 requirements in the returned set. | 42 requirements in the returned set. |
43 """ | 43 """ |
594 missingreqs = requiredsourcerequirements(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 = blocksourcerequirements(repo) & repo.requirements |
600 if blockedreqs: | 600 if blockedreqs: |
601 raise error.Abort(_('cannot upgrade repository; unsupported source ' | 601 raise error.Abort(_('cannot upgrade repository; unsupported source ' |
602 'requirement: %s') % | 602 'requirement: %s') % |
603 _(', ').join(sorted(blockedreqs))) | 603 _(', ').join(sorted(blockedreqs))) |
604 | 604 |