You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Eramo, Mark" <me...@hbs.edu> on 2010/02/19 16:40:19 UTC

SVN DIFF QUESTION

Hello,

I am trying to diff the trunk and a specific tag of a project in SVN to get a list of files that have changed AND a list of any new files
that were added to the trunk since the tag but I am not able to get the same results as with CVS diff.

For example, I add a new java file to the trunk.

I then run the following diff command (code path has been removed *** )

svn diff $SVNROOT/project/***/trunk/ $SVNROOT/project/***/tags/v2_3_4/

It produces results showing the new file as follows:

Index: java/***/Item-NEW.java
===================================================================

--- java/***/Item-NEW.java       (.../trunk)             (revision 100089)
+++ java/**/Item-NEW.java        (.../tags/v2_3_4)       (revision 100089)

So it shows the file change but it does not show the file as being new to the trunk (or does it?). Anyway, it is not easy to distinguish if it was updated or added.

If I were to do a cvs diff, it would produce results like this.

diffing /java/***
cvs diff: tag v2_3_4 is not in file java/***/Item-NEW.java

I could then use egrep to extract all these lines from the diff and I would have a list of new files between the head and the tag.

Is there a way to do something similar in SVN?

Thanks!

Mark


RE: SVN DIFF QUESTION

Posted by "Eramo, Mark" <me...@hbs.edu>.
Ahh, thanks for the tip, that looks like that does the trick. Updated files show as M and new files show as A.

I realize now when I was researching this, I was looking at older docs which do not have this option.

I checked the 1.6 docs at svnbook.red-bean.com and I see that option listed.

Anyway, thanks for pointing me to that! 

Regards,
Mark


-----Original Message-----
From: Tyler Roscoe [mailto:tyler@cryptio.net] 
Sent: Friday, February 19, 2010 12:34 PM
To: Eramo, Mark
Cc: users@subversion.apache.org
Subject: Re: SVN DIFF QUESTION

On Fri, Feb 19, 2010 at 11:40:19AM -0500, Eramo, Mark wrote:
> I am trying to diff the trunk and a specific tag of a project in SVN
> to get a list of files that have changed AND a list of any new files
> that were added to the trunk since the tag but I am not able to get
> the same results as with CVS diff.

How about svn diff --summarize (and maybe --xml)?

tyler

Re: SVN DIFF QUESTION

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Fri, Feb 19, 2010 at 11:40:19AM -0500, Eramo, Mark wrote:
> I am trying to diff the trunk and a specific tag of a project in SVN
> to get a list of files that have changed AND a list of any new files
> that were added to the trunk since the tag but I am not able to get
> the same results as with CVS diff.

How about svn diff --summarize (and maybe --xml)?

tyler