jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Jackrabbit version numbers/names
Date Fri, 20 Jun 2008 09:36:46 GMT

On Thu, Jun 19, 2008 at 5:05 PM, Pulla Venkat <pcsri1956@gmail.com> wrote:
> I can't reproduce example graph.. Can any body add snippet of code to
> reproduce the example below. Thanks

I added a test case that illustrates this:


> I am confused about how to go from versionname 1.0 to 2.0.

That's a bit tricky, as you need a checked out node with
jcr:rootVersion as the base version but you can't restore() a node to
the root version. One way (as you can see in the test case) to come up
with version 2.0 is to clone the versionable node to a separate
workspace before checking in the first version. I guess it could also
be possible to achieve the same using XML import, but I haven't tried

Note that the above is not something that you'd typically do, but the
versioning code in Jackrabbit needs to be able to cover that case, and
the x.0 versions are used to cover that.

Note also that the exact version numbering mechanism is an
implementation-specific detail and the algorithm may even be modified
in future Jackrabbit versions, so you shouldn't rely on it too much in
client code. A client should treat the version names as opaque
strings. If you want more user-friendly version names, consider using
version labels or a specific property in the versionable node.


Jukka Zitting

View raw message