使用CVS时需要将项目主干转换为分支

发布于 2024-07-22 04:08:55 字数 376 浏览 6 评论 0原文

我正在使用 cvs2svn 将大型多项目 CVS 存储库转换为 Subversion。 它工作得非常好,但是有一些 CVS 项目确实应该是其他项目的分支。

使用选项文件,我可以指定项目“ShouldBeBranch”的主干应放置在“/OtherProject/branches/ShouldBeBranch”中,但我找不到避免为标签和分支创建 Subversion 目录的方法ShouldBeBranch 项目(为空,但仍已创建)。

目前我能看到的唯一选择是在转换完成后从 Subversion 中删除目录,但我想知道是否有人知道在转换过程中可以完成此操作的方法? 我还查看了符号提示文件,但有 270 个项目,通过索引号指定项目看起来太困难了!

非常感谢, 大卫

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

徒留西风 2024-07-29 04:08:55

想必您的“ShouldBeBranch”项目本身就有分支和标签。 你希望这些最终去向哪里?

如果您只想将“ShouldBeBranch”项目的主干包含在转换中:

  • 从“ShouldBeBranch”项目中排除所有其他符号
  • 将其 trunk_path 设置为其他项目内的路径
  • 将选项文件中的 Branches_path 和 Tags_path 设置为 None (这会阻止创建它们)

因此,选项文件中添加“ShouldBeBranch”项目的部分将包含如下行:

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

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'.*'),
        ],
    )
跨年 2024-07-29 04:08:55

对我来说,导入后进行修复似乎是最好的事情。 如果你将项目的project\trunk移动到branch\something,Subversion将只跟踪历史记录。

这篇博客文章描述了一种方法使用转储/加载循环重命名路径。 这种方式会改变历史记录,这样当你回顾文件的历史记录时,它们似乎一直在分支\某物中。

如果您要返回到旧版本,您会期望它位于项目\主干中。 因此我认为试图改变历史并不是一件好事。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文