[svnbook] r5950 committed - branches/1.8/zh/book/ref-svnsync.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Tue Jul 16 04:54:24 CDT 2019


Revision: 5950
          http://sourceforge.net/p/svnbook/source/5950
Author:   wuzhouhui
Date:     2019-07-16 09:54:12 +0000 (Tue, 16 Jul 2019)
Log Message:
-----------
1.8/zh: svnsync reference translated, but review still needed

Modified Paths:
--------------
    branches/1.8/zh/book/ref-svnsync.xml

Modified: branches/1.8/zh/book/ref-svnsync.xml
===================================================================
--- branches/1.8/zh/book/ref-svnsync.xml	2019-07-12 10:06:05 UTC (rev 5949)
+++ branches/1.8/zh/book/ref-svnsync.xml	2019-07-16 09:54:12 UTC (rev 5950)
@@ -331,9 +331,13 @@
 
     <refnamediv>
       <refname>svnsync copy-revprops</refname>
+      <!--
       <refpurpose>Copy all revision properties for a particular
         revision (or range of revisions) from the source
         repository to the mirror repository.</refpurpose>
+      -->
+      <refpurpose>把源仓库中某个特定版本号或版本号范围上的所有版本号属性都
+        复制到镜像仓库中.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -345,8 +349,12 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
 
+      <!--
       <para>Because Subversion revision properties can be changed
         at any time, it's possible that the properties for some
         revision might be changed after that revision has already
@@ -360,7 +368,16 @@
         copy-revprops</command> is the answer to this problem.
         Use it to resynchronize the revision properties for a
         particular revision or range of revisions.</para>
+      -->
+      <para>由于 Subversion 的版本号属性可以在任意时刻发生变化, 因此在把版本
+        号属性复制到镜像仓库后, 源仓库中的版本号属性可能又发生了变化. 由于
+        <command>svnsync synchronize</command> 只能处理还未被同步的版本号
+        范围, 它不会注意到范围之外的版本号属性是否发生了变化, 这就造成了源
+        仓库和镜像仓库在版本号属性上发生了不一致. 命令 <command>svnsync
+          copy-revprops</command> 正是这一问题的解决办法, 可以用它重新同步
+        某个版本号或版本号范围上的版本号属性.</para>
 
+      <!--
       <para>When <replaceable>SOURCE_URL</replaceable> is
         provided, <command>svnsync</command> will use it as the
         repository URL which the destination repository is
@@ -372,13 +389,26 @@
         case <command>svnsync</command> will consult the mirror
         repository's records to determine the source URL which
         should be used.</para>
+      -->
+      <para>如果指定了 <replaceable>SOURCE_URL</replaceable>, 它将作为
+        <command>svnsync</command> 的源仓库. 通常来说,
+        <replaceable>SOURCE_URL</replaceable> 和命令 <command>svnsync
+          initialize</command> 中的源仓库 URL 是相同的. 如果省略了
+        <replaceable>SOURCE_URL</replaceable>, <command>svnsync</command>
+        将通过询问镜像仓库来确定源仓库的 URL.</para>
 
       <warning>
+      <!--
         <para>We strongly recommend that you specify the source
           URL on the command-line, especially when untrusted users
           have write access to the revision 0 properties
           which <command>svnsync</command> uses to coordinate its
           efforts.</para>
+      -->
+        <para>我们强烈建议在命令行上显式地指定源仓库的 URL, 尤其是当不受
+          信任的用户对版本号 0 的版本号属性具有写权限时, 这是因为
+          <command>svnsync</command> 通过版本号 0 的版本号属性来协调很多
+          工作.</para>
       </warning>
 
     </refsect1>
@@ -385,7 +415,10 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -409,10 +442,16 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Resynchronize the revision properties associated with
         a single revision (r6):</para>
+      -->
+      <para>重新同步版本号 6 的版本号属性:</para>
 
       <informalexample>
         <screen>
@@ -439,7 +478,10 @@
 
     <refnamediv>
       <refname>svnsync help</refname>
+      <!--
       <refpurpose>Help!</refpurpose>
+      -->
+      <refpurpose>获取帮助信息.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -448,8 +490,12 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
 
+      <!--
       <para>This subcommand is useful when you're trapped in a
         foreign prison with neither a Net connection nor a copy of
         this book, but you do have a local Wi-Fi network running
@@ -456,13 +502,20 @@
         and you'd like to sync a copy of your repository over to
         the backup server that Ira The Knife is running over in
         cell block D.</para>
+      -->
+      <para>如果你被关到了一座监狱中, 不能访问因特网, 手中也没有这本书, 那
+        就只能通过该命令来学习如何使用 <command>svnsync</command>.</para>
         
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
       <para>None</para>
+      -->
+      <title>选项</title>
+      <para>无</para>
     </refsect1>
 
   </refentry>
@@ -480,8 +533,11 @@
 
     <refnamediv>
       <refname>svnsync info</refname>
+      <!--
       <refpurpose>Print information about the synchronization
         of a destination repository.</refpurpose>
+      -->
+      <refpurpose>打印目标仓库中, 与同步相关的信息.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -490,16 +546,26 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
       <para>Print the synchronization source URL, source repository
         UUID and the last revision merged from the source to the
         destination repository at <replaceable>DEST_URL</replaceable>.</para>
+      -->
+      <para>打印的信息有源仓库的 URL, 源仓库的 UUID, 以及最后一个被同步的
+        版本号.</para>
     </refsect1>
     
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>描述</title>
 
       <informalexample>
         <screen>
@@ -518,10 +584,16 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Print the synchronization information of a mirror
         repository:</para>
+      -->
+      <para>打印镜像仓库中, 与同步相关的信息:</para>
 
       <informalexample>
         <screen>
@@ -549,8 +621,11 @@
 
     <refnamediv>
       <refname>svnsync initialize (init)</refname>
+      <!--
       <refpurpose>Initialize a mirror repository for
         synchronization from the source repository.</refpurpose>
+      -->
+      <refpurpose>初始化一个镜像仓库.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -560,8 +635,12 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
 
+      <!--
       <para><command>svnsync initialize</command> verifies that a
         repository meets the basic requirements of a new mirror
         repository and records the initial administrative
@@ -570,7 +649,14 @@
         by <replaceable>SOURCE_URL</replaceable>).  This is the
         first <command>svnsync</command> operation you run on a
         would-be mirror repository.</para>
+      -->
+      <para><command>svnsync initialize</command> 先检查目标仓库是否符合
+        作为镜像仓库的基本要求, 然后把初始的管理信息记录到镜像仓库中,
+        初始的管理信息把镜像仓库与源仓库 (由参数
+        <replaceable>SOURCE_URL</replaceable> 指定) 关联起来. 这是针对
+        镜像仓库的第一步操作.</para>
 
+      <!--
       <para>Ordinarily, <replaceable>SOURCE_URL</replaceable> is
         the URL of the root directory of the Subversion repository
         you wish to mirror.  Subversion 1.5 and newer allow you to
@@ -578,13 +664,19 @@
         mirroring, though — simply specify the URL of the
         source repository subdirectory you wish to mirror
         as <replaceable>SOURCE_URL</replaceable>.</para>
+      -->
+      <para>一般情况下, <replaceable>SOURCE_URL</replaceable> 是源仓库
+        根目录的 URL. Subversion 1.5 及更新的版本允许用户针对仓库的子目录
+        进行同步—方法是把 <replaceable>SOURCE_URL</replaceable>
+        写成欲同步的仓库子目录的 URL.</para>
 
+      <!--
       <para>By default, the aforementioned basic requirements of a
         mirror are that it allows revision property modifications
         and that it contains no version history.  However, as of
         Subversion 1.7, you may now optionally disable the
         verification that the target repository is empty using
-        the <option>--allow-non-empty</option> option.  While the
+        the <option>- -allow-non-empty</option> option.  While the
         use of this option should not become habitual (as it
         bypasses a valuable safeguard mechanism), it does aid in
         one very common use-case: initializing a copy of a
@@ -597,15 +689,31 @@
         faster to first make a copy of the mature repository
         (perhaps using <command>svnadmin hotcopy</command>) and
         then use <command>svnsync initialize
-        --allow-non-empty</command> to initialize that copy as a
+        - -allow-non-empty</command> to initialize that copy as a
         mirror which is now already up-to-date with the
         original.</para>
+      -->
+      <para>默认情况下, 上面提到的作为镜像仓库的基本要求指的是仓库
+        允许修改版本号属性, 并且不含有任何版本历史. 然而, 从 Subversion
+        1.7 开始, 用户可以通过选项 <option>--allow-non-empty</option> 来
+        允许含有版本历史的仓库作为镜像仓库. 但是用户不应该习惯性地使用该
+        选项 (因为它同时还会关掉保护机制), 而是只在这样一种情景下使用:
+        初始化一个已有的仓库副本, 用它作为源仓库的镜像仓库. 如果仓库已经
+        包含了大量的版本历史, 那么直接用它作为镜像仓库将会非常方便. 为了
+        创建一个镜像仓库, 比较普通的做法是先初始化一个空仓库, 然后再同步
+        全部的版本历史, 但是更好的做法是先复制出一个仓库副本 (例如使用命令
+        <command>svnadmin hotcopy</command>), 再用
+        <command>svnsync initialize --allow-non-empty</command> 把仓库副本
+        初始化成一个镜像仓库, 管理员将会看到后面这种做法会快得多.</para>
 
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -629,10 +737,17 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Fail to initialize a mirror repository due to
         inability to modify revision properties:</para>
+      -->
+      <para>如果目标仓库禁止修改版本号属性, <command>svnsync
+          initialize</command> 将会失败:</para>
 
       <informalexample>
         <screen>
@@ -644,9 +759,13 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>Initialize a repository as a mirror, having already
         created a <literal>pre-revprop-change</literal> hook that
         permits all revision property changes:</para>
+      -->
+      <para>把一个仓库初始化镜像仓库, 该仓库已经通过钩子脚本
+        pre-revprop-change 来允许修改版本号属性:</para>
 
       <informalexample>
         <screen>
@@ -673,8 +792,11 @@
 
     <refnamediv>
       <refname>svnsync synchronize (sync)</refname>
+      <!--
       <refpurpose>Transfer all pending revisions from the source
         repository to the mirror repository.</refpurpose>
+      -->
+      <refpurpose>把源仓库中未同步过的版本号同步到镜像仓库中.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -684,8 +806,12 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
 
+      <!--
       <para>The <command>svnsync synchronize</command> command
         does all the heavy lifting of a repository mirroring
         operation.  After consulting with the mirror repository to
@@ -692,9 +818,17 @@
         see which revisions have already been copied into it, it
         then begins to copy any not-yet-mirrored revisions from
         the source repository.</para>
+      -->
+      <para>命令 <command>svnsync syncronize</command> 负责镜像操作的大
+        部分工作. 命令首先询问镜像仓库已经复制了哪些版本号, 然后再从源
+        仓库复制那些还未被同步的版本号.</para>
 
+      <!--
       <para><command>svnsync synchronize</command> can be
         gracefully canceled and restarted.</para>
+      -->
+      <para><command>svnsync synchronize</command> 可以被任意地中止或重启.
+      </para>
 
       <para>When <replaceable>SOURCE_URL</replaceable> is
         provided, <command>svnsync</command> will use it as the
@@ -707,13 +841,25 @@
         case <command>svnsync</command> will consult the mirror
         repository's records to determine the source URL which
         should be used.</para>
+      <para>如果指定了 <replaceable>SOURCE_URL</replaceable>,
+        <command>svnsync</command> 将把它作为源仓库的 URL. 通常来说,
+        <replaceable>SOURCE_URL</replaceable> 和命令 <command>svnsync
+          initialize</command> 中的源仓库 URL 是相同的. 如果省略了
+        <replaceable>SOURCE_URL</replaceable>, <command>svnsync</command>
+        将通过询问镜像仓库来确定源仓库的 URL.</para>
 
       <warning>
+      <!--
         <para>We strongly recommend that you specify the source
           URL on the command-line, especially when untrusted users
           have write access to the revision 0 properties
           which <command>svnsync</command> uses to coordinate its
           efforts.</para>
+      -->
+        <para>我们强烈建议在命令行上显式地指定源仓库的 URL, 尤其是当不受
+          信任的用户对版本号 0 的版本号属性具有写权限时, 这是因为
+          <command>svnsync</command> 通过版本号 0 的版本号属性来协调很多
+          工作.</para>
       </warning>
 
     </refsect1>
@@ -720,7 +866,10 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -743,10 +892,16 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Copy unsynchronized revisions from the source
         repository to the mirror repository:</para>
+      -->
+      <para>把源仓库中未同步过的版本号同步到镜像仓库中:</para>
 
       <informalexample>
         <screen>




More information about the svnbook-dev mailing list