[Bps-public-commit] r17819 - in Shipwright/trunk: lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Jan 18 07:59:04 EST 2009
Author: sunnavy
Date: Sun Jan 18 07:59:04 2009
New Revision: 17819
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Script/List.pm
Log:
r18891 at sunnavys-mb: sunnavy | 2009-01-18 18:56:41 +0800
update list cmd for with_latest_version
Modified: Shipwright/trunk/lib/Shipwright/Script/List.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/List.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Script/List.pm Sun Jan 18 07:59:04 2009
@@ -62,8 +62,11 @@
for my $name ( keys %$source ) {
next if exists $latest_version->{$name};
if ( $source->{$name} =~ m{^(sv[nk]|shipwright):} ) {
- $latest_version->{$name} =
- $self->_latest_version( url => $source->{$name} );
+ for my $branch ( keys %{ $source->{$name} } ) {
+ $latest_version->{$name}{$branch} =
+ $self->_latest_version(
+ url => $source->{$name}{$branch} );
+ }
}
}
}
@@ -118,10 +121,21 @@
print ' ' x 4 . 'references: ',
defined $refs->{$name} ? $refs->{$name} : 'unknown', "\n";
+
if ( $self->with_latest_version ) {
- print ' ' x 4 . 'latest_version: ', $latest_version->{$name}
- || 'unknown', "\n";
+ print ' ' x 4, 'latest_version: ';
+ if ( ref $source->{$name} ) {
+ print "\n";
+ for my $branch ( keys %{$source->{$name}} ) {
+ print ' ' x 8, $branch, ': ',
+ $latest_version->{$name}{$branch} || 'unknown', "\n";
+ }
+ }
+ else {
+ print $latest_version->{$name} || 'unknown', "\n";
+ }
}
+
if ($branches) {
print ' ' x 4 . 'branches: ',
join( ', ', @{ $branches->{$name} } ), "\n";
More information about the Bps-public-commit
mailing list