kfogel@collab.net writes:
> -      /* The revisions must match except when adding a directory with a
> -         name that matches a directory scheduled for deletion. That's
> -         because the deleted directory's administrative dir will still be
> -         in place but will have an arbitrary revision. */
> -      if (entry->revision != revision
> -          && !(entry->schedule == svn_wc_schedule_delete && revision == 0))
> -        return
> -          svn_error_createf
> -          (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
> -           _("Revision %ld doesn't match existing revision %ld in '%s'"),
> -           revision, entry->revision,
> -           svn_path_local_style (path, pool));
> +      /* When the directory exists and is scheduled for deletion do not
> +       * check the revision or the URL.  The revision can be any 
> +       * arbitrary revision and the URL may differ if the add is
> +       * being driven from a merge which will have a different URL. */
> +      if (entry->schedule != svn_wc_schedule_delete)
> +        {
> +          if (entry->revision != revision)
> +            return
> +              svn_error_createf
> +              (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
> +               _("Revision %ld doesn't match existing revision %ld in '%s'"),
> +               revision, entry->revision, path);
>  
> -      /** ### comparing URLs, should they be canonicalized first? */
> -      if (strcmp (entry->url, url) != 0)
> -        return
> -          svn_error_createf
> -          (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
> -           _("URL '%s' doesn't match existing URL '%s' in '%s'"),
> -           url, entry->url,
> -           svn_path_local_style (path, pool));
> +          /** ### comparing URLs, should they be canonicalized first? */
> +          if (strcmp (entry->url, url) != 0)
> +            return
> +              svn_error_createf
> +              (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
> +               _("URL '%s' doesn't match existing URL '%s' in '%s'"),
> +               url, entry->url, path);
> +	}
That looks reasonable.  I remember looking at that code in the past,
when merge was using an extra copy to do add-with-history, and I
wasn't confident enough to change it!
I think there's a related issue: 'svn cp' cannot be used to schedule a
replacement for a schedule delete item.  It's possible your change
will lay the ground for fixing that as well, it might be just a
libsvn_client problem now.
-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec  1 21:55:55 2004