Filename normalisation handling
Ian Clatworthy
ian.clatworthy at internode.on.net
Tue Aug 21 07:51:44 BST 2007
John,
What's your current feeling on filename normalisation? Now that I'm back
on commit performance, I'd like to resolve that outstanding issue I had
a while back, namely whether test_id2path is a legal test or not?
That particular bit of code (in test_workingtree_4.py) commits some
files then renames one of them to a name that cannot be normalised. (Had
that new name been used when the file was first committed, I strongly
suspect that it would have been caught and rejected thanks to the test
on line 1049 of inventory.py - the very spot where my new code is
failing.) Depending on your perspective, our existing code is either
smart enough to support this or not smart enough to trap it as an
illegal thing to do.
I think we need a formal bit of doc that states exactly what we think is
correct behaviour w.r.t. filename normalisation. Looking back through
the recently mail archives and in the bug tracker, there are a few very
well considered documents/comments like:
* http://bazaar-vcs.org/UnicodeSupport
* https://bugs.launchpad.net/bzr/+bug/77657
* https://lists.ubuntu.com/archives/bazaar/2007q2/024773.html
As I read these, it seems that different people have very different
expectations. Some highly value being able to use bzr on whatever
filenames they have and see our strictness as being a bug. Others value
that same strictness because it ensure that checked in files can be
checked out on other platforms.
I'm hoping the short answer is that the test is broken - it doesn't need
the "rename to something than cannot be normalised" scenario to test
id2path anyway. I don't pretend to have the long answer and suspect I'm
opening a Padora's box? If our position hasn't changed, should I take
something like https://bugs.launchpad.net/bzr/+bug/77657/comments/3 and
put it into the FAQ? Well clearer in the FAQ than it is currently?
Ian C.
More information about the bazaar
mailing list