View Ticket
Not logged in
Ticket UUID: 36cb6b45fd9d31f6bc4bd4ad87f18aad50e5bce9
Title: in windows, fossil allows addition of the same file twice
Status: Open Type: Feature_Request
Severity: Minor Priority:
Subsystem: Resolution: Open
Last Modified: 2009-10-16 14:36:30
Version Found In: 076f7adff2
Description & Comments:
in windows, the file system is case insensitive. fossil allows the addition of the same file twice differing only by case. both files show up in the ui but technically they are versioned separately even though they are the same file on disk; it is unclear which artifact dominates on fossil open/update.
PS C:\fossil> fossil new test.f
project-id: 24ac0462f2082e82bcdf2de26ceb3c38aaffcfe4
server-id:  0b879e4b0baa36b4da40631bf54866f3ae825323
admin-user: rwilso20 (initial password is "ab6ad5")
PS C:\fossil> md test
PS C:\fossil> cd test
PS C:\fossil\test> fossil open ..\test.f
PS C:\fossil\test> notepad camelCase.txt
PS C:\fossil\test> fossil add camelCase.txt
ADDED  camelCase.txt
PS C:\fossil\test> fossil add camelcase.txt
ADDED  camelcase.txt
PS C:\fossil\test> fossil commit
notepad "C:/fossil/test/ci-comment-09044B4972BB.txt"
'gpg' is not recognized as an internal or external command,
operable program or batch file.
unable to sign manifest.  continue y/N? y
New_Version: b06866048f0a6cdf50573ef9e7767bb6fa4449db
PS C:\fossil\test> fossil ls
UNCHANGED camelCase.txt
UNCHANGED camelcase.txt
PS C:\fossil\test> fossil ver
This is fossil version 076f7adff2 2009-10-13 16:25:41 UTC
PS C:\fossil\test>

drh added on 2009-10-16 14:36:30:
Case-folding is locale-dependent (See, for example, http://userguide.icu-project.org/transforms/casemappings) and is enormously complicated. We do not want to go there.

I suppose it does make sense to issue warnings if fossil detects possible conflicts in filenames. This can be done easily enough for ASCII. But because the problem is all but unsolvable for full unicode, the change should be to add warnings only, and then only for ASCII. Some users may actually want to store files whose names differ only in case and we don't want to have to go through all of the complication to try to figure out unicode case folding.

I am changing this ticket to a feature request.