Ticket Hash: | 85017e9273ca8121c54a5c1d22cbb82b6e0de33b | |||
Title: | Under Windows, renamed file keeps getting "ADDED". | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Minor | Priority: | ||
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2013-04-18 11:11:03 | |||
Version Found In: | 1.25 | |||
User Comments: | ||||
nobody added on 2013-04-12 14:26:02:
fossil init test fossil open test echo. > a.Txt fossil add . fossil commit -m test ren a.Txt a.txt fossil add . => ADDED a.txt which is ok. fossil add . => ADDED a.txt "a.txt" will be mentionned everytime from now on. nobody added on 2013-04-13 12:14:23: This occurs because file names are case sensitive. Execute this command: fossil rename a.Txt a.txt and you will see this problem disappear. nobody added on 2013-04-14 11:30:45: Thanks for the info. But under Linux, change the case of an existing file and it will only be added once. Which is ok. Under Windows, it keeps getting added everytime. Which would make me think there is some case-related issue under Windows. jan.nijtmans added on 2013-04-16 10:05:11: Even though it's a minor bug, I think I found the cause. See [d0764530d3] for the suggested fix. The function vfile_scan() is documented to "Omit files named in VFILE", but this is not done case-insensitive on Windows. This also means that "fossil extras" and "fossil clean" need the --case-sensitive option, just like "fossil add" and "fossil addremove". Please evaluate. Does this change have any side-effects I didn't think of? nobody added on 2013-04-17 08:06:09: Thank you for the patch. I have made a few tests and it seems to work fine. Sorry to ask, but is this ok in add_cmd() ? if( caseSensitive ){ db_multi_exec( "CREATE INDEX IF NOT EXISTS vfile_pathname " " ON vfile(pathname COLLATE nocase)" ); } jan.nijtmans added on 2013-04-17 09:35:57: Fixed on trunk now. >Sorry to ask, but is this ok in add_cmd() ? Yes, I think it is: The index is only needed when case-sensitive is off. On Windows, "case-sensitive" should be always off, on Cygwin it should be switchable (which is done in [9359b41fd5]), but that's unrelated to this buglet. jan.nijtmans added on 2013-04-17 10:16:32: >Sorry to ask, but is this ok in add_cmd() ? Oops, you are right: the if expression should be opposite! Thanks for catching this! jan.nijtmans added on 2013-04-18 11:11:03: Fixed now |