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?
Thank you
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?
Thank you
This technote does mention:
ClearCase does not provide a tool to import from Subversion to maintain version history.
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.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
- The fist is to create a series of batch files that need to be executed after the utility runs. The batch files, when executed, will then insert the source files into CC.
- The second is to directly insert the records into CC from the utility. You can choose what option is best for you project.
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.
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%
)
This is similar to this thread answer:
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.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.