whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Don't count revision message as a file update
Date Sat, 03 Jun 2017 11:35:40 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  e507bff   Don't count revision message as a file update
e507bff is described below

commit e507bff6fa11d21a0e640b2cf0fa1b52be6d2c31
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Jun 3 12:35:38 2017 +0100

    Don't count revision message as a file update
---
 www/status/monitors/svn.rb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/status/monitors/svn.rb b/www/status/monitors/svn.rb
index bb4c7ed..32bd8dc 100644
--- a/www/status/monitors/svn.rb
+++ b/www/status/monitors/svn.rb
@@ -64,7 +64,7 @@ def Monitor.svn(previous_status)
   updates.each do |update|
     level = 'success'
     title = nil
-    data = revision = update[REV_RE]
+    data = revision = update[REV_RE] # data === String
 
     lines = update.split("\n")
     repository = lines.shift.to_sym
@@ -78,7 +78,7 @@ def Monitor.svn(previous_status)
 
     unless lines.empty?
       level = 'info'
-      data = lines.dup
+      data = lines.dup # array
     end
 
     lines.reject! {|line| line =~ /^([ADU] |[ U]U)   /}
@@ -88,8 +88,9 @@ def Monitor.svn(previous_status)
         title = "partial response"
         level = 'warning'
         seen_level[level] = true
-      # data may be a String rather than an array in which case .length is its length, not
1
-      elsif String  === data or data.length == 1
+      elsif String  === data # only saw revision message
+        title = "No files updated"
+      elsif data.length == 1
         title = "1 file updated"
       else
         title = "#{data.length} files updated"

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message