[Top][All Lists]
[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: |
Thornley, David |
Subject: |
RE: Can we find all the branches on a module through some script? |
Date: |
Tue, 27 Nov 2001 10:07:50 -0600 |
> -----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.