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
19a3b8a6
Commit
19a3b8a6
authored
Nov 01, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve repo editor JS conflicts
parent
8e38899d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
251 deletions
+0
-251
app/assets/javascripts/repo/components/new_dropdown/index.vue
...assets/javascripts/repo/components/new_dropdown/index.vue
+0
-19
app/assets/javascripts/repo/components/new_dropdown/modal.vue
...assets/javascripts/repo/components/new_dropdown/modal.vue
+0
-21
app/assets/javascripts/repo/components/repo_commit_section.vue
...ssets/javascripts/repo/components/repo_commit_section.vue
+0
-16
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+0
-8
spec/javascripts/repo/components/new_dropdown/index_spec.js
spec/javascripts/repo/components/new_dropdown/index_spec.js
+0
-161
spec/javascripts/repo/components/new_dropdown/modal_spec.js
spec/javascripts/repo/components/new_dropdown/modal_spec.js
+0
-26
No files found.
app/assets/javascripts/repo/components/new_dropdown/index.vue
View file @
19a3b8a6
...
...
@@ -27,25 +27,6 @@
toggleModalOpen
()
{
this
.
openModal
=
!
this
.
openModal
;
},
<<<<<<<
HEAD
<<<<<<<
HEAD
createNewEntryInStore
(
options
,
openEditMode
=
true
)
{
RepoHelper
.
createNewEntry
(
options
,
openEditMode
);
if
(
options
.
toggleModal
)
{
this
.
toggleModalOpen
();
}
},
},
created
()
{
eventHub
.
$on
(
'
createNewEntry
'
,
this
.
createNewEntryInStore
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
createNewEntry
'
,
this
.
createNewEntryInStore
);
=======
>>>>>>>
e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
},
};
</
script
>
...
...
app/assets/javascripts/repo/components/new_dropdown/modal.vue
View file @
19a3b8a6
...
...
@@ -5,11 +5,7 @@
export
default
{
props
:
{
<<<<<<<
HEAD
path
:
{
=======
type
:
{
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
type
:
String
,
required
:
true
,
},
...
...
@@ -31,29 +27,12 @@
'
createTempEntry
'
,
]),
createEntryInStore
()
{
<<<<<<<
HEAD
<<<<<<<
HEAD
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
this
.
entryName
,
=======
this
.
createTempEntry
({
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
type
:
this
.
type
,
});
<<<<<<<
HEAD
=======
this
.
createTempEntry
({
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
type
:
this
.
type
,
});
this
.
toggleModalOpen
();
>>>>>>>
e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
this
.
toggleModalOpen
();
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
},
toggleModalOpen
()
{
this
.
$emit
(
'
toggle
'
);
...
...
app/assets/javascripts/repo/components/repo_commit_section.vue
View file @
19a3b8a6
...
...
@@ -38,22 +38,6 @@ export default {
makeCommit
(
newBranch
=
false
)
{
const
createNewBranch
=
newBranch
||
this
.
startNewMR
;
<<<<<<<
HEAD
<<<<<<<
HEAD
makeCommit
(
newBranch
)
{
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
const
commitMessage
=
this
.
commitMessage
;
const
actions
=
this
.
changedFiles
.
map
(
f
=>
({
action
:
f
.
tempFile
?
'
create
'
:
'
update
'
,
file_path
:
f
.
path
,
content
:
f
.
newContent
,
encoding
:
f
.
base64
?
'
base64
'
:
'
text
'
,
}));
const
branch
=
newBranch
?
`
${
this
.
currentBranch
}
-
${
this
.
currentShortHash
}
`
:
this
.
currentBranch
;
=======
>>>>>>>
e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
const
payload
=
{
branch
:
createNewBranch
?
`
${
this
.
currentBranch
}
-
${
new
Date
().
getTime
().
toString
()}
`
:
this
.
currentBranch
,
commit_message
:
this
.
commitMessage
,
...
...
app/assets/javascripts/repo/components/repo_preview.vue
View file @
19a3b8a6
...
...
@@ -45,15 +45,7 @@ export default {
</p>
</div>
<div
<<<<<<<
HEAD
<<<<<<<
HEAD
v-else-if=
"activeFile.tooLarge"
=======
v-else-if=
"renderErrorTooLarge"
>
>>>>>> e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
v-else-if="renderErrorTooLarge"
>>>>>>> 6306e797acca358c79c120e5b12c29a5ec604571
class=
"vertical-center render-error"
>
<p
class=
"text-center"
>
The source could not be displayed because it is too large. You can
<a
:href=
"activeFile.rawPath"
download
>
download
</a>
it instead.
...
...
spec/javascripts/repo/components/new_dropdown/index_spec.js
View file @
19a3b8a6
...
...
@@ -68,165 +68,4 @@ describe('new dropdown component', () => {
.
catch
(
done
.
fail
);
});
});
<<<<<<<
HEAD
<<<<<<<
HEAD
describe
(
'
createEntryInStore
'
,
()
=>
{
[
'
tree
'
,
'
blob
'
].
forEach
((
type
)
=>
{
describe
(
type
,
()
=>
{
it
(
'
closes modal after creating file
'
,
()
=>
{
vm
.
openModal
=
true
;
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
,
toggleModal
:
true
,
});
expect
(
vm
.
openModal
).
toBeFalsy
();
});
it
(
'
sets editMode to true
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
,
});
expect
(
RepoStore
.
editMode
).
toBeTruthy
();
});
it
(
'
toggles blob view
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
,
});
expect
(
RepoStore
.
isPreviewView
()).
toBeFalsy
();
});
it
(
'
adds file into activeFiles
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
,
});
expect
(
RepoStore
.
openedFiles
.
length
).
toBe
(
1
);
});
it
(
`creates
${
type
}
in the current stores path`
,
()
=>
{
RepoStore
.
path
=
'
testing
'
;
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing/app
'
,
type
,
});
expect
(
RepoStore
.
files
[
0
].
path
).
toBe
(
'
testing/app
'
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
app
'
);
if
(
type
===
'
tree
'
)
{
expect
(
RepoStore
.
files
[
0
].
files
.
length
).
toBe
(
1
);
}
RepoStore
.
path
=
''
;
});
});
});
describe
(
'
file
'
,
()
=>
{
it
(
'
creates new file
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
:
'
blob
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
testing
'
);
expect
(
RepoStore
.
files
[
0
].
type
).
toBe
(
'
blob
'
);
expect
(
RepoStore
.
files
[
0
].
tempFile
).
toBeTruthy
();
});
it
(
'
does not create temp file when file already exists
'
,
()
=>
{
RepoStore
.
files
.
push
(
RepoHelper
.
serializeRepoEntity
(
'
blob
'
,
{
name
:
'
testing
'
,
}));
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
:
'
blob
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
testing
'
);
expect
(
RepoStore
.
files
[
0
].
type
).
toBe
(
'
blob
'
);
expect
(
RepoStore
.
files
[
0
].
tempFile
).
toBeUndefined
();
});
});
describe
(
'
tree
'
,
()
=>
{
it
(
'
creates new tree
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
:
'
tree
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
testing
'
);
expect
(
RepoStore
.
files
[
0
].
type
).
toBe
(
'
tree
'
);
expect
(
RepoStore
.
files
[
0
].
tempFile
).
toBeTruthy
();
expect
(
RepoStore
.
files
[
0
].
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
name
).
toBe
(
'
.gitkeep
'
);
});
it
(
'
creates multiple trees when entryName has slashes
'
,
()
=>
{
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
app/test
'
,
type
:
'
tree
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
app
'
);
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
name
).
toBe
(
'
test
'
);
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
files
[
0
].
name
).
toBe
(
'
.gitkeep
'
);
});
it
(
'
creates tree in existing tree
'
,
()
=>
{
RepoStore
.
files
.
push
(
RepoHelper
.
serializeRepoEntity
(
'
tree
'
,
{
name
:
'
app
'
,
}));
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
app/test
'
,
type
:
'
tree
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
app
'
);
expect
(
RepoStore
.
files
[
0
].
tempFile
).
toBeUndefined
();
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
tempFile
).
toBeTruthy
();
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
name
).
toBe
(
'
test
'
);
expect
(
RepoStore
.
files
[
0
].
files
[
0
].
files
[
0
].
name
).
toBe
(
'
.gitkeep
'
);
});
it
(
'
does not create new tree when already exists
'
,
()
=>
{
RepoStore
.
files
.
push
(
RepoHelper
.
serializeRepoEntity
(
'
tree
'
,
{
name
:
'
app
'
,
}));
eventHub
.
$emit
(
'
createNewEntry
'
,
{
name
:
'
app
'
,
type
:
'
tree
'
,
});
expect
(
RepoStore
.
files
.
length
).
toBe
(
1
);
expect
(
RepoStore
.
files
[
0
].
name
).
toBe
(
'
app
'
);
expect
(
RepoStore
.
files
[
0
].
tempFile
).
toBeUndefined
();
expect
(
RepoStore
.
files
[
0
].
files
.
length
).
toBe
(
0
);
});
});
});
=======
>>>>>>>
e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
});
spec/javascripts/repo/components/new_dropdown/modal_spec.js
View file @
19a3b8a6
...
...
@@ -195,30 +195,4 @@ describe('new file modal component', () => {
vm
.
$el
.
remove
();
});
<<<<<<<
HEAD
<<<<<<<
HEAD
describe
(
'
createEntryInStore
'
,
()
=>
{
it
(
'
emits createNewEntry event
'
,
()
=>
{
spyOn
(
eventHub
,
'
$emit
'
);
vm
=
createComponent
(
Component
,
{
type
:
'
tree
'
,
currentPath
:
RepoStore
.
path
,
});
vm
.
entryName
=
'
testing
'
;
vm
.
createEntryInStore
();
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
createNewEntry
'
,
{
name
:
'
testing
'
,
type
:
'
tree
'
,
toggleModal
:
true
,
});
});
});
=======
>>>>>>>
e24d1890aea9c550e02d9145f50e8e1ae153a3a3
=======
>>>>>>>
6306
e797acca358c79c120e5b12c29a5ec604571
});
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