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

Re: [PATCH] Merging replacments of directories and Issue #2144

From: <kfogel_at_collab.net>
Date: 2004-12-01 23:13:24 CET

Philip Martin <philip@codematters.co.uk> writes:
> kfogel@collab.net writes:

I wrote? Are you sure that wasn't breser? :-)

> > - /* 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.

I think Ben had exactly that in mind, if I'm remembering a
conversation correctly...

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 1 23:18:07 2004

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