我正在尝试使用 cvs2svn 从 CVS 转换为 SVN,我们希望布局在每个项目中都有主干/标签/分支。首先我尝试了这个:
sudo cvs2svn -s /build/svn-test3 /build/cvs2016-02-08
这没有给我正确的布局。我将主干/标签/分支作为顶级目录,我的所有项目都在主干中。所以我开始搞乱选项文件方法并想出了这个:
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'),
)
但现在我得到了大量的歧义和错误:
cvs2svn ERROR: Problems determining how symbols should be converted:
CVS 中的标记、分支或导入似乎都有问题,并且 CVS 中没有遵循分支和标记的命名约定,因此实际上没有任何方法可以制定简单的规则来强制使用正则表达式的标记或分支。
以下是我正在使用的交易品种策略规则(我尝试了这些的各种组合,但我总是得到相同的结果):
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(),
]
两个问题:
为什么我在使用选项文件而不是在命令行上使用默认转换选项时会出现歧义?
有没有办法在不手动浏览我的 4600+ 行 symbol-info.txt 文件的情况下修复它?