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
fccdf43f
Commit
fccdf43f
authored
Apr 21, 2020
by
Kassio Borges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import group with ndjson only if needed
parent
cc08fb76
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
174 additions
and
131 deletions
+174
-131
app/services/groups/import_export/import_service.rb
app/services/groups/import_export/import_service.rb
+6
-1
spec/services/groups/import_export/import_service_spec.rb
spec/services/groups/import_export/import_service_spec.rb
+168
-130
No files found.
app/services/groups/import_export/import_service.rb
View file @
fccdf43f
...
...
@@ -36,7 +36,7 @@ module Groups
def
restorer
@restorer
||=
if
::
Feature
.
enabled?
(
:group_import_export_ndjson
,
@group
&
.
parent
)
if
ndjson?
Gitlab
::
ImportExport
::
Group
::
TreeRestorer
.
new
(
user:
@current_user
,
shared:
@shared
,
...
...
@@ -52,6 +52,11 @@ module Groups
end
end
def
ndjson?
::
Feature
.
enabled?
(
:group_import_export_ndjson
,
@group
&
.
parent
)
&&
File
.
exist?
(
File
.
join
(
@shared
.
export_path
,
'tree/groups/_all.ndjson'
))
end
def
remove_import_file
upload
=
@group
.
import_export_upload
...
...
spec/services/groups/import_export/import_service_spec.rb
View file @
fccdf43f
This diff is collapsed.
Click to expand it.
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