You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jeff Smith <js...@robotronics.com> on 2007/02/05 22:53:45 UTC

bug related to svn:eol-style and inconsistent eol

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Ryan Schmidt <su...@ryandesign.com>.
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

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

Posted by Jeff Smith <js...@robotronics.com>.
On Monday 05 February 2007 17:30, Ryan Schmidt wrote:
> 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".)

Thank you Ryan, although I'm not going bother submitting anything if 
I've been banned from the Subversion mailing list. How can I tell if 
I am? My email might just be not working.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Jeff Smith <js...@robotronics.com>.
Oh good I'm not banned :) It just started working.
Maybe my emails from yesterday will show up now also.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Jeff Smith <js...@robotronics.com>.
On Monday 05 February 2007 17:30, Ryan Schmidt wrote:
> On Feb 5, 2007, at 16:53, Jeff Smith wrote:
> > # 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:

I've finally submitted the issue [kept having other nagging tasks]
http://subversion.tigris.org/issues/show_bug.cgi?id=2713

I hope it works out, I'm not very experienced with these bug-reporting 
systems.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Jared Silva <ja...@gmail.com>.
I feel this also applies to svn_apply_autoprops.py.

Line 139, "sys.exit(1)", should be removed.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Frodak <fr...@yahoo.com>.
--- Jeff Smith <js...@robotronics.com> 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
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> users-help@subversion.tigris.org
> 
> 

I see it too.  The behavior of svn version 1.4.2
(r22196) is:
When adding multiple files with --auto-props it adds
the file and then sets the svn:eol-style property.  If
the svn:eol-style can't be set due to mixed EOLs then
processing immediately stops.  This leaves you in a
state where:

$ svn add file_*.txt --auto-props
A         file_1.txt
A         file_2.txt
svn: File 'file_3.txt' has inconsistent newlines
svn: Inconsistent line ending style


$ svn stat
A      file_1.txt
A      file_2.txt
A      file_3.txt
?      file_4.txt
?      file_5.txt

$ svn pl -v file_*.txt
Properties on 'file_1.txt':
  svn:eol-style : native
Properties on 'file_2.txt':
  svn:eol-style : native
svn: warning: 'file_4.txt' is not under version
control
svn: warning: 'file_5.txt' is not under version
control




 
____________________________________________________________________________________
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org