Merge pull request #20150 from Homebrew/download_strategy-fossil

download_strategy: fossil now outputs `hash:`
This commit is contained in:
Eric Knibbe 2025-06-23 03:03:57 +00:00 committed by GitHub
commit 2703f12875
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1350,7 +1350,7 @@ class CVSDownloadStrategy < VCSDownloadStrategy
end
command! "cvs",
args: [*quiet_flag, "-d", @url, "checkout", "-d", cached_location.basename, @module],
args: [*quiet_flag, "-d", @url, "checkout", "-d", basename.to_s, @module],
chdir: cached_location.dirname,
timeout: Utils::Timer.remaining(timeout)
end
@ -1542,7 +1542,7 @@ class FossilDownloadStrategy < VCSDownloadStrategy
sig { override.returns(Time) }
def source_modified_time
out = silent_command("fossil", args: ["info", "tip", "-R", cached_location]).stdout
Time.parse(T.must(out[/^uuid: +\h+ (.+)$/, 1]))
Time.parse(T.must(out[/^(hash|uuid): +\h+ (.+)$/, 1]))
end
# Return last commit's unique identifier for the repository.
@ -1551,7 +1551,7 @@ class FossilDownloadStrategy < VCSDownloadStrategy
sig { override.returns(String) }
def last_commit
out = silent_command("fossil", args: ["info", "tip", "-R", cached_location]).stdout
T.must(out[/^uuid: +(\h+) .+$/, 1])
T.must(out[/^(hash|uuid): +(\h+) .+$/, 1])
end
sig { override.returns(T::Boolean) }