The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

perlpatch2svn - Import bleadperl patches into a Subversion repository

SYNOPSIS

    perlpatch2svn [patchfiles...]

DESCRIPTION

This program reads a list of patches applied to the bleadperl source trunk and applies them to a local Subversion repository.

The patches can be retrieved via the perl5-changes mailing list, or from one of the URLs documented in perlhack(3). Alternatively, if you have access to the bleadperl Perforce repository, they can be created with Andreas Koenig's p4genpatch utility.

You must run this program from the root of source tree in the subversion working copy you want to update. The patchfiles can be given on the command-line; if not, perlpatch2svn reads patches from the standard input.

Create the Subversion repository

Here's the list of commands I used to create a Subversion repository with perl 5.8.0 in it :

    $ cd /home/rafael
    $ tar zxf perl-5.8.0.tar.gz
    $ svnadmin create bleadperl-svn
    $ svn import file:///home/rafael/bleadperl-svn perl-5.8.0 perl \
        -m 'Import Perl 5.8.0'
    $ svn co file:///home/rafael/bleadperl-svn/perl bleadperl-wc
    $ cd bleadperl-wc

Then, I set the property svn:eol-type to native on files that contain CRLF line endings : (warning, shell hackery involved -- ^M is a real ctrl-M character)

    $ svn propset svn:eol-style native `grep -rl '^M' * | fgrep -v .svn`
    $ svn commit -m 'Force CRLF files as LF'

This previous command marks the said files as being always checked out with the line endings native to the current platform. On Unices, they will thus have LF line endings. This is necessary for patches to be applied to them. CRLF line endings must be restored when a source tarball is to be released (see Porting/makerel in the perl source distribution).

And then, to import the patches :

    $ cd bleadperl-wc
    $ zcat bleadperl-patches/* | perlpatch2svn

TODO

An option, or another program, that performs a similar task, but for the whole bleadperl Perforce depot -- that is, with the branches.

BUGS

As of bleadperl @18039, the installation process of perl corrupts the Subversion working copy, because it creates spurious .svn directories.

Similarly, make distclean removes too much files, including a few files in the .svn directories, thus corrupting the working copy.

A workaround, if your system supports it, is to build outside the source tree, via the -Dmksymlinks Configure option.

AUTHOR

Written by Rafael Garcia-Suarez.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

$Id: perlpatch2svn 13 2002-10-21 21:04:03Z rafael $

SEE ALSO

perlhack(3), svn(1), and Porting/p4genpatch in the perl source distribution.