summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-18 06:50:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-18 06:50:24 +0000
commit00459aa89f82c6e7b139e7700c88d7650b01d411 (patch)
treec8a9f429eebbd352180c3341742d527a172120b8 /tool/vcs.rb
parentd32a13a30e8fea47d6f508b9d06934f15cdbbe2e (diff)
vcs.rb: search svn directory
* tool/vcs.rb (VCS::SVN#wcroot): search svn directory by traversing parent directories for old svn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 9f7c3a5..1f4f5ff 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -161,7 +161,13 @@ class VCS
info = get_info
@wcroot = info[/<wcroot-abspath>(.*)<\/wcroot-abspath>/, 1]
unless @wcroot
- STDERR.puts info.gsub(/^/, 'SVNINFO: ')
+ parent = File.realpath(@srcdir)
+ begin
+ parent = File.dirname(wkdir = parent)
+ if File.directory?(wkdir + "/.svn")
+ break @wcroot = wkdir
+ end
+ end until parent == wkdir
end
end
@wcroot