convert_clearcase - convert ClearCase repository to SubVersion
convert_clearcase [options]
This program converts a ClearCase repository to a SubVersion one.
For each object in ClearCase, it retrieves historical information,
gets the version data and checks each one into SubVersion. It
remembers the original checking-in user, date and command as
well as each revision comment.
Note: this was only tested on one specific ClearCase repository that
does not use branching. Use this at your own risk.
This program takes many options (many of them required), and it's
not really practical to run this command multiple times by typing
them all on the command line. Instead, it's much better to make a
purpose-built script that calls it with all the options that you
need. Not only is this easier, but it insures that each run has
the same parameters.
# run-conversion
exec perl convert_clearcase.pl \
--userealusers \
--lcaseusers \
--logfile="conversion_log" \
--loglevel="3" \
--ccpath="/home/src/" \
--ccsubpath="com/mycompany" \
--skipdir="ejbcgen" \
--svnserver="192.26.158.1" \
--svnrepos="my-repository" \
--svnuser="svnuser" \
--svnpass="foo"
Berkeley DB files - use 4.2.x or higher as 4.1.x has some issues
which may cause SVN repository corruption, much slower too.
- --help
-
Show a brief help listing to the standard error, then exit with success status.
- --testmode
-
Show the commands we would execute, but don't actually execute them; useful for
testing and finding the scope of a conversion.
- --userealusers
-
Only set this if the users in clear case history are existing SVN users
otherwise commits will fail.
-
Easy way to work with this, run a test conversion first with this setting
at 0, then use the above mentioned 'userfile' as the user file for Subversion
(in repository/conf/). Do a real run with this set to '1' and you'll guaranteed
the users exist! Of course, since all have same password you may want to remove
them right after the conversion and go back to your normal security model.
- --lcaseusers
-
Convert usernames to lower case when checking files into subversion;
see also the --userealusers parameter.
- --logfile=F
-
Save log output to file F; see also the --loglevel parameter.
- --loglevel=N
-
Set the level of verbosity in the logfiles (specified with --logfile) to N.
-
0=none; 1=summary; 2=more; 3=lots
- --cccomand=C
-
The command used to invoke ClearCase.
- --ccpath=PATH
-
Use PATH as the source of the ClearCase tree to convert. This parth of the path
is not pre-pended to the Subversion path; see also --ccsubpath
-
This option is required.
- --ccsubpath=PATH
-
Sub path to clear case tree, this will be appended to --ccpath
Used if there's more than one set of source trees under the default path and only one should be converted.
This path is pre-pended to the SVN path, so ``svn-repository/path/''
Will become ``svn-repository/this-path/path-from-conversion''; see also --ccpath
- --ccbranch=B
-
Process only ClearCase branch B into Subversion; only one branch
can be converted at a time. Default is ``main''.
- --skipdir=D
-
ClearCase Directories to skip when converting. - This is used in a regex so separate by |
This is only used when generating intial subversion paths, it is
assumed that there are no ClearCase files in these directories.
- --svncommand=C
-
Command to invoke subversion defaults to ``svn''
- --svnserver=SVR
-
Use SVR - hostname or IP - for the SubVersion server. Defaults to localhost.
- --svnctype=TYPE
-
Use connection type TYPE when connection to the SubVersion server.
Valid options are svn, svn+ssh, file and http, but we've
only tested svn (which is the default).
- --svnrepos=REPOS
-
Specify the SubVersion repository as REPOS. This option is required.
- --svnrepospath=PATH
-
Path to subversion repository. Default is /home/--svnrepos.
- --svnuser=USER
-
Use USER as the Subversion user.
- --svncpass=PASS
-
Use PASS as the password for the SubVersion repository.
- --workingdir=DIR
-
Use DIR as the working directory for the script. Defaults to current working directory.
- --datelimit=DD-MM-YYYY
-
Process only history going back to this date, in DD-MM-YYYY form.
If --countlimit is also specified, the first limit reached is
dispositive.
- --countlimit=N
-
Process only N events, exiting thereafter. If --datelimit
is also specified, the first limit reached is dispositive.
- --userfile=F
-
Provide a filename to dump all the user data into; see also --userealusers
- --commits=N
-
If commit fails, sleep and retry up to N times. Defaults to 10.
- --commitsleep=N
-
If commit fails, sleep for N seconds before retrying. Defaults to 60.
- --exitfile=F
-
If this file is found in the working directory, this program
exits gracefully after saving state and cleaning up properly.
One need only touch the file to trigger this.
- --dbfile=F
-
File in which to store conversion history information. This is used if running the conversion
more than once. Each time a version of a file is converted, the script stores that information
and will not attempt to convert the same version again -- only any non-converted ones.
- --sleepfile=F
-
While this file exists the script will sleep and resume its processing when the file
is removed. See also B<--exitfile>
This program is not a comprehensive conversion tool and has some limits.
It doesn't deal with branching - only one branch is supported
It doesn't convert directory information; it generates it
by checking in each version.
It doesn't retrieve information for deleted files; only files that
are currently visible in ClearCase are converted.
It doesn't retrieve information on moved files, only the existing version.
ClearCase supports spaces in user names; SubVersion does not. Spaces
in user names are removed during conversion.
Kasia Trapszo ktrapszo@unix-girl.com