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 95FD29952 for ; Mon, 7 May 2012 18:24:51 +0000 (UTC) Received: (qmail 36268 invoked by uid 500); 7 May 2012 18:24:50 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 36215 invoked by uid 500); 7 May 2012 18:24:50 -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 35845 invoked by uid 99); 7 May 2012 18:24:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 18:24:50 +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; Mon, 07 May 2012 18:24:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4A3FF2388978; Mon, 7 May 2012 18:24:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1335173 [1/2] - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ notes/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_repos/ subve... Date: Mon, 07 May 2012 18:24:24 -0000 To: commits@subversion.apache.org From: hwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120507182426.4A3FF2388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hwright Date: Mon May 7 18:24:22 2012 New Revision: 1335173 URL: http://svn.apache.org/viewvc?rev=1335173&view=rev Log: On the ev2-export branch: Bring up-to-date with trunk, leaving build errors for Future Work. Modified: subversion/branches/ev2-export/ (props changed) subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el subversion/branches/ev2-export/contrib/client-side/emacs/vc-svn.el subversion/branches/ev2-export/notes/ev2-callbacks-template.c subversion/branches/ev2-export/subversion/include/svn_editor.h subversion/branches/ev2-export/subversion/libsvn_client/client.h subversion/branches/ev2-export/subversion/libsvn_client/externals.c subversion/branches/ev2-export/subversion/libsvn_client/status.c subversion/branches/ev2-export/subversion/libsvn_client/update.c subversion/branches/ev2-export/subversion/libsvn_delta/compat.c subversion/branches/ev2-export/subversion/libsvn_delta/editor.c subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c subversion/branches/ev2-export/subversion/libsvn_fs/editor.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/blame.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/get_deleted_rev.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/getdate.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocations.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocationsegments.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocks.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/log.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/merge.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/mergeinfo.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/property.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c subversion/branches/ev2-export/subversion/libsvn_ra_serf/util.c subversion/branches/ev2-export/subversion/libsvn_repos/commit.c subversion/branches/ev2-export/subversion/svnserve/main.c subversion/branches/ev2-export/subversion/tests/cmdline/entries_tests.py subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py subversion/branches/ev2-export/subversion/tests/cmdline/schedule_tests.py subversion/branches/ev2-export/tools/dev/unix-build/README subversion/branches/ev2-export/tools/server-side/svnpubsub/example.conf subversion/branches/ev2-export/tools/server-side/svnpubsub/svntweet.py Propchange: subversion/branches/ev2-export/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1334156-1335171 Modified: subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el (original) +++ subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el Mon May 7 18:24:22 2012 @@ -1083,19 +1083,24 @@ outside." (goto-char (point-max)) (insert str) (goto-char svn-output-marker) - (while (cond ((looking-at - "\\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([^ ].*\\)\n") - (let ((status (match-string 1)) - (filename (svn-normalise-path (match-string 2)))) - (delete-region (match-beginning 0) - (match-end 0)) - (svn-insert-file filename status)) - t) - ((looking-at - "\n\\|Performing status on external item at .*\n") - (delete-region (match-beginning 0) - (match-end 0)) - t)))))) + (while + (cond + ((looking-at + "\\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([^ ].*\\)\n") + (let ((status (match-string 1)) + (filename (svn-normalise-path (match-string 2)))) + (delete-region (match-beginning 0) (match-end 0)) + (svn-insert-file filename status)) + t) + ((looking-at "\n\\|Performing status on external item at .*\n") + (delete-region (match-beginning 0) (match-end 0)) + t) + ((looking-at " > +\\([^ ].*\\)\n") + (let ((tree-conflict (match-string 1))) + (delete-region (match-beginning 0) (match-end 0)) + (svn-update-status-msg svn-last-inserted-marker "TConflict") + (svn-update-conflict-msg svn-last-inserted-marker tree-conflict)) + t)))))) (defun svn-status-sentinel (proc reason) (with-current-buffer (process-buffer proc) @@ -1110,15 +1115,23 @@ outside." (goto-char (point-max)) (insert str) (goto-char svn-output-marker) - (while (looking-at - "\\(?:\\(\\?.....\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? [* ] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n") - (let ((status (or (match-string 1) (match-string 2))) - (filename (svn-normalise-path (match-string 3)))) - (delete-region (match-beginning 0) - (match-end 0)) - (when (or (not svn-file-filter) - (member filename svn-file-filter)) - (svn-insert-file filename status))))))) + (while + (cond + ((looking-at + "\\(?:\\(\\?.....\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? [* ] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n") + (let ((status (or (match-string 1) (match-string 2))) + (filename (svn-normalise-path (match-string 3)))) + (delete-region (match-beginning 0) (match-end 0)) + (when (or (not svn-file-filter) + (member filename svn-file-filter)) + (svn-insert-file filename status))) + t) + ((looking-at " > +\\([^ ].*\\)\n") + (let ((tree-conflict (match-string 1))) + (delete-region (match-beginning 0) (match-end 0)) + (svn-update-status-msg svn-last-inserted-marker "TConflict") + (svn-update-conflict-msg svn-last-inserted-marker tree-conflict)) + t)))))) (defun svn-status-v-sentinel (proc reason) (with-current-buffer (process-buffer proc) @@ -1209,11 +1222,12 @@ With prefix arg, prompt for REVISION." (goto-char svn-output-marker) (while (not nomore) (cond ((looking-at - "\\([ ADUCGE][ ADUCGE][ B]\\) \\(.*\\)\n") + "\\([ ADUCGE][ ADUCGE][ B]\\)\\([ C]?\\) \\([^ ].*\\)\n") (let* ((status (match-string 1)) (file-status (elt status 0)) (prop-status (elt status 1)) - (filename (svn-normalise-path (match-string 2)))) + (tree-status (match-string 2)) + (filename (svn-normalise-path (match-string 3)))) (delete-region (match-beginning 0) (match-end 0)) (svn-insert-file @@ -1223,7 +1237,9 @@ With prefix arg, prompt for REVISION." (svn-remap-update-to-status file-status) (svn-remap-update-to-status prop-status)) ;; Optimize for some common cases - (cond ((= prop-status ?\ ) + (cond ((string= tree-status "C") + "TConflict") + ((= prop-status ?\ ) (cdr (assq file-status svn-update-flag-name))) ((= file-status ?\ ) (let ((s (format "P %s" @@ -2104,7 +2120,14 @@ Argument MSG is the character to use." (save-excursion (goto-char (+ pos svn-status-msg-col)) (delete-char 9) - (insert-and-inherit (format "%9s" msg)))) + (insert-and-inherit (format "%-9s" msg)))) + +(defun svn-update-conflict-msg (pos msg) + (save-excursion + (let ((filename (svn-getprop pos 'file))) + (goto-char (+ pos svn-status-file-col (length filename))) + (delete-char (- (line-end-position) (point))) + (insert-and-inherit (concat " -- " msg))))) (defun svn-foreach-svn-buffer (file-name function) "Call FUNCTION for each svn status buffer that contains FILE-NAME. Modified: subversion/branches/ev2-export/contrib/client-side/emacs/vc-svn.el URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/contrib/client-side/emacs/vc-svn.el?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/contrib/client-side/emacs/vc-svn.el (original) +++ subversion/branches/ev2-export/contrib/client-side/emacs/vc-svn.el Mon May 7 18:24:22 2012 @@ -200,9 +200,9 @@ If the file is newly added, LOCAL is \"0 (cond ((not state) nil) ;; A newly added file has no revision. - ((looking-at "....\\s-+\\(\\*\\s-+\\)?[-0]\\s-+\\(\\?\\|[0-9]+\\)") + ((looking-at ".......\\s-+\\(\\*\\s-+\\)?[-0]\\s-+\\(\\?\\|[0-9]+\\)") (list state "0" nil)) - ((looking-at "....\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)") + ((looking-at ".......\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)") (list state (match-string 2) (match-string 3))) Modified: subversion/branches/ev2-export/notes/ev2-callbacks-template.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/notes/ev2-callbacks-template.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/notes/ev2-callbacks-template.c (original) +++ subversion/branches/ev2-export/notes/ev2-callbacks-template.c Mon May 7 18:24:22 2012 @@ -1,4 +1,7 @@ -/* Use this file to quickly copy/paste handlers for all Ev2 callbacks */ +/* Use this file to quickly copy/paste handlers for all Ev2 callbacks. + + Please prefix each function to distinguish them from the template, + for improved ctags behavior. */ #define UNUSED(x) ((void)(x)) @@ -68,6 +71,7 @@ static svn_error_t * alter_directory_cb(void *baton, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props, apr_pool_t *scratch_pool) { Modified: subversion/branches/ev2-export/subversion/include/svn_editor.h URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_editor.h?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/include/svn_editor.h (original) +++ subversion/branches/ev2-export/subversion/include/svn_editor.h Mon May 7 18:24:22 2012 @@ -246,6 +246,10 @@ extern "C" { * In order to reduce complexity of callback receivers, the editor callbacks * must be driven in adherence to these rules: * + * - If any path is added (with add_*) or deleted/moved/rotated, then + * an svn_editor_alter_directory() call must be made for its parent + * directory with the target/eventual set of children. + * * - svn_editor_add_directory() -- Another svn_editor_add_*() call must * follow for each child mentioned in the @a children argument of any * svn_editor_add_directory() call. @@ -479,6 +483,7 @@ typedef svn_error_t *(*svn_editor_cb_alt void *baton, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props, apr_pool_t *scratch_pool); @@ -885,8 +890,16 @@ svn_editor_add_absent(svn_editor_t *edit * (e.g. it has not yet been committed), then @a revision should be * #SVN_INVALID_REVNUM. * - * For a description of @a props, see svn_editor_add_file(). @a props - * may not be NULL. + * If any changes to the set of children will be made in the future of + * the edit drive, then @a children MUST specify the resulting set of + * children. See svn_editor_add_directory() for the format of @a children. + * If not changes will be made, then NULL may be specified. + * + * For a description of @a props, see svn_editor_add_file(). If no changes + * to the properties will be made (ie. only future changes to the set of + * children), then @a props may be NULL. + * + * It is an error to pass NULL for both @a children and @a props. * * For all restrictions on driving the editor, see #svn_editor_t. * @since New in 1.8. @@ -895,6 +908,7 @@ svn_error_t * svn_editor_alter_directory(svn_editor_t *editor, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props); /** Drive @a editor's #svn_editor_cb_alter_file_t callback. Modified: subversion/branches/ev2-export/subversion/libsvn_client/client.h URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/client.h?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original) +++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Mon May 7 18:24:22 2012 @@ -1005,11 +1005,12 @@ svn_client__export_externals(apr_hash_t apr_pool_t *pool); -/* Perform status operations on each external in TRAVERSAL_INFO. All - other options are the same as those passed to svn_client_status(). */ +/* Perform status operations on each external in EXTERNAL_MAP, a const char * + local_abspath of all externals mapping to the const char* defining_abspath. + All other options are the same as those passed to svn_client_status(). */ svn_error_t * svn_client__do_external_status(svn_client_ctx_t *ctx, - apr_hash_t *external_defs, + apr_hash_t *external_map, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t update, Modified: subversion/branches/ev2-export/subversion/libsvn_client/externals.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/externals.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_client/externals.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_client/externals.c Mon May 7 18:24:22 2012 @@ -24,7 +24,7 @@ /* ==================================================================== */ - + /*** Includes. ***/ #include @@ -41,7 +41,7 @@ #include "svn_private_config.h" #include "private/svn_wc_private.h" - + /* Closure for handle_external_item_change. */ struct external_change_baton_t { @@ -1060,7 +1060,7 @@ svn_client__export_externals(apr_hash_t svn_error_t * svn_client__do_external_status(svn_client_ctx_t *ctx, - apr_hash_t *externals_new, + apr_hash_t *external_map, svn_depth_t depth, svn_boolean_t get_all, svn_boolean_t update, @@ -1070,69 +1070,59 @@ svn_client__do_external_status(svn_clien apr_pool_t *pool) { apr_hash_index_t *hi; - apr_pool_t *subpool = svn_pool_create(pool); + apr_pool_t *iterpool = svn_pool_create(pool); /* Loop over the hash of new values (we don't care about the old ones). This is a mapping of versioned directories to property values. */ - for (hi = apr_hash_first(pool, externals_new); + for (hi = apr_hash_first(pool, external_map); hi; hi = apr_hash_next(hi)) { - apr_array_header_t *exts; - const char *path = svn__apr_hash_index_key(hi); - const char *propval = svn__apr_hash_index_val(hi); - apr_pool_t *iterpool; - int i; + svn_node_kind_t external_kind; + const char *local_abspath = svn__apr_hash_index_key(hi); + const char *defining_abspath = svn__apr_hash_index_val(hi); + svn_node_kind_t kind; + svn_opt_revision_t opt_rev; - /* Clear the subpool. */ - svn_pool_clear(subpool); + svn_pool_clear(iterpool); - /* Parse the svn:externals property value. This results in a - hash mapping subdirectories to externals structures. */ - SVN_ERR(svn_wc_parse_externals_description3(&exts, path, propval, - FALSE, subpool)); + /* Obtain information on the expected external. */ + SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL, + &opt_rev.value.number, + ctx->wc_ctx, defining_abspath, + local_abspath, FALSE, + iterpool, iterpool)); - /* Make a sub-pool of SUBPOOL. */ - iterpool = svn_pool_create(subpool); + if (external_kind != svn_node_dir) + continue; - /* Loop over the subdir array. */ - for (i = 0; exts && (i < exts->nelts); i++) - { - const char *fullpath; - svn_wc_external_item2_t *external; - svn_node_kind_t kind; - - svn_pool_clear(iterpool); - - external = APR_ARRAY_IDX(exts, i, svn_wc_external_item2_t *); - fullpath = svn_dirent_join(path, external->target_dir, iterpool); - - /* If the external target directory doesn't exist on disk, - just skip it. */ - SVN_ERR(svn_io_check_path(fullpath, &kind, iterpool)); - if (kind != svn_node_dir) - continue; - - /* Tell the client we're starting an external status set. */ - if (ctx->notify_func2) - (ctx->notify_func2)( + SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool)); + if (kind != svn_node_dir) + continue; + + if (SVN_IS_VALID_REVNUM(opt_rev.value.number)) + opt_rev.kind = svn_opt_revision_number; + else + opt_rev.kind = svn_opt_revision_unspecified; + + /* Tell the client we're starting an external status set. */ + if (ctx->notify_func2) + ctx->notify_func2( ctx->notify_baton2, - svn_wc_create_notify(fullpath, svn_wc_notify_status_external, + svn_wc_create_notify(local_abspath, + svn_wc_notify_status_external, iterpool), iterpool); - /* And then do the status. */ - SVN_ERR(svn_client_status5(NULL, ctx, fullpath, - &(external->revision), - depth, get_all, update, - no_ignore, FALSE, FALSE, NULL, - status_func, status_baton, - iterpool)); - } + /* And then do the status. */ + SVN_ERR(svn_client_status5(NULL, ctx, local_abspath, &opt_rev, depth, + get_all, update, no_ignore, FALSE, FALSE, + NULL, status_func, status_baton, + iterpool)); } /* Destroy SUBPOOL and (implicitly) ITERPOOL. */ - svn_pool_destroy(subpool); + svn_pool_destroy(iterpool); return SVN_NO_ERROR; } Modified: subversion/branches/ev2-export/subversion/libsvn_client/status.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/status.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_client/status.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_client/status.c Mon May 7 18:24:22 2012 @@ -516,13 +516,13 @@ svn_client_status5(svn_revnum_t *result_ */ if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals)) { - apr_hash_t *externals_new; - SVN_ERR(svn_wc__externals_gather_definitions(&externals_new, NULL, - ctx->wc_ctx, target_abspath, - depth, pool, pool)); + apr_hash_t *external_map; + SVN_ERR(svn_wc__externals_defined_below(&external_map, + ctx->wc_ctx, target_abspath, + pool, pool)); - SVN_ERR(svn_client__do_external_status(ctx, externals_new, + SVN_ERR(svn_client__do_external_status(ctx, external_map, depth, get_all, update, no_ignore, status_func, status_baton, pool)); Modified: subversion/branches/ev2-export/subversion/libsvn_client/update.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/update.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_client/update.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_client/update.c Mon May 7 18:24:22 2012 @@ -195,6 +195,7 @@ update_internal(svn_revnum_t *result_rev const char *corrected_url; const char *target; const char *repos_root; + const char *repos_relpath; svn_error_t *err; svn_revnum_t revnum; svn_boolean_t use_commit_times; @@ -207,7 +208,7 @@ update_internal(svn_revnum_t *result_rev apr_array_header_t *preserved_exts; struct svn_client__dirent_fetcher_baton_t dfb; svn_boolean_t server_supports_depth; - svn_boolean_t tree_conflicted; + svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted; svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG, APR_HASH_KEY_STRING) : NULL; @@ -221,39 +222,34 @@ update_internal(svn_revnum_t *result_rev else target = ""; - /* Get full URL from the ANCHOR. */ - SVN_ERR(svn_wc__node_get_url(&anchor_url, ctx->wc_ctx, anchor_abspath, - pool, pool)); - if (! anchor_url) - return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL, - _("'%s' has no URL"), - svn_dirent_local_style(anchor_abspath, pool)); - - /* Check if our anchor exists in BASE. If it doesn't we can't update. - ### For performance reasons this should be handled with the same query - ### as retrieving the anchor url. */ - SVN_ERR(svn_wc__node_get_base(&revnum, NULL, NULL, NULL, ctx->wc_ctx, - anchor_abspath, pool, pool)); - - /* It does not make sense to update tree-conflict victims. */ - err = svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted, + /* Check if our anchor exists in BASE. If it doesn't we can't update. */ + SVN_ERR(svn_wc__node_get_base(&revnum, &repos_relpath, &repos_root, NULL, + ctx->wc_ctx, anchor_abspath, pool, pool)); + + /* It does not make sense to update conflict victims. */ + err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted, + &tree_conflicted, ctx->wc_ctx, local_abspath, pool); if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) { svn_error_clear(err); + text_conflicted = FALSE; + prop_conflicted = FALSE; tree_conflicted = FALSE; } else SVN_ERR(err); - if (!SVN_IS_VALID_REVNUM(revnum) || tree_conflicted) + if (!SVN_IS_VALID_REVNUM(revnum) + || text_conflicted || prop_conflicted || tree_conflicted) { if (ctx->notify_func2) { svn_wc_notify_t *nt; nt = svn_wc_create_notify(local_abspath, - tree_conflicted + (text_conflicted || prop_conflicted + || tree_conflicted) ? svn_wc_notify_skip_conflicted : svn_wc_notify_update_skip_working_only, pool); @@ -262,6 +258,12 @@ update_internal(svn_revnum_t *result_rev } return SVN_NO_ERROR; } + else if (! repos_relpath) + return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL, + _("'%s' has no URL"), + svn_dirent_local_style(anchor_abspath, pool)); + + anchor_url = svn_path_url_add_component2(repos_root, repos_relpath, pool); /* We may need to crop the tree if the depth is sticky */ if (depth_is_sticky && depth < svn_depth_infinity) @@ -334,8 +336,6 @@ update_internal(svn_revnum_t *result_rev anchor_abspath, NULL, TRUE, TRUE, ctx, pool)); - SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool)); - /* If we got a corrected URL from the RA subsystem, we'll need to relocate our working copy first. */ if (corrected_url) Modified: subversion/branches/ev2-export/subversion/libsvn_delta/compat.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/compat.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_delta/compat.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_delta/compat.c Mon May 7 18:24:22 2012 @@ -433,9 +433,11 @@ process_actions(struct ev2_edit_baton *e SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(change->changing)); #endif + /* ### we need to gather up the target set of children */ + if (kind == svn_kind_dir) SVN_ERR(svn_editor_alter_directory(eb->editor, repos_relpath, - change->changing, props)); + change->changing, NULL, props)); else SVN_ERR(svn_editor_alter_file(eb->editor, repos_relpath, change->changing, props, @@ -1160,6 +1162,7 @@ static svn_error_t * alter_directory_cb(void *baton, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props, apr_pool_t *scratch_pool) { @@ -1168,6 +1171,8 @@ alter_directory_cb(void *baton, /* ### should we verify the kind is truly a directory? */ + /* ### do we need to do anything with CHILDREN? */ + /* Note: this node may already have information in CHANGE as a result of an earlier copy/move operation. */ change->kind = svn_kind_dir; Modified: subversion/branches/ev2-export/subversion/libsvn_delta/editor.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/editor.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_delta/editor.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_delta/editor.c Mon May 7 18:24:22 2012 @@ -624,12 +624,14 @@ svn_error_t * svn_editor_alter_directory(svn_editor_t *editor, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props) { svn_error_t *err = SVN_NO_ERROR; SVN_ERR_ASSERT(svn_relpath_is_canonical(relpath)); - SVN_ERR_ASSERT(props != NULL); + SVN_ERR_ASSERT(children != NULL || props != NULL); + /* ### validate children are just basenames? */ SHOULD_NOT_BE_FINISHED(editor); SHOULD_ALLOW_ALTER(editor, relpath); VERIFY_PARENT_MAY_EXIST(editor, relpath); @@ -640,7 +642,8 @@ svn_editor_alter_directory(svn_editor_t { START_CALLBACK(editor); err = editor->funcs.cb_alter_directory(editor->baton, - relpath, revision, props, + relpath, revision, + children, props, editor->scratch_pool); END_CALLBACK(editor); } @@ -648,6 +651,25 @@ svn_editor_alter_directory(svn_editor_t MARK_COMPLETED(editor, relpath); MARK_PARENT_STABLE(editor, relpath); +#ifdef ENABLE_ORDERING_CHECK + /* ### this is not entirely correct. we probably need to adjust the + ### check_unknown_child() function for this scenario. */ +#if 0 + { + int i; + for (i = 0; i < children->nelts; i++) + { + const char *child_basename = APR_ARRAY_IDX(children, i, const char *); + const char *child = svn_relpath_join(relpath, child_basename, + editor->state_pool); + + apr_hash_set(editor->pending_incomplete_children, child, + APR_HASH_KEY_STRING, ""); + } + } +#endif +#endif + svn_pool_clear(editor->scratch_pool); return svn_error_trace(err); } Modified: subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c Mon May 7 18:24:22 2012 @@ -904,29 +904,54 @@ svn_error_t *svn_txdelta_send_stream(svn unsigned char *digest, apr_pool_t *pool) { - svn_txdelta_stream_t *txstream; - svn_error_t *err; + svn_txdelta_window_t delta_window = { 0 }; + svn_txdelta_op_t delta_op; + svn_string_t window_data; + char read_buf[SVN__STREAM_CHUNK_SIZE + 1]; + svn_checksum_ctx_t *md5_checksum_ctx; - /* ### this is a hack. we should simply read from the stream, construct - ### some windows, and pass those to the handler. there isn't any reason - ### to crank up a full "diff" algorithm just to copy a stream. - ### - ### will fix RSN. */ - - /* Create a delta stream which converts an *empty* bytestream into the - target bytestream. */ - svn_txdelta(&txstream, svn_stream_empty(pool), stream, pool); - err = svn_txdelta_send_txstream(txstream, handler, handler_baton, pool); + if (digest) + md5_checksum_ctx = svn_checksum_ctx_create(svn_checksum_md5, pool); - if (digest && (! err)) + while (1) { - const unsigned char *result_md5; - result_md5 = svn_txdelta_md5_digest(txstream); - /* Since err is null, result_md5 "cannot" be null. */ - memcpy(digest, result_md5, APR_MD5_DIGESTSIZE); + apr_size_t read_len = SVN__STREAM_CHUNK_SIZE; + + SVN_ERR(svn_stream_read(stream, read_buf, &read_len)); + if (read_len == 0) + break; + + window_data.data = read_buf; + window_data.len = read_len; + + delta_op.action_code = svn_txdelta_new; + delta_op.offset = 0; + delta_op.length = read_len; + + delta_window.tview_len = read_len; + delta_window.num_ops = 1; + delta_window.ops = &delta_op; + delta_window.new_data = &window_data; + + SVN_ERR(handler(&delta_window, handler_baton)); + + if (digest) + SVN_ERR(svn_checksum_update(md5_checksum_ctx, read_buf, read_len)); + + if (read_len < SVN__STREAM_CHUNK_SIZE) + break; } + SVN_ERR(handler(NULL, handler_baton)); - return err; + if (digest) + { + svn_checksum_t *md5_checksum; + + SVN_ERR(svn_checksum_final(&md5_checksum, md5_checksum_ctx, pool)); + memcpy(digest, md5_checksum->digest, APR_MD5_DIGESTSIZE); + } + + return SVN_NO_ERROR; } svn_error_t *svn_txdelta_send_txstream(svn_txdelta_stream_t *txstream, Modified: subversion/branches/ev2-export/subversion/libsvn_fs/editor.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs/editor.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_fs/editor.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_fs/editor.c Mon May 7 18:24:22 2012 @@ -359,6 +359,7 @@ static svn_error_t * alter_directory_cb(void *baton, const char *relpath, svn_revnum_t revision, + const apr_array_header_t *children, apr_hash_t *props, apr_pool_t *scratch_pool) { @@ -366,6 +367,9 @@ alter_directory_cb(void *baton, const char *fspath = FSPATH(relpath, scratch_pool); svn_fs_root_t *root; + /* Note: we ignore CHILDREN. We have no "incomplete" state to worry about, + so we don't need to be aware of what children will be created. */ + if (!SVN_IS_VALID_REVNUM(revision)) /* ### use a custom error code? */ return svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, @@ -406,9 +410,17 @@ alter_file_cb(void *baton, SVN_ERR(get_root(&root, eb)); SVN_ERR(can_modify(root, fspath, revision, scratch_pool)); - SVN_ERR(set_text(root, fspath, checksum, contents, - eb->cancel_func, eb->cancel_baton, scratch_pool)); - SVN_ERR(alter_props(root, fspath, props, scratch_pool)); + if (contents != NULL) + { + SVN_ERR_ASSERT(checksum != NULL); + SVN_ERR(set_text(root, fspath, checksum, contents, + eb->cancel_func, eb->cancel_baton, scratch_pool)); + } + + if (props != NULL) + { + SVN_ERR(alter_props(root, fspath, props, scratch_pool)); + } return SVN_NO_ERROR; } Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/blame.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/blame.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/blame.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/blame.c Mon May 7 18:24:22 2012 @@ -428,7 +428,6 @@ svn_ra_serf__get_file_revs(svn_ra_sessio svn_ra_serf__handler_t *handler; svn_ra_serf__xml_parser_t *parser_ctx; const char *relative_url, *basecoll_url, *req_url; - int status_code; svn_error_t *err; blame_ctx = apr_pcalloc(pool, sizeof(*blame_ctx)); @@ -448,6 +447,7 @@ svn_ra_serf__get_file_revs(svn_ra_sessio handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_type = "text/xml"; @@ -464,7 +464,6 @@ svn_ra_serf__get_file_revs(svn_ra_sessio parser_ctx->end = end_blame; parser_ctx->cdata = cdata_blame; parser_ctx->done = &blame_ctx->done; - parser_ctx->status_code = &status_code; handler->response_handler = svn_ra_serf__handle_xml_parser; handler->response_baton = parser_ctx; @@ -474,9 +473,9 @@ svn_ra_serf__get_file_revs(svn_ra_sessio err = svn_ra_serf__context_run_wait(&blame_ctx->done, session, pool); err = svn_error_compose_create( - svn_ra_serf__error_on_status(status_code, + svn_ra_serf__error_on_status(handler->sline.code, handler->path, - parser_ctx->location), + handler->location), err); return svn_error_trace(err); Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c Mon May 7 18:24:22 2012 @@ -49,13 +49,16 @@ /* Structure associated with a CHECKOUT request. */ typedef struct checkout_context_t { - apr_pool_t *pool; - - const char *activity_url; - const char *checkout_url; + /* Record information about the checked-out resource. */ const char *resource_url; + /* These four fields are used during the actual CHECKOUT. They will be + NULL for resources implicitly checked out (ie. an ancestor was + checked out). */ + svn_ra_serf__handler_t *handler; svn_ra_serf__simple_request_context_t progress; + apr_pool_t *result_pool; + const char *activity_url; } checkout_context_t; @@ -82,7 +85,7 @@ typedef struct commit_context_t { /* HTTP v1 stuff (only valid when 'txn_url' is NULL) */ const char *activity_url; /* activity base URL... */ - checkout_context_t *baseline; /* checkout for the baseline */ + const checkout_context_t *baseline; /* checkout for the baseline */ const char *checked_in_url; /* checked-in root to base CHECKOUTs from */ const char *vcc_url; /* vcc url */ @@ -220,23 +223,27 @@ typedef struct file_context_t { static svn_error_t * return_response_err(svn_ra_serf__handler_t *handler, - svn_ra_serf__simple_request_context_t *ctx) + svn_error_t *server_err) { svn_error_t *err; + /* We should have captured SLINE and LOCATION in the HANDLER. */ + SVN_ERR_ASSERT(handler->handler_pool != NULL); + /* Ye Olde Fallback Error */ err = svn_error_compose_create( - ctx->server_error.error, + server_err, svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL, _("%s of '%s': %d %s"), handler->method, handler->path, - ctx->status, ctx->reason)); + handler->sline.code, handler->sline.reason)); /* Try to return one of the standard errors for 301, 404, etc., then look for an error embedded in the response. */ - return svn_error_compose_create(svn_ra_serf__error_on_status(ctx->status, - handler->path, - ctx->location), + return svn_error_compose_create(svn_ra_serf__error_on_status( + handler->sline.code, + handler->path, + handler->location), err); } @@ -259,8 +266,10 @@ create_checkout_body(serf_bucket_t **bkt svn_ra_serf__add_open_tag_buckets(body_bkt, alloc, "D:activity-set", NULL); svn_ra_serf__add_open_tag_buckets(body_bkt, alloc, "D:href", NULL); + SVN_ERR_ASSERT(ctx->activity_url != NULL); svn_ra_serf__add_cdata_len_buckets(body_bkt, alloc, - ctx->activity_url, strlen(ctx->activity_url)); + ctx->activity_url, + strlen(ctx->activity_url)); svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:href"); svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:activity-set"); @@ -275,10 +284,11 @@ create_checkout_body(serf_bucket_t **bkt static svn_error_t * handle_checkout(serf_request_t *request, serf_bucket_t *response, - void *handler_baton, + void *baton, apr_pool_t *pool) { - checkout_context_t *ctx = handler_baton; + checkout_context_t *ctx = baton; + svn_ra_serf__handler_t *handler = ctx->handler; svn_error_t *err = svn_ra_serf__handle_status_only(request, response, &ctx->progress, pool); @@ -291,7 +301,7 @@ handle_checkout(serf_request_t *request, return err; /* Get the resulting location. */ - if (ctx->progress.done && ctx->progress.status == 201) + if (ctx->progress.done && handler->sline.code == 201) { serf_bucket_t *hdrs; apr_uri_t uri; @@ -309,7 +319,9 @@ handle_checkout(serf_request_t *request, if (status) err = svn_error_compose_create(svn_error_wrap_apr(status, NULL), err); - ctx->resource_url = svn_urlpath__canonicalize(uri.path, ctx->pool); + SVN_ERR_ASSERT(ctx->result_pool != NULL); + ctx->resource_url = svn_urlpath__canonicalize(uri.path, + ctx->result_pool); } return err; @@ -322,6 +334,7 @@ checkout_dir(dir_context_t *dir) svn_ra_serf__handler_t *handler; svn_error_t *err; dir_context_t *p_dir = dir; + const char *checkout_url; if (dir->checkout) { @@ -336,9 +349,6 @@ checkout_dir(dir_context_t *dir) { /* Implicitly checkout this dir now. */ dir->checkout = apr_pcalloc(dir->pool, sizeof(*dir->checkout)); - dir->checkout->pool = dir->pool; - dir->checkout->progress.pool = dir->pool; - dir->checkout->activity_url = dir->commit->activity_url; dir->checkout->resource_url = svn_path_url_add_component2(dir->parent_dir->checkout->resource_url, dir->name, dir->pool); @@ -350,26 +360,28 @@ checkout_dir(dir_context_t *dir) /* Checkout our directory into the activity URL now. */ handler = apr_pcalloc(dir->pool, sizeof(*handler)); + handler->handler_pool = dir->pool; handler->session = dir->commit->session; handler->conn = dir->commit->conn; checkout_ctx = apr_pcalloc(dir->pool, sizeof(*checkout_ctx)); - checkout_ctx->pool = dir->pool; + checkout_ctx->handler = handler; checkout_ctx->progress.pool = dir->pool; - + checkout_ctx->result_pool = dir->pool; checkout_ctx->activity_url = dir->commit->activity_url; /* We could be called twice for the root: once to checkout the baseline; * once to checkout the directory itself if we need to do so. + * Note: CHECKOUT_URL should live longer than HANDLER. */ if (!dir->parent_dir && !dir->commit->baseline) { - checkout_ctx->checkout_url = dir->commit->vcc_url; + checkout_url = dir->commit->vcc_url; dir->commit->baseline = checkout_ctx; } else { - checkout_ctx->checkout_url = dir->url; + checkout_url = dir->url; dir->checkout = checkout_ctx; } @@ -381,7 +393,7 @@ checkout_dir(dir_context_t *dir) handler->response_baton = checkout_ctx; handler->method = "CHECKOUT"; - handler->path = checkout_ctx->checkout_url; + handler->path = checkout_url; svn_ra_serf__request_create(handler); @@ -397,9 +409,11 @@ checkout_dir(dir_context_t *dir) return err; } - if (checkout_ctx->progress.status != 201) + if (handler->sline.code != 201) { - return return_response_err(handler, &checkout_ctx->progress); + return svn_error_trace(return_response_err( + handler, + checkout_ctx->progress.server_error.error)); } return SVN_NO_ERROR; @@ -512,6 +526,7 @@ checkout_file(file_context_t *file) svn_ra_serf__handler_t *handler; svn_error_t *err; dir_context_t *parent_dir = file->parent_dir; + const char *checkout_url; /* Is one of our parent dirs newly added? If so, we're already * implicitly checked out. @@ -522,9 +537,6 @@ checkout_file(file_context_t *file) { /* Implicitly checkout this file now. */ file->checkout = apr_pcalloc(file->pool, sizeof(*file->checkout)); - file->checkout->pool = file->pool; - file->checkout->progress.pool = file->pool; - file->checkout->activity_url = file->commit->activity_url; file->checkout->resource_url = svn_path_url_add_component2(parent_dir->checkout->resource_url, svn_relpath_skip_ancestor( @@ -537,19 +549,20 @@ checkout_file(file_context_t *file) /* Checkout our file into the activity URL now. */ handler = apr_pcalloc(file->pool, sizeof(*handler)); + handler->handler_pool = file->pool; handler->session = file->commit->session; handler->conn = file->commit->conn; file->checkout = apr_pcalloc(file->pool, sizeof(*file->checkout)); - file->checkout->pool = file->pool; + file->checkout->handler = handler; file->checkout->progress.pool = file->pool; - + file->checkout->result_pool = file->pool; file->checkout->activity_url = file->commit->activity_url; - SVN_ERR(get_version_url(&(file->checkout->checkout_url), + SVN_ERR(get_version_url(&checkout_url, file->commit->session, file->commit->conn, file->relpath, file->base_revision, - NULL, file->pool)); + NULL, handler->handler_pool)); handler->body_delegate = create_checkout_body; handler->body_delegate_baton = file->checkout; @@ -559,7 +572,7 @@ checkout_file(file_context_t *file) handler->response_baton = file->checkout; handler->method = "CHECKOUT"; - handler->path = file->checkout->checkout_url; + handler->path = checkout_url; svn_ra_serf__request_create(handler); @@ -578,9 +591,11 @@ checkout_file(file_context_t *file) return err; } - if (file->checkout->progress.status != 201) + if (handler->sline.code != 201) { - return return_response_err(handler, &file->checkout->progress); + return svn_error_trace(return_response_err( + handler, + file->checkout->progress.server_error.error)); } return SVN_NO_ERROR; @@ -920,6 +935,7 @@ proppatch_resource(proppatch_context_t * struct proppatch_body_baton_t pbb; handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "PROPPATCH"; handler->path = proppatch->path; handler->conn = commit->conn; @@ -934,20 +950,23 @@ proppatch_resource(proppatch_context_t * handler->body_delegate_baton = &pbb; handler->response_handler = svn_ra_serf__handle_multistatus_only; - handler->response_baton = &proppatch->progress; + handler->response_baton = handler; - svn_ra_serf__request_create(handler); + SVN_ERR(svn_ra_serf__context_run_one(handler, pool)); - /* If we don't wait for the response, our pool will be gone! */ - SVN_ERR(svn_ra_serf__context_run_wait(&proppatch->progress.done, - commit->session, pool)); - - if (proppatch->progress.status != 207 || - proppatch->progress.server_error.error) - { - return svn_error_create(SVN_ERR_RA_DAV_PROPPATCH_FAILED, - return_response_err(handler, &proppatch->progress), - _("At least one property change failed; repository is unchanged")); + if (handler->sline.code != 207 + || (handler->server_error != NULL + && handler->server_error->error != NULL)) + { + return svn_error_create( + SVN_ERR_RA_DAV_PROPPATCH_FAILED, + return_response_err(handler, + handler->server_error != NULL + ? handler->server_error->error + : SVN_NO_ERROR + ), + _("At least one property change failed; repository" + " is unchanged")); } return SVN_NO_ERROR; @@ -1092,10 +1111,7 @@ setup_copy_dir_headers(serf_bucket_t *he /* Implicitly checkout this dir now. */ dir->checkout = apr_pcalloc(dir->pool, sizeof(*dir->checkout)); - dir->checkout->pool = dir->pool; - dir->checkout->progress.pool = dir->pool; - dir->checkout->activity_url = dir->commit->activity_url; - dir->checkout->resource_url = apr_pstrdup(dir->checkout->pool, uri.path); + dir->checkout->resource_url = apr_pstrdup(dir->pool, uri.path); return SVN_NO_ERROR; } @@ -1295,6 +1311,7 @@ open_root(void *edit_baton, /* Create our activity URL now on the server. */ handler = apr_pcalloc(ctx->pool, sizeof(*handler)); + handler->handler_pool = ctx->pool; handler->method = "POST"; handler->body_type = SVN_SKEL_MIME_TYPE; handler->body_delegate = create_txn_post_body; @@ -1320,10 +1337,11 @@ open_root(void *edit_baton, SVN_ERR(svn_ra_serf__context_run_wait(&post_ctx->done, ctx->session, ctx->pool)); - if (post_ctx->status != 201) + if (handler->sline.code != 201) { apr_status_t status = SVN_ERR_RA_DAV_REQUEST_FAILED; - switch(post_ctx->status) + + switch (handler->sline.code) { case 403: status = SVN_ERR_RA_DAV_FORBIDDEN; @@ -1336,7 +1354,7 @@ open_root(void *edit_baton, return svn_error_createf(status, NULL, _("%s of '%s': %d %s (%s://%s)"), handler->method, handler->path, - post_ctx->status, post_ctx->reason, + handler->sline.code, handler->sline.reason, ctx->session->session_url.scheme, ctx->session->session_url.hostinfo); } @@ -1394,6 +1412,7 @@ open_root(void *edit_baton, /* Create our activity URL now on the server. */ handler = apr_pcalloc(ctx->pool, sizeof(*handler)); + handler->handler_pool = ctx->pool; handler->method = "MKACTIVITY"; handler->path = ctx->activity_url; handler->conn = ctx->session->conns[0]; @@ -1410,10 +1429,11 @@ open_root(void *edit_baton, SVN_ERR(svn_ra_serf__context_run_wait(&mkact_ctx->done, ctx->session, ctx->pool)); - if (mkact_ctx->status != 201) + if (handler->sline.code != 201) { apr_status_t status = SVN_ERR_RA_DAV_REQUEST_FAILED; - switch(mkact_ctx->status) + + switch (handler->sline.code) { case 403: status = SVN_ERR_RA_DAV_FORBIDDEN; @@ -1426,7 +1446,7 @@ open_root(void *edit_baton, return svn_error_createf(status, NULL, _("%s of '%s': %d %s (%s://%s)"), handler->method, handler->path, - mkact_ctx->status, mkact_ctx->reason, + handler->sline.code, handler->sline.reason, ctx->session->session_url.scheme, ctx->session->session_url.hostinfo); } @@ -1539,6 +1559,7 @@ delete_entry(const char *path, delete_ctx->keep_locks = dir->commit->keep_locks; handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->session = dir->commit->session; handler->conn = dir->commit->conn; @@ -1585,9 +1606,11 @@ delete_entry(const char *path, } /* 204 No Content: item successfully deleted */ - if (delete_ctx->progress.status != 204) + if (handler->sline.code != 204) { - return return_response_err(handler, &delete_ctx->progress); + return svn_error_trace(return_response_err( + handler, + delete_ctx->progress.server_error.error)); } apr_hash_set(dir->commit->deleted_entries, @@ -1645,6 +1668,7 @@ add_directory(const char *path, } handler = apr_pcalloc(dir->pool, sizeof(*handler)); + handler->handler_pool = dir->pool; handler->conn = dir->commit->conn; handler->session = dir->commit->session; @@ -1691,7 +1715,7 @@ add_directory(const char *path, SVN_ERR(svn_ra_serf__context_run_wait(&add_dir_ctx->done, dir->commit->session, dir->pool)); - switch (add_dir_ctx->status) + switch (handler->sline.code) { case 201: /* Created: item was successfully copied */ case 204: /* No Content: item successfully replaced an existing target */ @@ -1708,7 +1732,7 @@ add_directory(const char *path, _("Adding directory failed: %s on %s " "(%d %s)"), handler->method, handler->path, - add_dir_ctx->status, add_dir_ctx->reason); + handler->sline.code, handler->sline.reason); } *child_baton = dir; @@ -1913,6 +1937,7 @@ add_file(const char *path, head_ctx->pool = new_file->pool; handler = apr_pcalloc(new_file->pool, sizeof(*handler)); + handler->handler_pool = new_file->pool; handler->session = new_file->commit->session; handler->conn = new_file->commit->conn; handler->method = "HEAD"; @@ -1927,7 +1952,7 @@ add_file(const char *path, new_file->commit->session, new_file->pool)); - if (head_ctx->status != 404) + if (handler->sline.code != 404) { return svn_error_createf(SVN_ERR_RA_DAV_ALREADY_EXISTS, NULL, _("File '%s' already exists"), path); @@ -2090,6 +2115,7 @@ close_file(void *file_baton, req_url = svn_path_url_add_component2(basecoll_url, rel_copy_path, pool); handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "COPY"; handler->path = req_url; handler->conn = ctx->commit->conn; @@ -2109,9 +2135,11 @@ close_file(void *file_baton, SVN_ERR(svn_ra_serf__context_run_wait(©_ctx->done, ctx->commit->session, pool)); - if (copy_ctx->status != 201 && copy_ctx->status != 204) + if (handler->sline.code != 201 && handler->sline.code != 204) { - return return_response_err(handler, copy_ctx); + return svn_error_trace(return_response_err( + handler, + copy_ctx->server_error.error)); } } @@ -2128,6 +2156,7 @@ close_file(void *file_baton, svn_ra_serf__simple_request_context_t *put_ctx; handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "PUT"; handler->path = ctx->url; handler->conn = ctx->commit->conn; @@ -2160,9 +2189,11 @@ close_file(void *file_baton, SVN_ERR(svn_ra_serf__context_run_wait(&put_ctx->done, ctx->commit->session, pool)); - if (put_ctx->status != 204 && put_ctx->status != 201) + if (handler->sline.code != 204 && handler->sline.code != 201) { - return return_response_err(handler, put_ctx); + return svn_error_trace(return_response_err( + handler, + put_ctx->server_error.error)); } } @@ -2232,6 +2263,7 @@ close_edit(void *edit_baton, if (ctx->activity_url) { handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "DELETE"; handler->path = ctx->activity_url; handler->conn = ctx->conn; @@ -2248,7 +2280,7 @@ close_edit(void *edit_baton, SVN_ERR(svn_ra_serf__context_run_wait(&delete_ctx->done, ctx->session, pool)); - SVN_ERR_ASSERT(delete_ctx->status == 204); + SVN_ERR_ASSERT(handler->sline.code == 204); } return SVN_NO_ERROR; @@ -2273,6 +2305,7 @@ abort_edit(void *edit_baton, /* DELETE our aborted activity */ handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "DELETE"; handler->conn = ctx->session->conns[0]; handler->session = ctx->session; @@ -2296,9 +2329,9 @@ abort_edit(void *edit_baton, /* 204 if deleted, 403 if DELETE was forbidden (indicates MKACTIVITY was forbidden too), 404 if the activity wasn't found. */ - if (delete_ctx->status != 204 && - delete_ctx->status != 403 && - delete_ctx->status != 404 + if (handler->sline.code != 204 + && handler->sline.code != 403 + && handler->sline.code != 404 ) { SVN_ERR_MALFUNCTION(); Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/get_deleted_rev.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/get_deleted_rev.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/get_deleted_rev.c Mon May 7 18:24:22 2012 @@ -188,7 +188,6 @@ svn_ra_serf__get_deleted_rev(svn_ra_sess svn_ra_serf__handler_t *handler; svn_ra_serf__xml_parser_t *parser_ctx; const char *relative_url, *basecoll_url, *req_url; - int status_code = 0; svn_error_t *err; drev_ctx = apr_pcalloc(pool, sizeof(*drev_ctx)); @@ -212,9 +211,9 @@ svn_ra_serf__get_deleted_rev(svn_ra_sess parser_ctx->end = end_getdrev; parser_ctx->cdata = cdata_getdrev; parser_ctx->done = &drev_ctx->done; - parser_ctx->status_code = &status_code; handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_type = "text/xml"; @@ -231,9 +230,10 @@ svn_ra_serf__get_deleted_rev(svn_ra_sess /* Map status 501: Method Not Implemented to our not implemented error. 1.5.x servers and older don't support this report. */ - if (status_code == 501) + if (handler->sline.code == 501) return svn_error_createf(SVN_ERR_RA_NOT_IMPLEMENTED, err, - _("'%s' REPORT not implemented"), "get-deleted-rev"); + _("'%s' REPORT not implemented"), + "get-deleted-rev"); SVN_ERR(err); return SVN_NO_ERROR; } Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/getdate.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/getdate.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/getdate.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/getdate.c Mon May 7 18:24:22 2012 @@ -171,7 +171,6 @@ svn_ra_serf__get_dated_revision(svn_ra_s svn_ra_serf__handler_t *handler; svn_ra_serf__xml_parser_t *parser_ctx; const char *report_target; - int status_code; date_ctx = apr_palloc(pool, sizeof(*date_ctx)); date_ctx->time = tm; @@ -182,6 +181,7 @@ svn_ra_serf__get_dated_revision(svn_ra_s handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = report_target; handler->body_type = "text/xml"; @@ -196,7 +196,6 @@ svn_ra_serf__get_dated_revision(svn_ra_s parser_ctx->end = end_getdate; parser_ctx->cdata = cdata_getdate; parser_ctx->done = &date_ctx->done; - parser_ctx->status_code = &status_code; handler->body_delegate = create_getdate_body; handler->body_delegate_baton = date_ctx; @@ -208,5 +207,7 @@ svn_ra_serf__get_dated_revision(svn_ra_s *date_ctx->revision = SVN_INVALID_REVNUM; + /* ### use svn_ra_serf__error_on_status() ? */ + return svn_ra_serf__context_run_wait(&date_ctx->done, session, pool); } Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocations.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocations.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocations.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocations.c Mon May 7 18:24:22 2012 @@ -70,8 +70,6 @@ typedef struct loc_context_t { loc_state_list_t *state; loc_state_list_t *free_state; - int status_code; - svn_boolean_t done; } loc_context_t; @@ -250,6 +248,7 @@ svn_ra_serf__get_locations(svn_ra_sessio handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_delegate = create_get_locations_body; @@ -264,7 +263,6 @@ svn_ra_serf__get_locations(svn_ra_sessio parser_ctx->user_data = loc_ctx; parser_ctx->start = start_getloc; parser_ctx->end = end_getloc; - parser_ctx->status_code = &loc_ctx->status_code; parser_ctx->done = &loc_ctx->done; handler->response_handler = svn_ra_serf__handle_xml_parser; @@ -275,9 +273,9 @@ svn_ra_serf__get_locations(svn_ra_sessio err = svn_ra_serf__context_run_wait(&loc_ctx->done, session, pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(loc_ctx->status_code, + svn_ra_serf__error_on_status(handler->sline.code, req_url, - parser_ctx->location), + handler->location), err)); return SVN_NO_ERROR; Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocationsegments.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocationsegments.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocationsegments.c Mon May 7 18:24:22 2012 @@ -56,8 +56,6 @@ typedef struct gls_context_t { /* True iff we're looking at a child of the outer report tag */ svn_boolean_t inside_report; - int status_code; - svn_boolean_t done; } gls_context_t; @@ -204,6 +202,7 @@ svn_ra_serf__get_location_segments(svn_r handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_delegate = create_gls_body; @@ -218,7 +217,6 @@ svn_ra_serf__get_location_segments(svn_r parser_ctx->user_data = gls_ctx; parser_ctx->start = start_gls; parser_ctx->end = end_gls; - parser_ctx->status_code = &gls_ctx->status_code; parser_ctx->done = &gls_ctx->done; handler->response_handler = svn_ra_serf__handle_xml_parser; @@ -234,10 +232,10 @@ svn_ra_serf__get_location_segments(svn_r path, peg_revision); err = svn_error_compose_create( - svn_ra_serf__error_on_status(gls_ctx->status_code, + svn_ra_serf__error_on_status(handler->sline.code, handler->path, - parser_ctx->location), - err);; + handler->location), + err); svn_pool_destroy(gls_ctx->subpool); Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocks.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocks.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocks.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/getlocks.c Mon May 7 18:24:22 2012 @@ -326,7 +326,6 @@ svn_ra_serf__get_locks(svn_ra_session_t svn_ra_serf__handler_t *handler; svn_ra_serf__xml_parser_t *parser_ctx; const char *req_url, *rel_path; - int status_code; req_url = svn_path_url_add_component2(session->session_url.path, path, pool); SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session, @@ -341,6 +340,7 @@ svn_ra_serf__get_locks(svn_ra_session_t handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_type = "text/xml"; @@ -355,7 +355,6 @@ svn_ra_serf__get_locks(svn_ra_session_t parser_ctx->end = end_getlocks; parser_ctx->cdata = cdata_getlocks; parser_ctx->done = &lock_ctx->done; - parser_ctx->status_code = &status_code; handler->body_delegate = create_getlocks_body; handler->body_delegate_baton = lock_ctx; @@ -365,6 +364,8 @@ svn_ra_serf__get_locks(svn_ra_session_t svn_ra_serf__request_create(handler); + /* ### use svn_ra_serf__error_on_status() ? */ + SVN_ERR(svn_ra_serf__context_run_wait(&lock_ctx->done, session, pool)); *locks = lock_ctx->hash; Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c Mon May 7 18:24:22 2012 @@ -70,9 +70,7 @@ typedef struct lock_info_t { svn_boolean_t read_headers; - /* Our HTTP status code and reason. */ - int status_code; - const char *reason; + svn_ra_serf__handler_t *handler; /* are we done? */ svn_boolean_t done; @@ -349,20 +347,8 @@ handle_lock(serf_request_t *request, serf_bucket_t *headers; const char *val; - serf_status_line sl; - apr_status_t status; - - status = serf_bucket_response_status(response, &sl); - if (SERF_BUCKET_READ_ERROR(status)) - { - return svn_error_wrap_apr(status, NULL); - } - - ctx->status_code = sl.code; - ctx->reason = sl.reason; - /* 423 == Locked */ - if (sl.code == 423) + if (ctx->handler->sline.code == 423) { /* Older servers may not give a descriptive error, so we'll make one of our own if we can't find one in the response. */ @@ -372,7 +358,8 @@ handle_lock(serf_request_t *request, err = svn_error_createf(SVN_ERR_FS_PATH_ALREADY_LOCKED, NULL, _("Lock request failed: %d %s"), - ctx->status_code, ctx->reason); + ctx->handler->sline.code, + ctx->handler->sline.reason); } return err; } @@ -396,7 +383,7 @@ handle_lock(serf_request_t *request, } /* Forbidden when a lock doesn't exist. */ - if (ctx->status_code == 403) + if (ctx->handler->sline.code == 403) { /* If we get an "unexpected EOF" error, we'll wrap it with generic request failure error. */ @@ -407,7 +394,8 @@ handle_lock(serf_request_t *request, err = svn_error_createf(SVN_ERR_RA_DAV_FORBIDDEN, err, _("Lock request failed: %d %s"), - ctx->status_code, ctx->reason); + ctx->handler->sline.code, + ctx->handler->sline.reason); } return err; } @@ -499,7 +487,6 @@ svn_ra_serf__get_lock(svn_ra_session_t * lock_info_t *lock_ctx; const char *req_url; svn_error_t *err; - int status_code; req_url = svn_path_url_add_component2(session->session_url.path, path, pool); @@ -512,6 +499,7 @@ svn_ra_serf__get_lock(svn_ra_session_t * handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "PROPFIND"; handler->path = req_url; handler->body_type = "text/xml"; @@ -526,7 +514,6 @@ svn_ra_serf__get_lock(svn_ra_session_t * parser_ctx->end = end_lock; parser_ctx->cdata = cdata_lock; parser_ctx->done = &lock_ctx->done; - parser_ctx->status_code = &status_code; handler->body_delegate = create_getlock_body; handler->body_delegate_baton = lock_ctx; @@ -537,10 +524,12 @@ svn_ra_serf__get_lock(svn_ra_session_t * handler->response_handler = handle_lock; handler->response_baton = parser_ctx; + lock_ctx->handler = handler; + svn_ra_serf__request_create(handler); err = svn_ra_serf__context_run_wait(&lock_ctx->done, session, pool); - if (status_code == 404) + if (handler->sline.code == 404) { return svn_error_create(SVN_ERR_RA_ILLEGAL_URL, err, _("Malformed URL for repository")); @@ -573,7 +562,10 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s iterpool = svn_pool_create(scratch_pool); /* ### TODO for issue 2263: Send all the locks over the wire at once. This - loop is just a temporary shim. */ + ### loop is just a temporary shim. + ### an alternative, which is backwards-compat with all servers is to + ### pipeline these requests. ie. stop using run_wait/run_one. */ + for (hi = apr_hash_first(scratch_pool, path_revs); hi; hi = apr_hash_next(hi)) @@ -602,6 +594,7 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s handler = apr_pcalloc(iterpool, sizeof(*handler)); + handler->handler_pool = iterpool; handler->method = "LOCK"; handler->path = req_url; handler->body_type = "text/xml"; @@ -626,6 +619,8 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s handler->response_handler = handle_lock; handler->response_baton = parser_ctx; + lock_ctx->handler = handler; + svn_ra_serf__request_create(handler); err = svn_ra_serf__context_run_wait(&lock_ctx->done, session, iterpool); @@ -739,6 +734,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra handler = apr_pcalloc(iterpool, sizeof(*handler)); + handler->handler_pool = iterpool; handler->method = "UNLOCK"; handler->path = req_url; handler->conn = session->conns[0]; @@ -753,7 +749,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra svn_ra_serf__request_create(handler); SVN_ERR(svn_ra_serf__context_run_wait(&ctx->done, session, iterpool)); - switch (ctx->status) + switch (handler->sline.code) { case 204: break; /* OK */ @@ -761,12 +757,14 @@ svn_ra_serf__unlock(svn_ra_session_t *ra /* Api users expect this specific error code to detect failures */ err = svn_error_createf(SVN_ERR_FS_LOCK_OWNER_MISMATCH, NULL, _("Unlock request failed: %d %s"), - ctx->status, ctx->reason); + handler->sline.code, + handler->sline.reason); break; default: err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL, _("Unlock request failed: %d %s"), - ctx->status, ctx->reason); + handler->sline.code, + handler->sline.reason); } if (lock_func) Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/log.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/log.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/log.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/log.c Mon May 7 18:24:22 2012 @@ -102,7 +102,6 @@ typedef struct log_context_t { /* are we done? */ svn_boolean_t done; - int status_code; /* log receiver function and baton */ svn_log_entry_receiver_t receiver; @@ -702,6 +701,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = req_url; handler->body_delegate = create_log_body; @@ -718,7 +718,6 @@ svn_ra_serf__get_log(svn_ra_session_t *r parser_ctx->end = end_log; parser_ctx->cdata = cdata_log; parser_ctx->done = &log_ctx->done; - parser_ctx->status_code = &log_ctx->status_code; handler->response_handler = svn_ra_serf__handle_xml_parser; handler->response_baton = parser_ctx; @@ -728,9 +727,9 @@ svn_ra_serf__get_log(svn_ra_session_t *r err = svn_ra_serf__context_run_wait(&log_ctx->done, session, pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(log_ctx->status_code, + svn_ra_serf__error_on_status(handler->sline.code, req_url, - parser_ctx->location), + handler->location), err)); return SVN_NO_ERROR; Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/merge.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/merge.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/merge.c Mon May 7 18:24:22 2012 @@ -90,6 +90,7 @@ struct svn_ra_serf__merge_context_t apr_pool_t *pool; svn_ra_serf__session_t *session; + svn_ra_serf__handler_t *handler; apr_hash_t *lock_tokens; svn_boolean_t keep_locks; @@ -97,8 +98,6 @@ struct svn_ra_serf__merge_context_t const char *merge_resource_url; /* URL of resource to be merged. */ const char *merge_url; /* URL at which the MERGE request is aimed. */ - int status; - svn_boolean_t done; svn_commit_info_t *commit_info; @@ -535,6 +534,7 @@ svn_ra_serf__merge_create_req(svn_ra_ser handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "MERGE"; handler->path = merge_ctx->merge_url; handler->body_delegate = create_merge_body; @@ -550,7 +550,6 @@ svn_ra_serf__merge_create_req(svn_ra_ser parser_ctx->end = end_merge; parser_ctx->cdata = cdata_merge; parser_ctx->done = &merge_ctx->done; - parser_ctx->status_code = &merge_ctx->status; handler->header_delegate = setup_merge_headers; handler->header_delegate_baton = merge_ctx; @@ -558,6 +557,8 @@ svn_ra_serf__merge_create_req(svn_ra_ser handler->response_handler = svn_ra_serf__handle_xml_parser; handler->response_baton = parser_ctx; + merge_ctx->handler = handler; + svn_ra_serf__request_create(handler); *ret_ctx = merge_ctx; @@ -580,5 +581,5 @@ svn_ra_serf__merge_get_commit_info(svn_r int svn_ra_serf__merge_get_status(svn_ra_serf__merge_context_t *ctx) { - return ctx->status; + return ctx->handler->sline.code; } Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/mergeinfo.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/mergeinfo.c?rev=1335173&r1=1335172&r2=1335173&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_ra_serf/mergeinfo.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/mergeinfo.c Mon May 7 18:24:22 2012 @@ -241,8 +241,6 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio apr_pool_t *pool) { svn_error_t *err, *err2; - int status_code; - mergeinfo_context_t *mergeinfo_ctx; svn_ra_serf__session_t *session = ra_session->priv; svn_ra_serf__handler_t *handler; @@ -270,6 +268,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio handler = apr_pcalloc(pool, sizeof(*handler)); + handler->handler_pool = pool; handler->method = "REPORT"; handler->path = path; handler->conn = session->conns[0]; @@ -286,7 +285,6 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio parser_ctx->end = end_element; parser_ctx->cdata = cdata_handler; parser_ctx->done = &mergeinfo_ctx->done; - parser_ctx->status_code = &status_code; handler->response_handler = svn_ra_serf__handle_xml_parser; handler->response_baton = parser_ctx; @@ -295,8 +293,8 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio err = svn_ra_serf__context_run_wait(&mergeinfo_ctx->done, session, pool); - err2 = svn_ra_serf__error_on_status(status_code, handler->path, - parser_ctx->location); + err2 = svn_ra_serf__error_on_status(handler->sline.code, handler->path, + handler->location); if (err2) { svn_error_clear(err);