case sensitivity on Windows

Mark Hammond mhammond at
Thu Oct 9 23:23:41 BST 2008

Thanks for the feeback John,

> Here I'm not so sure.
> > % bzr revert
> >> +N  Foo
> >> +N  lower
> >
> > % rm Foo
> > % echo hello > foo
> > % bzr status
> > *** current behaviour ***
> >> removed:
> >>   Foo
> >> unknown:
> >>   foo
> > *** expected behaviour ***
> >> modified:
> >>   Foo
> >
> Specifically, how do you end up asking bzr to change the case of a
> file.
> I can go into explorer and do <F2> <BS> foo <enter> and rename the file
> (I think some versions of Windows actually fail at this, but I know
> that
> Vista works.)

Certainly deleting the file than recreating it with a new name would do that.  An editor might "accidently" do this by moving the old copy to a .bak file before saving with a normalized name.

> Is it just that you have to explicitly use "bzr mv", how does that work
> after-the-fact? Since it seems like we will auto-resolve to whatever
> name, and then we can't really see which one is the new and correct
> form.

My idea was that the case in the inventory is always correct.  In other words, bzr should *not* detect this as a rename, but treat it as if the *user* incorrectly specified the wrong case on the command-line.  This is just a special case of that - but it’s a program that specified the wrong case, not the user.

In other words, I think I'm saying that case of the file on the file-system should only be used when adding an item to an inventory, and after that, the case on the file system or command-line always be ignored and the case as stored in the inventory be used.

> One possibility would be to have the behavior:
> % bzr st
> renamed:
>   Foo => foo
> modified:
>   foo
> So we automatically detect the rename.

My point is that on Windows, this is *not* a "rename" in a practical sense.  The same name used in the past can still be used on the new name, where that isn't true of a "real" rename.  ie, just because some editor changed the case of a file, no other windows program would be affected, so bzr should not either.

I appreciate the feedback - what is the next step for movement on this?



More information about the bazaar mailing list