• Georges Racinet's avatar
    Repository archives: dispatching to HGitaly for Mercurial repos · 2e2da0334c73
    Georges Racinet authored
    For archive production, the Rails app duty is to return
    direct connection information to Workhorse, so that it can call
    Gitaly directly.
    We're reusing the dispatching logic for our existing (yet unplugged)
    HGitaly integration: by prefixing the storage (shard) with `hg:` for
    Mercurial repositories, we have the `GitalyClient.address` return
    connection information for the HGitaly server.
    For this to work, we need `archive_metadata` method of the
    Mercurial Repository classes to provide the Mercurial SHA, which we do
    by intoducing the dedicated `archive_sha` method.