[darcs-users] Line endings
Stephen J. Turnbull
stephen at xemacs.org
Mon Jul 7 19:05:44 UTC 2008
Disclaimer: I'm not a Darcs developer, but I do follow VCS development
on several mailing lists.
Levente Mészáros writes:
> I know that there are pre-hooks and post-hooks, which can be used to
> translate line endings, so that the repository always contains '\n',
> while the working copy of windows users will have '\r\n'. The problem
> is that there is no standard way of doing this on windows.
Well, that's the problem. *There is no standard way.* The fact that
this problem has existed since 1980 or so with no satisfactory
solution suggests there is no good way, don't you think? The best
that can be done is a site-by-site policy.
> Of course, one could require users to install dos2unix and unix2dos or
> something similar, but that seems to me ridiculous. On the other hand
> we could patch the darcs sources, but that would require users to
> download non-standard versions and we would be in the version hell.
> None of these are acceptable.
But the inflexible restrictions and general randomness of the Windows
development environment are? :-(
> svn handles the line endings pretty well compared to what darcs can
> offer.
Nonetheless, there are discussions going on at bazaar at canonical.com
regarding how bzr can do it better than svn because several developers
familiar with svn consider its behavior in that regard "unacceptable".
The mechanisms being proposed are complex, require human intervention
to classify many files, and IMO once implemented will prove quite
fragile in practice.
Also, from the discussion at bazaar at canonical.com, emulating svn
requires a notion of versioned file metadata (ie, svn "properties").
The bazaar folks are considering introducing those for other reasons,
with EOL convention being an important immediate application, but it
looks like a major project with uncertain implications. I don't think
Darcs has anything similar, so this would be a major change.
If I were sentenced to maintain a project where Windows was an
important part of our bread and butter, I think I would try declaring
the Windows versions the "official" ones, and require the Unix users
to deal with it. They are much better equipped as developers to
script around it, and most of their tools (both in the build chain and
interactive user tools like editors) are perfectly happy to deal with
CRLF as opposed to NL conventions for EOL anyway.
More information about the darcs-users
mailing list