Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Identifying base version-no of all files in a branch

11 views
Skip to first unread message

mthread

unread,
Aug 2, 2012, 1:25:30 AM8/2/12
to
Hi,
Is there a CVS command that will provide me with version no(base version) of all the files in a branch.
What I mean by 'base version' here is...the version no of all the files in a branch..when the branch was first created.
I want to create a plugin in Eclipse...through which I can retrieved the base version no of all the files in a branch.
Thanks every one in advance

Bulgrien, Kevin

unread,
Aug 2, 2012, 9:25:46 AM8/2/12
to info...@nongnu.org
The only simple way of doing this that I know about is to lay a
non-branch tag down at the time the branch is created as a
consistently applied best practice.

The list archives contain threads that discuss a number of ideas
about how one might to analytically determine this information.
Some of these threads deal with trying to find the time/date
that a branch was created, but that is very much the same kind
of issue.

This message and/or attachments may include information subject to GD Corporate Policy 07-105 and is intended to be accessed only by authorized personnel of General Dynamics and approved service providers. Use, storage and transmission are governed by General Dynamics and its policies. Contractual restrictions apply to third parties. Recipients should refer to the policies or contract to determine proper handling. Unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender and destroy all copies of the original message.

Larry Jones

unread,
Aug 2, 2012, 4:08:44 PM8/2/12
to mthread, info...@nongnu.org
mthread writes:
>
> Is there a CVS command that will provide me with version no(base version) of all the files in a branch.

No, I'm afraid not. The best you could do would be to parse the output
of ``status -v'' or ``log'' to get the definition of the branch tag in
each file and then infer the base version from it.
--
Larry Jones

These findings suggest a logical course of action. -- Calvin

Larry Jones

unread,
Aug 2, 2012, 4:22:41 PM8/2/12
to Bulgrien, Kevin, info...@nongnu.org
Bulgrien, Kevin writes:
>
> The list archives contain threads that discuss a number of ideas
> about how one might to analytically determine this information.
> Some of these threads deal with trying to find the time/date
> that a branch was created, but that is very much the same kind
> of issue.

No, it's not. CVS knows, absolutely and for sure, what the base
revision of the branch is in each file -- branches wouldn't work if it
didn't. But it has no concept of *when* the branch was created; it
could be different for each and every file.
--
Larry Jones

I don't need to do a better job. I need better P.R. on the job I DO.
-- Calvin

Arthur Barrett

unread,
Aug 2, 2012, 8:50:15 PM8/2/12
to Larry Jones, Bulgrien, Kevin, rjk...@gmail.com, info...@nongnu.org
Kevin/Larry/etc,

It's EASY to obtain the base revision number - it's hardcoded in the
branch number.

Eg:
CVSNT_BRANCH_2_8_01_3761: 1.106.2.210.6.99.0.2

Base revision of CVSNT_BRANCH_2_8_01_3761 is 1.106.2.210.6.99

Yes it's different for every file (but that's stating the obvious, since
revision numbers are unique per file) - but it's not in any way
difficult to obtain. There isn't a "comand line" to checkout the 'base
revision', but since mthread/rjkumr is writing an Eclipse extension, a
list of version numbers is all that is needed isn't it? Once the list
of version numbers is obtained, retrieving the base revisions is easy in
a program/script...

> Hi,
> Is there a CVS command that will provide me with version
> no(base version) of all the files in a branch.
> What I mean by 'base version' here is...the version no of
> all the files in a branch..when the branch was first created.
> I want to create a plugin in Eclipse...through which I can
> retrieved the base version no of all the files in a branch.
> Thanks every one in advance
>

Better to replace 'all' with 'each' in your question - I think that
distiction is the cause of the confusion.

I've added an enhancement request for this to command line CVSNT:
http://customer.march-hare.com/webtools/bugzilla/ttshow_bug.cgi?tt=1&id=
6537

eg:
cvs co -r :CVSNT_2_0_x
cvs diff -r :CVSNT_2_0_x


Regards,



Arthur Barrett
CVS Suite (CVSNT)
Product Manager

Larry Jones

unread,
Aug 3, 2012, 4:28:20 PM8/3/12
to Arthur Barrett, Bulgrien Kevin, rjk...@gmail.com, info...@nongnu.org
Arthur Barrett writes:
>
> It's EASY to obtain the base revision number - it's hardcoded in the
> branch number.

Exactly (which is why it's nothing like trying to intuit the date/time
the branch was created). For generality, you need to support normal RCS
branches in addition to CVS magic branches, but that's just a small
detail.

> but since mthread/rjkumr is writing an Eclipse extension, a
> list of version numbers is all that is needed isn't it?

Correct, and that's what there's no easy way to do, you have to parse
the output from ``status -v'' or ``log'', and that's not trivial.
--
Larry Jones

I like Mom to be impressed when I fulfill the least of my obligations.
-- Calvin

Arthur Barrett

unread,
Aug 5, 2012, 5:58:48 PM8/5/12
to Larry Jones, Bulgrien Kevin, rjk...@gmail.com, info...@nongnu.org
Larry/etc,

> > but since mthread/rjkumr is writing an Eclipse extension, a
> > list of version numbers is all that is needed isn't it?
>
> Correct, and that's what there's no easy way to do, you have to parse
> the output from ``status -v'' or ``log'', and that's not trivial.

I've not looked at the Eclipse code closely, but I think the log output
is already parsed, if someone is writing an eclipse extension they're
leveraging all that existing code/structures/classes.

Regards,


Arthur

0 new messages