Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
ffd9504f
Commit
ffd9504f
authored
Mar 25, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revision storage jslint OK
parent
3bab0692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/jio.storage/revisionstorage.js
src/jio.storage/revisionstorage.js
+6
-5
No files found.
src/jio.storage/revisionstorage.js
View file @
ffd9504f
...
@@ -923,7 +923,7 @@ jIO.addStorageType("revision", function (spec, my) {
...
@@ -923,7 +923,7 @@ jIO.addStorageType("revision", function (spec, my) {
}
}
revs_info
=
priv
.
getWinnerRevsInfo
(
doc_tree
);
revs_info
=
priv
.
getWinnerRevsInfo
(
doc_tree
);
document_revision
=
document_revision
=
rows
.
document_revisions
[
doc_id
+
"
.
"
+
revs_info
[
0
].
rev
]
rows
.
document_revisions
[
doc_id
+
"
.
"
+
revs_info
[
0
].
rev
]
;
if
(
document_revision
)
{
if
(
document_revision
)
{
row
=
{
row
=
{
"
id
"
:
doc_id
,
"
id
"
:
doc_id
,
...
@@ -954,7 +954,7 @@ jIO.addStorageType("revision", function (spec, my) {
...
@@ -954,7 +954,7 @@ jIO.addStorageType("revision", function (spec, my) {
if
(
err
)
{
if
(
err
)
{
return
that
.
error
(
err
);
return
that
.
error
(
err
);
}
}
selector
=
/
^
(
.*
)
\.
revision_tree
\.
json$/
;
selector
=
/
\.
revision_tree
\.
json$/
;
rows
=
{
rows
=
{
"
revision_trees
"
:
{
"
revision_trees
"
:
{
// id.revision_tree.json: {
// id.revision_tree.json: {
...
@@ -973,11 +973,12 @@ jIO.addStorageType("revision", function (spec, my) {
...
@@ -973,11 +973,12 @@ jIO.addStorageType("revision", function (spec, my) {
while
(
response
.
rows
.
length
>
0
)
{
while
(
response
.
rows
.
length
>
0
)
{
// filling rows
// filling rows
row
=
response
.
rows
.
shift
();
row
=
response
.
rows
.
shift
();
selected
=
selector
.
exec
(
row
.
id
)
selected
=
selector
.
exec
(
row
.
id
)
;
if
(
selected
)
{
if
(
selected
)
{
selected
=
selected
.
input
.
substring
(
0
,
selected
.
index
);
// this is a revision tree
// this is a revision tree
rows
.
revision_trees
[
row
.
id
]
=
{
rows
.
revision_trees
[
row
.
id
]
=
{
"
id
"
:
selected
[
1
]
"
id
"
:
selected
};
};
if
(
row
.
doc
)
{
if
(
row
.
doc
)
{
rows
.
revision_trees
[
row
.
id
].
doc
=
row
.
doc
;
rows
.
revision_trees
[
row
.
id
].
doc
=
row
.
doc
;
...
@@ -985,7 +986,7 @@ jIO.addStorageType("revision", function (spec, my) {
...
@@ -985,7 +986,7 @@ jIO.addStorageType("revision", function (spec, my) {
}
else
{
}
else
{
// this is a simple revision
// this is a simple revision
rows
.
document_revisions
[
row
.
id
]
=
{
rows
.
document_revisions
[
row
.
id
]
=
{
"
id
"
:
row
.
id
.
split
(
"
.
"
).
slice
(
0
,
-
1
),
"
id
"
:
row
.
id
.
split
(
"
.
"
).
slice
(
0
,
-
1
),
"
rev
"
:
row
.
id
.
split
(
"
.
"
).
slice
(
-
1
)
"
rev
"
:
row
.
id
.
split
(
"
.
"
).
slice
(
-
1
)
};
};
if
(
row
.
doc
)
{
if
(
row
.
doc
)
{
...
...
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