Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8e699fe9
Commit
8e699fe9
authored
Mar 06, 2020
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FetchInternalRemote Gitaly RPC
Cleans out now unused RPC code
parent
1b4e1fa8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
77 deletions
+0
-77
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-6
lib/gitlab/gitaly_client/remote_service.rb
lib/gitlab/gitaly_client/remote_service.rb
+0
-14
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+0
-44
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
+0
-13
No files found.
lib/gitlab/git/repository.rb
View file @
8e699fe9
...
@@ -773,12 +773,6 @@ module Gitlab
...
@@ -773,12 +773,6 @@ module Gitlab
!
has_visible_content?
!
has_visible_content?
end
end
def
fetch_repository_as_mirror
(
repository
)
wrapped_gitaly_errors
do
gitaly_remote_client
.
fetch_internal_remote
(
repository
)
end
end
# Fetch remote for repository
# Fetch remote for repository
#
#
# remote - remote name
# remote - remote name
...
...
lib/gitlab/gitaly_client/remote_service.rb
View file @
8e699fe9
...
@@ -41,20 +41,6 @@ module Gitlab
...
@@ -41,20 +41,6 @@ module Gitlab
GitalyClient
.
call
(
@storage
,
:remote_service
,
:remove_remote
,
request
,
timeout:
GitalyClient
.
long_timeout
).
result
GitalyClient
.
call
(
@storage
,
:remote_service
,
:remove_remote
,
request
,
timeout:
GitalyClient
.
long_timeout
).
result
end
end
def
fetch_internal_remote
(
repository
)
request
=
Gitaly
::
FetchInternalRemoteRequest
.
new
(
repository:
@gitaly_repo
,
remote_repository:
repository
.
gitaly_repository
)
response
=
GitalyClient
.
call
(
@storage
,
:remote_service
,
:fetch_internal_remote
,
request
,
timeout:
GitalyClient
.
long_timeout
,
remote_storage:
repository
.
storage
)
response
.
result
end
def
find_remote_root_ref
(
remote_name
)
def
find_remote_root_ref
(
remote_name
)
request
=
Gitaly
::
FindRemoteRootRefRequest
.
new
(
request
=
Gitaly
::
FindRemoteRootRefRequest
.
new
(
repository:
@gitaly_repo
,
repository:
@gitaly_repo
,
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
8e699fe9
...
@@ -492,50 +492,6 @@ describe Gitlab::Git::Repository, :seed_helper do
...
@@ -492,50 +492,6 @@ describe Gitlab::Git::Repository, :seed_helper do
end
end
end
end
describe
'#fetch_repository_as_mirror'
do
let
(
:new_repository
)
do
Gitlab
::
Git
::
Repository
.
new
(
'default'
,
'my_project.git'
,
''
,
'group/project'
)
end
subject
{
new_repository
.
fetch_repository_as_mirror
(
repository
)
}
before
do
new_repository
.
create_repository
end
after
do
new_repository
.
remove
end
it
'fetches a repository as a mirror remote'
do
subject
expect
(
refs
(
new_repository_path
)).
to
eq
(
refs
(
repository_path
))
end
context
'with keep-around refs'
do
let
(
:sha
)
{
SeedRepo
::
Commit
::
ID
}
let
(
:keep_around_ref
)
{
"refs/keep-around/
#{
sha
}
"
}
let
(
:tmp_ref
)
{
"refs/tmp/
#{
SecureRandom
.
hex
}
"
}
before
do
repository_rugged
.
references
.
create
(
keep_around_ref
,
sha
,
force:
true
)
repository_rugged
.
references
.
create
(
tmp_ref
,
sha
,
force:
true
)
end
it
'includes the temporary and keep-around refs'
do
subject
expect
(
refs
(
new_repository_path
)).
to
include
(
keep_around_ref
)
expect
(
refs
(
new_repository_path
)).
to
include
(
tmp_ref
)
end
end
def
new_repository_path
File
.
join
(
TestEnv
.
repos_path
,
new_repository
.
relative_path
)
end
end
describe
'#fetch_remote'
do
describe
'#fetch_remote'
do
it
'delegates to the gitaly RepositoryService'
do
it
'delegates to the gitaly RepositoryService'
do
ssh_auth
=
double
(
:ssh_auth
)
ssh_auth
=
double
(
:ssh_auth
)
...
...
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
View file @
8e699fe9
...
@@ -34,19 +34,6 @@ describe Gitlab::GitalyClient::RemoteService do
...
@@ -34,19 +34,6 @@ describe Gitlab::GitalyClient::RemoteService do
end
end
end
end
describe
'#fetch_internal_remote'
do
let
(
:remote_repository
)
{
Gitlab
::
Git
::
Repository
.
new
(
'default'
,
TEST_MUTABLE_REPO_PATH
,
''
,
'group/project'
)
}
it
'sends an fetch_internal_remote message and returns the result value'
do
expect_any_instance_of
(
Gitaly
::
RemoteService
::
Stub
)
.
to
receive
(
:fetch_internal_remote
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
result:
true
))
expect
(
client
.
fetch_internal_remote
(
remote_repository
)).
to
be
(
true
)
end
end
describe
'#find_remote_root_ref'
do
describe
'#find_remote_root_ref'
do
it
'sends an find_remote_root_ref message and returns the root ref'
do
it
'sends an find_remote_root_ref message and returns the root ref'
do
expect_any_instance_of
(
Gitaly
::
RemoteService
::
Stub
)
expect_any_instance_of
(
Gitaly
::
RemoteService
::
Stub
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment