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
19e40ff2
Commit
19e40ff2
authored
Jun 07, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts in Project model
parent
104132d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
app/models/project.rb
app/models/project.rb
+1
-9
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-7
No files found.
app/models/project.rb
View file @
19e40ff2
...
...
@@ -344,13 +344,10 @@ class Project < ActiveRecord::Base
event
:import_fail
do
transition
[
:scheduled
,
:started
]
=>
:failed
<<<<<<<
HEAD
=======
end
event
:import_retry
do
transition
failed: :started
>>>>>>>
ce
/
master
end
state
:scheduled
...
...
@@ -358,18 +355,14 @@ class Project < ActiveRecord::Base
state
:finished
state
:failed
<<<<<<<
HEAD
before_transition
[
:none
,
:finished
,
:failed
]
=>
:scheduled
do
|
project
,
_
|
project
.
mirror_data
&
.
last_update_scheduled_at
=
Time
.
now
end
=======
>>>>>>>
ce
/
master
after_transition
[
:none
,
:finished
,
:failed
]
=>
:scheduled
do
|
project
,
_
|
project
.
run_after_commit
{
add_import_job
}
end
<<<<<<<
HEAD
before_transition
scheduled: :started
do
|
project
,
_
|
project
.
mirror_data
&
.
last_update_started_at
=
Time
.
now
end
...
...
@@ -417,9 +410,8 @@ class Project < ActiveRecord::Base
after_transition
[
:finished
,
:failed
]
=>
[
:scheduled
,
:started
]
do
|
project
,
_
|
Gitlab
::
Mirror
.
increment_capacity
(
project
.
id
)
if
project
.
mirror?
end
=======
after_transition
started: :finished
,
do: :reset_cache_and_import_attrs
>>>>>>>
ce
/
master
end
class
<<
self
...
...
spec/models/project_spec.rb
View file @
19e40ff2
...
...
@@ -51,10 +51,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_one
(
:project_feature
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:statistics
).
class_name
(
'ProjectStatistics'
).
dependent
(
:delete
)
}
it
{
is_expected
.
to
have_one
(
:import_data
).
class_name
(
'ProjectImportData'
).
dependent
(
:delete
)
}
<<<<<<<
HEAD
it
{
is_expected
.
to
have_one
(
:mirror_data
).
class_name
(
'ProjectMirrorData'
).
dependent
(
:delete
)
}
=======
>>>>>>>
ce
/
master
it
{
is_expected
.
to
have_one
(
:last_event
).
class_name
(
'Event'
)
}
it
{
is_expected
.
to
have_one
(
:forked_from_project
).
through
(
:forked_project_link
)
}
it
{
is_expected
.
to
have_many
(
:commit_statuses
)
}
...
...
@@ -1925,10 +1922,7 @@ describe Project, models: true do
expect
(
RepositoryImportWorker
).
to
receive
(
:perform_async
).
with
(
project
.
id
)
expect
(
RepositoryImportWorker
).
to
receive
(
:perform_async
).
with
(
project
.
id
)
project
.
add_import_job
end
project
.
add_import_job
end
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