[Bps-public-commit] Test-Chimps-Client branch, master, updated. 09f2c2ff585e62bde956b1b88a85968109b12188
Ruslan Zakirov
ruz at bestpractical.com
Thu Jul 9 19:28:41 EDT 2009
The branch, master has been updated
via 09f2c2ff585e62bde956b1b88a85968109b12188 (commit)
via 7a81472859196fc500fbfbe726a2a91e0344668d (commit)
via 55ecaa12ac0438f46ddd314ac828dce212d15679 (commit)
from 02df583c91b2a4ba9ef750f968a2a25a5f24ba0f (commit)
Summary of changes:
lib/Test/Chimps/Smoker/Git.pm | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 55ecaa12ac0438f46ddd314ac828dce212d15679
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Fri Jul 10 01:35:12 2009 +0400
* add branch option for Git source
diff --git a/lib/Test/Chimps/Smoker/Git.pm b/lib/Test/Chimps/Smoker/Git.pm
index 9aadf20..1b0e60d 100644
--- a/lib/Test/Chimps/Smoker/Git.pm
+++ b/lib/Test/Chimps/Smoker/Git.pm
@@ -3,7 +3,14 @@ package Test::Chimps::Smoker::Git;
use strict;
use warnings;
use base qw(Test::Chimps::Smoker::Source);
-__PACKAGE__->mk_ro_accessors(qw/uri/);
+__PACKAGE__->mk_ro_accessors(qw/uri branch/);
+
+
+sub _init {
+ my $self = shift;
+ $self->{'branch'} ||= 'master';
+ return $self->SUPER::_init( @_ );
+}
sub revision_after {
my $self = shift;
@@ -20,7 +27,7 @@ sub revision_after {
my $cmd = 'git log -n1 '. $revision;
my ($date) = (`$cmd` =~ m/^date:\s*(.*)$/im);
- $cmd = "git log --reverse --since='$date' $revision..origin";
+ $cmd = "git log --reverse --since='$date' $revision..". $self->branch;
my ($next) = (`$cmd` =~ m/^commit\s+([a-f0-9]+)$/im);
return $next;
@@ -54,14 +61,14 @@ sub clone {
sub clean {
my $self = shift;
$self->run_cmd(qw(clean -fd));
- $self->run_cmd(qw(checkout master));
+ $self->run_cmd('checkout', $self->branch);
}
sub checkout {
my $self = shift;
my %args = @_;
- $self->run_cmd(qw(checkout), ($args{'revision'} || 'master'));
+ $self->run_cmd(qw(checkout), ($args{'revision'} || $self->branch));
}
sub next {
commit 7a81472859196fc500fbfbe726a2a91e0344668d
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Fri Jul 10 03:26:55 2009 +0400
* use origin/<branch> as we don't have local branch
diff --git a/lib/Test/Chimps/Smoker/Git.pm b/lib/Test/Chimps/Smoker/Git.pm
index 1b0e60d..7eb4b8b 100644
--- a/lib/Test/Chimps/Smoker/Git.pm
+++ b/lib/Test/Chimps/Smoker/Git.pm
@@ -27,7 +27,7 @@ sub revision_after {
my $cmd = 'git log -n1 '. $revision;
my ($date) = (`$cmd` =~ m/^date:\s*(.*)$/im);
- $cmd = "git log --reverse --since='$date' $revision..". $self->branch;
+ $cmd = "git log --reverse --since='$date' $revision..origin/". $self->branch;
my ($next) = (`$cmd` =~ m/^commit\s+([a-f0-9]+)$/im);
return $next;
commit 09f2c2ff585e62bde956b1b88a85968109b12188
Merge: 7a81472... 02df583...
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date: Fri Jul 10 03:28:05 2009 +0400
Merge branch 'master' of git+ssh://diesel.bestpractical.com/git/test-chimps-client
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list