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

Re: svn commit: r34119 - branches/tc-resolve/subversion/libsvn_wc

From: Neels J. Hofmeyr <neels_at_elego.de>
Date: Mon, 10 Nov 2008 06:14:30 +0100

Hey Julian,

check out my changes to your patch, on branch tc-resolve.

r34117: cp trunk branches/tc-resolve
r34118: check in your patch.
r34119: my changes.

update_tests 15 passes now, so does tree_conflicts_tests 1, so far so good.
However, maybe more extensive fixes are needed for tree-conflicts at greater
subdir depths (in missing subtrees). Do we care about that yet?

I got your "woo-hoo!" message to be displayed on tc test 2:

[[[
[...]
CMD: svn resolved branch1/fD/F --config-dir [...]
### Unversioned... woo-hoo! resolve_f_e_cb('branch1/fD/F')
EXPECTED STDOUT (regexp):
Resolved .* 'branch1\/fD\/F'
ACTUAL STDOUT:
### Unversioned... woo-hoo! resolve_f_e_cb('branch1/fD/F')
EXCEPTION: SVNUnmatchedError
[...]
FAIL: tree_conflict_tests.py 2: up/sw file: del/rpl/mv onto modify
]]]

But when I let the resolve code run in that case (not return SVN_NO_ERROR),
I get a segmentation fault which I haven't investigated yet.

~Neels

neels_at_tigris.org wrote:
> Author: neels
> Date: Sun Nov 9 21:00:23 2008
> New Revision: 34119
>
> Log:
> On *lightweight* branch tc-resolve:
>
> Allow sched-deleted nodes to be resolved (fixes update_tests.py 15).
> Also avoid a segmentation fault when svn_wc__loggy_del_tree_conflict() didn't
> write anything to the log.
>
> * subversion/libsvn_wc/adm_ops.c
> (resolve_found_entry_callback):
> Allow sched-deleted nodes to be resolved.
> Comment a debugging printf that would fail update_tests.py 15.
> ### Have some other debugging printfs, have to be removed again.
>
> * subversion/libsvn_wc/entries.c
> (visit_tc_too_found_entry):
> Only try to retrieve the ADM_ACCESS in presence of tree-conflicts.
> (visit_tc_too_error_handler):
> Get the ADM_ACCESS on the parent instead of on the node itself, thus
> avoid an error upon an unversioned tree-conflict victim.
> ### TODO: check for greater subdir depths.
>
> * subversion/libsvn_wc/tree_conflicts.c
> (svn_wc__del_tree_conflict):
> Only write and run the log if LOG_ACCUM is not NULL.
>
> Modified:
> branches/tc-resolve/subversion/libsvn_wc/adm_ops.c
> branches/tc-resolve/subversion/libsvn_wc/entries.c
> branches/tc-resolve/subversion/libsvn_wc/tree_conflicts.c
>
> Modified: branches/tc-resolve/subversion/libsvn_wc/adm_ops.c
> URL: http://svn.collab.net/viewvc/svn/branches/tc-resolve/subversion/libsvn_wc/adm_ops.c?pathrev=34119&r1=34118&r2=34119
> ==============================================================================
> --- branches/tc-resolve/subversion/libsvn_wc/adm_ops.c Sun Nov 9 18:39:10 2008 (r34118)
> +++ branches/tc-resolve/subversion/libsvn_wc/adm_ops.c Sun Nov 9 21:00:23 2008 (r34119)
> @@ -2881,13 +2881,12 @@ resolve_found_entry_callback(const char
> }
> if (entry->deleted || entry->absent)
> {
> - /* printf("### resolve_f_e_cb('%s'): Deleted or Absent\n", path); */
> + printf("### resolve_f_e_cb('%s'): Deleted or Absent\n", path);
> return SVN_NO_ERROR;
> }
> if (entry->schedule == svn_wc_schedule_delete)
> {
> - /* printf("### Sched-delete: resolve_f_e_cb('%s')\n", path); */
> - return SVN_NO_ERROR; /* ### ? From now on, I think we want to resolve it anyway. */
> + printf("### Sched-delete: resolve_f_e_cb('%s')\n", path);
> }
>
> /* We're going to receive dirents twice; we want to ignore the
> @@ -2935,7 +2934,7 @@ resolve_found_entry_callback(const char
> SVN_ERR(svn_wc_conflicted_p2(&text_conflict, &prop_conflict,
> &tree_conflict, path, adm_access,
> pool));
> - printf("### resolve_found_entry cb ('%s'):%d,%d,%d\n", path, text_conflict, prop_conflict, tree_conflict);
> + /*printf("### resolve_found_entry cb ('%s'):%d,%d,%d\n", path, text_conflict, prop_conflict, tree_conflict);*/
> if ((! (baton->resolve_text && text_conflict))
> && (! (baton->resolve_props && prop_conflict))
> && (! (baton->resolve_tree && tree_conflict)))
>
> Modified: branches/tc-resolve/subversion/libsvn_wc/entries.c
> URL: http://svn.collab.net/viewvc/svn/branches/tc-resolve/subversion/libsvn_wc/entries.c?pathrev=34119&r1=34118&r2=34119
> ==============================================================================
> --- branches/tc-resolve/subversion/libsvn_wc/entries.c Sun Nov 9 18:39:10 2008 (r34118)
> +++ branches/tc-resolve/subversion/libsvn_wc/entries.c Sun Nov 9 21:00:23 2008 (r34119)
> @@ -3341,17 +3341,19 @@ visit_tc_too_found_entry(const char *pat
> * tree conflict victims. */
> if (entry->kind == svn_node_dir && !entry_is_hidden(entry))
> {
> - svn_wc_adm_access_t *adm_access;
> + svn_wc_adm_access_t *adm_access = NULL;
> apr_array_header_t *conflicts
> = apr_array_make(pool, 0, sizeof(svn_wc_conflict_description_t *));
> int i;
>
> - SVN_ERR(svn_wc_adm_retrieve(&adm_access, baton->adm_access, path,
> - pool));
> -
> /* Loop through all the tree conflict victims */
> SVN_ERR(svn_wc__read_tree_conflicts_from_entry(conflicts, entry,
> path, pool));
> +
> + if (conflicts->nelts > 0)
> + SVN_ERR(svn_wc_adm_retrieve(&adm_access, baton->adm_access, path,
> + pool));
> +
> for (i = 0; i < conflicts->nelts; i++)
> {
> svn_wc_conflict_description_t *conflict
> @@ -3399,9 +3401,10 @@ visit_tc_too_error_handler(const char *p
> {
> svn_wc_adm_access_t *adm_access;
> svn_wc_conflict_description_t *conflict;
> + char *parent_path = svn_path_dirname(path, pool);
>
> /* See if there is any tree conflict on this path. */
> - SVN_ERR(svn_wc_adm_retrieve(&adm_access, baton->adm_access, path,
> + SVN_ERR(svn_wc_adm_retrieve(&adm_access, baton->adm_access, parent_path,
> pool));
> SVN_ERR(svn_wc_get_tree_conflict(&conflict, path, adm_access, pool));
>
>
> Modified: branches/tc-resolve/subversion/libsvn_wc/tree_conflicts.c
> URL: http://svn.collab.net/viewvc/svn/branches/tc-resolve/subversion/libsvn_wc/tree_conflicts.c?pathrev=34119&r1=34118&r2=34119
> ==============================================================================
> --- branches/tc-resolve/subversion/libsvn_wc/tree_conflicts.c Sun Nov 9 18:39:10 2008 (r34118)
> +++ branches/tc-resolve/subversion/libsvn_wc/tree_conflicts.c Sun Nov 9 21:00:23 2008 (r34119)
> @@ -478,8 +478,11 @@ svn_wc__del_tree_conflict(const char *vi
> SVN_ERR(svn_wc__loggy_del_tree_conflict(&log_accum, victim_path, adm_access,
> pool));
>
> - SVN_ERR(svn_wc__write_log(adm_access, 0, log_accum, pool));
> - SVN_ERR(svn_wc__run_log(adm_access, NULL, pool));
> + if (log_accum != NULL)
> + {
> + SVN_ERR(svn_wc__write_log(adm_access, 0, log_accum, pool));
> + SVN_ERR(svn_wc__run_log(adm_access, NULL, pool));
> + }
>
> return SVN_NO_ERROR;
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>

Received on 2008-11-10 06:15:08 CET

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.