Need to convert project trunk to branch when using CVS
I am converting a large multi-project CVS repository to Subversion using cvs2svn. It works very nicely, but there are a few CVS projects that really should be branches of other projects.
Using the options file, I can specify that the "ShouldBeBranch" project's trunk should be placed in "/ OtherProject / branches / ShouldBeBranch", but I can't find a way to avoid creating Subversion directories for the tags and the ShouldBeBranch project branch (which are empty, but all are created).
The only option I can see at the moment is to remove directories from Subversion after the conversion is complete, but I was wondering if anyone knows how to do this during the conversion process? I also look at the symbol hints file, but with 270 projects pointing the project by index number, it looks too complicated!
Thanks a lot David
a source to share
Presumably your "ShouldBeBranch" project has branches and tags. Where do you want them to end up?
If you want the "ShouldBeBranch" project connector to be included in the transformation:
- exclude all other symbols from the "ShouldBeBranch" project
- set your trunk_path to path in another project
- set the branch_path and tags_path to None in your options file (this prevents them from being created)
The part of your options file that the ShouldBeBranch project adds will thus have lines like this:
run_options.add_project(
# ...
trunk_path='OtherProject/branches/ShouldBeBranch',
branches_path=None,
tags_path=None,
# ...
symbol_strategy_rules=[
ExcludeRegexpStrategyRule(r'.*'),
],
)
a source to share
Post-import patching seems to be the best for me. If you svn move the \ trunk of the project to branch \ something, Subversion will just keep track of history.
This blog post describes a way to rename paths using a dump / load cycle. This way will change the history, so when you look back at the history of the files, it seems that they were always inside the \ something branch.
If you go back to an older version, you expect it to be in the \ trunk project. So I don't think it's good to try and change history.
a source to share