CollabNet
Submerged - CollabNet's Subversion Blog
CollabNet Community

CollabNet Blogs

  • Submerged Home
  • CollabNet Home
  • openCollabNet

Categories

  • Administration (8)
  • Client Tools (9)
  • General (30)
  • Subversion Client (23)
  • Subversion Events (2)
  • Subversion in the Enterprise (26)
  • Subversion Server (14)

Past 6 Months

  • May 2008 (2)
  • April 2008 (2)
  • March 2008 (3)
  • February 2008 (3)
  • January 2008 (4)
  • December 2007 (2)

Archives

All Archives...
RSS Syndicate this blog

Merge Auditing in Subversion 1.5

We had a really nice addition to the Subversion merge tracking feature committed to trunk last week.  Hyrum Wright is a student participating in the Google Summer of Code program.  He has signed up to provide "Merge Auditing" features for merge tracking.  You can see some details on what this means in the functional specifications, but essentially it is about adding intelligence and awareness of the merge tracking information to the svn log and blame output.  In the merge tracking planning, this has been slated as a post-1.5 feature.  It is a feature everyone really wants to see in the code-base, but it was just felt that shipping the release and the core functionality had to be the priority.

Anyway, in this case it appears we will be able to have our cake and eat it too.  Hyrum, whom I should add is already a full Subversion committer, has made great progress on adding this support to the svn log command and has committed those changes to trunk.  Additionally, it turns out that the sample repository we created for our Merge Tracking Early Adopter program really helped to work out the kinks in this feature.  Since we had a nicely documented sample repository, and matching graphic, that Hyrum could refer to, it made it easier for him to refine the feature and get it working properly.

Sample Repo

The above picture is the history of our sample repository. If you take a close look, the r14 commit to trunk is an interesting example where this feature comes into play.  This commit is a merge from a branch, and the merge also contains additional merges from another branch.  If I run this command (note the new -g option):

svn log -g -r 14 $REPOS/trunk

Here is the new output:

------------------------------------------------------------------------
r14 | merger | 2007-05-30 15:48:11 -0400 (Wed, 30 May 2007) | 3 lines

Merge branch b - product roadmap and update about page

Command executed: svn merge $REPOS/branches/b
------------------------------------------------------------------------
r13 | buser | 2007-05-30 15:46:48 -0400 (Wed, 30 May 2007) | 1 line
Result of a merge from: r14

Update info about our company
------------------------------------------------------------------------
r12 | merger | 2007-05-30 15:45:19 -0400 (Wed, 30 May 2007) | 3 lines
Result of a merge from: r14

Merge branch a - product roadmap

Command executed: svn merge $REPOS/branches/a
------------------------------------------------------------------------
r11 | auser | 2007-05-30 15:43:00 -0400 (Wed, 30 May 2007) | 1 line
Result of a merge from: r14, r12

Add product roadmap
------------------------------------------------------------------------

Note how it includes information on the revisions that were merged in r14, and additionally how one of those revisions was the result of another merge.  Graphical clients like our CollabNet Desktop - Eclipse Edition and TortoiseSVN should be able to do really useful and interesting presentations of this information in their UI.

This is fantastic work Hyrum.  Keep it up.  I cannot wait to see the blame implementation come together.

Mark Phippard

About the Author

Mark Phippard is Director Subversion Engineering at CollabNet. He leads the CollabNet Subversion team and is a project owner of the Subclipse project as well as a full committer for Subversion.
Permalink
Categories: Client Tools, General, Subversion Client, Subversion in the Enterprise, Subversion Server

Technorati Tags: CollabNet, Open Source, Programming, Revision control, SCM, Software Configuration Management, Software development, Sourceforge, Subversion, SVN, Version control

TrackBack

TrackBack URL for this post: http://www.typepad.com/t/trackback/2278052/19127962

Comments

Maybe someone should set Hyrum onto improved rename support :-)

dave | June 14, 2007 at 06:25 AM

Wow, the new merge tracking and auditing features will make Subversion even better and more professional!
I really hope the next big step, true rename support with help of unique ids, will make it into the trunk as early as possible.

Keep up the good work,
René

Rene L. | June 19, 2007 at 12:38 PM

I call shenanigans !

How can r11 be the result of a merge from r14, r12 ?!

=)

K. L. Estes | July 06, 2007 at 06:39 AM

r11 is the root change that was made in branches/a

It was merged into branches/b in r12 and that was then merged into trunk at r14. This is also shown in the diagram.

In versions prior to 1.4, all you see in svn log is that you did a merge. With this change you can now trace the history back to the actual original changes, which also allows you to see the log message, date and author.

Mark Phippard | July 06, 2007 at 06:44 AM

Post a comment

  • ©2008 CollabNet Corporation
    • Site Feedback
    • Terms of Use
    • Privacy Policy
    • Copyright & Trademark