[Bps-public-commit] r12101 - Shipwright/trunk/lib/Shipwright/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue May 6 08:55:50 EDT 2008
Author: sunnavy
Date: Tue May 6 08:55:50 2008
New Revision: 12101
Modified:
Shipwright/trunk/lib/Shipwright/Source/SVK.pm
Shipwright/trunk/lib/Shipwright/Source/SVN.pm
Log:
handled version stuff from import cmd to svk and svn sources
Modified: Shipwright/trunk/lib/Shipwright/Source/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVK.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVK.pm Tue May 6 08:55:50 2008
@@ -52,28 +52,28 @@
my $self = shift;
my $source = $self->source;
- my ($out) = Shipwright::Util->run(
- [
- 'svk', 'info', $self->source,
- ]
- );
-
- if ( $out =~ /^Revision: (\d+)/m ) {
- $self->version( $1 );
- }
my @cmds;
push @cmds,
[
'svk', 'co', $self->source,
- File::Spec->catfile( $self->download_directory, $self->name )
+ File::Spec->catfile( $self->download_directory, $self->name ),
+ $self->version ? ( '-r', $self->version ) : ()
];
push @cmds,
[
'svk', 'co', '-d',
- File::Spec->catfile( $self->download_directory, $self->name )
+ File::Spec->catfile( $self->download_directory, $self->name ),
];
+ unless ( $self->version ) {
+ my ($out) = Shipwright::Util->run( [ 'svk', 'info', $self->source, ] );
+
+ if ( $out =~ /^Revision: (\d+)/m ) {
+ $self->version($1);
+ }
+ }
+
$self->source(
File::Spec->catfile( $self->download_directory, $self->name ) );
Modified: Shipwright/trunk/lib/Shipwright/Source/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVN.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVN.pm Tue May 6 08:55:50 2008
@@ -52,19 +52,21 @@
my $self = shift;
my $source = $self->source;
- my ($out) = Shipwright::Util->run(
- [
- 'svn', 'info', $source,
- ]
- );
- if ( $out =~ /^Revision: (\d+)/m ) {
- $self->version( $1 );
- }
my $cmd = [
'svn', 'export', $self->source,
- File::Spec->catfile( $self->download_directory, $self->name )
+ File::Spec->catfile( $self->download_directory, $self->name ),
+ $self->version ? ( '-r', $self->version ) : (),
];
+
+ unless ( $self->version ) {
+ my ($out) = Shipwright::Util->run( [ 'svn', 'info', $source, ] );
+
+ if ( $out =~ /^Revision: (\d+)/m ) {
+ $self->version($1);
+ }
+ }
+
$self->source(
File::Spec->catfile( $self->download_directory, $self->name ) );
Shipwright::Util->run($cmd);
More information about the Bps-public-commit
mailing list