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

Re: the revision number and a tag

From: Andy Levy <andy.levy_at_gmail.com>
Date: Thu, 11 Aug 2011 12:13:38 -0400

On Thu, Aug 11, 2011 at 12:02, Giulio Troccoli
<giulio.troccoli_at_mediatelgroup.co.uk> wrote:
>
>
> On 11/08/11 16:59, Michael Hüttermann wrote:
>>
>> Hello,
>>
>> given a Subversion tag, what's the best way to get the revision number of
>> that tag, i.e. the revision number with which the tag was created? Is it
>> possible at all having checked out the tag to a local working copy? Or is
>> there any other way to cross-reference a "tag" to a revision number?
>>
>>
>> Thanks.
>>
>>
>> Michael
>>
>
> I think svn log --limit 1 would work. It will give you the last log when the
> tag was modified. Since a tag should never be modified that log should refer
> to the copy

That or svn log --stop-on-copy.

If you use svn log -v --stop-on-copy, the list of changed paths (the
copy destination) will be given, in addition to the source path and
its revision. Parse that out and you're set. You'll have both the
revision which created the tag and the latest revision of the path the
tag came from.
Received on 2011-08-11 18:14:47 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.