Thread (1 message) 1 message, 1 author, 2019-12-17

Re: [PATCH v2 04/14] git-p4: encode/decode communication with p4 for python3

From: Junio C Hamano <hidden>
Date: 2019-12-17 22:52:06

Yang Zhao [off-list ref] writes:
The marshalled dict in the response given on STDOUT by p4 uses `str` for
keys and string values. When run using python3, these values are
deserialized as `bytes`, leading to a whole host of problems as the rest
of the code assumes `str` is used throughout.

This patch changes the deserialization behaviour such that, as much as
possible, text output from p4 is decoded to native unicode strings.
Exceptions are made for the field `data` as it is usually arbitrary
binary data. `depotFile[0-9]*`, `path`, and `clientFile` are also exempt
as they contain path strings not encoded with UTF-8, and must survive
survive round-trip back to p4.
Doubled "survive"; will drop one of them while queuing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help