apc2svn - Import APC into subversion with resume-where-it-left-off
apc2svn --h # describes all options
Apply Rafael's perlpatch2svn to all diffs in APC skipping already applied patches. An initial run of this script took on my 1 GHz Athlon about 12 hours. Update 2003-09: 17 hours with my Athlon 2800. Yes, subversion is getting slower.
We assume, our current directory can be used as a working directory with only one subdirectory: APC. This is a mirror of
We further assume that the --url parameter is either an empty Subversion repository or one left over from a previous session. It should provide space for several GB of data. Note that after
svnadmin create you need to tweak the db/DB_CONFIG file: increase the values of the three lock variables to 8000. Run an
svnadmin recover afterwards. The latter may be redundant, but better safe than sorry.
The partition holding the svn repository should either have about 12 GB or you must remove BerkeleyDB log files while the script is running. See
db_archive how to do that. If the log files are removed, subversion needs hardly more space than the pure compressed patches.
The current directory is assumed to be a working directory for our own work. This script will create the subdirectory perl-wc/ (configurable via the --wc option), and we'll untar all historic perl distributions within the current directory, so we will create temporary directories like
Note http URLs: performance was catastrophic for me via http/DAV. Note file URLs: User must be same group as owner, umask should be 002. File URLs did not work for me for unknown reasons with subversion before 0.17.1. They worked fine with 0.17.1 and BerkeleyDB 4.0.14
The following file system layout is realized in the repository:
trunk/ branches/ perl/ 5.004_50/ ... 5.6.0/ ... 5.8.0/ ... 5.9.0/ not before there is a perl-5.9.0.tar.gz maint-5.004/ mbranch/ rel/ 5.004_00/ 5.004_01/ 5.004_02/ 5.004_03/ 5.004_04/ 5.004_05/ maint-5.005/ mbranch/ rel/ 5.005_01/ 5.005_02/ 5.005_03/ 5.005_04/ not before there is a perl-5.005_04.tar.gz maint-5.6/ mbranch/ rel/ 5.6.1/ 5.6.2/ not before there is a perl-5.6.2.tar.gz maint-5.8/ mbranch/ rel/ 5.8.1/ not before there is a perl-5.8.1.tar.gz tags/ branchpoints/ 5.004_00/ 5.004_01/ ... 5.004_50/ ... releases/ perl5.004.tar.gz/ perl5.004_01.tar.gz/ perl5.004_02.tar.gz/ perl5.004_03.tar.gz/ perl5.004_04.tar.gz/ perl5.004_05.tar.gz/ perl5.004_50.tar.gz/ perl5.004_51.tar.gz/ perl5.004_52.tar.gz/ perl5.004_53.tar.gz/ ...
The final layout is still subject to change and will be discussed on the Perl5-porters mailing list.
The directory branches/perl/ contains perl releases made from the trunk. There is already integrated the diff between the branchpoint and the final release. One can find the branchpoint in tags/branchpoints/, too, and the final release in tags/releases/.
Apc2svn sets a property "perl:release" as soon as a release is integrated. From that point in time they should be regarded as read-only.
All branches/maint-*/mbranch/ directories contain the respective maintainance branches themselves. If new patches for any of them turn up, they are integrated there.
branches/maint-*/rel/ contains releases from the corresponding maintainance track. As with the trunk we find the branchpoints in tags/branchpoints/ too and the final releases are duplicated in tags/releases/.
All that implies that only the trunk/ directory and the branches/maint-*/mbranch/ directories should be regarded read-write.
Error checking of the many calls to external programs need some more work. Currently many failures of external programs are tolerated.
Same prerequisites as mentioned in patchaperlup. Additionally makepatch and applypatch by Johan Vromans (CPAN author JV), svn, zcat, tar.
firstname.lastname@example.org and Rafael Garcia-Suarez