You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/23 07:17:10 UTC
svn commit: r1425417 - in /subversion/branches/javahl-ra: ./
subversion/libsvn_client/ subversion/libsvn_wc/ subversion/tests/cmdline/
subversion/tests/libsvn_client/ subversion/tests/libsvn_subr/
tools/dev/unix-build/
Author: vmpn
Date: Sun Dec 23 06:17:09 2012
New Revision: 1425417
URL: http://svn.apache.org/viewvc?rev=1425417&view=rev
Log:
On the javahl-ra branch:
Bring up-to-date with trunk@1366214
Modified:
subversion/branches/javahl-ra/ (props changed)
subversion/branches/javahl-ra/subversion/libsvn_client/merge.c
subversion/branches/javahl-ra/subversion/libsvn_client/switch.c
subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c
subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c
subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c
subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c
subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c
subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c
subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c
subversion/branches/javahl-ra/subversion/libsvn_wc/props.c
subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c
subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c
subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c
subversion/branches/javahl-ra/tools/dev/unix-build/Makefile.svn
Propchange: subversion/branches/javahl-ra/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1366032-1366214
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=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/merge.c Sun Dec 23 06:17:09 2012
@@ -27,6 +27,7 @@
/*** Includes ***/
+#include <assert.h>
#include <apr_strings.h>
#include <apr_tables.h>
#include <apr_hash.h>
@@ -363,6 +364,21 @@ typedef struct merge_cmd_baton_t {
/*** Utilities ***/
+/* Return TRUE iff the session URL of RA_SESSION is equal to URL. Useful in
+ * asserting preconditions. */
+static svn_boolean_t
+session_url_is(svn_ra_session_t *ra_session,
+ const char *url,
+ apr_pool_t *scratch_pool)
+{
+ const char *session_url;
+ svn_error_t *err
+ = svn_ra_get_session_url(ra_session, &session_url, scratch_pool);
+
+ SVN_ERR_ASSERT_NO_RETURN(! err);
+ return strcmp(url, session_url) == 0;
+}
+
/* Return a new merge_source_t structure, allocated in RESULT_POOL,
* initialized with deep copies of LOC1 and LOC2 and ANCESTRAL. */
static merge_source_t *
@@ -3526,6 +3542,10 @@ fix_deleted_subtree_ranges(const merge_s
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
svn_boolean_t is_rollback = source->loc2->rev < source->loc1->rev;
+ assert(session_url_is(ra_session,
+ (is_rollback ? source->loc1 : source->loc2)->url,
+ scratch_pool));
+
/* CHILDREN_WITH_MERGEINFO is sorted in depth-first order, so
start at index 1 to examine only subtrees. */
for (i = 1; i < children_with_mergeinfo->nelts; i++)
@@ -8413,6 +8433,7 @@ remove_noop_subtree_ranges(const merge_s
apr_array_header_t *inoperative_ranges;
apr_pool_t *iterpool;
+ assert(session_url_is(ra_session, source->loc2->url, scratch_pool));
/* This function is only intended to work with forward merges. */
if (source->loc1->rev > source->loc2->rev)
@@ -9276,6 +9297,9 @@ merge_cousins_and_supplement_mergeinfo(c
subtree mergeinfo, then this will help keep memory use in check. */
apr_pool_t *subpool = svn_pool_create(scratch_pool);
+ assert(session_url_is(URL1_ra_session, source->loc1->url, scratch_pool));
+ assert(session_url_is(URL2_ra_session, source->loc2->url, scratch_pool));
+
SVN_ERR_ASSERT(svn_dirent_is_absolute(target->abspath));
SVN_ERR_ASSERT(! source->ancestral);
@@ -10255,6 +10279,9 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
svn_mergeinfo_catalog_t new_catalog = apr_hash_make(result_pool);
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+ assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
+
*youngest_merged_rev = SVN_INVALID_REVNUM;
/* Examine the natural history of each path in the reintegrate target
@@ -10486,6 +10513,9 @@ calculate_left_hand_side(svn_client__pat
svn_revnum_t youngest_merged_rev;
svn_client__pathrev_t *yc_ancestor;
+ assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+ assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
+
/* Initialize our return variables. */
*left_p = NULL;
@@ -10610,7 +10640,7 @@ calculate_left_hand_side(svn_client__pat
* from SOURCE_LOC into the working copy at TARGET.
*
* SOURCE_RA_SESSION and TARGET_RA_SESSION are RA sessions opened to the
- * source and target branches respectively.
+ * URLs of SOURCE_LOC and TARGET->loc respectively.
*
* Set *SOURCE_P to
* the source-left and source-right locations of the required merge. Set
@@ -10638,6 +10668,9 @@ find_reintegrate_merge(merge_source_t **
svn_error_t *err;
apr_hash_t *subtrees_with_mergeinfo;
+ assert(session_url_is(source_ra_session, source_loc->url, scratch_pool));
+ assert(session_url_is(target_ra_session, target->loc.url, scratch_pool));
+
/* As the WC tree is "pure", use its last-updated-to revision as
the default revision for the left side of our merge, since that's
what the repository sub-tree is required to be up to date with
@@ -11617,22 +11650,25 @@ do_symmetric_merge_locked(const svn_clie
if (merge->mid)
{
merge_source_t source;
- svn_ra_session_t *ra_session = NULL;
+ svn_ra_session_t *base_ra_session = NULL;
+ svn_ra_session_t *right_ra_session = NULL;
+ svn_ra_session_t *target_ra_session = NULL;
+
+ SVN_ERR(ensure_ra_session_url(&base_ra_session, merge->base->url,
+ ctx, scratch_pool));
+ SVN_ERR(ensure_ra_session_url(&right_ra_session, merge->right->url,
+ ctx, scratch_pool));
+ SVN_ERR(ensure_ra_session_url(&target_ra_session, target->loc.url,
+ ctx, scratch_pool));
/* Check for and reject any abnormalities -- such as revisions that
* have not yet been merged in the opposite direction -- that a
* 'reintegrate' merge would have rejected. */
{
merge_source_t *source2;
- svn_ra_session_t *source_ra_session = NULL;
- svn_ra_session_t *target_ra_session = NULL;
- SVN_ERR(ensure_ra_session_url(&source_ra_session, merge->right->url,
- ctx, scratch_pool));
- SVN_ERR(ensure_ra_session_url(&target_ra_session, target->loc.url,
- ctx, scratch_pool));
SVN_ERR(find_reintegrate_merge(&source2, NULL,
- source_ra_session, merge->right,
+ right_ra_session, merge->right,
target_ra_session, target,
ctx, scratch_pool, scratch_pool));
}
@@ -11641,11 +11677,9 @@ do_symmetric_merge_locked(const svn_clie
source.loc2 = merge->right;
source.ancestral = (merge->mid == NULL);
- SVN_ERR(ensure_ra_session_url(&ra_session, source.loc1->url,
- ctx, scratch_pool));
-
err = merge_cousins_and_supplement_mergeinfo(target,
- ra_session, ra_session,
+ base_ra_session,
+ right_ra_session,
&source, merge->yca,
TRUE /* same_repos */,
depth, ignore_ancestry,
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=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/switch.c Sun Dec 23 06:17:09 2012
@@ -226,7 +226,7 @@ switch_internal(svn_revnum_t *result_rev
SVN_RA_CAPABILITY_DEPTH, pool));
dfb.ra_session = ra_session;
- SVN_ERR(svn_ra_get_session_url(ra_session, &dfb.anchor_url, pool));
+ dfb.anchor_url = anchor_url;
dfb.target_revision = switch_loc->rev;
SVN_ERR(svn_wc__get_switch_editor(&switch_editor, &switch_edit_baton,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c Sun Dec 23 06:17:09 2012
@@ -528,23 +528,22 @@ svn_wc__adm_destroy(svn_wc__db_t *db,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- const char *adm_abspath;
+ svn_boolean_t is_wcroot;
SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
- SVN_ERR(svn_wc__db_get_wcroot(&adm_abspath, db, dir_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, dir_abspath, scratch_pool));
/* Well, the coast is clear for blowing away the administrative
directory, which also removes remaining locks */
/* Now close the DB, and we can delete the working copy */
- if (strcmp(adm_abspath, dir_abspath) == 0)
+ if (is_wcroot)
{
- SVN_ERR(svn_wc__db_drop_root(db, adm_abspath, scratch_pool));
- SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(adm_abspath, NULL,
+ SVN_ERR(svn_wc__db_drop_root(db, dir_abspath, scratch_pool));
+ SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(dir_abspath, NULL,
scratch_pool),
FALSE,
cancel_func, cancel_baton,
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=1425417&r1=1425416&r2=1425417&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 06:17:09 2012
@@ -109,11 +109,19 @@ svn_wc__get_committed_queue_pool(const s
* - queue deletion of the old pristine texts by the remembered checksums.
*
* CHECKSUM is the checksum of the new text base for LOCAL_ABSPATH, and must
- * be provided if there is one, else NULL. */
+ * be provided if there is one, else NULL.
+ *
+ * STATUS, KIND, PROP_MODS and OLD_CHECKSUM are the current in-db values of
+ * the node LOCAL_ABSPATH.
+ */
static svn_error_t *
process_committed_leaf(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t via_recurse,
+ svn_wc__db_status_t status,
+ svn_kind_t kind,
+ svn_boolean_t prop_mods,
+ const svn_checksum_t *old_checksum,
svn_revnum_t new_revnum,
apr_time_t new_changed_date,
const char *new_changed_author,
@@ -123,23 +131,11 @@ process_committed_leaf(svn_wc__db_t *db,
const svn_checksum_t *checksum,
apr_pool_t *scratch_pool)
{
- svn_wc__db_status_t status;
- svn_kind_t kind;
- const svn_checksum_t *copied_checksum;
svn_revnum_t new_changed_rev = new_revnum;
- svn_boolean_t prop_mods;
svn_skel_t *work_item = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, &copied_checksum,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, &prop_mods,
- NULL, NULL, NULL,
- db, local_abspath,
- scratch_pool, scratch_pool));
-
{
const char *adm_abspath;
@@ -185,9 +181,9 @@ process_committed_leaf(svn_wc__db_t *db,
{
/* It was copied and not modified. We must have a text
base for it. And the node should have a checksum. */
- SVN_ERR_ASSERT(copied_checksum != NULL);
+ SVN_ERR_ASSERT(old_checksum != NULL);
- checksum = copied_checksum;
+ checksum = old_checksum;
/* Is the node completely unmodified and are we recursing? */
if (via_recurse && !prop_mods)
@@ -249,26 +245,41 @@ svn_wc__process_committed_internal(svn_w
const svn_wc_committed_queue_t *queue,
apr_pool_t *scratch_pool)
{
+ svn_wc__db_status_t status;
svn_kind_t kind;
+ const svn_checksum_t *old_checksum;
+ svn_boolean_t prop_mods;
+
+ SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, &old_checksum, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, &prop_mods, NULL, NULL, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
/* NOTE: be wary of making crazy semantic changes in this function, since
svn_wc_process_committed4() calls this. */
SVN_ERR(process_committed_leaf(db, local_abspath, !top_of_recurse,
+ status, kind, prop_mods, old_checksum,
new_revnum, new_date, rev_author,
new_dav_cache,
no_unlock, keep_changelist,
sha1_checksum,
scratch_pool));
- /* Only check kind after processing the node itself. The node might
- have been deleted */
- SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
- TRUE /* allow_missing */,
- TRUE /* show_hidden */,
- scratch_pool));
+ /* Only check for recursion on nodes that have children */
+ if (kind != svn_kind_file
+ || status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_excluded
+ || status == svn_wc__db_status_server_excluded
+ /* Node deleted -> then no longer a directory */
+ || status == svn_wc__db_status_deleted)
+ {
+ return SVN_NO_ERROR;
+ }
- if (recurse && kind == svn_kind_dir)
+ if (recurse)
{
const apr_array_header_t *children;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -283,38 +294,17 @@ svn_wc__process_committed_internal(svn_w
{
const char *name = APR_ARRAY_IDX(children, i, const char *);
const char *this_abspath;
- svn_wc__db_status_t status;
+ const committed_queue_item_t *cqi;
svn_pool_clear(iterpool);
this_abspath = svn_dirent_join(local_abspath, name, iterpool);
- SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- db, this_abspath,
- iterpool, iterpool));
-
- /* We come to this branch since we have committed a copied tree.
- svn_depth_exclude is possible in this situation. So check and
- skip */
- if (status == svn_wc__db_status_excluded)
- continue;
-
sha1_checksum = NULL;
- if (kind != svn_kind_dir && queue != NULL)
- {
- const committed_queue_item_t *cqi;
+ cqi = apr_hash_get(queue->queue, this_abspath, APR_HASH_KEY_STRING);
- cqi = apr_hash_get(queue->queue, this_abspath,
- APR_HASH_KEY_STRING);
- if (cqi != NULL)
- {
- sha1_checksum = cqi->sha1_checksum;
- }
- }
+ if (cqi != NULL)
+ sha1_checksum = cqi->sha1_checksum;
/* Recurse. Pass NULL for NEW_DAV_CACHE, because the
ones present in the current call are only applicable to
@@ -1962,12 +1952,14 @@ revert_internal(svn_wc__db_t *db,
when local_abspath is the working copy root. */
{
const char *dir_abspath;
+ svn_boolean_t is_wcroot;
- SVN_ERR(svn_wc__db_get_wcroot(&dir_abspath, db, local_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, scratch_pool));
- if (svn_dirent_is_child(dir_abspath, local_abspath, NULL))
+ if (! is_wcroot)
dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+ else
+ dir_abspath = local_abspath;
SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/cleanup.c Sun Dec 23 06:17:09 2012
@@ -142,7 +142,7 @@ cleanup_internal(svn_wc__db_t *db,
apr_pool_t *scratch_pool)
{
int wc_format;
- const char *cleanup_abspath;
+ svn_boolean_t is_wcroot;
/* Can we even work with this directory? */
SVN_ERR(can_be_cleaned(&wc_format, db, dir_abspath, scratch_pool));
@@ -157,8 +157,7 @@ cleanup_internal(svn_wc__db_t *db,
SVN_ERR(svn_wc__wq_run(db, dir_abspath, cancel_func, cancel_baton,
scratch_pool));
- SVN_ERR(svn_wc__db_get_wcroot(&cleanup_abspath, db, dir_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, dir_abspath, scratch_pool));
#ifdef SVN_DEBUG
SVN_ERR(svn_wc__db_verify(db, dir_abspath, scratch_pool));
@@ -169,7 +168,7 @@ cleanup_internal(svn_wc__db_t *db,
svn_wc__check_wcroot() as that function, will just return true
once we start sharing databases with externals.
*/
- if (strcmp(cleanup_abspath, dir_abspath) == 0)
+ if (is_wcroot)
{
/* Cleanup the tmp area of the admin subdir, if running the log has not
removed it! The logs have been run, so anything left here has no hope
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c Sun Dec 23 06:17:09 2012
@@ -1155,7 +1155,7 @@ svn_wc__conflict_create_markers(svn_skel
SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
scratch_pool, scratch_pool));
else
- old_props = their_props;
+ old_props = their_original_props;
prop_data = prop_conflict_skel_new(result_pool);
@@ -1828,7 +1828,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
scratch_pool, scratch_pool));
else
- old_props = their_props;
+ old_props = old_their_props;
iterpool = svn_pool_create(scratch_pool);
@@ -2084,10 +2084,9 @@ svn_wc__read_conflicts(const apr_array_h
and clearing the conflict filenames from the entry. The latter needs to
be done whether or not the conflict files exist.
- PATH is the path to the item to be resolved, BASE_NAME is the basename
- of PATH, and CONFLICT_DIR is the access baton for PATH. ORIG_ENTRY is
- the entry prior to resolution. RESOLVE_TEXT and RESOLVE_PROPS are TRUE
- if text and property conflicts respectively are to be resolved.
+ LOCAL_ABSPATH in DB is the path to the item to be resolved.
+ RESOLVE_TEXT, RESOLVE_PROPS and RESOLVE_TREE are TRUE iff text, property
+ and tree conflicts respectively are to be resolved.
If this call marks any conflict as resolved, set *DID_RESOLVE to true,
else do not change *DID_RESOLVE.
@@ -2107,6 +2106,7 @@ resolve_conflict_on_node(svn_boolean_t *
apr_pool_t *scratch_pool)
{
svn_skel_t *conflicts;
+ svn_wc_operation_t operation;
svn_boolean_t text_conflicted;
svn_boolean_t prop_conflicted;
svn_boolean_t tree_conflicted;
@@ -2122,7 +2122,7 @@ resolve_conflict_on_node(svn_boolean_t *
if (!conflicts)
return SVN_NO_ERROR;
- SVN_ERR(svn_wc__conflict_read_info(NULL, NULL, &text_conflicted,
+ SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, &text_conflicted,
&prop_conflicted, &tree_conflicted,
db, local_abspath, conflicts,
scratch_pool, scratch_pool));
@@ -2265,12 +2265,80 @@ resolve_conflict_on_node(svn_boolean_t *
{
svn_node_kind_t node_kind;
const char *prop_reject_file;
+ apr_hash_t *mine_props;
+ apr_hash_t *their_old_props;
+ apr_hash_t *their_props;
+ apr_hash_t *conflicted_props;
+#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
+ apr_hash_t *old_props;
+ apr_hash_t *resolve_from = NULL;
+#endif
SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_file,
- NULL, NULL, NULL, NULL,
+ &mine_props, &their_old_props,
+ &their_props, &conflicted_props,
db, local_abspath, conflicts,
scratch_pool, scratch_pool));
+#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
+ if (operation == svn_wc_operation_merge)
+ SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+ else
+ old_props = their_old_props;
+
+ /* We currently handle *_conflict as *_full as this argument is currently
+ always applied for all conflicts on a node at the same time. Giving
+ an error would break some tests that assumed that this would just
+ resolve property conflicts to working */
+ switch (conflict_choice)
+ {
+ case svn_wc_conflict_choose_base:
+ resolve_from = their_old_props ? their_old_props : old_props;
+ break;
+ case svn_wc_conflict_choose_mine_full:
+ case svn_wc_conflict_choose_mine_conflict:
+ resolve_from = mine_props;
+ break;
+ case svn_wc_conflict_choose_theirs_full:
+ case svn_wc_conflict_choose_theirs_conflict:
+ resolve_from = their_props;
+ break;
+ case svn_wc_conflict_choose_merged:
+ resolve_from = NULL;
+ break;
+ default:
+ return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
+ _("Invalid 'conflict_result' argument"));
+ }
+
+ if (conflicted_props && apr_hash_count(conflicted_props) && resolve_from)
+ {
+ apr_hash_index_t *hi;
+ apr_hash_t *actual_props;
+
+ SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ for (hi = apr_hash_first(scratch_pool, conflicted_props);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *propname = svn__apr_hash_index_key(hi);
+ svn_string_t *new_value = NULL;
+
+ new_value = apr_hash_get(resolve_from, propname,
+ APR_HASH_KEY_STRING);
+
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
+ new_value);
+ }
+ SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, actual_props,
+ FALSE, NULL, NULL,
+ scratch_pool));
+ }
+#endif
+
/* Legacy behavior: Only report property conflicts as resolved when the
property reject file exists
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/crop.c Sun Dec 23 06:17:09 2012
@@ -115,11 +115,6 @@ crop_children(svn_wc__db_t *db,
}
else if (kind == svn_kind_file)
{
- /* We currently crop on a directory basis. So don't worry about
- svn_depth_exclude here. And even we permit excluding a single
- file in the future, svn_wc_remove_from_revision_control() can
- also handle it. We only need to skip the notification in that
- case. */
if (new_depth == svn_depth_empty)
SVN_ERR(svn_wc__db_op_remove_node(NULL,
db, child_abspath,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c Sun Dec 23 06:17:09 2012
@@ -1554,7 +1554,7 @@ svn_wc__resolve_relative_external_url(co
/* The remaining URLs are relative to either the scheme or server root
and can only refer to locations inside that scope, so backpaths are
not allowed. */
- if (svn_path_is_backpath_present(url + 2))
+ if (svn_path_is_backpath_present(url))
return svn_error_createf(SVN_ERR_BAD_URL, 0,
_("The external relative URL '%s' cannot have "
"backpaths, i.e. '..'"),
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c Sun Dec 23 06:17:09 2012
@@ -241,13 +241,11 @@ detranslate_wc_file(const char **detrans
if (force_copy || keywords || eol || special)
{
- const char *wcroot_abspath, *temp_dir_abspath;
+ const char *temp_dir_abspath;
const char *detranslated;
/* Force a copy into the temporary wc area to avoid having
temporary files created below to appear in the actual wc. */
- SVN_ERR(svn_wc__db_get_wcroot(&wcroot_abspath, mt->db, mt->wri_abspath,
- scratch_pool, scratch_pool));
SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir_abspath, mt->db,
mt->wri_abspath,
scratch_pool, scratch_pool));
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=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/props.c Sun Dec 23 06:17:09 2012
@@ -1207,7 +1207,7 @@ svn_wc__merge_props(svn_skel_t **conflic
*new_actual_props = NULL;
if (!server_baseprops)
- server_baseprops = pristine_props;
+ server_baseprops = apr_hash_copy(scratch_pool, pristine_props);
their_props = apr_hash_copy(scratch_pool, server_baseprops);
@@ -1227,7 +1227,9 @@ svn_wc__merge_props(svn_skel_t **conflic
const char *propname;
svn_boolean_t conflict_remains;
const svn_prop_t *incoming_change;
- const svn_string_t *from_val, *to_val, *base_val;
+ const svn_string_t *base_val; /* Pristine in WC */
+ const svn_string_t *from_val; /* Merge left */
+ const svn_string_t *to_val; /* Merge right */
svn_pool_clear(iterpool);
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c Sun Dec 23 06:17:09 2012
@@ -12502,7 +12502,8 @@ svn_wc__db_read_kind(svn_kind_t *kind,
SVN_ERR(convert_to_working_status(&status, status));
if (status == svn_wc__db_status_not_present
- || status == svn_wc__db_status_excluded)
+ || status == svn_wc__db_status_excluded
+ || status == svn_wc__db_status_server_excluded)
{
*kind = svn_kind_none;
SVN_ERR(svn_sqlite__reset(stmt_info));
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c Sun Dec 23 06:17:09 2012
@@ -855,11 +855,12 @@ pristine_cleanup_wcroot(svn_wc__db_wcroo
apr_pool_t *scratch_pool)
{
svn_sqlite__stmt_t *stmt;
+ svn_error_t *err = NULL;
/* Find each unreferenced pristine in the DB and remove it. */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_UNREFERENCED_PRISTINES));
- while (1)
+ while (! err)
{
svn_boolean_t have_row;
const svn_checksum_t *sha1_checksum;
@@ -870,12 +871,12 @@ pristine_cleanup_wcroot(svn_wc__db_wcroo
SVN_ERR(svn_sqlite__column_checksum(&sha1_checksum, stmt, 0,
scratch_pool));
- SVN_ERR(pristine_remove_if_unreferenced(wcroot, sha1_checksum,
- scratch_pool));
+ err = pristine_remove_if_unreferenced(wcroot, sha1_checksum,
+ scratch_pool);
}
- SVN_ERR(svn_sqlite__reset(stmt));
- return SVN_NO_ERROR;
+ return svn_error_trace(
+ svn_error_compose_create(err, svn_sqlite__reset(stmt)));
}
svn_error_t *
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py Sun Dec 23 06:17:09 2012
@@ -13124,7 +13124,7 @@ def merge_two_edits_to_same_prop(sbox):
" C %s\n" % mu_path,
], prop_conflicts=1,
args=['--allow-mixed-revisions',
- '--accept=theirs-conflict'],
+ '--accept=working'],
resolved=[mu_path])
svn_merge(rev4, A_COPY_path, A_path, [
" C %s\n" % mu_path,
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c Sun Dec 23 06:17:09 2012
@@ -33,6 +33,7 @@
#include "svn_client.h"
#include "svn_repos.h"
#include "svn_subst.h"
+#include "private/svn_wc_private.h"
#include "../svn_test.h"
#include "../svn_test_fs.h"
@@ -720,6 +721,88 @@ test_youngest_common_ancestor(const svn_
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_externals_parse(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ int i;
+ struct external_info
+ {
+ const char *line;
+ const char *url;
+ const char *local_path;
+ svn_revnum_t peg_rev;
+ svn_revnum_t rev;
+
+ } items[] = {
+ {
+ "dir http://server/svn/a",
+ "http://server/svn/a",
+ "dir"
+ },
+ {
+ "/svn/home dir",
+ "u://svr/svn/home",
+ "dir"
+ },
+ {
+ "//server/home dir",
+ "u://server/home",
+ "dir"
+ },
+ {
+ "../../../../home dir",
+ "u://svr/svn/home",
+ "dir",
+ },
+ {
+ "^/../repB/tools/scripts scripts",
+ "u://svr/svn/cur/repB/tools/scripts",
+ "scripts"
+ },
+ {
+ "^/../repB/tools/README.txt scripts/README.txt",
+ "u://svr/svn/cur/repB/tools/README.txt",
+ "scripts/README.txt"
+ },
+ };
+
+
+ for (i = 0; i < sizeof(items) / sizeof(items[0]); i++)
+ {
+ apr_array_header_t *results;
+ svn_wc_external_item2_t *external_item;
+ const char *resolved_url;
+ SVN_ERR(svn_wc_parse_externals_description3(&results, "/my/current/dir",
+ items[i].line, FALSE, pool));
+
+ SVN_TEST_ASSERT(results && results->nelts == 1);
+
+ external_item = APR_ARRAY_IDX(results, 0, svn_wc_external_item2_t *);
+
+ SVN_ERR(svn_wc__resolve_relative_external_url(&resolved_url,
+ external_item,
+ "u://svr/svn/cur/dir",
+ "u://svr/svn/cur/dir/sd/fl",
+ pool, pool));
+
+ SVN_TEST_STRING_ASSERT(resolved_url, items[i].url);
+ SVN_TEST_STRING_ASSERT(external_item->target_dir, items[i].local_path);
+
+ if (items[i].peg_rev != 0)
+ SVN_TEST_ASSERT(external_item->peg_revision.value.number
+ == items[i].peg_rev);
+ if (items[i].rev != 0)
+ SVN_TEST_ASSERT(external_item->revision.value.number == items[i].rev);
+ SVN_TEST_ASSERT(svn_uri_is_canonical(resolved_url, pool));
+ }
+
+
+ return SVN_NO_ERROR;
+
+}
+
+
+
/* ========================================================================== */
@@ -737,5 +820,6 @@ struct svn_test_descriptor_t test_funcs[
SVN_TEST_OPTS_PASS(test_16k_add, "test adding 16k files"),
#endif
SVN_TEST_OPTS_PASS(test_youngest_common_ancestor, "test youngest_common_ancestor"),
+ SVN_TEST_OPTS_PASS(test_externals_parse, "test svn_wc_parse_externals_description3"),
SVN_TEST_NULL
};
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c Sun Dec 23 06:17:09 2012
@@ -670,6 +670,7 @@ test_dirent_canonicalize(apr_pool_t *poo
{ "foo/../", "foo/.." },
{ "foo/../.", "foo/.." },
{ "foo//.//bar", "foo/bar" },
+ { "//foo", "/foo" },
{ "///foo", "/foo" },
{ "/.//./.foo", "/.foo" },
{ ".///.foo", ".foo" },
@@ -743,6 +744,7 @@ test_relpath_canonicalize(apr_pool_t *po
{ "foo/../", "foo/.." },
{ "foo/../.", "foo/.." },
{ "foo//.//bar", "foo/bar" },
+ { "//foo", "foo" },
{ "///foo", "foo" },
{ "/.//./.foo", ".foo" },
{ ".///.foo", ".foo" },
@@ -919,6 +921,7 @@ static const testcase_canonicalize_t uri
{ "foo/../", NULL },
{ "foo/../.", NULL },
{ "foo//.//bar", NULL },
+ { "//foo", NULL },
{ "///foo", NULL },
{ "/.//./.foo", NULL },
{ ".///.foo", NULL },
@@ -1006,6 +1009,7 @@ test_dirent_is_canonical(apr_pool_t *poo
{ "foo/../", FALSE },
{ "foo/../.", FALSE },
{ "foo//.//bar", FALSE },
+ { "//foo", FALSE },
{ "///foo", FALSE },
{ "/.//./.foo", FALSE },
{ ".///.foo", FALSE },
@@ -1106,6 +1110,7 @@ test_relpath_is_canonical(apr_pool_t *po
{ "foo/../", FALSE },
{ "foo/../.", FALSE },
{ "foo//.//bar", FALSE },
+ { "//foo", FALSE },
{ "///foo", FALSE },
{ "/.//./.foo", FALSE },
{ ".///.foo", FALSE },
Modified: subversion/branches/javahl-ra/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/tools/dev/unix-build/Makefile.svn?rev=1425417&r1=1425416&r2=1425417&view=diff
==============================================================================
--- subversion/branches/javahl-ra/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/javahl-ra/tools/dev/unix-build/Makefile.svn Sun Dec 23 06:17:09 2012
@@ -624,9 +624,17 @@ $(DISTDIR)/$(NEON_DIST):
cd $(DISTDIR) && $(FETCH_CMD) $(NEON_URL)
# retrieve neon
+NEON_SVN_URL=http://svn.webdav.org/repos/projects/neon/trunk
$(NEON_OBJDIR)/.retrieved: $(DISTDIR)/$(NEON_DIST)
[ -d $(NEON_OBJDIR) ] || mkdir -p $(NEON_OBJDIR)
tar -C $(SRCDIR) -zxf $(DISTDIR)/$(NEON_DIST)
+ # fix build with OpenSSL lacking SSLv2 support:
+ cd $(NEON_SRCDIR)/src && svn diff -c 1865 \
+ $(NEON_SVN_URL)/src/ne_openssl.c | patch -p0
+ cd $(NEON_SRCDIR)/src && svn diff -c 1865 \
+ $(NEON_SVN_URL)/src/ne_ssl.h | patch -p0
+ cd $(NEON_SRCDIR)/src && svn diff -c 1865 \
+ $(NEON_SVN_URL)/src/ne_session.c | patch -p0
touch $@
# OpenBSD does not have krb5-config in PATH, but the neon port has