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
Jérome Perrin
gitlab-ce
Commits
097eafc8
Commit
097eafc8
authored
May 31, 2016
by
James Lopez
Committed by
Robert Speicher
Jun 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some issues and improved error output for forking
parent
64c39055
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
app/models/project.rb
app/models/project.rb
+8
-1
app/services/projects/create_service.rb
app/services/projects/create_service.rb
+1
-1
No files found.
app/models/project.rb
View file @
097eafc8
...
...
@@ -1019,7 +1019,14 @@ class Project < ActiveRecord::Base
end
def
mark_import_as_failed
(
error_message
)
original_errors
=
errors
.
dup
sanitized_message
=
Gitlab
::
UrlSanitizer
.
sanitize
(
error_message
)
import_fail
update_column
(
:import_error
,
Gitlab
::
UrlSanitizer
.
sanitize
(
error_message
))
update_column
(
:import_error
,
sanitized_message
)
rescue
ActiveRecord
::
ActiveRecordError
=>
e
Rails
.
logger
.
error
(
"Error setting import status to failed:
#{
e
.
message
}
. Original error:
#{
sanitized_message
}
"
)
ensure
@errors
=
original_errors
end
end
app/services/projects/create_service.rb
View file @
097eafc8
...
...
@@ -59,7 +59,7 @@ module Projects
if
@project
.
errors
.
empty?
@project
.
add_import_job
if
@project
.
import?
else
fail
(
error:
@project
.
errors
.
join
(
', '
))
fail
(
error:
@project
.
errors
.
full_messages
.
join
(
', '
))
end
@project
rescue
=>
e
...
...
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