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

Re: Merging branch into trunk

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-12-21 04:44:06 CET

On Dec 20, 2006, at 10:00, Steve Nelson wrote:

[snip]

> 4) Now the second user tries to do the same.
>
> bash-3.1$ cd trunk/
> bash-3.1$ svn update
> U dxbdpro.p
> Updated to revision 38.
> bash-3.1$ svn merge https://svntest/repos/devrep/dlr/trunk/
> dxbdpro.p@34
> https://svntest/repos/devrep/dlr/branches/SC1976/dxbdpro.p
> C dxbdpro.p
>
> Aha! A conflict, as expected.
>
> bash-3.1$ svn commit -m "trying to merge sc1976 into trunk"
> svn: Commit failed (details follow):
> svn: Aborting commit: '/cygdrive/d/Subversion/trunk/dxbdpro.p' remains
> in conflict
>
> Now resolve the conflict:
>
> bash-3.1$ ls -1 | grep -Ei 'merge|work'
> dxbdpro.p.merge-left.r34
> dxbdpro.p.merge-right.r38
> dxbdpro.p.working
>
> We can examine these files to see the source of the conflict.
>
> We can also use the subverison diff command:
>
> bash-3.1$ svn diff dxbdpro.p ../SC1976/dxbdpro.p
> Index: dxbdpro.p
> ===================================================================
> --- dxbdpro.p (revision 38)
> +++ dxbdpro.p (working copy)
> @@ -1392,4 +1392,8 @@
>
> return "".
> end.
> +<<<<<<< .working
> /* Comment by nelson for SC1975 */
> +=======
> +/* Darryl's comment for sc1976 */
> +>>>>>>> .merge-right.r38
>
> Using this intelligence, we can modify our own copy, to ensure that
> there is no conflict. In this case, we can have both Darryl and
> Nelson's comments.
>
> So edit SC1976/dxbdpro.p and ensure we have 2 comments.
>
> bash-3.1$ svn commit -m "resolved conflict by having 2 comments"
> Sending dxbdpro.p
> Transmitting file data .
> Committed revision 39.
>
> Try to merge now:
>
> bash-3.1$ cd ../trunk/
> bash-3.1$ svn merge https://svntest/repos/devrep/dlr/trunk/
> dxbdpro.p@34
> https://svntest/repos/devrep/dlr/branches/SC1976/dxbdpro.p
> C dxbdpro.p
> bash-3.1$ svn merge https://svntest/repos/devrep/dlr/trunk/dxbdpro.p
> https://svntest/repos/devrep/dlr/branches/SC1976/dxbdpro.p
> C dxbdpro.p
> bash-3.1$ svn merge https://svntest/repos/devrep/dlr/trunk/
> dxbdpro.p@38
> https://svntest/repos/devrep/dlr/branches/SC1976/dxbdpro.p
> C dxbdpro.p
> bash-3.1$ svn commit
> svn: Commit failed (details follow):
> svn: Aborting commit: '/cygdrive/d/Subversion/trunk/dxbdpro.p' remains
> in conflict
>
> I thought I had resolved the conflict. Am confused now - what have I
> missed?

I don't see you ever having said "svn resolved dxbdpro.p" in your
transcript. You need to tell Subversion that you have resolved the
conflict. Also, after doing your merges directly above, I do not see
any indication that you have resolved the reported conflict (by
editing the file in an editor to resolve the conflict).

Also, are you sure you're aware of the difference between "-r34 URL"
and "URL@34"? "-r34 URL" is a shorthand for saying "-r34 URL@HEAD"
and "URL@34" is a shorthand for "-rHEAD URL@34". Make sure you
understand the difference, explained in the section of the book on
peg and operative revisions:

http://svnbook.red-bean.com/en/1.2/svn.advanced.pegrevs.html

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 21 04:44:41 2006

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.