[svnbook] r5499 committed - branches/1.8/zh/book/ ch04-branching-and-merging.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Thu Nov 16 08:22:19 CST 2017


Revision: 5499
          http://sourceforge.net/p/svnbook/source/5499
Author:   wuzhouhui
Date:     2017-11-16 14:22:19 +0000 (Thu, 16 Nov 2017)
Log Message:
-----------
1.8/zh: translation of chapter 4 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch04-branching-and-merging.xml

Modified: branches/1.8/zh/book/ch04-branching-and-merging.xml
===================================================================
--- branches/1.8/zh/book/ch04-branching-and-merging.xml	2017-11-15 14:22:33 UTC (rev 5498)
+++ branches/1.8/zh/book/ch04-branching-and-merging.xml	2017-11-16 14:22:19 UTC (rev 5499)
@@ -5061,12 +5061,19 @@
     </option>.</para>
     </tip>
 
+      <!--
     <para>If your working copy contains a number of switched subtrees
       from different repository locations, it continues to function as
       normal.  When you update, you'll receive patches to each subtree
       as appropriate.  When you commit, your local changes are still
       applied as a single, atomic change to the repository.</para>
+      -->
+    <para>即使工作副本内包含了大量的已切换的子目录, 这些子目录来自仓库中不同
+      位置, 那么工作副本仍然可以正常工作. 更新工作副本时, 各个子目录也会收到
+      正确的修改; 提交时, 本地修改仍然作为一个单一的原子修改, 被提交到仓库中.
+    </para>
 
+      <!--
     <para>Note that while it's okay for your working copy to reflect a
       mixture of repository locations, these locations must all be
       within the <emphasis>same</emphasis> repository.  Subversion
@@ -5078,8 +5085,16 @@
       See <xref linkend="svn.ref.svn.c.relocate"/> in
       <xref linkend="svn.ref.svn"/> for more information and an
       example.</para></footnote></para>
+      -->
+    <para>注意, 虽然 Subversion 允许工作副本映射不同的仓库位置, 但这些位置必须
+      在 <emphasis>同一个</emphasis> 仓库中. Subversion 还不支持跨仓库的交互,
+      但以后可能会添加这一特性.<footnote><para>然而, 如果服务器的 URL 发生了
+          改变, 而用户不想丢掉已有的工作副本, 那就可以用 <command>svn relocate
+          </command>, 更多的信息和例子, 见 <xref linkend="svn.ref.svn"/>
+          的 <xref linkend="svn.ref.svn.c.relocate"/></para></footnote></para>
 
     <tip>
+      <!--
       <para>Administrators who need to change the URL of a repository
         which is accessed via HTTP are encouraged to add to
         their <filename>httpd.conf</filename> configuration file a
@@ -5091,16 +5106,32 @@
         Subversion 1.7 clients will go a step further,
         automatically relocating the working copy to the new
         URL.</para>
+      -->
+      <para>如果管理员需要修改仓库的 URL, 而仓库是通过 HTTP 进行访问, 那么强烈
+        建议管理员在配置文件 <filename>httpd.conf</filename> 添加一个永久的
+        重定向 (通过配置项 <literal>RedirectPermanent</literal>), 将旧的 URL
+        重定向至新的 URL, 这样的话, 当用户仍然使用旧的 URL 访问仓库时,
+        Subversion 客户端就会在错误信息中显示仓库的新 URL. 从 Subversion 1.7
+        开始, 客户端可以自动地把工作副本重定位至新的 URL.</para>
     </tip>
 
     <sidebar>
+      <!--
       <title>Switches and Updates</title>
+      -->
+      <title>切换与更新</title>
 
+      <!--
       <para>Have you noticed that the output of <command>svn
         switch</command> and <command>svn update</command> looks the
         same?  The switch command is actually a superset of the update
         command.</para>
+      -->
+      <para>不知道读者有没有注意到 <command>svn switch</command> 和 <command>
+          svn update</command> 的输出看起来好像是一样的? <command>svn switch
+      </command> 实际上是 <command>svn update</command> 的超集.</para>
 
+      <!--
       <para>When you run <command>svn update</command>, you're asking
         the repository to compare two trees.  The repository does so,
         and then sends a description of the differences back to the
@@ -5108,7 +5139,13 @@
         switch</command> and <command>svn update</command> is that the
         latter command always compares two identical repository
         paths.</para>
+      -->
+      <para>执行 <command>svn update</command> 是在要求仓库比较两个目录树,
+        仓库比较后, 向客户端发送差异. <command>svn switch</command> 和
+        <command>svn update</command> 的唯一差别是后者永远是在比较同一个
+        仓库路径.</para>
 
+      <!--
       <para>That is, if your working copy is a mirror of
         <filename>/calc/trunk</filename>, <command>svn
         update</command> will automatically compare your working copy
@@ -5120,10 +5157,23 @@
         <filename>/calc/trunk</filename> to some
         <emphasis>other</emphasis> branch directory in the
         <literal>HEAD</literal> revision.</para>
+      -->
+      <para>也就是说如果有一个 <filename>/calc/trunk</filename> 的工作副本,
+        <command>svn update</command> 总是自动地比较 <filename>/calc/trunk
+          </filename> 的工作副本与 <literal>HEAD</literal> 的 <filename>
+          /calc/trunk</filename>. 如果你把工作副本切换到另一个分支,
+        <command>svn switch</command> 就把 <filename>/calc/trunk</filename>
+        的工作副本与 <emphasis>另一个</emphasis> 处于版本号 <literal>HEAD
+      </literal> 的分支目录进行比较.</para>
 
+      <!--
       <para>In other words, an update moves your working copy through
         time.  A switch moves your working copy through time
         <emphasis>and</emphasis> space.</para>
+      -->
+      <para>换句话说, 工作副本用 <command>svn update</command> 在时间上移动,
+        用 <command>svn switch</command> 在时间 <emphasis>和</emphasis> 空间
+        上移动.</para>
     </sidebar>
 
     <para>Because <command>svn switch</command> is essentially a




More information about the svnbook-dev mailing list