changeset 51172:e0fc40b95f05 stable

debugformat: fix formatting for compression level `bytes(<int>)` gives a very different result as `str(<int>)` and the display of `hg debugformat` have been broken for a while as a result.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Feb 2024 02:12:58 +0100
parents db5d7aee641e
children 46fed351e451 3a7ef1398385
files mercurial/upgrade_utils/actions.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/upgrade_utils/actions.py	Thu Feb 15 18:10:41 2024 +0000
+++ b/mercurial/upgrade_utils/actions.py	Wed Feb 21 02:12:58 2024 +0100
@@ -489,7 +489,7 @@
             level = repo.ui.configint(b'storage', b'revlog.zstd.level')
         if level is None:
             return b'default'
-        return bytes(level)
+        return b"%d" % level
 
     @classmethod
     def fromconfig(cls, repo):
@@ -501,7 +501,7 @@
             level = repo.ui.configint(b'storage', b'revlog.zstd.level')
         if level is None:
             return b'default'
-        return bytes(level)
+        return b"%d" % level
 
 
 def find_format_upgrades(repo):