从 SVN 迁移到 ClearCase [英] Moving from SVN to ClearCase

查看:18
本文介绍了从 SVN 迁移到 ClearCase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,这次正好相反——我需要将一个基于 SVN 的项目迁移到 ClearCase.是否有任何工具可以让这个过程变得更容易一些(而不是将自定义脚本放在一起),是否有任何有这样做经验的人的问题?

So, it's the opposite way round this time - I need to migrate a SVN-based project into ClearCase. Is there any tools out there that'd make the process a bit easier (rather than putting together a custom script) and are there any gotchas from anyone who has had experience doing this?

谢谢!

推荐答案

如前所述 这里 (ibm)这个线程,没有直接的工具可以将 SVN 数据导入 ClearCase.

As mentioned here (ibm) and in this thread, there is no direct tool to import SVN data to ClearCase.

这意味着自定义脚本将您的 SVN 工作区设置为相关里程碑,然后 clearfsimport 将它们导入具有正确"配置规范(即配置规范")的 ClearCase 视图.

That means a custom script setting your SVN workspace to relevant milestone, and then clearfsimport those into a ClearCase view with a "proper" config spec (i.e. "configuration specification").

我的意思是,ClearCase 视图将位于分支目录"中的 Subversion 文件的不同副本导入到相关的 ClearCase 分支中.然后在 ClearCase 导入视图中以正确的顺序导入标签"(仍在 SVN 存储库中复制),并在这种导入之后立即设置标签.

By proper, I mean a ClearCase view importing into the relevant ClearCase branch the different copies of Subversion files located into 'branch directories'. And then importing in the right order the 'tags' (still copies in the SVN repo) in the ClearCase import view, with a label set right after that kind of import.

所以主要的问题"是盲目导入所有 SVN 结构:这将导致实际目录根本不应该出现在 ClearCase 中,因为分支和标签是这个工具的一等公民,而不是像 SVN 中的廉价副本.

So the main 'gotcha' is to blindly import the all SVN structure: that would result in actual directories which should not be present at all in ClearCase, since branches and tags are first-class citizen with this tool, and not 'cheap copy' like in SVN.

一个好的脚本开始(当然也适应)是 svn2git 确实检测 SVN 分支和标签,并尝试将这些目录"的内容导入 git,(但也可以通过对clearfsimport"命令的正确系统调用将它们导入 ClearCase').

A good script to start with (and to adapt of course) would be svn2git which does detect SVN branches and tag, and try to import the content of those 'directories' into git, (but could also import them into ClearCase, through the right system call to the 'clearfsimport' command').

由于单个修订版的导入可能相当长,因此现实的方法是将脚本限制为仅导入:

Since the import of a single revision can be fairly long, a realistic approach would be to limit the script to only import:

  • 标签
  • 后备箱头部
  • 声明分支的HEAD

导入分支时,即创建brtype,然后设置标签(起点),最后更改配置规范以获得以下选择规则:

When importing branches, that means creating the brtype, and then setting a label (a starting point), finally changing the config spec in order to get the following selection rules:

element * .../svnBranch
element * STARTING_LABEL -mkbranch svnBranch
element /main/0 -mkbranch svnBranch

重要的一点是在SVN中没有代表分支和标签的目录的情况下获得最终结果.
从那里,您将能够将主目录移动/重命名为您想要的任何结构,例如适合 UCM 组件声明的结构(如果您想使用 UCM).

The important point is to have an end result without the directories representing branch and tag present in SVN.
From there, you will be able to move/rename the main directories into whatever structure you want, like the one suited for UCM component declaration (if you want to use UCM).

这篇关于从 SVN 迁移到 ClearCase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆