On Thu, Oct 1, 2009 at 08:44, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_client/merge.c    Thu Oct  1 05:44:40 2009     (r39733)
> @@ -417,13 +417,14 @@ obstructed_or_missing(const char *path,
> Â svn_error_t *err;
> Â const svn_wc_entry_t *entry;
> Â svn_node_kind_t kind_expected, kind_on_disk;
> + Â svn_boolean_t obstructed;
> Â const char *local_abspath;
>
> Â err = svn_dirent_get_absolute(&local_abspath, path, pool);
>
> Â if (!err)
> Â Â err = svn_wc__maybe_get_entry(&entry, merge_b->ctx->wc_ctx, local_abspath,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_node_unknown, TRUE, FALSE, pool, pool);
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_node_unknown, FALSE, FALSE, pool, pool);
Why did you change the SHOW_HIDDEN parameter here? That seems quite
unrelated to the obstructed/missing question.
> Â if (err)
> Â Â {
> Â Â Â svn_error_clear(err);
> @@ -433,6 +434,19 @@ obstructed_or_missing(const char *path,
> Â if (entry && entry->absent)
> Â Â return svn_wc_notify_state_missing;
>
> + Â /* svn_wc__maybe_get_entry ignores node kind errors, so check if we
> + Â Â didn't get the parent stub */
> + Â if (entry && entry->kind == svn_node_dir && *entry->name != '\0')
> + Â Â return svn_wc_notify_state_missing; /* Only found parent entry */
> +
> + Â err = svn_wc__temp_node_obstructed(&obstructed, merge_b->ctx->wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â local_abspath, pool);
> +
> + Â if (err)
> + Â Â svn_error_clear(err);
> + Â else if (obstructed)
> + Â Â return svn_wc_notify_state_obstructed;
I'm not sure why you need a whole new API here. Can't you just look at
the node on the disk?
The "Only found parent entry" solves two cases: the subdir is missing,
or the subdir is obstructed by a file.
So you only need to test for: file is missing or obstructed by a
directory. Which is a simple svn_io_check_path().
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402513
Received on 2009-10-01 15:31:05 CEST