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

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

From: Andrey Repin <anrdaemon_at_freemail.ru>
Date: Tue, 7 Apr 2009 03:20:54 +0400

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.

> 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.

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)

 Andrey Repin (anrdaemon_at_freemail.ru) 07.04.2009, <3:07>
Sorry for my terrible english...
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-07 01:25:58 CEST

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