[darcs-devel] Filesystem in DB, but data in filesystem

Max Battcher me at worldmaker.net
Tue Jul 31 00:03:36 PDT 2007


Salvatore Insalaco wrote:
> 2007/7/30, Eric Y. Kow <eric.kow at gmail.com>:
>>> What about adding a "case-insensitive name" field (in addition to
>>> "canonical name", and "pristine name") to the pristine index?  So on
>>> Unix you might have "Makefile" and "makefile" as the canonical names
>>> (referred to pristine names like 1.dat or 233.dat) and then add in
>>> case-insensitive names "makefile" and "Makefile1".
>> A similar kind of scheme might help with the Windows tricky filename
>> issue.
> 
> The biggest issue with case-insensitivity in pristine is that if there
> was a filename "conflict", any time in project history, even maybe in
> patch 1 and corrected in patch 2, a case-insensitive user cannot pull
> the repository (there's a bug on the bug reporter about this I think,
> on the GHC tree).
> Having case-insensitivity in working dir is much less a problem: we
> can just detect and complain or doing something "smart" as renaming
> the file, and it concerns only the last "revision" of the source code.

Which is what the two quoted posts said, albeit my terminology may have 
been confusing, which is why I'm wondering if you didn't catch that. 
Basically, I was pointing out that the Pristine index file may be 
precisely the place to add in the "Patch Name" (Canonical) to "Working 
Name" indirection by storing both the name used in patches (Canonical or 
Patch Name) and the name used in the working directory.

To reiterate: For example, patches from a Unix dev would refer to 
"makefile" and "Makefile" but when encountered in a Windows machine the 
Pristine index makes a note that "Makefile" conflicts with the existing 
"makefile" and gives "Makefile" a working name of "Makefile.1".  ``list 
files`` and ``record`` and ``whatsnew`` could all show the "Makefile.1" 
name, but annotating the patch reveals that it is actually stored under 
the original Unix name.  Eric pointed out that the same can be done with 
things like "COM1" -> "COM.1".

I'm curious if this might even be a possible place to implement the "No 
Working Directory" repository idea, as well, by simply allowing the 
Pristine index to note that the working name for a file does not exist. 
  (This would have to be something multi-state like empty for the 
default/pristine name, some value in the case of a rename, and something 
like "!" or "$" to represent that no-working copy should exist.)

-- 
--Max Battcher--
http://www.worldmaker.net/


More information about the darcs-devel mailing list