Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
564 views
in Technique[技术] by (71.8m points)

svn - Merge two branch revisions using Subversion

I'd like to merge all the changes that took place between rev 10 & the 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 this possible? If so, what is the syntax?

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

EDIT: Yes, my specific solution was...

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The process is as follows:

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

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

Check out the SVNBook for all the details.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...