You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Holger Biebinger <ho...@gmx.de> on 2005/08/10 08:51:40 UTC

merge question

Hi!
I have a question about merge command.
In revision 100 I createad a branch  A for changing the project layout.
In this branch, new directories where created with svn mkdir and files
were moved with svn mv (e.g. file foo was moved to the newly added
directory bar1/bar2/) some files were changed in trunk. Here an example
for the layout:

trunk r100:
foo
foo2
foo3
foo4
foo5

trunk r110
M foo
M foo2
foo3
foo4
M foo5

A in r110
bar1/
M      foo2
M      bar2/foo
bar3/
M      foo3
M      foo4
foo5

In my trunk working copy I tried
svn merge -r100:110 [PATH_TO_REP]/branches/A
to apply branch changes to the trunk. For the moved files I always get
the "skipped missing target" message. After the merge changes applied to
foo in trunk are lost.

I thought, svn would recognize that foo in trunk is the same file as foo
in A/bar1/bar2 and try to put the changes together. Am I wrong with my
assumption or can I put together the different changes in another way?

Thanks in advance for your help.
Holger

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

Re: merge question

Posted by Ben Collins-Sussman <su...@collab.net>.
On Aug 10, 2005, at 3:51 AM, Holger Biebinger wrote:
>
> In my trunk working copy I tried
> svn merge -r100:110 [PATH_TO_REP]/branches/A
> to apply branch changes to the trunk. For the moved files I always get
> the "skipped missing target" message.

You shouldn't get any 'skipped' messages at all;  those messages mean  
you've specified an incorrect patch to apply to the working copy.    
Something must be wrong about your description.  Your description  
looks correct, but if you're seeing 'skipped' messages, then the real  
situation must be more complex, or you must be over-simplifying.  If  
you want more help then you'll need to show us an actual transcript  
which demonstrates the whole problem.


> After the merge changes applied to
> foo in trunk are lost.

This is a separate issue, and is expected.

The edited files are not lost, they just become unversioned.  The  
problem arises when you edit file 'foo', and then 'svn up' or 'svn  
merge' wants to move foo.  We don't yet have a true move operation --  
just copy and delete.  So the 'update' or 'merge' command adds the  
new-name of foo, and deletes the edited foo, rather than actually  
moving your edited foo to the new-name.  Because foo has local edits,  
however, the deletion doesn't really delete the file.  Instead, your  
edited 'foo' becomes unversioned.

Here's the issue explaining the problem:

    http://subversion.tigris.org/issues/show_bug.cgi?id=2282



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

Re: merge question

Posted by Ryan Schmidt <su...@ryandesign.com>.
On 10.08.2005, at 10:51, Holger Biebinger wrote:

> In revision 100 I createad a branch  A for changing the project  
> layout.
> In this branch, new directories where created with svn mkdir and files
> were moved with svn mv (e.g. file foo was moved to the newly added
> directory bar1/bar2/) some files were changed in trunk. Here an  
> example
> for the layout:
>
> trunk r100:
> foo
> foo2
> foo3
> foo4
> foo5
>
> trunk r110
> M foo
> M foo2
> foo3
> foo4
> M foo5
>
> A in r110
> bar1/
> M      foo2
> M      bar2/foo
> bar3/
> M      foo3
> M      foo4
> foo5
>
> In my trunk working copy I tried
> svn merge -r100:110 [PATH_TO_REP]/branches/A
> to apply branch changes to the trunk. For the moved files I always get
> the "skipped missing target" message. After the merge changes  
> applied to
> foo in trunk are lost.
>
> I thought, svn would recognize that foo in trunk is the same file  
> as foo
> in A/bar1/bar2 and try to put the changes together. Am I wrong with my
> assumption or can I put together the different changes in another way?

Unfortunately, you are currently wrong with your assumption. The  
Subversion team is well aware of the problem, but I think it'll take  
until 1.3 or 1.4 for them to solve it. It's complicated.

The explanation has been given on this list many times but I don't  
know it by heart yet so can't recite it for you. :-P I kinda thought  
it would be a FAQ by now but I can't see it in the FAQ... am I  
overlooking it or is it really not there?



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