
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
70
|
Chapter 4: Branching and Merging
and directories to particular branches (making use of svn switch). When you’re
done, your working copy is a hodgepodge of repository locations from different revi-
sions. But after testing, you know it’s the precise combination of data you need.
Time to make a snapshot. Copying one URL to another won’t work here. In this
case, you want to make a snapshot of your exact working copy arrangement and
store it in the repository. Luckily,
svn copy actually has four different uses (which
you can read about in Chapter 9), including the ability to copy a working-copy tree
to the repository:
$ ls
./ ../ my-working-copy/
$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag
Committed revision 352.
Now there is a new directory in the repository, /calc/tags/mytag, which is an exact
snapshot of your working copy—mixed revisions, URLs, and all.
Other users have found interesting uses for this feature. Sometimes there are situa-
tions where you have a bunch of local changes made to your working copy, and
you’d like a collaborator to see them. Instead of running
svn diff and sending a
patchfile (which won’t capture tree changes), you can instead use
svn copy to upload
your working copy to a private area of the repository. Your collaborator can then
either ...