I'm trying to convert to SVN from CVS using cvs2svn and we want the layout to have trunk/tags/branches inside each project. First I tried this:
sudo cvs2svn -s /build/svn-test3 /build/cvs2016-02-08
Which didn't give me the right layout. I got trunk/tags/branches as top level directories with all of my projects inside trunk. So I started messing around with the options file method and came up with this:
cvs_repo_main_dir = r'/build/cvs2016-02-08'
projects = os.listdir(cvs_repo_main_dir)
# don't want to convert CVSROOT:
projects.remove('CVSROOT')
for project in projects:
run_options.add_project(
cvs_repo_main_dir + '/' + project,
trunk_path=(project + '/trunk'),
branches_path=(project + '/branches'),
tags_path=('tags'),
)
but now I am getting a large number of ambiguities and the error:
cvs2svn ERROR: Problems determining how symbols should be converted:
It seems to have a problem with everything that is a Tag, branch or import in CVS and there was no naming convention followed in CVS for branches and tags so there is not really any way to make simple rules to force tags or branches with regex's.
Here are the symbol strategy rules I'm using (I've tried various combinations of these but I always get the same result):
global_symbol_strategy_rules = [
#SymbolHintsFileRule('symbol-hints.txt'),
#ForceBranchRegexpStrategyRule(r'branch.*'),
ForceTagRegexpStrategyRule(r'[0-9]_[0-9]'),
ForceTagRegexpStrategyRule(r'RELEASE_'),
#ExcludeRegexpStrategyRule(r'unknown-.*'),
#ExcludeTrivialImportBranchRule(),
ExcludeVendorBranchRule(),
UnambiguousUsageRule(),
BranchIfCommitsRule(),
# Convert ambiguous symbols based on whether they were used more
# often as branches or as tags:
HeuristicStrategyRule(),
# Convert all ambiguous symbols as branches:
#AllBranchRule(),
# Convert all ambiguous symbols as tags:
AllTagRule(),
HeuristicPreferredParentRule(),
]
Two questions:
Why do I get ambiguities when I use the options file and not when I use the default conversion options on the command line?
Is there a way to fix it without manually going through my 4600+ line symbol-info.txt file?
Once again I have found the answer to my own question. The problem was that in my run_options.add_project section I didn't have a symbol_strategy_rules section so it was skipping over all of my rules.
Now for the next challenge:
Anyone think they can figure it out before me?