SVN项目导入到ClearCase [英] SVN project import to ClearCase

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

问题描述

我有一个坚持使用Clearcase的客户。是否有任何工具/脚本可以让我的团队导入SVN项目?我的团队项目实际上将在SVN中。如何将SVN项目导入Clearcase?

I have a client who is rather insistent about using Clearcase. Are there any tools/scripts that would allow my team to import SVN projects? My team projects actually will be in SVN…. How do I import SVN project to Clearcase?

谢谢

推荐答案

技术说明确实提到:


ClearCase不提供从Subversion导入以维护版本历史记录的工具。

ClearCase does not provide a tool to import from Subversion to maintain version history.

如果您对维护版本历史记录不感兴趣,仅希望从最新版本或预先选择的配置开始,可以使用clearfsimport命令。查看关于 clearfsimport cleartool man clearfsimport 了解更多信息。

If you are not interested in maintaining version history and merely wish to start from the latest version or a preselected configuration, you can use the clearfsimport command. Review the ClearCase Command Reference Guide on the topic of clearfsimport (cleartool man clearfsimport) for more information.

如果您需要版本历史记录,则可能需要评估开源工具 svn2cc

If you require version history, you may want to evaluate the open source tool svn2cc.

该项目可能已过时,但在此线程

That project might be obsolete, but is detailed in this thread:


该实用程序通过两种方式进行操作

The utility does it in one two ways


  • 首先要创建一系列批处理文件,这些文件在实用程序运行后需要执行。批处理文件在执行后会将源文件插入CC。

  • 第二个方法是将记录直接从实用程序插入CC。您可以选择最适合您的项目的选项。

SVN转储文件包含您需要的所有数据。其中包括源文件及其关联的元数据(历史记录,作者等)。您的SVN管理员将能够为您生成转储文件。

The SVN dump file contains all the data you need. That includes the source file and its associated meta-data (history, author, etc). Your SVN administrator will be able to generate the dump files for you.






此<一个href = https://gist.github.com/inancsevinc/2367505 rel = nofollow noreferrer> GitHub脚本说明了简单方法(clearfsimport),允许您导入自己的后续svn修订版


This GitHub script illustrates the "simple" approach (clearfsimport), allowing you to import successive svn revision that you mention one by one:

@echo off

SET CC_VOB_DIR=
SET CC_VIEW_TAG=
SET CC_COMPONENT_NAME=
SET CC_VOB_NAME=
SET TMP_SVN_EXPORT_DIR=
SET SVN_URL=

@echo deleting directory %TMP_SVN_EXPORT_DIR%

rd /S /Q %TMP_SVN_EXPORT_DIR%
svn export %SVN_URL% %TMP_SVN_EXPORT_DIR% --force
clearfsimport -nsetevent -recurse -rmname %TMP_SVN_EXPORT_DIR% %CC_VOB_DIR%

IF %1==-b (
cleartool mkbl -view %CC_VIEW_TAG% -full -component %CC_COMPONENT_NAME%@\%CC_VOB_NAME% %CC_COMPONENT_NAME%
)

这类似于此主题答案

我这样做的方法是拿出一个代表里程碑构建或发行的svn标签列表,然后导入最早的到最新的,建立版本历史,有时甚至在

根据您的cvs或svn或....存储库的结构化程度,导入所有内容通常会导致版本树非常糟糕。我只有一种情况,他们对cvs分支非常专一,在这种情况下,导出/导入可以毫不费力地工作,结果是您可以并且希望在CC中使用它。

The way I do it is to come up with a list of svn tags that represent milestone builds or releases and then import those oldest to newest, building up a version history and sometimes even several branches in the process.
Depending on how "structured" your cvs or svn or .... repository is, importing everything often results in very bad version trees. I had only one case where they were very particular about the cvs branching where the export/import worked without fuss and the result was something you could and would want to work with in CC.

因此,花一些时间分析您的svn存储库,以及如何将其转换为CC分支并识别标签,并创建CC配置规范和clearfsimport从最早到最新的版本。

So spend some time analyzing your svn repository and how it would translate into CC branches and identify the tags and create CC config specs and clearfsimport oldest to newest.

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

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