Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 36049 invoked from network); 20 Jun 2008 09:37:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2008 09:37:16 -0000 Received: (qmail 87199 invoked by uid 500); 20 Jun 2008 09:37:17 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 87170 invoked by uid 500); 20 Jun 2008 09:37:17 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 87153 invoked by uid 99); 20 Jun 2008 09:37:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 02:37:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 09:36:28 +0000 Received: by wr-out-0506.google.com with SMTP id 68so955767wri.15 for ; Fri, 20 Jun 2008 02:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=aoqzzOe236BTlI6eDvVloGoFTsyP14vKbNjNsmVZAFY=; b=wh5Usj7XshtwkmazTrAgGzN5UinqK0Pn+lMkE/xudDPNRc+jkNDhJJM9CwKyK6piwq G5sg29qOEzah4Q/eZ3bDPixgsh/0X6BVPJL99N/H///piXBlLz4skCzBhDPx2yseXvRP GsUsHMJxL7mv/ePz/NRuQfjq2pfXCq7I27XOk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AU6effjxUaPOIALkFgIyeprjfv4ocjOKZ6hdKCjsGOcV0b63c8wRxDQ2EjXY2I1jCZ vR6LLFlqAgyN7splberh+sBhan9ZncIywvlSg1PTGv7PvVm66j8tOGZmRV7A6fNUGocZ +MbfOJ7bj1jt2nmKgLjvNSBWtHw5tUnKpChBs= Received: by 10.90.99.12 with SMTP id w12mr4294091agb.12.1213954606098; Fri, 20 Jun 2008 02:36:46 -0700 (PDT) Received: by 10.90.115.13 with HTTP; Fri, 20 Jun 2008 02:36:46 -0700 (PDT) Message-ID: <510143ac0806200236j4af6a8e1l69d25ccfc415520@mail.gmail.com> Date: Fri, 20 Jun 2008 12:36:46 +0300 From: "Jukka Zitting" To: users@jackrabbit.apache.org Subject: Re: Jackrabbit version numbers/names In-Reply-To: <9912fc510806190705n45830a11x8ef6b9cd88489c9d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9912fc510806181738x17a1440cj1848bbc06d022d09@mail.gmail.com> <510143ac0806190211k1e36b277l5d8131a0bccdc9ad@mail.gmail.com> <510143ac0806190435j2c30542bsa524a0e95b846ce@mail.gmail.com> <9912fc510806190705n45830a11x8ef6b9cd88489c9d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Thu, Jun 19, 2008 at 5:05 PM, Pulla Venkat 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: http://svn.eu.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/VersioningTest.java > 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 that. 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. BR, Jukka Zitting