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 87BF7ED42 for ; Sun, 23 Dec 2012 05:43:06 +0000 (UTC) Received: (qmail 83425 invoked by uid 500); 23 Dec 2012 05:43:06 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 83373 invoked by uid 500); 23 Dec 2012 05:43:05 -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 83366 invoked by uid 99); 23 Dec 2012 05:43:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Dec 2012 05:43:05 +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; Sun, 23 Dec 2012 05:42:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B0DC92388962; Sun, 23 Dec 2012 05:42:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1425411 [1/2] - in /subversion/branches/javahl-ra: ./ build/generator/ notes/wc-ng/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_ra_serf/ subversion/libsvn_... Date: Sun, 23 Dec 2012 05:42:31 -0000 To: commits@subversion.apache.org From: vmpn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121223054233.B0DC92388962@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vmpn Date: Sun Dec 23 05:42:30 2012 New Revision: 1425411 URL: http://svn.apache.org/viewvc?rev=1425411&view=rev Log: On the javahl-ra branch: Bring up-to-date with trunk@1354625 Modified: subversion/branches/javahl-ra/ (props changed) subversion/branches/javahl-ra/CHANGES subversion/branches/javahl-ra/build/generator/gen_win.py subversion/branches/javahl-ra/notes/wc-ng/conflict-storage-2.0 subversion/branches/javahl-ra/subversion/bindings/swig/ruby/test/test_client.rb subversion/branches/javahl-ra/subversion/include/private/svn_client_private.h subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h subversion/branches/javahl-ra/subversion/include/svn_client.h subversion/branches/javahl-ra/subversion/include/svn_ra.h subversion/branches/javahl-ra/subversion/include/svn_repos.h subversion/branches/javahl-ra/subversion/include/svn_wc.h subversion/branches/javahl-ra/subversion/libsvn_client/checkout.c subversion/branches/javahl-ra/subversion/libsvn_client/client.h subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c subversion/branches/javahl-ra/subversion/libsvn_client/externals.c subversion/branches/javahl-ra/subversion/libsvn_client/merge.c subversion/branches/javahl-ra/subversion/libsvn_client/mergeinfo.c subversion/branches/javahl-ra/subversion/libsvn_client/ra.c subversion/branches/javahl-ra/subversion/libsvn_client/switch.c subversion/branches/javahl-ra/subversion/libsvn_client/update.c subversion/branches/javahl-ra/subversion/libsvn_client/util.c subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c subversion/branches/javahl-ra/subversion/libsvn_wc/props.c subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c subversion/branches/javahl-ra/subversion/libsvn_wc/util.c subversion/branches/javahl-ra/subversion/libsvn_wc/wc-metadata.sql subversion/branches/javahl-ra/subversion/svn/main.c subversion/branches/javahl-ra/subversion/svn/mergeinfo-cmd.c subversion/branches/javahl-ra/subversion/svndumpfilter/main.c subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests_data/simple_v3.dump subversion/branches/javahl-ra/subversion/tests/libsvn_wc/wc-queries-test.c Propchange: subversion/branches/javahl-ra/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1352412-1354625 Modified: subversion/branches/javahl-ra/CHANGES URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/CHANGES?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/CHANGES (original) +++ subversion/branches/javahl-ra/CHANGES Sun Dec 23 05:42:30 2012 @@ -24,6 +24,7 @@ http://svn.apache.org/repos/asf/subversi * new SvnPubSub distributed commit hooks (tools/server-side/svnpubsub) * 'svn diff' can compare arbitrary files and directories (r1310291, et al) * ra_serf avoids re-downloading content present in pristine store (r1333936) + * 'svn mergeinfo' now honors the --revision (-r) option (issue #4199) - Client-side bugfixes: * Modified: subversion/branches/javahl-ra/build/generator/gen_win.py URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/build/generator/gen_win.py?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/build/generator/gen_win.py (original) +++ subversion/branches/javahl-ra/build/generator/gen_win.py Sun Dec 23 05:42:30 2012 @@ -388,6 +388,16 @@ class WinGeneratorBase(GeneratorBase): or isinstance(x, gen_base.TargetSWIGLib) or isinstance(x, gen_base.TargetSWIGProject))] + # Drop the Java targets if we don't have a JDK + if not self.jdk_path: + install_targets = [x for x in install_targets + if not (isinstance(x, gen_base.TargetJava) + or isinstance(x, gen_base.TargetJavaHeaders) + or isinstance(x, gen_base.TargetSWIGProject) + or x.name == '__JAVAHL__' + or x.name == '__JAVAHL_TESTS__' + or x.name == 'libsvnjavahl')] + dll_targets = [] for target in install_targets: if isinstance(target, gen_base.TargetLib): Modified: subversion/branches/javahl-ra/notes/wc-ng/conflict-storage-2.0 URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/notes/wc-ng/conflict-storage-2.0?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/notes/wc-ng/conflict-storage-2.0 (original) +++ subversion/branches/javahl-ra/notes/wc-ng/conflict-storage-2.0 Sun Dec 23 05:42:30 2012 @@ -67,9 +67,15 @@ Where 'WHY' would tell why the conflict WHY = (OPERATION (PATH_REV*) ...) OPERATION = "update" | "switch" | "merge" | ... -PATH_REV = ("subversion" repos_id repos_relpath revision kind ...) | () | ... +PATH_REV = ("subversion" repos_root_url repos_uuid repos_relpath revision kind + ...) | () | ... -repos_id, repos_relpath, revision and kind are defined as in wc-metadata.sql. +repos_root_url, repos_uuid, repos_relpath, revision and kind are defined as in +wc-metadata.sql or more general through libsvn_wc. We could have used a +repos_id at a performance cost, but since we don't update the url for an +existing repos_id on relocate it doesn't help us in keeping the database +stable over relocates anyway. The skel format would allow switching to +this format in a future version if we want to keep the conflicts valid. "update" and "switch" will have 1 PATH_REV item, containing the original BASE path from before the update/switch. The new location is already available in @@ -169,4 +175,4 @@ The current svn info behavior can be reu where it applies to the WHY parts. It would be nice if some other --accept values would be accepted, but that -is outside the scope of this design. \ No newline at end of file +is outside the scope of this design. Modified: subversion/branches/javahl-ra/subversion/bindings/swig/ruby/test/test_client.rb URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/ruby/test/test_client.rb?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/bindings/swig/ruby/test/test_client.rb (original) +++ subversion/branches/javahl-ra/subversion/bindings/swig/ruby/test/test_client.rb Sun Dec 23 05:42:30 2012 @@ -1992,6 +1992,8 @@ class SvnClientTest < Test::Unit::TestCa [path, Svn::Wc::NOTIFY_UPDATE_UPDATE], [@wc_path, Svn::Wc::NOTIFY_UPDATE_UPDATE], [@wc_path, Svn::Wc::NOTIFY_UPDATE_COMPLETED], + [@wc_path, Svn::Wc::NOTIFY_CONFLICT_RESOLVER_STARTING], + [@wc_path, Svn::Wc::NOTIFY_CONFLICT_RESOLVER_DONE], ], notify_info) @@ -2002,6 +2004,8 @@ class SvnClientTest < Test::Unit::TestCa [path, Svn::Wc::NOTIFY_UPDATE_UPDATE], [@wc_path, Svn::Wc::NOTIFY_UPDATE_UPDATE], [@wc_path, Svn::Wc::NOTIFY_UPDATE_COMPLETED], + [@wc_path, Svn::Wc::NOTIFY_CONFLICT_RESOLVER_STARTING], + [@wc_path, Svn::Wc::NOTIFY_CONFLICT_RESOLVER_DONE], ], notify_info) end Modified: subversion/branches/javahl-ra/subversion/include/private/svn_client_private.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/private/svn_client_private.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/private/svn_client_private.h (original) +++ subversion/branches/javahl-ra/subversion/include/private/svn_client_private.h Sun Dec 23 05:42:30 2012 @@ -159,7 +159,7 @@ svn_client__youngest_common_ancestor(con svn_error_t * svn_client__wc_node_get_base(svn_client__pathrev_t **base_p, const char *wc_abspath, - svn_client_ctx_t *ctx, + svn_wc_context_t *wc_ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool); Modified: subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h (original) +++ subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h Sun Dec 23 05:42:30 2012 @@ -1085,15 +1085,15 @@ svn_wc__node_get_md5_from_sha1(const svn apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* Like svn_wc_get_pristine_contents2(), but keyed on the - SHA1_CHECKSUM rather than on the local absolute path of the working - file. WRI_ABSPATH is any versioned path of the working copy in - whose pristine database we'll be looking for these contents. */ +/* Like svn_wc_get_pristine_contents2(), but keyed on the CHECKSUM + rather than on the local absolute path of the working file. + WRI_ABSPATH is any versioned path of the working copy in whose + pristine database we'll be looking for these contents. */ svn_error_t * svn_wc__get_pristine_contents_by_checksum(svn_stream_t **contents, svn_wc_context_t *wc_ctx, const char *wri_abspath, - const svn_checksum_t *sha1_checksum, + const svn_checksum_t *checksum, apr_pool_t *result_pool, apr_pool_t *scratch_pool); Modified: subversion/branches/javahl-ra/subversion/include/svn_client.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/svn_client.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/svn_client.h (original) +++ subversion/branches/javahl-ra/subversion/include/svn_client.h Sun Dec 23 05:42:30 2012 @@ -3730,8 +3730,32 @@ svn_client_mergeinfo_get_merged(apr_hash * If the server doesn't support retrieval of mergeinfo, return an * #SVN_ERR_UNSUPPORTED_FEATURE error. * + * @since New in 1.8. + */ +svn_error_t * +svn_client_mergeinfo_log2(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t receiver, + void *receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool); + +/** + * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision + * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; + * + * @deprecated Provided for backwards compatibility with the 1.7 API. * @since New in 1.7. */ +SVN_DEPRECATED svn_error_t * svn_client_mergeinfo_log(svn_boolean_t finding_merged, const char *target_path_or_url, Modified: subversion/branches/javahl-ra/subversion/include/svn_ra.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/svn_ra.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/svn_ra.h (original) +++ subversion/branches/javahl-ra/subversion/include/svn_ra.h Sun Dec 23 05:42:30 2012 @@ -121,16 +121,16 @@ typedef svn_error_t *(*svn_ra_invalidate apr_pool_t *pool); /** This is a function type which allows the RA layer to fetch the - * cached pristine file contents whose SHA1 checksum is @a - * sha1_checksum, if any. @a *contents will be a read stream - * containing those contents if they are found; NULL otherwise. + * cached pristine file contents whose checksum is @a checksum, if + * any. @a *contents will be a read stream containing those contents + * if they are found; NULL otherwise. * * @since New in 1.8. */ typedef svn_error_t * (*svn_ra_get_wc_contents_func_t)(void *baton, svn_stream_t **contents, - const svn_checksum_t *sha1_checksum, + const svn_checksum_t *checksum, apr_pool_t *pool); Modified: subversion/branches/javahl-ra/subversion/include/svn_repos.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/svn_repos.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/svn_repos.h (original) +++ subversion/branches/javahl-ra/subversion/include/svn_repos.h Sun Dec 23 05:42:30 2012 @@ -2404,6 +2404,7 @@ svn_repos_node_from_baton(void *edit_bat /* The RFC822-style headers in our dumpfile format. */ #define SVN_REPOS_DUMPFILE_MAGIC_HEADER "SVN-fs-dump-format-version" #define SVN_REPOS_DUMPFILE_FORMAT_VERSION 3 +#define SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS 3 #define SVN_REPOS_DUMPFILE_UUID "UUID" #define SVN_REPOS_DUMPFILE_CONTENT_LENGTH "Content-length" Modified: subversion/branches/javahl-ra/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/svn_wc.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/include/svn_wc.h (original) +++ subversion/branches/javahl-ra/subversion/include/svn_wc.h Sun Dec 23 05:42:30 2012 @@ -1649,14 +1649,17 @@ typedef struct svn_wc_conflict_version_t svn_revnum_t peg_rev; /** path within repos; must not start with '/' */ + /* ### should have been called repos_relpath, but we can't change this. */ const char *path_in_repos; - /* @todo We may decide to add the repository UUID, to handle conflicts - * properly during a repository move. */ /** @} */ /** Info about this node */ svn_node_kind_t node_kind; /* note that 'none' is a legitimate value */ + /** UUID of the repository + * @since New in 1.8. */ + const char *repos_uuid; + /* @todo Add metadata about a local copy of the node, if and when * we store one. */ @@ -1673,8 +1676,23 @@ typedef struct svn_wc_conflict_version_t * @a peg_rev and the the @c node_kind to @c node_kind. Make only shallow * copies of the pointer arguments. * + * @since New in 1.8. + */ +svn_wc_conflict_version_t * +svn_wc_conflict_version_create2(const char *repos_root_url, + const char *repos_uuid, + const char *repos_relpath, + svn_revnum_t revision, + svn_node_kind_t kind, + apr_pool_t *result_pool); + +/** Similar to svn_wc_conflict_version_create2(), but doesn't set all + * required values. + * * @since New in 1.6. + * @deprecated Provided for backward compatibility with the 1.7 API. */ +SVN_DEPRECATED svn_wc_conflict_version_t * svn_wc_conflict_version_create(const char *repos_url, const char *path_in_repos, Modified: subversion/branches/javahl-ra/subversion/libsvn_client/checkout.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/checkout.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/checkout.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/checkout.c Sun Dec 23 05:42:30 2012 @@ -168,7 +168,10 @@ svn_client__checkout_internal(svn_revnum allow_unver_obstructions, TRUE /* adds_as_modification */, FALSE, FALSE, - use_sleep, ctx, pool); + use_sleep, ctx, + ctx->conflict_func2, + ctx->conflict_baton2, + pool); } if (err) Modified: subversion/branches/javahl-ra/subversion/libsvn_client/client.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/client.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/client.h (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/client.h Sun Dec 23 05:42:30 2012 @@ -461,6 +461,10 @@ svn_client__make_local_parents(const cha target which are missing from the working copy. NOTE: You may not specify both INNERUPDATE and MAKE_PARENTS as true. + + Use CONFLICT_FUNC2 and CONFLICT_BATON2 instead of CTX->CONFLICT_FUNC2 + and CTX->CONFLICT_BATON2. If CONFLICT_FUNC2 is NULL, postpone all conflicts + allowing the caller to perform post-update conflict resolution. */ svn_error_t * svn_client__update_internal(svn_revnum_t *result_rev, @@ -475,6 +479,8 @@ svn_client__update_internal(svn_revnum_t svn_boolean_t innerupdate, svn_boolean_t *timestamp_sleep, svn_client_ctx_t *ctx, + svn_wc_conflict_resolver_func2_t conflict_func2, + void *conflict_baton2, apr_pool_t *pool); /* Checkout into LOCAL_ABSPATH a working copy of URL at REVISION, and (if not Modified: subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c Sun Dec 23 05:42:30 2012 @@ -2565,6 +2565,34 @@ svn_client_url_from_path(const char **ur /*** From mergeinfo.c ***/ svn_error_t * +svn_client_mergeinfo_log(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + svn_log_entry_receiver_t receiver, + void *receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) +{ + svn_opt_revision_t start_revision, end_revision; + + start_revision.kind = svn_opt_revision_unspecified; + end_revision.kind = svn_opt_revision_unspecified; + + return svn_client_mergeinfo_log2(finding_merged, + target_path_or_url, target_peg_revision, + source_path_or_url, source_peg_revision, + &start_revision, &end_revision, + receiver, receiver_baton, + discover_changed_paths, depth, revprops, + ctx, scratch_pool); +} + +svn_error_t * svn_client_mergeinfo_log_merged(const char *path_or_url, const svn_opt_revision_t *peg_revision, const char *merge_source_path_or_url, Modified: subversion/branches/javahl-ra/subversion/libsvn_client/externals.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/externals.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/externals.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/externals.c Sun Dec 23 05:42:30 2012 @@ -42,17 +42,6 @@ #include "svn_private_config.h" #include "private/svn_wc_private.h" -/* Closure for handle_external_item_change. */ -struct external_change_baton_t -{ - /* The URL for the repository root. */ - const char *repos_root_url; - - /* Passed through to svn_client_* functions. */ - svn_client_ctx_t *ctx; - - svn_boolean_t *timestamp_sleep; -}; /* Remove the directory at LOCAL_ABSPATH from revision control, and do the * same to any revision controlled directories underneath LOCAL_ABSPATH @@ -180,7 +169,10 @@ switch_dir_external(const char *local_ab FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, timestamp_sleep, - ctx, subpool)); + ctx, + ctx->conflict_func2, + ctx->conflict_baton2, + subpool)); svn_pool_destroy(subpool); goto cleanup; } @@ -313,7 +305,6 @@ switch_file_external(const char *local_a const svn_opt_revision_t *revision, const char *def_dir_abspath, svn_ra_session_t *ra_session, - svn_boolean_t *timestamp_sleep, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { @@ -507,7 +498,7 @@ cleanup: } static svn_error_t * -handle_external_item_removal(const struct external_change_baton_t *eb, +handle_external_item_removal(const svn_client_ctx_t *ctx, const char *defining_abspath, const char *local_abspath, apr_pool_t *scratch_pool) @@ -521,19 +512,19 @@ handle_external_item_removal(const struc const char *lock_root_abspath = NULL; /* local_abspath should be a wcroot or a file external */ - SVN_ERR(svn_wc_read_kind(&kind, eb->ctx->wc_ctx, local_abspath, FALSE, + SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE, scratch_pool)); if (kind == svn_node_none) return SVN_NO_ERROR; /* It's neither... Nothing to remove */ - SVN_ERR(svn_wc_locked2(&lock_existed, NULL, eb->ctx->wc_ctx, + SVN_ERR(svn_wc_locked2(&lock_existed, NULL, ctx->wc_ctx, local_abspath, scratch_pool)); if (! lock_existed) { SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, - eb->ctx->wc_ctx, local_abspath, + ctx->wc_ctx, local_abspath, FALSE, scratch_pool, scratch_pool)); @@ -543,12 +534,12 @@ handle_external_item_removal(const struc nothing else in this externals description (at least) is going to need this directory, and therefore it's better to leave stuff where the user expects it. */ - err = svn_wc__external_remove(eb->ctx->wc_ctx, defining_abspath, + err = svn_wc__external_remove(ctx->wc_ctx, defining_abspath, local_abspath, - eb->ctx->cancel_func, eb->ctx->cancel_baton, + ctx->cancel_func, ctx->cancel_baton, scratch_pool); - if (eb->ctx->notify_func2) + if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath, @@ -558,8 +549,7 @@ handle_external_item_removal(const struc notify->kind = kind; notify->err = err; - (eb->ctx->notify_func2)(eb->ctx->notify_baton2, - notify, scratch_pool); + (ctx->notify_func2)(ctx->notify_baton2, notify, scratch_pool); } if (err && err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD) @@ -572,7 +562,7 @@ handle_external_item_removal(const struc /* Unlock if we acquired the lock */ if (lock_root_abspath != NULL) { - svn_error_t *err2 = svn_wc__release_write_lock(eb->ctx->wc_ctx, + svn_error_t *err2 = svn_wc__release_write_lock(ctx->wc_ctx, lock_root_abspath, scratch_pool); @@ -589,12 +579,14 @@ handle_external_item_removal(const struc } static svn_error_t * -handle_external_item_change(const struct external_change_baton_t *eb, +handle_external_item_change(svn_client_ctx_t *ctx, + const char *repos_root_url, const char *parent_dir_abspath, const char *parent_dir_url, const char *local_abspath, const char *old_defining_abspath, const svn_wc_external_item2_t *new_item, + svn_boolean_t *timestamp_sleep, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; @@ -602,7 +594,7 @@ handle_external_item_change(const struct const char *new_url; svn_node_kind_t ext_kind; - SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url); + SVN_ERR_ASSERT(repos_root_url && parent_dir_url); SVN_ERR_ASSERT(new_item != NULL); /* Don't bother to check status, since we'll get that for free by @@ -613,7 +605,7 @@ handle_external_item_change(const struct any pointers they have should also outlive the iterpool. */ SVN_ERR(svn_wc__resolve_relative_external_url(&new_url, - new_item, eb->repos_root_url, + new_item, repos_root_url, parent_dir_url, scratch_pool, scratch_pool)); @@ -622,7 +614,7 @@ handle_external_item_change(const struct SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &new_loc, new_url, NULL, &(new_item->peg_revision), - &(new_item->revision), eb->ctx, + &(new_item->revision), ctx, scratch_pool)); SVN_ERR(svn_ra_check_path(ra_session, "", new_loc->rev, &ext_kind, @@ -645,10 +637,10 @@ handle_external_item_change(const struct user when it happens. Worst case: your disk fills up :-). */ /* First notify that we're about to handle an external. */ - if (eb->ctx->notify_func2) + if (ctx->notify_func2) { - (*eb->ctx->notify_func2)( - eb->ctx->notify_baton2, + (*ctx->notify_func2)( + ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_update_external, scratch_pool), @@ -671,11 +663,11 @@ handle_external_item_change(const struct &(new_item->peg_revision), &(new_item->revision), parent_dir_abspath, - eb->timestamp_sleep, eb->ctx, + timestamp_sleep, ctx, scratch_pool)); break; case svn_node_file: - if (strcmp(eb->repos_root_url, new_loc->repos_root_url)) + if (strcmp(repos_root_url, new_loc->repos_root_url)) { const char *local_repos_root_url; const char *local_repos_uuid; @@ -692,7 +684,7 @@ handle_external_item_change(const struct SVN_ERR(svn_wc__node_get_repos_info(&local_repos_root_url, &local_repos_uuid, - eb->ctx->wc_ctx, + ctx->wc_ctx, parent_dir_abspath, scratch_pool, scratch_pool)); ext_repos_relpath = svn_uri_skip_ancestor(new_loc->repos_root_url, @@ -703,7 +695,7 @@ handle_external_item_change(const struct return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Unsupported external: URL of file external '%s' " "is not in repository '%s'"), - new_url, eb->repos_root_url); + new_url, repos_root_url); new_url = svn_path_url_add_component2(local_repos_root_url, ext_repos_relpath, @@ -713,7 +705,7 @@ handle_external_item_change(const struct NULL, &(new_item->peg_revision), &(new_item->revision), - eb->ctx, scratch_pool)); + ctx, scratch_pool)); } SVN_ERR(switch_file_external(local_abspath, @@ -722,9 +714,10 @@ handle_external_item_change(const struct &new_item->revision, parent_dir_abspath, ra_session, - eb->timestamp_sleep, eb->ctx, + ctx, scratch_pool)); break; + default: SVN_ERR_MALFUNCTION(); break; @@ -734,22 +727,21 @@ handle_external_item_change(const struct } static svn_error_t * -wrap_external_error(const struct external_change_baton_t *eb, +wrap_external_error(const svn_client_ctx_t *ctx, const char *target_abspath, svn_error_t *err, apr_pool_t *scratch_pool) { if (err && err->apr_err != SVN_ERR_CANCELLED) { - if (eb->ctx->notify_func2) + if (ctx->notify_func2) { svn_wc_notify_t *notifier = svn_wc_create_notify( target_abspath, svn_wc_notify_failed_external, scratch_pool); notifier->err = err; - eb->ctx->notify_func2(eb->ctx->notify_baton2, notifier, - scratch_pool); + ctx->notify_func2(ctx->notify_baton2, notifier, scratch_pool); } svn_error_clear(err); return SVN_NO_ERROR; @@ -759,7 +751,9 @@ wrap_external_error(const struct externa } static svn_error_t * -handle_externals_change(const struct external_change_baton_t *eb, +handle_externals_change(svn_client_ctx_t *ctx, + const char *repos_root_url, + svn_boolean_t *timestamp_sleep, const char *local_abspath, const char *new_desc_text, apr_hash_t *old_externals, @@ -790,7 +784,7 @@ handle_externals_change(const struct ext else new_desc = NULL; - SVN_ERR(svn_wc__node_get_url(&url, eb->ctx->wc_ctx, local_abspath, + SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, local_abspath, scratch_pool, iterpool)); SVN_ERR_ASSERT(url); @@ -805,8 +799,8 @@ handle_externals_change(const struct ext svn_pool_clear(iterpool); - if (eb->ctx->cancel_func) - SVN_ERR(eb->ctx->cancel_func(eb->ctx->cancel_baton)); + if (ctx->cancel_func) + SVN_ERR(ctx->cancel_func(ctx->cancel_baton)); target_abspath = svn_dirent_join(local_abspath, new_item->target_dir, iterpool); @@ -815,11 +809,14 @@ handle_externals_change(const struct ext APR_HASH_KEY_STRING); SVN_ERR(wrap_external_error( - eb, target_abspath, - handle_external_item_change(eb, local_abspath, url, + ctx, target_abspath, + handle_external_item_change(ctx, + repos_root_url, + local_abspath, url, target_abspath, old_defining_abspath, new_item, + timestamp_sleep, iterpool), iterpool)); @@ -847,15 +844,9 @@ svn_client__handle_externals(apr_hash_t apr_hash_t *old_external_defs; apr_hash_index_t *hi; apr_pool_t *iterpool; - struct external_change_baton_t eb; SVN_ERR_ASSERT(repos_root_url); - eb.repos_root_url = repos_root_url; - eb.ctx = ctx; - eb.timestamp_sleep = timestamp_sleep; - - iterpool = svn_pool_create(scratch_pool); /* Parse the old externals. This part will be replaced by reading EXTERNALS @@ -894,7 +885,8 @@ svn_client__handle_externals(apr_hash_t } } - SVN_ERR(handle_externals_change(&eb, local_abspath, + SVN_ERR(handle_externals_change(ctx, repos_root_url, timestamp_sleep, + local_abspath, desc_text, old_external_defs, ambient_depth, requested_depth, iterpool)); @@ -912,8 +904,8 @@ svn_client__handle_externals(apr_hash_t svn_pool_clear(iterpool); SVN_ERR(wrap_external_error( - &eb, item_abspath, - handle_external_item_removal(&eb, defining_abspath, + ctx, item_abspath, + handle_external_item_removal(ctx, defining_abspath, item_abspath, iterpool), iterpool)); @@ -960,17 +952,12 @@ svn_client__export_externals(apr_hash_t svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { - struct external_change_baton_t eb = { 0 }; apr_pool_t *iterpool = svn_pool_create(scratch_pool); apr_pool_t *sub_iterpool = svn_pool_create(scratch_pool); apr_hash_index_t *hi; SVN_ERR_ASSERT(svn_dirent_is_absolute(to_abspath)); - eb.repos_root_url = repos_root_url; - eb.ctx = ctx; - eb.timestamp_sleep = timestamp_sleep; - for (hi = apr_hash_first(scratch_pool, externals); hi; hi = apr_hash_next(hi)) @@ -1020,7 +1007,7 @@ svn_client__export_externals(apr_hash_t sub_iterpool)); SVN_ERR(wrap_external_error( - &eb, item_abspath, + ctx, item_abspath, svn_client_export5(NULL, new_url, item_abspath, &item->peg_revision, &item->revision, Modified: subversion/branches/javahl-ra/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/merge.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/merge.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/merge.c Sun Dec 23 05:42:30 2012 @@ -1368,7 +1368,7 @@ merge_dir_props_changed(svn_wc_notify_st SVN_ERR(svn_wc_merge_props3(state, ctx->wc_ctx, local_abspath, NULL, NULL, original_props, props, merge_b->dry_run, - ctx->conflict_func2, ctx->conflict_baton2, + NULL, NULL, /* postpone conflicts */ ctx->cancel_func, ctx->cancel_baton, scratch_pool)); } @@ -1682,8 +1682,7 @@ merge_file_changed(svn_wc_notify_state_t left, right, original_props, prop_changes, merge_b->dry_run, - ctx->conflict_func2, - ctx->conflict_baton2, + NULL, NULL, /* postpone conflicts */ ctx->cancel_func, ctx->cancel_baton, scratch_pool)); } @@ -1716,8 +1715,10 @@ merge_file_changed(svn_wc_notify_state_t SVN_ERR(svn_wc_text_modified_p2(&has_local_mods, ctx->wc_ctx, local_abspath, FALSE, scratch_pool)); - conflict_baton.wrapped_func = ctx->conflict_func2; - conflict_baton.wrapped_baton = ctx->conflict_baton2; + /* Postpone all conflicts. */ + conflict_baton.wrapped_func = NULL; + conflict_baton.wrapped_baton = NULL; + conflict_baton.conflicted_paths = &merge_b->conflicted_paths; conflict_baton.pool = merge_b->pool; @@ -9545,10 +9546,6 @@ merge_locked(const char *source1, svn_client__pathrev_t *yca = NULL; apr_pool_t *sesspool; svn_boolean_t same_repos; - /* Resolve conflicts post-merge for 1.7 and above API users. */ - svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL); - svn_wc_conflict_resolver_func2_t conflict_func2; - void *conflict_baton2; /* ### FIXME: This function really ought to do a history check on the left and right sides of the merge source, and -- if one is an @@ -9585,16 +9582,6 @@ merge_locked(const char *source1, &yca, source1_loc, source2_loc, ra_session1, ctx, scratch_pool, scratch_pool)); - if (resolve_conflicts_post_merge) - { - /* Remove the conflict resolution callback from the client context. - * We invoke it after of the merge instead of during the merge. */ - conflict_func2 = ctx->conflict_func2; - conflict_baton2 = ctx->conflict_baton2; - ctx->conflict_func2 = NULL; - ctx->conflict_baton2 = NULL; - } - /* Check for a youngest common ancestor. If we have one, we'll be doing merge tracking. @@ -9705,7 +9692,7 @@ merge_locked(const char *source1, if (err) return svn_error_trace(err); - if (resolve_conflicts_post_merge) + if (ctx->conflict_func2) { /* Resolve conflicts within the merge target. */ SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, target_abspath, @@ -9714,7 +9701,8 @@ merge_locked(const char *source1, "" /* resolve_prop (ALL props) */, TRUE /* resolve_tree */, svn_wc_conflict_choose_unspecified, - conflict_func2, conflict_baton2, + ctx->conflict_func2, + ctx->conflict_baton2, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); @@ -10980,10 +10968,6 @@ merge_peg_locked(const char *source_path svn_boolean_t use_sleep = FALSE; svn_error_t *err; svn_boolean_t same_repos; - /* Resolve conflicts post-merge for 1.7 and above API users. */ - svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL); - svn_wc_conflict_resolver_func2_t conflict_func2; - void *conflict_baton2; SVN_ERR_ASSERT(svn_dirent_is_absolute(target_abspath)); @@ -11008,16 +10992,6 @@ merge_peg_locked(const char *source_path /* Check for same_repos. */ same_repos = is_same_repos(&target->loc, source_loc, TRUE /* strict_urls */); - if (resolve_conflicts_post_merge) - { - /* Remove the conflict resolution callback from the client context. - * We invoke it after of the merge instead of during the merge. */ - conflict_func2 = ctx->conflict_func2; - conflict_baton2 = ctx->conflict_baton2; - ctx->conflict_func2 = NULL; - ctx->conflict_baton2 = NULL; - } - /* Do the real merge! (We say with confidence that our merge sources are both ancestral and related.) */ err = do_merge(NULL, NULL, merge_sources, target, ra_session, @@ -11031,7 +11005,7 @@ merge_peg_locked(const char *source_path /* We're done with our RA session. */ svn_pool_destroy(sesspool); - if (resolve_conflicts_post_merge) + if (ctx->conflict_func2) { /* Resolve conflicts within the merge target. */ SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, target_abspath, @@ -11040,7 +11014,8 @@ merge_peg_locked(const char *source_path "" /* resolve_prop (ALL props) */, TRUE /* resolve_tree */, svn_wc_conflict_choose_unspecified, - conflict_func2, conflict_baton2, + ctx->conflict_func2, + ctx->conflict_baton2, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); @@ -11639,24 +11614,10 @@ do_symmetric_merge_locked(const svn_clie merge_target_t *target; svn_boolean_t use_sleep = FALSE; svn_error_t *err; - /* Resolve conflicts post-merge for 1.7 and above API users. */ - svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL); - svn_wc_conflict_resolver_func2_t conflict_func2; - void *conflict_baton2; SVN_ERR(open_target_wc(&target, target_abspath, TRUE, TRUE, TRUE, ctx, scratch_pool, scratch_pool)); - if (resolve_conflicts_post_merge) - { - /* Remove the conflict resolution callback from the client context. - * We invoke it after of the merge instead of during the merge. */ - conflict_func2 = ctx->conflict_func2; - conflict_baton2 = ctx->conflict_baton2; - ctx->conflict_func2 = NULL; - ctx->conflict_baton2 = NULL; - } - if (merge->mid) { merge_source_t source; @@ -11713,7 +11674,7 @@ do_symmetric_merge_locked(const svn_clie SVN_ERR(err); - if (resolve_conflicts_post_merge) + if (ctx->conflict_func2) { /* Resolve conflicts within the merge target. */ SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, target_abspath, @@ -11722,7 +11683,8 @@ do_symmetric_merge_locked(const svn_clie "" /* resolve_prop (ALL props) */, TRUE /* resolve_tree */, svn_wc_conflict_choose_unspecified, - conflict_func2, conflict_baton2, + ctx->conflict_func2, + ctx->conflict_baton2, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); Modified: subversion/branches/javahl-ra/subversion/libsvn_client/mergeinfo.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/mergeinfo.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/mergeinfo.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/mergeinfo.c Sun Dec 23 05:42:30 2012 @@ -1622,20 +1622,21 @@ svn_client_mergeinfo_get_merged(apr_hash svn_error_t * -svn_client_mergeinfo_log(svn_boolean_t finding_merged, - const char *target_path_or_url, - const svn_opt_revision_t *target_peg_revision, - const char *source_path_or_url, - const svn_opt_revision_t *source_peg_revision, - svn_log_entry_receiver_t log_receiver, - void *log_receiver_baton, - svn_boolean_t discover_changed_paths, - svn_depth_t depth, - const apr_array_header_t *revprops, - svn_client_ctx_t *ctx, - apr_pool_t *scratch_pool) +svn_client_mergeinfo_log2(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t log_receiver, + void *log_receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) { - apr_pool_t *sesspool = svn_pool_create(scratch_pool); const char *log_target = NULL; const char *repos_root; const char *target_repos_rel; @@ -1662,6 +1663,21 @@ svn_client_mergeinfo_log(svn_boolean_t f SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Only depths 'infinity' and 'empty' are currently supported")); + /* Validate and sanitize the incoming source operative revision range. */ + if (!((source_start_revision->kind == svn_opt_revision_unspecified) || + (source_start_revision->kind == svn_opt_revision_number) || + (source_start_revision->kind == svn_opt_revision_date) || + (source_start_revision->kind == svn_opt_revision_head))) + return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL); + if (!((source_end_revision->kind == svn_opt_revision_unspecified) || + (source_end_revision->kind == svn_opt_revision_number) || + (source_end_revision->kind == svn_opt_revision_date) || + (source_end_revision->kind == svn_opt_revision_head))) + return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL); + if ((source_end_revision->kind == svn_opt_revision_unspecified) + && (source_start_revision->kind != svn_opt_revision_unspecified)) + source_end_revision = source_start_revision; + /* We need the union of TARGET_PATH_OR_URL@TARGET_PEG_REVISION's mergeinfo and MERGE_SOURCE_URL's history. It's not enough to do path matching, because renames in the history of MERGE_SOURCE_URL @@ -1717,43 +1733,56 @@ svn_client_mergeinfo_log(svn_boolean_t f /* Open RA sessions to the repository for the source and target. * ### TODO: As the source and target must be in the same repository, we * should share a single session, tracking the two URLs separately. */ - if (!finding_merged) - { - svn_ra_session_t *target_session; - svn_client__pathrev_t *pathrev; - - SVN_ERR(svn_client__ra_session_from_path2( - &target_session, &pathrev, - target_path_or_url, NULL, - target_peg_revision, target_peg_revision, - ctx, sesspool)); - SVN_ERR(svn_client__get_history_as_mergeinfo( - &target_history, NULL, - pathrev, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, - target_session, ctx, scratch_pool)); - } { - svn_ra_session_t *source_session; + apr_pool_t *sesspool = svn_pool_create(scratch_pool); + svn_ra_session_t *source_session, *target_session; svn_client__pathrev_t *pathrev; + svn_revnum_t start_rev, end_rev, youngest_rev = SVN_INVALID_REVNUM; + + if (! finding_merged) + { + SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev, + target_path_or_url, NULL, + target_peg_revision, + target_peg_revision, + ctx, sesspool)); + SVN_ERR(svn_client__get_history_as_mergeinfo(&target_history, NULL, + pathrev, + SVN_INVALID_REVNUM, + SVN_INVALID_REVNUM, + target_session, ctx, + scratch_pool)); + } + + SVN_ERR(svn_client__ra_session_from_path2(&source_session, &pathrev, + source_path_or_url, NULL, + source_peg_revision, + source_peg_revision, + ctx, sesspool)); + SVN_ERR(svn_client__get_revision_number(&start_rev, &youngest_rev, + ctx->wc_ctx, source_path_or_url, + source_session, + source_start_revision, + sesspool)); + SVN_ERR(svn_client__get_revision_number(&end_rev, &youngest_rev, + ctx->wc_ctx, source_path_or_url, + source_session, + source_end_revision, + sesspool)); + SVN_ERR(svn_client__get_history_as_mergeinfo(&source_history, NULL, + pathrev, end_rev, start_rev, + source_session, ctx, + scratch_pool)); - SVN_ERR(svn_client__ra_session_from_path2( - &source_session, &pathrev, - source_path_or_url, NULL, - source_peg_revision, source_peg_revision, - ctx, sesspool)); - SVN_ERR(svn_client__get_history_as_mergeinfo( - &source_history, NULL, - pathrev, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, - source_session, ctx, scratch_pool)); + /* Close the source and target sessions. */ + svn_pool_destroy(sesspool); } - /* Close the source and target sessions. */ - svn_pool_destroy(sesspool); /* Separate the explicit or inherited mergeinfo on TARGET_PATH_OR_URL, and possibly its explicit subtree mergeinfo, into their inheritable and non-inheritable parts. */ - master_noninheritable_rangelist = - apr_array_make(scratch_pool, 64, sizeof(svn_merge_range_t *)); + master_noninheritable_rangelist = apr_array_make(scratch_pool, 64, + sizeof(svn_merge_range_t *)); master_inheritable_rangelist = apr_array_make(scratch_pool, 64, sizeof(svn_merge_range_t *)); inheritable_subtree_merges = apr_hash_make(scratch_pool); Modified: subversion/branches/javahl-ra/subversion/libsvn_client/ra.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/ra.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/ra.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/ra.c Sun Dec 23 05:42:30 2012 @@ -245,7 +245,7 @@ invalidate_wc_props(void *baton, static svn_error_t * get_wc_contents(void *baton, svn_stream_t **contents, - const svn_checksum_t *sha1_checksum, + const svn_checksum_t *checksum, apr_pool_t *pool) { callback_baton_t *cb = baton; @@ -260,7 +260,7 @@ get_wc_contents(void *baton, svn_wc__get_pristine_contents_by_checksum(contents, cb->ctx->wc_ctx, cb->base_dir_abspath, - sha1_checksum, + checksum, pool, pool)); } @@ -297,7 +297,7 @@ svn_client__open_ra_session_internal(svn svn_client_ctx_t *ctx, apr_pool_t *pool) { - svn_ra_callbacks2_t *cbtable = apr_pcalloc(pool, sizeof(*cbtable)); + svn_ra_callbacks2_t *cbtable; callback_baton_t *cb = apr_pcalloc(pool, sizeof(*cb)); const char *uuid = NULL; @@ -305,6 +305,7 @@ svn_client__open_ra_session_internal(svn SVN_ERR_ASSERT(base_dir_abspath == NULL || svn_dirent_is_absolute(base_dir_abspath)); + SVN_ERR(svn_ra_create_callbacks(&cbtable, pool)); cbtable->open_tmp_file = open_tmp_file; cbtable->get_wc_prop = use_admin ? get_wc_prop : NULL; cbtable->set_wc_prop = read_only_wc ? NULL : set_wc_prop; Modified: subversion/branches/javahl-ra/subversion/libsvn_client/switch.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/switch.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/switch.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/switch.c Sun Dec 23 05:42:30 2012 @@ -92,10 +92,6 @@ switch_internal(svn_revnum_t *result_rev SVN_CONFIG_CATEGORY_CONFIG, APR_HASH_KEY_STRING) : NULL; - /* Resolve conflicts post-switch for 1.7 and above API users. */ - svn_boolean_t resolve_conflicts_post_switch = (ctx->conflict_func2 != NULL); - svn_wc_conflict_resolver_func2_t conflict_func2; - void *conflict_baton2; /* An unknown depth can't be sticky. */ if (depth == svn_depth_unknown) @@ -203,7 +199,7 @@ switch_internal(svn_revnum_t *result_rev svn_client__pathrev_t *target_base_loc, *yca; SVN_ERR(svn_client__wc_node_get_base(&target_base_loc, local_abspath, - ctx, pool, pool)); + ctx->wc_ctx, pool, pool)); if (!target_base_loc) yca = NULL; /* Not versioned */ @@ -222,17 +218,6 @@ switch_internal(svn_revnum_t *result_rev svn_dirent_dirname(local_abspath, pool)); } - if (resolve_conflicts_post_switch) - { - /* Remove the conflict resolution callback from the client context. - * We invoke it after of the switch instead of during the switch. */ - conflict_func2 = ctx->conflict_func2; - conflict_baton2 = ctx->conflict_baton2; - ctx->conflict_func2 = NULL; - ctx->conflict_baton2 = NULL; - } - - SVN_ERR(svn_ra_reparent(ra_session, anchor_url, pool)); /* Fetch the switch (update) editor. If REVISION is invalid, that's @@ -252,7 +237,7 @@ switch_internal(svn_revnum_t *result_rev server_supports_depth, diff3_cmd, preserved_exts, svn_client__dirent_fetcher, &dfb, - ctx->conflict_func2, ctx->conflict_baton2, + NULL, NULL, /* postpone conflicts */ NULL, NULL, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, @@ -338,7 +323,7 @@ switch_internal(svn_revnum_t *result_rev if (result_rev) *result_rev = revnum; - if (resolve_conflicts_post_switch) + if (ctx->conflict_func2) { /* Resolve conflicts within the switched target. */ SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath, @@ -347,7 +332,8 @@ switch_internal(svn_revnum_t *result_rev "" /* resolve_prop (ALL props) */, TRUE /* resolve_tree */, svn_wc_conflict_choose_unspecified, - conflict_func2, conflict_baton2, + ctx->conflict_func2, + ctx->conflict_baton2, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, pool)); Modified: subversion/branches/javahl-ra/subversion/libsvn_client/update.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/update.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/update.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/update.c Sun Dec 23 05:42:30 2012 @@ -185,6 +185,8 @@ update_internal(svn_revnum_t *result_rev svn_boolean_t *timestamp_sleep, svn_boolean_t notify_summary, svn_client_ctx_t *ctx, + svn_wc_conflict_resolver_func2_t conflict_func2, + void *conflict_baton2, apr_pool_t *pool) { const svn_delta_editor_t *update_editor; @@ -222,7 +224,7 @@ update_internal(svn_revnum_t *result_rev /* Check if our anchor exists in BASE. If it doesn't we can't update. */ SVN_ERR(svn_client__wc_node_get_base(&anchor_loc, anchor_abspath, - ctx, pool, pool)); + ctx->wc_ctx, pool, pool)); /* It does not make sense to update conflict victims. */ err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted, @@ -374,7 +376,7 @@ update_internal(svn_revnum_t *result_rev clean_checkout, diff3_cmd, preserved_exts, svn_client__dirent_fetcher, &dfb, - ctx->conflict_func2, ctx->conflict_baton2, + conflict_func2, conflict_baton2, NULL, NULL, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, @@ -465,6 +467,8 @@ svn_client__update_internal(svn_revnum_t svn_boolean_t innerupdate, svn_boolean_t *timestamp_sleep, svn_client_ctx_t *ctx, + svn_wc_conflict_resolver_func2_t conflict_func2, + void *conflict_baton2, apr_pool_t *pool) { const char *anchor_abspath, *lockroot_abspath; @@ -514,7 +518,8 @@ svn_client__update_internal(svn_revnum_t &peg_revision, svn_depth_empty, FALSE, ignore_externals, allow_unver_obstructions, adds_as_modification, timestamp_sleep, - FALSE, ctx, pool); + FALSE, ctx, conflict_func2, conflict_baton2, + pool); if (err) goto cleanup; anchor_abspath = missing_parent; @@ -538,7 +543,7 @@ svn_client__update_internal(svn_revnum_t &peg_revision, depth, depth_is_sticky, ignore_externals, allow_unver_obstructions, adds_as_modification, timestamp_sleep, - TRUE, ctx, pool); + TRUE, ctx, conflict_func2, conflict_baton2, pool); cleanup: err = svn_error_compose_create( err, @@ -565,10 +570,6 @@ svn_client_update4(apr_array_header_t ** apr_pool_t *iterpool = svn_pool_create(pool); const char *path = NULL; svn_boolean_t sleep = FALSE; - /* Resolve conflicts post-update for 1.7 and above API users. */ - svn_boolean_t resolve_conflicts_post_update = (ctx->conflict_func2 != NULL); - svn_wc_conflict_resolver_func2_t conflict_func2; - void *conflict_baton2; if (result_revs) *result_revs = apr_array_make(pool, paths->nelts, sizeof(svn_revnum_t)); @@ -582,16 +583,6 @@ svn_client_update4(apr_array_header_t ** _("'%s' is not a local path"), path); } - if (resolve_conflicts_post_update) - { - /* Remove the conflict resolution callback from the client context. - * We invoke it after of the update instead of during the update. */ - conflict_func2 = ctx->conflict_func2; - conflict_baton2 = ctx->conflict_baton2; - ctx->conflict_func2 = NULL; - ctx->conflict_baton2 = NULL; - } - for (i = 0; i < paths->nelts; ++i) { svn_error_t *err = SVN_NO_ERROR; @@ -612,7 +603,9 @@ svn_client_update4(apr_array_header_t ** adds_as_modification, make_parents, FALSE, &sleep, - ctx, iterpool); + ctx, + NULL, NULL, /* postpone conflicts */ + iterpool); if (err) { @@ -637,30 +630,43 @@ svn_client_update4(apr_array_header_t ** APR_ARRAY_PUSH(*result_revs, svn_revnum_t) = result_rev; } - svn_pool_destroy(iterpool); if (sleep) svn_io_sleep_for_timestamps((paths->nelts == 1) ? path : NULL, pool); - if (resolve_conflicts_post_update) + if (ctx->conflict_func2) { - const char *common_abspath; + for (i = 0; i < paths->nelts; ++i) + { + svn_error_t *err = SVN_NO_ERROR; + const char *local_abspath; + + svn_pool_clear(iterpool); + path = APR_ARRAY_IDX(paths, i, const char *); - /* Resolve conflicts within the updated subtree. - * ### This will resolve conflicts which are siblings of paths in - * ### the target list but were not part of this update. */ - SVN_ERR(svn_dirent_condense_targets(&common_abspath, NULL, paths, - TRUE, pool, pool)); - SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, common_abspath, - depth, - TRUE /* resolve_text */, - "" /* resolve_prop (ALL props) */, - TRUE /* resolve_tree */, - svn_wc_conflict_choose_unspecified, - conflict_func2, conflict_baton2, - ctx->cancel_func, ctx->cancel_baton, - ctx->notify_func2, ctx->notify_baton2, - pool)); + /* Resolve conflicts within the updated subtree. */ + SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, iterpool)); + err = svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath, depth, + TRUE /* resolve_text */, + "" /* resolve_prop (ALL props) */, + TRUE /* resolve_tree */, + svn_wc_conflict_choose_unspecified, + ctx->conflict_func2, + ctx->conflict_baton2, + ctx->cancel_func, ctx->cancel_baton, + ctx->notify_func2, ctx->notify_baton2, + iterpool); + if (err) + { + if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY) + && (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)) + return svn_error_trace(err); + + svn_error_clear(err); + } + } } + svn_pool_destroy(iterpool); + return SVN_NO_ERROR; } Modified: subversion/branches/javahl-ra/subversion/libsvn_client/util.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/util.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_client/util.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_client/util.c Sun Dec 23 05:42:30 2012 @@ -170,10 +170,10 @@ svn_client_commit_item3_dup(const svn_cl svn_error_t * svn_client__wc_node_get_base(svn_client__pathrev_t **base_p, - const char *wc_abspath, - svn_client_ctx_t *ctx, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) + const char *wc_abspath, + svn_wc_context_t *wc_ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) { const char *relpath; @@ -183,7 +183,7 @@ svn_client__wc_node_get_base(svn_client_ &relpath, &(*base_p)->repos_root_url, &(*base_p)->repos_uuid, - ctx->wc_ctx, wc_abspath, + wc_ctx, wc_abspath, result_pool, scratch_pool)); if ((*base_p)->repos_root_url && relpath) { Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c Sun Dec 23 05:42:30 2012 @@ -46,6 +46,7 @@ typedef enum prop_state_e { RESPONSE, HREF, PROPSTAT, + STATUS, PROP, PROPVAL, COLLECTION, @@ -86,6 +87,13 @@ typedef struct propfind_context_t { */ apr_hash_t *ret_props; + /* hash table containing all the properties associated with the + * "current" tag. These will get copied into RET_PROPS + * if the status code similarly associated indicates that they are + * "good"; otherwise, they'll get discarded. + */ + apr_hash_t *ps_props; + /* If not-NULL, add us to this list when we're done. */ svn_ra_serf__list_t **done_list; @@ -107,7 +115,10 @@ static const svn_ra_serf__xml_transition TRUE, { NULL }, TRUE }, { RESPONSE, D_, "propstat", PROPSTAT, - FALSE, { NULL }, FALSE }, + FALSE, { NULL }, TRUE }, + + { PROPSTAT, D_, "status", STATUS, + TRUE, { NULL }, TRUE }, { PROPSTAT, D_, "prop", PROP, FALSE, { NULL }, FALSE }, @@ -125,6 +136,46 @@ static const svn_ra_serf__xml_transition }; +/* Return the HTTP status code contained in STATUS_LINE, or 0 if + there's a problem parsing it. */ +static int parse_status_code(const char *status_line) +{ + /* STATUS_LINE should be of form: "HTTP/1.1 200 OK" */ + if (status_line[0] == 'H' && + status_line[1] == 'T' && + status_line[2] == 'T' && + status_line[3] == 'P' && + status_line[4] == '/' && + (status_line[5] >= '0' && status_line[5] <= '9') && + status_line[6] == '.' && + (status_line[7] >= '0' && status_line[7] <= '9') && + status_line[8] == ' ') + { + char *reason; + + return apr_strtoi64(status_line + 8, &reason, 10); + } + return 0; +} + + +/* Conforms to svn_ra_serf__path_rev_walker_t */ +static svn_error_t * +copy_into_ret_props(void *baton, + const char *path, apr_ssize_t path_len, + const char *ns, apr_ssize_t ns_len, + const char *name, apr_ssize_t name_len, + const svn_string_t *val, + apr_pool_t *pool) +{ + propfind_context_t *ctx = baton; + + svn_ra_serf__set_ver_prop(ctx->ret_props, path, ctx->rev, ns, name, + val, ctx->pool); + return SVN_NO_ERROR; +} + + /* Conforms to svn_ra_serf__xml_opened_t */ static svn_error_t * propfind_opened(svn_ra_serf__xml_estate_t *xes, @@ -133,11 +184,17 @@ propfind_opened(svn_ra_serf__xml_estate_ const svn_ra_serf__dav_props_t *tag, apr_pool_t *scratch_pool) { + propfind_context_t *ctx = baton; + if (entered_state == PROPVAL) { svn_ra_serf__xml_note(xes, PROPVAL, "ns", tag->namespace); svn_ra_serf__xml_note(xes, PROPVAL, "name", tag->name); } + else if (entered_state == PROPSTAT) + { + ctx->ps_props = apr_hash_make(ctx->pool); + } return SVN_NO_ERROR; } @@ -193,7 +250,17 @@ propfind_closed(svn_ra_serf__xml_estate_ { svn_ra_serf__xml_note(xes, PROPVAL, "altvalue", cdata->data); } - else + else if (leaving_state == STATUS) + { + /* Parse the status field, and remember if this is a property + that we wish to ignore. (Typically, if it's not a 200, the + status will be 404 to indicate that a property we + specifically requested from the server doesn't exist.) */ + int status = parse_status_code(cdata->data); + if (status != 200) + svn_ra_serf__xml_note(xes, PROPSTAT, "ignore-prop", "*"); + } + else if (leaving_state == PROPVAL) { const char *encoding = apr_hash_get(attrs, "V:encoding", APR_HASH_KEY_STRING); @@ -204,8 +271,6 @@ propfind_closed(svn_ra_serf__xml_estate_ const char *name; const char *altvalue; - SVN_ERR_ASSERT(leaving_state == PROPVAL); - if (encoding) { if (strcmp(encoding, "base64") != 0) @@ -225,7 +290,16 @@ propfind_closed(svn_ra_serf__xml_estate_ /* The current path sits on the RESPONSE state. Gather up all the state from this PROPVAL to the (grandparent) RESPONSE state, - and grab the path from there. */ + and grab the path from there. + + Now, it would be nice if we could, at this point, know that + the status code for this property indicated a problem -- then + we could simply bail out here and ignore the property. + Sadly, though, we might get the status code *after* we get + the property value. So we'll carry on with our processing + here, setting the property and value as expected. Once we + know for sure the status code associate with the property, + we'll decide its fate. */ gathered = svn_ra_serf__xml_gather_since(xes, RESPONSE); /* These will be dup'd into CTX->POOL, as necessary. */ @@ -241,10 +315,35 @@ propfind_closed(svn_ra_serf__xml_estate_ if (altvalue != NULL) val_str = svn_string_create(altvalue, ctx->pool); - svn_ra_serf__set_ver_prop(ctx->ret_props, + svn_ra_serf__set_ver_prop(ctx->ps_props, path, ctx->rev, ns, name, val_str, ctx->pool); } + else + { + apr_hash_t *gathered; + const char *path; + + SVN_ERR_ASSERT(leaving_state == PROPSTAT); + + gathered = svn_ra_serf__xml_gather_since(xes, PROPSTAT); + + path = apr_hash_get(gathered, "path", APR_HASH_KEY_STRING); + if (path == NULL) + path = ctx->path; + + /* If we've squirreled away a note that says we want to ignore + these properties, we'll do so. Otherwise, we need to copy + them from the temporary hash into the ctx->ret_props hash. */ + if (! apr_hash_get(gathered, "ignore-prop", APR_HASH_KEY_STRING)) + { + SVN_ERR(svn_ra_serf__walk_all_paths(ctx->ps_props, ctx->rev, + copy_into_ret_props, ctx, + scratch_pool)); + } + + ctx->ps_props = NULL; + } return SVN_NO_ERROR; } Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h (original) +++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h Sun Dec 23 05:42:30 2012 @@ -756,8 +756,8 @@ svn_ra_serf__create_expat_handler(svn_ra apr_pool_t *result_pool); -/* Allocated within XES->STATE_POOL. Changes are not allowd. Make a deep - copy, as appropriate. +/* Allocated within XES->STATE_POOL. Changes are not allowd (callers + should make a deep copy if they need to make changes). The resulting hash maps char* names to char* values. */ apr_hash_t * Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c Sun Dec 23 05:42:30 2012 @@ -464,10 +464,6 @@ set_file_props(void *baton, const svn_delta_editor_t *editor = info->dir->report_context->update_editor; const char *prop_name; - if (strcmp(name, "md5-checksum") == 0 - && strcmp(ns, SVN_DAV_PROP_NS_DAV) == 0) - info->final_checksum = apr_pstrdup(info->pool, val->data); - prop_name = svn_ra_serf__svnname_from_wirename(ns, name, scratch_pool); if (prop_name != NULL) return svn_error_trace(editor->change_file_prop(info->file_baton, @@ -1250,18 +1246,32 @@ fetch_file(report_context_t *ctx, report svn_stream_t *contents = NULL; if (ctx->sess->wc_callbacks->get_wc_contents - && info->final_sha1_checksum) + && (info->final_sha1_checksum || info->final_checksum)) { svn_error_t *err; - svn_checksum_t *sha1_checksum; + svn_checksum_t *checksum; + + /* Parse our checksum, preferring SHA1 to MD5. */ + if (info->final_sha1_checksum) + { + err = svn_checksum_parse_hex(&checksum, svn_checksum_sha1, + info->final_sha1_checksum, + info->pool); + } + else if (info->final_checksum) + { + err = svn_checksum_parse_hex(&checksum, svn_checksum_md5, + info->final_checksum, + info->pool); + } - err = svn_checksum_parse_hex(&sha1_checksum, svn_checksum_sha1, - info->final_sha1_checksum, info->pool); + /* Okay so far? Let's try to get a stream on some readily + available matching content. */ if (!err) { err = ctx->sess->wc_callbacks->get_wc_contents( ctx->sess->wc_callback_baton, &contents, - sha1_checksum, info->pool); + checksum, info->pool); } if (err) @@ -2088,6 +2098,13 @@ end_report(svn_ra_serf__xml_parser_t *pa svn_ra_serf__set_ver_prop(props, info->base_name, info->base_rev, ns->namespace, ns->url, set_val_str, pool); + + /* Advance handling: if we spotted the md5-checksum property on + the wire, remember it's value. */ + if (strcmp(ns->url, "md5-checksum") == 0 + && strcmp(ns->namespace, SVN_DAV_PROP_NS_DAV) == 0) + info->final_checksum = apr_pstrdup(info->pool, set_val_str->data); + svn_ra_serf__xml_pop_state(parser); } else if (state == IGNORE_PROP_NAME || state == NEED_PROP_NAME) @@ -2862,30 +2879,14 @@ try_get_wc_contents(svn_boolean_t *found svn_props = apr_hash_get(props, SVN_DAV_PROP_NS_DAV, APR_HASH_KEY_STRING); if (!svn_props) { - /* No checksum property in response. */ + /* No properties -- therefore no checksum property -- in response. */ return SVN_NO_ERROR; } - /* If we are talking to an old server, then the sha1-checksum property - will not exist. In our property parsing code, we don't bother to - check the element which would indicate a 404. That section - needs to name the 404'd property, so our parsing code only sees: - - - - That is parsed as an empty string value for the property. - - When checking the property, if it is missing (NULL), or the above - empty string, then we know the property doesn't exist. - - Strictly speaking, we could start parsing and omit any - properties that were 404'd. But the 404 only happens when we ask - for a specific property, and it is easier to just check for the - empty string. Since it isn't a legal value in this case, we won't - get confused with a truly existent property. */ sha1_checksum_prop = svn_prop_get_value(svn_props, "sha1-checksum"); - if (sha1_checksum_prop == NULL || *sha1_checksum_prop == '\0') + if (sha1_checksum_prop == NULL) { + /* No checksum property in response. */ return SVN_NO_ERROR; } Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c Sun Dec 23 05:42:30 2012 @@ -2265,7 +2265,7 @@ typedef struct get_pristine_lazyopen_bat { svn_wc_context_t *wc_ctx; const char *wri_abspath; - const svn_checksum_t *sha1_checksum; + const svn_checksum_t *checksum; } get_pristine_lazyopen_baton_t; @@ -2278,9 +2278,19 @@ get_pristine_lazyopen_func(svn_stream_t apr_pool_t *scratch_pool) { get_pristine_lazyopen_baton_t *b = baton; + const svn_checksum_t *sha1_checksum; + + /* svn_wc__db_pristine_read() wants a SHA1, so if we have an MD5, + we'll use it to lookup the SHA1. */ + if (b->checksum->kind == svn_checksum_sha1) + sha1_checksum = b->checksum; + else + SVN_ERR(svn_wc__db_pristine_get_sha1(&sha1_checksum, b->wc_ctx->db, + b->wri_abspath, b->checksum, + scratch_pool, scratch_pool)); SVN_ERR(svn_wc__db_pristine_read(stream, NULL, b->wc_ctx->db, - b->wri_abspath, b->sha1_checksum, + b->wri_abspath, sha1_checksum, result_pool, scratch_pool)); return SVN_NO_ERROR; } @@ -2289,7 +2299,7 @@ svn_error_t * svn_wc__get_pristine_contents_by_checksum(svn_stream_t **contents, svn_wc_context_t *wc_ctx, const char *wri_abspath, - const svn_checksum_t *sha1_checksum, + const svn_checksum_t *checksum, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { @@ -2298,7 +2308,7 @@ svn_wc__get_pristine_contents_by_checksu *contents = NULL; SVN_ERR(svn_wc__db_pristine_check(&present, wc_ctx->db, wri_abspath, - sha1_checksum, scratch_pool)); + checksum, scratch_pool)); if (present) { @@ -2307,7 +2317,7 @@ svn_wc__get_pristine_contents_by_checksu gpl_baton = apr_pcalloc(result_pool, sizeof(*gpl_baton)); gpl_baton->wc_ctx = wc_ctx; gpl_baton->wri_abspath = wri_abspath; - gpl_baton->sha1_checksum = sha1_checksum; + gpl_baton->checksum = checksum; *contents = svn_stream_lazyopen_create(get_pristine_lazyopen_func, gpl_baton, result_pool); Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c Sun Dec 23 05:42:30 2012 @@ -4329,6 +4329,17 @@ svn_wc_merge(const char *left, /*** From util.c ***/ +svn_wc_conflict_version_t * +svn_wc_conflict_version_create(const char *repos_url, + const char *path_in_repos, + svn_revnum_t peg_rev, + svn_node_kind_t node_kind, + apr_pool_t *pool) +{ + return svn_wc_conflict_version_create2(repos_url, NULL, path_in_repos, + peg_rev, node_kind, pool); +} + svn_wc_conflict_description_t * svn_wc_conflict_description_create_text(const char *path, svn_wc_adm_access_t *adm_access, Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/props.c URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/props.c?rev=1425411&r1=1425410&r2=1425411&view=diff ============================================================================== --- subversion/branches/javahl-ra/subversion/libsvn_wc/props.c (original) +++ subversion/branches/javahl-ra/subversion/libsvn_wc/props.c Sun Dec 23 05:42:30 2012 @@ -2315,7 +2315,7 @@ do_propset(svn_wc__db_t *db, } else if (kind == svn_node_file && strcmp(name, SVN_PROP_EOL_STYLE) == 0) { - svn_string_t *old_value = apr_hash_get(prophash, SVN_PROP_KEYWORDS, + svn_string_t *old_value = apr_hash_get(prophash, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING); if (((value == NULL) != (old_value == NULL))