[RFC] case sensitivity on Windows

Mark Hammond mhammond at skippinet.com.au
Wed Nov 12 02:28:27 GMT 2008


> 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.

...

> It may, but I think to get attention to it it's better to post a patch
> here with a cover letter about what you did or where you're stuck.  It
> starts a conversation more than posting a branch which is not so
> visible.

Sorry I wasn't clear - from the mail you quoted:

> I've started looking into this and I'm a little lost :(  As a first 
> step, I thought a version of path2id which ignores the case of the 
> path would work, which you could then pass back to id2path to get the 
> 'canonical' name in the inventory.  I've a couple of problems with this
approach:
>
> * Adding this method to tree.py is easy - but its not clear that will 
> actually be used.
>
> * Adding this method to workingtree_4 is a little tricker - it 
> probably means we need to add that capability to 
> diststate._get_entry() - but that method is hairy!

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...

Thanks,

MArk




More information about the bazaar mailing list