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

Re: SVN tags

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 29 Apr 2010 13:04:16 +0200

On Thu, Apr 29, 2010 at 12:08 PM, Andy Levy <andy.levy_at_gmail.com> wrote:
> On Thu, Apr 29, 2010 at 04:38, Wadhavankar, Hemant
> <Hemant.Wadhavankar_at_lsi.com> wrote:
>> Hello,
>>
>> I have a query. How to find tag(s) associated with any file available in
>> trunk? For example “cvs stat” shows the list of tags associated with any
>> file. Can something like this be done in SVN?
>
> It can't. In SVN, tags are not properties of files. It's the other way
> around, conceptually.
>
> SVN is not CVS - you will have to do some things differently and
> change your way of thinking. Fortunately, The Book has a whole section
> just for people who need help with the transition.
> http://svnbook.red-bean.com/nightly/en/svn.forcvs.html

That said, I really miss this feature too (the ability to see at a
glance all the branches/tags/... a certain revision was copied to,
f.i. when looking at the log of a file).

It's true that this is not possible with SVN currently, because the
repository doesn't keep track of "copy_to" information (where was this
file copied to), only "copy_from" information (where was this file
copied from). So you can only "calculate" the copy_to information by
analyzing the entire history of the repository, and deduce this info
(some clients and third-party software do this stuff, to create
revision graphs and such (e.g. TortoiseSVN)).

Full support for this kind of question will have to wait for major
changes to the SVN back-end filesystem, so it keeps track of the
copy_to information. Maybe it's something that will be considered for
FS-NG in the not-so-near future (see
http://subversion.apache.org/roadmap.html and take a look at the "most
wanted features", where it says "Forward history searching").

However, the following question can still be answered easily with
current SVN: "Given tag X, which revision of file Y was included?"
Very often the above general question ("which tags was this (version
of a) file copied to?") can be rephrased to a question about a
specific tag (e.g. you want to know if your bugfix is included in a
certain release (tag X) or not).

Cheers,

-- 
Johan
Received on 2010-04-29 13:04:48 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.