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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
acc0e25d
Commit
acc0e25d
authored
Feb 07, 2018
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorporate Gitaly's RepositoryService.IsSquashInProgress RPC
parent
b2761d17
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
2 deletions
+51
-2
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+7
-1
lib/gitlab/gitaly_client/repository_service.rb
lib/gitlab/gitaly_client/repository_service.rb
+17
-0
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
+26
-0
No files found.
GITALY_SERVER_VERSION
View file @
acc0e25d
0.8
1
.0
0.8
2
.0
lib/gitlab/git/repository.rb
View file @
acc0e25d
...
...
@@ -1234,8 +1234,14 @@ module Gitlab
end
def
squash_in_progress?
(
squash_id
)
gitaly_migrate
(
:squash_in_progress
)
do
|
is_enabled
|
if
is_enabled
gitaly_repository_client
.
squash_in_progress?
(
squash_id
)
else
fresh_worktree?
(
worktree_path
(
SQUASH_WORKTREE_PREFIX
,
squash_id
))
end
end
end
def
push_remote_branches
(
remote_name
,
branch_names
,
forced:
true
)
success
=
@gitlab_projects
.
push_branches
(
remote_name
,
GITLAB_PROJECTS_TIMEOUT
,
forced
,
branch_names
)
...
...
lib/gitlab/gitaly_client/repository_service.rb
View file @
acc0e25d
...
...
@@ -134,6 +134,23 @@ module Gitlab
response
.
in_progress
end
def
squash_in_progress?
(
squash_id
)
request
=
Gitaly
::
IsSquashInProgressRequest
.
new
(
repository:
@gitaly_repo
,
squash_id:
squash_id
.
to_s
)
response
=
GitalyClient
.
call
(
@storage
,
:repository_service
,
:is_squash_in_progress
,
request
,
timeout:
GitalyClient
.
default_timeout
)
response
.
in_progress
end
def
fetch_source_branch
(
source_repository
,
source_branch
,
local_ref
)
request
=
Gitaly
::
FetchSourceBranchRequest
.
new
(
repository:
@gitaly_repo
,
...
...
spec/lib/gitlab/gitaly_client/repository_service_spec.rb
View file @
acc0e25d
...
...
@@ -84,4 +84,30 @@ describe Gitlab::GitalyClient::RepositoryService do
expect
(
client
.
has_local_branches?
).
to
be
(
true
)
end
end
describe
'#rebase_in_progress?'
do
let
(
:rebase_id
)
{
1
}
it
'sends a repository_rebase_in_progress message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:is_rebase_in_progress
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
in_progress:
true
))
client
.
rebase_in_progress?
(
rebase_id
)
end
end
describe
'#squash_in_progress?'
do
let
(
:squash_id
)
{
1
}
it
'sends a repository_squash_in_progress message'
do
expect_any_instance_of
(
Gitaly
::
RepositoryService
::
Stub
)
.
to
receive
(
:is_squash_in_progress
)
.
with
(
gitaly_request_with_path
(
storage_name
,
relative_path
),
kind_of
(
Hash
))
.
and_return
(
double
(
in_progress:
true
))
client
.
squash_in_progress?
(
squash_id
)
end
end
end
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