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

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Tue Jul 4 21:34:52 CDT 2017


Revision: 5347
          http://sourceforge.net/p/svnbook/source/5347
Author:   wuzhouhui
Date:     2017-07-05 02:34:51 +0000 (Wed, 05 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-04 12:55:53 UTC (rev 5346)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml	2017-07-05 02:34:51 UTC (rev 5347)
@@ -1038,8 +1038,12 @@
   <!-- ================================================================= -->
   <!-- ================================================================= -->
   <sect1 id="svn.advanced.props">
+    <!--
     <title>Properties</title>
+    -->
+    <title>属性</title>
 
+    <!--
     <para>We've already covered in detail how Subversion stores and
       retrieves various versions of files and directories in its
       repository.  Whole chapters have been devoted to this most
@@ -1046,13 +1050,23 @@
       fundamental piece of functionality provided by the tool.  And
       if the versioning support stopped there, Subversion would still
       be complete from a version control perspective.</para>
+    -->
+    <para>我们已经详细地描述了 Subversion 如何存放和检索存放在仓库中的不同
+      版本的文件和目录, 介绍这些最基本的功能用了一整章的篇幅. 如果 Subversion
+      对版本控制的支持就到此为止, 从版本控制的角度来看它的功能已经很完整了.
+    </para>
 
+    <!--
     <para>But it doesn't stop there.</para>
+    -->
+    <para>但 Subversion 并没有停下脚步.</para>
 
     <para>
       <indexterm>
         <primary>properties</primary>
-      </indexterm>In addition to versioning your directories and files,
+      </indexterm>
+    <!--
+      In addition to versioning your directories and files,
       Subversion provides interfaces for adding, modifying, and
       removing versioned metadata on each of your versioned
       directories and files.  We refer to this metadata as
@@ -1068,8 +1082,18 @@
       receiving of property changes occurs as part of your typical
       commit and update operations—you don't have to change your
       basic processes to accommodate them.</para>
+    -->
+    作为目录和文件版本控制的补充, Subversion 提供了为每一个文件和目录添加, 修
+    改和删除版本化元数据的接口. 我们把这些元数据称为 <firstterm>属性</firstterm>
+    (<firstterm>properties</firstterm>), 属性可看作是一张两列的表格, 附加到
+    工作副本的每条项目上, 表格把属性的名字映射到任意值. 一般来说, 属性的名字
+    和值可以是任意的, 唯一的要求是属性名只能使用 ASCII 字符. 属性最好的地方
+    是它们也是被版本控制的对象, 就像文件的内容那样, 用户可以修改, 提交和撤销
+    属性的修改. 用户执行提交和更新操作时, 属性的修改也会被发送和接收—
+    用户的工作流程不会因为属性的加入而发生变化.</para>
 
     <note>
+    <!--
       <para>Subversion has reserved the set of properties whose names
         begin with <literal>svn:</literal> as its own.  While there
         are only a handful of such properties in use today, you should
@@ -1078,8 +1102,14 @@
         future release of Subversion will grow support for a feature
         or behavior driven by a property of the same name but with
         perhaps an entirely different interpretation.</para>
+    -->
+      <para>Subversion 保留了一组名字以 <literal>svn:</literal> 开始的属性,
+        所以你在创建自己的属性时应该避免使用以 <literal>svn:</literal> 开始
+        的名字, 否则的话, 未来 Subversion 的新版本可能会采用同名的属性来
+        支持新特性, 而属性的含义可能与你创建时的完全不同.</para>
     </note>
 
+    <!--
     <para>Properties show up elsewhere in Subversion, too.  Just as
       files and directories may have arbitrary property names and
       values attached to them, each revision as a whole may have
@@ -1089,7 +1119,13 @@
       versioned.  In other words, if you change the value of, or
       delete, a revision property, there's no way, within the scope of
       Subversion's functionality, to recover the previous value.</para>
+    -->
+    <para>除了文件和目录, 属性还可以出现在其他地方, 每一个版本号都是一个整体,
+      可以在它上面附加任意的属性, 唯一的要求是属性名只能使用 ASCII 字符.
+      同文件和目录的属性相比, 最大的不同是版本号的属性不会被版本控制, 也就是
+      说如果版本号的属性被删除或修改了, Subversion 没有能力恢复以前的值.</para>
 
+    <!--
     <para>Subversion has no particular policy regarding the use of
       properties.  It asks only that you do not use property names that
       begin with the prefix <literal>svn:</literal> as that's the
@@ -1105,8 +1141,17 @@
       chapters as part of the more general topics to which they are
       related.  For an exhaustive list of Subversion's predefined
       properties, see <xref linkend="svn.advanced.props.ref" />.</para>
+    -->
+    <para>关于属性的使用, Subversion 并没有很特别的策略, 唯一的要求是用户不
+      要使用以 <literal>svn:</literal> 开始的属性名, 这是保留给 Subversion
+      使用的名字空间, Subversion 使用的属性包括版本化的和未版本化的. 文件和
+      目录上特定的版本化属性具有特殊的意义或效果, 或提供了版本号的一些信息.
+      在提交时, 特定的版本号属性被自动地附加到版本号上, 属性包含了与版本号
+      有关的信息. 大多数属性会在谈到相关的主题时再介绍, Subversion 的预定义
+      属性的完整列表见 <xref linkend="svn.advanced.props.ref"/>.</para>
 
     <note>
+    <!--
       <para>While Subversion automatically attaches properties
         (<literal>svn:date</literal>, <literal>svn:author</literal>,
         <literal>svn:log</literal>, and so on) to revisions, it does
@@ -1119,13 +1164,26 @@
         Subversion repository data, do not make the mistake of
         assuming that any particular revision property exists on a
         revision.</para>
+    -->
+      <para>虽然 Subversion 自动地把属性 (<literal>svn:date</literal>,
+        <literal>svn:author</literal>, <literal>svn:log</literal> 等) 附加到
+        版本号, 但它并 <emphasis>不</emphasis> 假设在这之后这些属性仍然存在,
+        用户及其使用的工具也应如此. 版本号的属性可以通过 API 或客户端工具删除
+        (如果仓库的钩子允许), 删除后并不是影响 Subversion 的正常功能. 所以在
+        编写与 Subversion 仓库交互的脚本时, 不能假定任意版本号的属性是存在的.
+      </para>
     </note>
 
+    <!--
     <para>In this section, we will examine the utility—both to
       users of Subversion and to Subversion itself—of property
       support.  You'll learn about the property-related
       <command>svn</command> subcommands and how property
       modifications affect your normal Subversion workflow.</para>
+    -->
+    <para>本节将检验 <command>svn</command>—不仅是对 Subversion 用户,
+      也对 Subversion 自身—对属性的支持. 读者将会学到与属性相关的
+      <command>svn</command> 子命令, 以及属性如何影响用户的工作检验.</para>
 
     <!-- =============================================================== -->
     <sect2 id="svn.advanced.props.why">




More information about the svnbook-dev mailing list