On 10/4/2016 12:40 PM, Andy Bradford wrote:
Thus said Richard Hipp on Tue, 04 Oct 2016 12:15:58 -0400:
Does anybody know of a reasonable work-around?
What do other VCS do? Presumably CVS, SVN, Hg, Git, etc. have all
Wsupported indows for a long time. Do they just return a sensible error?
When we still used CVS around here, my recollection is that it simply
failed spectacularly due to a lack of testing returns from system calls
that "cannot fail". It wasn't the only problem we had with CVS. We
switched to fossil for lots of reasons, but at the time all of the other
choices seemed to be run by people with an attitude problem about Windows.
This is one of those bugaboos that is mostly ignored by the tools, and
that answer usually just works since eventually developers learn that
they can't use those names.
IMHO, using namespace tricks to create the files or folders with
reserved names will only result in additional mysterious failures and
pain for Windows users. No build systems or compilers will be using
those tricks, and even deleting the files later becomes a problem for
the user.
The best action would be to make sure that the failure to write the file
on a particular system gets a clear error message so the user knows who
to blame, and doesn't blame fossil.
A possible work-around would be to transform the name from a reserved
name to a working (but unexpected) name. Fossil would need to have a
setting to control that, and likely should provide configuration of what
transformation is done. We already do something sort of like that for
symbolic links, so there is that precedent. Just adding a tilde to the
basename would be enough to allow the checkout. The project's build
system or other automation would still be broken, of course.
(A single setting could be added. If missing, fossil acts as it does
now. If present, files that can't be opened are modified by appending
the content of the setting to their basename. No idea what happens if
you change that setting with a checkout open. It probably should be
versionable. The mapping would need to apply to all of fossil's
operations on that file or folder. This is beginning to sound like an
iceberg-like feature. One setting implies 100s of lines of code.)
Beyond that, the list of disallowed names is probably stable enough that
a warning on checkin could be made. But I strongly suspect the usual
response to that warning by a *nix user will be "#$*!@ Windows, I just
want to check in and go home" and the bad names will lurk until the
project gets ported.
I vaguely recall hearing that there was a major open source project that
had a folder named aux that was bit by this issue, and IIRC they
ultimately resolved it by renaming the folder to something that worked
on all platforms. I'm not recalling what project that was, though.
--
Ross Berteig r...@cheshireeng.com
Cheshire Engineering Corp. http://www.CheshireEng.com/
+1 626 303 1602
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users