Reputation: 33834
How do I get a list of all the files have haven't been changed in the past year in a repository in CVS?
Upvotes: 3
Views: 330
Reputation: 57036
If you have access to the repository, you can do a search to look for files that have a last-modified date of over a year ago. In CVS, each file has a corresponding repository file. (This wouldn't work in Subversion, since the repository is in an opaque format.)
Upvotes: 1
Reputation: 13926
We can easily do this using ViewVC (or ViewCVS as it was called formerly). What it does is build a SQL database of all files and their commits (with comments and authors) that you can easily query in many ways.
You can download it from http://www.viewvc.org/. You will have to set up a MySQL server to store the data and have access to the physical repository directory on the CVS server to import your existing repository commits via the cvsdbadmin
tool:
cvsdbadmin rebuild /var/lib/cvs
where /var/lib/cvs
is your repository location. The database connection info is stored in the ViewVC config file.
Depending on the repository size this might run anywhere from a few seconds to several hours. Once it is finished, you can use regular SQL query tools to find out all sorts of information about your commits - we use it to very quickly generate change logs. Using a CVS loginfo script (also included with ViewVC) we update the database on-the-fly whenever someone commits a file to CVS.
It can also be very helpful if you committed something by accident (see this blog post); as CVS commits are not transactional this can be a tough one to figure out.
Upvotes: 1
Reputation: 5344
CVS diff option to show identical files (--report-identical-files) seems broken, at least for me. You can just checkout old version:
cvs co -D "1 year old" proj
And use good old diff to find identical files:
diff --recursive --report-identical-files --brief | grep identical
Upvotes: 0
Reputation: 24936
The only way I can think to do this is to get a list of every file changed in the last year (here I use 2008-05-08 as the one year ago date):
cvs history -c -D2008-05-08
and compare against a listing of every file currently in the repository. Those not in the listing generated by cvs history
have not been modified in the last year.
Upvotes: 1