You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Aaron Turner <sy...@gmail.com> on 2010/07/05 22:43:37 UTC

svn add: Unrecognized line ending style

Maybe this started happening after upgrading to svn 1.6.12, but not
really sure about the timing, but all of a sudden I can't add any new
files to my svn repo on my Mac (10.6.4) because I'm getting
"Unrecognized line ending style" when I do an 'svn add'.

> file pcapinfo.c
pcapinfo.c: ASCII c program text

> xxd pcapinfo.c | head
0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in

As you can see, looks like a standard Unix text file to me, using line
feeds (0x0a).

In vim, I've done a ":w ++ff=unix" to force the file to unix text
format just to be sure, but still having the same problem.

-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
Yes.  The same Trac pre & post commit hooks I've been using for years.
 Btw, the svn server is still 1.6.9 and hasn't changed in months.

Honestly, I don't believe the hooks to be the problem, since the
problem happens when I run "svn add", NOT "svn commit".  Committing
changed files/properties works just fine.    Running "svn
--no-auto-props <file>" and then setting svn:eol-style = native seems
to work, but obviously is a PITA.

-Aaron


On Tue, Jul 6, 2010 at 3:12 AM, Nico Kadel-Garcia <nk...@gmail.com> wrote:
> Do you have some sort of upstream pre-commit or other hooks on your server?
>
> On Mon, Jul 5, 2010 at 6:43 PM, Aaron Turner <sy...@gmail.com> wrote:
>> Maybe this started happening after upgrading to svn 1.6.12, but not
>> really sure about the timing, but all of a sudden I can't add any new
>> files to my svn repo on my Mac (10.6.4) because I'm getting
>> "Unrecognized line ending style" when I do an 'svn add'.
>>
>>> file pcapinfo.c
>> pcapinfo.c: ASCII c program text
>>
>>> xxd pcapinfo.c | head
>> 0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
>> 0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
>> 0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
>> 0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
>> 0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
>> 0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
>> 0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
>> 0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
>> 0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
>> 0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in
>>
>> As you can see, looks like a standard Unix text file to me, using line
>> feeds (0x0a).
>>
>> In vim, I've done a ":w ++ff=unix" to force the file to unix text
>> format just to be sure, but still having the same problem.

-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
Do you have some sort of upstream pre-commit or other hooks on your server?

On Mon, Jul 5, 2010 at 6:43 PM, Aaron Turner <sy...@gmail.com> wrote:
> Maybe this started happening after upgrading to svn 1.6.12, but not
> really sure about the timing, but all of a sudden I can't add any new
> files to my svn repo on my Mac (10.6.4) because I'm getting
> "Unrecognized line ending style" when I do an 'svn add'.
>
>> file pcapinfo.c
> pcapinfo.c: ASCII c program text
>
>> xxd pcapinfo.c | head
> 0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
> 0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
> 0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
> 0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
> 0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
> 0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
> 0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
> 0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
> 0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
> 0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in
>
> As you can see, looks like a standard Unix text file to me, using line
> feeds (0x0a).
>
> In vim, I've done a ":w ++ff=unix" to force the file to unix text
> format just to be sure, but still having the same problem.
>
> --
> Aaron Turner
> http://synfin.net/         Twitter: @synfinatic
> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
> Those who would give up essential Liberty, to purchase a little temporary
> Safety, deserve neither Liberty nor Safety.
>    -- Benjamin Franklin
> "carpe diem quam minimum credula postero"
>

Re: svn add: Unrecognized line ending style

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Thu, 8 Jul 2010 at 17:32 -0000:
> And of course the "stack trace" yields a patch:

Committed as r961970.

@stsp, thanks for the feedback.

Daniel

Re: svn add: Unrecognized line ending style

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Aaron Turner wrote on Thu, 8 Jul 2010 at 19:14 -0000:
> On Thu, Jul 8, 2010 at 1:22 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > Aaron Turner wrote on Wed, 7 Jul 2010 at 18:12 -0000:
> >> On Wed, Jul 7, 2010 at 12:34 AM, Johan Corveleyn <jc...@gmail.com> wrote:
> >> > On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
> >> >> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
> >> >>
> >> >> Honestly, I'm 99.9% sure that this problem started after upgrading to
> >> >> 1.6.12... nothing else changed that I can think of.
> >> >
> >> > I quickly checked the relevant section in the svn book:
> >> >
> >> > http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config
> >> >
> >> > which says that multiple properties must by semi-colon-delimited ("It
> >> > contains any number of key-value pairs in the format PATTERN =
> >> > PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
> >> > comma-delimited, so maybe that's the problem. Maybe the parser of the
> >> > autoprops was more tolerant before 1.6.12?
> >>
> >>
> >> Bingo. That was it.  Thanks for solving that mystery!
> >>
> >
> > For the record, I can't reproduce it with trunk:
> >
> > % svn add iota3 --config-option=config:auto-props:*.c="svn:eol-style=native, svn:keywords=Id"
> > A         iota3
> > %
> 
> You need to add a .c file :)  It only breaks if the filename matches the rule.
> 

% svn add --config-option=config:auto-props:*.c="svn:eol-style=native, svn:keywords=Id" f.c
..\..\..\subversion\svn\add-cmd.c:84: (apr_err=135001)
..\..\..\subversion\svn\util.c:961: (apr_err=135001)
..\..\..\subversion\libsvn_client\add.c:625: (apr_err=135001)
..\..\..\subversion\libsvn_client\add.c:535: (apr_err=135001)
..\..\..\subversion\libsvn_client\add.c:335: (apr_err=135001)
..\..\..\subversion\libsvn_wc\props.c:2448: (apr_err=135001)
..\..\..\subversion\libsvn_wc\props.c:2448: (apr_err=135001)
..\..\..\subversion\libsvn_wc\props.c:2615: (apr_err=135001)
svn: Unrecognized line ending style for 'C:\tmp\svn\wc1\trunk\f.c'

(where f.c is an empty file)


And of course the "stack trace" yields a patch:


[[[
Index: subversion/libsvn_wc/props.c
===================================================================
--- subversion/libsvn_wc/props.c	(revision 958675)
+++ subversion/libsvn_wc/props.c	(working copy)
@@ -2613,7 +2613,8 @@ svn_wc_canonicalize_svn_prop(const svn_string_t **
       svn_subst_eol_style_from_value(&eol_style, &ignored_eol, new_value->data);
       if (eol_style == svn_subst_eol_style_unknown)
         return svn_error_createf(SVN_ERR_IO_UNKNOWN_EOL, NULL,
-                                 _("Unrecognized line ending style for '%s'"),
+                                 _("Unrecognized line ending style '%s' for '%s'"),
+                                 new_value->data,
                                  svn_dirent_local_style(path, pool));
       SVN_ERR(validate_eol_prop_against_file(path, getter, getter_baton,
                                              pool));
]]]

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
On Thu, Jul 8, 2010 at 1:22 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Aaron Turner wrote on Wed, 7 Jul 2010 at 18:12 -0000:
>> On Wed, Jul 7, 2010 at 12:34 AM, Johan Corveleyn <jc...@gmail.com> wrote:
>> > On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
>> >> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
>> >>
>> >> Honestly, I'm 99.9% sure that this problem started after upgrading to
>> >> 1.6.12... nothing else changed that I can think of.
>> >
>> > I quickly checked the relevant section in the svn book:
>> >
>> > http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config
>> >
>> > which says that multiple properties must by semi-colon-delimited ("It
>> > contains any number of key-value pairs in the format PATTERN =
>> > PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
>> > comma-delimited, so maybe that's the problem. Maybe the parser of the
>> > autoprops was more tolerant before 1.6.12?
>>
>>
>> Bingo. That was it.  Thanks for solving that mystery!
>>
>
> For the record, I can't reproduce it with trunk:
>
> % svn add iota3 --config-option=config:auto-props:*.c="svn:eol-style=native, svn:keywords=Id"
> A         iota3
> %

You need to add a .c file :)  It only breaks if the filename matches the rule.

-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jul 08, 2010 at 11:22:18AM +0300, Daniel Shahaf wrote:
> For the record, I can't reproduce it with trunk:
> 
> % svn add iota3 --config-option=config:auto-props:*.c="svn:eol-style=native, svn:keywords=Id"
> A         iota3
> %

And what do the resulting properties look like?

Stefan

Re: svn add: Unrecognized line ending style

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Aaron Turner wrote on Wed, 7 Jul 2010 at 18:12 -0000:
> On Wed, Jul 7, 2010 at 12:34 AM, Johan Corveleyn <jc...@gmail.com> wrote:
> > On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
> >> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
> >>
> >> Honestly, I'm 99.9% sure that this problem started after upgrading to
> >> 1.6.12... nothing else changed that I can think of.
> >
> > I quickly checked the relevant section in the svn book:
> >
> > http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config
> >
> > which says that multiple properties must by semi-colon-delimited ("It
> > contains any number of key-value pairs in the format PATTERN =
> > PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
> > comma-delimited, so maybe that's the problem. Maybe the parser of the
> > autoprops was more tolerant before 1.6.12?
> 
> 
> Bingo. That was it.  Thanks for solving that mystery!
> 

For the record, I can't reproduce it with trunk:

% svn add iota3 --config-option=config:auto-props:*.c="svn:eol-style=native, svn:keywords=Id"
A         iota3
%

> 
> 

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
On Wed, Jul 7, 2010 at 12:34 AM, Johan Corveleyn <jc...@gmail.com> wrote:
> On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
>> On Tue, Jul 6, 2010 at 10:34 PM, Henrik Sundberg <st...@gmail.com> wrote:
>>> On Wed, Jul 7, 2010 at 7:06 AM, Aaron Turner <sy...@gmail.com> wrote:
>>>>> echo "hi" >foo.c
>>>>> svn add foo.c
>>>> svn: Unrecognized line ending style for 'foo.c'
>>>>
>>>>> echo -n "hi" >foo.c
>>>>> svn add foo.c
>>>> svn: Unrecognized line ending style for 'foo.c'
>>>>
>>>>> echo "hi" >foo
>>>>> svn add foo
>>>> A         foo
>>>>
>>>> Ideas anyone?
>>>
>>> What does your autoprops configuration for c files look like?
>>> Is the value for line ending style misspelled?
>>> (no erroneous value is set for the non-c file)
>>>
>>> /$
>>
>>
>> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
>>
>> Honestly, I'm 99.9% sure that this problem started after upgrading to
>> 1.6.12... nothing else changed that I can think of.
>
> I quickly checked the relevant section in the svn book:
>
> http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config
>
> which says that multiple properties must by semi-colon-delimited ("It
> contains any number of key-value pairs in the format PATTERN =
> PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
> comma-delimited, so maybe that's the problem. Maybe the parser of the
> autoprops was more tolerant before 1.6.12?


Bingo. That was it.  Thanks for solving that mystery!


-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Wed, Jul 7, 2010 at 3:34 AM, Johan Corveleyn <jc...@gmail.com> wrote:
> On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
>> On Tue, Jul 6, 2010 at 10:34 PM, Henrik Sundberg <st...@gmail.com> wrote:
>>> On Wed, Jul 7, 2010 at 7:06 AM, Aaron Turner <sy...@gmail.com> wrote:
>>>>> echo "hi" >foo.c
>>>>> svn add foo.c
>>>> svn: Unrecognized line ending style for 'foo.c'
>>>>
>>>>> echo -n "hi" >foo.c
>>>>> svn add foo.c
>>>> svn: Unrecognized line ending style for 'foo.c'
>>>>
>>>>> echo "hi" >foo
>>>>> svn add foo
>>>> A         foo
>>>>
>>>> Ideas anyone?
>>>
>>> What does your autoprops configuration for c files look like?
>>> Is the value for line ending style misspelled?
>>> (no erroneous value is set for the non-c file)
>>>
>>> /$
>>
>>
>> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
>>
>> Honestly, I'm 99.9% sure that this problem started after upgrading to
>> 1.6.12... nothing else changed that I can think of.
>
> I quickly checked the relevant section in the svn book:
>
> http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config
>
> which says that multiple properties must by semi-colon-delimited ("It
> contains any number of key-value pairs in the format PATTERN =
> PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
> comma-delimited, so maybe that's the problem. Maybe the parser of the
> autoprops was more tolerant before 1.6.12?

Ouch. That would make sense, and indicate that the error message is
being quite misleading. Subversion error handling is sometimes.....
fascinating, with an occasional tendency for processing to handle
valid cases and not provide any fallthrough handling for invalid
cases. This sounds like one of those, where a misparsed autoprops has
fallen through to an entirely different chunk of code.

Re: svn add: Unrecognized line ending style

Posted by Johan Corveleyn <jc...@gmail.com>.
On Wed, Jul 7, 2010 at 7:57 AM, Aaron Turner <sy...@gmail.com> wrote:
> On Tue, Jul 6, 2010 at 10:34 PM, Henrik Sundberg <st...@gmail.com> wrote:
>> On Wed, Jul 7, 2010 at 7:06 AM, Aaron Turner <sy...@gmail.com> wrote:
>>>> echo "hi" >foo.c
>>>> svn add foo.c
>>> svn: Unrecognized line ending style for 'foo.c'
>>>
>>>> echo -n "hi" >foo.c
>>>> svn add foo.c
>>> svn: Unrecognized line ending style for 'foo.c'
>>>
>>>> echo "hi" >foo
>>>> svn add foo
>>> A         foo
>>>
>>> Ideas anyone?
>>
>> What does your autoprops configuration for c files look like?
>> Is the value for line ending style misspelled?
>> (no erroneous value is set for the non-c file)
>>
>> /$
>
>
> *.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date
>
> Honestly, I'm 99.9% sure that this problem started after upgrading to
> 1.6.12... nothing else changed that I can think of.

I quickly checked the relevant section in the svn book:

http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html#svn.advanced.confarea.opts.config

which says that multiple properties must by semi-colon-delimited ("It
contains any number of key-value pairs in the format PATTERN =
PROPNAME=VALUE[;PROPNAME=VALUE ...]"). In your config file it's
comma-delimited, so maybe that's the problem. Maybe the parser of the
autoprops was more tolerant before 1.6.12?

Cheers,
-- 
Johan

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
On Tue, Jul 6, 2010 at 10:34 PM, Henrik Sundberg <st...@gmail.com> wrote:
> On Wed, Jul 7, 2010 at 7:06 AM, Aaron Turner <sy...@gmail.com> wrote:
>>> echo "hi" >foo.c
>>> svn add foo.c
>> svn: Unrecognized line ending style for 'foo.c'
>>
>>> echo -n "hi" >foo.c
>>> svn add foo.c
>> svn: Unrecognized line ending style for 'foo.c'
>>
>>> echo "hi" >foo
>>> svn add foo
>> A         foo
>>
>> Ideas anyone?
>
> What does your autoprops configuration for c files look like?
> Is the value for line ending style misspelled?
> (no erroneous value is set for the non-c file)
>
> /$


*.c = svn:eol-style=native, svn:keywords=Id HeadURL Author Rev Date

Honestly, I'm 99.9% sure that this problem started after upgrading to
1.6.12... nothing else changed that I can think of.

-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Henrik Sundberg <st...@gmail.com>.
On Wed, Jul 7, 2010 at 7:06 AM, Aaron Turner <sy...@gmail.com> wrote:
>> echo "hi" >foo.c
>> svn add foo.c
> svn: Unrecognized line ending style for 'foo.c'
>
>> echo -n "hi" >foo.c
>> svn add foo.c
> svn: Unrecognized line ending style for 'foo.c'
>
>> echo "hi" >foo
>> svn add foo
> A         foo
>
> Ideas anyone?

What does your autoprops configuration for c files look like?
Is the value for line ending style misspelled?
(no erroneous value is set for the non-c file)

/$

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
On Tue, Jul 6, 2010 at 9:35 AM, Aaron Turner <sy...@gmail.com> wrote:
> On Tue, Jul 6, 2010 at 6:18 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>> Aaron Turner wrote on Tue, 6 Jul 2010 at 01:43 -0000:
>>> Maybe this started happening after upgrading to svn 1.6.12, but not
>>> really sure about the timing, but all of a sudden I can't add any new
>>> files to my svn repo on my Mac (10.6.4) because I'm getting
>>> "Unrecognized line ending style" when I do an 'svn add'.
>>>
>>> > file pcapinfo.c
>>> pcapinfo.c: ASCII c program text
>>>
>>> > xxd pcapinfo.c | head
>>> 0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
>>> 0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
>>> 0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
>>> 0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
>>> 0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
>>> 0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
>>> 0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
>>> 0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
>>> 0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
>>> 0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in
>>>
>>> As you can see, looks like a standard Unix text file to me, using line
>>> feeds (0x0a).
>>>
>>> In vim, I've done a ":w ++ff=unix" to force the file to unix text
>>> format just to be sure, but still having the same problem.
>>>
>>
>> Can you please check the file for CR characters?
>>
>> xxd -ps -c1 pcapinfo.c | grep -i 0d
>
> There aren't any CR/0x0d characters.

Ok, this is just insane:

> echo "hi" >foo.c
> svn add foo.c
svn: Unrecognized line ending style for 'foo.c'

> echo -n "hi" >foo.c
> svn add foo.c
svn: Unrecognized line ending style for 'foo.c'

> echo "hi" >foo
> svn add foo
A         foo

Ideas anyone?

-Aaron


-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Aaron Turner <sy...@gmail.com>.
On Tue, Jul 6, 2010 at 6:18 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Aaron Turner wrote on Tue, 6 Jul 2010 at 01:43 -0000:
>> Maybe this started happening after upgrading to svn 1.6.12, but not
>> really sure about the timing, but all of a sudden I can't add any new
>> files to my svn repo on my Mac (10.6.4) because I'm getting
>> "Unrecognized line ending style" when I do an 'svn add'.
>>
>> > file pcapinfo.c
>> pcapinfo.c: ASCII c program text
>>
>> > xxd pcapinfo.c | head
>> 0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
>> 0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
>> 0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
>> 0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
>> 0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
>> 0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
>> 0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
>> 0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
>> 0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
>> 0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in
>>
>> As you can see, looks like a standard Unix text file to me, using line
>> feeds (0x0a).
>>
>> In vim, I've done a ":w ++ff=unix" to force the file to unix text
>> format just to be sure, but still having the same problem.
>>
>
> Can you please check the file for CR characters?
>
> xxd -ps -c1 pcapinfo.c | grep -i 0d

There aren't any CR/0x0d characters.


-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

Re: svn add: Unrecognized line ending style

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Aaron Turner wrote on Tue, 6 Jul 2010 at 01:43 -0000:
> Maybe this started happening after upgrading to svn 1.6.12, but not
> really sure about the timing, but all of a sudden I can't add any new
> files to my svn repo on my Mac (10.6.4) because I'm getting
> "Unrecognized line ending style" when I do an 'svn add'.
> 
> > file pcapinfo.c
> pcapinfo.c: ASCII c program text
> 
> > xxd pcapinfo.c | head
> 0000000: 2f2a 2024 4964 2420 2a2f 0a0a 2369 6e63  /* $Id$ */..#inc
> 0000010: 6c75 6465 2022 636f 6e66 6967 2e68 220a  lude "config.h".
> 0000020: 2369 6e63 6c75 6465 2022 6465 6669 6e65  #include "define
> 0000030: 732e 6822 0a23 696e 636c 7564 6520 2263  s.h".#include "c
> 0000040: 6f6d 6d6f 6e2e 6822 0a0a 2369 6e63 6c75  ommon.h"..#inclu
> 0000050: 6465 203c 6663 6e74 6c2e 683e 0a23 696e  de <fcntl.h>.#in
> 0000060: 636c 7564 6520 3c73 7973 2f74 7970 6573  clude <sys/types
> 0000070: 2e68 3e0a 2369 6e63 6c75 6465 203c 7379  .h>.#include <sy
> 0000080: 732f 7569 6f2e 683e 0a23 696e 636c 7564  s/uio.h>.#includ
> 0000090: 6520 3c75 6e69 7374 642e 683e 0a23 696e  e <unistd.h>.#in
> 
> As you can see, looks like a standard Unix text file to me, using line
> feeds (0x0a).
> 
> In vim, I've done a ":w ++ff=unix" to force the file to unix text
> format just to be sure, but still having the same problem.
> 

Can you please check the file for CR characters?

xxd -ps -c1 pcapinfo.c | grep -i 0d

>