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

Re: inconsistent newlines: "native" seems not to work

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2006-12-05 17:50:36 CET

On 12/5/06, Mattias Thorslund <mthorslund@activeagenda.net> wrote:
> Peter Mounce wrote:
> > Hello Gavin,
> >
> >> Quoth Mattias Thorslund:
> >>
> >>> One of my project developers is using Tortoise SVN, and receives the
> >>> "inconsistent newlines" error. His editor is XMLShell (really MSXML
> >>> 4.0), and all files he edits are XML files.
> >>>
> >>> The svn:eol-style property is "native" on the file on the Subversion
> >>> server. We've tried renaming the file that causes the error, and
> >>> doing a SVN Update (so that we'll get a fresh download of the file
> >>> from the server), but after editing, we still get the "inconsistent
> >>> newlines" ("Inconsistent line ending style") error.
> >>>
> >>> Is there something else that I am missing, or is the Windows CRLF
> >>> line-ending style not applies when svn:eol-style is "native"?
> >>>
> >> It sounds like the editor is changing the EOL style, perhaps only on
> >> some lines (some ill-mannered editors do this).
> >>
> >> Try throwing the file at a hex viewer/editor both before and after
> >> editing, and make sure that all your LFs have CRs. Most likely you'll
> >> find that on some lines you have LFs alone without CRs, indicating
> >> that the editor probably opened the file in binary mode rather than
> >> text mode. In this case, you should probably convert the file to
> >> LF-only, assuming that everybody using the file is using the same
> >> editor. Alternatively, get a better editor :)
> >
> >
> > Notepad2 has a nice feature that lets you normalise line-endings for a
> > whole file at once. File | Line Endings | [pick one]. It will also
> > show you which ones are currently there.
> >
>
> Thanks, both. I will examine the situation more closely, and also look
> for a better editor. Thanks for the tip about notepad2.
>
> I am still puzzled about how the situation arises. Am I misunderstanding
> the meaning of svn:eol-style "native"? Does it not mean that when I get
> the file from the server, the line endings get converted to the local
> format? So, on Windows, the file would have CRLF line ends, and a
> Windows native editor surely wouldn't insert any other kind of line
> ends...but then where did the inconsistency arise?

You understanc correctly on the SVN end. The editor is at fault here,
putting in the "wrong" EOL markers (inconsistent with the rest of the
file). Unfortunately, some editors aren't too bright.

SciTE is another great (and free) editor that can do the conversion
for you with one or 2 clicks. Plenty of "Windows native" editors will
support both LF and CRLF.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Tue Dec 5 17:50:43 2006

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