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

RE: Retrieving all revisions with changes present

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Wed, 14 Jan 2009 09:01:03 -0600

> -----Original Message-----
> From: news [mailto:news_at_ger.gmane.org] On Behalf Of Harry Putnam
> Sent: Wednesday, January 14, 2009 12:47 AM
> To: users_at_subversion.tigris.org
> Subject: Retrieving all revisions with changes present
> As someone about to switch from cvs to svn, I want to know how to do
> something like what I will describe, using svn.
> With cvs I was able to write a script that literally unwound every
> revision starting with what ever revision number I aimed it at, and
> put the entire change on stdout, one revision at a time but
> essentially a massive out pouring of text.
> My homeboy I script would filter through that with awk, which I could
> make retain each revision number until it rolled over, and If I got a
> hit on `fructificaiton', awk would spit out the matching version and
> the line containing my hit.
> Of course from there, I could make cvs spit the entire script for that
> revision to study.
> With the big difference in subversion of creating a revision for each
> change to the entire repository, a file may remain unchanged for any
> number of revisions.

Incorrect assumption. If you do 'svn log' on a file, it will only list
the revisions in which a change occurred.

You can write your script pretty much the same way you did it with CVS.
Use 'svn log -q foo.java' to get the revisions to dump. Use 'svn export
-r' or 'svn cat -r' to dump files by revision. Grep the exported file
or text stream.

Alternatively, you could run 'svn diff' for each revision and grep for
the word that way.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-14 16:09:44 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.