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 A41CB19E26 for ; Sat, 23 Apr 2016 21:48:41 +0000 (UTC) Received: (qmail 29997 invoked by uid 500); 23 Apr 2016 21:48:41 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 29958 invoked by uid 500); 23 Apr 2016 21:48:41 -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 29940 invoked by uid 99); 23 Apr 2016 21:48:41 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Apr 2016 21:48:41 +0000 Received: by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org, from userid 3316) id 0FB511A00A1; Sat, 23 Apr 2016 21:48:41 +0000 (UTC) Date: Sat, 23 Apr 2016 21:48:38 +0000 From: Daniel Shahaf To: Ryan J Ollos Cc: users@subversion.apache.org Subject: Re: Modifying transaction properties (svnadmin setrevprop) Message-ID: <20160423214838.GA5310@tarsus.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Ryan J Ollos wrote on Sat, Apr 23, 2016 at 14:23:37 -0700: > For a long time I've known the rule "don't modify a transaction in a > pre-commit hook", documented in (1) and recently repeated in (2). > > I was therefore surprised to read about the "svnadmin setrevprop" command > (3) in 1.9, and to see an example of modifying transaction properties in > the hook-scripts: "persist-ephemeral-txnprops.py" (4). > > Are there some conditions under which it's okay to modify the transaction, > or are there only specific use-cases when this should be done? Modifying transaction/revision properties is fine, since they are mutable data that may change at any time after the commit: the committing client's worldview will be as though somebody edited the revprop immediately after its commit went through. For everything else (text, property, and tree modifications), the client assumes that what it submitted is what is stored in the repository in the revision the commit created [that revision's number is reported to the client], so if the hooks break that assumption, the committing client may have a broken worldview. Cheers, Daniel