How to view all commits by a date range in TortoiseCVS
It's no problem to 开发者_开发百科view all of the commits on a particular file through its CVS History.
What I need is to view all files that are committed on the same date as or near to a given file, or just a plain date range. The important thing is that I get all commits before or after or on a given date.
For example. File x has 20 revisions, the most recent is June 25, 2011
There's a bug and I need to find out what other files were checked in on that date to check for potential sources of the bug. Even something that has the equivalent effect of WHERE date > '06-06-2011
would be perfectly fine.
I've tried googling around but there doesn't seem to be any mention of it. However, I've heard that doing something like the above code example is possible..
I've used CVSPS to do things like this. It assembles groups of check ins into sets that it calls a "patchset". It has all kinds of features to search for patchsets created by specific users, between dates, patchsets that affect a certain file, etc. It can also create diff reports of patchsets, which is extremely helpful to find what changed.
http://www.cobite.com/cvsps/
I have a workaround-type solution to this now. I'll share it but I'm still very much interested in knowing how to do this / if this can be done.
The workaround:
Check out two copies of the code based on certain dates
and do a directory diff with something like Beyond Compare.
Problem:
What changes were made on or around June 25th?
Solution (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.
It's not the most elegant solution, to be sure, but it works. As long as the date range is not too large and the project is not crowded with developers, most changes that show up will be the ones that you are looking for.
Obviously, given the somewhat kluge-like nature of this, I'm still very much interested in a more elegant solution and I'll hold this question open for now in case someone has some input.
Note (5 years later, Sept. 2016)
The documentation around tools to import from CVS has been updated.
See commit 106b672, commit 72e0877, commit 1eba3e5 (22 Sep 2016) by Jeff King (peff
).
(Merged by Junio C Hamano -- gitster
-- in commit 3d0049e, 03 Oct 2016)
cvsps (www.cobite.com/cvsps
) is now at github.com/andreyvit/cvsps
.
git cvs
migration now includes the following warning:
These instructions use the
git-cvsimport
script which ships with git, but other importers may provide better results. Seegit cvsimport
And gitcvsimport
warns:
WARNING:
git cvsimport
usescvsps
version 2, which is considered deprecated; it does not work withcvsps
version 3 and later.
If you are performing a one-shot import of a CVS repository consider usingcvs2git
orcvs-fast-export
.
精彩评论