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

Re: bug related to svn:eol-style and inconsistent eol

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-02-06 01:18:16 CET

On Feb 5, 2007, at 16:53, Jeff Smith wrote:

> Has anyone mentioned this as a known bug?
> I try to 'add' a source tree with auto-props (svn:eol-style=native).
> It turns out the file has "Inconsistent line ending style". The bug
> is that it did add it anyway, even though it aborted and did not add
> the rest of the files.
>
> # svn add main.c
> svn: File 'main.c' has inconsistent newlines
> svn: Inconsistent line ending style
> # svn st
> A main.c

I searched the issue tracker for "inconsistent" and again for "add"
and did not see a title that seemed to be related. Please submit it
to the issue tracker, being sure to link back to this email thread:

http://svn.haxx.se/users/archive-2007-02/0246.shtml

The issue only occurs when auto-props are set up to assign svn:eol-
style to the given filename extension. (In my example, auto-props are
configured with "*.php = svn:eol-style=LF".)

Reproduction recipe:

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
Checked out revision 0.
$ perl -e 'print "foo\nbar\r\nbaz\n";' > wc/mixed.php
$ touch wc/nothing.php
$ svn add wc/mixed.php wc/nothing.php
svn: File 'wc/mixed.php' has inconsistent newlines
svn: Inconsistent line ending style
$ svn st wc
? wc/nothing.php
A wc/mixed.php
$ svn proplist -v wc/mixed.php
$

If this is supposed to be a fatal error, it should not add mixed.php.
OTOH, if it's not a fatal error, then it should not stop after one
file; it should also have added nothing.php. I believe the former to
be what was intended, based on the following:

If we do not have auto-props set up, then the svn add of course
succeeds. Then we can attempt to set the properties ourselves, and
again it fails:

$ svn propset svn:eol-style LF wc/mixed.php wc/nothing.php
svn: File 'wc/mixed.php' has inconsistent newlines
svn: Inconsistent line ending style
$ svn proplist -v wc/mixed.php wc/nothing.php
$

The difference in this scenario is that an error message has been
printed, and no action has been performed, which is what one might
expect, versus the behavior above with auto-props, where an error is
printed, yet an action (the add) has been performed, which is
unexpected.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 6 01:18:38 2007

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