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
6c082ede
Commit
6c082ede
authored
May 18, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue exporting builds
parent
0de533ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+14
-1
No files found.
lib/gitlab/import_export/relation_factory.rb
View file @
6c082ede
...
@@ -22,7 +22,7 @@ module Gitlab
...
@@ -22,7 +22,7 @@ module Gitlab
update_user_references
(
relation_hash
,
members_mapper
.
map
)
update_user_references
(
relation_hash
,
members_mapper
.
map
)
update_project_references
(
relation_hash
,
klass
)
update_project_references
(
relation_hash
,
klass
)
imported_object
(
klass
,
relation_hash
)
generate_imported_object
(
klass
,
relation_hash
,
relation_sym
)
end
end
private
private
...
@@ -58,6 +58,18 @@ module Gitlab
...
@@ -58,6 +58,18 @@ module Gitlab
"
\n\n
*By
#{
author_name
}
on
#{
timestamp
}
(imported from GitLab project)*"
"
\n\n
*By
#{
author_name
}
on
#{
timestamp
}
(imported from GitLab project)*"
end
end
def
generate_imported_object
(
klass
,
relation_hash
,
relation_sym
)
if
relation_sym
==
'commit_status'
# call #trace= method after assigning the other attributes
trace
=
relation_hash
.
delete
(
'trace'
)
imported_object
(
klass
,
relation_hash
)
do
|
imported_object
|
imported_object
.
trace
=
trace
imported_object
.
commit_id
=
nil
end
else
imported_object
(
klass
,
relation_hash
)
end
end
def
update_project_references
(
relation_hash
,
klass
)
def
update_project_references
(
relation_hash
,
klass
)
project_id
=
relation_hash
.
delete
(
'project_id'
)
project_id
=
relation_hash
.
delete
(
'project_id'
)
...
@@ -86,6 +98,7 @@ module Gitlab
...
@@ -86,6 +98,7 @@ module Gitlab
def
imported_object
(
klass
,
relation_hash
)
def
imported_object
(
klass
,
relation_hash
)
imported_object
=
klass
.
new
(
relation_hash
)
imported_object
=
klass
.
new
(
relation_hash
)
yield
(
imported_object
)
if
block_given?
imported_object
.
importing
=
true
if
imported_object
.
respond_to?
(
:importing
)
imported_object
.
importing
=
true
if
imported_object
.
respond_to?
(
:importing
)
imported_object
imported_object
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