comparison prompt.py @ 142:503a7a8df2e2

Fix "cannot use a bytes pattern on a string-like object" If you just run `hg prompt` then Python 3 will choke with "cannot use a bytes pattern on a string-like object" because the default format string (called `fs`) was a str not bytes
author IBBoard <dev@ibboard.co.uk>
date Sun, 19 Jan 2020 10:55:17 +0000
parents 13435b80c672
children 51d857786c5a
comparison
equal deleted inserted replaced
141:13435b80c672 142:503a7a8df2e2
85 @command(b'prompt', 85 @command(b'prompt',
86 [(b'', b'angle-brackets', None, b'use angle brackets (<>) for keywords'), 86 [(b'', b'angle-brackets', None, b'use angle brackets (<>) for keywords'),
87 (b'', b'cache-incoming', None, b'used internally by hg-prompt'), 87 (b'', b'cache-incoming', None, b'used internally by hg-prompt'),
88 (b'', b'cache-outgoing', None, b'used internally by hg-prompt')], 88 (b'', b'cache-outgoing', None, b'used internally by hg-prompt')],
89 b'hg prompt STRING') 89 b'hg prompt STRING')
90 def prompt(ui, repo, fs='', **opts): 90 def prompt(ui, repo, fs=b'', **opts):
91 '''get repository information for use in a shell prompt 91 '''get repository information for use in a shell prompt
92 92
93 Take a string and output it for use in a shell prompt. You can use 93 Take a string and output it for use in a shell prompt. You can use
94 keywords in curly braces:: 94 keywords in curly braces::
95 95