mercurial/scmutil.py
changeset 38331 cf59de802883
parent 38312 79dd61a4554f
child 38345 bec1212eceaa
--- a/mercurial/scmutil.py	Sat Jun 16 17:54:29 2018 +0900
+++ b/mercurial/scmutil.py	Sat Jun 16 17:56:37 2018 +0900
@@ -287,7 +287,8 @@
 def checkfilename(f):
     '''Check that the filename f is an acceptable filename for a tracked file'''
     if '\r' in f or '\n' in f:
-        raise error.Abort(_("'\\n' and '\\r' disallowed in filenames: %r") % f)
+        raise error.Abort(_("'\\n' and '\\r' disallowed in filenames: %r")
+                          % pycompat.bytestr(f))
 
 def checkportable(ui, f):
     '''Check if filename f is portable and warn or abort depending on config'''