Patch: Example Repository Location

Jonathon Mah me at JonathonMah.com
Tue Apr 26 09:37:37 CDT 2005


The majority of the book assumes repositories live in /usr/local/svn,  
so I standardized on that. I also followed the general usage of  
omitting a trailing slash on the path.

Some of chapter 6 assumed that repositories live in  
/usr/local/repositories. Chapter 9 assumed a repository at /tmp/repos.

* src/en/book/ch06.xml
   and
* src/en/book/ch09.xml:
	Standardized repository paths to be under /usr/local/svn

* src/en/TODO: Removed corresponding TODO


Jonathon Mah
me at JonathonMah.com


Index: src/en/TODO
===================================================================
--- src/en/TODO	(revision 1235)
+++ src/en/TODO	(working copy)
@@ -23,10 +23,6 @@
      has been fixed that broke it and potentially update the
      example to use it instead.

-  - we seem to inconsistently assume repositories live either in
-    /usr/local/svn/ or /usr/local/repositories/ throughout the book.
-    We ought to consistify.
-
    - Chapter 8 Section 1.1 "Repository Layer" documents the pre-FSFS  
state
      of affairs.

Index: src/en/book/ch06.xml
===================================================================
--- src/en/book/ch06.xml	(revision 1235)
+++ src/en/book/ch06.xml	(working copy)
@@ -503,16 +503,16 @@
          network.  A client needs to specify an
          <emphasis>absolute</emphasis> path in the repository URL.  For
          example, if a repository is located at
-        <filename>/usr/local/repositories/project1</filename>, then a
-        client would reach it via <systemitem
-         
class="url">svn://host.example.com/usr/local/repositories/project1
+        <filename>/usr/local/svn/project1</filename>, then a client
+        would reach it via <systemitem
+        class="url">svn://host.example.com/usr/local/svn/project1
          </systemitem>.  To increase security, you can pass the
          <option>-r</option> option to <command>svnserve</command>,
          which restricts it to exporting only repositories below that
          path:</para>

  <screen>
-$ svnserve -d -r /usr/local/repositories
+$ svnserve -d -r /usr/local/svn
  …
  </screen>

Index: src/en/book/ch09.xml
===================================================================
--- src/en/book/ch09.xml	(revision 1235)
+++ src/en/book/ch09.xml	(working copy)
@@ -786,7 +786,7 @@
              <filename>mine</filename>:</para>

            <screen>
-$ svn checkout file:///tmp/repos/test mine
+$ svn checkout file:///usr/local/svn/repos/test mine
  A  mine/a
  A  mine/b
  Checked out revision 2.
@@ -798,7 +798,7 @@
              working copies:</para>

            <screen>
-$ svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz
+$ svn checkout file:///usr/local/svn/repos/test   
file:///usr/local/svn/repos/quiz
  A  test/a
  A  test/b
  Checked out revision 2.
@@ -814,7 +814,7 @@
              <filename>working-copies</filename>:</para>

            <screen>
-$ svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz  
working-copies
+$ svn checkout file:///usr/local/svn/repos/test   
file:///usr/local/svn/repos/quiz working-copies
  A  working-copies/test/a
  A  working-copies/test/b
  Checked out revision 2.
@@ -832,14 +832,14 @@
              incomplete working copy:</para>

            <screen>
-$ svn checkout file:///tmp/repos/test test
+$ svn checkout file:///usr/local/svn/repos/test test
  A  test/a
  A  test/b
  ^C
  svn: The operation was interrupted
  svn: caught SIGINT

-$ svn checkout file:///tmp/repos/test test
+$ svn checkout file:///usr/local/svn/repos/test test
  A  test/c
  A  test/d
  ^C
@@ -1174,7 +1174,7 @@
              commit message):</para>

            <screen>
-$ svn copy near.txt file:///tmp/repos/test/far-away.txt -m "Remote  
copy."
+$ svn copy near.txt file:///usr/local/svn/repos/test/far-away.txt -m  
"Remote copy."

  Committed revision 8.
  </screen>
@@ -1189,14 +1189,14 @@
            </tip>

            <screen>
-$ svn copy file:///tmp/repos/test/far-away near-here
+$ svn copy file:///usr/local/svn/repos/test/far-away near-here
  A         near-here
  </screen>

            <para>And finally, copying between two URLs:</para>

            <screen>
-$ svn copy file:///tmp/repos/test/far-away  
file:///tmp/repos/test/over-there -m "remote copy."
+$ svn copy file:///usr/local/svn/repos/test/far-away  
file:///usr/local/svn/repos/test/over-there -m "remote copy."

  Committed revision 9.
  </screen>
@@ -1209,7 +1209,7 @@
            </tip>

            <screen>
-$ svn copy file:///tmp/repos/test/trunk  
file:///tmp/repos/test/tags/0.6.32-prerelease -m "tag tree"
+$ svn copy file:///usr/local/svn/repos/test/trunk  
file:///usr/local/svn/repos/test/tags/0.6.32-prerelease -m "tag tree"

  Committed revision 12.
  </screen>
@@ -1218,7 +1218,7 @@
              always specify an older revision and tag anytime:</para>

            <screen>
-$ svn copy -r 11 file:///tmp/repos/test/trunk  
file:///tmp/repos/test/tags/0.6.32-prerelease -m "Forgot to tag at rev  
11"
+$ svn copy -r 11 file:///usr/local/svn/repos/test/trunk  
file:///usr/local/svn/repos/test/tags/0.6.32-prerelease -m "Forgot to  
tag at rev 11"

  Committed revision 13.
  </screen>
@@ -1311,7 +1311,7 @@
              to supply a log message:</para>

            <screen>
-$ svn delete -m "Deleting file 'yourfile'"  
file:///tmp/repos/test/yourfile
+$ svn delete -m "Deleting file 'yourfile'"  
file:///usr/local/svn/repos/test/yourfile

  Committed revision 15.
  </screen>
@@ -1656,7 +1656,7 @@
              file and directory):</para>

            <screen>
-$ svn export file:///tmp/repos my-export
+$ svn export file:///usr/local/svn/repos my-export
  A  my-export/test
  A  my-export/quiz
  …
@@ -1673,7 +1673,7 @@
              (possibly for a Windows .zip file distribution):</para>

            <screen>
-$ svn export file://tmp/repos my-export --native-eol CRLF
+$ svn export file://usr/local/svn/repos my-export --native-eol CRLF
  A  my-export/test
  A  my-export/quiz
  …
@@ -2011,7 +2011,7 @@
              <command>ls -l</command>:</para>

            <screen>
-$ svn list --verbose file:///tmp/repos
+$ svn list --verbose file:///usr/local/svn/repos
       16 sally         28361 Jan 16 23:18 README.txt
       27 sally             0 Jan 18 15:27 INSTALL
       24 harry               Jan 18 11:27 examples/
@@ -2151,7 +2151,7 @@
              syntax.</para>

            <screen>
-$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c
+$ svn log http://svn.red-bean.com/repos/test foo.c bar.c
   
------------------------------------------------------------------------
  r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line

@@ -2357,7 +2357,7 @@
              this from inside the working copy of your branch:</para>

            <screen>
-$ svn merge -r 23:30 file:///tmp/repos/trunk/vendors
+$ svn merge -r 23:30 file:///usr/local/svn/repos/trunk/vendors
  U  myproj/thhgttg.txt
  …
  </screen>
@@ -3619,7 +3619,7 @@
              which runs <command>s/OldRoot/NewRoot/</command>.</para>

            <screen>
-$ svn checkout file:///tmp/repos test
+$ svn checkout file:///usr/local/svn/repos test
  A  test/a
  A  test/b
  …
@@ -3629,9 +3629,10 @@

  $ svn update
  svn: Unable to open an ra_local session to URL
-svn: Unable to open repository 'file:///tmp/repos'
+svn: Unable to open repository 'file:///usr/local/svn/repos'

-$ svn switch --relocate file:///tmp/repos file:///tmp/newlocation .
+$ svn switch --relocate file:///usr/local/svn/repos \
+                        file:///usr/local/svn/newlocation .
  $ svn update
  At revision 3.
  </screen>
@@ -4286,7 +4287,7 @@
              repository.</para>

            <screen>
-$ svnadmin lstxns /usr/local/svn/repos/
+$ svnadmin lstxns /usr/local/svn/repos
  1w
  1x
  </screen>
@@ -4323,7 +4324,7 @@
            <para>Recover a hung repository:</para>

            <screen>
-$ svnadmin recover /usr/local/svn/repos/
+$ svnadmin recover /usr/local/svn/repos
  Repository lock acquired.
  Please wait; recovering the repository may take some time...

@@ -4396,14 +4397,14 @@
            <para>Remove named transactions:</para>

            <screen>
-$ svnadmin rmtxns /usr/local/svn/repos/ 1w 1x
+$ svnadmin rmtxns /usr/local/svn/repos 1w 1x
  </screen>

            <para>Fortunately, the output of <command>lstxns</command>
              works great as the input for  
<command>rmtxns</command>:</para>

            <screen>
-$ svnadmin rmtxns /usr/local/svn/repos/  `svnadmin lstxns  
/usr/local/svn/repos/`
+$ svnadmin rmtxns /usr/local/svn/repos  `svnadmin lstxns  
/usr/local/svn/repos`
  </screen>

            <para>Which will remove all uncommitted transactions from
@@ -4461,7 +4462,7 @@
              the file <filename>msg</filename>:</para>

            <screen>
-$ svnadmin setlog /usr/local/svn/repos/ -r 19 msg
+$ svnadmin setlog /usr/local/svn/repos -r 19 msg
  </screen>

          </refsect1>
@@ -4492,7 +4493,7 @@
            <para>Verify a hung repository:</para>

            <screen>
-$ svnadmin verify /usr/local/svn/repos/
+$ svnadmin verify /usr/local/svn/repos
  * Verified revision 1729.
  </screen>

@@ -4754,7 +4755,7 @@
              repository:</para>

            <screen>
-$ svnlook date -r 40 /tmp/repos/
+$ svnlook date -r 40 /usr/local/svn/repos
  2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)
  </screen>

@@ -4795,7 +4796,7 @@
              file, and a copied file:</para>

            <screen>
-$ svnlook diff -r 40 /usr/local/svn/repos/
+$ svnlook diff -r 40 /usr/local/svn/repos
  Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)

  Added: trunk/vendors/deli/soda.txt
@@ -5027,7 +5028,7 @@
              repository:</para>

            <screen>
-$ svnlook log /tmp/repos/
+$ svnlook log /usr/local/svn/repos
  Rearrange lunch.
  </screen>

@@ -5245,7 +5246,7 @@
            repository:</para>

            <screen>
-$ svnlook youngest /tmp/repos/
+$ svnlook youngest /usr/local/svn/repos
  42
  </screen>




More information about the svnbook-dev mailing list