如何获取并使用 CVSNT 提交 ID?
我看到另一个问题引用了 CVSNT 自动生成的唯一提交 ID,该 ID 标记了每个提交。我认为我部门的大多数人都在使用 CVSNT 或其前端。
我发现CVSNT手册中描述了提交标识符,但是没有有关如何确定文件特定修订版的 CVSNT 提交标识符的说明。有办法做到这一点吗?我想知道为其他人的签入生成了哪些提交标识符,以便我可以将他们提交中涉及的文件分组在一起。
I saw a reference on another question to a unique commit id auto-generated by CVSNT that marks each commit. I think most people in my department are using CVSNT or frontends to it.
I found commit identifiers described in the CVSNT manual, but there is no explanation about how to determine what the CVSNT commit identifier is for a particular revision of a file. Is there a way to do this? I'd like to find out what commit identifiers are being generated for other people's checkins so I can group together the files involved in their commits.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CVS 命令日志和 rlog 都显示文件各个修订的提交标识符。我不知道使用此标识符检索信息的 CVS 命令,但我可以确认单个提交中的所有文件共享相同的标识符。
我有自己的日志文件解析器,它使用 commit-id 将受单个提交影响的文件分组在一起(例如,更改历史记录按日期排序并将文件分组为单个提交)。
阅读您的链接后,您可能可以指定类似“log -r @commit-id”的内容来获取共享提交标识符的受影响文件的列表。命令行可能有更多调整,但以下内容取得了一些成功(有点吵):
请注意,第一个文件包含“选定的修订版本:1”,这意味着提交对应于文件的版本。
如果您不想使用自己的工具,请尝试查找“cvs 变更集”:
The CVS command log and rlog both show the commit identifier for individual revisions of a file. I'm not aware of CVS command that get retrieve information using this identifier, but I can confirm that all files in a single commit share the same identifier.
I have my own log-file parser that uses the commit-id to group together the files affected by a single commit (e.g. change history is sorted by date and groups files into single commits).
Having read your link, you could probably specify something like "log -r @commit-id" to get a list of affected files sharing the commit identifier. There are probably more tweaks to the command line, but the following gives some success (slightly noisy):
Notice that the first file contains "selected revisions: 1" meaning that commit corresponds to a version of the file.
If you don't want to roll your own tools, try looking for "cvs changeset":