mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
d32a13a30e
commit
00459aa89f
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue