[svnbook] r5623 committed - branches/1.8/zh/book/ch05-repository-admin.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Fri Feb 2 21:26:17 CST 2018


Revision: 5623
          http://sourceforge.net/p/svnbook/source/5623
Author:   wuzhouhui
Date:     2018-02-03 03:26:16 +0000 (Sat, 03 Feb 2018)
Log Message:
-----------
1.8/zh: translation of chapter 5 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch05-repository-admin.xml

Modified: branches/1.8/zh/book/ch05-repository-admin.xml
===================================================================
--- branches/1.8/zh/book/ch05-repository-admin.xml	2018-02-01 11:52:55 UTC (rev 5622)
+++ branches/1.8/zh/book/ch05-repository-admin.xml	2018-02-03 03:26:16 UTC (rev 5623)
@@ -2834,6 +2834,7 @@
 </screen>
         </informalexample>
 
+      <!--
         <para>The result of a load is new revisions added to a
           repository—the same thing you get by making commits
           against that repository from a regular Subversion client.
@@ -2840,8 +2841,8 @@
           Just as in a commit, you can use hook programs to perform
           actions before and after each of the commits made during a
           load process.  By passing the
-          <option>--use-pre-commit-hook</option> and
-          <option>--use-post-commit-hook</option> options to
+          <option>- -use-pre-commit-hook</option> and
+          <option>- -use-post-commit-hook</option> options to
           <command>svnadmin load</command>, you can instruct
           Subversion to execute the pre-commit and post-commit hook
           programs, respectively, for each loaded revision.  You might
@@ -2853,12 +2854,29 @@
           hundreds or thousands of commit emails in rapid succession
           at that list!  You can read more about the use of hook
           scripts in <xref linkend="svn.reposadmin.hooks" />.</para>
+      -->
+        <para>加载的结果是有新的版本号被添加到仓库中—相当于从 Subversion
+          客户端向仓库提交. 和普通的提交一样, 可以利用钩子, 在加载产生的提交
+          之前或之后执行特定的操作, 向 <command>svnadmin load</command> 添加
+          选项 <option>--use-pre-commit-hook</option> 和
+          <option>--use-post-commit-hook</option>, 可以分别指示 Subversion
+          为每一个加载的版本号, 执行钩子 pre-commit 和 post-commit. 比如说
+          管理员可能会利用钩子, 以确保加载的版本号能够经历与普通提交一样的验证
+          过程. 当然, 在使用这两个选项时要小心—如果钩子 post-commit 会为
+          每一个新的版本号发送一封邮件, 你可能不希望在几分钟内收到几百上千封
+          邮件. 关于钩子的更多内容, 在 <xref linkend="svn.reposadmin.hooks" />
+          介绍.</para>
 
+      <!--
         <para>Note that because <command>svnadmin</command> uses
           standard input and output streams for the repository dump and
           load processes, people who are feeling especially saucy can try
           things such as this (perhaps even using different versions of
           <command>svnadmin</command> on each side of the pipe):</para>
+      -->
+        <para>因为 <command>svnadmin</command> 在转储和加载过程中会用到标准
+          输出和标准输入, 感兴趣的读者可以试一下像下面这样执行命令 (在管道的
+          两边甚至可以使用不同版本的 <command>svnadmin</command>):</para>
 
         <informalexample>
           <screen>
@@ -2867,6 +2885,7 @@
 </screen>
         </informalexample>
 
+      <!--
         <para>By default, the dump file will be quite large—much
           larger than the repository itself.  That's because by default
           every version of every file is expressed as a full text in the
@@ -2875,19 +2894,35 @@
           process (such as a compression program, filtering program, or
           loading process).  But if you're creating a dump file
           for longer-term storage, you'll likely want to save disk space
-          by using the <option>--deltas</option> option.  With this
+          by using the <option>- -deltas</option> option.  With this
           option, successive revisions of files will be output as
           compressed, binary differences—just as file revisions
           are stored in a repository.  This option is slower, but it
           results in a dump file much closer in size to the original
           repository.</para>
+      -->
+        <para>默认情况下, 转储文件会很大—比仓库要大得多, 这是因为每个
+          文件的每个版本在转储文件中都是全文本表示. 这是最快速和最简单的方式,
+          如果转储文件还会被其他程序 (例如压缩程序, 过滤程序等) 处理, 处理
+          起来也会非常方便. 但是如果管理员需要长时间保存转储文件, 向
+          <command>svnadmin</command> 添加选项 <option>--deltas</option> 可以
+          减小转储文件的大小, 从而节省存储空间. 添加选项
+          <option>--deltas</option> 后, 文件的连续版本号将会以压缩的二进制差
+          异格式输出—和仓库保存文件版本号的方式是一样的. 添加选项后命令
+          会执行得更慢一些, 但得到的转储文件大小会更接近仓库的大小.</para>
 
+      <!--
         <para>We mentioned previously that <command>svnadmin
           dump</command> outputs a range of revisions.  Use the
-          <option>--revision</option> (<option>-r</option>) option to
+          <option>- -revision</option> (<option>-r</option>) option to
           specify a single revision, or a range of revisions, to dump.
           If you omit this option, all the existing repository revisions
           will be dumped.</para>
+      -->
+        <para>我们前面已经提到 <command>svnadmin dump</command> 可以输出一段
+          范围内的版本号. 使用选项 <option>--revision</option>
+          (<option>-r</option>) 指定一个单独的, 或一段范围内的版本号进行转
+          储. 如果省略该选项, 仓库内所有的版本号都会被转储.</para>
 
         <informalexample>
           <screen>




More information about the svnbook-dev mailing list