Patchwork D10875: revlog: byteify a few error strings

login
register
mail settings
Submitter phabricator
Date June 12, 2021, 4:57 a.m.
Message ID <differential-rev-PHID-DREV-ipalvga2m73eu6j2fj2m-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49195/
State Superseded
Headers show

Comments

phabricator - June 12, 2021, 4:57 a.m.
mharbison72 created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10875

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




To: mharbison72, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1760,7 +1760,7 @@ 
         elif compression_mode == COMP_MODE_INLINE:
             return self.decompress(data)
         else:
-            msg = 'unknown compression mode %d'
+            msg = b'unknown compression mode %d'
             msg %= compression_mode
             raise error.RevlogError(msg)
 
@@ -1826,7 +1826,7 @@ 
                 elif comp_mode == COMP_MODE_DEFAULT:
                     ladd(def_decomp(c))
                 else:
-                    msg = 'unknown compression mode %d'
+                    msg = b'unknown compression mode %d'
                     msg %= comp_mode
                     raise error.RevlogError(msg)
 
@@ -2054,7 +2054,7 @@ 
         elif comp == COMP_MODE_INLINE:
             segment = self.decompress(comp_segment)
         else:
-            msg = 'unknown compression mode %d'
+            msg = b'unknown compression mode %d'
             msg %= comp
             raise error.RevlogError(msg)