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
iv
gitlab-ce
Commits
d2aa48c0
Commit
d2aa48c0
authored
Aug 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recreate project satellite on rename or transfer
parent
79b76d2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
app/models/project.rb
app/models/project.rb
+1
-0
app/services/project_transfer_service.rb
app/services/project_transfer_service.rb
+3
-0
No files found.
app/models/project.rb
View file @
d2aa48c0
...
@@ -421,6 +421,7 @@ class Project < ActiveRecord::Base
...
@@ -421,6 +421,7 @@ class Project < ActiveRecord::Base
begin
begin
gitlab_shell
.
mv_repository
(
"
#{
old_path_with_namespace
}
.wiki"
,
"
#{
new_path_with_namespace
}
.wiki"
)
gitlab_shell
.
mv_repository
(
"
#{
old_path_with_namespace
}
.wiki"
,
"
#{
new_path_with_namespace
}
.wiki"
)
gitlab_shell
.
rm_satellites
(
old_path_with_namespace
)
gitlab_shell
.
rm_satellites
(
old_path_with_namespace
)
ensure_satellite_exists
send_move_instructions
send_move_instructions
rescue
rescue
# Returning false does not rollback after_* transaction but gives
# Returning false does not rollback after_* transaction but gives
...
...
app/services/project_transfer_service.rb
View file @
d2aa48c0
...
@@ -29,6 +29,9 @@ class ProjectTransferService
...
@@ -29,6 +29,9 @@ class ProjectTransferService
# Move wiki repo also if present
# Move wiki repo also if present
gitlab_shell
.
mv_repository
(
"
#{
old_path
}
.wiki"
,
"
#{
new_path
}
.wiki"
)
gitlab_shell
.
mv_repository
(
"
#{
old_path
}
.wiki"
,
"
#{
new_path
}
.wiki"
)
# create satellite repo
project
.
ensure_satellite_exists
true
true
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