11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Branching and MergingM /branches/my-calc-branch/READMEFinal merge of trunk changes to my-calc-branch.We happen to know that this merge to the branch was nothing but a merge of trunkchanges. How can we see those trunk changes as well? The answer is to use the --use-merge-history (-g) option. This option expands those “child” changes that werepart of the merge.$ svn log -v -r 390 -g------------------------------------------------------------------------r390 | user | 2002-11-22 11:01:57 -0600 (Fri, 22 Nov 2002) | 1 lineChanged paths:M /branches/my-calc-branch/button.cM /branches/my-calc-branch/READMEFinal merge of trunk changes to my-calc-branch.------------------------------------------------------------------------r383 | sally | 2002-11-21 03:19:00 -0600 (Thu, 21 Nov 2002) | 2 linesChanged paths:M /branches/my-calc-branch/button.cMerged via: r390Fix inverse graphic error on button.------------------------------------------------------------------------r382 | sally | 2002-11-20 16:57:06 -0600 (Wed, 20 Nov 2002) | 2 linesChanged paths:M /branches/my-calc-branch/READMEMerged via: r390Document my last fix in README.By making the log operation use merge history, we see not just the revision we queried(r390), but also the two revisions that came along on the ride <strong>with</strong> it—a couple of changesmade by Sally to the trunk. This is a much more complete picture of history!The svn blame command also takes the --use-merge-history (-g) option. If this optionis neglected, somebody looking at a line-by-line annotation of button.c may get themistaken impression that you were responsible for the lines that fixed a certain error:$ svn blame button.c…390 user retval = inverse_func(button, path);390 user return retval;390 user }…And while it's true that you did actually commit those three lines in revision 390, two ofthem were actually written by Sally back in revision 383:$ svn blame button.c -g…G 383 sally retval = inverse_func(button, path);G 383 sally return retval;390 user }…Now we know who to really blame for those two lines of code!106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!