1

I've come back to SVN after a number of years and I am trying to get my head around branching / merging. I have the following test setup on a linux box and I'm using command line:

Project

  • trunk
  • branch
  • tags

I have local working copies of the branch and trunk in ~/workingcopy and ~/workingcopybranch

For test purposes I have imported a SeamTest project. Both working copies are currently at revision 14. with everything committed back to the repository

Here is the result from my diff:

~/workingcopy/SeamTest $ svn diff http://localhost/svn/myproject/branches/heidisbranch/SeamTest http://localhost/svn/myproject/trunk/SeamTest
Index: WebContent/home.xhtml
===================================================================
--- WebContent/home.xhtml   (.../branches/heidisbranch/SeamTest)    (Revision 14)
+++ WebContent/home.xhtml   (.../trunk/SeamTest)    (Revision 14)
@@ -8,7 +8,6 @@
     xmlns:rich="http://richfaces.org/rich"
     template="layout/template.xhtml">
 <!-- testing -->
-<!-- adding info into branch code-->
     <ui:define name="body">

         <h1>Welcome to Seam!</h1>
Index: .
===================================================================
--- .   (.../branches/heidisbranch/SeamTest)    (Revision 14)
+++ .   (.../trunk/SeamTest)    (Revision 14)

Eigenschaftsänderungen: .
___________________________________________________________________
Added: svn:mergeinfo

As you can see the comment "adding info into branch code" is in the branch and the comment "testing" is in the trunk

When I then go to perform SVN merge from the trunk working directory it doesn't seem to register that there are differences:

~/workingcopy/SeamTest $ svn merge http://localhost/svn/myproject/branches/heidesbranch/SeamTest http://localhost/svn/myproject/trunk/SeamTest .
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
 G   .
--- Eliding mergeinfo from '.':
 U   .
-- Aufzeichnung der Informationen für Zusammenführung zwischen Projektarchiv-URLs in ».«:
 G   .

No changes are made to the working copy of my project. Any help would be greatly appreciated.

1 Answer 1

1

Swap the two arguments, i.e. the following should work in your case:

$ svn merge http://localhost/svn/myproject/trunk/SeamTest \
     http://localhost/svn/myproject/branches/heidesbranch/SeamTest .

However: You didn't mention what you want to achieve. If you are a SVN beginner, it is really unlikely that you want to do that. There are four different forms of merge operations in SVN:

  • sync merges
  • cherry-pick merges
  • reintegrations
  • 2-URL merges

You are using the last one, that is intended only for special cases. You should typically stay with the other forms, that are easier to use. And I strongly recommend reading some documentation about working on feature and release branches in SVN.

Sign up to request clarification or add additional context in comments.

3 Comments

I have written two articles about feature and release branches, which might be interesting to you: Release Branches and Feature Branches (in German).
Thanks - I actually want to reintegrate the changes I made in the branch back into the trunk. So in the trunk I´d like to see the comment "-<!-- adding info into branch code-->" back in the xhtml file.
Your article on Feature branches was exactly what I was looking for. I followed that through and it is working perfectly. Many thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.