Question

I'm converting a large, multi-project CVS repository into Subversion using cvs2svn. It's working really nicely, but there are a few CVS projects that really ought to be branches of other projects.

Using an options file I'm able to specify that the trunk of project 'ShouldBeBranch' should be placed in '/OtherProject/branches/ShouldBeBranch', but I can't find a way of avoiding creating Subversion directories for the tags and branches of the ShouldBeBranch project (which are empty, but still created).

The only option I can see at the moment is to delete the directories from Subversion once the conversion has completed, but I was wondering if anyone knew a way that this could be done within the conversion process? I'm also looked at the symbol hints file, but with 270 projects specifying a project by index number looks too difficult!

Many thanks, David

Was it helpful?

Solution

Presumably your "ShouldBeBranch" project itself has branches and tags. Where do you want those to end up?

If you only want the trunk of the "ShouldBeBranch" project to be included in the conversion:

  • exclude all other symbols from the "ShouldBeBranch" project
  • set its trunk_path to a path within the other project
  • set the branches_path and tags_path to None in your options file (this prevents them from being created)

The part of your options file that adds the "ShouldBeBranch" project will thus contain lines like this:

run_options.add_project(
    # ...
    trunk_path='OtherProject/branches/ShouldBeBranch',
    branches_path=None,
    tags_path=None,
    # ...
    symbol_strategy_rules=[
        ExcludeRegexpStrategyRule(r'.*'),
        ],
    )

OTHER TIPS

Doing the fixups after the import seems like the best thing to me. If you svn move project\trunk of a project to branch\something, Subversion will just track history.

This blog post describes a way to do rename paths using a dump/load cycle. This way will change history, such that when you look back at the history of files it would seem that they have always been inside branch\something.

If you were to go back to the old version, you would expect it to be in project\trunk. Therefore I don't think it's a good thing to try to change history.

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