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

First time use of merge reintegrate

From: rjk1408 <rohanjoseph_at_gmail.com>
Date: Mon, 18 Aug 2008 11:30:43 -0700 (PDT)

I have a few questions on reintegrate. From my understanding, reintegrate is
to be used only when merging in changes from a development branch into the
trunk so that only unique changes made on the branch make it back to the
trunk.

In this light, I present a simple use case.

I have a file, foo, inside the trunk folder of my working copy, to which I
add 1 line at the very top - 'foo-trunk'.

I commit this change in revision #2. I make two user branches, A and B, in
revision numbers 3 and 4 respectively. These two branches now contain the
foo file with that 1 line.

In branch A working copy, I append a line 'foo-user1' to the foo file and
commit the change. The file looks like this

foo-trunk
foo-user1

This happens in revision number 5.

In branch B working copy, I append two lines, 'foo-user1' and 'foo-user2' to
the foo file and commit the change. It looks like this

foo-trunk
foo-user1
foo-user2

This happens in revision number 6.

Now, I try my first merge from inside the trunk folder- from Branch A to the
trunk

svn merge --reintegrate URL-To-Branch-A .

The merge is successful and the file inside the trunk folder looks like this

foo-trunk
foo-user1

I commit this change and attempt the 2nd merge - from Branch B to this trunk
folder and it fails!

the file now looks like this

foo-trunk
<<<<<<< .working
foo-user1
=======
foo-user1
foo-user2
>>>>>>> .merge-right.rN

Why did the merge fail?

I tried the same merge using the 2 url syntax (which actually is what
happens internally with the --reintegrate)

svn merge URL-to-Branch-B_at_revision-after-the-branch-was-created
URL-to-Branch-B_at_HEAD .

And this worked!

So it seems, that reintegrate attempted this merge from a revision before
the branch was created, possibly even revision number 1.

1.Why did this happen?
2.Was I supposed to explicitly use the --record-only switch and block
revisions 1-4?
OR does --reintegrate work on the basis of an assumption that at least one
merge has occurred from the trunk to that branch, BEFORE the branch can be
reintegrated into the trunk?

Please help me out as this makes a big difference to the usage model and the
people who are trying to use svn this way.

Thanks!

-- 
View this message in context: http://www.nabble.com/First-time-use-of-merge-reintegrate-tp19035647p19035647.html
Sent from the Subversion Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-18 20:31:10 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.