aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorUladzislau Shablinski2016-05-01 14:46:24 +0300
committerXu Cheng2016-05-01 19:46:24 +0800
commit90d3317d7dc9d809d7fc8da15e824161a0ce3008 (patch)
treea721a8461f0908e3ff5e8278694b51f26aacfeb5 /Library
parent3972b900f34f578ed9bde9cd66ea79f28b26e2d2 (diff)
downloadbrew-90d3317d7dc9d809d7fc8da15e824161a0ce3008.tar.bz2
download_strategy: use svn info --xml (#174)
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index a1e0ca5ba..0de9bf8c2 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -1,4 +1,5 @@
require "utils/json"
+require "rexml/document"
class AbstractDownloadStrategy
include FileUtils
@@ -495,7 +496,8 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
end
def source_modified_time
- Time.parse Utils.popen_read("svn", "info", cached_location.to_s).strip[/^Last Changed Date: (.+)$/, 1]
+ xml = REXML::Document.new(Utils.popen_read("svn", "info", "--xml", cached_location.to_s))
+ Time.parse REXML::XPath.first(xml, "//date/text()").to_s
end
private