Code review comment for lp:~jelmer/brz/python3-more

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> The main tricky bit that jumps out at me with these changes is I was trying to
> avoid putting bytes into the format registry. The issue then is there's not a
> clear point to then start treating the magic strings as bytes when detecting
> formats.
I think format strings should always be bytes - the user never interacts with them.

We currently have two kinds of format registries:

* Those with bzrdir-style format strings (e.g. "Bazaar-NG 1.9 (rich root)\n"
* Those for use by the user in e.g. UIs ("git", "2a")

They should be less interwoven; for the first it makes sense for strings to be bytes, for the second it should definitely be unicode.

« Back to merge proposal