Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: svn diff shows entire file as modified after add 1 character

subversion
Discussion topic

Back to topic list

Re: svn diff shows entire file as modified after add 1 character

Author levyam
Full name Andy Levy
Date 2009-04-06 17:13:33 PDT
Message On Mon, Apr 6, 2009 at 19:20, Andrey Repin <anrdaemon at freemail dot ru> wrote:
> Greetings, Thornock, Brian (Brian)!
>
>> The "svn diff" command seems to be inconsistent across various files in my Java repository.
>> I imported several java files from ClearCase into a Subversion repository. The "eol-style" property is set to "native".
>
> Don't use "native" ever :) it's a way to confusion, and you just ran into it.

Native works perfectly fine, provided you don't have an editor which
tries to "help" by messing with EOL characters itself and instead just
makes things worse.

>> For me to reproduce, I test with 2 files in the same package and directory:
>> *I checkout the repository: svn co http://svn/repos/trunk  ./code-devel
>> *svn diff TestClient.java = reports no change
>> *Open TestClient.java in VI, add a single line in the header comment section
>> *svn diff TestClient.java = shows the diff with the 1 extra line
>
>> *svn diff TestConnector.java = reports no change
>> *Open TestConnector.java in VI, add a single line in the header comment section
>> *svn diff TestConnector.java = reports every line changed
>
>> There are about 20 files scattered throughout our base in various packages that have this weird problem where once you change something in the file, every line says it's modified. Even if I delete
>> the line, it still reports every line as modified; I have to svn revert these 20 files. All the other files behave as expected.
>
> Your diff showing changes in EOL style as (actual) changes in file.
> (Addition/Removal of <CR> character most likely.)
> It is indication that your editor do not agree with your SVN client on
> nativity of given EOL marks.
> Try
>
> svn diff -x -b .../file
>
> This should give results equal to the --ignore-eol-style, just in more clear
> way. (Assuming you know the meaning of -b switch) ;)
>
> For myself, I always use LF only, except when I sure know it would harm the
> results. (I.e. windows batch files)
>
>
> --
> WBR,
>  Andrey Repin (anrdaemon at freemail dot ru) 07.04.2009, <3:07>
>
> Sorry for my terrible english...
>
> --------------------​--------------------​--------------
> http://subversion.ti​gris.org/ds/viewMess​age.do?dsForumId=106​5&dsMessageId=15​67353
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@s​ubversion.tigris.org​].
>

« Previous message in topic | 3 of 5 | Next message in topic »

Messages

Show all messages in topic

svn diff shows entire file as modified after add 1 character "Thornock, Brian (Brian)" <bthornock at avaya dot com> "Thornock, Brian (Brian)" <bthornock at avaya dot com> 2009-04-06 14:38:45 PDT
     Re: svn diff shows entire file as modified after add 1 character Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-06 16:25:05 PDT
         Re: svn diff shows entire file as modified after add 1 character levyam Andy Levy 2009-04-06 17:13:33 PDT
             Re: svn diff shows entire file as modified after add 1 character Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-07 04:50:03 PDT
     Re: svn diff shows entire file as modified after add 1 character ryandesign Ryan Schmidt 2009-04-06 18:12:16 PDT
Messages per page: