如何找出哪些 CVS 标签覆盖了哪些文件和路径?
有一个遗留的 CVS 存储库,其中包含大量目录、子目录和路径。 还有大量的分支和标签不一定覆盖所有路径和标签。 文件 - 通常是一个子集。 我如何找出哪个分支/标签覆盖了哪些文件和路径?
CVS 日志已提供每个文件的标签列表。 该任务要求我将其转变成每个标签的文件。 我在当前的 WinCVS (CVSNT) 实现中找不到这样的功能。 给定足够的空循环,我可以编写一个 Perl 脚本来做到这一点,该算法并不复杂,但需要完成。
我想有些人需要这些信息并解决这个问题。 因此,我认为应该是一个现成的(开源/免费)工具。
There is a legacy CVS repository, which contains a large number of directories, sub-directories, and paths. There is also a large number of branches and tags that do not necessarilly cover all paths & files - usually a subset. How can I find out, which branch / tag covers, which files and paths?
CVS log already provides the list of tags per file. The task requires me to transpose this into files per tag. I could not find such functionality in current WinCVS (CVSNT) implementation. Given ample empty cycles I can write a Perl script that would do that, the algorithm is not complex, but it needs to be done.
I would imagine there are some people who needed such information and solved this problem. Thus, I think should be a readily available (open source / free) tool for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
要列出文件上的标签,还可以执行以下操作:
To list tags on a file one can also do:
要确定哪些标签适用于特定文件,请使用:
这将输出文件的所有版本以及已应用于该版本的标签。
要确定单个标签中包含哪些文件,我唯一能想到的就是使用该标签进行检查并查看返回了哪些文件。 其命令是以下任意一个:
To determine what tags apply to a particular file use:
This will output all the versions of the file and what tags have been applied to the version.
To determine what files are included in a single tag, the only thing I can think of is to check out using the tag and see what files come back. The command for that is any of:
上面引用的方法对我不起作用
cvs -q rdiff -s -D 2000-01-01 -r yourTagName
但是经过大量的混乱后我意识到
cvs -q rdiff -s -D 2000-01- 01 -r yourTagName ModuleName
有效
the method quoted above didn't work for me
cvs -q rdiff -s -D 2000-01-01 -r yourTagName
however after a lot of messing around I've realised that
cvs -q rdiff -s -D 2000-01-01 -r yourTagName ModuleName
works
您不必进行实际结账。 您可以使用 -n 选项仅模拟此操作:
这将为您提供模块 ModuleName 中标记为 TagName 的所有文件的名称。
You don't have to do an actual checkout. You can use the -n option to only simulate this:
This will give you the names of all the files tagged TagName in module ModuleName.
以下命令给出了该标签“yourTagName”中的文件列表。 文件全部标记为新文件,修订信息位于“yourTagName”中。
此命令在 2000-01-01 和您的标签之间进行比较,请随意使用其他更早的日期。
The following command gives a list of files that are in that tag "yourTagName". The files are all marked as new, the revision info in "yourTagName".
This command does a diff between 2000-01-01 and your tag, feel free to use another date that is earlier.
我不知道有什么工具可以帮助您,但是如果您正在编写自己的工具,我可以帮您解决一个难题:CVS 中的目录不能为 tagget。 只有其中的文件才有标签(这决定了当您签出特定标签上的目录时签出的内容)。
I don't know of any tool that can help you, but if you are writing your own, I can save you from one headace: Directories in CVS cannot be tagget. Only the files within them have tags (and that is what determines what is checked out when you check out a directory on a specific tag).