From 90d3317d7dc9d809d7fc8da15e824161a0ce3008 Mon Sep 17 00:00:00 2001 From: Uladzislau Shablinski Date: Sun, 1 May 2016 14:46:24 +0300 Subject: [PATCH] download_strategy: use svn info --xml (#174) --- Library/Homebrew/download_strategy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index a1e0ca5ba5..0de9bf8c20 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