[Bps-public-commit] Test-Chimps branch, master, updated. 1cc134a5baa4be17a03fb525a74df4544ec4e737

trs at bestpractical.com trs at bestpractical.com
Wed Jul 15 22:20:27 EDT 2009


The branch, master has been updated
       via  1cc134a5baa4be17a03fb525a74df4544ec4e737 (commit)
      from  dedbc819532a774b2e6eb8d3b385047df923eefd (commit)

Summary of changes:
 lib/Test/Chimps/Server/Lister.pm |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 1cc134a5baa4be17a03fb525a74df4544ec4e737
Author: Thomas Sibley <tom at zulutango.org>
Date:   Wed Jul 15 22:16:08 2009 -0400

    Only sort by revision if we have numeric revisions

diff --git a/lib/Test/Chimps/Server/Lister.pm b/lib/Test/Chimps/Server/Lister.pm
index b1d7258..08a2254 100644
--- a/lib/Test/Chimps/Server/Lister.pm
+++ b/lib/Test/Chimps/Server/Lister.pm
@@ -143,10 +143,12 @@ sub _sort_reports {
 }
 
 sub _by_revision_then_date {
-  my $res = $b->revision <=> $a->revision;
+  unless ( $a->revision =~ /\D/ or $b->revision =~ /\D/ ) {
+    my $res = $b->revision <=> $a->revision;
 
-  if ($res != 0) {
-    return $res;
+    if ($res != 0) {
+      return $res;
+    }
   }
   
   return DateTime->compare($b->timestamp, $a->timestamp);

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



More information about the Bps-public-commit mailing list