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
95a270c8
Commit
95a270c8
authored
Aug 08, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repository reloading in some specs
parent
47d3ea01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
project.rb
app/models/project.rb
+4
-0
hashed_project.rb
app/models/storage/hashed_project.rb
+2
-2
legacy_project.rb
app/models/storage/legacy_project.rb
+2
-2
No files found.
app/models/project.rb
View file @
95a270c8
...
...
@@ -478,6 +478,10 @@ class Project < ActiveRecord::Base
@repository
||=
Repository
.
new
(
full_path
,
self
,
disk_path:
disk_path
)
end
def
reload_repository!
@repository
=
nil
end
def
container_registry_url
if
Gitlab
.
config
.
registry
.
enabled
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
full_path
.
downcase
}
"
...
...
app/models/storage/hashed_project.rb
View file @
95a270c8
...
...
@@ -47,11 +47,11 @@ module Storage
project
.
send_move_instructions
(
old_path_with_namespace
)
@
old_path_with_namespace
=
old_path_with_namespace
project
.
old_path_with_namespace
=
old_path_with_namespace
SystemHooksService
.
new
.
execute_hooks_for
(
project
,
:rename
)
@repository
=
nil
project
.
reload_repository!
rescue
=>
e
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
# Returning false does not rollback after_* transaction but gives
...
...
app/models/storage/legacy_project.rb
View file @
95a270c8
...
...
@@ -52,11 +52,11 @@ module Storage
project
.
send_move_instructions
(
old_path_with_namespace
)
project
.
expires_full_path_cache
@
old_path_with_namespace
=
old_path_with_namespace
project
.
old_path_with_namespace
=
old_path_with_namespace
SystemHooksService
.
new
.
execute_hooks_for
(
project
,
:rename
)
@repository
=
nil
project
.
reload_repository!
rescue
=>
e
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
# Returning false does not rollback after_* transaction but gives
...
...
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