From 00459aa89f82c6e7b139e7700c88d7650b01d411 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 18 Jan 2015 06:50:24 +0000 Subject: 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 --- tool/vcs.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tool') 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>/, 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 -- cgit v1.2.3