From 6f1116c8e159bbeb718b0dd1e7bf5e8f6408f012 Mon Sep 17 00:00:00 2001 From: Vlad Shablinsky Date: Sun, 1 May 2016 00:21:58 +0300 Subject: [PATCH] download_strategy: fossil source_modified_time Closes #171. Signed-off-by: Xu Cheng --- Library/Homebrew/download_strategy.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 1384131309..a1e0ca5ba5 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -838,6 +838,10 @@ class FossilDownloadStrategy < VCSDownloadStrategy safe_system(*args) end + def source_modified_time + Time.parse Utils.popen_read("fossil", "info", "tip", "-R", cached_location.to_s)[/^uuid: +\h+ (.+)$/, 1] + end + private def cache_tag