Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 67AC6200BA6 for ; Tue, 18 Oct 2016 11:55:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66496160ADC; Tue, 18 Oct 2016 09:55:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ABF4D160ACC for ; Tue, 18 Oct 2016 11:55:10 +0200 (CEST) Received: (qmail 44263 invoked by uid 500); 18 Oct 2016 09:55:09 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 44252 invoked by uid 99); 18 Oct 2016 09:55:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2016 09:55:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 152411A075E for ; Tue, 18 Oct 2016 09:55:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7KQIrOn0Sekl for ; Tue, 18 Oct 2016 09:55:06 +0000 (UTC) Received: from deepth.de (deepth.de [81.169.159.190]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 43B835F230 for ; Tue, 18 Oct 2016 09:55:06 +0000 (UTC) Received: from b2b-130-180-18-42.unitymedia.biz ([130.180.18.42] helo=[192.168.3.123]) by deepth.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1bwR6q-0002bd-DB for dev@subversion.apache.org; Tue, 18 Oct 2016 11:55:00 +0200 Subject: Re: svn commit: r1764902 - in /subversion/trunk/subversion: libsvn_client/conflicts.c svn/conflict-callbacks.c tests/cmdline/resolve_tests.py To: dev@subversion.apache.org References: <20161014140759.823A63A039C@svn01-us-west.apache.org> From: Stefan Hett Message-ID: Date: Tue, 18 Oct 2016 11:54:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Tue, 18 Oct 2016 09:55:11 -0000 Just a quick heads up since I didn't get to reply to this one yet: Thanks for your review, Evgeny. On 10/14/2016 6:24 PM, Evgeny Kotkov wrote: > Stefan Hett writes: > >> if (option == NULL) >> - return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE, >> - NULL, >> - _("Inapplicable conflict resolution option " >> - "given for conflicted path '%s'"), >> - svn_dirent_local_style(conflict->local_abspath, >> - scratch_pool)); >> + { >> + if (option_id == svn_client_conflict_option_merged_text) { >> + mime_type = svn_client_conflict_text_get_mime_type(conflict); >> + if (mime_type && svn_mime_type_is_binary(mime_type)) >> + option = svn_client_conflict_option_find_by_id(resolution_options, >> + svn_client_conflict_option_working_text); >> + } >> + } > Looks like the indentation and the brace formatting are broken here and > in the next hunk. Right, my bad. Already wrote a patch to correct this indentation issue and the other one on Sunday on the train but didn't get to send it yet. Meanwhile I see that stsp already corrected (and simplified) that code section. Thanks for that, stsp. > >> + >> + if (option == NULL) >> + return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE, >> + NULL, >> + _("Inapplicable conflict resolution option " >> + "given for conflicted path '%s'"), > As for the change itself, I don't think that silently transforming one > conflict option id to another in svn_client_conflict_text_resolve_by_id() > API is a proper thing to do, because we don't expose this option id as a > viable resolution option in svn_client_conflict_text_get_resolution_options(). > > I think that a better way would be to handle this case in the command line > by using svn_client_conflict_option_working_text for binary files, if > we run with --accept=working. I'll get back to that with some details and will double check the current approach, as soon as I can free up some time here (not sure whether this will be this week though). Only got half through the review on Sunday unfortunately. -- Regards, Stefan Hett, Developer/Administrator EGOSOFT GmbH, Heidestrasse 4, 52146 Würselen, Germany Tel: +49 2405 4239970, www.egosoft.com Geschäftsführer: Bernd Lehahn, Handelsregister Aachen HRB 13473