Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-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 6CE5518E57 for ; Tue, 18 Aug 2015 06:49:36 +0000 (UTC) Received: (qmail 7477 invoked by uid 500); 18 Aug 2015 06:49:36 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 7444 invoked by uid 500); 18 Aug 2015 06:49:36 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 7424 invoked by uid 99); 18 Aug 2015 06:49:35 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2015 06:49:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 55184DEB31 for ; Tue, 18 Aug 2015 06:49:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=wandisco.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Lz8F6coLXYm7 for ; Tue, 18 Aug 2015 06:49:30 +0000 (UTC) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 3835520F51 for ; Tue, 18 Aug 2015 06:49:30 +0000 (UTC) Received: by wicja10 with SMTP id ja10so86447732wic.1 for ; Mon, 17 Aug 2015 23:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wandisco.com; s=gapps; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=aXe3g9Y4wXBZaWWd23qiKrcl0+7pkSQ1VK7/8OycJQE=; b=H6Dwyev6Xuz3GdHsmFq0Hm4fTlxIIywWACVjvIEizDmc4RAjth5rA0j9kiAhyD5CdM AYIW5u1Dxki70AEPBc5oBXfgvMVZ8KKiqcssAVq7Sa4cwNCsW7xWxAqGfWGBKExAzWEG 8IiXiYSdh58K5LZV7+iJC1JunOu6C9l9sJsu0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=aXe3g9Y4wXBZaWWd23qiKrcl0+7pkSQ1VK7/8OycJQE=; b=E52pHOr9EYNFcd4ME5q5eUqj++mk9o0GoQIK3xh4J5Fx2zbDQiX1rr0ERCr8q65ir6 1oqraKdQnECaaNYod1gwEkNyj8/4nHnaNCwSV+21gQ5SpFfKdWbU5W0eCgL7Ai3lyzWf OJ1TuZF+yXezC2bFqI7KuJd+nSNCscKzmBbM6jPqsOr5WNwzCmCKV106eox55DCuRqi6 5ITcG4q7pW5BDpggw+VM+QYNlLMFJztFXYPPZHpqtVTIgWc7L6N+y8mRS4Gv22sfItwv VlP7k8vQRJtWdpmlWW2IaVcN/2ST0Qj7K9LY+6eQ7VbPZ/ce6p9OpyNAcqrgCleOyFh0 vweg== X-Gm-Message-State: ALoCoQnBWCcSTUXaM8U5fXI1jV8nm8fQig9Z4KZKo8vofCQWOkwOsdao/EmLEfqQZAs8A/j8zXVK X-Received: by 10.180.105.36 with SMTP id gj4mr40756850wib.64.1439880568952; Mon, 17 Aug 2015 23:49:28 -0700 (PDT) Received: from zulu.23.e-reka.si (cpe-46-164-9-209.dynamic.amis.net. [46.164.9.209]) by smtp.gmail.com with ESMTPSA id cw8sm24981228wjb.49.2015.08.17.23.49.27 for (version=TLS1 cipher=RC4-SHA bits=128/128); Mon, 17 Aug 2015 23:49:28 -0700 (PDT) Received: from zulu.23.e-reka.si (localhost [127.0.0.1]) by zulu.23.e-reka.si (Postfix) with ESMTP id B40E5F5BDFAF for ; Tue, 18 Aug 2015 08:49:26 +0200 (CEST) Message-ID: <55D2D576.7010703@wandisco.com> Date: Tue, 18 Aug 2015 08:49:26 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= Organization: WANdisco User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: users@subversion.apache.org Subject: Re: JavaHL and Transactions References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 18.08.2015 08:34, corneil.duplessis@gmail.com wrote: > I am in the process of developing a set of utilities for managing the > 'promotion' of code from trunk to specific tags etc. The project has been > doing tag based development for more than 10 years and is now moving from > CVS to SVN. > > I am using the JavaHL api from org.apache.subversion.javahl > From my experience as a user of Subversion in Eclipse and other tools I > come to expect support for performing multiple operations in a > 'transaction' which results in one new version with the relevant comments. > > I cannot figure out how to do this with the JavaHL api. > > As an example: > Give the following structure: > PROJECT1/trunk/sub-project1/files/test.txt > PROJECT1/trunk/sub-project1/files/test2.txt > PROJECT1/trunk/sub-project1/morefiles/test3.txt > > A promotion of sub-project1 to 'integration' would entail > copy from PROJECT1/trunk/sub-project1 to PROJECT1/tags/integration/sub- > project1 > This can be done on cmd line using svn copy > > > Assume someone then modifies test2.txt and test3/txt on trunk and committed > those changes. Our requirements are to make a backup of the target sub > project before applying the changes so that a 'demote' can be performed if > needed. > A new promotion should now entail: > create: > PROJECT1/tags/BACKUP_integration_20150812_180902_username/sub-project1/files > PROJECT1/tags/BACKUP_integration_20150812_180902_username/sub-project1/morefiles > move the files that are being modified: > PROJECT1/tags/integration/sub-project1/files/test2.txt to > PROJECT1/tags/BACKUP_integration_20150812_180902_username/sub-project1/files/test2.txt > PROJECT1/tags/integration/sub-project1/morefiles/test3.txt to > PROJECT1/tags/BACKUP_integration_20150812_180902_username/sub-project1/morefiles/test3.txt > copy the file that is not modified: > PROJECT1/tags/integration/sub-project1/files/test.txt to > PROJECT1/tags/BACKUP_integration_20150812_180902_username/sub-project1/files/test.txt > copy the modified files from trunk to tags/integration > PROJECT1/trunk/sub-project1/files/test2.txt to > PROJECT1/tags/integration/sub-project1/files/test2.txt > PROJECT1/trunk/sub-project1/morefiles/test3.txt to > PROJECT1/trunk/sub-project1/morefiles/test3.txt > > > To perform these operations involve multiple api calls and a new version > for each operation. > The api allows for multiple files are in the same source and target folder > in the case of copy and move operations. > > It would be some much cleaner with transactions resulting in one new > version so that it is easy to identify all the related operations. > > From an exploration of the C api it seems that transactions are supported. > I would like to know if I have missed something somewhere. There is no public API equivalent for the functionality of the svnmucc tool. There's a *private* API for that in libsvn_client, but it's not exposed in JavaHL. In C, you can get equivalent functionality by using the libsvn_ra layer directly; most of that is available in JavaHL through the ISVNRemote interface in 1.9. See ISVNRemote.getCommitEditor() and ISVNEditor. -- Brane