[svnbook] r5380 committed - branches/1.8/zh/book/ch03-advanced-topics.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Sun Jul 30 01:10:56 CDT 2017


Revision: 5380
          http://sourceforge.net/p/svnbook/source/5380
Author:   wuzhouhui
Date:     2017-07-30 06:10:55 +0000 (Sun, 30 Jul 2017)
Log Message:
-----------
Branch 1.8/zh: translation of chapter 3 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch03-advanced-topics.xml

Modified: branches/1.8/zh/book/ch03-advanced-topics.xml
===================================================================
--- branches/1.8/zh/book/ch03-advanced-topics.xml	2017-07-29 02:30:45 UTC (rev 5379)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml	2017-07-30 06:10:55 UTC (rev 5380)
@@ -3864,6 +3864,7 @@
       files to ignore.</para>
     -->
 
+    <!--
     <para>The Subversion runtime configuration system provides an
       option, <literal>global-ignores</literal>, whose value is a
       whitespace-delimited collection of file patterns.  The
@@ -3876,10 +3877,22 @@
       of files that you almost never want to version, such as editor
       backup files such as Emacs' <literal>*~</literal> and
       <literal>.*~</literal> files.</para>
+    -->
+    <para>Subversion 运行时配置系统提供了一个选项—<literal>global-ignores
+      </literal>—选项的值是空白符分隔的文件名模式集. 如果文件的名字
+      与集合中的某个模式匹配, 那这个文件对 Subversion 来说相当于是不存在的,
+      命令 <command>svn add</command>, <command>svn import</command> 和
+      <command>svn status</command> 也就会忽略它. 如果工作副本里有永远不会
+      被版本控制的文件 (比如 Emacs 的备份文件 <literal>*~</literal> 和
+      <literal>.*~</literal>), 这个特性就会非常有用.</para>
 
     <sidebar>
+    <!--
       <title>File Patterns in Subversion</title>
+    -->
+      <title>Subversion 的文件名模式</title>
 
+    <!--
       <para>File patterns (also called <firstterm>globs</firstterm> or
         <firstterm>shell wildcard patterns</firstterm>) are strings of
         characters that are intended to be matched against filenames,
@@ -3890,40 +3903,67 @@
         against potential matches, and special wildcard characters,
         which are interpreted differently for matching
         purposes.</para>
+    -->
+      <para>文件名模式 (也叫作 <firstterm>globs</firstterm> 或 <firstterm>
+          shell 通配符模式</firstterm> (<firstterm>shell wildcard patterns
+        </firstterm>)) 是一个字符串, 这个字符串用于匹配一个文件名, 比较常见的
+        用法是从一大堆文件中, 选出具有类似性质的子集, 而不用列出每个文件名字.
+        模式中的字符分为两种: 普通字符—按照字面值进行匹配, 例如字母
+        <literal>a</literal> 就是匹配字母 <literal>a</literal>; 通配符—
+        在匹配时被解释成和字面值不同的含义.</para>
 
+    <!--
       <para>There are different types of file pattern syntaxes, but
         Subversion uses the one most commonly found in Unix systems
         implemented as the <function>fnmatch</function> system
         function.  It supports the following wildcards, described here
         simply for your convenience:</para>
+    -->
+      <para>文件名模式的语法有很多种, Subversion 用的是 Unix 系统中最常见的一
+        种语法, 这种语法被实现成系统函数 <function>fnmatch</function>. 下面简
+        单介绍该语法支持的通配符:</para>
 
       <variablelist>
         <varlistentry>
           <term><literal>?</literal></term>
           <listitem>
+    <!--
             <para>Matches any single character</para>
+    -->
+            <para>匹配任意 <emphasis>一个</emphasis> 字符</para>
           </listitem>
         </varlistentry>
         <varlistentry>
           <term><literal>*</literal></term>
           <listitem>
+    <!--
             <para>Matches any string of characters, including the
               empty string</para>
+    -->
+            <para>匹配 0 个或多个字符组成的字符串</para>
           </listitem>
         </varlistentry>
         <varlistentry>
           <term><literal>[</literal></term>
           <listitem>
+    <!--
             <para>Begins a character class definition terminated by
               <literal>]</literal>, used for matching a subset of
               characters</para>
+    -->
+            <para>开始定义一个字符类, <literal>]</literal> 表示定义结束, 字
+              符类可以匹配任意一个类中的字符</para>
           </listitem>
         </varlistentry>
       </variablelist>
 
+    <!--
       <para>You can see this same pattern matching behavior at a Unix
         shell prompt.  The following are some examples of patterns
         being used for various things:</para>
+    -->
+      <para>Unix shell 支持相同的文件名模式语法, 下面是 shell 的一些使用例子:
+      </para>
 
       <informalexample>
         <screen>
@@ -3954,9 +3994,13 @@
 </screen>
       </informalexample>
 
+    <!--
       <para>File pattern matching is a bit more complex than what
         we've described here, but this basic usage level tends to suit
         the majority of Subversion users.</para>
+    -->
+      <para>完整的文件名模式比我们这里介绍的要更加复杂, 但是对大多数 Subversion
+        用户来说, 这里介绍的基本用法已经足够了.</para>
 
     </sidebar>
 




More information about the svnbook-dev mailing list