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
161cacae
Commit
161cacae
authored
Nov 21, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract a helper method to move repositories
parent
7e262371
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
app/services/projects/hashed_storage/migrate_repository_service.rb
...ces/projects/hashed_storage/migrate_repository_service.rb
+13
-5
No files found.
app/services/projects/hashed_storage/migrate_repository_service.rb
View file @
161cacae
...
...
@@ -11,11 +11,7 @@ module Projects
@new_disk_path
=
project
.
disk_path
result
=
move_repository
(
old_disk_path
,
new_disk_path
)
if
move_wiki
result
&&=
move_repository
(
old_wiki_disk_path
,
"
#{
new_disk_path
}
.wiki"
)
end
result
=
move_repositories
if
result
project
.
write_repository_config
...
...
@@ -34,6 +30,18 @@ module Projects
result
end
private
def
move_repositories
result
=
move_repository
(
old_disk_path
,
new_disk_path
)
if
move_wiki
result
&&=
move_repository
(
old_wiki_disk_path
,
"
#{
new_disk_path
}
.wiki"
)
end
result
end
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