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
ef62a7c2
Commit
ef62a7c2
authored
Mar 12, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure data integrity
parent
c2ea4941
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
app/models/concerns/storage/legacy_namespace.rb
app/models/concerns/storage/legacy_namespace.rb
+5
-1
No files found.
app/models/concerns/storage/legacy_namespace.rb
View file @
ef62a7c2
...
...
@@ -7,6 +7,10 @@ module Storage
raise
Gitlab
::
UpdatePathError
.
new
(
'Namespace cannot be moved, because at least one project has tags in container registry'
)
end
parent_was
=
if
parent_changed?
&&
parent_id_was
.
present?
Namespace
.
find
(
parent_id_was
)
# raise NotFound early if needed
end
expires_full_path_cache
# Move the namespace directory in all storage paths used by member projects
...
...
@@ -28,7 +32,7 @@ module Storage
end
if
parent_changed?
former_parent_full_path
=
parent_
id_was
.
nil?
?
nil
:
Namespace
.
find
(
parent_id_was
)
.
full_path
former_parent_full_path
=
parent_
was
.
full_path
parent_full_path
=
parent
&
.
full_path
Gitlab
::
UploadsTransfer
.
new
.
move_namespace
(
path
,
former_parent_full_path
,
parent_full_path
)
Gitlab
::
PagesTransfer
.
new
.
move_namespace
(
path
,
former_parent_full_path
,
parent_full_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