You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2018/05/31 12:45:46 UTC

[whimsy] branch master updated: Return descriptive string instead of erroring

This is an automated email from the ASF dual-hosted git repository.

curcuru 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 92b2508  Return descriptive string instead of erroring
92b2508 is described below

commit 92b2508d02bdf5f1580fa00990bdd593b31549aa
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Thu May 31 08:45:29 2018 -0400

    Return descriptive string instead of erroring
---
 www/status/svn.cgi | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/www/status/svn.cgi b/www/status/svn.cgi
index 0f6c842..6a4a5cf 100755
--- a/www/status/svn.cgi
+++ b/www/status/svn.cgi
@@ -180,13 +180,22 @@ _json do
   end
 
   localrev, lerr = ASF::SVN.getRevision(local_path.untaint)
-  serverrev, serr = ASF::SVN.getRevision(repository_url.untaint)
-  {
-    log: log.to_s.split("\n"),
-    path: local_path,
-    local: localrev || lerr.split("\n").last, # generally the last SVN error line is the cause
-    server: serverrev || serr.split("\n").last
-  }
+  if repository_url
+    serverrev, serr = ASF::SVN.getRevision(repository_url.untaint)
+    {
+      log: log.to_s.split("\n"),
+      path: local_path,
+      local: localrev || lerr.split("\n").last, # generally the last SVN error line is the cause
+      server: serverrev || serr.split("\n").last
+    }
+  else
+    {
+      log: log.to_s.split("\n"),
+      path: local_path,
+      local: localrev || lerr.split("\n").last, # generally the last SVN error line is the cause
+      server: "ERROR: no repository found for name,local_path: #{@name},#{local_path}"
+    }
+  end
 end
 
 # standalone (local) support

-- 
To stop receiving notification emails like this one, please contact
curcuru@apache.org.