[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

incremental conversion from other SCM to svn by vcp

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2003-06-07 16:28:12 CEST

Hi,

I have been working on the subversion destination driver
of VCP (http://public.perforce.com/public/revml/index.html)

the motivation is to be able to convert a live repository
into a branch in a subversion repository, and be able to
convert new commits from the remote repository to that branch
later on. this is good for working on aggresive changes to
a project that still sticks with cvs.

I've just converted VCP from its original perforce depot to
http://svn.clkao.org/revml/. the trunk has the svn destination
driver I added.

If you are interested in trying out:

* checkout http://svn.clkao.org/revml/trunk
* move away the ui_machines directory
* perl Makefile.PL; make install
* a typical .vcp file for converting cvs to svn is like:

Source: cvs::pserver:user@host:path/to/repo:modulename --continue

Destination: Destination: svn:file:///tmp/vcprepo: --init-svnrepo

Map:
        modulename/(...)<> trunk/$1
        modulename/(...)<(*)> branches/$2/$1

* run: vcp vcp:- < your .vcp file
* you'll have to keep the vcp_state directory for incremental
  conversion.

the cvs source driver of vcp could parse rcs file as well as
cvs log output. but in my real tests, it seems to fail with
large cvs repositories. barries (vcp author) is looking at
the problems I reported.

as you could guess from the Map section above, branches are
translated to the svn convention. the current implementation
in the svn driver guesses the branch point and does `svn cp',
but there should be more checks before doing so.

after the first run, you should remove the --init-svnrepo option.
note that if the repository is not created by vcp, you need to
make the pre-revprop-change hook exit with 0, since currently
we use propset --revprop to set the commit time and author.

as for performance, it took one hour to convert 612 revisions
from p4 to svn. currently vcp invokes `svn' to do everything.
native perl binding to subversion could help a lot.

in the future, if someone happens to write the vcp source driver
of svn, this could be a way to do inter-repository copying
preserving revisions on both sides, which is good for long-time
offline working.

Hope this helps :)

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 7 16:28:59 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.