Illegal Filesystem characters in revision names
Aaron Bentley
aaron.bentley at utoronto.ca
Wed Dec 7 04:34:20 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
| On 6 Dec 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
|
|>Robert Collins wrote:
|>Having an irregular system like this forces other layers to do encoding
|>and decoding, violating DRY.
|
|
| I don't see how a rule of "ids must only use certain specified
| characters" will violate Don't Repeat Yourself.
When ids must only use certain specified characters, anyone who wants to
use the illegal characters in an id must encode them on write and decode
them on read.
If you assume two clients want to encode and decode characters, then you
have two implementations of encode_id and two implementations of
decode_id, even though both clients want exactly the same API. These
implementations may be gratuitously or accidentally different.
| We have to specify
| something about what is allowed - at least that it is either a byte or
| unicode string.
Since filenames can include Unicode characters, and some ids are derived
from filenames, I'd recommend that ids be Unicode strings.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDlmZL0F+nu1YWqI0RAo3RAJ9TzyJOYoX66Wx2xs9eIZK6l+oa2ACfesEO
15eK+QpW93iP+4l2Z4cH4Ks=
=WkXG
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list