1

通过其 CVS 历史查看特定文件上的所有提交是没有问题的。

我需要的是查看与给定文件在同一日期或附近提交的所有文件,或者只是一个普通的日期范围。重要的是我在给定日期之前或之后或之后获得所有提交。

例如。文件 x 有 20 次修订,最近一次是 2011 年 6 月 25 日

有一个错误,我需要找出在该日期签入的其他文件,以检查错误的潜在来源。即使是具有等效效果的东西也WHERE date > '06-06-2011很好。

我试过用谷歌搜索,但似乎没有任何提及。但是,我听说可以执行类似上述代码示例的操作..

4

3 回答 3

1

我用 CVSPS 来做这样的事情。它将检入组组合成称为“补丁集”的集合。它具有搜索特定用户创建的补丁集、日期之间、影响特定文件的补丁集等的各种功能。它还可以创建补丁集的差异报告,这对于查找更改的内容非常有帮助。

http://www.cobite.com/cvsps/

于 2011-12-23T18:11:54.773 回答
0

我现在有一个解决方法类型的解决方案。我会分享它,但我仍然非常想知道如何做到这一点/如果可以做到这一点。

解决方法:

Check out two copies of the code based on certain dates
 and do a directory diff with something like Beyond Compare. 

问题:

What changes were made on or around June 25th?

解决方案(Windows):

1. Create two directories C:\dirA\ and C:\dirB\
2. Right-click C:\dirA\ and click 'CVS Checkout...'
3. Select the appropriate Module
4. Click the 'Revision' tab
5. Choose to get the 'Files at a certain time' and pick June 24th.
6. Repeat steps 2 - 4 on C:\dirB\
7. Choose to get the 'Files at a certain time' and pick June 26th.
8. Do a directory diff of C:\dirA\ vs C:\dirB\
9. Any differences will have been checked in on either the 24th, 25th, or 26th.
10. View CVS History to determine the exact date and time of a particular change.

可以肯定的是,这不是最优雅的解决方案,但它确实有效。只要日期范围不太大并且项目没有挤满开发人员,大多数显示的更改将是您正在寻找的更改。

显然,考虑到这有点类似于 kluge 的性质,我仍然对更优雅的解决方案非常感兴趣,如果有人有一些意见,我会暂时保留这个问题。

于 2011-07-26T19:19:24.830 回答
0

注(5 年后,2016 年 9 月)

有关从 CVS 导入的工具的文档已更新。

请参阅Jeff King ( )的commit 106b672commit 72e0877commit 1eba3e5(2016 年 9 月 22 日) 。(由Junio C Hamano 合并 -- --提交 3d0049e中,2016 年 10 月 3 日)peff
gitster

cvsps ( www.cobite.com/cvsps) 现在位于github.com/andreyvit/cvsps.

git cvs迁移现在包括以下警告:

这些说明使用git-cvsimportgit 附带的脚本,但其他导入器可能会提供更好的结果。看git cvsimport

gitcvsimport警告:

警告: git cvsimport使用cvsps已弃用的版本 2;它不适用于cvsps版本 3 及更高版本。
如果您正在执行 CVS 存储库的一次性导入,请考虑使用 cvs2gitcvs-fast-export.

于 2016-10-04T07:21:31.087 回答