]> arthur.barton.de Git - bup.git/commit
Rework shstr to handle bytes and strings; add squote and bquote
authorRob Browning <rlb@defaultvalue.org>
Tue, 31 Dec 2019 19:45:00 +0000 (13:45 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Feb 2020 18:14:35 +0000 (12:14 -0600)
commit705400e773ca069fc1b4124843b14ea76d877892
tree2e4f300ab1b038ed59ea570deeb9019e40fe1419
parent3dce861d57ade28d24d8d8735e2bdab491ad0938
Rework shstr to handle bytes and strings; add squote and bquote

These could be smarter, i.e '1 could become "'"1 rather than ''"'"'1',
but we can always improve it later.  And add at last some tests.
Don't rely on compat.quote for strings so that we know we'll have the
same behavior for bytes and strings.

Thanks to Johannes Berg for pointing out an incorrect variable name in
a previous revision.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/helpers.py
lib/bup/t/thelpers.py