info-cvs
[Top][All Lists]
Advanced

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

Re: How to find the parent of any random branch


From: David Taylor
Subject: Re: How to find the parent of any random branch
Date: Thu, 30 Aug 2001 21:05:19 -0700

"Charles V. Rossi" wrote:

> If I'm sitting in a checked out branch how can I find
> who I was branched from (HEAD vs. some other branch)?
>
> I might be able to figure it out from 'cvs status <file>',
> but it's painful.

Yes, it is.
I use CVS history:

grep '^T.*|branchName|moduleName$'  $CVSROOT/CVSROOT/history | awk '-F|'
'{print $4}'

The trunk (HEAD or Default branch) seems to be indicated by "D".

I follow the recommendation in Karl Fogel's 'Open Source Development
With CVS' at
http://cvsbook.red-bean.com/cvsbook.html#Merging_Repeatedly_Into_The_Trunk

and create a branch from a regular (non-branch) tag at the branch point
first.  So I have to repeat the command above with branchName =
the-branch-point-tag to find the actual parent. With a little wrap and
glue, you can automate this by consulting 'cvs log' to determine if a
tag is a branch or regular tag.

dtayl





reply via email to

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