Ben Coburn wrote:
You are right, I had not thought this through quite far enough.... Even
if pristine was always case sensitive collisions could happen in the
working directory.
Does darcs detect and warn about these kind of collisions when run on
case insensitive file systems? If not, the pristine index could make it
simpler to check for possible collisions.
Indeed. I think that having pristine be case-insensitive here is the
important part because it's more "critical" to Darcs. Pristine
collisions can be a lot more impacting than working copy collisions.
For instance, maybe a Windows dev never needs to touch makefile or
Makefile, but all of the important files aren't collisions and therefore
accessible. If the repository doesn't even need a working directory (as
discussed elsewhere), collisions don't matter.
Once the pristine cache is saved from these collisions I'm betting it
would be even easier to save the working directory collision free.
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". There's a little bit
of extra mental effort between cross-platform developers, but hopefully
it shouldn't be much of one: most case-sensitive platforms (and
particularly Windows) are case-preserving so that even though one of the
files has a slightly different name, it still looks close enough to the
original name. Then you just have darcs translate from the "Makefile1"
to "Makefile" when generating patches and so forth, and it can figure
that out from the pristine index that "Makefile1" has a case-sensitive
name...
It sounds like a decent solution to me.
--
--Max Battcher--
http://www.worldmaker.net/
_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel