Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
jio
Commits
2711b231
Commit
2711b231
authored
Jan 08, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revision-Local-Storage: add test to check for solved conflicts
parent
b69dfc1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
src/jio.storage/revisionstorage.js
src/jio.storage/revisionstorage.js
+4
-2
test/jiotests.js
test/jiotests.js
+13
-0
No files found.
src/jio.storage/revisionstorage.js
View file @
2711b231
...
...
@@ -181,7 +181,8 @@ jIO.addStorageType('revision', function (spec, my) {
"
status
"
:
document_tree
.
status
});
}
if
(
document_tree
.
children
.
length
===
0
)
{
if
(
document_tree
.
children
.
length
===
0
&&
document_tree
.
status
!==
"
deleted
"
)
{
// This node is a leaf
if
(
result
.
length
<
deep
)
{
// The leaf is deeper than result
...
...
@@ -298,7 +299,8 @@ jIO.addStorageType('revision', function (spec, my) {
if
(
except
!==
undefined
&&
except
===
document_tree
.
rev
)
{
return
;
}
if
(
document_tree
.
children
.
length
===
0
)
{
if
(
document_tree
.
children
.
length
===
0
&&
document_tree
.
status
!==
"
deleted
"
)
{
// This node is a leaf
result
.
push
(
document_tree
.
rev
);
return
;
...
...
test/jiotests.js
View file @
2711b231
...
...
@@ -1678,6 +1678,19 @@ test ("Scenario", function(){
o
.
jio
.
remove
({
"
_id
"
:
"
sample1
"
,
"
_rev
"
:
o
.
rev_1
},
o
.
f
);
o
.
tick
(
o
);
// check to see if conflict still exists
o
.
mydocSample4
=
{
"
_id
"
:
"
sample1
"
,
"
title
"
:
"
mySample2_modified
"
,
"
_rev
"
:
o
.
rev_2
};
o
.
mydocSample4
.
_revs_info
=
[{
"
rev
"
:
o
.
rev_2
,
"
status
"
:
"
available
"
},{
"
rev
"
:
o
.
rev
,
"
status
"
:
"
available
"
}];
o
.
mydocSample4
.
_revisions
=
{
"
ids
"
:[
o
.
hex_2
,
o
.
hex
],
"
start
"
:
2
};
o
.
spy
(
o
,
"
value
"
,
o
.
mydocSample4
,
"
Test if conflict still exists
"
);
o
.
jio
.
get
(
"
sample1
"
,
{
"
revs_info
"
:
true
,
"
revs
"
:
true
,
"
conflicts
"
:
true
,},
o
.
f
);
o
.
tick
(
o
);
// END
o
.
jio
.
stop
();
...
...
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