diff mercurial/loggingutil.py @ 43077:687b865b95ad

formatting: byteify all mercurial/ and hgext/ string literals Done with python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py') black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**') # skip-blame mass-reformatting only Differential Revision: https://phab.mercurial-scm.org/D6972
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:48:39 -0400
parents 2372284d9457
children 4a6024b87dfc
line wrap: on
line diff
--- a/mercurial/loggingutil.py	Sun Oct 06 09:45:02 2019 -0400
+++ b/mercurial/loggingutil.py	Sun Oct 06 09:48:39 2019 -0400
@@ -31,7 +31,7 @@
         except OSError as err:
             if err.errno != errno.ENOENT:
                 ui.debug(
-                    "warning: cannot remove '%s': %s\n"
+                    b"warning: cannot remove '%s': %s\n"
                     % (newpath, err.strerror)
                 )
         try:
@@ -40,7 +40,7 @@
         except OSError as err:
             if err.errno != errno.ENOENT:
                 ui.debug(
-                    "warning: cannot rename '%s' to '%s': %s\n"
+                    b"warning: cannot rename '%s' to '%s': %s\n"
                     % (newpath, oldpath, err.strerror)
                 )
 
@@ -54,11 +54,11 @@
                 path = vfs.join(name)
                 for i in pycompat.xrange(maxfiles - 1, 1, -1):
                     rotate(
-                        oldpath='%s.%d' % (path, i - 1),
-                        newpath='%s.%d' % (path, i),
+                        oldpath=b'%s.%d' % (path, i - 1),
+                        newpath=b'%s.%d' % (path, i),
                     )
-                rotate(oldpath=path, newpath=maxfiles > 0 and path + '.1')
-    return vfs(name, 'a', makeparentdirs=False)
+                rotate(oldpath=path, newpath=maxfiles > 0 and path + b'.1')
+    return vfs(name, b'a', makeparentdirs=False)
 
 
 def _formatlogline(msg):