Wednesday December 04, 2002
06:33 AM
Subversion / MakeMaker tricks
Want to maintain a Perl module under Subversion ?
If you're using a version of ExtUtils::MakeMaker < 6.06 (which is not
released at the time of this writing), the following steps are necessary :
1. Put a MANIFEST.SKIP file in your top-level directory. It
should contain the line
\B\.svn\b
as well as the other MANIFEST.SKIP standard excluded files :
# Avoid Makemaker generated and utility files.
^MANIFEST\.bak
^Makefile$
^blib/
^MakeMaker-\d
^pm_to_blib$
# Avoid temp and backup files.
~$
\.old$
\#$
^\.#
2. In your Makefile.PL, redefine libscan() :
(see the manpage for ExtUtils::MM_Unix)
sub MY::libscan {
my $path = $_[1];
return '' if $path =~ /\B\.svn\b/;
return $path;
}
Other tricks :
Want to have an automatically generated changelog in your distribution
tarball ? Here's how :
WriteMakefile(
...
dist => {
PREOP => 'svn log > ${DISTVNAME}/ChangeLog',
},
);
Want to avoid noise when using "svn status" ?
Use this svn command at the root of your source tree :
$ svn propset svn:ignore 'blib
Makefile
pm_to_blib' .
$ svn commit -m 'Ignore MakeMaker-generated files in svn status' -N .
For a maximized hype, use the following options to WriteMakefile() :
WriteMakefile(
...
dist => {
CI => 'svn commit',
RCS_LABEL => '@ :',
},
);
This enables you to use "make ci" to commit your changes. That's not
really useful, but it's neat.
(Comments welcome. I plan also to put this on my website.)
Autogenerated changelogs (Score:2)
Re:Autogenerated changelogs (Score:2)
perlcomes with extra-large detailed autogenerated changelog files. This doesn't prevent me to write elsewhere (eventuallyMoreover, noone will be able to 'svn log' my repository if it's not network-ac
Re:Autogenerated changelogs (Score:2)
Re:Autogenerated changelogs (Score:2)
I have to mention one common fallacy people seem to have that one patch equals one fix / one feature. Well, yeah, rarely it does work like that. But usually the mapping is many-to-many.
But without the autogenerated verbose changelogs
one would be very hard pressed to be able to write the more
Re:Autogenerated changelogs (Score:2)