[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: Wadhavankar, Hemant <Hemant.Wadhavankar_at_lsi.com>
Date: Thu, 29 Apr 2010 17:20:09 +0530

Thanks Johan/Andy on replying this thread. Somehow this feature is must for me as we are moving on SVN from CVS. Here is what I have thought..

I will use "svn list -R" command to list all files/folders in all tags. This output will be taken into MySQL database. The database table structure is almost finalized. A wrapper would be written (mostly like svn tag) and this wrapper command would fetch tags associated with any file in trunk by querying the SQL database. The SQL database will be updated only when new tag is created.

Key here is to have efficient SQL database and table structure so that the wrapper (svn tag) command won't act sluggish. I would write on this thread to all of you once this experiment becomes successful.

Best,
Hemant
Unstoppable......

-----Original Message-----
From: Johan Corveleyn [mailto:jcorvel_at_gmail.com]
Sent: Thursday, April 29, 2010 4:34 PM
To: Andy Levy
Cc: Wadhavankar, Hemant; users_at_subversion.apache.org
Subject: Re: SVN tags

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:50:56 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.