Merge all changes from branch to trunk while leaving merge conflicts up to developers

  1. This document is assuming you have already checked out & updated trunk.
    svn checkout http://server/svn/project/trunk ~/workspaces/project_trunk
    svn update ~/workspaces/project_trunk
  2. Check out the branch to merge from
    svn checkout http://server/svn/project/branches/0.0.6 ~/workspaces/project_0.0.6
  3. Figure out the revision the branch began
    $ svn log --verbose --stop-on-copy http://server/svn/project/branches/0.0.6
    r3 | joe | 2010-08-03 12:50:08 -0700 (Tue, 03 Aug 2010) | 1 line
    Changed paths:
       A /branches/0.0.6/test
       A /branches/0.0.6/global
    Adding dirs for test sprint 1
    r2 | joe | 2010-08-03 12:49:12 -0700 (Tue, 03 Aug 2010) | 1 line
    Changed paths:
       A /branches/0.0.6 (from /trunk:1)
    Creating branch for test Sprint 1

    NOTE: The revision where the branch was created ($BCV = 2)

  4. CD into the trunk you are merging to & get the revision num.
    cd /workspaces/project_trunk
    svn update

    This will return a message “At revision XXXXX”

    jsmith@PC-JSMITH /workspaces/project_trunk
    $ svn update
    At revision 92.


  5. CD to your trunk which you are merging TO
    $ cd /workspaces/project_trunk
  6. Merge the changes from the branch to the trunk
    $ svn merge --accept postpone -r ${BCV}:${TV} http://server/svn/project/branches/0.0.6
    --- Merging r2 through r92 into '.':
    C    test-3pom.xml
    Skipped ''
    C    test-parentpom.xml
    C    test-1pom.xml
    C    test-2pom.xml
    Summary of conflicts:
    Text conflicts: 4
    Skipped paths: 1
  7. Generate a report of merge conflicts
    cd /workspaces/project_trunk
    find . -type f -name "*.working"


    jsmith@PC-JSMITH /workspaces/project_trunk/trunk
    $ find . -type f -name "*.working"

    Copy this list into an email & remove working from the end of each line.

  8. Get rid of all conflict resolution files
    find . -type f -name "*.working" -exec rm {} ;
    find . -type f -name "*-left.r*" -exec rm {} ;
    find . -type f -name "*-left.l*" -exec rm {} ;
  9. Commit your changes
    svn commit -m "EM-300 - Merge project 0.0.6 to trunk"
  10. Send email to DEV team to handle merge conflicts