[Bps-public-commit] r15028 - in Shipwright/branches/2.0: lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Aug 12 04:59:54 EDT 2008
Author: sunnavy
Date: Tue Aug 12 04:59:54 2008
New Revision: 15028
Modified:
Shipwright/branches/2.0/ (props changed)
Shipwright/branches/2.0/lib/Shipwright/Script/List.pm
Log:
r15564 at sunnavys-mb: sunnavy | 2008-08-12 16:59:23 +0800
show branch info when list
Modified: Shipwright/branches/2.0/lib/Shipwright/Script/List.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Script/List.pm (original)
+++ Shipwright/branches/2.0/lib/Shipwright/Script/List.pm Tue Aug 12 04:59:54 2008
@@ -28,6 +28,11 @@
my $versions = $shipwright->backend->version;
my $source = $shipwright->backend->source;
my $refs = $shipwright->backend->refs || {};
+ my $branches;
+
+ if ( $shipwright->backend->has_branch_support ) {
+ $branches = $shipwright->backend->branches;
+ }
my $latest_version = {};
@@ -38,7 +43,7 @@
my $map = $shipwright->backend->map;
if ( $name ) {
- if ( $name =~ /^cpan-/ ) {
+ if ( $name =~ /^cpan-/ && ! $source->{$name} ) {
my %reversed = reverse %$map;
my $module = $reversed{ $name };
$latest_version->{ $name } =
@@ -59,7 +64,7 @@
for my $name ( keys %$source ) {
next if exists $latest_version->{$name};
- if ( $source->{$name} =~ m{^sv[nk]:} ) {
+ if ( $source->{$name} =~ m{^(sv[nk]|shipwright):} ) {
$latest_version->{$name} =
$self->_latest_version( url => $source->{$name} );
}
@@ -98,6 +103,10 @@
print ' ' x 4 . 'latest_version: ', $latest_version->{$name}
|| 'unknown', "\n";
}
+ if ($branches) {
+ print ' ' x 4 . 'branches: ',
+ join( ', ', @{ $branches->{$name} } ), "\n";
+ }
}
}
@@ -113,6 +122,11 @@
my ( $cmd, $out );
+# XXX TODO we need a better latest_version for shipwright source
+# using the source shipwright repo's whole version seems lame
+ $args{url} =~ s/^shipwright://;
+ $args{url} =~ s!/[^/]+$!!;
+
# has url, meaning svn or svk
if ( $args{url} =~ /^svn[:+]/ ) {
$args{url} =~ s{^svn:(?!//)}{};
More information about the Bps-public-commit
mailing list