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
9fe346af
Commit
9fe346af
authored
Jul 17, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts from eslint changes
parent
3a2f883f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1 addition
and
142 deletions
+1
-142
app/assets/javascripts/repo/repo_binary_viewer.js
app/assets/javascripts/repo/repo_binary_viewer.js
+0
-16
app/assets/javascripts/repo/repo_bundle.js
app/assets/javascripts/repo/repo_bundle.js
+0
-11
app/assets/javascripts/repo/repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+0
-15
app/assets/javascripts/repo/repo_file_buttons.js
app/assets/javascripts/repo/repo_file_buttons.js
+0
-17
app/assets/javascripts/repo/repo_helper.js
app/assets/javascripts/repo/repo_helper.js
+1
-39
app/assets/javascripts/repo/repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+0
-3
app/assets/javascripts/repo/repo_store.js
app/assets/javascripts/repo/repo_store.js
+0
-3
spec/lib/gitlab/conflict/file_spec.rb
spec/lib/gitlab/conflict/file_spec.rb
+0
-19
spec/lib/gitlab/conflict/parser_spec.rb
spec/lib/gitlab/conflict/parser_spec.rb
+0
-19
No files found.
app/assets/javascripts/repo/repo_binary_viewer.js
View file @
9fe346af
...
...
@@ -20,30 +20,14 @@ export default class RepoBinaryViewer {
},
methods
:
{
<<<<<<<
HEAD
isMarkdown
()
{
return
this
.
activeFile
.
extension
===
'
md
'
;
=======
supportedNonBinaryFileType
()
{
switch
(
this
.
activeFile
.
extension
)
{
case
'
md
'
:
this
.
binaryTypes
.
markdown
=
true
;
return
true
;
default
:
return
false
;
}
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
},
watch
:
{
blobRaw
()
{
<<<<<<<
HEAD
if
(
this
.
isMarkdown
())
{
=======
const
supported
=
this
.
supportedNonBinaryFileType
();
if
(
supported
)
{
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
this
.
binaryTypes
.
markdown
=
true
;
this
.
activeFile
.
raw
=
false
;
// counts as binaryish so we use the binary viewer in this case.
...
...
app/assets/javascripts/repo/repo_bundle.js
View file @
9fe346af
<<<<<<<
HEAD
import
Tabs
from
'
./repo_tabs
'
import
Sidebar
from
'
./repo_sidebar
'
import
Editor
from
'
./repo_editor
'
...
...
@@ -9,16 +8,6 @@ import CommitSection from './repo_commit_section'
import
Service
from
'
./repo_service
'
import
Store
from
'
./repo_store
'
import
Helper
from
'
./repo_helper
'
=======
import
Tabs
from
'
./repo_tabs
'
;
import
Sidebar
from
'
./repo_sidebar
'
;
import
Editor
from
'
./repo_editor
'
;
import
FileButtons
from
'
./repo_file_buttons
'
;
import
BinaryViewer
from
'
./repo_binary_viewer
'
;
import
Service
from
'
./repo_service
'
;
import
Store
from
'
./repo_store
'
;
import
Helper
from
'
./repo_helper
'
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
export
default
class
RepoBundle
{
constructor
()
{
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
9fe346af
...
...
@@ -10,15 +10,8 @@ export default class RepoEditor {
}
addMonacoEvents
()
{
<<<<<<<
HEAD
this
.
monacoEditor
.
onMouseUp
(
this
.
onMonacoEditorMouseUp
.
bind
(
this
));
this
.
monacoEditor
.
onKeyUp
(
this
.
onMonacoEditorKeysPressed
.
bind
(
this
));
=======
this
.
vue
.
$watch
(
'
activeFile.lineNumber
'
,
()
=>
{
console
.
log
(
'
cahnged
'
);
});
this
.
monacoEditor
.
onMouseUp
(
RepoEditor
.
onMonacoEditorMouseUp
);
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}
static
onMonacoEditorMouseUp
(
e
)
{
...
...
@@ -70,11 +63,7 @@ export default class RepoEditor {
methods
:
{
showHide
()
{
<<<<<<<
HEAD
if
(
!
this
.
openedFiles
.
length
||
(
this
.
binary
&&
!
this
.
activeFile
.
raw
))
{
=======
if
((
!
this
.
openedFiles
.
length
)
||
this
.
binary
)
{
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self
.
el
.
style
.
display
=
'
none
'
;
}
else
{
self
.
el
.
style
.
display
=
'
inline-block
'
;
...
...
@@ -125,14 +114,10 @@ export default class RepoEditor {
blobRaw
()
{
this
.
showHide
();
<<<<<<<
HEAD
if
(
!
this
.
isTree
)
{
// kill the current model;
self
.
monacoEditor
.
setModel
(
null
);
// then create the new one
=======
if
(
!
this
.
isTree
)
{
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self
.
monacoEditor
.
setModel
(
monaco
.
editor
.
createModel
(
this
.
blobRaw
,
...
...
app/assets/javascripts/repo/repo_file_buttons.js
View file @
9fe346af
<<<<<<<
HEAD
import
Vue
from
'
vue
'
import
Store
from
'
./repo_store
'
import
Helper
from
'
./repo_helper
'
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
=======
import
Vue
from
'
vue
'
;
import
Store
from
'
./repo_store
'
;
import
Helper
from
'
./repo_helper
'
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
export
default
class
RepoSidebar
{
constructor
(
url
)
{
...
...
@@ -37,14 +31,9 @@ export default class RepoSidebar {
</div>
`
,
computed
:
{
<<<<<<<
HEAD
editableBorder
()
{
return
this
.
editMode
?
'
1px solid #1F78D1
'
:
'
1px solid #f0f0f0
'
;
=======
previewLabel
()
{
return
this
.
activeFile
.
raw
?
'
Preview
'
:
'
Raw
'
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
canPreview
()
{
...
...
@@ -65,15 +54,9 @@ export default class RepoSidebar {
},
methods
:
{
<<<<<<<
HEAD
rawPreviewToggle
()
{
Helper
.
setCurrentFileRawOrPreview
();
}
=======
setRawPreviewMode
()
{
},
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
});
}
...
...
app/assets/javascripts/repo/repo_helper.js
View file @
9fe346af
...
...
@@ -69,7 +69,6 @@ const RepoHelper = {
},
setActiveFile
(
file
)
{
<<<<<<<
HEAD
// don't load the file that is already loaded
if
(
file
.
url
===
Store
.
activeFile
.
url
)
return
;
...
...
@@ -78,17 +77,9 @@ const RepoHelper = {
if
(
openedFile
.
active
)
{
Store
.
activeFile
=
openedFile
;
Store
.
activeFileIndex
=
i
;
=======
Store
.
openedFiles
=
Store
.
openedFiles
.
map
((
openedFile
)
=>
{
const
activeFile
=
openedFile
;
activeFile
.
active
=
file
.
url
===
activeFile
.
url
;
// eslint-disable-line no-param-reassign
if
(
activeFile
.
active
)
{
Store
.
activeFile
=
activeFile
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}
return
activeFile
;
});
<<<<<<<
HEAD
// reset the active file raw
Store
.
activeFile
.
raw
=
false
;
...
...
@@ -96,9 +87,6 @@ const RepoHelper = {
Store
.
activeFileLabel
=
'
Raw
'
;
if
(
file
.
binary
)
{
=======
if
(
file
.
binary
)
{
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store
.
blobRaw
=
file
.
base64
;
}
else
{
Store
.
blobRaw
=
file
.
plain
;
...
...
@@ -115,17 +103,11 @@ const RepoHelper = {
},
addToOpenedFiles
(
file
)
{
<<<<<<<
HEAD
const
openedFilesAlreadyExists
=
Store
.
openedFiles
.
some
((
openedFile
)
=>
{
return
openedFile
.
url
===
file
.
url
});
if
(
!
openedFilesAlreadyExists
)
{
file
.
changed
=
false
;
=======
const
openedFilesAlreadyExists
=
Store
.
openedFiles
.
some
(
openedFile
=>
openedFile
.
url
===
file
.
url
);
if
(
!
openedFilesAlreadyExists
)
{
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store
.
openedFiles
.
push
(
file
);
}
},
...
...
@@ -198,14 +180,9 @@ const RepoHelper = {
},
// may be tree or file.
<<<<<<<
HEAD
getContent
(
file
)
{
// don't load the same active file. That's silly.
// if(file && file.url === this.activeFile.url) return;
=======
getContent
(
treeOrFile
)
{
let
file
=
treeOrFile
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
const
loadingData
=
this
.
setLoading
(
true
);
Service
.
getContent
()
.
then
((
response
)
=>
{
...
...
@@ -225,23 +202,8 @@ const RepoHelper = {
data
,
);
data
.
binary
=
true
;
<<<<<<<
HEAD
}
else
{
Store
.
blobRaw
=
data
.
plain
;
=======
if
(
!
file
.
url
)
{
file
.
url
=
location
.
pathname
;
}
data
.
url
=
file
.
url
;
this
.
addToOpenedFiles
(
data
);
this
.
setActiveFile
(
data
);
}
else
{
Store
.
blobRaw
=
data
.
plain
;
if
(
!
file
.
url
)
{
file
.
url
=
location
.
pathname
;
}
data
.
url
=
file
.
url
;
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
data
.
binary
=
false
;
}
if
(
!
file
.
url
)
{
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
9fe346af
...
...
@@ -47,14 +47,11 @@ export default class RepoSidebar {
if
(
typeof
file
===
'
object
'
)
{
if
(
file
.
type
===
'
tree
'
&&
file
.
opened
)
{
Helper
.
removeChildFilesOfTree
(
file
);
<<<<<<<
HEAD
return
;
}
else
{
url
=
file
.
url
;
Service
.
url
=
url
;
Helper
.
getContent
(
file
);
=======
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}
url
=
file
.
url
;
Service
.
url
=
url
;
...
...
app/assets/javascripts/repo/repo_store.js
View file @
9fe346af
...
...
@@ -22,12 +22,9 @@ const RepoStore = {
plain
:
''
,
size
:
0
,
url
:
''
,
<<<<<<<
HEAD
raw
:
false
,
newContent
:
''
,
changed
:
false
=======
>>>>>>>
51
a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
activeFileIndex
:
0
,
activeLine
:
0
,
...
...
spec/lib/gitlab/conflict/file_spec.rb
View file @
9fe346af
...
...
@@ -151,21 +151,12 @@ describe Gitlab::Conflict::File, lib: true do
default_regexp
end
<<<<<<< files/ruby/regex.rb
def project_name_regexp
/
\A
[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*
\z
/
end
def name_regexp
/
\A
[a-zA-Z0-9_
\-\.
]*
\z
/
=======
def project_name_regex
%r{
\A
[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*
\z
}
end
def name_regex
%r{
\A
[a-zA-Z0-9_
\-\.
]*
\z
}
>>>>>>> files/ruby/regex.rb
end
# Some extra lines
...
...
@@ -176,13 +167,8 @@ def path_regexp
default_regexp
end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp
/(zip|tar|7z|tar
\.
gz|tgz|gz|tar
\.
bz2|tbz|tbz2|tb2|bz2)/
=======
def archive_formats_regex
%r{(zip|tar|7z|tar
\.
gz|tgz|gz|tar
\.
bz2|tbz|tbz2|tb2|bz2)}
>>>>>>> files/ruby/regex.rb
end
def git_reference_regexp
...
...
@@ -209,13 +195,8 @@ end
protected
<<<<<<< files/ruby/regex.rb
def default_regexp
/
\A
[.?]?[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*(?<!
\.
git)
\z
/
=======
def default_regex
%r{
\A
[.?]?[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*(?<!
\.
git)
\z
}
>>>>>>> files/ruby/regex.rb
end
FILE
end
...
...
spec/lib/gitlab/conflict/parser_spec.rb
View file @
9fe346af
...
...
@@ -19,34 +19,20 @@ module Gitlab
default_regexp
end
<<<<<<< files/ruby/regex.rb
def project_name_regexp
/
\A
[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*
\z
/
end
def name_regexp
/
\A
[a-zA-Z0-9_
\-\.
]*
\z
/
=======
def project_name_regex
%r{
\A
[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*
\z
}
end
def name_regex
%r{
\A
[a-zA-Z0-9_
\-\.
]*
\z
}
>>>>>>> files/ruby/regex.rb
end
def path_regexp
default_regexp
end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp
/(zip|tar|7z|tar
\.
gz|tgz|gz|tar
\.
bz2|tbz|tbz2|tb2|bz2)/
=======
def archive_formats_regex
%r{(zip|tar|7z|tar
\.
gz|tgz|gz|tar
\.
bz2|tbz|tbz2|tb2|bz2)}
>>>>>>> files/ruby/regex.rb
end
def git_reference_regexp
...
...
@@ -73,13 +59,8 @@ module Gitlab
protected
<<<<<<< files/ruby/regex.rb
def default_regexp
/
\A
[.?]?[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*(?<!
\.
git)
\z
/
=======
def default_regex
%r{
\A
[.?]?[a-zA-Z0-9][a-zA-Z0-9_
\-\.
]*(?<!
\.
git)
\z
}
>>>>>>> files/ruby/regex.rb
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