Mercurial > repos > other > linux
diff 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 |
line wrap: on
line diff
--- a/prompt.py Sat Jan 18 21:01:23 2020 +0000 +++ b/prompt.py Sun Jan 19 10:55:17 2020 +0000 @@ -87,7 +87,7 @@ (b'', b'cache-incoming', None, b'used internally by hg-prompt'), (b'', b'cache-outgoing', None, b'used internally by hg-prompt')], b'hg prompt STRING') -def prompt(ui, repo, fs='', **opts): +def prompt(ui, repo, fs=b'', **opts): '''get repository information for use in a shell prompt Take a string and output it for use in a shell prompt. You can use