I'm in the process of converting several large CVS repositories to git repositories. I've run git cvsimport, now I need to update some in-house tools that rely on the cvs revision numbers. The revision numbers are significant in that they are stored in a database to track which versions of particular files have been deployed. I need to update file revision numbers in the database with the corresponding commit hash in the cvsimport'ed git repository. Is there any way to take any arbitrary revision number for any file, and figure out the git commit hash that particular change was made on?
Asked
Active
Viewed 166 times
1 Answers
0
Use need to use the "-R" option in git cvsimport:
-R
Generate a $GIT_DIR/cvs-revisions file containing a mapping from CVS revision numbers to newly-created Git commit
IDs. The generated file will contain one line for each (filename, revision) pair imported; each line will look like
src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
My version of git with that option is 1.7.0.4

Rob Jacob
- 1
- 3