[svnbook] r4066 committed - Finish issue #140 ("ch05: svnsync walkthrough refers heavily to...
svnbook at googlecode.com
svnbook at googlecode.com
Wed Sep 7 08:30:59 CDT 2011
Revision: 4066
Author: cmpilato at gmail.com
Date: Wed Sep 7 06:29:59 2011
Log: Finish issue #140 ("ch05: svnsync walkthrough refers heavily to
CollabNet's Subversion repository ... which is no more.")
* en/book/ch05-repository-admin.xml
Rework svnsync examples to use the book's source repository instead
of the now-defunct svn.collab.net Subversion source code repository.
http://code.google.com/p/svnbook/source/detail?r=4066
Modified:
/trunk/en/book/ch05-repository-admin.xml
=======================================
--- /trunk/en/book/ch05-repository-admin.xml Fri Aug 26 08:14:22 2011
+++ /trunk/en/book/ch05-repository-admin.xml Wed Sep 7 06:29:59 2011
@@ -2761,21 +2761,21 @@
disregard if they aren't required by or suitable for your
environment.</para>
- <para>As a service to the fine developers of our favorite
- version control system, we will be mirroring the public
- Subversion source code repository and exposing that mirror
- publicly on the Internet, hosted on a different machine than
- the one on which the original Subversion source code
- repository lives. This remote host has a global configuration
- that permits anonymous users to read the contents of
- repositories on the host, but requires users to authenticate
- to modify those repositories. (Please forgive us for
- glossing over the details of Subversion server configuration
- for the moment—those are covered thoroughly in <xref
- linkend="svn.serverconfig" />.) And for no other reason than
- that it makes for a more interesting example, we'll be driving
- the replication process from a third machine—the one that
- we currently find ourselves using.</para>
+ <para>We will be mirroring the public Subversion repository
+ which houses the source code for this very book and exposing
+ that mirror publicly on the Internet, hosted on a different
+ machine than the one on which the original Subversion source
+ code repository lives. This remote host has a global
+ configuration that permits anonymous users to read the
+ contents of repositories on the host, but requires users to
+ authenticate to modify those repositories. (Please forgive
+ us for glossing over the details of Subversion server
+ configuration for the moment—those are covered
+ thoroughly in <xref linkend="svn.serverconfig" />.) And for
+ no other reason than that it makes for a more interesting
+ example, we'll be driving the replication process from a
+ third machine—the one that we currently find ourselves
+ using.</para>
<para>First, we'll create the repository which will be our
mirror. This and the next couple of steps do require shell
@@ -2859,12 +2859,13 @@
<command>svnsync</command> is to register in our target
repository the fact that it will be a mirror of the source
repository. We do this using the <command>svnsync
- initialize</command> subcommand. The URLs we provide point to
- the root directories of the target and source repositories,
- respectively. In Subversion 1.4, this is required—only
- full mirroring of repositories is permitted. In Subversion
- 1.5, though, you can use <command>svnsync</command> to mirror
- only some subtree of the repository, too.</para>
+ initialize</command> subcommand. The URLs we provide point
+ to the root directories of the target and source
+ repositories, respectively. In Subversion 1.4, this is
+ required—only full mirroring of repositories is
+ permitted. Beginning with Subversion 1.5, though, you can
+ use <command>svnsync</command> to mirror only some subtree
+ of the repository, too.</para>
<informalexample>
<screen>
@@ -2875,9 +2876,10 @@
another repository.
…
$ svnsync initialize http://svn.example.com/svn-mirror \
- http://svn.collab.net/repos/svn \
+ http://svnbook.googlecode.com/svn \
--sync-username syncuser --sync-password syncpass
-Copied properties for revision 0.
+Copied properties for revision 0 (svn:sync-* properties skipped).
+NOTE: Normalized svn:* properties to LF line endings (1 rev-props, 0
node-props).
$
</screen>
</informalexample>
@@ -2896,10 +2898,9 @@
repositories. This caused problems when a user's
credentials weren't exactly the same for both repositories,
especially when running in noninteractive mode (with the
- <option>--non-interactive</option> option).</para>
-
- <para>This has been fixed in Subversion 1.5 with the
- introduction of two new pairs of options. Use
+ <option>--non-interactive</option> option). This was
+ fixed in Subversion 1.5 with the introduction of two new
+ pairs of options. Use
<option>--source-username</option> and
<option>--source-password</option> to provide authentication
credentials for the source repository; use
@@ -2942,26 +2943,24 @@
with which it was initialized.
…
$ svnsync synchronize http://svn.example.com/svn-mirror \
- http://svn.collab.net/repos/svn
-Transmitting file data ........................................
+ http://svnbook.googlecode.com/svn
Committed revision 1.
Copied properties for revision 1.
-Transmitting file data ..
Committed revision 2.
Copied properties for revision 2.
-Transmitting file data .....
+Transmitting file data .
Committed revision 3.
Copied properties for revision 3.
…
-Transmitting file data ..
-Committed revision 23406.
-Copied properties for revision 23406.
Transmitting file data .
-Committed revision 23407.
-Copied properties for revision 23407.
+Committed revision 4063.
+Copied properties for revision 4063.
+Transmitting file data .
+Committed revision 4064.
+Copied properties for revision 4064.
Transmitting file data ....
-Committed revision 23408.
-Copied properties for revision 23408.
+Committed revision 4065.
+Copied properties for revision 4065.
$
</screen>
</informalexample>
@@ -3055,29 +3054,39 @@
bookkeeping property on the mirror repository. Future
synchronization operations against that mirror which omit
the source URL at the command line will consult the
- special <literal>svn:sync-from-url</literal> property stored
- on the mirror itself to know where to synchronize from.
- This value is used literally by the
- synchronization process, though. So while from within
- CollabNet's network you can perhaps access our example
- source URL as <literal>http://svn/repos/svn</literal>
- (because that first <literal>svn</literal> magically gets
- <literal>.collab.net</literal> appended to it by DNS
- voodoo), if you later need to update that mirror from
- another machine outside CollabNet's network, the
- synchronization might fail (because the hostname
- <literal>svn</literal> is ambiguous). To avoid this
- problem, it's best to use fully qualified source repository
- URLs when initializing a mirror repository rather than those
- that refer to only hostnames or IP addresses (which can
- change over time). But here again, if you need an existing
mirror
- to start referring to a different URL for the same source
- repository, you can change the bookkeeping property which
- houses that information:</para>
-
- <!-- ### TODO: I think 'svnsync init -/-allow-non-empty'
- ### can be used for this, too. -->
-
+ special <literal>svn:sync-from-url</literal> property
+ stored on the mirror itself to know where to synchronize
+ from. This value is used literally by the synchronization
+ process, though. Be wary of using non-fully-qualified
+ domain names (such as referring
+ to <literal>svnbook.red-bean.com</literal> as
+ simply <literal>svnbook</literal> because that happens to
+ work when you are connected directly to
+ the <literal>red-bean.com</literal> network), domain names
+ which don't resolve or resolve differently depending on
+ where you happen to be operating from, or IP addresses
+ (which can change over time). But here again, if you need
+ an existing mirror to start referring to a different URL
+ for the same source repository, you can change the
+ bookkeeping property which houses that information. Users
+ of Subversion 1.7 or better can use <command>svnsync init
+ --allow-non-empty</command> to reinitialize their mirrors
+ with new source URL:</para>
+
+ <informalexample>
+ <screen>
+$ svnsync initialize --allow-non-empty http://svn.example.com/svn-mirror \
+
<replaceable>NEW-SOURCE-URL</replaceable>
+Copied properties for revision 4065.
+$
+</screen>
+ </informalexample>
+
+ <para>If you are running an older version of Subversion,
+ you'll need to manually tweak
+ the <literal>svn:sync-from-url</literal> bookkeeping
+ property:</para>
+
<informalexample>
<screen>
$ svn propset --revprop -r0 svn:sync-from-url
<replaceable>NEW-SOURCE-URL</replaceable> \
@@ -3101,9 +3110,10 @@
own special properties in revision 0 of the source
repository, it simply ignores them.</para>
- <para>In Subversion 1.6, an <command>svnsync info</command>
- subcommand has been added to easily display the special
- bookkeeping properties in the destination repository.</para>
+ <para>An <command>svnsync info</command> subcommand was
+ added in Subversion 1.6 to easily display the special
+ bookkeeping properties in the destination
+ repository.</para>
<informalexample>
<screen>
@@ -3114,9 +3124,9 @@
located at DEST_URL.
…
$ svnsync info http://svn.example.com/svn-mirror
-Source URL: http://svn.collab.net/repos/svn
-Source Repository UUID: 612f8ebc-c883-4be0-9ee0-a4e9ef946e3a
-Last Merged Revision: 23408
+Source URL: http://svnbook.googlecode.com/svn
+Source Repository UUID: 931749d0-5854-0410-9456-f14be4d6b398
+Last Merged Revision: 4065
$
</screen>
</informalexample>
More information about the svnbook-dev
mailing list