From e30252df022b0478c07e91e6ef9eefe2da074e8b Mon Sep 17 00:00:00 2001 From: James Lee Date: Fri, 17 Jun 2011 20:54:42 +0000 Subject: [PATCH] add support for the new xml format of .svn/entries git-svn-id: file:///home/svn/framework3/trunk@12966 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/util/svn.rb | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/lib/msf/util/svn.rb b/lib/msf/util/svn.rb index 7d3dcdbecc..ac41372ae4 100644 --- a/lib/msf/util/svn.rb +++ b/lib/msf/util/svn.rb @@ -19,22 +19,36 @@ class SVN if !::File.exists?(path) return info end - ents = [] + contents = '' File.open(path, "rb") do |fd| - ents = fd.read(::File.size(path)).split("\x0c") + contents = fd.read(::File.size(path)) end - ents[0].split("\n").each do |line| - line.strip! - next if line.empty? - case line - when /framework3/ - info[:root] = line - when /^\d+$/ - info[:revision] = line.to_i - when /^\d{4}-\d.*T/ - info[:updated] = line + if contents.include? "