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
300501c4
Commit
300501c4
authored
Dec 04, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update wiki repository path suffix
parent
2df26509
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
app/services/projects/hashed_storage/base_repository_service.rb
...rvices/projects/hashed_storage/base_repository_service.rb
+15
-4
ee/app/services/geo/move_repository_service.rb
ee/app/services/geo/move_repository_service.rb
+1
-1
No files found.
app/services/projects/hashed_storage/base_repository_service.rb
View file @
300501c4
...
...
@@ -8,13 +8,12 @@ module Projects
class
BaseRepositoryService
<
BaseService
include
Gitlab
::
ShellAdapter
attr_reader
:old_disk_path
,
:new_disk_path
,
:old_
wiki_disk_path
,
:old_
storage_version
,
:logger
,
:move_wiki
attr_reader
:old_disk_path
,
:new_disk_path
,
:old_storage_version
,
:logger
,
:move_wiki
def
initialize
(
project
:,
old_disk_path
:,
logger:
nil
)
@project
=
project
@logger
=
logger
||
Gitlab
::
AppLogger
@old_disk_path
=
old_disk_path
@old_wiki_disk_path
=
"
#{
old_disk_path
}
.wiki"
@move_wiki
=
has_wiki?
end
...
...
@@ -48,7 +47,7 @@ module Projects
result
=
move_repository
(
old_disk_path
,
new_disk_path
)
if
move_wiki
result
&&=
move_repository
(
old_wiki_disk_path
,
"
#{
new_disk_path
}
.wiki"
)
result
&&=
move_repository
(
old_wiki_disk_path
,
new_wiki_disk_path
)
end
result
...
...
@@ -56,7 +55,7 @@ module Projects
def
rollback_folder_move
move_repository
(
new_disk_path
,
old_disk_path
)
move_repository
(
"
#{
new_disk_path
}
.wiki"
,
old_wiki_disk_path
)
move_repository
(
new_wiki_disk_path
,
old_wiki_disk_path
)
end
def
try_to_set_repository_read_only!
...
...
@@ -68,6 +67,18 @@ module Projects
raise
RepositoryInUseError
,
migration_error
end
end
def
wiki_path_suffix
@wiki_path_suffix
||=
Gitlab
::
GlRepository
::
WIKI
.
path_suffix
end
def
old_wiki_disk_path
@old_wiki_disk_path
||=
"
#{
old_disk_path
}#{
wiki_path_suffix
}
"
end
def
new_wiki_disk_path
@new_wiki_disk_path
||=
"
#{
new_disk_path
}#{
wiki_path_suffix
}
"
end
end
end
end
...
...
ee/app/services/geo/move_repository_service.rb
View file @
300501c4
...
...
@@ -69,7 +69,7 @@ module Geo
end
def
wiki_path_suffix
Gitlab
::
GlRepository
::
WIKI
.
path_suffix
Gitlab
::
GlRepository
::
WIKI
.
path_suffix
end
def
old_wiki_disk_path
...
...
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