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
681 views
in Technique[技术] by (71.8m points)

svn - What Happens to Commit Logs on a Branch After Merging?

Scenario:

  1. Programmer creates a branch for project 'foo' called 'my_foo' at revision 5
  2. Programmer makes multiple changes to multiple files as he works on the 'my_foo' feature.
  3. At the end of each major step, say adding several new functions to a class, the programmer does an svn commit on the appropriate files therefore committing them to the branch
  4. After several weeks and many commits later (each commit having a commit log describing what he did), the programmer merges the branch back into the trunk:

#Assume the following is being done from inside a working copy of the trunk:
svn merge -r 5:15 file:///path/to/repo/branches/my_foo

Hazzah! he's merged all his changes back into trunk! There's much rejoicing and drinking of Mountain Dew.

Now let's say another programmer comes along a week later and updates their working copy from revision 5 to revision 15. "Wow", they say. "I wonder what's changed since revision 5". The programmer then does an svn status on their working copy and they get something like this:

------------------------------------------------------------------------
r15 | programmer1 | 2010-03-20 21:27:04 -0400 (Sat, 20 Mar 2010) | 1 line

Merging Version 2.0 Changes into trunk
------------------------------------------------------------------------
r5 | programmer2 | 2010-02-15 10:59:55 -0500 (Mon, 15 Feb 2010) | 1 line

Added assets/images/tumblr_icon.png to trunk

What the heck happened to all the notes that the other programmer put in with all of his commits in his branch? Do those not get pulled over during a merge? Am I crazy or just forgetting something?

question from:https://stackoverflow.com/questions/2520522/what-happens-to-commit-logs-on-a-branch-after-merging

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

1 Reply

0 votes
by (71.8m points)

Try svn log -g to include merge history that is stored since Subversion 1.5.


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

...