From users-return-27266-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Fri Jun 29 10:58:53 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1C2AE180663 for ; Fri, 29 Jun 2018 10:58:52 +0200 (CEST) Received: (qmail 27080 invoked by uid 500); 29 Jun 2018 08:58:51 -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 27070 invoked by uid 99); 29 Jun 2018 08:58:51 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2018 08:58:51 +0000 Received: from [172.17.3.71] (unknown [77.234.149.122]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id 9C90A469 for ; Fri, 29 Jun 2018 08:58:50 +0000 (UTC) Subject: Re: SVN patch issue with property changes References: <431EBEF6-3B1E-4886-84D6-1380BB5EF5C8@juniper.net> <87sh564wl0.fsf@codematters.co.uk> <1530216489.3226901.1423889896.35483FC8@webmail.messagingengine.com> <09d05fd2-4b7a-3e17-d309-4e48754fe6f3@apache.org> To: Subversion From: =?UTF-8?Q?Branko_=c4=8cibej?= Openpgp: preference=signencrypt Autocrypt: addr=brane@apache.org; prefer-encrypt=mutual; keydata= xsFNBFG3qpMBEACi+jRQDd2TiYeAxVgrLZ3cyyuGOFSMh4nCyUOG9BwXC69cDLH48RcE0Mpu TFTGlfdokz6JgLKU3uqShPXiflrL6JIVnJX4rTEKRzFNkcS6Zq0PfNRnFnkwiD2KIzyAG8XE y0c1Bt7hqZ5dfXaC1b7Xo+1cnlqjdLAOnr1ruTrtfQ5sO81p9jYtARVa+iVmf8bs/FvC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RP2DJ8H/EI6QuZV//Nxh66A dicXlE5SSiKQ5KcIH+eqZHa4XjVeXGeNZummrlhOv3ItKXETVhh2qeIQ/7zCjuw5rQk606+2 isg6cs4Nwtie1rXQ1KFtkTNQqWfqyM4PrEP9Bq5pWBQVkcxDsxk1Yj3A8L80IY3Hzwm8nRlq F+HkD/0IPgHICVDyiOB4XZtqVk+DHNOolCcdrFSXOcwt+qwD5zk4p0hdHKHagAPGBDXS8shm k2vaUDbKMUoVDdj579Jtp4tNOoVEEqqXspT995w7+ckbHGoQhFlSxCwtaXCr/8wwdwcCA2eO w0aLYrU04EbnH7Ryj4aTjsBGvJdmyZQT8/lTj5VARbEkNXTdTOs61pebDliyWtcF9Uz9b44p cLNniphcBO4SP/IMlEh8pBAJ1C2QlD4G90iJ1WK0MsJsUDix9Vb5s1AE6WA/Ss1iPCOdhhif eToCAwoobIipoxUZF2ik3oESskmMDolpVBiaPaFg+YPtNp/53dLap7jBNRNgyKXaGJAZaolp L+9hCU1EOWswqusDHDFSRUuYOXfuXZJxcbQUTnhQhRbvSDy3tDMRGd252Ur1sCOU5g== Organization: The Apache Software Foundation Message-ID: <27a48500-c99c-7d13-23f9-f811038ef7d2@apache.org> Date: Fri, 29 Jun 2018 10:58:49 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-GB On 29.06.2018 10:45, Johan Corveleyn wrote: > On Fri, Jun 29, 2018 at 10:34 AM, Branko Čibej wrote: >> On 28.06.2018 22:08, Julian Foad wrote: >>> Philip Martin wrote: >>>> Julian Foad writes: >>>>> Julian Foad wrote: >>>>>> The bug seems to be that 'svn patch' fails to apply any patch of >>>>>> this form, that tries to change a property value from empty to >>>>>> non-empty. >>>>> I committed a test for this in http://svn.apache.org/r1834628 >>>> I'm confused, you are treating as '' special? Suppose an existing >>>> property P has value 'foo'. Should a patch that adds P with value 'bar' >>> The issue is about a patch that *changes* the current value to another value, not a patch that *adds* a property. >>> >>> I am pointing out that a patch that changes the empty value '' to 'bar' should be (and isn't being) applied successfully to a property that already has the empty value ''. >>> >>> The patch format for modifying an empty value is mostly the same as the patch format for adding a new property: >>> >>> [[[ >>> Property changes on: f >>> ___________________________________________________________________ >>> Added: empty >>> ## -0,0 +1 ## >>> +foo >>> \ No newline at end of property >>> ]]] >>> vs. >>> [[[ >>> Property changes on: f >>> ___________________________________________________________________ >>> Modified: empty >>> ## -0,0 +1 ## >>> +foo >>> \ No newline at end of property >>> ]]] >>> >>> It's similar to the ambiguous patch representation of create a file or add text to an empty file. In that case, 'svn patch' first creates the file if it doesn't exist, and in both scenarios adds the patch text. >>> >>> For a property patch, a property-patch header line specifies whether it's a modify or an add, so there is no ambiguity. If the patch asks to 'modify' from empty to non-empty, when the target property already exists and has an empty value, this should certainly succeed. >> However, when libsvn_client creates the svn:executable property, it >> *always* sets its value to *. Applying a patch from empty to something >> else will then very likely result in a conflict; because the >> svn:executable property value cannot be empty (unless someone used a >> broken client). This has been true since at least version 0.14., some 15 >> years ago. > I think the cvs2svn conversion tool makes it possible to have an empty > svn:executable property. I don't remember if it does this by default, > or you need to do something special. I just recall we had this with an > early attempt at converting years ago (we ended up throwing that > version away, and replaced it with *). > > I remember thinking at the time: "Why do we need to set it to *? The > docs only say the property needs to be set, but it doesn't require it > to be *, it can be _any value_ ... it's not because the default svn > client does so that it's required ..." It's not "required" until you begin playing around with 'svn patch', which did not exist at the time. :) libsvn_client will surely do the right thing as soon as it sees the property, setting the executable bit in the WC. But 'svn patch', if it's a bit naïve, may get things wrong. Which would be a bug in 'svn patch' because it should treat special properties just as specially as the rest of libsvn_client does. For example, we have properties where we verify that the contents are utf-8 text with \n line endings; it shouldn't be possible for 'svn patch' to break those constraints. svn:executable just happens to have a different constraint. -- Brane