[svk-commit] r2677 - branches/mirror-boostrap/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Tue Jan 15 08:51:09 EST 2008
Author: clkao
Date: Tue Jan 15 08:51:07 2008
New Revision: 2677
Modified:
branches/mirror-boostrap/lib/SVK/Mirror.pm
Log:
read bzip2/gz dumpstreams.
Modified: branches/mirror-boostrap/lib/SVK/Mirror.pm
==============================================================================
--- branches/mirror-boostrap/lib/SVK/Mirror.pm (original)
+++ branches/mirror-boostrap/lib/SVK/Mirror.pm Tue Jan 15 08:51:07 2008
@@ -236,9 +236,15 @@
sub bootstrap {
my ($self, $dumpfile) = @_;
+ # XXX make these all 'require' not 'use' and fail optionally
use SVN::Dump;
+ use PerlIO::via::Bzip2;
+ use PerlIO::gzip;
+ open my $fh, '<', $dumpfile or die $!;
+ binmode($fh, ':via(Bzip2)') if $dumpfile =~ m/bz2/i;
+ binmode($fh, ':gzip') if $dumpfile =~ m/gz/i;
- my $dump = SVN::Dump->new( { file => $dumpfile } );
+ my $dump = SVN::Dump->new( { fh => $fh } );
my $prefix = $self->path.'/';
my $prev = undef;
More information about the svk-commit
mailing list