Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCA45D8FE for ; Tue, 13 Nov 2012 09:27:39 +0000 (UTC) Received: (qmail 70042 invoked by uid 500); 13 Nov 2012 09:27:39 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 69999 invoked by uid 500); 13 Nov 2012 09:27:38 -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 69936 invoked by uid 99); 13 Nov 2012 09:27:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 09:27:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 09:27:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1478D2388993; Tue, 13 Nov 2012 09:27:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1408647 - /subversion/trunk/subversion/svnmucc/svnmucc.c Date: Tue, 13 Nov 2012 09:27:12 -0000 To: commits@subversion.apache.org From: danielsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121113092713.1478D2388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: danielsh Date: Tue Nov 13 09:27:11 2012 New Revision: 1408647 URL: http://svn.apache.org/viewvc?rev=1408647&view=rev Log: Followup to r1408632. * subversion/svnmucc/svnmucc.c (execute): Ensure ANCHOR is a directory. Fix ensure abort_edit() is always called. Modified: subversion/trunk/subversion/svnmucc/svnmucc.c Modified: subversion/trunk/subversion/svnmucc/svnmucc.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1408647&r1=1408646&r2=1408647&view=diff ============================================================================== --- subversion/trunk/subversion/svnmucc/svnmucc.c (original) +++ subversion/trunk/subversion/svnmucc/svnmucc.c Tue Nov 13 09:27:11 2012 @@ -770,8 +770,22 @@ execute(const apr_array_header_t *action NULL, config, pool)); SVN_ERR(svn_ra_get_repos_root2(aux_session, &repos_root, pool)); SVN_ERR(svn_ra_reparent(aux_session, repos_root, pool)); - SVN_ERR(svn_ra_get_latest_revnum(session, &head, pool)); + + /* Maybe reparent to ANCHOR's dir, if ANCHOR is a file. */ + { + svn_node_kind_t kind; + + SVN_ERR(svn_ra_check_path(aux_session, + svn_uri_skip_ancestor(repos_root, anchor, pool), + head, &kind, pool)); + if (kind == svn_node_file) + { + anchor = svn_uri_dirname(anchor, pool); + SVN_ERR(svn_ra_reparent(session, anchor, pool)); + } + } + if (SVN_IS_VALID_REVNUM(base_revision)) { if (base_revision > head) @@ -848,10 +862,12 @@ execute(const apr_array_header_t *action commit_callback, NULL, NULL, FALSE, pool)); SVN_ERR(editor->open_root(editor_baton, head, pool, &root.baton)); - SVN_ERR(change_props(editor, root.baton, &root, pool)); - err = drive(&root, head, editor, pool); + err = change_props(editor, root.baton, &root, pool); + if (!err) + err = drive(&root, head, editor, pool); if (!err) err = editor->close_edit(editor_baton, pool); + if (err) svn_error_clear(editor->abort_edit(editor_baton, pool));