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 AF3E410C10 for ; Wed, 26 Mar 2014 20:37:41 +0000 (UTC) Received: (qmail 26654 invoked by uid 500); 26 Mar 2014 20:37:41 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 26077 invoked by uid 500); 26 Mar 2014 20:37:37 -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 26005 invoked by uid 99); 26 Mar 2014 20:37:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Mar 2014 20:37:33 +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; Wed, 26 Mar 2014 20:37:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2B26D2388993; Wed, 26 Mar 2014 20:37:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1582047 - /subversion/trunk/subversion/libsvn_ra_serf/update.c Date: Wed, 26 Mar 2014 20:37:12 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140326203712.2B26D2388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Wed Mar 26 20:37:11 2014 New Revision: 1582047 URL: http://svn.apache.org/r1582047 Log: Following up on r1557207 and r1582023, explicitly handle incomming last_change_* values from the main update request even when not in send-all mode. This resolves an assertion that is reproducable by $ svn co http://svn.webdav.org/repos/projects/neon/trunk neon -r 0 \ --config-option servers:global:http-bulk-updates=false * subversion/libsvn_ra_serf/update.c (report_state_e): Enable the special property values added in r1582023. (update_ttable): Enable entry prop transitions. (update_closed): Directly forward these properties to the file/directory. Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1582047&r1=1582046&r2=1582047&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_ra_serf/update.c (original) +++ subversion/trunk/subversion/libsvn_ra_serf/update.c Wed Mar 26 20:37:11 2014 @@ -90,13 +90,11 @@ typedef enum report_state_e { CHECKED_IN, CHECKED_IN_HREF, - MD5_CHECKSUM -#if 0 -, + MD5_CHECKSUM, + VERSION_NAME, CREATIONDATE, CREATOR_DISPLAYNAME -#endif } report_state_e; @@ -200,16 +198,12 @@ static const svn_ra_serf__xml_transition { OPEN_FILE, S_, "prop", PROP, FALSE, { NULL }, FALSE }, -#if 0 { OPEN_DIR, S_, "prop", PROP, FALSE, { NULL }, FALSE }, -#endif { ADD_FILE, S_, "prop", PROP, FALSE, { NULL }, FALSE }, -#if 0 { ADD_DIR, S_, "prop", PROP, FALSE, { NULL }, FALSE }, -#endif { OPEN_FILE, S_, "txdelta", TXDELTA, FALSE, { "?base-checksum" }, TRUE }, @@ -235,14 +229,12 @@ static const svn_ra_serf__xml_transition { OPEN_FILE, S_, "fetch-props", FETCH_PROPS, FALSE, { NULL }, FALSE }, -#if 0 { PROP, D_, "version-name", VERSION_NAME, TRUE, { NULL }, TRUE }, { PROP, D_, "creationdate", CREATIONDATE, TRUE, { NULL }, TRUE }, { PROP, D_, "creator-displayname", CREATOR_DISPLAYNAME, TRUE, { NULL }, TRUE }, -#endif { 0 } }; @@ -2076,23 +2068,45 @@ update_closed(svn_ra_serf__xml_estate_t } } break; -#if 0 + case VERSION_NAME: - { - SVN_DBG(("Version: %s", cdata ? cdata->data : NULL)); - } - break; case CREATIONDATE: - { - SVN_DBG(("Date: %s", cdata ? cdata->data : NULL)); - } - break; case CREATOR_DISPLAYNAME: { - SVN_DBG(("Author: %s", cdata ? cdata->data : NULL)); + const char *propname; + + if (ctx->cur_file) + SVN_ERR(ensure_file_opened(ctx->cur_file, scratch_pool)); + else if (ctx->cur_dir) + SVN_ERR(ensure_dir_opened(ctx->cur_dir, scratch_pool)); + else + break; + + switch (leaving_state) + { + case VERSION_NAME: + propname = SVN_PROP_ENTRY_COMMITTED_REV; + break; + case CREATIONDATE: + propname = SVN_PROP_ENTRY_COMMITTED_DATE; + break; + case CREATOR_DISPLAYNAME: + propname = SVN_PROP_ENTRY_LAST_AUTHOR; + break; + default: + SVN_ERR_MALFUNCTION(); /* Impossible to reach */ + } + + if (ctx->cur_file) + SVN_ERR(ctx->editor->change_file_prop(ctx->cur_file->file_baton, + propname, cdata, + scratch_pool)); + else + SVN_ERR(ctx->editor->change_dir_prop(ctx->cur_dir->dir_baton, + propname, cdata, + scratch_pool)); } break; -#endif } return SVN_NO_ERROR;