[Bps-public-commit] Test-Chimps-Client branch, master, updated. c1a5285a8fe4e0db44a80018f88b022b29220101

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jun 23 07:59:26 EDT 2009


The branch, master has been updated
       via  c1a5285a8fe4e0db44a80018f88b022b29220101 (commit)
      from  acfb6d45e03519cd651972f75466086167107041 (commit)

Summary of changes:
 lib/Test/Chimps/Smoker/SVN.pm |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit c1a5285a8fe4e0db44a80018f88b022b29220101
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Jun 23 19:59:11 2009 +0800

    fix committed_date for SVN part

diff --git a/lib/Test/Chimps/Smoker/SVN.pm b/lib/Test/Chimps/Smoker/SVN.pm
index 504f5ea..d72bb0e 100644
--- a/lib/Test/Chimps/Smoker/SVN.pm
+++ b/lib/Test/Chimps/Smoker/SVN.pm
@@ -17,8 +17,9 @@ sub revision_info {
     my ($latest_revision) = ($info_out =~ m/^Revision: (\d+)/m);
     my ($last_changed)    = ($info_out =~ m/^Last Changed Rev: (\d+)/m);
     my ($committer)       = ($info_out =~ m/^Last Changed Author: (\w+)/m);
+    my ($committed_date)  = ($info_out =~ m/^Last Changed Date: ([^(]+)/m);
 
-    return ($latest_revision, $last_changed, $committer);
+    return ($latest_revision, $last_changed, $committer, $committed_date);
 }
 
 sub committer {
@@ -26,6 +27,11 @@ sub committer {
     return ($self->revision_info( @_ ))[2];
 }
 
+sub committed_date {
+    my $self = shift;
+    return ($self->revision_info( @_ ))[3];
+}
+
 sub checkout {
     my $self = shift;
     my %args = @_;
@@ -55,16 +61,15 @@ sub next {
 
     my $revision = $self->config->{revision};
     my $cmd = "svn log --limit 1 -q -r ". ($revision+1) .":HEAD ". $self->uri;
-    my ( $next, $committer, $committed_date ) =
-      ( `$cmd` =~ m/^r([0-9]+)\s+\|\s*(.*?)\s*\|\s*([^(]*)/m );
+    my ($next, $committer, $committed_date) = (`$cmd` =~
+            m/^r([0-9]+)\s+\|\s*(.*?)\s*\|\s*([^(]*)/m);
     return () unless $next;
 
     return (
-        revision       => $revision,
+        revision       => $next,
         committer      => $committer,
         committed_date => $committed_date,
     );
-
 }
 
 sub run_cmd {

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



More information about the Bps-public-commit mailing list