M7: Branches and Tags
From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-11-13 23:31:22 CET
Last Friday, gstein flew to Chicago and {gstein, kfogel, cmpilato,
First, we want to make 'svn cp' into an all-powerful command:
We have four use cases for 'svn cp' now.
A. svn cp wc_path1 wc_path2
This duplicates a path in the working copy, and schedules it
B. svn cp URL [-r rev] wc_path
This "checks out" URL (in REV) into the working copy at
C. svn cp wc_path URL
This immediately commits wc_path to URL on the server; the
D. svn cp URL1 [-r rev] URL2
This causes a server-side copy to happen immediately; no
[Note: we're using the phrase "tag" to mean "branch or tag"; they're
So how do I create a tag? Assume that the repository has a layout
/project1/trunk/
In the simplest case, if I want to tag the HEAD of trunk, I don't even
svn cp http://foo.com/repos/project1/trunk \
Voila, no working copy needed. A "cheap" (constant-time) directory
In a more complex case, suppose the state of my tree (mixed revisions
cd top/of/my/wc
I should mention that as a rule, cases (A) and (C) always notice mixed
Second, we have a new command: 'svn switch URL [-r rev]'
This command performs an update on your working copy, making it
Really, 'svn up' is just a special case of 'svn switch', where the URL
There's nothing magical about this command -- it will be fairly easy
Also -- if the user has local mods that conflict with the switch, one
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.