java - Most robust way to convert a CVS repository containing Eclipse projects to git? -
i have situation have elderly cvs repository convert git once , while keeping full history etc.
all folders @ root of repository contains eclipse projects (either plain or dynamic web projects) including .classpath , .project. use team projectsets check out projects need given task (where project set located in project containing main, , rest library projects).
when team projectset checked out, workspace populated.
this approach has worked pretty many years (except project set part came 3.5), , work in similar way git if possible, uncertain how.
i've played git cvs import
failed - due not using modules.
how suggest this, , how should work git allow our current usage of shared library projects? have introduce maven , create maven modules our library projects? or ant ivy?
edit: i've managed convert our cvs repository subversion suitable cvs2svn invocation , found eclipse recognizes resulting subversion repository nicely. unfortunately after cloning http://github.com/iteman/svn2git` , trying run bin/svn2git get
tra@sandbox:~/cvsgit/svn2git/svn2git$ bin/svn2git bin/svn2git:35:in `initialize': wrong number of arguments (2 1) (argumenterror) bin/svn2git:35:in `new' bin/svn2git:35
this ubuntu 10.04.1 lts server , i've tried various sudo things ruby , gems without understanding did not ruby programmer may have messed things bit. i'd appreciate advice - if easiest install linux variant conversion, fine.
edit:
https://help.ubuntu.com/community/git http://css.dzone.com/articles/subversion-git-morning
edit: first try default svn2git completed (after while), , nice repository git branch -a
reports
tra@sandbox:~/gitroot/svnroot$ git branch -a * master remotes/xx64_deployed_code remotes/beta1 remotes/beta2 remotes/sv46 ... lots more
we interested in being able check out sv46 branch , work (we not care tags, actual branches). have set gitosis , pushed repository gitosis, , cloned computer find out how "work sv46" bit eclipse. that repository not know of branches:
tra@tra ~/git/git00 (master) $ git branch -a * master remotes/origin/head -> origin/master remotes/origin/master
do need massage original result svn2git information gitosis repository? need clone argument? should redo svn2git step suggested version instead of 1 shipping ubuntu?
edit: turned out publishing svn2git generated repository "git push --mirror" made things shown in gitosis repository. see following inside gitosis (trimmed):
tra@sandbox:/srv/gitosis/repositories/git01.git$ git branch -a * master remotes/xx64_deployed_code remotes/basic_beta1 remotes/beta1 remotes/beta2 remotes/sv46 ... lots more tra@sandbox:/srv/gitosis/repositories/git01.git$ git branch * master tra@sandbox:/srv/gitosis/repositories/git01.git$ git tag -l tra@sandbox:/srv/gitosis/repositories/git01.git$
trying clone repository git clone gitosis@sandbox:git01 -b remotes/sv46
or git clone gitosis@sandbox:git01 -b sv46
both tell me remote branch not found upstream origin, using head instead.
am barking wrong tree?
first of all, using submodules independent parts of central vcs repository (i.e. cvs repo) (see "what git limits?").
mean end many independent git repo, "set of files evolving independently 1 another", why submodules exist.
so multiple git import (in multiple repo) required.
but since git cvs import
not task, recommend:
- cvs2svn in order svn repo first (just 1 repo)
- svn2git in order convert svn repo git 1 (i.e. transforming svn branches git branch and svn tags git tags)
Comments
Post a Comment