
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
52
|
Chapter 4: Branching and Merging
shown in Figure 4-3. Notice that the second method, however, performs an immedi-
ate commit. (Subversion does not support cross-repository copying. When using
URLs with
svn copy or svn move, you can only copy items within the same reposi-
tory.) It’s an easier procedure, because it doesn’t require you to check out a large
mirror of the repository. In fact, this technique doesn’t even require you to have a
working copy at all.
Working with Your Branch
Now that you’ve created a branch of the project, you can check out a new working
copy to start using it:
$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch
A my-calc-branch/Makefile
A my-calc-branch/integer.c
A my-calc-branch/button.c
Checked out revision 341.
There’s nothing special about this working copy; it simply mirrors a different direc-
tory in the repository. When you commit changes, however, Sally won’t ever see
them when she updates. Her working copy is of /calc/trunk. (Be sure to read “Switch-
ing a Working Copy” later in this chapter: the
svn switch command is an alternate
way of creating a working copy of a branch.)
Figure 4-3. Repository with new copy
/
calc
trunk
branches
paint
trunk
branches
my-calc
branch