[RFC] case sensitivity on Windows

Martin Pool mbp at canonical.com
Wed Nov 12 01:04:19 GMT 2008


On Tue, Nov 4, 2008 at 11:35 AM, Mark Hammond <mhammond at skippinet.com.au> wrote:
> 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!
>
> * As you imply above, this may not be enough: we probably need almost *all*
> of the path matching methods on the tree to ignore the case on such
> file-systems (ie, the "mode" you describe), so, eg, 'bzr status' will ignore
> the case of the file on the file-system and just match the inventory.  But
> this is harier still!!

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. Then the translated names can be passed
to anything within it without needing that other code to change.

> Any advice for how this could best be implemented?  Would it help if I
> published my branch under the bzr project on launchpad so others could help
> with the hacking?

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.

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



More information about the bazaar mailing list