[svnbook] r5399 committed - branches/1.8/zh/book/ch03-advanced-topics.xml
wuzhouhui at users.sourceforge.net
wuzhouhui at users.sourceforge.net
Thu Aug 17 09:17:43 CDT 2017
Revision: 5399
http://sourceforge.net/p/svnbook/source/5399
Author: wuzhouhui
Date: 2017-08-17 14:17:43 +0000 (Thu, 17 Aug 2017)
Log Message:
-----------
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-08-16 14:50:40 UTC (rev 5398)
+++ branches/1.8/zh/book/ch03-advanced-topics.xml 2017-08-17 14:17:43 UTC (rev 5399)
@@ -5828,6 +5828,7 @@
时, 现实就残酷多了. 如果用户无法找到支持非文本文件合并的工具,
复制-修改-合并 模型就不再适用.</para>
+ <!--
<para>Let's look at a real-life example of where this model runs
aground. Harry and Sally are both graphic designers working on
the same project, a bit of marketing collateral for an
@@ -5838,7 +5839,13 @@
particular photo they chose for their damaged car—a baby
blue 1967 Ford Mustang with an unfortunate bit of crumpling on
the left front fender.</para>
+ -->
+ <para>介绍一个现实生活中可能会遇到的例子. Harry 和 Sally 是同一个项目的
+ 图片设计师, 为汽车保险部门设计一款海报. 海报的中心是一辆汽车, 海报的格式
+ 是 PNG. 海报的布局已经基本确定, Harry 和 Sally 将一辆 1967 年淡蓝色
+ Ford Mustang 照片放在海报中央, 车的左前侧保险杠有一点凹陷.</para>
+ <!--
<para>Now, as is common in graphic design work, there's a change
in plans, which causes the car's color to be a concern. So Sally
updates her working copy to <literal>HEAD</literal>, fires up
@@ -5854,7 +5861,15 @@
car's new finish and tries to commit her changes. But, as
expected, Subversion fails the commit, informing Sally that
her version of the image is now out of date.</para>
+ -->
+ <para>项目计划有所改动, 导致车身的颜色需要修改, 于是 Sally 把工作副本更
+ 新到 <literal>HEAD</literal>, 打开图片编辑软件, 将车身的颜色改成樱桃红.
+ 同时, Harry 觉得车的毁坏程度应该更严重一些, 这样效果更好, 于是他也把自己
+ 的工作副本更新到 <literal>HEAD</literal>, 在车挡风玻璃上增加了一些裂痕.
+ 就在 Harry 提交修改后, Sally 也提交了自己的修改, 显然, Subversion 会拒绝
+ Sally 的提交.</para>
+ <!--
<para>Here's where the difficulty sets in. If Harry and Sally
were making changes to a text file, Sally would simply update
her working copy, receiving Harry's changes in the process. In
@@ -5869,6 +5884,12 @@
against, the changes that Harry made, and the changes that Sally
made, and then spit out an image of a busted-up red Mustang with
a cracked windshield!</para>
+ -->
+ <para>现在麻烦来了. 如果 Harry 和 Sally 编辑的是文本文件, 此时 Sally 只
+ 要更新工作副本, 然后就可以再次尝试提交, 最差的情况不过是两人都修改了文件
+ 的同一区域, 而 Sally 必须手工地解决冲突. 但海报不是文本文件, 它是二进制
+ 的图片, 没有哪一款软件可以聪明到能够把两张图片合并成一张, 最终得到一辆
+ 樱桃红的, 挡风玻璃上有裂痕的汽车.</para>
<para>
<indexterm>
@@ -5878,7 +5899,17 @@
<primary>checkouts</primary>
<secondary>reserved</secondary>
<see>locking</see>
- </indexterm>Of course, things would have gone more smoothly if
+ </indexterm>
+ 如果 Harry 和 Sally 是串行地修改图片, 那事情就会顺利很多—比如 Sally
+ 修改车身颜色并提交后, Harry 再去添加裂痕, 或者是 Sally 等到 Harry 添加裂
+ 痕后再去修改车身颜色. <xref linkend="svn.basic.vsn-models.copy-merge" />
+ 已经说过, 如果 Harry 和 Sally 之间进行了充分的沟通, 这种问题大部分都可
+ 以迎刃而解. 但是版本控制系统也是一种沟通的形式, 由软件来保证工作的串行
+ 化并不是一件坏事, 反而效果更好, 效率更高. 正是基于这点考虑, Subversion
+ 实现了 加锁-修改-解锁 模型. Subversion 的 <emphasis>锁定</emphasis>
+ 特性和其他版本控制系统的 <quote>保留检出</quote> 比较类型.</para>
+ <!--
+ Of course, things would have gone more smoothly if
Harry and Sally had serialized their modifications to the
image—if, say, Harry had waited to draw his windshield
cracks on Sally's now-red car, or if Sally had tweaked the color
@@ -5886,6 +5917,7 @@
in <xref linkend="svn.basic.vsn-models.copy-merge" />, most of
these types of problems go away entirely where perfect
communication between Harry and Sally
+ TODO
exists.<footnote><para>Communication wouldn't have been such bad
medicine for Harry and Sally's Hollywood namesakes, either, for
that matter.</para></footnote> But as one's version control
@@ -5897,6 +5929,7 @@
Subversion's <firstterm>locking</firstterm> feature, which is
similar to the <quote>reserved checkouts</quote> mechanisms of
other version control systems.</para>
+ -->
<para>Subversion's locking feature exists ultimately to minimize
wasted time and effort. By allowing a user to programmatically
More information about the svnbook-dev
mailing list