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

查看:87
本文介绍了从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视图导入到re levant ClearCase将位于分支目录中的Subversion文件的不同副本分支。然后在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:


  • 标签

  • 主干头

  • 已声明分支的头

导入分支时,这意味着创建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天全站免登陆