whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/2] Commit b152a5f: throw error when repository not found
Date Thu, 03 Mar 2016 13:20:48 GMT
Commit b152a5f6912d9a14b4d3c76f0e761e0e76c32be9:
    throw error when repository not found


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/svn.rb                                        | ++++++++++++++ 
------------------------------------------------------------
14 changes: 14 additions, 0 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index f04dfe9..a42170b 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -30,6 +30,10 @@ def self.[]=(name, path)
     end
 
     def self.[](name)
+      self.find!(name)
+    end
+
+    def self.find(name)
       return @testdata[name] if @testdata[name]
 
       result = repos[(@mock+name.sub('private/','')).to_s.sub(/\/*$/, '')] ||
@@ -46,6 +50,16 @@ def self.[](name)
         end
       end
     end
+
+    def self.find!(name)
+      result = self.find(name)
+
+      if not result
+        raise Exception.new("Unable to find svn checkout for #{@base + name}")
+      end
+
+      result
+    end
   end
 
 end

Mime
View raw message