Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
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
Mukul
jio
Commits
081a3431
Commit
081a3431
authored
Jan 29, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning some code
parent
450a8e3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/jio.storage/replicaterevisionstorage.js
src/jio.storage/replicaterevisionstorage.js
+4
-3
test/jiotests.js
test/jiotests.js
+0
-1
No files found.
src/jio.storage/replicaterevisionstorage.js
View file @
081a3431
...
@@ -215,8 +215,7 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
...
@@ -215,8 +215,7 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
priv
.
post_allowed
=
true
;
priv
.
post_allowed
=
true
;
}
}
doc_env
=
my
.
env
[
doc
.
_id
];
doc_env
=
my
.
env
[
doc
.
_id
];
if
(
doc_env
&&
doc_env
.
id
)
{
if
(
!
doc_env
||
!
doc_env
.
id
)
{
}
else
{
doc_env
=
priv
.
initEnv
(
doc
.
_id
);
doc_env
=
priv
.
initEnv
(
doc
.
_id
);
}
}
my_rev
=
priv
.
generateNextRevision
(
doc
.
_rev
||
0
,
doc
.
_id
);
my_rev
=
priv
.
generateNextRevision
(
doc
.
_rev
||
0
,
doc
.
_id
);
...
@@ -380,7 +379,9 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
...
@@ -380,7 +379,9 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
tmp_object
=
{};
tmp_object
=
{};
start
=
response
.
_revisions
.
start
;
start
=
response
.
_revisions
.
start
;
for
(
i
=
0
;
i
<
response
.
_revisions
.
ids
.
length
;
i
+=
1
,
start
-=
1
)
{
for
(
i
=
0
;
i
<
response
.
_revisions
.
ids
.
length
;
i
+=
1
,
start
-=
1
)
{
tmp
=
doc_env
.
distant_revisions
[
start
+
"
-
"
+
response
.
_revisions
.
ids
[
i
]];
tmp
=
doc_env
.
distant_revisions
[
start
+
"
-
"
+
response
.
_revisions
.
ids
[
i
]
];
if
(
tmp
)
{
if
(
tmp
)
{
response
.
_revisions
.
ids
[
i
]
=
tmp
.
split
(
"
-
"
).
slice
(
1
).
join
(
"
-
"
);
response
.
_revisions
.
ids
[
i
]
=
tmp
.
split
(
"
-
"
).
slice
(
1
).
join
(
"
-
"
);
}
}
...
...
test/jiotests.js
View file @
081a3431
...
@@ -2161,7 +2161,6 @@ module ("JIO Replicate Revision Storage");
...
@@ -2161,7 +2161,6 @@ module ("JIO Replicate Revision Storage");
o
.
tick
(
o
);
o
.
tick
(
o
);
// get the post document with specific revision
// get the post document with specific revision
console
.
log
(
o
.
specific_rev
);
o
.
spy
(
o
,
"
value
"
,
{
o
.
spy
(
o
,
"
value
"
,
{
"
_id
"
:
"
doc1
"
,
"
_id
"
:
"
doc1
"
,
"
title
"
:
"
post new doc with id
"
,
"
title
"
:
"
post new doc with id
"
,
...
...
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