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
4387faf0
Commit
4387faf0
authored
Feb 01, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-02-01
parents
8ec1dcef
f9e9d5d5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
87 deletions
+45
-87
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+11
-13
app/assets/javascripts/users/activity_calendar.js
app/assets/javascripts/users/activity_calendar.js
+14
-9
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-24
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
qa/qa/factory/resource/issue.rb
qa/qa/factory/resource/issue.rb
+0
-2
qa/qa/specs/features/project/create_issue_spec.rb
qa/qa/specs/features/project/create_issue_spec.rb
+18
-0
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+0
-38
No files found.
app/assets/javascripts/project_find_file.js
View file @
4387faf0
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, quotes, consistent-return, one-var, one-var-declaration-per-line, no-cond-assign, max-len, object-shorthand, no-param-reassign, comma-dangle, prefer-template, no-unused-vars, no-return-assign */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, quotes, consistent-return, one-var, one-var-declaration-per-line, no-cond-assign, max-len, object-shorthand, no-param-reassign, comma-dangle, prefer-template, no-unused-vars, no-return-assign */
import
fuzzaldrinPlus
from
'
fuzzaldrin-plus
'
;
import
fuzzaldrinPlus
from
'
fuzzaldrin-plus
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
flash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
// highlight text(awefwbwgtc -> <b>a</b>wefw<b>b</b>wgt<b>c</b> )
// highlight text(awefwbwgtc -> <b>a</b>wefw<b>b</b>wgt<b>c</b> )
const
highlighter
=
function
(
element
,
text
,
matches
)
{
const
highlighter
=
function
(
element
,
text
,
matches
)
{
...
@@ -72,19 +75,14 @@ export default class ProjectFindFile {
...
@@ -72,19 +75,14 @@ export default class ProjectFindFile {
// files pathes load
// files pathes load
load
(
url
)
{
load
(
url
)
{
return
$
.
ajax
({
axios
.
get
(
url
)
url
:
url
,
.
then
(({
data
})
=>
{
method
:
"
get
"
,
this
.
element
.
find
(
'
.loading
'
).
hide
();
dataType
:
"
json
"
,
this
.
filePaths
=
data
;
success
:
(
function
(
_this
)
{
this
.
findFile
();
return
function
(
data
)
{
this
.
element
.
find
(
'
.files-slider tr.tree-item
'
).
eq
(
0
).
addClass
(
'
selected
'
).
focus
();
_this
.
element
.
find
(
"
.loading
"
).
hide
();
})
_this
.
filePaths
=
data
;
.
catch
(()
=>
flash
(
__
(
'
An error occurred while loading filenames
'
)));
_this
.
findFile
();
return
_this
.
element
.
find
(
"
.files-slider tr.tree-item
"
).
eq
(
0
).
addClass
(
"
selected
"
).
focus
();
};
})(
this
)
});
}
}
// render result
// render result
...
...
app/assets/javascripts/users/activity_calendar.js
View file @
4387faf0
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
scaleLinear
,
scaleThreshold
}
from
'
d3-scale
'
;
import
{
scaleLinear
,
scaleThreshold
}
from
'
d3-scale
'
;
import
{
select
}
from
'
d3-selection
'
;
import
{
select
}
from
'
d3-selection
'
;
import
{
getDayName
,
getDayDifference
}
from
'
../lib/utils/datetime_utility
'
;
import
{
getDayName
,
getDayDifference
}
from
'
~/lib/utils/datetime_utility
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
flash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
const
d3
=
{
select
,
scaleLinear
,
scaleThreshold
};
const
d3
=
{
select
,
scaleLinear
,
scaleThreshold
};
...
@@ -221,14 +224,16 @@ export default class ActivityCalendar {
...
@@ -221,14 +224,16 @@ export default class ActivityCalendar {
this
.
currentSelectedDate
.
getDate
(),
this
.
currentSelectedDate
.
getDate
(),
].
join
(
'
-
'
);
].
join
(
'
-
'
);
$
.
ajax
({
$
(
'
.user-calendar-activities
'
).
html
(
LOADING_HTML
);
url
:
this
.
calendarActivitiesPath
,
data
:
{
date
},
axios
.
get
(
this
.
calendarActivitiesPath
,
{
cache
:
false
,
params
:
{
dataType
:
'
html
'
,
date
,
beforeSend
:
()
=>
$
(
'
.user-calendar-activities
'
).
html
(
LOADING_HTML
),
},
success
:
data
=>
$
(
'
.user-calendar-activities
'
).
html
(
data
),
responseType
:
'
text
'
,
});
})
.
then
(({
data
})
=>
$
(
'
.user-calendar-activities
'
).
html
(
data
))
.
catch
(()
=>
flash
(
__
(
'
An error occurred while retrieving calendar activity
'
)));
}
else
{
}
else
{
this
.
currentSelectedDate
=
''
;
this
.
currentSelectedDate
=
''
;
$
(
'
.user-calendar-activities
'
).
html
(
''
);
$
(
'
.user-calendar-activities
'
).
html
(
''
);
...
...
lib/gitlab/git/repository.rb
View file @
4387faf0
...
@@ -462,7 +462,6 @@ module Gitlab
...
@@ -462,7 +462,6 @@ module Gitlab
path:
nil
,
path:
nil
,
follow:
false
,
follow:
false
,
skip_merges:
false
,
skip_merges:
false
,
disable_walk:
false
,
after:
nil
,
after:
nil
,
before:
nil
before:
nil
}
}
...
@@ -494,11 +493,7 @@ module Gitlab
...
@@ -494,11 +493,7 @@ module Gitlab
return
[]
return
[]
end
end
if
log_using_shell?
(
options
)
log_by_shell
(
sha
,
options
)
log_by_shell
(
sha
,
options
)
else
log_by_walk
(
sha
,
options
)
end
end
end
def
count_commits
(
options
)
def
count_commits
(
options
)
...
@@ -1645,24 +1640,6 @@ module Gitlab
...
@@ -1645,24 +1640,6 @@ module Gitlab
end
end
end
end
def
log_using_shell?
(
options
)
options
[
:path
].
present?
||
options
[
:disable_walk
]
||
options
[
:skip_merges
]
||
options
[
:after
]
||
options
[
:before
]
end
def
log_by_walk
(
sha
,
options
)
walk_options
=
{
show:
sha
,
sort:
Rugged
::
SORT_NONE
,
limit:
options
[
:limit
],
offset:
options
[
:offset
]
}
Rugged
::
Walker
.
walk
(
rugged
,
walk_options
).
to_a
end
# Gitaly note: JV: although #log_by_shell shells out to Git I think the
# Gitaly note: JV: although #log_by_shell shells out to Git I think the
# complexity is such that we should migrate it as Ruby before trying to
# complexity is such that we should migrate it as Ruby before trying to
# do it in Go.
# do it in Go.
...
...
lib/gitlab/gitaly_client/commit_service.rb
View file @
4387faf0
...
@@ -257,7 +257,7 @@ module Gitlab
...
@@ -257,7 +257,7 @@ module Gitlab
offset:
options
[
:offset
],
offset:
options
[
:offset
],
follow:
options
[
:follow
],
follow:
options
[
:follow
],
skip_merges:
options
[
:skip_merges
],
skip_merges:
options
[
:skip_merges
],
disable_walk:
options
[
:disable_walk
]
disable_walk:
true
# This option is deprecated. The 'walk' implementation is being removed.
)
)
request
.
after
=
GitalyClient
.
timestamp
(
options
[
:after
])
if
options
[
:after
]
request
.
after
=
GitalyClient
.
timestamp
(
options
[
:after
])
if
options
[
:after
]
request
.
before
=
GitalyClient
.
timestamp
(
options
[
:before
])
if
options
[
:before
]
request
.
before
=
GitalyClient
.
timestamp
(
options
[
:before
])
if
options
[
:before
]
...
...
qa/qa/factory/resource/issue.rb
View file @
4387faf0
require
'securerandom'
module
QA
module
QA
module
Factory
module
Factory
module
Resource
module
Resource
...
...
qa/qa/specs/features/project/create_issue_spec.rb
0 → 100644
View file @
4387faf0
module
QA
feature
'creates issue'
,
:core
do
let
(
:issue_title
)
{
'issue title'
}
scenario
'user creates issue'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Factory
::
Resource
::
Issue
.
fabricate!
do
|
issue
|
issue
.
title
=
issue_title
end
Page
::
Menu
::
Side
.
act
{
click_issues
}
expect
(
page
).
to
have_content
(
issue_title
)
end
end
end
spec/lib/gitlab/git/repository_spec.rb
View file @
4387faf0
...
@@ -905,44 +905,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -905,44 +905,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
end
end
context
"compare results between log_by_walk and log_by_shell"
do
let
(
:options
)
{
{
ref:
"master"
}
}
let
(
:commits_by_walk
)
{
repository
.
log
(
options
).
map
(
&
:id
)
}
let
(
:commits_by_shell
)
{
repository
.
log
(
options
.
merge
({
disable_walk:
true
})).
map
(
&
:id
)
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
context
"with limit"
do
let
(
:options
)
{
{
ref:
"master"
,
limit:
1
}
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
end
context
"with offset"
do
let
(
:options
)
{
{
ref:
"master"
,
offset:
1
}
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
end
context
"with skip_merges"
do
let
(
:options
)
{
{
ref:
"master"
,
skip_merges:
true
}
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
end
context
"with path"
do
let
(
:options
)
{
{
ref:
"master"
,
path:
"encoding"
}
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
context
"with follow"
do
let
(
:options
)
{
{
ref:
"master"
,
path:
"encoding"
,
follow:
true
}
}
it
{
expect
(
commits_by_walk
).
to
eq
(
commits_by_shell
)
}
end
end
end
context
"where provides 'after' timestamp"
do
context
"where provides 'after' timestamp"
do
options
=
{
after:
Time
.
iso8601
(
'2014-03-03T20:15:01+00:00'
)
}
options
=
{
after:
Time
.
iso8601
(
'2014-03-03T20:15:01+00:00'
)
}
...
...
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