[Bps-public-commit] Shipwright branch, master, updated. 13c5798853a4a8fb33725b3399db2c0c384d9f53

? sunnavy sunnavy at bestpractical.com
Fri Nov 5 22:09:01 EDT 2010


The branch, master has been updated
       via  13c5798853a4a8fb33725b3399db2c0c384d9f53 (commit)
       via  9f0a011ee0f2af40407c8cb8d5a5af570ffe54df (commit)
       via  1f8f136fdafc13662aef53602b0c95762e5e0f3c (commit)
       via  1257f334a00917eecf1502bdc0e779bc583f1f45 (commit)
      from  a02a18f64524eb2352e03262acee0b57f4ce80bf (commit)

Summary of changes:
 Changes                           |    5 ++++-
 lib/Shipwright/Script/Import.pm   |    1 +
 lib/Shipwright/Script/Maintain.pm |    1 +
 lib/Shipwright/Script/Update.pm   |   14 +++++++++++++-
 4 files changed, 19 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 1257f334a00917eecf1502bdc0e779bc583f1f45
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Oct 28 08:16:27 2010 +0800

    relase 2.4.17

diff --git a/Changes b/Changes
index 0d5f63b..81a39de 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
 Revision history for Shipwright
 
-2.4.17
+2.4.17 Thu Oct 28 00:16:07 UTC 2010
+
+* split test_requires out of build_requires
+* tweak messages
 
 2.4.16 Tue Aug 24 02:22:15 UTC 2010
 

commit 1f8f136fdafc13662aef53602b0c95762e5e0f3c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Nov 6 09:47:49 2010 +0800

    doc for --skip-all-test-requires

diff --git a/lib/Shipwright/Script/Import.pm b/lib/Shipwright/Script/Import.pm
index 8f66b8c..cf1003f 100644
--- a/lib/Shipwright/Script/Import.pm
+++ b/lib/Shipwright/Script/Import.pm
@@ -442,6 +442,7 @@ Shipwright::Script::Import - Import sources and their dependencies
  --skip-recommends              : specify a list of sources of which recommends 
                                   not to import
  --skip-all-recommends          : skip all the recommends to import
+ --skip-all-test-requires       : skip all the test requires to import
  --skip-installed               : skip all the installed modules to import
  --include-dual-lifed           : include modules which live both in the perl core 
                                   and on CPAN
diff --git a/lib/Shipwright/Script/Maintain.pm b/lib/Shipwright/Script/Maintain.pm
index 6eabaa8..3aa40c4 100644
--- a/lib/Shipwright/Script/Maintain.pm
+++ b/lib/Shipwright/Script/Maintain.pm
@@ -77,6 +77,7 @@ Shipwright::Script::Maintain - Maintain a shipyard
  --skip-requires              : skip requires when finding deps
  --skip-recommends            : skip recommends when finding deps
  --skip-build-requires        : skip build requires when finding deps
+ --skip-test-requires         : skip requires when finding deps
 
 =head1 GLOBAL OPTIONS
 

commit 9f0a011ee0f2af40407c8cb8d5a5af570ffe54df
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Nov 6 09:49:54 2010 +0800

    doc for --delete-deps

diff --git a/lib/Shipwright/Script/Update.pm b/lib/Shipwright/Script/Update.pm
index d9fe964..475c6f1 100644
--- a/lib/Shipwright/Script/Update.pm
+++ b/lib/Shipwright/Script/Update.pm
@@ -295,6 +295,7 @@ Shipwright::Script::Update - Update sources and shipyard itself
  --only-sources               : only update sources, no build scripts
  --as                         : the branch name
  --add-deps                   : add requires deps for a dist e.g. cpan-Foo=0.30,cpan-Bar,cpan-Baz=2.34
+ --delete-deps                : delete deps for a dist e.g. cpan-Foo,cpan-Bar
 
 =head1 DESCRIPTION
 

commit 13c5798853a4a8fb33725b3399db2c0c384d9f53
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Nov 6 10:08:25 2010 +0800

    don't show updated msg if there are no updates

diff --git a/lib/Shipwright/Script/Update.pm b/lib/Shipwright/Script/Update.pm
index 475c6f1..a75c393 100644
--- a/lib/Shipwright/Script/Update.pm
+++ b/lib/Shipwright/Script/Update.pm
@@ -82,9 +82,13 @@ sub run {
         my @deps = split /\s*,\s*/, $self->delete_deps;
         my $name = shift or confess_or_die 'need name arg';
         my $requires = $shipwright->backend->requires( name => $name ) || {};
+        my $deleted;
         for my $dep ( @deps ) {
             for my $type ( qw/requires build_requires recommends test_requires/ ) {
-                delete $requires->{$type}{$dep} if $requires->{$type};
+                if ( $requires->{$type} && exists $requires->{$type}{$dep} ) {
+                    delete $requires->{$type}{$dep};
+                    $deleted = 1;
+                }
             }
 
             $shipwright->backend->_yml( "/scripts/$name/require.yml", $requires );
@@ -92,6 +96,13 @@ sub run {
             $refs->{$dep}-- if $refs->{$dep} > 0;
             $shipwright->backend->refs($refs);
         }
+        if ( $deleted ) {
+            $self->log->fatal( 'successfully updated' );
+        }
+        else {
+            $self->log->fatal( "not updated: no such deps in $name" );
+        }
+        return;
     }
     else {
         $map    = $shipwright->backend->map    || {};

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list