生成属于特定 cvs 标签的文件列表(带修订版)

发布于 2024-08-17 08:01:21 字数 115 浏览 2 评论 0原文

有没有办法生成属于带有修订的特定 cvs 标签的文件列表。

例如projectname_a包含以下文件 - file_1 修订版 1.1 - 文件 2 修订版 1.40 ...

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
...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

影子是时光的心 2024-08-24 08:01:21

最简单的解决方案是在某处使用此标签进行结帐。不过需要一点磁盘空间。如果这让您烦恼,请尝试使用 -p 选项得到的结果。如果此输出包含文件名,那么您只需将其过滤掉即可。

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.

爱,才寂寞 2024-08-24 08:01:21

该列表将比您想要的更详细,但您可以简单地执行以下操作:

cvs log -S -N -r projectname_a

或者可能(如果您没有签出该项目):(

cvs rlog -S -N -r projectname_a ModuleName

您可以使用“.”(不带引号)作为模块名称如果您想扫描整个存储库)

如果您只需要文件名而不需要修订信息,请添加 -R

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.

蓝海 2024-08-24 08:01:21

无需检查任何内容 - 您可以使用 rls 命令(远程列表)。它会以一种有点有趣的方式为您提供信息,但处理起来很简单。

cvs rls <模块> -r <标签> -eR

这是我的脚本片段:

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 

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 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文