
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
56
|
Chapter 4: Branching and Merging
with the crawl-in-a-hole strategy is that by the time you’re finished with your branch,
it may be near impossible to merge your changes back into the trunk without a huge
number of conflicts.
Instead, you and Sally might continue to share changes as you work. It’s up to you to
decide which changes are worth sharing; Subversion gives you the ability to selec-
tively copy changes between branches. And when you’re completely finished with
your branch, your entire set of branch changes can be copied back into the trunk.
Copying Specific Changes
In the previous section, we mentioned that both you and Sally made changes to
integer.c on different branches. If you look at Sally’s log message for revision 344,
you can see that she fixed some spelling errors. No doubt, your copy of the same file
still has the same spelling errors. It’s likely that your future changes to this file will be
affecting the same areas that have the spelling errors, so you’re in for some potential
conflicts when you merge your branch someday. It’s better, then, to receive Sally’s
change now, before you start working too heavily in the same places.
It’s time to use the
svn merge command. This command, it turns out, is a very close
cousin to the
svn diff command (which you read about in ...