[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tag and Branch with Same Name
From: |
Derek Robert Price |
Subject: |
Re: Tag and Branch with Same Name |
Date: |
Tue, 06 Apr 2004 14:48:22 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter Connolly wrote:
> Message
> Is there a script out there that can run through a repository and see
> if there are tags and branches with the same name?
#! /bin/sh
for tag in `cat $CVSROOT/CVSROOT/val-tags`; do
if test $tag = y; then continue; done
static=0
branch=0
for archive in `find $CVSROOT -name \*,v`; do
# The space after the carat in the grep below should really be a tab
if rlog $archive |grep '^ $tag: [0-9.]*$' |grep '\.0\.'; then
branch=`expr $branch + 1`
else
static=`expr $static + 1`
fi
done
if test $static != 0 && $branch != 0; then
echo "$tag is a static and a branch."
fi
done
Your milage may vary, but that should be close, if slow. If you are
bored or motivated, that might be an interesting new feature for the
verify_repo (formerly check_cvs) script in contrib.
Derek
- --
*8^)
Email: address@hidden
Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQFAcvt1LD1OTBfyMaQRAhVfAJwK8r3Eophmi7LAMKPghieC/jGilwCcCFxp
GkBYZCUkeoJMA/BY7Oa+5Tg=
=X1WA
-----END PGP SIGNATURE-----