[darcs-users] Re: Whitespace in filenames

David Roundy droundy at abridgegame.org
Wed Aug 6 14:22:51 UTC 2003


On Mon, Aug 04, 2003 at 07:41:22AM -0700, Zack Brown wrote:
> Each file could have its "real" name, which darcs would be aware of in
> the same way it is now. But the filename created on disk would be derived
> by applying rules to the real name. These rules would be based on the
> filesystem involved. Adding support for a new filesystem would simply
> involve adding another rule-set to convert real filenames into
> filesystem-specific filenames (and back again for 'record' and
> 'push'). Users would specify their filesystem as a command-line argument
> where necessary.

I've thought about doing something like that, but I don't think doing it on
the fly would be a good idea at all.  It might be reasonable, if darcs gets
ported to a platform which doesn't support some very commonly used
character, but in general I think it's over-engineering, creating a complex
solution to a non-problem, which would be a bad thing.  The real solution
(as Peter mentioned) is using reasonable filenames and thinking ahead.

It's nice to try to keep people from accidentally making mistakes (like
creating two filenames differing only in case), but it isn't that hard to
use reasonable filenames, and any scheme involving escaping the filenames
(for example, replacing '\\' with some other character on windows machines)
is likely to confuse things.  Certainly determining on write how to escape
the filenames would be bad, since the filename escape function would need
to be a 1:1 mapping.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list