Mercurial > public > mercurial-scm > hg
comparison mercurial/upgrade_utils/actions.py @ 49377:7fe86498e84f stable
repo-upgrade: avoid a crash when multiple optimisation are specified
In Python 3, the type are no longer comparable and this expose the error.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 05 Jul 2022 17:53:26 +0200 |
parents | 566066826e7c |
children | d12446766a35 |
comparison
equal
deleted
inserted
replaced
49376:6b04f702c501 | 49377:7fe86498e84f |
---|---|
681 if name is not None and name not in destreqs: | 681 if name is not None and name not in destreqs: |
682 continue | 682 continue |
683 | 683 |
684 newactions.append(d) | 684 newactions.append(d) |
685 | 685 |
686 newactions.extend(o for o in sorted(optimizations) if o not in newactions) | 686 newactions.extend( |
687 o | |
688 for o in sorted(optimizations, key=(lambda x: x.name)) | |
689 if o not in newactions | |
690 ) | |
687 | 691 |
688 # FUTURE consider adding some optimizations here for certain transitions. | 692 # FUTURE consider adding some optimizations here for certain transitions. |
689 # e.g. adding generaldelta could schedule parent redeltas. | 693 # e.g. adding generaldelta could schedule parent redeltas. |
690 | 694 |
691 return newactions | 695 return newactions |