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
Jérome Perrin
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
app/models/project.rb
app/models/project.rb
+4
-0
app/models/storage/hashed_project.rb
app/models/storage/hashed_project.rb
+2
-2
app/models/storage/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
...
@@ -478,6 +478,10 @@ class Project < ActiveRecord::Base
@repository
||=
Repository
.
new
(
full_path
,
self
,
disk_path:
disk_path
)
@repository
||=
Repository
.
new
(
full_path
,
self
,
disk_path:
disk_path
)
end
end
def
reload_repository!
@repository
=
nil
end
def
container_registry_url
def
container_registry_url
if
Gitlab
.
config
.
registry
.
enabled
if
Gitlab
.
config
.
registry
.
enabled
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
full_path
.
downcase
}
"
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
full_path
.
downcase
}
"
...
...
app/models/storage/hashed_project.rb
View file @
95a270c8
...
@@ -47,11 +47,11 @@ module Storage
...
@@ -47,11 +47,11 @@ module Storage
project
.
send_move_instructions
(
old_path_with_namespace
)
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
)
SystemHooksService
.
new
.
execute_hooks_for
(
project
,
:rename
)
@repository
=
nil
project
.
reload_repository!
rescue
=>
e
rescue
=>
e
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
# Returning false does not rollback after_* transaction but gives
# Returning false does not rollback after_* transaction but gives
...
...
app/models/storage/legacy_project.rb
View file @
95a270c8
...
@@ -52,11 +52,11 @@ module Storage
...
@@ -52,11 +52,11 @@ module Storage
project
.
send_move_instructions
(
old_path_with_namespace
)
project
.
send_move_instructions
(
old_path_with_namespace
)
project
.
expires_full_path_cache
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
)
SystemHooksService
.
new
.
execute_hooks_for
(
project
,
:rename
)
@repository
=
nil
project
.
reload_repository!
rescue
=>
e
rescue
=>
e
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
Rails
.
logger
.
error
"Exception renaming
#{
old_path_with_namespace
}
->
#{
new_path_with_namespace
}
:
#{
e
}
"
# Returning false does not rollback after_* transaction but gives
# 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