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
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
Show 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) {
}
revs_info
=
priv
.
getWinnerRevsInfo
(
doc_tree
);
document_revision
=
rows
.
document_revisions
[
doc_id
+
"
.
"
+
revs_info
[
0
].
rev
]
rows
.
document_revisions
[
doc_id
+
"
.
"
+
revs_info
[
0
].
rev
]
;
if
(
document_revision
)
{
row
=
{
"
id
"
:
doc_id
,
...
...
@@ -954,7 +954,7 @@ jIO.addStorageType("revision", function (spec, my) {
if
(
err
)
{
return
that
.
error
(
err
);
}
selector
=
/
^
(
.*
)
\.
revision_tree
\.
json$/
;
selector
=
/
\.
revision_tree
\.
json$/
;
rows
=
{
"
revision_trees
"
:
{
// id.revision_tree.json: {
...
...
@@ -973,11 +973,12 @@ jIO.addStorageType("revision", function (spec, my) {
while
(
response
.
rows
.
length
>
0
)
{
// filling rows
row
=
response
.
rows
.
shift
();
selected
=
selector
.
exec
(
row
.
id
)
selected
=
selector
.
exec
(
row
.
id
)
;
if
(
selected
)
{
selected
=
selected
.
input
.
substring
(
0
,
selected
.
index
);
// this is a revision tree
rows
.
revision_trees
[
row
.
id
]
=
{
"
id
"
:
selected
[
1
]
"
id
"
:
selected
};
if
(
row
.
doc
)
{
rows
.
revision_trees
[
row
.
id
].
doc
=
row
.
doc
;
...
...
@@ -985,7 +986,7 @@ jIO.addStorageType("revision", function (spec, my) {
}
else
{
// this is a simple revision
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
)
};
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