|Title:||Uppercase/lowercase issue on Windows|
|Last Modified:||2015-02-17 02:15:15|
|Version Found In:||1.30 (and probably earlier)|
nobody added on 2014-12-08 22:25:58:
<b>Prerequisite:</b><br> Usage of fossil under Microsoft Windows, where case sensitivity is disabled by default. <b>Problem description:</b><br> 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. <b>More information:</b><br> * The issue was originally discussed here: [http://firstname.lastname@example.org/msg18217.html|message on mailing list] * A "minimum example" repository which demonstrates the problem is available here: [http://ge.tt/2FYa9K52/v/0|demo repository] <b>Problem recreation:</b><br> The following code (save as a batch file under Windows, with ".cmd" file extension) creates the repository linked above. <code> <verbatim> @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 </verbatim> </code>
drh added on 2014-12-10 12:47:22: (text/x-fossil-wiki)
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.