py42svn/Documentation

A converter script written in Python to import a Perforce repository into Subversion.

Prerequisites

p4python

  • download p4python.zip
  • mkdir /p4python && cd ~/p4python && unzip ~/p4python.zip
  • download p4api.tar
  • tar xf /p4api.tar (this will create a new sub-directory, e.g. p4api-2007.2.122958)
  • edit setup.cfg (set p4_api=p4api-2007.2.122958)
  • python setup.py build
  • python setup.py install

Database Setup

sqlite3 py42svn.db <py42svn.sqlite

Invocation

export P4PORT=perforce.openwatcom.org:3488
export P4CLIENT=client
export P4USER=User
export P4PASSWD=secret
./py42svn.py //depot/openwatcom/=/trunk/ //depot/ow_devel/plusplus.dev/=/devel/ | gzip -c > openwatcom.dump.gz