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
2f223377
Commit
2f223377
authored
Dec 19, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write project full path to .git/config when migrating legacy storage
parent
ca089f59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
migrate_repository_service.rb
...ces/projects/hashed_storage/migrate_repository_service.rb
+7
-0
migrate_repository_service_spec.rb
...rojects/hashed_storage/migrate_repository_service_spec.rb
+7
-1
No files found.
app/services/projects/hashed_storage/migrate_repository_service.rb
View file @
2f223377
...
...
@@ -39,6 +39,13 @@ module Projects
yield
end
# We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using
# the import rake task.
if
result
project
.
write_repository_config
(
:fullpath
,
project
.
full_path
)
end
result
end
...
...
spec/services/projects/hashed_storage/migrate_repository_service_spec.rb
View file @
2f223377
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
Projects
::
HashedStorage
::
MigrateRepositoryService
do
let
(
:gitlab_shell
)
{
Gitlab
::
Shell
.
new
}
let
(
:project
)
{
create
(
:project
,
:
empty_repo
,
:wiki_repo
)
}
let
(
:project
)
{
create
(
:project
,
:
repository
,
:wiki_repo
)
}
let
(
:service
)
{
described_class
.
new
(
project
)
}
let
(
:legacy_storage
)
{
Storage
::
LegacyProject
.
new
(
project
)
}
let
(
:hashed_storage
)
{
Storage
::
HashedProject
.
new
(
project
)
}
...
...
@@ -33,6 +33,12 @@ describe Projects::HashedStorage::MigrateRepositoryService do
service
.
execute
end
it
'writes project full path to .git/config'
do
service
.
execute
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
end
context
'when one move fails'
do
...
...
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