]> arthur.barton.de Git - bup.git/commit
Add "do nothing" path_msg to centralize path conversions
authorRob Browning <rlb@defaultvalue.org>
Thu, 26 Dec 2019 18:27:07 +0000 (12:27 -0600)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Jan 2020 18:54:13 +0000 (12:54 -0600)
commit4f7e4dfcdc5b12efb809a2cafcfff6fbd7e569a0
treec437b5e406ff7dfe5c28db41d8e9a1d256d043ed
parentca343d8e00d453daf2c94552a7524a9d375f34e9
Add "do nothing" path_msg to centralize path conversions

Add path_msg(p) and use it in cmd/bup (as a start).  The intent is to
centralize the encoding of all path values that are to be included in
strings intended for "display" (e.g. stderr, which appears to have to
be a text stream in python 3).

For now, the function will do nothing -- i.e. given the currently
enforced iso-8859-1 encoding we'll just continue to produce the
original path bytes on stderr, but we may well want to make this
configurable at some point (perhaps git's quotePath algorithm might
provide a likely option), and if nothing else, using path_msg()
everywhere makes it much easier to identify and adapt the relevant
code, whatever we decide.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/bup
lib/bup/io.py