[svnbook commit] r3383 - trunk/src/en/book

sussman noreply at red-bean.com
Thu Dec 18 16:31:24 CST 2008


Author: sussman
Date: Thu Dec 18 16:31:24 2008
New Revision: 3383

Log:
Modify ch01 and ch04 to use new ^ URL syntax.

Modified:
   trunk/src/en/book/ch01-fundamental-concepts.xml
   trunk/src/en/book/ch04-branching-and-merging.xml

Modified: trunk/src/en/book/ch01-fundamental-concepts.xml
==============================================================================
--- trunk/src/en/book/ch01-fundamental-concepts.xml	(original)
+++ trunk/src/en/book/ch01-fundamental-concepts.xml	Thu Dec 18 16:31:24 2008
@@ -361,10 +361,10 @@
           filesystem.</para>
       </note>
 
-      <para>Finally, it should be noted that the Subversion client will
-        automatically encode URLs as necessary, just like a web browser
-        does.  For example, if a URL contains a space or upper-ASCII
-        character as in the following:</para>
+      <para>The Subversion client will automatically encode URLs as
+        necessary, just like a web browser does.  For example, if a
+        URL contains a space or upper-ASCII character as in the
+        following:</para>
 
       <screen>
 $ svn checkout "http://host/path with space/project/españa"
@@ -381,6 +381,22 @@
         marks so that your shell treats the whole thing as a single
         argument to the <command>svn</command> program.</para>
 
+      <para>In Subversion 1.6, a new carat (<command>^</command>)
+        notation was introduced as a shorthand for <quote>root of the
+        repository</quote>.  For example:</para>
+
+        <screen>
+$ svn list ^/tags/bigsandwich/
+</screen>
+
+        <para>In this example, we're specifying
+        the <filename>/tags/bigsandwich</filename> directory in the
+        root of the repository.  Note that this URL
+        syntax <emphasis>only</emphasis> works when you're sitting
+        within a working copy—the commandline client infers the
+        repository's URL by looking at the working copy.</para>
+
+
       <sidebar id="svn.basic.in-action.wc.sb-1">
         <title>Repository URLs</title>
 

Modified: trunk/src/en/book/ch04-branching-and-merging.xml
==============================================================================
--- trunk/src/en/book/ch04-branching-and-merging.xml	(original)
+++ trunk/src/en/book/ch04-branching-and-merging.xml	Thu Dec 18 16:31:24 2008
@@ -542,20 +542,25 @@
 $ pwd
 /home/user/my-calc-branch
 
-$ svn merge http://svn.example.com/repos/calc/trunk
+$ svn merge ^/trunk
 --- Merging r345 through r356 into '.':
 U    button.c
 U    integer.c
 </screen>
 
       <para>This basic syntax—<userinput>svn merge
-        <replaceable>URL</replaceable></userinput>—tells Subversion to merge all recent
-        changes from the URL to the current working directory (which
-        is typically the root of your working copy).  After running
-        the prior example, your branch working copy now contains new
-        local modifications, and these edits are duplications of all
-        of the changes that have happened on the trunk since you first
-        created your branch:</para>
+        <replaceable>URL</replaceable></userinput>—tells
+        Subversion to merge all recent changes from the URL to the
+        current working directory (which is typically the root of your
+        working copy).  Also notice that we're using the carat
+        (<command>^</command>) syntax<footnote><para>This was
+        introduced in svn 1.6.</para></footnote> to avoid having to
+        type out the entire <filename>/trunk</filename> URL.</para>
+
+      <para>After running the prior example, your branch working copy
+        now contains new local modifications, and these edits are
+        duplications of all of the changes that have happened on the
+        trunk since you first created your branch:</para>
 
       <screen>
 $ svn status
@@ -615,7 +620,7 @@
 
         <screen>
 $ cd my-calc-branch
-$ svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk > patchfile
+$ svn diff -r 341:HEAD ^/trunk > patchfile
 $ patch -p0  < patchfile
 Patching file integer.c using Plan A...
 Hunk #1 succeeded at 147.
@@ -662,7 +667,7 @@
         again!</para>
 
       <screen>
-$ svn merge http://svn.example.com/repos/calc/trunk
+$ svn merge ^/trunk
 --- Merging r357 through r380 into '.':
 U    integer.c
 U    Makefile
@@ -683,7 +688,7 @@
         doing all along:</para>
 
       <screen>
-$ svn merge http://svn.example.com/repos/calc/trunk
+$ svn merge ^/trunk
 --- Merging r381 through r385 into '.':
 U    button.c
 U    README
@@ -725,7 +730,7 @@
 $ svn update  # (make sure the working copy is up to date)
 At revision 390.
 
-$ svn merge --reintegrate http://svn.example.com/repos/calc/branches/my-calc-branch
+$ svn merge --reintegrate ^/branches/my-calc-branch
 --- Merging differences between repository URLs into '.':
 U    button.c
 U    integer.c
@@ -777,7 +782,7 @@
         wish to remove it from the repository:</para>
 
       <screen>
-$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \
+$ svn delete ^/branches/my-calc-branch \
       -m "Remove my-calc-branch."
 Committed revision 392.
 </screen>
@@ -814,7 +819,7 @@
 
 $ cd my-calc-branch
 
-$ svn switch http://svn.example.com/repos/calc/branches/new-branch
+$ svn switch ^/branches/new-branch
 Updated to revision 393.
 </screen>
 
@@ -868,7 +873,7 @@
 $ cd my-calc-branch
 
 # Which changes have already been merged from trunk to branch?
-$ svn mergeinfo http://svn.example.com/repos/calc/trunk
+$ svn mergeinfo ^/trunk
 r341
 r342
 r343
@@ -878,7 +883,7 @@
 r390
 
 # Which changes are still eligible to merge from trunk to branch?
-$ svn mergeinfo http://svn.example.com/repos/calc/trunk --show-revs eligible
+$ svn mergeinfo ^/trunk --show-revs eligible
 r391
 r392
 r393
@@ -901,7 +906,7 @@
         option:</para>
 
       <screen>
-$ svn merge http://svn.example.com/repos/calc/trunk --dry-run
+$ svn merge ^/trunk --dry-run
 U    integer.c
 
 $ svn status
@@ -978,7 +983,7 @@
 
 
       <screen>
-$ svn merge -c -303 http://svn.example.com/repos/calc/trunk
+$ svn merge -c -303 ^/trunk
 --- Reverse-merging r303 into 'integer.c':
 U    integer.c
 
@@ -1136,7 +1141,7 @@
         repository to your working copy:</para>
 
       <screen>
-$ svn copy http://svn.example.com/repos/calc/trunk/real.c@807 ./real.c
+$ svn copy ^/trunk/real.c at 807 ./real.c
 
 $ svn status
 A  +   real.c
@@ -1162,7 +1167,7 @@
         works just as well:</para>
 
       <screen>
-$ svn cat http://svn.example.com/repos/calc/trunk/real.c@807 > ./real.c
+$ svn cat ^/trunk/real.c at 807 > ./real.c
 
 $ svn add real.c
 A         real.c
@@ -1180,8 +1185,7 @@
         entirely in the repository:</para>
 
       <screen>
-$ svn copy http://svn.example.com/repos/calc/trunk/real.c@807 \
-           http://svn.example.com/repos/calc/trunk/ \
+$ svn copy ^/trunk/real.c at 807 ^/trunk/ \
       -m "Resurrect real.c from revision 807."
 Committed revision 1390.
 
@@ -1240,7 +1244,7 @@
         your work.</para>
 
       <screen>
-$ svn diff -c 355 http://svn.example.com/repos/calc/trunk
+$ svn diff -c 355 ^/trunk
 
 Index: integer.c
 ===================================================================
@@ -1262,7 +1266,7 @@
         to <command>svn merge</command>:</para>
 
       <screen>
-$ svn merge -c 355 http://svn.example.com/repos/calc/trunk
+$ svn merge -c 355 ^/trunk
 U    integer.c
 
 $ svn status
@@ -1285,7 +1289,7 @@
 
 # Notice that r355 isn't listed as "eligible" to merge, because
 # it's already been merged.
-$ svn mergeinfo http://svn.example.com/repos/calc/trunk --show-revs eligible
+$ svn mergeinfo ^/trunk --show-revs eligible
 r350
 r351
 r352
@@ -1297,7 +1301,7 @@
 r359
 r360
 
-$ svn merge http://svn.example.com/repos/calc/trunk
+$ svn merge ^/trunk
 --- Merging r350 through r354 into '.':
  U   .
 U    integer.c
@@ -1402,7 +1406,7 @@
         following:</para>
 
       <screen>
-$ svn merge http://svn.example.com/repos/calc/some-branch
+$ svn merge ^/branches/some-branch
 </screen>
 
       <para>will attempt to duplicate any changes made
@@ -1590,7 +1594,7 @@
         targets</quote>:</para>
 
       <screen>
-$ svn merge -r 1288:1351 http://svn.example.com/repos/branch
+$ svn merge -r 1288:1351 ^/branches/mybranch
 U    foo.c
 U    bar.c
 Skipped missing target: 'baz.c'
@@ -1678,7 +1682,7 @@
 /trunk:1680-3305
 
 # Let's make the metadata list r3328 as already merged.
-$ svn merge -c 3328 --record-only http://svn.example.com/repos/calc/trunk
+$ svn merge -c 3328 --record-only ^/trunk
 
 $ svn status
 M     .
@@ -1948,7 +1952,7 @@
       <screen>
 $ cd calc/trunk
 
-$ svn merge --reintegrate http://svn.example.com/repos/calc/branches/my-calc-branch
+$ svn merge --reintegrate ^/branches/my-calc-branch
 --- Merging differences between repository URLs into '.':
 D   integer.c
 A   whole.c
@@ -2111,7 +2115,7 @@
 $ svn info | grep URL
 URL: http://svn.example.com/repos/calc/trunk
 
-$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch
+$ svn switch ^/branches/my-calc-branch
 U   integer.c
 U   button.c
 U   Makefile
@@ -2236,7 +2240,7 @@
            http://svn.example.com/repos/calc/branches/newbranch \
       -m "Create branch 'newbranch'."
 Committed revision 353.
-$ svn switch http://svn.example.com/repos/calc/branches/newbranch
+$ svn switch ^/branches/newbranch
 At revision 353.
 </screen>
 
@@ -2731,7 +2735,7 @@
 $ svn update
 At revision 1910.
 
-$ svn merge --reintegrate http://svn.example.com/repos/calc/branches/mybranch
+$ svn merge --reintegrate ^/branches/mybranch
 --- Merging differences between repository URLs into '.':
 U    real.c
 U    integer.c
@@ -2951,8 +2955,8 @@
 
       <screen>
 $ cd working-copies/calc
-$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0      \
-            http://svn.example.com/repos/vendor/libcomplex/current  \
+$ svn merge ^/vendor/libcomplex/1.0      \
+            ^/vendor/libcomplex/current  \
             libcomplex
 … # resolve all the conflicts between their changes and our changes
 $ svn commit -m 'merging libcomplex-1.1 into the main branch'




More information about the svnbook-dev mailing list