diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-18 06:50:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-18 06:50:24 +0000 |
commit | 00459aa89f82c6e7b139e7700c88d7650b01d411 (patch) | |
tree | c8a9f429eebbd352180c3341742d527a172120b8 /tool | |
parent | d32a13a30e8fea47d6f508b9d06934f15cdbbe2e (diff) | |
download | ruby-00459aa89f82c6e7b139e7700c88d7650b01d411.tar.gz |
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')
-rw-r--r-- | tool/vcs.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb index 9f7c3a5ea7..1f4f5ff0e0 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 |