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

Re: Merge problem/question

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-10-04 20:12:27 CEST

Daniel Rall <dlr@collab.net> wrote on 10/04/2006 01:27:13 PM:

> On Wed, 04 Oct 2006, Mark Phippard wrote:
>
> > I am working with a Subclipse user that is getting the "Cannot replace

> > directory from within" error message when doing a merge of changes
created
> > on a branch back to his trunk. When he runs a similar command using
the
> > command line it works. For example this:
> >
> > svn merge -r9941:HEAD url://host/svnroot/path /home/username/wc
> >
> > The user did some experimenting, and if he enters the command line
like
> > this, then it gets the same error as Subclipse
> >
> > svn merge url://host/svnroot/path_at_9941 \
> > url://host/svnroot/path_at_HEAD /home/username/wc
> >
> > Based on the arguments we have in our JavaHL merge command, it is
likely
> > that the second command is closer to what we are probably executing.
> >
> > This is with 1.3 or 1.4.
> >
> > Now in this user's case, they just informed me that the branch was
created
> > in r9942 which was the original reason I gave for the error message.
They
> > should likely not be including this revision in the merge.
Nonetheless,
> > any arguments I make in this direction are undercut by the fact the
> > command line when used in the first form above does not seem to have a

> > problem with this.
> >
> > Does anyone have a good explanation as to why?
>
> I'm guessing that the 3-way URL merge isn't taking into consideration
> that both URLs are the same. Instead, it's probably trying to find
> url://host/svnroot/path at r9941, a path which didn't come into
> existance until r9942.
>
> Assuming this is actually the case, perhaps 'merge' could be smarter
> by detecting that both URLs are the same, and doing a trace back
> through history from HEAD towards r9941. Then again, we might not
> want to support this behavior -- even though it's more user-friendly,
> it's also not strictly doing what the user requested, since
> url://host/svnroot/path really didn't exist at r9941.

Interestingly, he told me that in r9942 the user created a branch from his
WC. So it created the branch, and also included his modifications. So
they need to include this revision in the merge. I didn't think the
command line could handle that scenario.

I am going to change our code to use the alternative merge method when the
two URL's are the same location. This appears to resolve the issue.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 4 20:12:51 2006

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.