[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue #1756 -- import doesn't handle svn:eol-style or svn:keywords

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-03-09 04:08:19 CET

Julian Foad <julianfoad@btopenworld.com> writes:

> I am voting -1 for this, due to the "repair" of line endings. For the
> other reasons mentioned below I would have voted "-0".
>
> A normal commit, via svn_wc_transmit_text_deltas, does not force
> repair of inconsistent line endings, but fails with an error. This
> patch to "import", on the other hand, silently "repairs" inconsistent
> line endings. I think that is the wrong thing for it to do, as I
> don't see any reason for it to behave differently from "commit".

First consider a file with consistent line endings, one that can be
committed. With the patch it can be imported and the result will be
the same as the commit, without the patch the import and commit will
be different.

Next consider a file with inconsistent line endings, one that cannot
be committed. The file can be imported with or without the patch, so
in both cases import is different from commit.

Thus the patch fixes the "normal" use case and makes commit and import
have the same behaviour. In the "abnormal" case commit and import are
different whether or not the patch is applied, the patch merely
changes the nature of the difference.

> This patch is on the fuzzy line between fix and enhancement. Lack of
> this patch only "allows malformed data" in the same way that any
> commit does if "svn:eol-style" and "svn:keywords" are not as intended.
> Behaviour without this patch is to preserve the file contents exactly.
> For these reasons I don't think there is a strong need to put this
> patch in 1.0.1.

Without the patch a Windows user who sets svn:eol-style set to native
via autoprops will get the wrong result when importing files with
consistent native line endings. I'd say this patch is quite clearly a
bug fix, with the side effect of modifying the already buggy behaviour
in a corner case.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 12 02:25:54 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.