Hello together,
is there a way to generate a list of of files which belongs to a specific cvs-tag with revision.
e.g projectname_a includes following files - file_1 rev 1.1 - file 2 rev 1.40 ...
Hello together,
is there a way to generate a list of of files which belongs to a specific cvs-tag with revision.
e.g projectname_a includes following files - file_1 rev 1.1 - file 2 rev 1.40 ...
The most simple solution is to do a checkout with this tag somewhere. Takes a bit of disk space, though. If that bothers you, try what you get with the -p
option. If this output contains file names, then you just need to filter them out.
The list will be a little more verbose than what you want but you could simply do:
cvs log -S -N -r projectname_a
or possibly (if you don't have the project checked out):
cvs rlog -S -N -r projectname_a ModuleName
(you can use "." (w/o quotes) as the module name if you want to scan the entire repository)
If you only want the file names without the revision information, add -R
.
No need to check anything out - you can use the rls command (remote list). It will give you information in a slightly funny way but it is straightforward to process.
cvs rls <MODULE> -r <TAG> -eR
Here's my script snippet:
for NAME in `cvs rls ${MODULE} -r ${TAG} -eR | grep -v ^$ | grep -v ^D | sed 's/ /~~/g'`
do
FIRST_CHARACTER=`echo $NAME | cut -c1,1`
if [ ${FIRST_CHARACTER} = "/" ]
then
# This is a file
FILE_NAME=`echo $NAME | awk -F/ '{print $2}'`
VERSION=`echo $NAME | awk -F/ '{print $3}'`
echo "${DIR_NAME}/${FILE_NAME},*${VERSION}*"
else
# This is a dir
DIR_NAME=`echo $NAME | awk -F: '{print $1}'`
fi
done