info-cvs
[Top][All Lists]
Advanced

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

RE: Can we find all the branches on a module through some script?


From: Paul Sander
Subject: RE: Can we find all the branches on a module through some script?
Date: Tue, 27 Nov 2001 09:53:16 -0800

>--- Forwarded mail from address@hidden

>> -----Original Message-----
>> From: Jerry Nairn [mailto:address@hidden
>> Sent: Monday, November 26, 2001 4:34 PM
>> To: 'address@hidden'; address@hidden
>> Subject: RE: Can we find all the branches on a module through some
>> script?
>> 
>> 
>> 
>> > From: jsk-intoto [mailto:address@hidden
>> > Sent: Wednesday, November 21, 2001 9:25 PM
>> 
>> > based on the branch the user is working on. Can we obtain 
>> the branches
>> > existing on the repository thru some script mechanism?
>> 
>> cvs -nq log -h something | \
>>         sed -n -e '/^symbolic/,/^keyword/ {
>> /[1-9][0-9]*\.[0-9][0-9]*\.0\.[0-9][0-9]*$/ p
>> }'
>> 
>> Will list all of the branches on something. The key thing 
>> here is tags which
>> have at least four numbers, and the next to last number is 0.
>> It occurs to me that this will not get those special branches 
>> created by
>> imports.
>> Jerry
>> 
>It's also possible to parse the output of "cvs stat -v", which has
>lines in the form of

>    TAGNAME       (branch: 1.2.14)
>    TAGNAME1      (revision: 1.2.14.1)

>In Perl, this would be something like
>\s*(\w*)\s+\(branch: ([0-9.]*)
>for branch names, with corresponding for revisions, with $1 being
>the tag name and $2 being the rev number.

You can also run rinfo on each of the ,v files in the repository to
dump out symbols, and grep out all the ones that have an even number of
dots in their version numbers, and all the ones that have "0" as their
penultimate branch number.  Then edit the list to extract only the symbols
and sort.  That gives all of the branches defined in a single ,v file.

Then use find to repeat this for all of your ,v files and use lmerge or
even the standard Unix join tool to produce a comprehensive list.

The rinfo and lmerge programs are available at
http://www.wakawaka.com/source.html and are free.

>--- End of forwarded message from address@hidden




reply via email to

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