[svnbook commit] r1672 - trunk/src/zh/book

rocksun svnbook-dev at red-bean.com
Thu Sep 8 23:48:16 CDT 2005


Author: rocksun
Date: Thu Sep  8 23:48:15 2005
New Revision: 1672

Modified:
   trunk/src/zh/book/appa.xml
Log:
* zh/book/appa.xml completed


Modified: trunk/src/zh/book/appa.xml
==============================================================================
--- trunk/src/zh/book/appa.xml	(original)
+++ trunk/src/zh/book/appa.xml	Thu Sep  8 23:48:15 2005
@@ -1,20 +1,13 @@
-<appendix id="svn-ap-a">
+<appendix id="svn-ap-a">
   <title>Subversion for CVS Users</title>
 
   <simplesect>
 
-    <para>This appendix is a guide for CVS users new to Subversion.
-      It's essentially a list of differences between the two systems
-      as <quote>viewed from 10,000 feet</quote>. For each section, we
-      provide backreferences to relevant chapters when
-      possible.</para>
-
-    <para>Although the goal of Subversion is to take over the current
-      and future CVS user base, some new features and design changes
-      were required to fix certain <quote>broken</quote> behaviors
-      that CVS had.  This means that, as a CVS user, you may need to
-      break habits—ones that you forgot were odd to begin
-      with.</para>
+    <para>这个附录可以作为CVS用户开始使用Subversion的指南,实质上就是鸟瞰这两个系统之间的区别列表,在每一小节,我们会尽可能提供相关章节的引用。
+    </para>
+
+    <para>尽管Subversion的目标是接管当前和未来的CVS用户基础,需要一些新的特性设计来修正一些CVS<quote>不好的</quote>行为习惯,这意味着,作为一个CVS用户,你或许需要打破习惯—忘记一些奇怪的习惯来作为开始。
+    </para>
 
   </simplesect>
 
@@ -22,32 +15,18 @@
   <!-- ======================== SECTION 1 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-1">
-    <title>Revision Numbers Are Different Now</title>
+    <title>修订版本号现在不同了</title>
+
+    <para>在CVS中,修订版本号是每文件的,这是因为CVS使用RCS作为后端;每个文件都在版本库有一个对应的RCS文件,版本库几乎就是根据项目树的结构创建。
+    </para>
+
+    <para>在Subversion,版本库看起来像是一个单独的文件系统,每次提交导致一个新的文件系统;本质上,版本库是一堆树,每棵树都有一个单独的修订版本号。当有人谈论<quote>修订版本54</quote>时,他们是在讨论一个特定的树(并且间接来说,文件系统在提交54次之后的样子)。
+    </para>
 
-    <para>In CVS, revision numbers are per-file.  This is because CVS
-      uses RCS as a backend; each file has a corresponding RCS file in
-      the repository, and the repository is roughly laid out according
-      to the structure of your project tree.</para>
-
-    <para>In Subversion, the repository looks like a single
-      filesystem.  Each commit results in an entirely new filesystem
-      tree; in essence, the repository is an array of trees.  Each of
-      these trees is labeled with a single revision number.  When
-      someone talks about <quote>revision 54</quote>, they're talking
-      about a particular tree (and indirectly, the way the filesystem
-      looked after the 54th commit).</para>
-
-    <para>Technically, it's not valid to talk about <quote>revision 5
-      of <filename>foo.c</filename></quote>.  Instead, one would say
-      <quote><filename>foo.c</filename> as it appears in revision
-      5</quote>. Also, be careful when making assumptions about the
-      evolution of a file.  In CVS, revisions 5 and 6 of
-      <filename>foo.c</filename> are always different.  In Subversion,
-      it's most likely that <filename>foo.c</filename> did
-      <emphasis>not</emphasis> change between revisions 5 and
-      6.</para>
+    <para>技术上讲,谈论<quote>文件<filename>foo.c</filename>的修订版本5</quote>是不正确的,相反,一个人会说<quote><filename>foo.c</filename>在修订版本5出现</quote>。同样,我们在假定文件的进展时也要小心,在CVS,文件<filename>foo.c</filename>的修订版本5和6一定是不同的,在Subversion,<filename>foo.c</filename>可能在修订版本5和6之间<emphasis>没有</emphasis>改变。
+    </para>
 
-    <para>For more details on this topic, see <xref
+    <para>更多细节见<xref
       linkend="svn-ch-2-sect-3.2" />.</para>
 
   </sect1>
@@ -56,72 +35,42 @@
   <!-- ======================== SECTION 2 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-2">
-    <title>Directory Versions</title>
+    <title>目录的版本</title>
     
-    <para>Subversion tracks tree structures, not just file contents.
-      It's one of the biggest reasons Subversion was written to
-      replace CVS.</para>
+    <para>Subversion会纪录目录树的结构,不仅仅是文件的内容。这是编写Subversion替代CVS最重要的一个原因。
+    </para>
 
-    <para>Here's what this means to you, as a former CVS user:</para>
+    <para>以下是对你意味着什么的说明,作为一个前CVS用户:</para>
 
     <itemizedlist>
       <listitem>
-        <para>The <command>svn add</command> and <command>svn
-          delete</command> commands work on directories now, just as
-          they work on files.  So do <command>svn copy</command> and
-          <command>svn move</command>.  However, these commands do
-          <emphasis>not</emphasis> cause any kind of immediate change
-          in the repository.  Instead, the working items are simply
-          <quote>scheduled</quote> for addition or deletion.  No
-          repository changes happen until you run <command>svn
-          commit</command>.</para>
+        <para><command>svn add</command>和<command>svn
+          delete</command>现在也工作在目录上了,就像在文件上一样,还有<command>svn 
+          copy</command>和<command>svn 
+          move</command>也一样。然而,这些命令<emphasis>不</emphasis>会导致版本库即时的变化,相反,工作的项目只是<quote>预定要</quote>添加和删除,在运行<command>svn
+          commit</command>之前没有版本库的修改。</para>
       </listitem>
       <listitem>
-        <para>Directories aren't dumb containers anymore; they have
-          revision numbers like files.  (Or more properly, it's
-          correct to talk about <quote>directory
-          <filename>foo/</filename> in revision 5</quote>.)</para>
+        <para>目录不再是哑容器了;它们也有文件一样的修订版本号。(更准确一点,谈论<quote>修订版本5的目录
+<filename>foo/</filename></quote>是正确的。)
+        </para>
       </listitem>
     </itemizedlist>
 
-    <para>Let's talk more about that last point.  Directory versioning
-      is a hard problem; because we want to allow mixed-revision
-      working copies, there are some limitations on how far we can
-      abuse this model.</para>
-
-    <para>From a theoretical point of view, we define <quote>revision
-      5 of directory <filename>foo</filename></quote> to mean a
-      specific collection of directory-entries and properties.  Now
-      suppose we start adding and removing files from
-      <filename>foo</filename>, and then commit.  It would be a lie
-      to say that we still have revision 5 of
-      <filename>foo</filename>.  However, if we bumped
-      <filename>foo</filename>'s revision number after the commit,
-      that would be a lie too; there may be other changes to
-      <filename>foo</filename> we haven't yet received, because we
-      haven't updated yet.</para>
+    <para>让我们再讨论一下最后一点,目录版本化是一个困难的问题;因为我们希望允许混合修订版本的工作拷贝,有一些防止我们滥用这个模型的限制。
+    </para>
+
+    <para>从理论观点,我们定义<quote>目录<filename>foo</filename>的修订版本5</quote>意味着一组目录条目和属性。现在假定我们从<filename>foo</filename>开始添加和删除文件,然后提交。如果说我们还有<filename>foo</filename>的修订版本5就是一个谎言。然而,如果说我们在提交之后***<filename>foo</filename>修订版本号码,这也是一个谎言;<filename>foo</filename>还有一些修改我们没有得到,因为我们还没有更新。
+    </para>
     
-    <para>Subversion deals with this problem by quietly tracking
-      committed adds and deletes in the <filename>.svn</filename>
-      area.  When you eventually run <command>svn update</command>,
-      all accounts are settled with the repository, and the
-      directory's new revision number is set correctly.
-      <emphasis>Therefore, only after an update is it truly safe to
-      say that you have a <quote>perfect</quote> revision of a
-      directory.</emphasis> Most of the time, your working copy will
-      contain <quote>imperfect</quote> directory revisions.</para>
+    <para>Subversion通过在<filename>.svn</filename>区域偷偷的纪录添加和删除来处理这些问题,当你最后运行<command>svn update</command>,所有的账目会到版本库结算,并且目录的新修订版本号会正确设置。<emphasis>因此,只有在更新之后才可以真正安全地说我们有了一个<quote>完美的</quote>修订版本目录。</emphasis>在大多数时候,你的工作拷贝会保存<quote>不完美的</quote>目录修订版本。
+    </para>
     
-    <para>Similarly, a problem arises if you attempt to commit
-      property changes on a directory.  Normally, the commit would
-      bump the working directory's local revision number.  But again,
-      that would be a lie, because there may be adds or deletes that
-      the directory doesn't yet have, because no update has happened.
-      <emphasis>Therefore, you are not allowed to commit
-      property-changes on a directory unless the directory is
-      up-to-date.</emphasis></para>
+    <para>同样的,如果你尝试提交目录的属性修改会有一个问题,通常情况下,提交应该会提高工作目录的本地修订版本号,但是再一次,这还是一个谎言,因为这个目录还没有添加和删除发生,因为还没有更新发生。<emphasis>因此,在你的目录不是最新的时候不允许你提交属性修改。</emphasis>
+    </para>
 
-    <para>For more discussion about the limitations of directory
-      versioning, see <xref linkend="svn-ch-2-sect-3.4"/>.</para>
+    <para>关于目录版本的更多讨论见<xref linkend="svn-ch-2-sect-3.4"/>。
+    </para>
 
   </sect1>
 
@@ -130,57 +79,46 @@
   <!-- ======================== SECTION 3 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-3">
-    <title>More Disconnected Operations</title>
+    <title>更多离线操作</title>
+
+    <para>近些年来,磁盘空间变得异常便宜和丰富,但是网络带宽还没有,因此Subversion工作拷贝为紧缺资源进行了优化。
+    </para>
 
-    <para>In recent years, disk space has become outrageously cheap
-      and abundant, but network bandwidth has not.  Therefore, the
-      Subversion working copy has been optimized around the scarcer
-      resource.</para>
-
-    <para>The <filename>.svn</filename> administrative directory
-      serves the same purpose as the <filename>CVS</filename>
-      directory, except that it also stores read-only,
-      <quote>pristine</quote> copies of your files.  This allows you
-      to do many things off-line:</para>
+    <para><filename>.svn</filename>管理目录维护者与<filename>CVS</filename>同样的功能,除了它还保存了只读的文件<quote>原始</quote>拷贝,这允许你做许多离线操作:
+    </para>
     
     <variablelist>
       
       <varlistentry>
         <term><command>svn status</command></term>
         <listitem>
-          <para>Shows you any local changes you've made (see <xref
-            linkend="svn-ch-3-sect-5.3.1"/>)</para>
+          <para>显示你所做的本地修改(见<xref
+            linkend="svn-ch-3-sect-5.3.1"/>)</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><command>svn diff</command></term>
         <listitem>
-          <para>Shows you the details of your changes (see <xref
-            linkend="svn-ch-3-sect-5.3.2"/>)</para>
+          <para>显示修改的详细信息(见see <xref
+            linkend="svn-ch-3-sect-5.3.2"/>)</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><command>svn revert</command></term>
         <listitem>
-          <para>Removes your local changes (see <xref
-            linkend="svn-ch-3-sect-5.3.3"/>)</para>
+          <para>删除你的本地修改(见<xref
+            linkend="svn-ch-3-sect-5.3.3"/>)</para>
         </listitem>
       </varlistentry>
 
     </variablelist>
 
-    <para>Also, the cached pristine files allow the Subversion client
-      to send differences when committing, which CVS cannot do.</para>
-
-    <para>The last subcommand in the list is new; it will not only
-      remove local mods, but it will un-schedule operations such as
-      adds and deletes.  It's the preferred way to revert a file;
-      running <command>rm file; svn update</command> will still work, but
-      it blurs the purpose of updating.  And, while we're on this
-      subject…
+    <para>另外,原始文件的缓存允许Subversion客户端在提交时只提交区别,这是CVS做不到的。
+    </para>
 
+    <para>列表中最后一个子命令是新的;它不仅仅删除本地修改,也会取消如增加和删除的预定操作,这是恢复文件推荐的方式;运行<command>rm file; svn update</command>还可以工作,但是这样侮辱了更新操作的作用,而且,我们在这个主题…
     </para>
 
   </sect1>
@@ -189,63 +127,46 @@
   <!-- ======================== SECTION 4 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-4">
-    <title>Distinction Between Status and Update</title>
+    <title>区分状态和更新</title>
+
+    <para>在Subversion,我们已经设法抹去<command>cvs status</command>和<command>cvs update</command>之间的混乱。
+    </para>
+
+    <para><command>cvs status</command>命令有两个目的:第一,显示用户在工作拷贝的所有本地修改,第二,显示给用户那些文件是最新的。很不幸,因为CVS难以阅读的状态输出,许多CVS用户并没有充分利用这个命令的好处。相反,他们慢慢习惯运行<command>cvs update</command>或<command>cvs update -n</command>来快速查看他们的区别,如果用户忘记使用<option>-n</option>选项,副作用就是将还没有准备好处理的版本库修改合并到工作拷贝。
+    </para>
 
-    <para>In Subversion, we've tried to erase a lot of the confusion
-      between the <command>cvs status</command> and
-      <command>cvs update</command> commands.</para>
-
-    <para>The <command>cvs status</command> command has two purposes:
-      first, to show the user any local modifications in the working
-      copy, and second, to show the user which files are out-of-date.
-      Unfortunately, because of CVS's hard-to-read status output, many
-      CVS users don't take advantage of this command at all.  Instead,
-      they've developed a habit of running <command>cvs update</command>
-      or <command>cvs update -n</command> to quickly see their mods.  If
-      users forget to use the <option>-n</option> option, this has the
-      side effect of merging repository changes they may not be ready
-      to deal with.</para>
-
-    <para>With Subversion, we've tried to remove this muddle by making
-      the output of <command>svn status</command> easy to read for
-      both humans and parsers.  Also, <command>svn update</command>
-      only prints information about files that are updated,
-      <emphasis>not</emphasis> local modifications.</para>
-
-    <para><command>svn status</command> prints all files that have
-      local modifications.  By default, the repository is not
-      contacted.  While this subcommand accepts a fair number of
-      options, the following are the most commonly used ones:</para>
+    <para>对于Subversion,我们通过修改<command>svn status</command>的输出使之同时满足阅读和解析的需要来努力消除这种混乱,同样,<command>svn update</command>只会打印将要更新的文件信息,而<emphasis>不是</emphasis>本地修改。
+    </para>
+
+    <para><command>svn status</command>打印所有本地修改的文件,缺省情况下,不会联系版本库,然而这个命令接受一些选项,如下是一些最常用的:
+    </para>
 
     <variablelist>
       <varlistentry>
         <term><option>-u</option></term>
         <listitem>
-          <para>Contact the repository to determine, and then display,
-            out-of-dateness information.</para>
+          <para>联系版本库来确定,然后显示,过时的信息。
+          </para>
         </listitem>
       </varlistentry>
       
       <varlistentry>
         <term><option>-v</option></term>
         <listitem>
-          <para>Show <emphasis>all</emphasis> entries under
-            version control.</para>
+          <para>显示<emphasis>所有</emphasis>版本控制之下的条目。</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>-N</option></term>
         <listitem>
-          <para>Run non-recursively (do not descend into
-            subdirectories).</para>
+          <para>非递归运行(不传递到子目录)。</para>
         </listitem>
       </varlistentry>
     </variablelist>
 
-    <para>The <command>status</command> command has two output
-      formats.  In the default <quote>short</quote> format, local
-      modifications look like this:</para>
+    <para><command>status</command>命令有两种输出格式,缺省是<quote>简短</quote>格式,本地修改看起来是这样:
+    </para>
 
     <screen>
 % svn status
@@ -253,9 +174,8 @@
 M     ./bar/baz.c
 </screen>
 
-    <para>If you specify the <option>--show-updates</option>
-      (<option>-u</option>) switch, a longer output format is
-      used:</para>
+    <para>如果你指定<option>--show-updates</option>(<option>-u</option>),输出会使用比较长的格式:
+    </para>
 
     <screen>
 % svn status -u
@@ -266,15 +186,8 @@
 Status against revision:   1066
 </screen>
 
-    <para>In this case, two new columns appear.  The second column
-      contains an asterisk if the file or directory is out-of-date.
-      The third column shows the working-copy's revision number of the
-      item.  In the example above, the asterisk indicates that
-      <filename>faces.html</filename> would be patched if we updated,
-      and that <filename>bloo.png</filename> is a newly added file in
-      the repository.  (The <literal>-</literal> next to
-      <filename>bloo.png</filename> means that it doesn't yet exist in
-      the working copy.)</para>
+    <para>在这个例子里,有两个新列,如果文件或目录已经过期了,第二列会显示星号。第三列显示工作拷贝项目的修订版本号,在上面的例子里,星号表示<filename>faces.html</filename>会在更新时更新,而<filename>bloo.png</filename>是在版本库新加的文件。(<filename>bloo.png</filename>前面的<literal>-</literal>表示它不曾存在与工作拷贝。)
+    </para>
 
     <!-- ###TODO describe -u here as well as -uv. -u and -v use
          different <quote>long</quote> formats and need to be
@@ -284,33 +197,29 @@
          paragraph *is* about -u, not -v, my patch concentrated on
          that. -->
 
-    <para>Lastly, here's a quick summary of the most common status codes that
-      you may see:</para>
+    <para>最后,你会想看一个常见状态码的快速总结:</para>
 
     <screen>
-A    Resource is scheduled for Addition
-D    Resource is scheduled for Deletion
-M    Resource has local modifications
-C    Resource has conflicts (changes have not been completely merged
-       between the repository and working copy version)
-X    Resource is external to this working copy (comes from another
-       repository.  See <xref linkend="svn-ch-7-sect-2.3.6" />)
-?    Resource is not under version control
-!    Resource is missing or incomplete (removed by another tool than
-       Subversion)
+A    资源预定要添加
+D    资源预定要删除
+M    资源有本地修改
+C    资源发生冲突(修改不能完全在版本库和
+     工作拷贝之间合并)
+X    资源在工作拷贝之外(来自其他版本库,
+     见<xref linkend="svn-ch-7-sect-2.3.6" />)
+?    资源不在版本控制之下
+!    资源丢失或者不完整(被Subversion以外的工具删除)
 </screen>
 
     <!-- ###TODO:  This paragraph should be moved elsewhere.  We are
                    talking about status codes here, and not update.
                    Although CVS uses update as a form of status... -->
-    <para>Subversion has combined the CVS <literal>P</literal> and
-      <literal>U</literal> codes into just <literal>U</literal>.  When
-      a merge or conflict occurs, Subversion simply prints
-      <literal>G</literal> or <literal>C</literal>, rather than a
-      whole sentence about it.</para>
+    <para>Subversion合并了CVS的<literal>P</literal>和<literal>U</literal>代码为<literal>U</literal>,当一个和ving或冲突发生,Subversion只会简单得打印<literal>G</literal>或<literal>C</literal>,而不是一段完整的描述语句。
+    </para>
 
-    <para>For a more detailed discussion of <command>svn
-      status</command>, see <xref linkend="svn-ch-3-sect-5.3.1" />.</para>
+    <para>关于<command>svn
+      status</command>的详细讨论见<xref linkend="svn-ch-3-sect-5.3.1" />。
+    </para>
 
 
   </sect1>
@@ -319,28 +228,14 @@
   <!-- ======================== SECTION 5 ============================= -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-5">
-    <title>Branches and Tags</title>
+    <title>分支和标签</title>
 
-    <para>Subversion doesn't distinguish between filesystem space and
-      <quote>branch</quote> space; branches and tags are ordinary
-      directories within the filesystem.  This is probably the single
-      biggest mental hurdle a CVS user will need to climb.  Read all
-      about it in <xref linkend="svn-ch-4"/>.</para>
+    <para>Subversion不区分文件系统空间和<quote>分支</quote>空间;分支和标签都是普通的文件系统目录,这恐怕是CVS用户需要逾越的最大心理障碍,所有信息在<xref linkend="svn-ch-4"/>。
+    </para>
 
 
     <warning>
-      <para>Since Subversion treats branches and tags as ordinary
-        directories, always remember to check out the
-        <literal>trunk</literal>
-        (<literal>http://svn.example.com/repos/calc/trunk/</literal>)
-        of your project, and not the project itself
-        (<literal>http://svn.example.com/repos/calc/</literal>).  If
-        you make the mistake of checking out the project itself,
-        you'll wind up with a working copy that contains a copy of
-        your project for every branch and tag you
-        have.<footnote><para>That is, providing you don't run out of
-        disk space before your checkout
-        finishes.</para></footnote></para>
+      <para>因为Subversion把分支和标签看作普通的目录,一直要记住检出项目的<literal>trunk</literal>(<literal>http://svn.example.com/repos/calc/trunk/</literal>),而不是项目本身(<literal>http://svn.example.com/repos/calc/</literal>)。如果你错误的检出了项目本身,你会紧张的发现你的项目拷贝包含了所有的分支和标签。<footnote><para>如果在检出完成之前没有消耗完磁盘空间的话。</para></footnote></para>
     </warning>
 
   </sect1>
@@ -350,20 +245,15 @@
   <!-- ======================== SECTION 6 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-6">
-    <title>Metadata Properties</title>
+    <title>元数据属性</title>
 
-    <para>A new feature of Subversion is that you can attach arbitrary
-      metadata (or <quote>properties</quote>) to files and
-      directories.  Properties are arbitrary name/value pairs
-      associated with files and directories in your working
-      copy.</para>
+    <para>Subversion的一个新特性就是你可以对文件和目录任意附加元数据(或者是<quote>属性</quote>),属性是关联在工作拷贝文件或目录的任意名称/值对。
+    </para>
     
-    <para>To set or get a property name, use the <command>svn
-      propset</command> and <command>svn propget</command>
-      subcommands.  To list all properties on an object, use
-      <command>svn proplist</command>.</para>
+    <para>为了设置或得到一个属性名称,使用<command>svn
+      propset</command>和<command>svn propget</command>子命令,列出对象所有的属性,使用<command>svn proplist</command>。</para>
 
-    <para>For more information, see <xref linkend="svn-ch-7-sect-2"/>.</para>
+    <para>更多信息见<xref linkend="svn-ch-7-sect-2"/>。</para>
 
   </sect1>
 
@@ -371,73 +261,38 @@
   <!-- ======================== SECTION 7 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-7">
-    <title>Conflict Resolution</title>
+    <title>冲突解决</title>
+
+    <para>CVS使用内联<quote>冲突标志</quote>来标记冲突,并且在更新时打印<literal>C</literal>。历史上讲,这导致了许多问题,因为CVS做得还不够。许多用户在它们快速闪过终端时忘记(或没有看到)<literal>C</literal>,即使出现了冲突标记,他们也经常忘记,然后提交了带有冲突标记的文件。
+    </para>
 
-    <para>CVS marks conflicts with in-line <quote>conflict
-      markers</quote>, and prints a <literal>C</literal> during an
-      update.  Historically, this has caused problems, because CVS
-      isn't doing enough.  Many users forget about (or don't see) the
-      <literal>C</literal> after it whizzes by on their terminal.
-      They often forget that the conflict-markers are even present,
-      and then accidentally commit files containing
-      conflict-markers.</para>
-
-    <para>Subversion solves this problem by making conflicts more
-      tangible.  It remembers that a file is in a state of conflict,
-      and won't allow you to commit your changes until you run
-      <command>svn resolved</command>.  See <xref
-      linkend="svn-ch-3-sect-5.4"/> for more details.</para>
+    <para>Subversion通过让冲突更明显来解决这个问题,它记住一个文件是处于冲突状态,在你运行<command>svn resolved</command>之前不会允许你提交修改,详情见<xref
+      linkend="svn-ch-3-sect-5.4"/>。
+    </para>
   </sect1>
 
   <!-- ================================================================= -->
   <!-- ======================== SECTION 8 ============================== -->
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-8">
-    <title>Binary Files and Translation</title>
+    <title>二进制文件和转化</title>
 
-    <para>In the most general sense, Subversion handles binary files
-      more gracefully than CVS does.  Because CVS uses RCS, it can
-      only store successive full copies of a changing binary file.
-      But internally, Subversion expresses differences between files
-      using a binary-differencing algorithm, regardless of whether they
-      contain textual or binary data.  That means that all files are
-      stored differentially (compressed) in the repository, and small
-      differences are always sent over the network.</para>
+    <para>在大多数情况下,Subversion比CVS更好的处理二进制文件,因为CVS使用RCS,它只可以存储二进制文件的完整拷贝,但是,从内部原理上讲,Subversion使用二进制区别算法来表示文件的区别,而不管文件时文本文件还是二进制文件。这意味着所有的文件是以微分的(压缩的)形式存放在版本库,小的区别会通过网络传输。
+    </para>
     
-    <para>CVS users have to mark binary files with
-      <option>-kb</option> flags, to prevent data from being garbled
-      (due to keyword expansion and line-ending translations).  They
-      sometimes forget to do this.</para>
-
-    <para>Subversion takes the more paranoid route: first, it never
-      performs any kind of keyword or line-ending translation unless
-      you explicitly ask it do so (see <xref
-      linkend="svn-ch-7-sect-2.3.4"/> and <xref
-      linkend="svn-ch-7-sect-2.3.5"/> for more details).  By default,
-      Subversion treats all file data as literal byte strings, and
-      files are always stored in the repository in an untranslated
-      state.</para>
-
-    <para>Second, Subversion maintains an internal notion of whether a
-      file is <quote>text</quote> or <quote>binary</quote> data, but
-      this notion is <emphasis>only</emphasis> extant in the working
-      copy.  During an <command>svn update</command>, Subversion will
-      perform contextual merges on locally modified text files, but
-      will not attempt to do so for binary files.</para>
-
-    <para>To determine whether a contextual merge is possible,
-      Subversion examines the <literal>svn:mime-type</literal>
-      property.  If the file has no <literal>svn:mime-type</literal>
-      property, or has a mime-type that is textual (e.g.
-      <literal>text/*</literal>),
-      Subversion assumes it is text.  Otherwise, Subversion assumes
-      the file is binary.  Subversion also helps users by running a
-      binary-detection algorithm in the <command>svn import</command>
-      and <command>svn add</command> commands.  These commands will
-      make a good guess and then (possibly) set a binary
-      <literal>svn:mime-type</literal> property on the file being
-      added.  (If Subversion guesses wrong, the user can always remove
-      or hand-edit the property.)</para>
+    <para>CVS用户需要使用<option>-kb</option>选项来标记二进制文件,防止数据的混淆(因为关键字解释和行结束转化),他们有时候会忘记这样做。
+    </para>
+
+    <para>Subversion使用更加异想天开的方法:第一,如果你不明确的告诉它(详情见<xref
+      linkend="svn-ch-7-sect-2.3.4"/>和<xref
+      linkend="svn-ch-7-sect-2.3.5"/>)这样做,它不会做任何关键字或行结束转化的操作,缺省情况下Subversion会把所有的数据看作字节串,所有的储存在版本库的文件都处于未转化的状态。
+    </para>
+
+    <para>第二,Subversion维护了一个内部的概念来区别一个文件是<quote>文本</quote>还是<quote>二进制</quote>文件,但这个概念<emphasis>只</emphasis>在工作拷贝非常重要,在<command>svn update</command>,Subversion会对本地修改的文本文件执行上下文的合并,但是对二进制文件不会。
+    </para>
+
+    <para>为了检测一个上下文的合并是可能的,Subversion检测<literal>svn:mime-type</literal>属性,如果没有<literal>svn:mime-type</literal>属性,或者这个属性是文本的(例如<literal>text/*</literal>),Subversion会假定它是文本的,否则Subversion认为它是二进制文件。Subversion也会在<command>svn import</command>和<command>svn add</command>命令时通过运行一个二进制检测算法来帮助用户。这些命令会做出很好的猜测,然后(如果可能)设置添加文件的<literal>svn:mime-type</literal>属性。(如果Subversion猜测错误,用户可以删除或手工编辑这个属性。)
+    </para>
 
   </sect1>
 
@@ -446,16 +301,13 @@
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-9">
 
-    <title>Versioned Modules</title>
+    <title>版本化的模块</title>
 
-    <para>Unlike CVS, a Subversion working copy is aware that it has
-      checked out a module.  That means that if somebody changes the
-      definition of a module (e.g. adds or removes components), then a
-      call to <command>svn update</command> will update the working
-      copy appropriately, adding and removing components.</para>
+    <para>不像CVS,Subversion工作拷贝会意识到它检出了一个模块,这意味着如果有人修改了模块的定义(例如添加和删除组件),然后一个对<command>svn update</command>的调用会适当的更新工作拷贝,天际或删除组件。
+    </para>
 
-    <para>Subversion defines modules as a list of directories within a
-      directory property:  see <xref linkend="svn-ch-7-sect-3"/>.</para>
+    <para>Subversion定义了模块作为一个目录属性的目录列表:见<xref linkend="svn-ch-7-sect-3"/>。
+    </para>
 
   </sect1>
 
@@ -464,31 +316,16 @@
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-10">
 
-    <title>Authentication</title>
+    <title>认证</title>
+
+    <para>通过CVS的pserver,你需要在读写操作之前<quote>登陆</quote>到服务器—即使是匿名操作。Subversion版本库使用Apache的<command>httpd</command>或<command>svnserve</command>作为服务器,你不需要开始时提供认证凭证—如果一个操作需要认证,服务器会要求你的凭证(不管这凭证是用户名与密码,客户证书还是两个都有)。所以如果你的工作拷贝时全局可读的,在所有的读操作中不需要任何认证。
+    </para>
+
+    <para>相对于CVS,Subversion会一直在磁盘(在你的<filename>~/.subversion/auth/</filename>目录)缓存凭证,除非你通过<option>--no-auth-cache</option>选项告诉它不这样做。
+    </para>
 
-    <para>With CVS's pserver, you are required to <quote>login</quote>
-      to the server before any read or write operation—you even
-      have to login for anonymous operations.  With a Subversion
-      repository using Apache <command>httpd</command> or
-      <command>svnserve</command> as the server, you don't provide
-      any authentication credentials at the outset—if an
-      operation that you perform requires authentication, the server
-      will challenge you for your credentials (whether those
-      credentials are username and password, a client certificate, or
-      even both).  So if your repository is world-readable, you will
-      not be required to authenticate at all for read
-      operations.</para>
-
-    <para>As with CVS, Subversion still caches your credentials on
-      disk (in your <filename>~/.subversion/auth/</filename>
-      directory) unless you tell it not to by using the
-      <option>--no-auth-cache</option> switch.</para>
-
-    <para>The exception to this behaviors, however, is in the case of
-      accessing an <command>svnserve</command> server over an SSH
-      tunnel, using the <literal>svn+ssh://</literal> URL schema.  In
-      that case, the <command>ssh</command> program unconditionally
-      demands authentication just to start the tunnel.</para>
+    <para>这个行为也有例外,当使用SSH管道的<command>svnserve</command>服务器时,使用<literal>svn+ssh://</literal>的URL模式这种情况下,<command>ssh</command>会在通道刚开始时无条件的要求认证。
+    </para>
 
   </sect1>
 
@@ -497,40 +334,20 @@
   <!-- ================================================================= -->
   <sect1 id="svn-ap-a-sect-11">
 
-    <title>Converting a Repository from CVS to Subversion</title>
+    <title>转化CVS版本库到Subversion</title>
 
-    <para>Perhaps the most important way to familiarize CVS users with
-      Subversion is to let them continue to work on their projects
-      using the new system.  And while that can be somewhat
-      accomplished using a flat import into a Subversion repository of
-      an exported CVS repository, the more thorough solution involves
-      transferring not just the latest snapshot of their data, but all
-      the history behind it as well, from one system to another.  This
-      is an extremely difficult problem to solve that involves
-      deducing changesets in the absence of atomicity, and translating
-      between the systems' completely orthogonal branching policies,
-      among other complications.  Still, there are a handful of tools
-      claiming to at least partially support the ability to convert
-      existing CVS repositories into Subversion ones.</para>
-
-    <para>One such tool is cvs2svn (<systemitem
-      class="url">http://cvs2svn.tigris.org/</systemitem>), a Python
-      script originally created by members of Subversion's own
-      development community.  Others include Chia-liang Kao's
-      Subversion converter plugin to the VCP tool (<systemitem
-      class="url">http://svn.clkao.org/revml/branches/svn-perl/</systemitem>)
-      and Lev Serebryakov's RefineCVS (<systemitem
-      class="url">http://lev.serebryakov.spb.ru/refinecvs/</systemitem>).
-      These tools have various levels of completeness, and may make
-      entirely different decisions about how to handle your CVS
-      repository history.  Whichever tool you decide to use, be sure
-      to perform as much verification as you can stand on the
-      conversion results—after all, you've worked hard to build
-      that history!</para>
-
-    <para>For an updated collection of links to known converter tools,
-      visit the Links page of the Subversion website (<systemitem
-      class="url">http://subversion.tigris.org/project_links.html</systemitem>).</para>
+    <para>或许让CVS用户熟悉Subversion最好的办法就是让他们的项目继续在新系统下工作,这可以简单得通过平淡的把CVS版本库的导出数据导入到Subversion完成,或者是更加完全的方案,不仅仅包括最新数据快照,还包括所有的历史,从一个系统到另一个系统。这是一个非常困难的问题,包括推导保持原子性的修改集,转化两个系统完全不同的分支政策。但是我们还是有许多工具声称至少部分具备了的转化已存在的CVS版本库为Subversion版本库的能力。
+    </para>
+
+    <para>其中一个工具是cvs2svn(<systemitem
+      class="url">http://cvs2svn.tigris.org/</systemitem>),是一个Python脚本,最初是Subversion自己的开发社区的成员编写的。其他的如Chia-liang Kao的Subversion的VCP工具(<systemitem
+      class="url">http://svn.clkao.org/revml/branches/svn-perl/</systemitem>)转化器插件,还有Lev Serebryakov的RefineCVS(<systemitem
+      class="url">http://lev.serebryakov.spb.ru/refinecvs/</systemitem>)。这些工具具备不同程度的完成性,也许会具备完全不同的处理CVS历史的方法。无论你决定使用哪个工具,确定要执行尽可能多的验证来确定你可以接受转化结果—毕竟,你曾经努力创建这些历史!
+      </para>
+
+    <para>关于最新的转化工具链接列表,可以访问Subversion的网站(<systemitem
+      class="url">http://subversion.tigris.org/project_links.html</systemitem>)。
+    </para>
 
   </sect1>
 



More information about the svnbook-dev mailing list