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
Boxiang Sun
gitlab-ce
Commits
b5fe3916
Commit
b5fe3916
authored
Jan 04, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update some Gitaly annotations in Gitlab::Shell
parent
1e950e31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+4
-9
No files found.
lib/gitlab/shell.rb
View file @
b5fe3916
...
...
@@ -71,7 +71,6 @@ module Gitlab
# Ex.
# add_repository("/path/to/storage", "gitlab/gitlab-ci")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387
def
add_repository
(
storage
,
name
)
relative_path
=
name
.
dup
relative_path
<<
'.git'
unless
relative_path
.
end_with?
(
'.git'
)
...
...
@@ -100,7 +99,7 @@ module Gitlab
# Ex.
# import_repository("/path/to/storage", "gitlab/gitlab-ci", "https://gitlab.com/gitlab-org/gitlab-test.git")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
387
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
874
def
import_repository
(
storage
,
name
,
url
)
# The timeout ensures the subprocess won't hang forever
cmd
=
gitlab_projects
(
storage
,
"
#{
name
}
.git"
)
...
...
@@ -122,7 +121,6 @@ module Gitlab
# Ex.
# fetch_remote(my_repo, "upstream")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387
def
fetch_remote
(
repository
,
remote
,
ssh_auth:
nil
,
forced:
false
,
no_tags:
false
)
gitaly_migrate
(
:fetch_remote
)
do
|
is_enabled
|
if
is_enabled
...
...
@@ -142,7 +140,7 @@ module Gitlab
# Ex.
# mv_repository("/path/to/storage", "gitlab/gitlab-ci", "randx/gitlab-ci-new")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
387
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
873
def
mv_repository
(
storage
,
path
,
new_path
)
gitlab_projects
(
storage
,
"
#{
path
}
.git"
).
mv_project
(
"
#{
new_path
}
.git"
)
end
...
...
@@ -156,7 +154,7 @@ module Gitlab
# Ex.
# fork_repository("/path/to/forked_from/storage", "gitlab/gitlab-ci", "/path/to/forked_to/storage", "new-namespace/gitlab-ci")
#
# Gitaly
note: JV: not easy to migrate because this involves two Gitaly servers, not one.
# Gitaly
migration: https://gitlab.com/gitlab-org/gitaly/issues/817
def
fork_repository
(
forked_from_storage
,
forked_from_disk_path
,
forked_to_storage
,
forked_to_disk_path
)
gitlab_projects
(
forked_from_storage
,
"
#{
forked_from_disk_path
}
.git"
)
.
fork_repository
(
forked_to_storage
,
"
#{
forked_to_disk_path
}
.git"
)
...
...
@@ -170,7 +168,7 @@ module Gitlab
# Ex.
# remove_repository("/path/to/storage", "gitlab/gitlab-ci")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
387
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/
873
def
remove_repository
(
storage
,
name
)
gitlab_projects
(
storage
,
"
#{
name
}
.git"
).
rm_project
end
...
...
@@ -221,7 +219,6 @@ module Gitlab
# Ex.
# add_namespace("/path/to/storage", "gitlab")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/385
def
add_namespace
(
storage
,
name
)
Gitlab
::
GitalyClient
.
migrate
(
:add_namespace
)
do
|
enabled
|
if
enabled
...
...
@@ -243,7 +240,6 @@ module Gitlab
# Ex.
# rm_namespace("/path/to/storage", "gitlab")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/385
def
rm_namespace
(
storage
,
name
)
Gitlab
::
GitalyClient
.
migrate
(
:remove_namespace
)
do
|
enabled
|
if
enabled
...
...
@@ -261,7 +257,6 @@ module Gitlab
# Ex.
# mv_namespace("/path/to/storage", "gitlab", "gitlabhq")
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/385
def
mv_namespace
(
storage
,
old_name
,
new_name
)
Gitlab
::
GitalyClient
.
migrate
(
:rename_namespace
)
do
|
enabled
|
if
enabled
...
...
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