简体   繁体   中英

merging two subversion branches

i found conflicting procedures:

Subversion merging

  svn checkout http://a.b.c/bldtest1
  cd bldtest1
  svn merge -r45:50 http://a.b.c/bldtest2
  svn merge -r53:55 http://a.b.c/bldtest2
  svn ci -m "Revision 45:50 and 53:55 merged" 

Merge between two branches in subversion

$ svn merge -r 127:240 svn+ssh://svn.myproject.org/svn/trunk .

WHICH one of these is the right one ? as they are opposite of each other. provided we find the set of revisions to be merged with :

svn log --verbose --stop-on-copy  branch1 > log.txt

so in order to merge branch1 TO branch2, do we:

1. svn co branch1
3. cd branch1
4. svn merge -r xx:yy branch2 

OR

1. svn co branch1
2. svn co branch2
3. cd branch2
4. svn merge -r xx:yy branch1 .

These procedures are not conflicted : in first sample default target "." just omitted

in order to merge branch1 TO branch2

You have to:

Read and understand SVN Book (link provided by Sameer)

Use correct way of merging

svn co URL/TO/branch2
cd branch2
svn merge -r xx:yy URL/TO/branch1

And, BTW, cherry-pick merging isn't best merging in the world

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM