[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r27468 - in trunk/subversion: libsvn_client tests/cmdline

From: Paul Burba <pburba_at_collab.net>
Date: 2007-10-30 16:33:36 CET

In IRC today:

<Kamesh> pburba: I could see merge_tests-71 failing since r27468 over
ra_local *only via testsuite* not via the installed binary
<Kamesh> If I just revert r27468 then test passes via testsuite
<pburba> Kamesh: Can you paste the log, it passes for me.
<Kamesh> Paul: http://www.pastebin.ca/755205

Hi Kamesh,

I'm at a bit of a loss here, this test passes for me and it isn't
failing on any of the buildbots. Can anyone else replicate this
failure?

Also, could you explain "*only via testsuite* not via the installed
binary"? I'm not sure what you mean by that.

Thanks,

Paul

> -----Original Message-----
> From: pburba@tigris.org [mailto:pburba@tigris.org]
> Sent: Monday, October 29, 2007 4:36 PM
> To: svn@subversion.tigris.org
> Subject: svn commit: r27468 - in trunk/subversion:
> libsvn_client tests/cmdline
>
> Author: pburba
> Date: Mon Oct 29 13:35:53 2007
> New Revision: 27468
>
> Log:
> Partial fix for issue #2929 Improve handling for skipped
> paths encountered during a merge. Make use of our existing
> code for handling mergeinfo for skipped/missing paths to also
> handle paths 'missing' because they are scheduled for deletion.
>
> * subversion/libsvn_client/merge.c
> (remove_absent_children): Remove paths scheduled for deletion.
> (get_mergeinfo_walk_cb): Add paths scheduled for deletion
> to the type of
> paths collected.
> (insert_parent_and_siblings_of_switched_or_absent_entry): Renamed to
> insert_parent_and_sibs_of_sw_absent_del_entry() to reflect
> new purpose and
> attempt to keep the function name somewhat manageable.
> (insert_parent_and_sibs_of_sw_absent_del_entry): Renamed from
> insert_parent_and_siblings_of_switched_or_absent_entry(),
> now processes
> paths scheduled for deletion in addition to those absent
> from disk and/or
> switched.
> (get_mergeinfo_paths): Tweak doc stringto reflect changes
> to helpers,
> update call to renamed helper
> insert_parent_and_sibs_of_sw_absent_del_entry(), and
> initialize new member
> of svn_client__merge_path_t.
>
> * subversion/libsvn_client/mergeinfo.h
> (svn_client__merge_path_t): Add new member 'scheduled_for_deletion'.
>
> * subversion/tests/cmdline/merge_tests.py
> (merge_loses_mergeinfo): Add comment re XFail status tied
> to issue #2829.
> (test_list): Remove XFail from
> mergeinfo_recording_in_skipped_merge, add
> XFail to merge_loses_mergeinfo.
>
>
> Modified:
> trunk/subversion/libsvn_client/merge.c
> trunk/subversion/libsvn_client/mergeinfo.h
> trunk/subversion/tests/cmdline/merge_tests.py
>
> Modified: trunk/subversion/libsvn_client/merge.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_clien
> t/merge.c?pathrev=27468&r1=27467&r2=27468
> ==============================================================
> ================
> --- trunk/subversion/libsvn_client/merge.c (original)
> +++ trunk/subversion/libsvn_client/merge.c Mon Oct 29 13:35:53 2007
> @@ -1484,13 +1484,13 @@
> err = svn_client__record_wc_mergeinfo(path, mergeinfo,
> adm_access, subpool);
>
> - if (err && err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
> - {
> - /* PATH isn't just missing, it's not even
> versioned as far as this
> - working copy knows. But it was included in
> MERGES, which means
> - that the server knows about it. Likely we
> don't have access to
> - the source due to authz restrictions. For now
> just clear the
> - error and continue...
> + if (err && err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
> + {
> + /* PATH isn't just missing, it's not even
> versioned as far as this
> + working copy knows. But it was included in
> MERGES, which means
> + that the server knows about it. Likely we
> don't have access to
> + the source due to authz restrictions. For
> now just clear the
> + error and continue...
>
> ### TODO: Set non-inheritable mergeinfo on
> PATH's immediate
> ### parent and normal mergeinfo on PATH's
> siblings which we @@ -1654,10 +1654,10 @@
>
> TARGET_WCPATH is a directory and CHILDREN_WITH_MERGEINFO is filled
> with paths (svn_client__merge_path_t *) arranged in depth
> first order,
> - which have mergeinfo set on them or are absent from the WC (see
> - discover_and_merge_children and get_mergeinfo_paths). Remove any
> - absent paths in CHILDREN_WITH_MERGEINFO which are equal to or are
> - descendents of TARGET_WCPATH by setting those children to NULL.
> + which have mergeinfo set on them or meet one of the other criteria
> + defined in get_mergeinfo_paths(). Remove any paths
> absent from disk
> + or scheduled for deletion from CHILDREN_WITH_MERGEINFO
> which are equal to
> + or are descendents of TARGET_WCPATH by setting those
> children to NULL.
> Also remove the path from the NOTIFY_B->SKIPPED_PATHS
> hash. */ static void remove_absent_children(const char
> *target_wcpath, @@ -1674,7 +1674,7 @@
> APR_ARRAY_IDX(children_with_mergeinfo,
> i, svn_client__merge_path_t *);
> if (child
> - && child->absent
> + && (child->absent || child->scheduled_for_deletion)
> && svn_path_is_ancestor(target_wcpath, child->path))
> {
> if (notify_b->skipped_paths)
> @@ -2812,10 +2812,10 @@
> Given PATH, its corresponding ENTRY, and WB, where WB is
> the WALK_BATON
> of type "struct get_mergeinfo_walk_baton *": If PATH is switched,
> has explicit working svn:mergeinfo from a corresponding
> merge source, is
> - missing a child due to a sparse checkout, or is absent
> from disk, then
> - create a svn_client__merge_path_t * representing *PATH,
> allocated in
> - WB->CHILDREN_WITH_MERGEINFO->POOL, and push it onto the
> - WB->CHILDREN_WITH_MERGEINFO array. */
> + missing a child due to a sparse checkout, is absent from
> disk, or is
> + scheduled for deletion, then create a svn_client__merge_path_t *
> + representing *PATH, allocated in
> WB->CHILDREN_WITH_MERGEINFO->POOL, and
> + push it onto the WB->CHILDREN_WITH_MERGEINFO array. */
> static svn_error_t *
> get_mergeinfo_walk_cb(const char *path,
> const svn_wc_entry_t *entry, @@
> -2839,10 +2839,10 @@
> return SVN_NO_ERROR;
>
> /* Ignore the entry if it does not exist at the time of
> interest. */
> - if (entry->schedule == svn_wc_schedule_delete || entry->deleted)
> + if (entry->deleted)
> return SVN_NO_ERROR;
>
> - if (entry->absent)
> + if (entry->absent || entry->schedule == svn_wc_schedule_delete)
> {
> propval = NULL;
> switched = FALSE;
> @@ -2888,10 +2888,11 @@
> }
>
> /* Store PATHs with explict mergeinfo, which are switched,
> are missing
> - children due to a sparse checkout, and/or are absent
> from the WC,
> - first level sub directory relative to merge target if depth is
> - immediates. */
> + children due to a sparse checkout, are scheduled for
> deletion are absent
> + from the WC, and/or are first level sub directories
> relative to merge
> + target if depth is immediates. */
> if (has_mergeinfo_from_merge_src
> + || entry->schedule == svn_wc_schedule_delete
> || switched
> || entry->depth == svn_depth_empty
> || entry->depth == svn_depth_files @@ -2913,6 +2914,8 @@
> ? TRUE : FALSE;
> child->switched = switched;
> child->absent = entry->absent;
> + child->scheduled_for_deletion =
> + entry->schedule == svn_wc_schedule_delete ? TRUE : FALSE;
> if (propval)
> {
> if (strstr(propval->data,
> SVN_MERGEINFO_NONINHERITABLE_STR))
> @@ -3101,16 +3104,17 @@
> return svn_path_compare_paths(child1->path, child2->path); }
>
> -/* Helper for get_mergeinfo_paths(). If CHILD->PATH is switched or
> - absent make sure its parent is marked as missing a child. Start
> - looking up for parent from *CURR_INDEX in CHILDREN_WITH_MERGEINFO.
> - Create the parent and insert it into CHILDREN_WITH_MERGEINFO if
> - necessary (and increment *CURR_INDEX so that caller don't process
> - the inserted element). Also ensure that CHILD->PATH's siblings
> - which are not already present in CHILDREN_WITH_MERGEINFO are also
> - added to the array. Use POOL for all temporary allocations. */
> +/* Helper for get_mergeinfo_paths(). If CHILD->PATH is switched,
> + absent, or scheduled for deletion make sure its parent is marked
> + as missing a child. Start looking up for parent from *CURR_INDEX
> + in CHILDREN_WITH_MERGEINFO. Create the parent and insert it into
> + CHILDREN_WITH_MERGEINFO if necessary (and increment *CURR_INDEX
> + so that caller don't process the inserted element). Also ensure
> + that CHILD->PATH's siblings which are not already present in
> + CHILDREN_WITH_MERGEINFO are also added to the array. Use POOL for
> + all temporary allocations. */
> static svn_error_t *
> -insert_parent_and_siblings_of_switched_or_absent_entry(
> +insert_parent_and_sibs_of_sw_absent_del_entry(
> apr_array_header_t
> *children_with_mergeinfo,
> struct merge_cmd_baton
> *merge_cmd_baton,
> int *curr_index, @@
> -3126,6 +3130,7 @@
> int insert_index, parent_index;
>
> if (!(child->absent
> + || child->scheduled_for_deletion
> || (child->switched
> && strcmp(merge_cmd_baton->target, child->path) != 0)))
> return SVN_NO_ERROR;
> @@ -3146,6 +3151,7 @@
> parent->has_noninheritable = FALSE;
> parent->absent = FALSE;
> parent->propval = NULL;
> + parent->scheduled_for_deletion = FALSE;
> /* Insert PARENT into CHILDREN_WITH_MERGEINFO. */
> insert_child_to_merge(children_with_mergeinfo, parent,
> parent_index);
> /* Increment for loop index so we don't process the
> inserted element. */ @@ -3185,6 +3191,7 @@
> sibling_of_missing->has_noninheritable = FALSE;
> sibling_of_missing->absent = FALSE;
> sibling_of_missing->propval = NULL;
> + sibling_of_missing->scheduled_for_deletion = FALSE;
> insert_child_to_merge(children_with_mergeinfo,
> sibling_of_missing,
> insert_index);
> }
> @@ -3208,8 +3215,10 @@
> the child is switched or absent from the WC, or due
> to a sparse
> checkout.
> 5) Path has a sibling (or siblings) missing from the WC
> because the
> - sibling is switched or absent, or missing due to a
> sparse checkout.
> + sibling is switched, absent, schduled for deletion,
> or missing due to
> + a sparse checkout.
> 6) Path is absent from disk due to an authz restriction.
> + 7) Path is scheduled for deletion.
>
> Criteria 4 and 5 are handled by
> 'insert_parent_and_siblings_of_switched_or_absent_entry'.
> Store @@ -3341,6 +3350,7 @@
>
> child_of_noninheritable->has_noninheritable = FALSE;
> child_of_noninheritable->absent = FALSE;
> child_of_noninheritable->propval = NULL;
> + child_of_noninheritable->scheduled_for_deletion =
> + FALSE;
> insert_child_to_merge(children_with_mergeinfo,
> child_of_noninheritable,
> insert_index); @@
> -3363,12 +3373,10 @@
> }
> }
> }
> - /* Case 4 and Case 5 are handled by the following function.*/
> - SVN_ERR(insert_parent_and_siblings_of_switched_or_absent_entry(
> -
> children_with_mergeinfo,
> -
> merge_cmd_baton, &i,
> - child,
> adm_access,
> - iterpool));
> + /* Case 4, 5, and 7 are handled by the following function. */
> + SVN_ERR(insert_parent_and_sibs_of_sw_absent_del_entry(
> + children_with_mergeinfo, merge_cmd_baton, &i, child,
> + adm_access, iterpool));
> } /* i < children_with_mergeinfo->nelts */
>
> /* Push default target */
> @@ -3412,6 +3420,7 @@
> target_item->absent = FALSE;
> target_item->propval = NULL;
> target_item->has_noninheritable = FALSE;
> + target_item->scheduled_for_deletion = FALSE;
> if (target_item->missing_child)
> target_item->has_noninheritable = TRUE;
> insert_child_to_merge(children_with_mergeinfo,
> target_item, 0);
>
> Modified: trunk/subversion/libsvn_client/mergeinfo.h
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_clien
> t/mergeinfo.h?pathrev=27468&r1=27467&r2=27468
> ==============================================================
> ================
> --- trunk/subversion/libsvn_client/mergeinfo.h (original)
> +++ trunk/subversion/libsvn_client/mergeinfo.h Mon Oct
> 29 13:35:53 2007
> @@ -51,6 +51,7 @@
> apr_hash_t *pre_merge_mergeinfo; /* mergeinfo on a
> path prior to a
> merge.*/
> svn_boolean_t indirect_mergeinfo;
> + svn_boolean_t scheduled_for_deletion; /* PATH is scheduled for
> + deletion. */
> } svn_client__merge_path_t;
>
>
>
> Modified: trunk/subversion/tests/cmdline/merge_tests.py
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdlin
> e/merge_tests.py?pathrev=27468&r1=27467&r2=27468
> ==============================================================
> ================
> --- trunk/subversion/tests/cmdline/merge_tests.py (original)
> +++ trunk/subversion/tests/cmdline/merge_tests.py Mon Oct
> 29 13:35:53 2007
> @@ -7420,7 +7420,7 @@
> expected_status,
> check_props=1)
>
> -
> +# Tests part of issue# 2829, marked as XFail until that
> issue is fixed.
> def merge_loses_mergeinfo(sbox):
> "merge does not merge mergeinfo"
>
> @@ -9588,7 +9588,7 @@
> XFail(avoid_reflected_revs),
> Skip(mergeinfo_and_skipped_paths,
> svntest.main.is_ra_type_file),
> update_loses_mergeinfo,
> - merge_loses_mergeinfo,
> + XFail(merge_loses_mergeinfo),
> single_file_replace_style_merge_capability,
> merge_to_out_of_date_target,
> merge_with_depth_files,
> @@ -9599,7 +9599,7 @@
> merge_with_child_having_different_rev_ranges_to_merge,
> merge_old_and_new_revs_from_renamed_file,
> merge_with_auto_rev_range_detection,
> - XFail(mergeinfo_recording_in_skipped_merge),
> + mergeinfo_recording_in_skipped_merge,
> cherry_picking,
> propchange_of_subdir_raises_conflict,
> reverse_merge_prop_add_on_child,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 30 16:49:29 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.