--- a/mercurial/upgrade.py Tue Apr 16 15:10:16 2019 +0200
+++ b/mercurial/upgrade.py Wed Mar 27 18:27:03 2019 +0100
@@ -325,10 +325,16 @@
@classmethod
def fromrepo(cls, repo):
+ # we allow multiple compression engine requirement to co-exist because
+ # strickly speaking, revlog seems to support mixed compression style.
+ #
+ # The compression used for new entries will be "the last one"
+ compression = 'zlib'
for req in repo.requirements:
- if req.startswith('exp-compression-'):
- return req.split('-', 2)[2]
- return 'zlib'
+ prefix = req.startswith
+ if prefix('revlog-compression-') or prefix('exp-compression-'):
+ compression = req.split('-', 2)[2]
+ return compression
@classmethod
def fromconfig(cls, repo):