SVN tags
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? Best, Hemant Unstoppable..
Re: SVN tags
On Thu, Apr 29, 2010 at 2:08 PM, Wadhavankar, Hemant < hemant.wadhavan...@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? > First of all Subversion is not CVS, files are not tagged in Subversion. > > > Best, > > Hemant > > *Unstoppable..* > > > -- Vishwajeet Singh +91-9657702154 | dextrou...@gmail.com | http://bootstraptoday.com Twitter: http://twitter.com/vishwajeets | LinkedIn: http://www.linkedin.com/in/singhvishwajeet
Re: SVN tags
On Thu, Apr 29, 2010 at 04:38, Wadhavankar, Hemant 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
Re: SVN tags
On Thu, Apr 29, 2010 at 12:08 PM, Andy Levy wrote: > On Thu, Apr 29, 2010 at 04:38, Wadhavankar, Hemant > 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
RE: SVN tags
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:jcor...@gmail.com] Sent: Thursday, April 29, 2010 4:34 PM To: Andy Levy Cc: Wadhavankar, Hemant; users@subversion.apache.org Subject: Re: SVN tags On Thu, Apr 29, 2010 at 12:08 PM, Andy Levy wrote: > On Thu, Apr 29, 2010 at 04:38, Wadhavankar, Hemant > 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