compression: only declare revlog support for available engine
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 16 Apr 2019 15:10:16 +0200
changeset 42135 b970fece153d
parent 42134 f0203c3406e7
child 42136 10a6725dca6e
compression: only declare revlog support for available engine Even if we know that an engine support revlog compression, the Mercurial process still won't support it if the compression engine is not available.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Apr 15 19:21:41 2019 +0300
+++ b/mercurial/localrepo.py	Tue Apr 16 15:10:16 2019 +0200
@@ -643,7 +643,7 @@
     # Add derived requirements from registered compression engines.
     for name in util.compengines:
         engine = util.compengines[name]
-        if engine.revlogheader():
+        if engine.available() and engine.revlogheader():
             supported.add(b'exp-compression-%s' % name)
 
     return supported