You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2012/08/21 11:45:37 UTC
[jira] [Created] (OAK-264) MicroKernel.diff for depth limited,
unspecified changes
Thomas Mueller created OAK-264:
----------------------------------
Summary: MicroKernel.diff for depth limited, unspecified changes
Key: OAK-264
URL: https://issues.apache.org/jira/browse/OAK-264
Project: Jackrabbit Oak
Issue Type: Bug
Components: mk
Reporter: Thomas Mueller
Currently the MicroKernel API specifies for the method "diff", if the depth parameter is used, that unspecified changes below a certain path can be returned as:
^ "/some/path"
I would prefer the slightly more verbose:
^ "/some/path": {}
Reason: It is similar to how getNode() returns node names if the depth limited: "some":{"path":{}}, and it makes parsing unambiguous: there is always a ':' after the path, whether a property was changed or a node was changed. Without the colon, the parser needs to look ahead to decide whether a node was changed or a property was changed (the token after the path could be the start of the next operation). And we could never ever support ':' as an operation because that would make parsing ambiguous.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OAK-264) MicroKernel.diff for depth limited,
unspecified changes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OAK-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg resolved OAK-264.
-----------------------------------
Resolution: Fixed
Fix Version/s: 0.5
good point!
fixed in svn r1375476
> MicroKernel.diff for depth limited, unspecified changes
> -------------------------------------------------------
>
> Key: OAK-264
> URL: https://issues.apache.org/jira/browse/OAK-264
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mk
> Reporter: Thomas Mueller
> Assignee: Stefan Guggisberg
> Priority: Minor
> Fix For: 0.5
>
>
> Currently the MicroKernel API specifies for the method "diff", if the depth parameter is used, that unspecified changes below a certain path can be returned as:
> ^ "/some/path"
> I would prefer the slightly more verbose:
> ^ "/some/path": {}
> Reason: It is similar to how getNode() returns node names if the depth limited: "some":{"path":{}}, and it makes parsing unambiguous: there is always a ':' after the path, whether a property was changed or a node was changed. Without the colon, the parser needs to look ahead to decide whether a node was changed or a property was changed (the token after the path could be the start of the next operation). And we could never ever support ':' as an operation because that would make parsing ambiguous.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OAK-264) MicroKernel.diff for depth limited,
unspecified changes
Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OAK-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guggisberg reassigned OAK-264:
-------------------------------------
Assignee: Stefan Guggisberg
> MicroKernel.diff for depth limited, unspecified changes
> -------------------------------------------------------
>
> Key: OAK-264
> URL: https://issues.apache.org/jira/browse/OAK-264
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mk
> Reporter: Thomas Mueller
> Assignee: Stefan Guggisberg
> Priority: Minor
>
> Currently the MicroKernel API specifies for the method "diff", if the depth parameter is used, that unspecified changes below a certain path can be returned as:
> ^ "/some/path"
> I would prefer the slightly more verbose:
> ^ "/some/path": {}
> Reason: It is similar to how getNode() returns node names if the depth limited: "some":{"path":{}}, and it makes parsing unambiguous: there is always a ':' after the path, whether a property was changed or a node was changed. Without the colon, the parser needs to look ahead to decide whether a node was changed or a property was changed (the token after the path could be the start of the next operation). And we could never ever support ':' as an operation because that would make parsing ambiguous.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OAK-264) MicroKernel.diff for depth limited,
unspecified changes
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OAK-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438565#comment-13438565 ]
Thomas Mueller commented on OAK-264:
------------------------------------
Here the proposed patch. The project oak-it/mk doesn't need to be changed (there is a test, but it doesn't check for the end of the diff).
{code}
Index: src/main/java/org/apache/jackrabbit/mk/model/tree/DiffBuilder.java
===================================================================
--- src/main/java/org/apache/jackrabbit/mk/model/tree/DiffBuilder.java (revision 1375443)
+++ src/main/java/org/apache/jackrabbit/mk/model/tree/DiffBuilder.java (working copy)
@@ -144,7 +144,8 @@
super.childNodeChanged(name, before, after);
} else {
buff.tag('^');
- buff.value(p);
+ buff.key(p);
+ buff.object().endObject();
buff.newline();
}
++levels;
Index: src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
===================================================================
--- src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java (revision 1375021)
+++ src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java (working copy)
@@ -193,7 +193,7 @@
* The {@code depth} limit applies to the subtree rooted at {@code path}.
* It allows to limit the depth of the diff, i.e. only changes up to the
* specified depth will be included in full detail. changes at paths exceeding
- * the specified depth limit will be reported as {@code ^"/some/path"},
+ * the specified depth limit will be reported as {@code ^ "/some/path": {}},
* indicating that there are unspecified changes below that path.
* <table border="1">
* <tr>
{code}
> MicroKernel.diff for depth limited, unspecified changes
> -------------------------------------------------------
>
> Key: OAK-264
> URL: https://issues.apache.org/jira/browse/OAK-264
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mk
> Reporter: Thomas Mueller
> Priority: Minor
>
> Currently the MicroKernel API specifies for the method "diff", if the depth parameter is used, that unspecified changes below a certain path can be returned as:
> ^ "/some/path"
> I would prefer the slightly more verbose:
> ^ "/some/path": {}
> Reason: It is similar to how getNode() returns node names if the depth limited: "some":{"path":{}}, and it makes parsing unambiguous: there is always a ':' after the path, whether a property was changed or a node was changed. Without the colon, the parser needs to look ahead to decide whether a node was changed or a property was changed (the token after the path could be the start of the next operation). And we could never ever support ':' as an operation because that would make parsing ambiguous.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OAK-264) MicroKernel.diff for depth limited,
unspecified changes
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OAK-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller updated OAK-264:
-------------------------------
Priority: Minor (was: Major)
Issue Type: Improvement (was: Bug)
> MicroKernel.diff for depth limited, unspecified changes
> -------------------------------------------------------
>
> Key: OAK-264
> URL: https://issues.apache.org/jira/browse/OAK-264
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mk
> Reporter: Thomas Mueller
> Priority: Minor
>
> Currently the MicroKernel API specifies for the method "diff", if the depth parameter is used, that unspecified changes below a certain path can be returned as:
> ^ "/some/path"
> I would prefer the slightly more verbose:
> ^ "/some/path": {}
> Reason: It is similar to how getNode() returns node names if the depth limited: "some":{"path":{}}, and it makes parsing unambiguous: there is always a ':' after the path, whether a property was changed or a node was changed. Without the colon, the parser needs to look ahead to decide whether a node was changed or a property was changed (the token after the path could be the start of the next operation). And we could never ever support ':' as an operation because that would make parsing ambiguous.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira