Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
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
Hide 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) {
priv
.
post_allowed
=
true
;
}
doc_env
=
my
.
env
[
doc
.
_id
];
if
(
doc_env
&&
doc_env
.
id
)
{
}
else
{
if
(
!
doc_env
||
!
doc_env
.
id
)
{
doc_env
=
priv
.
initEnv
(
doc
.
_id
);
}
my_rev
=
priv
.
generateNextRevision
(
doc
.
_rev
||
0
,
doc
.
_id
);
...
...
@@ -380,7 +379,9 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
tmp_object
=
{};
start
=
response
.
_revisions
.
start
;
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
)
{
response
.
_revisions
.
ids
[
i
]
=
tmp
.
split
(
"
-
"
).
slice
(
1
).
join
(
"
-
"
);
}
...
...
test/jiotests.js
View file @
081a3431
...
...
@@ -2161,7 +2161,6 @@ module ("JIO Replicate Revision Storage");
o
.
tick
(
o
);
// get the post document with specific revision
console
.
log
(
o
.
specific_rev
);
o
.
spy
(
o
,
"
value
"
,
{
"
_id
"
:
"
doc1
"
,
"
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