如何从 CVS 获取自上次标记版本以来的提交注释列表?

发布于 2024-07-07 20:13:51 字数 280 浏览 5 评论 0原文

我对项目中的许多文件进行了一系列更改。 每次提交(通常在文件级别)都附有更改内容的注释。

有没有办法从 CVS 获取自上次标记版本以来这些更改的评论列表?

如果我可以通过 eclipse CVS 插件来做到这一点,那就太好了。

更新:我很乐意在这里接受答案,但不幸的是,没有一个答案是我正在寻找的。 坦率地说,我认为这实际上是可能的,这确实很遗憾,因为这可能是在版本之间创建更改列表的好方法(假设所有提交都以合理的粒度进行并包含有意义的注释)。

I have made a bunch of changes to a number of files in a project. Every commit (usually at the file level) was accompanied by a comment of what was changed.

Is there a way to get a list from CVS of these comments on changes since the last tagged version?

Bonus if I can do this via the eclipse CVS plugin.

UPDATE: I'd love to accept an answer here, but unfortunately none of the answers are what I am looking for. Frankly I don' think it is actually possible, which is a pity really as this could be a great way to create a change list between versions (Assuming all commits are made at a sensible granularity and contain meaningful comments).

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

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

发布评论

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

评论(5

浪荡不羁 2024-07-14 20:13:51

我想

cvs -q log -SN -rtag1:::tag2 

或者

 cvs -q log -SN -dfromdate<todate  

会做你想做的事。 这列出了两个标签或日期之间所做的所有更改的所有版本和注释,仅适用于已更改的文件。 在标签情况下,三个冒号排除第一个标签的注释。 有关详细信息,请参阅 cvs -H 日志。

I think

cvs -q log -SN -rtag1:::tag2 

or

 cvs -q log -SN -dfromdate<todate  

will do what you want. This lists all the versions and comments for all changes made between the two tags or dates, only for files that have changed. In the tag case, the three colons exclude the comments for the first tag. See cvs -H log for more information.

情泪▽动烟 2024-07-14 20:13:51

cvs log 命令的选项位于此处。 具体来说,要获取自特定标记(让我们称之为 VERSION_1_0)以来的所有提交,

cvs log -rVERSION_1_0:

如果您的目标是拥有一个无需知道最后一个标记的名称即可运行的命令,我相信您将需要编写一个捕获日志的脚本对于当前分支,解析以找到标签,然后针对该标签发出日志命令,但我很久以前就从 CVS 迁移了所有内容,所以我的记忆可能有点生疏。

The options for the cvs log command are available here. Specifically, to get all the commits since a specific tag (lets call it VERSION_1_0)

cvs log -rVERSION_1_0:

If your goal is to have a command that works without having to know the name of the last tag I believe you will need to write a script that grabs the log for the current branch, parses through to find the tag, then issues the log command against that tag, but I migrated everything off of CVS quite a while ago, so my memory might be a bit rusty.

迷爱 2024-07-14 20:13:51

如果您想快速获得单个文件的结果,cvs log 命令是不错的选择。 如果您想要更全面的东西,我找到的最好的工具是一个名为 cvs2cl.pl 的 Perl 脚本。 这可以生成多种不同格式的更改列表。 它有许多不同的选项,但我使用了如下所示的标签到标签选项:

cvs2cl.pl --delta dev_release_1_2_3:dev_release_1_6_8

或者

cvs2cl.pl --delta dev_release_1_2_3:HEAD

我还使用相同的工具使用日期进行了比较。

If you want to get a quick result on a single file, the cvs log command is good. If you want something more comprehensive, the best tool I've found for this is a perl script called cvs2cl.pl. This can generate a change list in several different formats. It has many different options, but I've used the tag-to-tag options like this:

cvs2cl.pl --delta dev_release_1_2_3:dev_release_1_6_8

or

cvs2cl.pl --delta dev_release_1_2_3:HEAD

I have also done comparisons using dates with the same tool.

谈下烟灰 2024-07-14 20:13:51

我知道你已经“解决”了你的问题,但我也遇到了同样的问题,下面是我如何快速从给定修订版的 cvs 中获取所有评论,直到最新版本:

$ mkdir ~/repo
$ cd ~/repo
$ mkdir cvs
$ cd cvs
$ scp -pr [email protected]:/cvs/CVSROOT .
$ mkdir -p my/favorite
$ cd my/favorite
$ scp -pr [email protected]:/cvs/my/favorite/project .
$ cd ~/repo
$ mkdir -p ~/repo/svn/my/favorite/project
$ cvs2svn -s ~/repo/svn/my/favorite/project/src ~/repo/cvs/my/favorite/project/src
$ mkdir ~/work
$ cd ~/work
$ svn checkout file:///home/geek/repo/svn/my/favorite/project/src/trunk ./src
$ cd src
$ # get the comments made from revision 5 until today
$ svn log -r 5:HEAD
$ # get the comments made from 2010-07-03 until today
$ svn log -r {2010-07-03}:HEAD

基本思想是只使用 svn 或 git 代替简历:-)
这可以通过使用 cvs2svn 或 cvs2git 将 cvs 存储库转换为 svn 或 git 来完成,无论如何我们都应该这样做。 它在大约三分钟内得到了我的答案,因为我有一个小存储库。

希望有帮助。

I know you have already "solved" your problem, but I had the same problem and here is how I quickly got all of the comments out of cvs from a given revision until the latest:

$ mkdir ~/repo
$ cd ~/repo
$ mkdir cvs
$ cd cvs
$ scp -pr [email protected]:/cvs/CVSROOT .
$ mkdir -p my/favorite
$ cd my/favorite
$ scp -pr [email protected]:/cvs/my/favorite/project .
$ cd ~/repo
$ mkdir -p ~/repo/svn/my/favorite/project
$ cvs2svn -s ~/repo/svn/my/favorite/project/src ~/repo/cvs/my/favorite/project/src
$ mkdir ~/work
$ cd ~/work
$ svn checkout file:///home/geek/repo/svn/my/favorite/project/src/trunk ./src
$ cd src
$ # get the comments made from revision 5 until today
$ svn log -r 5:HEAD
$ # get the comments made from 2010-07-03 until today
$ svn log -r {2010-07-03}:HEAD

The basic idea is to just use svn or git instead of cvs :-)
And that can be done by converting the cvs repo to svn or git using cvs2svn or cvs2git, which we should be doing anyway. It got my my answer within about three minutes because I had a small repository.

Hope that helps.

夜声 2024-07-14 20:13:51

像这样的

cvs -q log -NS -rVERSION_3_0::HEAD

你可能想将输出通过管道传输到egrep中以过滤掉你不想看到的东西。 我用过这个:

cvs -q log -NS -rVERSION_3_0::HEAD | egrep -v "RCS file: |revision |date:|Working file:|head:|branch:|locks:|access list:|keyword substitution:|total revisions: |============|-------------"

Something like this

cvs -q log -NS -rVERSION_3_0::HEAD

Where you probably want to pipe the output into egrep to filter out the stuff you don't want to see. I've used this:

cvs -q log -NS -rVERSION_3_0::HEAD | egrep -v "RCS file: |revision |date:|Working file:|head:|branch:|locks:|access list:|keyword substitution:|total revisions: |============|-------------"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文