[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: matching a tag to a branch

From: Arthur Barrett
Subject: RE: matching a tag to a branch
Date: Mon, 20 Feb 2012 14:59:28 +1100

Hi Jim,

Which version of CVS are you using?

1. Don't use 'cvs history' - this relies on a very simple logging
mechanism.  A) it's ot failsafe (ie: the server can record changes, but
not history log them; and B) until very very recent releases if the log
file was in use (potentially common on busy servers) the logging was
simply skipped.

2. Get the version number for the tag (using 'cvs rlog) eg:, and then you can calculate the branch name (ie:  

3. You can see this (which branch a tag is on) visually using something
like the 'revision graph' feature of TortoiseCVS

But the better question is why?  Why do you need to find the branch name
from the tag name?  CVS has been around and in use for almost 30 years -
anything you want to do has already been done a million times (sorry, we
all want to think our organization and our process is unique, but
c'mon).  Don't reinvent the wheel.

Note: if you are using CVS 2.x or CVSNT, then I recommend you contact
the vendor (March Hare Software) for support/training, CVSNT is NoT CVS.
Most windows tools use (and work best with) CVSNT, eg: TortoiseCVS...



> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Jim Perrier
> Sent: Saturday, 18 February 2012 6:45 AM
> To: address@hidden
> Subject: matching a tag to a branch
> I was wondering if anyone could tell me how to match a tag to 
> a branch?
> I've inherited this working environment, so understand that I didn't 
> design the tagging naming system.
> What I'm trying to do is create a shell script that I could 
> supply the 
> build tag "DSC_4_0_I675" and
> have it return the branch it belongs to.
> *DSC_4_0_I420 belongs to DSC40*
>  > cvs history -a -T | grep -w tpapps | grep DSC_4_0_I420
> T 2011-11-02 05:29 +0000 nmsbuilder tpapps       [DSC_4_0_I420:DSC40]
>  >  cvs history -a -T | grep -w tpapps | grep DSC_4_0_I669
> T 2011-10-27 07:43 +0000 nmsbuilder tpapps       [DSC_4_0_I669:A]
>  >  cvs history -a -T | grep -w tpapps | grep DSC_4_0_I675
> T 2011-11-02 16:23 +0000 nmsbuilder tpapps       [DSC_4_0_I675:A]
> T 2011-11-02 19:31 +0000 nmsbuilder tpapps       
> [DSC40MAIN:DSC_4_0_I675]
>  > cvs history -a -T | grep -w tpapps | grep DSC_4_0_I681
> T 2011-11-08 06:31 +0000 nmsbuilder tpapps       
> [DSC_4_0_I681:DSC40MAIN]
> I'm not sure what "A" stands for? HEAD maybe? I know DSC40MAIN was 
> created from the HEAD
> It's also awkward when the reply returns the branch name before and 
> sometimes after the tag.
> I'd appreciate any help you could give me.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]