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

RE: Finding out the revision numbers for Tags

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Mon, 7 Apr 2008 12:41:19 -0500

> -----Original Message-----
> From: David Law [mailto:dlaw001_at_yahoo.co.uk]
> Sent: Monday, April 07, 2008 11:55 AM
> To: users_at_subversion.tigris.org
> Subject: Finding out the revision numbers for Tags
>
> Hi
>
 
> The reason why I ask is that I'm writing somw code in
> java to mine the comments, there is a package out
> there org.tmatesoft.svn which I am utlising, but this
> what I'm trying top do ...
>
> Collect the comments of btween two tags,
>
> So what I'm trying to do is (help is required for 1 &
> 2)
>
> 1. finding the tags that are currently within the the
> respoistory (assume its something to do with the /tags
> directory, is a master list held?) and determining the
> most recent and most recent - 1
> 2. working out the revision numbers for those tags

svn log -q -v --stop-on-copy svn://.../tag1
The --stop-on-copy will stop the log at the beginning of the tag/branch.
If you look at the changed files, you will see where the tag was
branched from.
Ex:
        Changed paths:
           A /branches/test (from /branches/R1.0:2127)

You then parse out the revision number.

So, to get a rev number:
        svn log -q --stop-on-copy svn://.../tag1 | grep '^r' | tail - 1
| sed 's/^r//' | sed 's/ .*//'
or
        svn log -q --stop-on-copy svn://.../tag1 | perl -ne 'print
qq($1\n) if /^r(\d+)/' | tail - 1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-04-07 19:42:12 CEST

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