Commit b74bf512ccfb640b569b511be6fd7361b756f93a:
add /srv/svn/* and $HOME/svn to config.svn defaults
Branch: refs/heads/master
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
asf.version | + -
lib/whimsy/asf/config.rb | + -
lib/whimsy/asf/svn.rb | ++++++ --
------------------------------------------------------------
12 changes: 8 additions, 4 deletions.
------------------------------------------------------------
diff --git a/asf.version b/asf.version
index 9a52cbd..c8aa910 100644
--- a/asf.version
+++ b/asf.version
@@ -1 +1 @@
-0.0.69
+0.0.70
diff --git a/lib/whimsy/asf/config.rb b/lib/whimsy/asf/config.rb
index 16dee7c..762f502 100644
--- a/lib/whimsy/asf/config.rb
+++ b/lib/whimsy/asf/config.rb
@@ -10,7 +10,7 @@ class Config
@config = YAML.load_file("#@home/.whimsy") rescue {}
# default :svn for backwards compatibility
- @config[:svn] ||= ['/home/whimsysvn/svn/*']
+ @config[:svn] ||= ['/srv/svn/*', '/home/whimsysvn/svn/*', "#{@home}/svn/*"]
# add libraries to RUBYLIB, load path
(@config[:lib] || []).reverse.each do |lib|
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 8205c66..746e02d 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -1,5 +1,6 @@
require 'uri'
require 'thread'
+require 'open3'
module ASF
@@ -14,9 +15,12 @@ def self.repos
svn = ASF::Config.get(:svn).map {|dir| dir.untaint}
@repos ||= Hash[Dir[*svn].map { |name|
Dir.chdir name.untaint do
- [`svn info`[/URL: (.*)/,1].sub(/^http:/,'https:'), Dir.pwd.untaint]
+ out, err, status = Open3.capture3('svn', 'info')
+ if status.success?
+ [out[/URL: (.*)/,1].sub(/^http:/,'https:'), Dir.pwd.untaint]
+ end
end
- }]
+ }.compact]
end
end