KitzKikz  KitzKikz: MigratePVCStoSubversion   RecentChanges 
 PopularPages 
 SearchPages 
 Home | Trail - KitzKikzSoftware > TestCase > LibraryThingForIp... > MigratePVCStoSubv...
 
 

Migrating from PVCS to Subversion

I found myself needing to migrate 17 years worth of a corporation's PVCS repositories to Subversion (svn).

There is an excellent and free tool at http://www.polarion.com/products/svn/svn_importer

The included documentation is good, but not great. Searching the web for more answers did not turn up much. So, I'm sharing my notes below for the next lucky soul. Maybe, when the motivation strikes, I'll write up a "How To".

Svn-Importer Executes in Phases

  1. pcli listversionedfiles
  2. pcli vlog -- Parses the vlog to learn about all revisions, properties, comments, and version labels. The parser is pretty good unless your developers have taken to using a series of dashes in their comments. I suggest running the vlog yourself beforehand, searching for all such comments (see perl below), and modifying them in the PVCS GUI. Look for any lines containing a series of dashes not immediately followed by a "Rev ..." line of text. Simply remove any series of dashes in a comment.
  3. pcli get -- Does a get of all revisions of all files into a temporary directory, see note about disk space requirements.
  4. Creates the dump files while running checksums against the files pulled in step 3 (see config.properties xxx).
  5. Cleans up temporary files and exits (see config.properties "disable_cleanup")

Line Endings

Do the conversion on the same platform that your PVCS repository is hosted on. If your PVCS projects are hosted on a unix platform, then execute pcli, svn-importer, and svnadmin on unix. They don't all have to be on the same machine, just the same flavor of OS. While all these tools are cross platform, that does not mean you should do the conversion across platforms. Once you have the final subversion repository, you may move that to wherever you like.

Disk Space

WARNING: This process needs a lot of disk space, two to three times the size of your PVCS repository. PVCS stores your revisions as deltas, but svn-importer expandes them all out to full size during the "pcli get" phase. These temporary, full-sized, revisions stay until the dump files are complete. Even though svn-importer places deltas in the dump files, they'll take up about as much disk as your original PVCS repository. For example, I had one versioned file in PVCS containing over 500 revisions adding up to 4Gb with deltas. Svn-importer needed 9Gb to get the revisions out of PVCS plus 4Gb to generate the dump file. After loading the dump file into subversion, the result of this single file was 3.5Gb (Subversion's delta algorithm is superior to PVCS).

Memory

In phase 2, svn-importer parses the vlog completely in the java heap. A large project with a lot of revisions may cause the heap to overflow. I modified the "JAVA_OPTS=-Xmx100m" in run.sh to 500m. I didn't have any problem with the heap after that.

Log Files

Svn-Importer does not manage to write to it's log file if there is an error. I suggest capturing the output of the command using redirection. Also, use the property "disable_cleanup=yes" while you troubleshoot the conversion process. You may have to run the pcli commands (without the -q) yourself to find out what caused svn-importer to stop. The pcli error messages are not captured by svn-importer anywhere.

Promotion Groups

Svn-Importer does not transfer PVCS Promotion Group information. Instead, recursively assign version labels to match the promotion groups. Svn-Importer will create tags for these version labels. Then, in subversion, you can switch these tags into branches.

Some Helpful Shell Scripts

Find comments in vlog that contain dashes

perl -e 'while(<>){next if $_ !~ m/----/; $x=<>; print "$.\t$x" }' < vlog.txt | grep -v Rev

Assign Version Label to Promotion Group

for pgroup in Development-1 Development-2 Integration UAT Production
do
   plabel=$(echo $pgroup | sed 's/-//g')
   pcli run -y Label -pr''project_name'' -v"svnbranch_$plabel" -r"$pgroup" -z /
done

Copy a tag to a branch in Subversion

svn copy ''svn-path''/tags/svnbranch_Production ''svn-path''/branches/Production

 

 

 
 EditThisPage · LinksToPage · PageInfo 04/02/16 13:45:38  ·  0.0403s