Merge one branch into another?

I would like to merge all the changes that occurred between rev 10 and HEAD rev on http: // url-of-branch-a and apply them to http: // url-of-branch-b .

Something like...

svn merge -r 10:HEAD http://url-of-branch-a 

Is it possible? If so, what is the syntax?

I am running the SVN client from the unix command line. SVN client version is 1.4

EDIT: Yes, my specific solution was ...

  • change the directory to the folder of my working copy that wants to receive changes (branch-b)
  • svn merge -r 10: HEAD http: // url-of-branch-a

This merges the changes from 'branch-a' to 'branch-b'

+85
svn
Aug 12 '09 at 2:00
source share
2 answers

Validation URL A. Use SVN merge to concatenate URL B into your working copy of A. Commit A.

Or, on the contrary, of course :)

+47
Aug 12 '09 at 14:02
source share

This is a three-step process (as BillyONeal shows).

  • Install a working copy of branch B ( svn checkout http://branch-b )
  • Merge changes from branch A into a working copy of B ( svn merge -r 10:HEAD http://branch-a . )
  • Commit (after resolving conflicts) a working copy of B to branch b ( svn commit )

Check the man page (help file) for svn merge semantics. It shows you that svn merge always uploads the results to a working copy.

Browse SVNBook for all the details.

+115
Aug 12 '09 at 14:26
source share



All Articles