You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@softlanding.com> on 2006/10/04 15:02:20 UTC

Merge problem/question

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@9941 \
     url://host/svnroot/path@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?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Merge problem/question

Posted by Mark Phippard <ma...@softlanding.com>.
Daniel Rall <dl...@collab.net> wrote on 10/04/2006 06:33:08 PM:

> On Wed, 04 Oct 2006, Mark Phippard wrote:
> ...
> > 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.
> ...
> 
> Yes, you can do a WC -> URL 'copy', which includes any local changes
> in your WC as part of the destination URL.

That part I knew, Subclipse lets you do that.  I was referring to merge. I 
thought that merge could not handle getting the revision that created the 
branch.  I thought that always gave the "Cannot create folder from within" 
error.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Merge problem/question

Posted by Daniel Rall <dl...@collab.net>.
On Wed, 04 Oct 2006, Mark Phippard wrote:
...
> 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.
...

Yes, you can do a WC -> URL 'copy', which includes any local changes
in your WC as part of the destination URL.

Re: Merge problem/question

Posted by Mark Phippard <ma...@softlanding.com>.
Daniel Rall <dl...@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@9941 \
> >      url://host/svnroot/path@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

Re: Merge problem/question

Posted by Daniel Rall <dl...@collab.net>.
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@9941 \
>      url://host/svnroot/path@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.