BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
30912835
Unverified
Commit
30912835
authored
Nov 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly remove and re-create satellites when project transfer
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
182aa19e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
project_transfer_service.rb
app/services/project_transfer_service.rb
+6
-2
No files found.
app/services/project_transfer_service.rb
View file @
30912835
...
...
@@ -18,6 +18,10 @@ class ProjectTransferService
raise
TransferError
.
new
(
"Project with same path in target namespace already exists"
)
end
# Remove old satellite
project
.
satellite
.
destroy
# Apply new namespace id
project
.
namespace
=
new_namespace
project
.
save!
...
...
@@ -29,8 +33,8 @@ class ProjectTransferService
# Move wiki repo also if present
gitlab_shell
.
mv_repository
(
"
#{
old_path
}
.wiki"
,
"
#{
new_path
}
.wiki"
)
#
create satellite repo
project
.
ensure_satellite_exists
#
Create a new satellite (reload project from DB)
Project
.
find
(
project
.
id
)
.
ensure_satellite_exists
# clear project cached events
project
.
reset_events_cache
...
...
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