ae33e6b815ce

py3/unicode: adapt cmdtable entries to bytestrings
[view raw] [browse files]
author David Champion <dgc@bikeshed.us>
date Thu, 30 Jul 2020 14:47:16 -0700
parents 08208fbdfd02
children 0d3229120aff
branches/tags (none)
files prompt.py

Changes

diff -r 08208fbdfd02 -r ae33e6b815ce prompt.py
--- a/prompt.py	Thu Jul 30 14:43:13 2020 -0700
+++ b/prompt.py	Thu Jul 30 14:47:16 2020 -0700
@@ -69,9 +69,12 @@
     else:
         return None
 
-@command('prompt',
-         [('', 'angle-brackets', None, 'use angle brackets (<>) for keywords')],
-         'hg prompt STRING')
+def b(s):
+    return bytes(s, 'utf-8')
+
+@command(b('prompt'),
+         [(b(''), b('angle-brackets'), None, b('use angle brackets (<>) for keywords'))],
+         b('hg prompt STRING'))
 def prompt(ui, repo, fs='', **opts):
     '''get repository information for use in a shell prompt