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
3cbec51b
Commit
3cbec51b
authored
Oct 18, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use wiki.disk_path in EE
parent
7c63e8dc
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
app/services/geo/repository_created_event_store.rb
app/services/geo/repository_created_event_store.rb
+1
-1
app/services/geo/repository_renamed_event_store.rb
app/services/geo/repository_renamed_event_store.rb
+1
-1
app/services/projects/update_repository_storage_service.rb
app/services/projects/update_repository_storage_service.rb
+2
-2
spec/ee/spec/services/ee/projects/destroy_service_spec.rb
spec/ee/spec/services/ee/projects/destroy_service_spec.rb
+1
-1
spec/factories/geo/event_log.rb
spec/factories/geo/event_log.rb
+1
-1
spec/services/geo/repository_created_event_store_spec.rb
spec/services/geo/repository_created_event_store_spec.rb
+1
-1
spec/services/geo/repository_renamed_event_store_spec.rb
spec/services/geo/repository_renamed_event_store_spec.rb
+1
-1
spec/services/projects/update_repository_storage_service_spec.rb
...rvices/projects/update_repository_storage_service_spec.rb
+3
-3
No files found.
app/services/geo/repository_created_event_store.rb
View file @
3cbec51b
...
...
@@ -10,7 +10,7 @@ module Geo
repository_storage_name:
project
.
repository
.
storage
,
repository_storage_path:
project
.
repository_storage_path
,
repo_path:
project
.
disk_path
,
wiki_path:
(
"
#{
project
.
disk_path
}
.wiki"
if
project
.
wiki_enabled?
),
wiki_path:
(
project
.
wiki
.
disk_path
if
project
.
wiki_enabled?
),
project_name:
project
.
name
)
end
...
...
app/services/geo/repository_renamed_event_store.rb
View file @
3cbec51b
...
...
@@ -31,7 +31,7 @@ module Geo
end
def
new_wiki_path_with_namespace
"
#{
project
.
disk_path
}
.wiki"
project
.
wiki
.
disk_path
end
end
end
app/services/projects/update_repository_storage_service.rb
View file @
3cbec51b
...
...
@@ -11,7 +11,7 @@ module Projects
result
=
move_storage
(
project
.
disk_path
,
new_storage_path
)
if
project
.
wiki
.
repository_exists?
result
&&=
move_storage
(
"
#{
project
.
disk_path
}
.wiki"
,
new_storage_path
)
result
&&=
move_storage
(
project
.
wiki
.
disk_path
,
new_storage_path
)
end
if
result
...
...
@@ -44,7 +44,7 @@ module Projects
if
wiki
.
repository_exists?
GitlabShellWorker
.
perform_async
(
:mv_repository
,
old_repository_storage_path
,
"
#{
disk_path
}
.wiki"
,
wiki
.
disk_path
,
"
#{
new_project_path
}
.wiki"
)
end
end
...
...
spec/ee/spec/services/ee/projects/destroy_service_spec.rb
View file @
3cbec51b
...
...
@@ -6,7 +6,7 @@ describe Projects::DestroyService do
let!
(
:project_id
)
{
project
.
id
}
let!
(
:project_name
)
{
project
.
name
}
let!
(
:project_path
)
{
project
.
disk_path
}
let!
(
:wiki_path
)
{
project
.
disk_path
+
'.wiki'
}
let!
(
:wiki_path
)
{
project
.
wiki
.
disk_path
}
let!
(
:storage_name
)
{
project
.
repository_storage
}
let!
(
:storage_path
)
{
project
.
repository_storage_path
}
...
...
spec/factories/geo/event_log.rb
View file @
3cbec51b
...
...
@@ -24,7 +24,7 @@ FactoryGirl.define do
repository_storage_path
{
project
.
repository_storage_path
}
add_attribute
(
:repo_path
)
{
project
.
disk_path
}
project_name
{
project
.
name
}
wiki_path
{
"
#{
project
.
disk_path
}
.wiki"
}
wiki_path
{
project
.
wiki
.
disk_path
}
end
factory
:geo_repository_updated_event
,
class:
Geo
::
RepositoryUpdatedEvent
do
...
...
spec/services/geo/repository_created_event_store_spec.rb
View file @
3cbec51b
...
...
@@ -29,7 +29,7 @@ describe Geo::RepositoryCreatedEventStore do
expect
(
event
).
to
have_attributes
(
project_id:
project
.
id
,
repo_path:
project
.
disk_path
,
wiki_path:
"
#{
project
.
disk_path
}
.wiki"
,
wiki_path:
project
.
wiki
.
disk_path
,
project_name:
project
.
name
,
repository_storage_name:
project
.
repository_storage
,
repository_storage_path:
project
.
repository_storage_path
...
...
spec/services/geo/repository_renamed_event_store_spec.rb
View file @
3cbec51b
...
...
@@ -33,7 +33,7 @@ describe Geo::RepositoryRenamedEventStore do
expect
(
event
.
old_path_with_namespace
).
to
eq
(
old_path_with_namespace
)
expect
(
event
.
new_path_with_namespace
).
to
eq
(
project
.
disk_path
)
expect
(
event
.
old_wiki_path_with_namespace
).
to
eq
(
"
#{
old_path_with_namespace
}
.wiki"
)
expect
(
event
.
new_wiki_path_with_namespace
).
to
eq
(
"
#{
project
.
disk_path
}
.wiki"
)
expect
(
event
.
new_wiki_path_with_namespace
).
to
eq
(
project
.
wiki
.
disk_path
)
expect
(
event
.
old_path
).
to
eq
(
old_path
)
expect
(
event
.
new_path
).
to
eq
(
project
.
path
)
end
...
...
spec/services/projects/update_repository_storage_service_spec.rb
View file @
3cbec51b
...
...
@@ -83,12 +83,12 @@ describe Projects::UpdateRepositoryStorageService do
"
#{
project
.
disk_path
}
+
#{
project
.
id
}
+moved+
#{
time
.
to_i
}
"
)
expect
(
gitlab_shell
).
to
receive
(
:mv_storage
)
.
with
(
'tmp/tests/storage_a'
,
"
#{
project
.
disk_path
}
.wiki"
,
'tmp/tests/storage_b'
)
.
with
(
'tmp/tests/storage_a'
,
project
.
wiki
.
disk_path
,
'tmp/tests/storage_b'
)
.
and_return
(
true
)
expect
(
GitlabShellWorker
).
to
receive
(
:perform_async
)
.
with
(
:mv_repository
,
'tmp/tests/storage_a'
,
"
#{
project
.
disk_path
}
.wiki"
,
project
.
wiki
.
disk_path
,
"
#{
project
.
disk_path
}
+
#{
project
.
id
}
+moved+
#{
time
.
to_i
}
.wiki"
)
subject
.
execute
(
'b'
)
...
...
@@ -104,7 +104,7 @@ describe Projects::UpdateRepositoryStorageService do
.
with
(
'tmp/tests/storage_a'
,
project
.
disk_path
,
'tmp/tests/storage_b'
)
.
and_return
(
true
)
expect
(
gitlab_shell
).
to
receive
(
:mv_storage
)
.
with
(
'tmp/tests/storage_a'
,
"
#{
project
.
disk_path
}
.wiki"
,
'tmp/tests/storage_b'
)
.
with
(
'tmp/tests/storage_a'
,
project
.
wiki
.
disk_path
,
'tmp/tests/storage_b'
)
.
and_return
(
false
)
expect
(
GitlabShellWorker
).
not_to
receive
(
:perform_async
)
...
...
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