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
Boxiang Sun
gitlab-ce
Commits
7e38cc9c
Commit
7e38cc9c
authored
Sep 06, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small refactor
parent
a6852986
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+5
-5
No files found.
lib/gitlab/import_export/project_tree_restorer.rb
View file @
7e38cc9c
...
...
@@ -10,7 +10,7 @@ module Gitlab
@shared
=
shared
@project
=
project
@project_id
=
project
.
id
@saved
=
[]
@saved
=
true
end
def
restore
...
...
@@ -63,16 +63,16 @@ module Gitlab
end
end
@saved
.
all?
@saved
end
def
save_relation_hash
(
relation_hash_batch
,
relation_key
)
relation_hash
=
create_relation
(
relation_key
,
relation_hash_batch
)
@saved
<<
restored_project
.
append_or_update_attribute
(
relation_key
,
relation_hash
)
@saved
=
false
unless
restored_project
.
append_or_update_attribute
(
relation_key
,
relation_hash
)
# Restore the project again, extra query
but let us skip
holding the AR objects in memory
@restored_project
=
Project
.
find
(
@project_id
)
# Restore the project again, extra query
that skips
holding the AR objects in memory
@restored_project
.
reload
end
def
default_relation_list
...
...
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