Fossil

View Ticket
Login
Ticket UUID: d6d16fe1aa586c310a8f785d3cb27183212d9854
Title: Uppercase/lowercase issue on Windows
Status: Closed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Wont_Fix
Last Modified: 2015-02-17 02:15:15
Version Found In: 1.30 (and probably earlier)
User Comments:
nobody added on 2014-12-08 22:25:58:

Prerequisite:
Usage of fossil under Microsoft Windows, where case sensitivity is disabled by default.

Problem description:
When the name of a directory is changed by just altering some characters from lowercase to uppercase (or vice versa), the outputs of the timeline and files listings look strange, showing a wild mix of files in a directory with the old name and in a directory with the new name. Both directory names may show up several times in an alternating manner which is not only confusing to the user but does not reflect the actual situation in the file system itself. This is valid even when looking at just a single check-in, e.g. trunk, not the "all" files link.

It appears that fossil is (at least partially) aware of both the old and the new names and differentiates them internally where it shouldn't do so (or where it should use just the new name), leading to the mangled output. Assumption(!): the actual files are simply listed alphabetically, but as some of them "belong" to the previous directory name, and others are linked to the new name, both names are unnecessarily inserted as hierarchy elements on each switch between both.

More information:

Problem recreation:
The following code (save as a batch file under Windows, with ".cmd" file extension) creates the repository linked above.

@echo off
rem The following script was provided by Ross Berteig. Thanks!

rem Run this in an empty folder where it is safe to create and use a
rem fossil repository.
fossil new abc.fossil
fossil open abc.fossil
mkdir A
cd A
echo a >a.txt
echo c >c.txt
echo e >e.txt
echo g >g.txt
echo i >i.txt
fossil add *
fossil ci --no-warnings -m "Uppercase A" --tag "UPPERCASE"
cd ..

rem Rename "A" to "a" via an intermediate name since batch files
rem apparently can't do that in one step.
move A b
move b a

rem Attempt to simply tell fossil about the name change. This fails.
fossil rename A a

cd a
echo b >b.txt
echo d >d.txt
echo f >f.txt
echo h >h.txt
echo i >i.txt

fossil add *
fossil ci --no-warnings -m "Lowercase A" --tag "lowercase"
cd ..

echo Note that both "A" and "a" are present
fossil ls

echo Now look at the Timeline and Files pages
fossil ui
pause


drh added on 2014-12-10 12:47:22:

I don't have any idea how to fix this on Windows without simultaneously breaking it on Unix. My advice: always use the same capitalization on Windows.


Attachments: