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 C17DC200B96 for ; Thu, 6 Oct 2016 16:54:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C01C7160AC6; Thu, 6 Oct 2016 14:54:31 +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 10A15160AAD for ; Thu, 6 Oct 2016 16:54:30 +0200 (CEST) Received: (qmail 26233 invoked by uid 500); 6 Oct 2016 14:54:30 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 26223 invoked by uid 99); 6 Oct 2016 14:54:30 -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; Thu, 06 Oct 2016 14:54:30 +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 B5C981A5579 for ; Thu, 6 Oct 2016 14:54:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iwPdicDMZiNq for ; Thu, 6 Oct 2016 14:54:29 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id E63085FAC4 for ; Thu, 6 Oct 2016 14:54:28 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 69CC2E002B for ; Thu, 6 Oct 2016 14:54:28 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 651B43A0114 for ; Thu, 6 Oct 2016 14:54:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1763599 - /subversion/trunk/subversion/svn/conflict-callbacks.c Date: Thu, 06 Oct 2016 14:54:28 -0000 To: commits@subversion.apache.org From: kotkov@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161006145428.651B43A0114@svn01-us-west.apache.org> archived-at: Thu, 06 Oct 2016 14:54:31 -0000 Author: kotkov Date: Thu Oct 6 14:54:28 2016 New Revision: 1763599 URL: http://svn.apache.org/viewvc?rev=1763599&view=rev Log: Fix sharing violation error when merging property values with notepad on Windows. The error is caused by keeping the file handle open when calling the extenal editor (editor-cmd). With notepad, an attempt to save the edited file results in a sharing violation error upon CreateFile() caused by the svn process still having the open file handle. * subversion/svn/conflict-callbacks.c (edit_prop_conflict): Take ownership of the apr_file_t when opening a stream, so that closing the stream would also close the underlying file. Remove the svn_io_file_flush() call, because closing a buffered file performs a flush automatically. Modified: subversion/trunk/subversion/svn/conflict-callbacks.c Modified: subversion/trunk/subversion/svn/conflict-callbacks.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1763599&r1=1763598&r2=1763599&view=diff ============================================================================== --- subversion/trunk/subversion/svn/conflict-callbacks.c (original) +++ subversion/trunk/subversion/svn/conflict-callbacks.c Thu Oct 6 14:54:28 2016 @@ -346,7 +346,7 @@ edit_prop_conflict(const svn_string_t ** SVN_ERR(svn_io_open_unique_file3(&file, &file_path, NULL, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); - merged_prop = svn_stream_from_aprfile2(file, TRUE /* disown */, + merged_prop = svn_stream_from_aprfile2(file, FALSE /* disown */, scratch_pool); SVN_ERR(merge_prop_conflict(merged_prop, base_propval, my_propval, their_propval, NULL, @@ -354,7 +354,6 @@ edit_prop_conflict(const svn_string_t ** pb->cancel_baton, scratch_pool)); SVN_ERR(svn_stream_close(merged_prop)); - SVN_ERR(svn_io_file_flush(file, scratch_pool)); SVN_ERR(open_editor(&performed_edit, file_path, editor_cmd, config, scratch_pool)); if (performed_edit && merged_propval)