[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: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Mon, 7 Apr 2008 10:58:33 -0700

On Mon, Apr 7, 2008 at 8:55 AM, David Law <dlaw001_at_yahoo.co.uk> wrote:

> Hi
>
> I'm not sure this is a question is right for this
> mailing list but I'm trying to find out information
> about Tags and how does subversion handle them in
> terms of revision numbers.
>
> 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

The tags are in the /tags directory only if you place them there. For
subversion, tags, branches, trunk -- everthing is a versioned tree. Tag is
just a human-friendly name given to the tree by the users. There is no way
to tell introspecting the repository if a versioned tree is a tag.

Let us say you do have /tags directory where you keep the tags. Let us also
assume that you don't change the tag once you created it. Lot of people just
use script friendly names for the tags so that it is easy to determine which
tag is the recent (suffix it with date and time, for example). If not, you
can do "svn log --limit 2 -v -q $REPOURL/tags" and you should get two most
recent tags (the first log corresponding to the latest and the next will be
latest - 1). You will have to write a simple bash / perl script to parse out
the tag name from the log output.

>
> 2. working out the revision numbers for those tags

Same bash / perl script that parses out the tag name (above) can parse the
revision as well. [something similar to Andrew's example should work].

>
> 3 checking out the logs between the two discovered
> revison numbers (can do this already). Appreciate that
> the system may use rivision numbers across the system)
>
> Any tips or pointers would be greatly appreciated.
>
>

regards,
-Hari
Received on 2008-04-07 19:59:00 CEST

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.