py3: convert "usage" literal to bytes
authorYuya Nishihara <yuya@tcha.org>
Sat, 13 Oct 2018 16:57:28 +0200
changeset 40265 d6b7c4e77bb4
parent 40264 12e2e5cd5777
child 40266 ab04ce6f0674
py3: convert "usage" literal to bytes Here _() is practically an identity function, but we shouldn't pass in unicode to _().
contrib/simplemerge
--- a/contrib/simplemerge	Sat Oct 13 09:47:53 2018 -0400
+++ b/contrib/simplemerge	Sat Oct 13 16:57:28 2018 +0200
@@ -28,7 +28,7 @@
            (b'h', b'help', None, _(b'display help and exit')),
            (b'q', b'quiet', None, _(b'suppress output'))]
 
-usage = _('''simplemerge [OPTS] LOCAL BASE OTHER
+usage = _(b'''simplemerge [OPTS] LOCAL BASE OTHER
 
     Simple three-way file merge utility with a minimal feature set.
 
@@ -41,7 +41,7 @@
     """Exception raised on errors in parsing the command line."""
 
 def showhelp():
-    pycompat.stdout.write(usage.encode('utf8'))
+    pycompat.stdout.write(usage)
     pycompat.stdout.write(b'\noptions:\n')
 
     out_opts = []