[p4] Migrate p4 depot to RCS or CVS? :-/

Barrie Slaymaker barries at slaysys.com
Tue Jul 31 05:54:37 PDT 2001


[revml support list Cced]

On Mon, Jul 30, 2001 at 09:27:33AM -0400, Chris Shenton wrote:
> I'm taking over a project we developed within P4 to a start-up that
> can't afford to buy P4 at this time.  Any suggestions on how I can
> migrate the depot from P4 to RCS or CVS, losing as little data as
> possible? 

VCP should do the trick for you.  It does p4->cvs in addition to doing
cvs->p4.  Try doing a 

   perl -MCPAN -e 'install "VCP"'

on a Unix box and then set up your CVSROOT using "cvs init" and do
something like:

   vcp p4:user:password:server:port://depot/... cvs:module

Here's a quick example:

   $ cd /var/tmp
   $ mkdir cvsroot
   $ export CVSROOT=/var/tmp/cvsroot/
   $ cvs init
   $ mkdir public
   $ cd public
   $ cvs import -m "public import" public public_vendor public_release
   $ cd ..
   $ vcp p4:public.perforce.com:1666://public/... cvs:public
   Directory /var/tmp/cvsroot/public/perforce added to the repository
   Directory /var/tmp/cvsroot/public/perforce/faq added to the repository
   RCS file: /var/tmp/cvsroot/public/perforce/faq/admin.html,v
   done
   Checking in perforce/faq/admin.html;
   /var/tmp/cvsroot/public/perforce/faq/admin.html,v  <--  admin.html
   initial revision: 1.1
   done
   RCS file: /var/tmp/cvsroot/public/perforce/faq/beginner.html,v
   done
   ...<snip LOTS of cvs output>...
   Checking in revml/t/90cvs.t;
   /var/tmp/cvsroot/public/revml/t/90cvs.t,v  <--  90cvs.t
   new revision: 1.16; previous revision: 1.15
   done
   Checking in revml/t/90p4.t;
   /var/tmp/cvsroot/public/revml/t/90p4.t,v  <--  90p4.t
   new revision: 1.12; previous revision: 1.11
   done
   $

You'll need version 0.222 for that all to work, which is headed out now.
Best bet is to install from CPAN as above, so CPAN will install all the
dependancies that VCP needs, then get

   http://slaysys.com/src/VCP-0.222.tar.gz

and do the usual

   tar xzf VCP-0.222.tar.gz
   cd VCP-0.222
   perl Makefile.PL
   make && make test && make install

to get the latest version (CPAN typically takes a day or so to propogate
the latest releases).

- Barrie



More information about the perforce-user mailing list