Reposurgeon creates branches instead of tags

375 Views Asked by At

I'm trying to convert CVS to GIT by following this tutorial: http://www.catb.org/~esr/reposurgeon/dvcs-migration-guide.html

It looks OK overall, however for some CVS tags (and it looks like it starts at some point of time in the repository and then does that afterwards) instead of GIT tags, GIT branches are created.

Any idea why branches are created in the first place instead of tags?

These are mostly branches that are created when building by the automated build tool (basically one per build) + release branches (one per release). There are hundreds of these, so I'd like to make sure they are not created as branches, but as tags.

Is reposurgeon able to do this or even a right tool for the job?

FYI -- doing what this answer: https://stackoverflow.com/a/16404411/3821009 provides:

git tag BRANCH_A BRANCH_A
git branch -d BRANCH_A

results in:

error: The branch 'BRANCH_A' is not fully merged.
If you are sure you want to delete it, run 'git branch -D BRANCH_A'

so it looks like something is not attached properly here. Do you know what might be causing this?

2

There are 2 best solutions below

0
On

Using cvs2git might be a better option for you.
It'll convert your CVS tags to git tags, assuming that the CVS tag represents one revision of the repo (or can be faked easily enough). Otherwise you'll end up with a TAG.FIXUP branch, which can be taken care of by following the instructions in the Usage section of the link.

0
On

Author of reposurgeon here, I just became aware of this question.

What you are running into is not a reposurgeon bug. It's how cvs-fast-export coopes when it finds a tag that is not replicated across the enture set of masters...which means there was either a CVS operator error damage to the repository metadata.

cvs-fast-export tries to cope by creating a single-commit branchlet for the incomplete tag. This behavior is described on the manual page, but I guess it's easy to miss without the context of having seen one.