py3: mark all string literals in test-command-template.t as bytes
authorYuya Nishihara <yuya@tcha.org>
Thu, 01 Mar 2018 17:43:25 -0500
changeset 36548 086fc71fbb09
parent 36547 7840d8bd0558
child 36549 3696efeab66f
py3: mark all string literals in test-command-template.t as bytes # skip-blame because just b'' prefixes
tests/revnamesext.py
tests/test-command-template.t
--- a/tests/revnamesext.py	Thu Mar 01 17:03:40 2018 -0500
+++ b/tests/revnamesext.py	Thu Mar 01 17:43:25 2018 -0500
@@ -7,12 +7,12 @@
 )
 
 def reposetup(ui, repo):
-    names = {'r%d' % rev: repo[rev].node() for rev in repo}
+    names = {b'r%d' % rev: repo[rev].node() for rev in repo}
     namemap = lambda r, name: names.get(name)
-    nodemap = lambda r, node: ['r%d' % repo[node].rev()]
+    nodemap = lambda r, node: [b'r%d' % repo[node].rev()]
 
-    ns = namespaces.namespace('revnames', templatename='revname',
-                              logname='revname',
+    ns = namespaces.namespace(b'revnames', templatename=b'revname',
+                              logname=b'revname',
                               listnames=lambda r: names.keys(),
                               namemap=namemap, nodemap=nodemap)
     repo.names.addnamespace(ns)
--- a/tests/test-command-template.t	Thu Mar 01 17:03:40 2018 -0500
+++ b/tests/test-command-template.t	Thu Mar 01 17:43:25 2018 -0500
@@ -4622,9 +4622,9 @@
   > 
   > templatefunc = registrar.templatefunc()
   > 
-  > @templatefunc('custom()')
+  > @templatefunc(b'custom()')
   > def custom(context, mapping, args):
-  >     return 'custom'
+  >     return b'custom'
   > EOF
   $ cat <<EOF > .hg/hgrc
   > [extensions]