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
eddeeae6
Commit
eddeeae6
authored
Nov 03, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the RepositoryMirroring concern to the EE namespace
parent
750b82d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
14 deletions
+16
-14
app/models/concerns/repository_mirroring.rb
app/models/concerns/repository_mirroring.rb
+0
-13
app/models/repository.rb
app/models/repository.rb
+0
-1
ee/app/models/concerns/ee/repository_mirroring.rb
ee/app/models/concerns/ee/repository_mirroring.rb
+15
-0
ee/app/models/ee/repository.rb
ee/app/models/ee/repository.rb
+1
-0
No files found.
app/models/concerns/repository_mirroring.rb
deleted
100644 → 0
View file @
750b82d3
module
RepositoryMirroring
def
storage_path
@project
.
repository_storage_path
end
def
push_remote_branches
(
remote
,
branches
)
gitlab_shell
.
push_remote_branches
(
storage_path
,
disk_path
,
remote
,
branches
)
end
def
delete_remote_branches
(
remote
,
branches
)
gitlab_shell
.
delete_remote_branches
(
storage_path
,
disk_path
,
remote
,
branches
)
end
end
app/models/repository.rb
View file @
eddeeae6
...
...
@@ -18,7 +18,6 @@ class Repository
include
Gitlab
::
ShellAdapter
include
Elastic
::
RepositoriesSearch
include
RepositoryMirroring
prepend
EE
::
Repository
attr_accessor
:full_path
,
:disk_path
,
:project
,
:is_wiki
...
...
ee/app/models/concerns/ee/repository_mirroring.rb
0 → 100644
View file @
eddeeae6
module
EE
module
RepositoryMirroring
def
storage_path
@project
.
repository_storage_path
end
def
push_remote_branches
(
remote
,
branches
)
gitlab_shell
.
push_remote_branches
(
storage_path
,
disk_path
,
remote
,
branches
)
end
def
delete_remote_branches
(
remote
,
branches
)
gitlab_shell
.
delete_remote_branches
(
storage_path
,
disk_path
,
remote
,
branches
)
end
end
end
ee/app/models/ee/repository.rb
View file @
eddeeae6
...
...
@@ -4,6 +4,7 @@ module EE
# This module is intended to encapsulate EE-specific model logic
# and be prepended in the `Repository` model
module
Repository
prepend
RepositoryMirroring
extend
ActiveSupport
::
Concern
# Transiently sets a configuration variable
...
...
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