# HG changeset patch # User IBBoard # Date 1579431317 0 # Node ID 503a7a8df2e2191469335ad1f9e1ace0aee1f8b5 # Parent 13435b80c672230eeea062035c03544d2fd1fd0c 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 diff -r 13435b80c672 -r 503a7a8df2e2 prompt.py --- 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