Commit 6a2521d2 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix/use-mirror-refmaps-instead-mirror-refmap' into 'master'

Add support for multiple refmaps to RemoteService#add_remote

Closes gitaly#903

See merge request gitlab-org/gitlab-ce!16331
parents 520cb97e 8065efac
...@@ -406,7 +406,7 @@ group :ed25519 do ...@@ -406,7 +406,7 @@ group :ed25519 do
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly-proto', '~> 0.64.0', require: 'gitaly' gem 'gitaly-proto', '~> 0.69.0', require: 'gitaly'
gem 'toml-rb', '~> 0.3.15', require: false gem 'toml-rb', '~> 0.3.15', require: false
......
...@@ -284,7 +284,7 @@ GEM ...@@ -284,7 +284,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gherkin-ruby (0.3.2) gherkin-ruby (0.3.2)
gitaly-proto (0.64.0) gitaly-proto (0.69.0)
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
grpc (~> 1.0) grpc (~> 1.0)
github-linguist (4.7.6) github-linguist (4.7.6)
...@@ -1053,7 +1053,7 @@ DEPENDENCIES ...@@ -1053,7 +1053,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0) gettext_i18n_rails_js (~> 1.2.0)
gitaly-proto (~> 0.64.0) gitaly-proto (~> 0.69.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.6.2) gitlab-markup (~> 1.6.2)
......
...@@ -7,10 +7,12 @@ module Gitlab ...@@ -7,10 +7,12 @@ module Gitlab
@storage = repository.storage @storage = repository.storage
end end
def add_remote(name, url, mirror_refmap) def add_remote(name, url, mirror_refmaps)
request = Gitaly::AddRemoteRequest.new( request = Gitaly::AddRemoteRequest.new(
repository: @gitaly_repo, name: name, url: url, repository: @gitaly_repo,
mirror_refmap: mirror_refmap.to_s name: name,
url: url,
mirror_refmaps: Array.wrap(mirror_refmaps).map(&:to_s)
) )
GitalyClient.call(@storage, :remote_service, :add_remote, request) GitalyClient.call(@storage, :remote_service, :add_remote, request)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment