Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 12851 invoked from network); 19 Jun 2008 14:05:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2008 14:05:45 -0000 Received: (qmail 51904 invoked by uid 500); 19 Jun 2008 14:05:46 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 51833 invoked by uid 500); 19 Jun 2008 14:05:45 -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 51821 invoked by uid 99); 19 Jun 2008 14:05:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 07:05:45 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pcsri1956@gmail.com designates 72.14.220.154 as permitted sender) Received: from [72.14.220.154] (HELO fg-out-1718.google.com) (72.14.220.154) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 14:04:56 +0000 Received: by fg-out-1718.google.com with SMTP id l27so737274fgb.43 for ; Thu, 19 Jun 2008 07:05:13 -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:references; bh=piLcqmo/2Y7hwqa2OaJd1mQsJ33nBNvX4v4extjq6WQ=; b=OoFf0ocjXp86IKMPwtMXfmWkoZfRBDh+3ygGk8wuKhZQaiOtr11lqakV1v2O2NK8iN XeRfN/4OX3AJCRp2SFp2xBONAogpUOwh47VUiqq/XMY4udNXT6PnFqyESxPz1seNLip0 aUobibcIKx03CXHSivpvmNjExKEGLS3n0/3xo= 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:references; b=Sf3UFpgrgSqAw55hpbPqydU39BuO/rO6wF7X/fRj1QFwwEkDNdZ5NY0zKDxOvy3zqu lad8k30BbxL/Nu32Dms5VhSuOSEhYJ2weNw+3mmlI2DJlwZgmh/WUZa27aIbQT9odgX0 vrhQMiiAFtus+TIDtdOtTL5KOCZs11TTMhxLQ= Received: by 10.86.25.17 with SMTP id 17mr2215879fgy.50.1213884313850; Thu, 19 Jun 2008 07:05:13 -0700 (PDT) Received: by 10.86.94.18 with HTTP; Thu, 19 Jun 2008 07:05:13 -0700 (PDT) Message-ID: <9912fc510806190705n45830a11x8ef6b9cd88489c9d@mail.gmail.com> Date: Thu, 19 Jun 2008 10:05:13 -0400 From: "Pulla Venkat" To: users@jackrabbit.apache.org Subject: Re: Jackrabbit version numbers/names In-Reply-To: <510143ac0806190435j2c30542bsa524a0e95b846ce@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11259_32900877.1213884313839" References: <9912fc510806181738x17a1440cj1848bbc06d022d09@mail.gmail.com> <510143ac0806190211k1e36b277l5d8131a0bccdc9ad@mail.gmail.com> <510143ac0806190435j2c30542bsa524a0e95b846ce@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11259_32900877.1213884313839 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Jukka, I got this documentation from jackrabbit source code but couldn't figure what it means. I am confused about how to go from versionname 1.0 to 2.0. My code does something below and always goes from 1.1 to 1.2 to 1.3 ... Node.checkout(); Node.setProperty("a","a") Node.save(); Session.save(); Node.checkin(); VersionHistory vh = Node.getVersionHistory(); VersionInterator vit = vh.getAllVersions(); while(vit.hasNext()) System.out.println(vit.next().getName(); I would like to know when it goes from 1.0 to 2.0 and 1.2 to 1.2.1 to 1.2.1.1 I can't reproduce example graph.. Can any body add snippet of code to reproduce the example below. Thanks Example Graph: jcr:rootVersion | | 1.0 2.0 | 1.1 | 1.2 ---\ ------\ | \ \ 1.3 1.2.0 1.2.0.0 | | 1.4 1.2.1 ----\ | | \ 1.5 1.2.2 1.2.1.0 | | | 1.6 | 1.2.1.1 |-----/ 1.7 Thanks, Pulla On Thu, Jun 19, 2008 at 7:35 AM, Jukka Zitting wrote: > Hi, > > On Thu, Jun 19, 2008 at 12:55 PM, Alexander Klimetschek > wrote: > > I think Pulla refers to the version numbering in the JCR API, not the > > Jackrabbit release versioning scheme. > > Ah, you're right! I've been thinking about release versioning too much > lately... > > > Which I find to be weird, too, since the leading "1." never changes > > and is redundant information. It's not a difficult thing for an > application > > to remove that prefix for displaying simpler version numbers or to > > simply count the versions themselves, but I wonder if there was > > any reason for this decision. A future feature maybe? Something > > like branching? > > Here's the relevant documentation from > AbstractVersionManager.calculateCheckinVersionName: > > The name is determined as follows: > > * first the predecessor version with the shortes name is searched. > * if that predecessor version is the root version, the new version > gets the name "{number of successors}+1" + ".0" > * if that predecessor version has no successor, the last digit of it's > version number is incremented. > * if that predecessor version has successors but the incremented name > does not exist, that name is used. > * otherwise a ".0" is added to the name until a non conflicting name is > found. > > Example Graph: > > jcr:rootVersion > | | > 1.0 2.0 > | > 1.1 > | > 1.2 ---\ ------\ > | \ \ > 1.3 1.2.0 1.2.0.0 > | | > 1.4 1.2.1 ----\ > | | \ > 1.5 1.2.2 1.2.1.0 > | | | > 1.6 | 1.2.1.1 > |-----/ > 1.7 > > BR, > > Jukka Zitting > ------=_Part_11259_32900877.1213884313839--