views:

71

answers:

1

I am looking for a way to join two revision histories for a single file.

One of our projects was tracked via RCS. Now, this project lives in CVS. It was initially committed as a new project. As a result, the CVS history does not show the older revisions that were tracked via RCS.

For example, suppose file foo.c was revised 10 times in RCS, then 2 times in CVS. RCS has versions 1.1 through 1.10, and CVS has versions 1.1, 1.2, and 1.3. RCS version 1.10 and CVS version 1.1 are identical.

I am trying to create a combined history such that foo.c shows 12 versions, 1.1 through 1.12. Since CVS stores revisions in the same file format as RCS, it should be a simple matter of beginning with the existing RCS file, then checking in the new changes with the "ci" command (preserving the timestamps, the userids, and commit messages). Any CVS tags would also need to be preserved. This new RCS file would then have the full history, which could then be added to the CVS repository, replacing the old version.

Assume that there are no branches in this codebase. Just straight line development.

Does such a utility program already exist?

+1  A: 

If it's a single file and you don't have to transfer a big number of revisions, you can always checkout from old versioning system one revision at a time and commit that in the new versioning system (most verisoning system metadata can co-exist in the same directory)… this method works, of course, whatever is the source and destination versioning system and that's what I personally did when I had a problem similar to yours.

Or you could try the Tailor tool, which can convert from/to many versioning systems, though I don't really know if it can also "merge" two different histories in a single one like you need to.

lapo