Question

I have a CVS repository with a directory containing two vendor branches. The initial code was obtained from one source and checked in with a vendor name say X. Several years later, new code was checked in with another vendor branch name Y.

If I view the rcs file (FILE,v) in a text editor, I see X:1.1.1, a few tags... and then Y:1.1.1

This hasn't caused any issues that I'm aware of in using CVS, but now I want to migrate to Subversion using cvs2svn.

I get errors from cvs2svn like the following:

WARNING: in '/home/cvs/src/contrib/one-true-awk/FILES,v': branch '1.1.1' already has name 'Y', cannot also have name 'X', ignoring the latter

Ideally, I'd like to use the newer vendor tag Y for the entire history, but I'd also be willing to make it go away and use the older tag. Either way, I need to clean this up so that cvs2svn can convert the repository to Subversion.

Are there any commands I can run on the files from CVS to repair this mess or manual steps in the ,v file I can do? I've tried removing the newer Y branch line, but that alone doesn't work due to the crazy numbering in the commits. A 1.2 revision was created due to the second import and it's causing cvs2svn to fail as well.

Was it helpful?

Solution

I ended up asking on the cvs2svn users mailing list. I received the following response from Michael Haggerty:

I don't believe that this error can come from importing twice. AFAIK each time you import you would create a new vendor branch; e.g. 1.1.1, 1.1.3, etc. (the last number is always odd for vendor branches), and each vendor branch would get its own symbolic name. The situation you are experiencing is that you have only one vendor branch, 1.1.1, and it somehow has two symbolic names, 'X' and 'Y'.

If you tell cvs2svn just to ignore the unwanted symbol name, then the conversion should go through without complaints. To do this, you need to start cvs2svn via the options-file method and then use a IgnoreSymbolTransform. See cvs2svn-example.options for documentation.

If you want to be super-careful, you might first want to verify that the symbol name that you are ignoring is really redundant in every file. Or, I think it would also work to transform the unwanted symbol name into the wanted symbol name, because cvs2svn ignores symbols that appear twice with the same value. This would require something like

RegexpSymbolTransform(r'X', r'Y')

I then used the IgnoreSymbolTransform to hide the extra symbols.

Additionally, I ran into a secondary error due to files that had been patched in HEAD and then a newer import occurred. By force committing the files, I was able to get them back onto HEAD and avoid this:

ERROR: File '/home/cvs/src/contrib/one-true-awk/FIXES,v' has default branch=1.1.1 but also a revision 1.2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top