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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
16107364
Commit
16107364
authored
Jul 23, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make disk_path keyword argument and optional
parent
fb06a4d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
app/models/project.rb
app/models/project.rb
+3
-4
app/models/project_wiki.rb
app/models/project_wiki.rb
+1
-1
app/models/repository.rb
app/models/repository.rb
+2
-2
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+1
-1
No files found.
app/models/project.rb
View file @
16107364
...
...
@@ -480,7 +480,7 @@ class Project < ActiveRecord::Base
end
def
repository
@repository
||=
Repository
.
new
(
full_path
,
disk_path
,
self
)
@repository
||=
Repository
.
new
(
full_path
,
self
,
disk_path:
disk_path
)
end
def
container_registry_url
...
...
@@ -980,9 +980,8 @@ class Project < ActiveRecord::Base
# Expires various caches before a project is renamed.
def
expire_caches_before_rename
(
old_path
)
# TODO: if we start using UUIDs for cache, we don't need to do this HACK anymore
repo
=
Repository
.
new
(
old_path
,
old_path
,
self
)
wiki
=
Repository
.
new
(
"
#{
old_path
}
.wiki"
,
"
#{
old_path
}
.wiki"
,
self
)
repo
=
Repository
.
new
(
old_path
,
self
)
wiki
=
Repository
.
new
(
"
#{
old_path
}
.wiki"
,
self
)
if
repo
.
exists?
repo
.
before_delete
...
...
app/models/project_wiki.rb
View file @
16107364
...
...
@@ -138,7 +138,7 @@ class ProjectWiki
end
def
repository
@repository
||=
Repository
.
new
(
full_path
,
disk_path
,
@project
)
@repository
||=
Repository
.
new
(
full_path
,
@project
,
disk_path:
disk_path
)
end
def
default_branch
...
...
app/models/repository.rb
View file @
16107364
...
...
@@ -52,9 +52,9 @@ class Repository
end
end
def
initialize
(
full_path
,
disk_path
,
project
)
def
initialize
(
full_path
,
project
,
disk_path:
nil
)
@full_path
=
full_path
@disk_path
=
disk_path
@disk_path
=
disk_path
||
full_path
@project
=
project
end
...
...
app/services/projects/destroy_service.rb
View file @
16107364
...
...
@@ -127,7 +127,7 @@ module Projects
def
flush_caches
(
project
)
project
.
repository
.
before_delete
Repository
.
new
(
wiki_path
,
repo_path
,
project
).
before_delete
Repository
.
new
(
wiki_path
,
project
,
disk_path:
repo_path
).
before_delete
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