Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80FC0FE5E for ; Thu, 9 May 2013 17:02:00 +0000 (UTC) Received: (qmail 11072 invoked by uid 500); 9 May 2013 17:02:00 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 10971 invoked by uid 500); 9 May 2013 17:01:59 -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 10963 invoked by uid 99); 9 May 2013 17:01:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 17:01:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lars@fazy.net designates 74.125.82.179 as permitted sender) Received: from [74.125.82.179] (HELO mail-we0-f179.google.com) (74.125.82.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2013 17:01:52 +0000 Received: by mail-we0-f179.google.com with SMTP id t59so3112832wes.38 for ; Thu, 09 May 2013 10:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fazy.net; s=google; h=x-received:mime-version:sender:x-originating-ip:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type; bh=0sxDBkGLYPG/rCF5RhMckL+AcRRhfVp+Xe/+rJXBHuQ=; b=bOwCpEz9bCfw2zhX3U+6od2u12DXuh1obgq/MBkjKKaEU4v86RcvZWeSeBjQ0/Edzu OYBLvvHfKzSaSFp7nMC5Zp6qQ+EfDGQKRynCxpE5M5Ily4nTDjLqXk5W6E4bB2eYyLU9 /06cOEmYeKCoBij2Eex8kZQ4xtprUbm0+g73k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:x-originating-ip:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:x-gm-message-state; bh=0sxDBkGLYPG/rCF5RhMckL+AcRRhfVp+Xe/+rJXBHuQ=; b=Soew6HPbEYNbzhu0bJQCyd/kxRKABXVMoKmexPI1UXRnfjjEmy2Np3xfd+lwo6uCLP rYqzcSAY8VB7sf5+o0UKxJ1e6Bsbd96GRJwVROQBgGzMBVRDlbZlFxVAI2Plmi38NGNy 8KMm5mf/7BjmydS/Iar+KmymU9QQPRSF6Kp3Sl1QIKfs26M36JR/lNvz+rKIVYnzbZyi UDkeD/JtZa015pqAgqqh5IxG/fyGd72U4WyBI/TAeOk+2GhMtTaZHyApkm45qWl6+u9I rcIKJGO++IH6Scz6sY8GnwQYH8tUXXVo7Z+rHWjLnE9luznFN7Do0hEmtZqK0aOkqQ5f 3AXA== X-Received: by 10.194.90.108 with SMTP id bv12mr19649189wjb.4.1368118892579; Thu, 09 May 2013 10:01:32 -0700 (PDT) MIME-Version: 1.0 Sender: lars@fazy.net Received: by 10.194.30.104 with HTTP; Thu, 9 May 2013 10:01:12 -0700 (PDT) X-Originating-IP: [82.69.70.53] In-Reply-To: <518904CE.9010206@liip.ch> References: <518904CE.9010206@liip.ch> From: Lars Janssen Date: Thu, 9 May 2013 18:01:12 +0100 X-Google-Sender-Auth: itygXB7ycXR7l2nlNnUCE9aXMzo Message-ID: Subject: Re: Preview workflow based on workspace clone/node update To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=047d7bd91f409a612c04dc4c007c X-Gm-Message-State: ALoCoQkAsbtknzTFxEBsfEp4khXYu9JT0RStr/F1eHhMSvn3JxPfcmEXYXqjXKZGxqbUXmhv+nX1 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd91f409a612c04dc4c007c Content-Type: text/plain; charset=ISO-8859-1 Hi David, Thanks *very* much for looking into this and sharing your findings. * cloned nodes share the version history, so checkins in either > workspace go into the same history. > This is good to know, although am I right in thinking it shouldn't affect my current workflow (make changes in a "preview" workspace, clone/update to "published")? Note that I'm not currently using versioning, but intend to soon. My understanding then is that clone and update should work the same for a node with mix:versionable as for one without (leaving children aside for a moment). It's only when you use checkin, restore etc. that the shared version history becomes apparent. * when updating, jackrabbit at least is using this version history to > destroy as little information as possible. so if a field was updated in > the updating workspace but not in the one we update from, the changed > field is kept. > I'm not sure if I understand this. Presumably for non-versionable nodes, this simply doesn't apply. For versionable nodes, are you saying the update operation looks at the version history and doesn't just compare the base nodes in both workspaces? Imagine this scenario: - Create a (mix:referenceable, mix:versionable) Node N in workspace A - Create a new version of N (checkin), so you have version 1.1 and the base version (I think we can ignore the root version) - Clone N into workspace B, giving a node N' in that workspace (look at the version history for either N or N', and you'll see the same original version 1.1) - Change a property of N, change the same property of N' to a different value - Now try to update N' with the changes from N... what happens? That last part is what I don't understand. I haven't tested it, but I thought that the changes from N would overwrite any changes in N'. Are you saying that actually the version history is used somehow? * jackrabbit currently checks children if they are mix:versionable and > if so, skips them. so you could model your content as versionable for > things that you do want to synchronize separately. > it should be mix:simpleVersionable instead of mix:versionable, i think > jukka created a patch for that, but this will at best come in the next > 2.6 release. i *think* phpcr-odm is currently using > mix:simpleVersionable, but i could be wrong here. Do you mean that Jackrabbit skips mix:versionable nodes when performing an update? Suppose I have nodes like this, where * means the node is versionable: /page* /page/block-1 /page/block-2 /page/sub-page* /page/sub-page/block-1 /page/sub-page/block-2 If I update "/page" from workspace A to workspace B, then should only the following nodes be updated? /page* /page/block-1 /page/block-2 I have tried testing this using the phpcr-api-tests suite, with mix:versionable and mix:simpleVersionable, and in both cases any changes to "/page/sub-page" are copied across when I update "/page". Thanks, Lars. --047d7bd91f409a612c04dc4c007c--