题
通过其CVS历史记录查看特定文件上的所有提交都没有问题。
我需要的是查看在给定文件的同一日期或仅仅是平原日期范围的所有文件。重要的是,我在给定日期之前或之后得到所有提交。
例如。文件X有20个修订,最近是2011年6月25日
有一个错误,我需要找出该日期检查了其他文件,以检查该错误的潜在来源。甚至具有等效效果的东西 WHERE date > '06-06-2011
会很好。
我尝试过谷歌搜索,但似乎没有提及它。但是,我听说做类似上述代码示例的事情是可能的。
解决方案
我已经使用CVSP来做这样的事情。它将Check INS组组装成一个称为“ PatchSet”的集合。它具有各种功能,可以搜索由特定用户创建的补丁程序,在日期,影响特定文件等的补丁程序之间。它还可以创建补丁程序的DIFF报告,这对于查找更改的内容非常有帮助。
其他提示
我现在对此有解决方法的解决方案。我会分享的,但是我仍然非常感兴趣地知道如何做到 /如果可以做到这一点。
解决方法:
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的性质,我仍然对一个更优雅的解决方案非常感兴趣,现在我将把这个问题保持开放,以防万一有人有一定的意见。
注意(5年后,2016年9月)
已更新了有关从简历导入的工具的文档。
看 提交106B672, 提交72E0877, 提交1EBA3E5 (2016年9月22日) 杰夫·金(peff
).
(合并 Junio C Hamano- gitster
-- 在 提交3D0049E, ,2016年10月3日)
CVSP (www.cobite.com/cvsps
)现在 github.com/andreyvit/cvsps
.
git cvs
移民 现在包括以下警告:
这些说明使用
git-cvsimport
与git一起运送的脚本,但其他进口商可能会提供更好的结果。看git cvsimport
和 gitcvsimport
警告:
警告:
git cvsimport
用途cvsps
版本2,被认为是弃用的;它不使用cvsps
版本3及以后。
如果您要执行CVS存储库的一次性导入,请考虑使用cvs2git
或者cvs-fast-export
.