[svnbook] r5898 committed - branches/1.8/zh/book/ref-svn.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Sun Mar 10 01:19:35 CST 2019


Revision: 5898
          http://sourceforge.net/p/svnbook/source/5898
Author:   wuzhouhui
Date:     2019-03-10 07:19:33 +0000 (Sun, 10 Mar 2019)
Log Message:
-----------
1.8/zh: translation of svn reference in progress

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

Modified: branches/1.8/zh/book/ref-svn.xml
===================================================================
--- branches/1.8/zh/book/ref-svn.xml	2019-03-09 10:20:19 UTC (rev 5897)
+++ branches/1.8/zh/book/ref-svn.xml	2019-03-10 07:19:33 UTC (rev 5898)
@@ -1770,7 +1770,10 @@
 
     <refnamediv>
       <refname>svn add</refname>
+      <!--
       <refpurpose>Add files, directories, or symbolic links.</refpurpose>
+      -->
+      <refpurpose>添加文件, 目录或符号链接.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -1779,8 +1782,13 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
+      ### TODO
       <para>Schedule files, directories, or symbolic links in your
         working copy for addition to the repository.  They will be
         uploaded and added to the repository on your next commit.
@@ -1787,11 +1795,19 @@
         If you add something and change your mind before
         committing, you can unschedule the addition using
         <command>svn revert</command>.</para>
+      -->
+      <para>计划将文件, 目录或符号链接添加到仓库中, 在下次提交时, 它们就
+        会被正式地上传并添加到仓库中. 如果用户已经添加了某些文件, 但后面又不
+        想要这些文件了, 可以使用 <command>svn rever</command> 取消未提交的
+        新增.</para>
     </refsect1>
     
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -1809,9 +1825,15 @@
     
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
       
+      <!--
       <para>To add a file to your working copy:</para>
+      -->
+      <para>往工作副本中添加一个新文件:</para>
 
       <informalexample>
         <screen>
@@ -1820,8 +1842,11 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>When adding a directory, the default behavior of
         <command>svn add</command> is to recurse:</para>
+      -->
+      <para>添加目录时, <command>svn add</command> 的默认行为是递归的:</para>
 
       <informalexample>
         <screen>
@@ -1834,8 +1859,11 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>You can add a directory without adding its
         contents:</para>
+      -->
+      <para>用户可以只添加目录, 而不添加目录里的子文件:</para>
 
       <informalexample>
         <screen>
@@ -1844,6 +1872,7 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>Attempts to schedule the addition of an item which is
         already versioned will fail by default.  This behavior
         foils the most common scenario under which users attempt
@@ -1851,8 +1880,14 @@
         examine a versioned directory and add any unversioned
         items inside of it.  To override the default behavior and
         force Subversion to recurse into already-versioned
-        directories, pass the <option>--force</option>
+        directories, pass the <option>- -force</option>
         option:</para>
+      -->
+      <para>如果用户试图添加一个已经被版本控制了的文件, 那么 <command>svn
+          add</command> 将会报错. 这种行为会影响用户执行这种操作: 递归已经
+        被版本控制了的目录, 添加目录中所有未被版本控制的子文件. 为了迫使
+        Subversion 递归已被版本控制的目录, 需要加上选项
+        <option>--force</option>:</para>
 
       <informalexample>
         <screen>
@@ -1883,8 +1918,12 @@
 
     <refnamediv>
       <refname>svn blame (praise, annotate, ann)</refname>
+      <!--
       <refpurpose>Show author and revision information inline
         for the specified files or URLs.</refpurpose>
+      -->
+      <refpurpose>显示文件的每一行最近一次是被谁, 在什么时候被修改的.
+      </refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -1893,17 +1932,27 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
       <para>Show author and revision information inline for the
         specified files or URLs.  Each line of text is annotated
         at the beginning with the author (username) and the
         revision number for the last change to that line.</para>
+      -->
+      <para>显示文件的每一行最近一次被修改的作者与版本号信息, Subversion 在
+        每一行的开头都加上了最后最近一次修改该行的作者的用户名和版本号.</para>
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -1920,11 +1969,18 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>If you want to see blame-annotated source for
         <filename>readme.txt</filename> in your test
         repository:</para>
+      -->
+      <para>如果用户想查看 <filename>readme.txt</filename> 的每一行的最近一次
+        修改都是谁, 在什么时候做的, 就执行:</para>
 
       <informalexample>
         <screen>
@@ -1936,6 +1992,7 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>Now, just because <command>svn blame</command> says
         that Harry last modified <filename>readme.txt</filename>
         in revision 5, understand that this subcommand is by
@@ -1949,6 +2006,14 @@
         to examine the specific differences and related log
         message to understand exactly what Harry did to this file
         in revision 5.</para>
+      -->
+      <para>从 <command>svn blame</command> 的输出可以看到,
+        <filename>readme.txt</filename> 最近一次是 Harry 在版本号 5 修改的,
+        用户还要理解 <command>svn blame</command> 对于修改的成立条件是很挑剔
+        的. 老板在责骂 Harry 之前, 应首先考虑 Harry 是不是只修改了这一行
+        里的某个字符, 甚至他只是删除了这一行里的一个多余的空格, 整句话一开始
+        可能并不是他写的. 为了不冤枉 Harry, 你需要认真地查看版本号 5 的日志和
+        Harry 所做的修改:</para>
 
       <informalexample>
         <screen>
@@ -1975,13 +2040,20 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>Sure enough, Harry only changed the whitespace in that
-        line.  Fortunately, the <option>--extensions</option>
+        line.  Fortunately, the <option>- -extensions</option>
         (<option>-x</option>) option can help you better determine
         the last time that a <emphasis>meaningful</emphasis>
         change was made to a given line of text.  For example,
         here's how you can see the annotation information while
         disregarding mere whitespace changes:</para>
+      -->
+      <para>从版本号 5 的修改来看, 结果已经很清晰了, Harry 只是去掉了一个
+        多余的空格. 幸运的是, 选项 <option>--extensions</option>
+        (<option>-x</option>) 可以帮助用户找出最近一次针对该行的
+        <emphasis>有意义的</emphasis> 的修改. 例如下面的例子在显示最近一
+        次修改时忽略了空白字符的变化:</para>
 
       <informalexample>
         <screen>
@@ -1993,9 +2065,13 @@
 </screen>
       </informalexample>
 
-      <para>If you use the <option>--xml</option> option, you can
+      <!--
+      <para>If you use the <option>- -xml</option> option, you can
         get XML output describing the blame annotations, but not
         the contents of the lines themselves:</para>
+      -->
+      <para>如果带上了选项 <option>--xml</option>, 用户就可以得到 XML 格式
+        的输出, 但不会出现行本身的内容:</para>
 
       <informalexample>
         <screen>
@@ -2046,8 +2122,11 @@
 
     <refnamediv>
       <refname>svn cat</refname>
+      <!--
       <refpurpose>Output the contents of the specified files or
         URLs.</refpurpose>
+      -->
+      <refpurpose>输出指定的文件的内容.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -2056,16 +2135,26 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
       <para>Output the contents of the specified files or URLs.
         For listing the contents of directories, see <command>svn
         list</command> later in this chapter.</para>
+      -->
+    <para>输出指定的文件的内容. 如果想要查看目录的子文件, 见本章后面的
+      <command>svn list</command>.</para>
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -2076,10 +2165,17 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>If you want to view <filename>readme.txt</filename> in
         your repository without checking it out:</para>
+      -->
+      <para>如果你想查看仓库里的 <filename>readme.txt</filename> 文件, 但又不
+        想把它检出, 可以这样做:</para>
 
       <informalexample>
         <screen>
@@ -2097,7 +2193,10 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>You can view specific versions of files, too.</para>
+      -->
+      <para>还可以查看文件在特定版本号下的内容:</para>
 
       <informalexample>
         <screen>
@@ -2115,6 +2214,7 @@
       </informalexample>
 
       <note>
+      <!--
         <para>You might develop a reflex action of
           using <command>svn cat</command> to view your working
           file contents.  But keep in mind that the default peg
@@ -2124,15 +2224,28 @@
           surprised when a simple <userinput>svn cat
           /path/to/file</userinput> invocation fails to display
           your local modifications to that file!</para>
+      -->
+        <para>你可能很自然地想到用 <command>svn cat</command> 查看工作副本中的
+          文件, 但是要注意的是 <command>svn cat</command> 用在工作副本文件上的
+          默认限定版本号是 <literal>BASE</literal>, 它是文件未修改时的基础版本
+          号, 所以如果在 <command>svn cat</command> 的输出中看不到本地修改请
+          不会感到惊讶.</para>
       </note>
 
       <tip>
+      <!--
         <para>If your working copy is out of date (or you have
           local modifications) and you want to see the
           <literal>HEAD</literal> revision of a file in your
-          working copy, use the <option>--revision</option>
+          working copy, use the <option>- -revision</option>
           (<option>-r</option>) option:  <userinput>svn cat -r
           HEAD <replaceable>FILENAME</replaceable></userinput></para>
+      -->
+      <para>如果工作副本已经过期了 (或者含有本地修改), 而你想查看文件在
+        版本号 <literal>HEAD</literal> 的内容, 就加上选项
+        <option>--revision</option> (<option>-r</option>):
+        <userinput>svn cat -r HEAD <replaceable>FILENAME</replaceable>
+      </userinput></para>
       </tip>
 
     </refsect1>
@@ -2151,8 +2264,11 @@
 
     <refnamediv>
       <refname>svn changelist (cl)</refname>
+      <!--
       <refpurpose>Associate (or deassociate) local paths with a
         changelist.</refpurpose>
+      -->
+      <refpurpose>为工作副本里的路径关联 (或解除关联) 一个变更列表.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -2162,18 +2278,28 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
       <para>Used for dividing files in a working copy into a
         changelist (logical named grouping) in order to allow
         users to easily work on multiple file collections within a
         single working copy.</para>
+      -->
+      <para>将工作副本里的文件分组到一个变更列表 (命名的逻辑分组), 以便于用户
+        在一个工作副本中同时应付多个文件集合.</para>
 
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -2189,10 +2315,17 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Example</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Edit three files, add them to a changelist, then
         commit only files in that changelist:</para>
+      -->
+      <para>编辑三个文件, 然后把它们关联到一个变更列表, 最后提交变更列表里的
+        文件:</para>
 
       <informalexample>
         <screen>
@@ -2221,9 +2354,13 @@
 </screen>
       </informalexample>
 
+      <!--
       <para>Note that in the previous example, only the files in
         changelist <literal>issue1729</literal> were
         committed.</para>
+      -->
+      <para>注意在上面的例子里, 只有变更列表 <literal>issue1729</literal>
+        里的三个文件的修改被提交了.</para>
       
     </refsect1>
   </refentry>
@@ -2241,7 +2378,10 @@
 
     <refnamediv>
       <refname>svn checkout (co)</refname>
+      <!--
       <refpurpose>Check out a working copy from a repository.</refpurpose>
+      -->
+      <refpurpose>从仓库中检出一个工作副本到本地.</refpurpose>
     </refnamediv>
 
     <refsynopsisdiv>
@@ -2250,8 +2390,12 @@
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Description</title>
+      -->
+      <title>描述</title>
       
+      <!--
       <para>Check out a working copy from a repository.  If
         <replaceable>PATH</replaceable> is omitted, the
         basename of the URL will be used as the destination.
@@ -2259,12 +2403,21 @@
         subdirectory of <replaceable>PATH</replaceable>, with the
         name of the subdirectory being the basename of the
         URL.</para>
+      -->
+      <para>从仓库中检出一个工作副本到本地. 如果忽略
+        <replaceable>PATH</replaceable>, 就使用 URL 的最后一个分量作为
+        <replaceable>PATH</replaceable>. 如果出现了多个 URL, 那么每个 URL
+        都会被检出到 <replaceable>PATH</replaceable> 的一个子目录内, 子目录的
+        名字是 URL 的最后一个分量.</para>
 
     </refsect1>
 
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Options</title>
+      -->
+      <title>选项</title>
 
       <informalexample>
         <screen>
@@ -2279,10 +2432,16 @@
     
     <!-- =============================================================== -->
     <refsect1>
+      <!--
       <title>Examples</title>
+      -->
+      <title>示例</title>
 
+      <!--
       <para>Check out a working copy into a directory called
         <filename>mine</filename>:</para>
+      -->
+      <para>将工作副本检出到名为 <filename>mine</filename> 的目录内:</para>
 
       <informalexample>
         <screen>




More information about the svnbook-dev mailing list