mercurial/upgrade_utils/actions.py
changeset 46851 3aa78f2aea48
parent 46706 7d9d9265d40f
child 46874 84a93fa7ecfd
equal deleted inserted replaced
46850:9dfcadc2cabb 46851:3aa78f2aea48
   426     def fromconfig(cls, repo):
   426     def fromconfig(cls, repo):
   427         compengines = repo.ui.configlist(b'format', b'revlog-compression')
   427         compengines = repo.ui.configlist(b'format', b'revlog-compression')
   428         # return the first valid value as the selection code would do
   428         # return the first valid value as the selection code would do
   429         for comp in compengines:
   429         for comp in compengines:
   430             if comp in util.compengines:
   430             if comp in util.compengines:
   431                 return comp
   431                 e = util.compengines[comp]
       
   432                 if e.available() and e.revlogheader():
       
   433                     return comp
   432 
   434 
   433         # no valide compression found lets display it all for clarity
   435         # no valide compression found lets display it all for clarity
   434         return b','.join(compengines)
   436         return b','.join(compengines)
   435 
   437 
   436 
   438