[Bps-public-commit] Shipwright branch, master, updated. f46f9249ef01687c05094955530def2d110b029d
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Aug 6 22:02:52 EDT 2009
The branch, master has been updated
via f46f9249ef01687c05094955530def2d110b029d (commit)
from 5bacc5494d50074fffd65769cc64ea42af6d3705 (commit)
Summary of changes:
bin/shipwright | 1 +
lib/Shipwright/Manual/ENV.pod | 5 +++++
lib/Shipwright/Source/Base.pm | 3 ++-
3 files changed, 8 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit f46f9249ef01687c05094955530def2d110b029d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Aug 7 08:34:38 2009 +0800
add SHIPWRIGHT_LWP_TIMEOUT env
diff --git a/bin/shipwright b/bin/shipwright
index 755e502..e1d4e69 100755
--- a/bin/shipwright
+++ b/bin/shipwright
@@ -14,5 +14,6 @@ $ENV{SHIPWRIGHT_SVK} ||= 'svk';
$ENV{SHIPWRIGHT_SVN} ||= 'svn';
$ENV{SHIPWRIGHT_GIT} ||= 'git';
$ENV{PERL_MM_USE_DEFAULT} ||= 1;
+$ENV{SHIPWRIHGT_LWP_TIMEOUT} ||= 1200;
Shipwright::Script->dispatch();
chdir $cwd;
diff --git a/lib/Shipwright/Manual/ENV.pod b/lib/Shipwright/Manual/ENV.pod
index 02ed1a4..6813caa 100644
--- a/lib/Shipwright/Manual/ENV.pod
+++ b/lib/Shipwright/Manual/ENV.pod
@@ -20,6 +20,11 @@ Introduce ENV variables Shipwright makes use of.
( mostly, to speed things up ).
default value is ~/.shipwright
+=item SHIPWRIGHT_LWP_TIMEOUT
+
+ LWP timeout( seconds ).
+ technically, it's the seconds we take to call $ua->timeout($seconds)
+
=item SHIPWRIGHT_SVK
path of 'svk' cmd, default value is 'svk'
diff --git a/lib/Shipwright/Source/Base.pm b/lib/Shipwright/Source/Base.pm
index 0047cb8..93538fd 100644
--- a/lib/Shipwright/Source/Base.pm
+++ b/lib/Shipwright/Source/Base.pm
@@ -667,7 +667,8 @@ sub _lwp_get {
my $source = shift;
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
- $ua->timeout(1200);
+ $ua->timeout( $ENV{SHIPWRIHGT_LWP_TIMEOUT} )
+ if $ENV{SHIPWRIGHT_LWP_TIMEOUT};
if ( -e $self->source ) {
my $size = -s $self->source;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list