
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
72
|
Chapter 4: Branching and Merging
If browsing your deleted directory isn’t enough, you can always bring it back. Resur-
recting data is very easy in Subversion. If there’s a deleted directory (or file) that
you’d like to bring back into
HEAD, simply use svn copy -r to copy it from the old
revision:
$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \
http://svn.example.com/repos/calc/branches/my-calc-branch
Committed revision 376.
In our example, your personal branch had a relatively short lifetime: you may have
created it to fix a bug or implement a new feature. When your task is done, so is the
branch. In software development, though, it’s also common to have two main
branches running side-by-side for very long periods. For example, suppose it’s time
to release a stable calc project to the public, and you know it’s going to take a couple
of months to shake bugs out of the software. You don’t want people to add new fea-
tures to the project, but you don’t want to tell all developers to stop programming
either. So instead, you create a stable branch of the software that won’t change
much:
$ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/stable-1.0 \
-m "Creating stable branch of calc project."
Committed revision ...