[Bps-public-commit] r10796 - in Shipwright/lib/Shipwright: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Feb 10 21:46:35 EST 2008


Author: sunnavy
Date: Sun Feb 10 21:46:32 2008
New Revision: 10796

Modified:
   Shipwright/lib/Shipwright/Source.pm
   Shipwright/lib/Shipwright/Source/SVN.pm

Log:
smarter way to detect svn source. e.g. we can just use svn+ssh://.... instead of svn:svn+ssh://....

Modified: Shipwright/lib/Shipwright/Source.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source.pm	(original)
+++ Shipwright/lib/Shipwright/Source.pm	Sun Feb 10 21:46:32 2008
@@ -67,7 +67,7 @@
     elsif ( $source =~ m{^\s*ftp://} ) {
         return 'FTP';
     }
-    elsif ( $source =~ m{^\s*svn:} ) {
+    elsif ( $source =~ m{^\s*svn[:+]} ) {
         return 'SVN';
     }
     elsif ( $source =~ m{^\s*svk:} ) {

Modified: Shipwright/lib/Shipwright/Source/SVN.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source/SVN.pm	(original)
+++ Shipwright/lib/Shipwright/Source/SVN.pm	Sun Feb 10 21:46:32 2008
@@ -19,7 +19,7 @@
     $self->_update_url( $self->name, $self->source );
 
     my $s = $self->source;
-    $s =~ s!^\s*svn:!!;
+    $s =~ s{^\s*svn:(?!//)}{};
     $self->source($s);
     $self->name( $self->just_name( $self->source ) );
     return $self;



More information about the Bps-public-commit mailing list