[svnbook commit] r2967 - trunk/src/en/book
cmpilato
noreply at red-bean.com
Mon Jan 14 15:45:22 CST 2008
Author: cmpilato
Date: Mon Jan 14 15:45:21 2008
New Revision: 2967
Log:
* src/en/book/ch03-advanced-topics.xml
(Sparse Directories): Track Subversion change recently made, where
one uses 'svn update --set-depth' instead of 'svn update --depth'
to tweak ambient depth. Also, lose the equal signs (=) in the
demonstrated commandlines -- I can't stand those things.
Modified:
trunk/src/en/book/ch03-advanced-topics.xml
Modified: trunk/src/en/book/ch03-advanced-topics.xml
==============================================================================
--- trunk/src/en/book/ch03-advanced-topics.xml (original)
+++ trunk/src/en/book/ch03-advanced-topics.xml Mon Jan 14 15:45:21 2008
@@ -1840,7 +1840,7 @@
with none of its children at all.</para>
<screen>
-$ svn checkout file:///var/svn/repos mom-empty --depth=empty
+$ svn checkout file:///var/svn/repos mom-empty --depth empty
Checked out revision 1
$
</screen>
@@ -1860,7 +1860,7 @@
<variablelist>
<varlistentry>
- <term><literal>--depth=empty</literal></term>
+ <term><literal>--depth empty</literal></term>
<listitem>
<para>Include only the immediate target of the operation,
not any of its file or directory children.</para>
@@ -1868,7 +1868,7 @@
</varlistentry>
<varlistentry>
- <term><literal>--depth=files</literal></term>
+ <term><literal>--depth files</literal></term>
<listitem>
<para>Include the immediate target of the operation and any
of its immediate file chidren.</para>
@@ -1876,7 +1876,7 @@
</varlistentry>
<varlistentry>
- <term><literal>--depth=immediates</literal></term>
+ <term><literal>--depth immediates</literal></term>
<listitem>
<para>Include the immediate target of the operation and any
of its immediate file or directory chidren. The directory
@@ -1885,7 +1885,7 @@
</varlistentry>
<varlistentry>
- <term><literal>--depth=infinity</literal></term>
+ <term><literal>--depth infinity</literal></term>
<listitem>
<para>Include the immediate target, its file and directory
children, its children's children, and so on to full
@@ -1928,11 +1928,11 @@
values:</para>
<screen>
-$ svn checkout file:///var/svn/repos mom-files --depth=files
+$ svn checkout file:///var/svn/repos mom-files --depth files
A mom-files/kitty1.txt
A mom-files/doggie1.txt
Checked out revision 1.
-$ svn checkout file:///var/svn/repos mom-immediates --depth=immediates
+$ svn checkout file:///var/svn/repos mom-immediates --depth immediates
A mom-immediates/son
A mom-immediates/daughter
A mom-immediates/kitty1.txt
@@ -1961,28 +1961,25 @@
the scope of the operation to the requested (or default)
operational depth.</para>
- <!-- NOTE: We may change this next part before 1.5 ships, to push
- instead for an explicit -new-depth option to 'svn update' -->
-
- <para>There is one key exception to this generality, found in the
- <command>svn update</command> command. <command>svn
- update</command> interprets <option>--depth</option> as a new
- sticky ambient depth value for its targets. This is the
- mechanism you use to make a shallow working copy citizen deeper.
- Watch what happens as we take our empty-depth checkout and
- gradually telescope it deeper using <command>svn update
- --depth</command>:</para>
+ <para>In addition to the <option>--depth</option> option, the
+ <command>svn update</command> and <command>svn switch</command>
+ subcommands also accept a second depth-related option:
+ <option>--set-depth</option>. It is with this option that you
+ can change the sticky depth of a working copy item. Watch what
+ happens as we take our empty-depth checkout and gradually
+ telescope it deeper using <command>svn update
+ --set-depth</command>:</para>
<screen>
-$ svn update --depth=files mom-empty
+$ svn update --set-depth files mom-empty
A mom-empty/kittie1.txt
A mom-empty/doggie1.txt
Updated to revision 1.
-$ svn update --depth=immediates mom-empty
+$ svn update --set-depth immediates mom-empty
A mom-empty/son
A mom-empty/daughter
Updated to revision 1.
-$ svn update --depth=infinity mom-empty
+$ svn update --set-depth infinity mom-empty
A mom-empty/son/grandson
A mom-empty/daughter/granddaughter1
A mom-empty/daughter/granddaughter1/bunny1.txt
@@ -2010,15 +2007,15 @@
<screen>
$ rm -rf mom-empty
-$ svn checkout file://`pwd`/repos/mom mom-empty --depth=empty
+$ svn checkout file://`pwd`/repos/mom mom-empty --depth empty
Checked out revision 1.
-$ svn update --depth=empty mom-empty/son
+$ svn update --set-depth empty mom-empty/son
A mom-empty/son
Updated to revision 1.
-$ svn update --depth=empty mom-empty/daughter
+$ svn update --set-depth empty mom-empty/daughter
A mom-empty/daughter
Updated to revision 1.
-$ svn update --depth=infinity mom-empty/daughter/granddaughter1
+$ svn update --set-depth infinity mom-empty/daughter/granddaughter1
A mom-empty/daughter/granddaughter1
A mom-empty/daughter/granddaughter1/bunny1.txt
A mom-empty/daughter/granddaughter1/bunny2.txt
@@ -2030,11 +2027,12 @@
in a single working copy doesn't complicate the way you interact
with that working copy. You can still make, revert, display and
commit local modifications in your working copy without
- providing any new options (including <option>--depth</option>)
- to the relevant subcommands. Even <command>svn update</command>
- works as it does elsewhere when no specific depth is
- provided—it updates the working copy targets that are
- present while honoring their sticky depths.</para>
+ providing any new options (including <option>--depth</option> or
+ <option>--set-depth</option>) to the relevant subcommands. Even
+ <command>svn update</command> works as it does elsewhere when no
+ specific depth is provided—it updates the working copy
+ targets that are present while honoring their sticky
+ depths.</para>
<para>You might at this point be wondering, <quote>So what? When
would I use this?</quote>. One scenario where this feature
@@ -2062,16 +2060,13 @@
<para>Subversion 1.5's implementation of shallow checkouts is
good, but does not support a couple of interesting behaviors.
First, you cannot de-telescope a working copy item. Running
- <command>svn update --depth=empty</command> on an infinite-depth
- working copy will not have the effect of discarding everything
- but the top-most directory. In this case (where the operational
- depth is more shallow than the ambient depth), <command>svn
- update</command>'s interpretation of <option>--depth</option>
- degrades to match the way other subcommands use it—as a
- limitation on the scope of the operation. Secondly, there is no
- depth value to indicate that you wish an item to be explicitly
- excluded. You have to do implicit exclusion of an item by
- including everything else.</para>
+ <command>svn update --set-depth empty</command> on an
+ infinite-depth working copy will not have the effect of
+ discarding everything but the top-most directory—it will
+ simply error out. Secondly, there is no depth value to indicate
+ that you wish an item to be explicitly excluded. You have to do
+ implicit exclusion of an item by including everything
+ else.</para>
</sect1>
More information about the svnbook-dev
mailing list