有谁知道 CVS 命令行选项来获取上次签入的详细信息?

发布于 2024-07-05 15:59:12 字数 200 浏览 4 评论 0原文

我在 Windows 上使用 CVS(带有 WinCVS 前端),并且希望在构建失败时将上次签入的详细信息添加到我们的自动构建过程中的电子邮件中,以便更容易修复。

我需要知道已更改的文件、更改它们的用户以及评论。

我一直在尝试制定命令行选项,但似乎从未获得准确的结果(要么获得太多结果,而不仅仅是一次签入,要么获得两周前的一些随机签入的详细信息)

I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.

I need to know the files that have changed, the user that changed them, and the comment.

I've been trying to work out the command line options, but never seem to get accurate results (either get too many result rather than just from one checkin, or details of some random check in from two weeks ago)

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

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

发布评论

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

评论(9

沩ん囻菔务 2024-07-12 15:59:13

Eclipse 内置了 ChangeSets。您可以通过提交浏览最后的更改(至少是传入的更改,也称为更新)。 它通过按作者、提交消息和类似时间戳对提交进行分组来实现此目的。

这也适用于“与/另一个分支或版本比较”,您可以在其中选择分支、标签和日期。 查看同步视图图标中包含“更改集”的弹出菜单,然后亲自查看。

编辑:这需要至少作为查看器更改为 Eclipse,但根据您需要比较和分组的频率,它可能不会太糟糕。 如果您不想使用更多 - 仅将 Eclipse 用于 CVS。 甚至应该可以通过带有所有插件的 rcp 获得一个大小合适的图形 cvs 客户端,但这肯定超出了范围......

Eclipse has ChangeSets built in. You can browse the last changes (at least incoming changes aka updates) by commit. It does this by grouping the commits by author, commit message and similar timestamps.

This also works for "Compare with/Another Branch or Version" where you can choose Branches, Tags and Dates. Look through the Synchronization View Icons for a popup menu with "Change Sets" and see for yourself.

Edit: This would require to change to Eclipse at least as a viewer, but depending on the frequency you need to compare and group it might not be too bad. If you don't want to use more - use Eclipse just for CVS. It should be possible to even get a decent sized graphical cvs client through the rcp with all the plugins, but this'd definitely be out of scope...

久随 2024-07-12 15:59:13

这不是已经解决的问题了吗? 我认为 CI Matrix 上的任何一个工具同时支持 CVS 和电子邮件通知的软件可以为您做到这一点。

Isn't this a solved problem? I would think any of the several tools on the CI Matrix that supports both CVS and email notifications could do this for you.

请爱~陌生人 2024-07-12 15:59:13

CVSNT 支持 提交 ID,您可以使用它来代替日志中的标签、签出或更新命令。 每组已提交的文件(在 CVSNT 中提交是原子的)都会收到其自己的唯一 ID。 您只需首先通过 cvs log 确定最后签入文件的 commitid(您可以通过 -d“1 小时前”或类似的方式限制输出),然后查询哪些其他文件具有该 ID。

CVSNT supports commit IDs which you can use in place of tags in log, checkout or update commands. Each set of files committed (commits are atomic in CVSNT) receives its own unique ID. You just have to determine the commitid of the last checked in file via cvs log first (you can restrict the output via -d"1 hour ago" or similar) and then query which other files have that ID.

长亭外,古道边 2024-07-12 15:59:13

我们通过一个转储更改日志的 perl 脚本来完成此操作,您可以在第二个链接获取适用于 Windows 的免费版本的 perl。

Cvs2Cl 脚本

Active Perl

We did this via a perl script that dumps the changelog and you can get a free version of perl for Windows at the second link.

Cvs2Cl script

Active Perl

丑丑阿 2024-07-12 15:59:13

我在 CVSROOT 中使用 loginfo 并将该信息写入文件

http: //ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC186

I use loginfo in CVSROOT and write that information to a file

http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC186

笑叹一世浮沉 2024-07-12 15:59:13

“cvs History -a -l”会让您接近吗? 向所有用户显示每个项目的最后一个事件...

Will "cvs history -a -l" get you close? Shows for all users last event per project...

风透绣罗衣 2024-07-12 15:59:13

CVS 不提供此功能。 但是,您可以通过购买 FishEye 许可证或可能使用 CVSTrac (注意:我还没有尝试过 CVS Trac)。

或者您可以迁移到 SVN,它确实通过原子提交提供了此功能。 您可以检入一组文件并将其算作一次提交。 在 CVS 中,无论您做什么,每个文件都是一个单独的提交。

CVS does not provide this capability. You can, however, get it by buying a license for FishEye or possibly by using CVSTrac (note: I have not tried CVS Trac).

Or you could migrate to SVN, which does provide this capability via atomic commits. You can check in a group of files and have it count as a single commit. In CVS, each file is a separate commit no matter what you do.

不爱素颜 2024-07-12 15:59:13

哇。

我忘记了这件事有多难做到。 我之前所做的是一个两阶段的过程。

首先,运行

cvs history -c -a -D "7 days ago" |
    gawk '{ print "$1 == \"" $6 "\" && $2 == \"" $8 "/" $7 "\" { print \"" $2 " " $3 " " $6 " " $5 " " $8 "/" $7 "\"; next }" }' > /tmp/$.awk

以收集有关过去 7 天内所有签到的信息,并生成一个脚本,该脚本将用于创建已发送电子邮件的一部分。

然后,我在包含损坏文件的目录中搜寻 CVS/Entries 文件以获取更多信息。

通过将两者结合在一起,我可以找出罪魁祸首,并向他们发送电子邮件,通知他们他们已经破坏了构建。

抱歉,这个答案并不像我希望的那么完整。

Wow.

I'd forgotten how hard this is to do. What I'd done before was a two stage process.

Firstly, running

cvs history -c -a -D "7 days ago" |
    gawk '{ print "$1 == \"" $6 "\" && $2 == \"" $8 "/" $7 "\" { print \"" $2 " " $3 " " $6 " " $5 " " $8 "/" $7 "\"; next }" }' > /tmp/$.awk

to gather information about all checkins in the previous 7 days and to generate a script that would be used to create a part of the email that was sent.

I then trawled the CVS/Entries file in the directory that contained the broken file(s) to get more info.

Mungeing the two together allowed me to finger the culprit and send an email to them notifying them that they'de broken the build.

Sorry that this answer isn't as complete as I'd hoped.

我也只是我 2024-07-12 15:59:12

CVS 不像其他版本控制系统那样对更改集进行分组; 每个文件都有自己独立的版本号和历史记录。 这是 CVS 的缺陷之一,促使人们转向更新的 VC。

也就是说,有一些方法可以实现您的目标。 最简单的可能是添加一个提交后挂钩来发送电子邮件或记录到文件。 然后,至少,您可以通过查看电子邮件的发送时间和更改者来将一组提交分组在一起。

CVS doesn't group change sets like other version control systems do; each file has its own, independent version number and history. This is one of the deficiencies in CVS that prompts people to move to a newer VC.

That said, there are ways you could accomplish your goal. The easiest might be to add a post-commit hook to send email or log to a file. Then, at least, you can group a set of commits together by looking at the time the emails are sent and who made the change.

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