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

Re: svn commit: r39733 - in trunk/subversion: include/private libsvn_client libsvn_wc tests/cmdline

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 1 Oct 2009 09:30:55 -0400

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

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.