[RFC] case sensitivity on Windows

Martin Pool mbp at canonical.com
Wed Nov 12 02:36:45 GMT 2008


On Wed, Nov 12, 2008 at 12:28 PM, Mark Hammond
<mhammond at skippinet.com.au> wrote:
>> I think it would really be better to start by having a method on the
>> tree which is 'loosely match these filenames', and it returns the
>> canonical form for that tree.
>
> I assume you mean match the inventory?  One that matches the filesystem is
> easy and was in my early patch.

I meant the RevisionTree, ie the one backed by the inventory and texts
from the repository, rather than the WorkingTree backed on disk.

> In summary:
>
> * To get the canonical name from the inventory, it seems we just need a
> version of 'path2id' that ignores the case - the canonical name can then be
> fetched by passing the returned ID to id2path.
>
> * I'm stuck on how I would implement a case-insensitive path2id as it would
> seem to require some very heavy lifting in dirstate._get_entry() to even get
> started.
>
> * an alternative to the above escapes me at the moment..
>
> I hope that clarifies things...

I don't think you should write against the internals of the dirstate.
Instead, walk down through the inventory, just like you do in the
filesystem.  For each directory, look through its .children list
case-insensitively, to find the actual name of the next component of
the path.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list