[Bps-public-commit] Test-Chimps-Client branch, master, updated. c727bb535680146219cacba302855c3307a3c496
Ruslan Zakirov
ruz at bestpractical.com
Tue May 26 16:56:32 EDT 2009
The branch, master has been updated
via c727bb535680146219cacba302855c3307a3c496 (commit)
via 058d87608d1d1af111b86bb5648c8899aa913dbd (commit)
from ff6e85ca3dec69033ef2d3502dba68d4cfa66b0a (commit)
Summary of changes:
lib/Test/Chimps/Smoker/Git.pm | 10 ++++++++--
lib/Test/Chimps/Smoker/SVN.pm | 11 ++++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 058d87608d1d1af111b86bb5648c8899aa913dbd
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Wed May 27 00:53:00 2009 +0400
* full clean for SVN
diff --git a/lib/Test/Chimps/Smoker/SVN.pm b/lib/Test/Chimps/Smoker/SVN.pm
index f5ebc0e..d51a996 100644
--- a/lib/Test/Chimps/Smoker/SVN.pm
+++ b/lib/Test/Chimps/Smoker/SVN.pm
@@ -5,6 +5,8 @@ use warnings;
use base qw(Test::Chimps::Smoker::Source);
__PACKAGE__->mk_ro_accessors(qw/uri/);
+use File::Path qw(remove_tree);
+
sub revision_info {
my $self = shift;
my $revision = shift;
@@ -38,7 +40,14 @@ sub checkout {
sub clean {
my $self = shift;
- return $self->run_cmd(qw(revert -R .));
+ $self->run_cmd(qw(revert -R .));
+
+ open my $status_fh, "-|", qw(svn status .)
+ or die "Can't call program `svn status .`: $!";
+ while ( my $s = <$status_fh> ) {
+ next unless my ($path) = ($s =~ /^\?\s*(.*)$/);
+ remove_tree( File::Spec->catdir($self->directory, $path) );
+ }
}
sub next {
commit c727bb535680146219cacba302855c3307a3c496
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Wed May 27 00:56:00 2009 +0400
* pull if there is no revision after current
diff --git a/lib/Test/Chimps/Smoker/Git.pm b/lib/Test/Chimps/Smoker/Git.pm
index a5a5fb5..9aadf20 100644
--- a/lib/Test/Chimps/Smoker/Git.pm
+++ b/lib/Test/Chimps/Smoker/Git.pm
@@ -67,8 +67,14 @@ sub checkout {
sub next {
my $self = shift;
- my $revision = $self->revision_after( $self->config->{revision} );
- return () unless $revision;
+ my $current = $self->config->{revision};
+
+ my $revision = $self->revision_after( $current );
+ unless ( $revision ) {
+ $self->run_cmd('pull');
+ $revision = $self->revision_after( $current );
+ return () unless $revision;
+ }
my $committer = $self->committer($revision);
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list