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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jun 23 08:52:08 EDT 2009


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

Summary of changes:
 lib/Test/Chimps/Smoker/Git.pm |    2 +-
 lib/Test/Chimps/Smoker/SVN.pm |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 551b54e5a856a76205d7a3ecac1c82b3e26a9e9f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Jun 23 20:51:58 2009 +0800

    remove trailing withspaces in committed_date

diff --git a/lib/Test/Chimps/Smoker/Git.pm b/lib/Test/Chimps/Smoker/Git.pm
index e9b69f2..f30b98b 100644
--- a/lib/Test/Chimps/Smoker/Git.pm
+++ b/lib/Test/Chimps/Smoker/Git.pm
@@ -41,7 +41,7 @@ sub committed_date {
     my $revision = shift;
 
     my $cmd = 'git log -n1'. ($revision? " $revision" : '');
-    my ($date) = (`$cmd` =~ m/^date:\s*(.*)$/im);
+    my ($date) = (`$cmd` =~ m/^date:\s*(.*?)\s*$/im);
 
     return $date;
 }
diff --git a/lib/Test/Chimps/Smoker/SVN.pm b/lib/Test/Chimps/Smoker/SVN.pm
index d72bb0e..4de6f65 100644
--- a/lib/Test/Chimps/Smoker/SVN.pm
+++ b/lib/Test/Chimps/Smoker/SVN.pm
@@ -18,6 +18,7 @@ sub revision_info {
     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);
+    $committed_date =~ s/\s+$//;
 
     return ($latest_revision, $last_changed, $committer, $committed_date);
 }
@@ -65,6 +66,8 @@ sub next {
             m/^r([0-9]+)\s+\|\s*(.*?)\s*\|\s*([^(]*)/m);
     return () unless $next;
 
+    $committed_date =~ s/\s+$//;
+
     return (
         revision       => $next,
         committer      => $committer,

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



More information about the Bps-public-commit mailing list