# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1529139397 -32400
#      Sat Jun 16 17:56:37 2018 +0900
# Node ID bc71920694ff3bb072daff3751a57ede528fcb8b
# Parent  f701eb1d33ae7b9526742315b4f1d375ec016574
py3: remove b'' from error message of disallowed filename

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -127,6 +127,7 @@ test-eol-patch.t
 test-eol-tag.t
 test-eol-update.t
 test-eol.t
+test-eolfilename.t
 test-excessive-merge.t
 test-exchange-obsmarkers-case-A1.t
 test-exchange-obsmarkers-case-A2.t
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -20,6 +20,7 @@ from . import (
     error,
     mdiff,
     policy,
+    pycompat,
     revlog,
     util,
 )
@@ -635,7 +636,8 @@ def _checkforbidden(l):
     for f in l:
         if '\n' in f or '\r' in f:
             raise error.RevlogError(
-                _("'\\n' and '\\r' disallowed in filenames: %r") % f)
+                _("'\\n' and '\\r' disallowed in filenames: %r")
+                % pycompat.bytestr(f))
 
 
 # apply the changes collected during the bisect loop to our addlist
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -287,7 +287,8 @@ def checknewlabel(repo, lbl, kind):
 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'''
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to