Update OpenBSD configure files.
[i18n-zh.git] / doc / svnbook / po / zh_CN.po
blobe4ad89a05ee71a2e808670d6646d4e563ac2a4cb
2 # Simplified Chinese translation for svnbook
3 # This file is distributed under the same license as the svnbook.
5 # Authors:
6 # Dongsheng Song <dongsheng.song@gmail.com>, 2007
7 # Xun Leasun <leasun@gmail.com>
8 # Daijun Sun <daijun@gmail.com>
10 # Update to new pot:
11 #    msgmerge --update zh_CN.po book.pot
13 # Check translation:
14 #    msgfmt --statistics -c -o zh_CN.mo zh_CN.po
16 # Please format your translation before commit:
17 #    msgmerge --no-wrap -o zh_CN_new.po zh_CN.po book.pot
18 #    mv -f zh_CN_new.po zh_CN.po
20 # Dictionary:
21 # BASE revision     基础版本
22 # blame             追溯
23 # checkout          检出
24 # default           默认
25 # HEAD revision     最新版本
26 # overlay           重载
27 # remove            删除
28 # rename            改名
29 # repository        版本库
30 # revert            恢复
31 # revision          版本
32 # Subversion book   Subversion 手册
33 # undo              撤销
34 # unified diff      标准差异
35 # unversioned       未版本控制
36 # versioned         已版本控制
37 # working copy      工作副本
39 msgid ""
40 msgstr ""
41 "Project-Id-Version: svnbook 1.5\n"
42 "POT-Creation-Date: 2007-12-09 10:12 +0000\n"
43 "PO-Revision-Date: 2007-10-30 21:19+0800\n"
44 "Last-Translator: Dongsheng Song <dongsheng.song@gmail.com>\n"
45 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
46 "MIME-Version: 1.0\n"
47 "Content-Type: text/plain; charset=UTF-8\n"
48 "Content-Transfer-Encoding: 8bit\n"
50 #. When image changes, this message will be marked fuzzy or untranslated for you.
51 #. It doesn't matter what you translate it to: it's not used at all.
52 #. (None)
53 #: ../source/book.xml:1001
54 msgid "@@image: 'images/ch01dia1.png'; md5=d5cf54020bcbb99fb12150481d94bffa"
55 msgstr "@@image: 'images/ch01dia1.png'; md5=d5cf54020bcbb99fb12150481d94bffa"
57 #. When image changes, this message will be marked fuzzy or untranslated for you.
58 #. It doesn't matter what you translate it to: it's not used at all.
59 #. (None)
60 #: ../source/book.xml:1131
61 msgid "@@image: 'images/ch02dia1.png'; md5=9f98bd2bd15fabc36d55db0572a7b32b"
62 msgstr "@@image: 'images/ch02dia1.png'; md5=9f98bd2bd15fabc36d55db0572a7b32b"
64 #. When image changes, this message will be marked fuzzy or untranslated for you.
65 #. It doesn't matter what you translate it to: it's not used at all.
66 #. (None)
67 #: ../source/book.xml:1202
68 msgid "@@image: 'images/ch02dia2.png'; md5=4c3e6e55f9a0c50d6925f5ca4587e47b"
69 msgstr "@@image: 'images/ch02dia2.png'; md5=4c3e6e55f9a0c50d6925f5ca4587e47b"
71 #. When image changes, this message will be marked fuzzy or untranslated for you.
72 #. It doesn't matter what you translate it to: it's not used at all.
73 #. (None)
74 #: ../source/book.xml:1231
75 msgid "@@image: 'images/ch02dia3.png'; md5=e9cd778666a999ab329a069efed37500"
76 msgstr "@@image: 'images/ch02dia3.png'; md5=e9cd778666a999ab329a069efed37500"
78 #. When image changes, this message will be marked fuzzy or untranslated for you.
79 #. It doesn't matter what you translate it to: it's not used at all.
80 #. (None)
81 #: ../source/book.xml:1316
82 msgid "@@image: 'images/ch02dia4.png'; md5=8d13576c2af1db88349f6ff144ef6fc2"
83 msgstr "@@image: 'images/ch02dia4.png'; md5=8d13576c2af1db88349f6ff144ef6fc2"
85 #. When image changes, this message will be marked fuzzy or untranslated for you.
86 #. It doesn't matter what you translate it to: it's not used at all.
87 #. (None)
88 #: ../source/book.xml:1326
89 msgid "@@image: 'images/ch02dia5.png'; md5=f4ec352cd843cf130fe500cfdbc358ca"
90 msgstr "@@image: 'images/ch02dia5.png'; md5=f4ec352cd843cf130fe500cfdbc358ca"
92 #. When image changes, this message will be marked fuzzy or untranslated for you.
93 #. It doesn't matter what you translate it to: it's not used at all.
94 #. (None)
95 #: ../source/book.xml:1514
96 msgid "@@image: 'images/ch02dia6.png'; md5=d4eac305c63464419d945a616284c4ce"
97 msgstr "@@image: 'images/ch02dia6.png'; md5=d4eac305c63464419d945a616284c4ce"
99 #. When image changes, this message will be marked fuzzy or untranslated for you.
100 #. It doesn't matter what you translate it to: it's not used at all.
101 #. (None)
102 #: ../source/book.xml:1697
103 msgid "@@image: 'images/ch02dia7.png'; md5=067bb47f6fe3dcdeefac6755da876cdf"
104 msgstr "@@image: 'images/ch02dia7.png'; md5=067bb47f6fe3dcdeefac6755da876cdf"
106 #. When image changes, this message will be marked fuzzy or untranslated for you.
107 #. It doesn't matter what you translate it to: it's not used at all.
108 #. (None)
109 #: ../source/book.xml:6763
110 msgid "@@image: 'images/ch04dia1.png'; md5=a157a2c9fc737cab3db918aaf489bf7e"
111 msgstr "@@image: 'images/ch04dia1.png'; md5=a157a2c9fc737cab3db918aaf489bf7e"
113 #. When image changes, this message will be marked fuzzy or untranslated for you.
114 #. It doesn't matter what you translate it to: it's not used at all.
115 #. (None)
116 #: ../source/book.xml:6801
117 msgid "@@image: 'images/ch04dia2.png'; md5=5c6b571282ff05d99a99d69fdef50378"
118 msgstr "@@image: 'images/ch04dia2.png'; md5=5c6b571282ff05d99a99d69fdef50378"
120 #. When image changes, this message will be marked fuzzy or untranslated for you.
121 #. It doesn't matter what you translate it to: it's not used at all.
122 #. (None)
123 #: ../source/book.xml:6910
124 msgid "@@image: 'images/ch04dia3.png'; md5=7226def64bf6dea42b547d968b853a08"
125 msgstr "@@image: 'images/ch04dia3.png'; md5=7226def64bf6dea42b547d968b853a08"
127 #. When image changes, this message will be marked fuzzy or untranslated for you.
128 #. It doesn't matter what you translate it to: it's not used at all.
129 #. (None)
130 #: ../source/book.xml:7000
131 msgid "@@image: 'images/ch04dia4.png'; md5=03cbad24eee5abe0cadc452be19c2613"
132 msgstr "@@image: 'images/ch04dia4.png'; md5=03cbad24eee5abe0cadc452be19c2613"
134 #. When image changes, this message will be marked fuzzy or untranslated for you.
135 #. It doesn't matter what you translate it to: it's not used at all.
136 #. (None)
137 #: ../source/book.xml:15988
138 msgid "@@image: 'images/ch08dia1.png'; md5=870a5b07012b21f7b187fdb1d912d8d6"
139 msgstr "@@image: 'images/ch08dia1.png'; md5=870a5b07012b21f7b187fdb1d912d8d6"
141 #. When image changes, this message will be marked fuzzy or untranslated for you.
142 #. It doesn't matter what you translate it to: it's not used at all.
143 #. (None)
144 #: ../source/book.xml:16017
145 msgid "@@image: 'images/ch08dia2.png'; md5=a72633f0cc8f6f83fa4d8a96b47202ca"
146 msgstr "@@image: 'images/ch08dia2.png'; md5=a72633f0cc8f6f83fa4d8a96b47202ca"
148 #. (title)
149 #: ../source/book.xml:4
150 msgid "Version Control with Subversion"
151 msgstr "Subversion 权威指南"
153 #. (subtitle)
154 #: ../source/book.xml:5
155 #, fuzzy
156 msgid "For Subversion 1.5(Compiled from r2907)"
157 msgstr "针对 Subversion 1.5(编译自版本 r2881)"
159 #. (edition)
160 #: ../source/book.xml:6
161 msgid "Second"
162 msgstr "第二"
164 #. (biblioid)
165 #: ../source/book.xml:7
166 msgid "?-?????-???-?"
167 msgstr "?-?????-???-?"
169 #. (firstname)
170 #: ../source/book.xml:11
171 msgid "Ben"
172 msgstr "Ben"
174 #. (surname)
175 #: ../source/book.xml:12
176 msgid "Collins-Sussman"
177 msgstr "Collins-Sussman"
179 #. (firstname)
180 #: ../source/book.xml:17
181 msgid "Brian W."
182 msgstr "Brian W."
184 #. (surname)
185 #: ../source/book.xml:18
186 msgid "Fitzpatrick"
187 msgstr "Fitzpatrick"
189 #. (firstname)
190 #: ../source/book.xml:23
191 msgid "C. Michael"
192 msgstr "C. Michael"
194 #. (surname)
195 #: ../source/book.xml:24
196 msgid "Pilato"
197 msgstr "Pilato"
199 #. (firstname)
200 #: ../source/book.xml:30
201 msgid "Tatiana"
202 msgstr "Tatiana"
204 #. (surname)
205 #: ../source/book.xml:31
206 msgid "Apandi"
207 msgstr "Apandi"
209 #. (pagenums)
210 #: ../source/book.xml:34
211 msgid "350 pages (est.)"
212 msgstr "大约 350 页"
214 #. (pubdate)
215 #: ../source/book.xml:35
216 msgid "(TBA)"
217 msgstr "(TBA)"
219 #. (year)
220 #: ../source/book.xml:37
221 msgid "2002"
222 msgstr "2002"
224 #. (year)
225 #: ../source/book.xml:38
226 msgid "2003"
227 msgstr "2003"
229 #. (year)
230 #: ../source/book.xml:39
231 msgid "2004"
232 msgstr "2004"
234 #. (year)
235 #: ../source/book.xml:40
236 msgid "2005"
237 msgstr "2005"
239 #. (year)
240 #: ../source/book.xml:41
241 msgid "2006"
242 msgstr "2006"
244 #. (year)
245 #: ../source/book.xml:42
246 msgid "2007"
247 msgstr "2007"
249 #. (holder)
250 #: ../source/book.xml:43
251 msgid "Ben Collins-Sussman"
252 msgstr "Ben Collins-Sussman"
254 #. (holder)
255 #: ../source/book.xml:44
256 msgid "Brian W. Fitzpatrick"
257 msgstr "Brian W. Fitzpatrick"
259 #. (holder)
260 #: ../source/book.xml:45
261 msgid "C. Michael Pilato"
262 msgstr "C. Michael Pilato"
264 #. (para)
265 #: ../source/book.xml:48
266 msgid "This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit <uri href=\"http://creativecommons.org/licenses/by/2.0/\">http://creativecommons.org/licenses/by/2.0/</uri> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA."
267 msgstr "本作品使用共同创造许可证,可以访问<uri href=\"http://creativecommons.org/licenses/by/2.0/\">http://creativecommons.org/licenses/by/2.0/</uri>或发送邮件到Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.查看本许可证。"
269 #. (title)
270 #: ../source/book.xml:62
271 msgid "Foreword"
272 msgstr "前言"
274 #. (firstname)
275 #: ../source/book.xml:65
276 msgid "Karl"
277 msgstr "Karl"
279 #. (surname)
280 #: ../source/book.xml:66
281 msgid "Fogel"
282 msgstr "Fogel"
284 #. (pubdate)
285 #: ../source/book.xml:69
286 msgid "Chicago, March 14, 2004"
287 msgstr "芝加哥,2004 年 3 月 14 日"
289 #. (para)
290 #: ../source/book.xml:71
291 msgid "A bad Frequently Asked Questions (FAQ) sheet is one that is composed not of the questions people actually asked, but of the questions the FAQ's author <emphasis>wished</emphasis> people had asked. Perhaps you've seen the type before:"
292 msgstr "一个差劲的常见问题列表(FAQ)总是充斥着作者<emphasis>渴望被问到的</emphasis>问题,而不是人们真正想要了解的问题。也许你曾经见过下面这样的问题:"
294 #. (para)
295 #: ../source/book.xml:76
296 msgid "Q: How can I use Glorbosoft XYZ to maximize team productivity?"
297 msgstr "Q:怎样使用Glorbosoft XYZ最大程度的提高团队生产率?"
299 #. (para)
300 #: ../source/book.xml:80
301 msgid "A: Many of our customers want to know how they can maximize productivity through our patented office groupware innovations. The answer is simple: first, click on the <quote><literal>File</literal></quote> menu, scroll down to <quote><literal>Increase Productivity</literal></quote>, then…"
302 msgstr "A:许多客户希望知道怎样利用我们革命性的专利办公套件最大程度的提高生产率。答案非常简单:首先,点击<quote><literal>文件</literal></quote> 菜单,找到<quote><literal>提高生产率</literal></quote>菜单项,然后…"
304 #. (para)
305 #: ../source/book.xml:87
306 msgid "The problem with such FAQs is that they are not, in a literal sense, FAQs at all. No one ever called the tech support line and asked, <quote>How can we maximize productivity?</quote>. Rather, people asked highly specific questions, like, <quote>How can we change the calendaring system to send reminders two days in advance instead of one?</quote> and so on. But it's a lot easier to make up imaginary Frequently Asked Questions than it is to discover the real ones. Compiling a true FAQ sheet requires a sustained, organized effort: over the lifetime of the software, incoming questions must be tracked, responses monitored, and all gathered into a coherent, searchable whole that reflects the collective experience of users in the wild. It calls for the patient, observant attitude of a field naturalist. No grand hypothesizing, no visionary pronouncements here—open eyes and accurate note-taking are what's needed most."
307 msgstr "类似的问题完全不符合FAQ的精神。没人会打电话给技术支持中心,询问<quote>怎样提高生产率?</quote>相反,人们经常询问一些非常具体的问题,像<quote>怎样让日程系统提前两天而不是一天提醒相关用户?</quote>等等。但是想象比发现真正的问题更容易。构建一个真实的问题列表需要持之以恒的、有组织的辛勤工作:跨越整个软件生命周期,追踪新提出的问题,监控反馈信息,所有的问题要整理成一个统一的、可查询的整体,并且能够真实的反映所有用户的感受。这需要耐心,如自然学家一样严谨的态度,没有浮华的假设,没有虚幻的断言—相反的,需要开放的视野和精确的记录。"
309 #. (para)
310 #: ../source/book.xml:103
311 msgid "What I love about this book is that it grew out of just such a process, and shows it on every page. It is the direct result of the authors' encounters with users. It began with Ben Collins-Sussman's observation that people were asking the same basic questions over and over on the Subversion mailing lists: What are the standard workflows to use with Subversion? Do branches and tags work the same way as in other version control systems? How can I find out who made a particular change?"
312 msgstr "我很喜欢这本书,因为它正是按照这种精神建立起来的,这种精神体现在本书的每一页中。这是作者与用户直接交流的结果。而这一切是源于Ben Collins-Sussman's对于Subversion常见问题邮件列表的研究。他发现人们总是在邮件列表中重复询问一些基本问题:使用subversion的一般程序是怎样的?分支与标签同其它版本控制系统的工作方式一样吗?我怎样知道某一处修改是谁做的?"
314 #. (para)
315 #: ../source/book.xml:111
316 msgid "Frustrated at seeing the same questions day after day, Ben worked intensely over a month in the summer of 2002 to write <citetitle>The Subversion Handbook</citetitle>, a sixty page manual that covered all the basics of using Subversion. The manual made no pretense of being complete, but it was distributed with Subversion and got users over that initial hump in the learning curve. When O'Reilly and Associates decided to publish a full-length Subversion book, the path of least resistance was obvious: just expand the Subversion handbook."
317 msgstr "日复一日看到相同问题的烦闷,促使Ben在2002年的夏天努力工作了一个月,撰写了一本<citetitle>Subversion手册</citetitle>,一本六十页厚的、涵盖了所有Subversion使用基础知识的手册。这本手册没有说明最终定稿的时间,但它随着Subversion的每个版本一起发布,帮助许多用户跨过学习之初的艰难。当O'Reilly和Associates决定出版一本完备的Subversion图书的时候,一条捷径浮出水面:扩充Subversion手册。"
319 #. (para)
320 #: ../source/book.xml:121
321 msgid "The three co-authors of the new book were thus presented with an unusual opportunity. Officially, their task was to write a book top-down, starting from a table of contents and an initial draft. But they also had access to a steady stream—indeed, an uncontrollable geyser—of bottom-up source material. Subversion was already in the hands of thousands of early adopters, and those users were giving tons of feedback, not only about Subversion, but about its existing documentation."
322 msgstr "新书的三位合著者因而面临着一个不寻常的机会。从职责上讲,他们的任务是从一个目录和一些草稿为基础,自上而下的写一部专著。但事实上,他们的灵感源泉则来自一些具体的内容,稳定却难以组织。Subversion被数以千计的早期用户采用,这些用户提供了大量的反馈,不仅仅针对Subversion,还包括业已存在的文档。"
324 #. (para)
325 #: ../source/book.xml:130
326 msgid "During the entire time they wrote this book, Ben, Mike, and Brian haunted the Subversion mailing lists and chat rooms incessantly, carefully noting the problems users were having in real-life situations. Monitoring such feedback was part of their job descriptions at CollabNet anyway, and it gave them a huge advantage when they set out to document Subversion. The book they produced is grounded firmly in the bedrock of experience, not in the shifting sands of wishful thinking; it combines the best aspects of user manual and FAQ sheet. This duality might not be noticeable on a first reading. Taken in order, front to back, the book is simply a straightforward description of a piece of software. There's the overview, the obligatory guided tour, the chapter on administrative configuration, some advanced topics, and of course a command reference and troubleshooting guide. Only when you come back to it later, seeking the solution to some specific problem, does its authenticity shine out: the telling details that can only result from encounters with the unexpected, the examples honed from genuine use cases, and most of all the sensitivity to the user's needs and the user's point of view."
327 msgstr "在写这本书的过程里,Ben,Mike 和 Brian一直像鬼魂一样游荡在Subversion邮件列表和聊天室中,仔细的研究用户实际遇到的问题。监视这些反馈也是他们在CollabNet工作的一部分,这给他们撰写Subversion文档提供了巨大的便利。这本书建立在丰富的使用经验,而非在流沙般脆弱的想象之上,它结合了用户手册和FAQ的优点。初次阅读时,这种二元性的优势并不明显,按照顺序,从前到后,这本书只是简单的从头到尾描述了软件的细节。书中的内容包括一章概述,一章必不可少的快速指南,一章关于管理配置,一些高级主题,当然还包括命令参考手册和故障排除指南。而当你过一段时间之后,再次翻开本书查找一些特定问题的解决方案时,这种二元性才得以显现:这些生动的细节一定来自不可预测的实际用例的提炼,大多是源于用户的需要和视点。"
329 #. (para)
330 #: ../source/book.xml:150
331 msgid "Of course, no one can promise that this book will answer every question you have about Subversion. Sometimes, the precision with which it anticipates your questions will seem eerily telepathic; yet occasionally, you will stumble into a hole in the community's knowledge, and come away empty-handed. When this happens, the best thing you can do is email <email>users@subversion.tigris.org</email> and present your problem. The authors are still there, still watching, and they include not just the three listed on the cover, but many others who contributed corrections and original material. From the community's point of view, solving your problem is merely a pleasant side effect of a much larger project—namely, slowly adjusting this book, and ultimately Subversion itself, to more closely match the way people actually use it. They are eager to hear from you not merely because they can help you, but because you can help them. With Subversion as with all active free software projects, <emphasis>you are not alone</emphasis>."
332 msgstr "当然,没人可以承诺这本书可以回答所有问题。尽管有时候一些前人提问的惊人一致性让你感觉是心灵感应;你仍有可能在社区的知识库里摔跤,空手而归。如果有这种情况,最好的办法是写明问题发送email到<email>users@subversion.tigris.org</email>,作者还在那里关注着社区,不仅仅封面提到的三位,还包括许多曾经作出修正与提供原始材料的人。从社区的视角,帮你解决问题只是逐步的调整这本书,进一步调整Subversion本身以更合理的适合用户使用这样一个大工程的一个有趣的额外效用。他们渴望你的信息,不仅仅可以帮助你,也因为可以帮助他们。与Subversion这样活跃的自由软件项目一起,<emphasis>你并不孤单</emphasis>。"
334 #. (para)
335 #: ../source/book.xml:168
336 msgid "Let this book be your first companion."
337 msgstr "让这本书将成为你的第一个伙伴。"
339 #. (title)
340 #: ../source/book.xml:177
341 msgid "Preface"
342 msgstr "序言"
344 #. (attribution)
345 #: ../source/book.xml:180
346 msgid "Greg Hudson"
347 msgstr "Greg Hudson"
349 #. (quote)
350 #: ../source/book.xml:182
351 msgid "It is important not to let the perfect become the enemy of the good, even when you can agree on what perfect is. Doubly so when you can't. As unpleasant as it is to be trapped by past mistakes, you can't make any progress by being afraid of your own shadow during design."
352 msgstr "即使你能确认什么是完美,也不要让完美成为好的敌人,更何况你不能确认。因为落入过去陷阱的不悦,你会在设计时因为担心自己的缺陷而无所作为。"
354 #. (para)
355 #: ../source/book.xml:189
356 msgid "<indexterm><primary>Concurrent Versions System (CVS)</primary></indexterm> In the world of open-source software, the Concurrent Versions System (CVS) was the tool of choice for version control for many years. And rightly so. CVS was open-source software itself, and its non-restrictive modus operandi and support for networked operation allowed dozens of geographically dispersed programmers to share their work. It fit the collaborative nature of the open-source world very well. CVS and its semi-chaotic development model have since become cornerstones of open-source culture."
357 msgstr "<indexterm><primary>并行版本系统(CVS)</primary></indexterm>在开源软件世界,长久以来,并行版本系统(CVS)一直是版本控制工具的唯一选择。事实证明,这个选择不错。CVS的自由软件身份,无约束的<foreignphrase>处事态度</foreignphrase>,和对网络化操作的支持(网络使众多身处不同地方的程序员可以共享他们的工作成果),正符合了开源世界协作的精神,CVS和它半混乱状态的开发模式已成为开源文化的基石。"
359 #. (para)
360 #: ../source/book.xml:200
361 msgid "But CVS was not without its flaws, and simply fixing those flaws promised to be an enormous effort. Enter Subversion. Designed to be a successor to CVS, Subversion's originators set out to win the hearts of CVS users in two ways—by creating an open-source system with a design (and <quote>look and feel</quote>) similar to CVS, and by attempting to avoid most of CVS's noticeable flaws. While the result isn't necessarily the next great evolution in version control design, Subversion <emphasis>is</emphasis> very powerful, very usable, and very flexible. And for the most part, almost all newly-started open-source projects now choose Subversion instead of CVS."
362 msgstr "但是,CVS也并不是没有缺陷,而修正这些缺陷必定要耗费很大的精力。而Subversion则是以CVS继任者的面目出现的新型版本控制系统。Subversion的设计者们力图通过两方面的努力赢得CVS用户的青睐:保持开源系统的设计(以及<quote>界面风格</quote>)与CVS尽可能类似,同时尽力弥补CVS许多显著的缺陷。这些努力的结果使得从CVS迁移到Subversion不需要作出重大的变革,Subversion确实是非常强大、非常有用和非常灵活的工具。并且很重要的一点,几乎新开的开源项目都选择了Subversion替代CVS。"
364 #. (para)
365 #: ../source/book.xml:211
366 #, fuzzy
367 msgid "This book is written to document the 1.5 series of the Subversion version control system. We have made every attempt to be thorough in our coverage. However, Subversion has a thriving and energetic development community, so there are already a number of features and improvements planned for future versions of Subversion that may change some of the commands and specific notes in this book."
368 msgstr "本书是为Subversion 1.4系列撰写的。在书中,我们尽力涵盖Subversion的所有内容。但是,Subversion有一个兴盛和充满活力的开发社区,已有许多新的特性和改进措施计划在Subversion新版本中实现,本书中讲述的命令和特性可能会有所变化。"
370 #. (title)
371 #: ../source/book.xml:223
372 msgid "Audience"
373 msgstr "读者"
375 #. (para)
376 #: ../source/book.xml:225
377 msgid "This book is written for computer-literate folk who want to use Subversion to manage their data. While Subversion runs on a number of different operating systems, its primary user interface is command-line based. That command-line tool (<command>svn</command>), and some auxiliary programs, are the focus of this book."
378 msgstr "本书是为了那些在计算机领域有丰富知识,并且希望使用Subversion管理数据的人士准备的。尽管Subversion可以在多种不同的操作系统上运行,但其基本用户操作界面是基于命令行的,也就是我们将要在本书中讲述和使用的命令行工具(<command>svn</command>)。"
380 #. (para)
381 #: ../source/book.xml:231
382 msgid "For consistency, the examples in this book assume the reader is using a Unix-like operating system and is relatively comfortable with Unix and command-line interfaces. That said, the <command>svn</command> program also runs on non-Unix platforms like Microsoft Windows. With a few minor exceptions, such as the use of backward slashes (<literal>\\</literal>) instead of forward slashes (<literal>/</literal>) for path separators, the input to and output from this tool when run on Windows are identical to its Unix counterpart."
383 msgstr "出于一致性的考虑,本书的例子假定读者使用的是类Unix的操作系统,并且熟悉Unix和命令行界面。当然,<command>svn</command>程序也可以在入Microsoft Windows这样的非Unix平台上运行,除了一些微小的不同,如使用反斜线(<literal>\\</literal>)代替正斜线(<literal>/</literal>)作为路径分隔符,在Windows上运行svn程序的输入和输出与在Unix平台上运行完全一致。"
385 #. (para)
386 #: ../source/book.xml:240
387 msgid "Most readers are probably programmers or system administrators who need to track changes to source code. This is the most common use for Subversion, and therefore it is the scenario underlying all of the book's examples. But Subversion can be used to manage changes to any sort of information—images, music, databases, documentation, and so on. To Subversion, all data is just data."
388 msgstr "大多数读者可能是那些需要跟踪代码变化的程序员或者系统管理员,这是Subversion最普遍的用途,因此这个场景贯穿于整本书的例子中。但是Subversion可以用来管理任何类型的数据:图像、音乐、数据库、文档等等。对于Subversion,数据就是数据而已。"
390 #. (para)
391 #: ../source/book.xml:247
392 msgid "While this book is written with the assumption that the reader has never used a version control system, we've also tried to make it easy for users of CVS (and other systems) to make a painless leap into Subversion. Special sidebars may mention other version control systems from time to time, and a special appendix summarizes many of the differences between CVS and Subversion."
393 msgstr "本书假定读者从来没有使用过任何版本控制工具,同时,我们也努力使CVS用户能够轻松的投入到Subversion使用当中,不时会出现一些涉及CVS的内容,此外,在附录的一个章节中总结了Subversion和CVS的区别。"
395 #. (para)
396 #: ../source/book.xml:254
397 msgid "Note also that the source code examples used throughout the book are only examples. While they will compile with the proper compiler incantations, they are intended to illustrate a particular scenario, not necessarily serve as examples of good programming style or practices."
398 msgstr "需要说明的是,所有源代码示例仅仅是例子而已。这些例子需要通过正确编译参数进行编译,在这里列举它们只是为了说明特定的场景,并非为了展示优秀的编码风格。"
400 #. (title)
401 #: ../source/book.xml:265
402 msgid "How to Read this Book"
403 msgstr "怎样阅读本书"
405 #. (para)
406 #: ../source/book.xml:267
407 msgid "Technical books always face a certain dilemma: whether to cater to <firstterm>top-down</firstterm> or <firstterm>bottom-up</firstterm> learners. A top-down learner prefers to read or skim documentation, getting a large overview of how the system works; only then does she actually start using the software. A bottom-learner is a <quote>learn by doing</quote> person, someone who just wants to dive into the software and figure it out as she goes, referring to book sections when necessary. Most books tend to be written for one type of person or the other, and this book is undoubtedly biased towards top-down learners. (And if you're actually reading this section, you're probably already a top-down learner yourself!) However, if you're a bottom-up person, don't despair. While the book may be laid out as a broad survey of Subversion topics, the contents of each section tends to be heavy with specific examples that you can try-by-doing. For the impatient folks who just want to get going, you can jump right to <xref linkend=\"svn.intro\"/>."
408 msgstr "技术书籍经常要面对这样两难的困境:是迎合<firstterm>自上至下</firstterm>的初学者,还是<firstterm>自下至上</firstterm>的初学者。一个自上至下的学习者会喜欢略读文档,得到对系统工作原理的总体看法;然后她才会开始实际使用软件。而一个自下至上的学习者,是<quote>通过实践学习</quote>的人,他们希望快速的开始使用软件,自己领会软件的使用,只在必要时读取相关章节。大多数图书会倾向于针对某一类读者,而本书毫无疑问倾向于自上至下的方法。(如果你阅读了本节,那你也一定是一个自上至下的学习者!)然而,如果你是自下至上的人,不要失望,本书以Subversion主题的广泛观察进行组织,每个章节都包含了大量可以尝试的详细实例。如果你希望马上开工,没有耐心等待,你可以看<xref linkend=\"svn.intro\"/>。"
410 #. (para)
411 #: ../source/book.xml:285
412 msgid "Regardless of your learning style, this book aims to be useful to people of widely different backgrounds—from people with no previous experience in version control to experienced system administrators. Depending on your own background, certain chapters may be more or less important to you. The following can be considered a <quote>recommended reading list</quote> for various types of readers:"
413 msgstr "本书适用于具有不同背景知识的各个层次的读者—从未使用过版本控制的新手到经验丰富的系统管理员都能够从本书中获益。根据基础的不同,某些的章节可能对某些读者更有价值。下面的内容可以看作是为不同类型的读者提供的<quote>推荐阅读清单</quote>:"
415 #. (term)
416 #: ../source/book.xml:295
417 msgid "Experienced System Administrators"
418 msgstr "资深系统管理员"
420 #. (para)
421 #: ../source/book.xml:297
422 msgid "The assumption here is that you've probably used version control before before, and are dying to get a Subversion server up and running ASAP. <xref linkend=\"svn.reposadmin\"/> and <xref linkend=\"svn.serverconfig\"/> will show you how to create your first repository and make it available over the network. After that's done, <xref linkend=\"svn.tour\"/> and <xref linkend=\"svn.forcvs\"/> are the fastest routes to learning the Subversion client."
423 msgstr "假定你从前使用过版本控制,并且迫切需要建立起Subversion服务器并尽快运行起来,<xref linkend=\"svn.reposadmin\"/>和<xref linkend=\"svn.serverconfig\"/>将会告诉你如何建立起一个版本库,并将其在网络上发布。此后,依靠你的CVS使用经验,<xref linkend=\"svn.tour\"/>和<xref linkend=\"svn.forcvs\"/>将向你展示怎样使用Subversion客户端软件。"
425 #. (term)
426 #: ../source/book.xml:310
427 msgid "New users"
428 msgstr "新用户"
430 #. (para)
431 #: ../source/book.xml:312
432 msgid "Your administrator has probably set up Subversion already, and you need to learn how to use the client. If you've never used a version control system, then <xref linkend=\"svn.basic\"/> is a vital introduction to the ideas behind version control. <xref linkend=\"svn.tour\"/> is a guided tour of the Subversion client."
433 msgstr "如果管理员已经为你准备好了Subversion服务,你所需要的是学习如何使用客户端。如果你没有使用版本控制系统(像CVS)的经验,那么<xref linkend=\"svn.basic\"/>和<xref linkend=\"svn.tour\"/>是重要的入门教程,其中介绍了版本控制的重要思想。"
435 #. (term)
436 #: ../source/book.xml:321
437 msgid "Advanced users"
438 msgstr "高级用户"
440 #. (para)
441 #: ../source/book.xml:323
442 msgid "Whether you're a user or administrator, eventually your project will grow larger. You're going to want to learn how to do more advanced things with Subversion, such as how to use branches and perform merges (<xref linkend=\"svn.branchmerge\"/>), how to use Subversion's property support (<xref linkend=\"svn.advanced\"/>), how to configure runtime options (<xref linkend=\"svn.customization\"/>), and other things. These chapters aren't critical at first, but be sure to read them once you're comfortable with the basics."
443 msgstr "无论是用户还是管理员,项目终将会壮大起来。那时,就需要学习更多Subversion的高级功能,像如何使用分支和执行合并(<xref linkend=\"svn.branchmerge\"/>)、怎样使用Subversion的属性(<xref linkend=\"svn.advanced\"/>)、怎样配制运行参数(<xref linkend=\"svn.customization\"/>)等等。这两章在学习的初期并不重要,但熟悉了基本操作之后还是非常有必要了解一下。"
445 #. (term)
446 #: ../source/book.xml:334
447 msgid "Developers"
448 msgstr "开发者"
450 #. (para)
451 #: ../source/book.xml:336
452 msgid "Presumably, you're already familiar with Subversion, and now want to either extend it or build new software on top of its many APIs. <xref linkend=\"svn.developer\"/> is just for you."
453 msgstr "你应该已经很熟悉Subversion了,并且想扩展它或使用它的API开发新软件。<xref linkend=\"svn.developer\"/>将最适合你。"
455 #. (para)
456 #: ../source/book.xml:343
457 msgid "The book ends with reference material—<xref linkend=\"svn.ref\"/> is a reference guide for all Subversion commands, and the appendices cover a number of useful topics. These are the chapters you're mostly likely to come back to after you've finished the book."
458 msgstr "本书以参考材料作为结束—<xref linkend=\"svn.ref\"/>是一部Subversion全部命令的详细指南,此外,在附录中还有许多很有意义的主题。阅读完本书后,这些章节将会是你经常查阅的内容。"
460 #. (title)
461 #: ../source/book.xml:353
462 msgid "Conventions Used in This Book"
463 msgstr "本书约定"
465 #. (para)
466 #: ../source/book.xml:355
467 msgid "This section covers the various conventions used in this book."
468 msgstr "本节描述了本书中使用的各种约定。"
470 #. (title)
471 #: ../source/book.xml:360
472 msgid "Typographic Conventions"
473 msgstr "排版习惯"
475 #. (command)
476 #: ../source/book.xml:365
477 msgid "Constant width"
478 msgstr "等宽字体"
480 #. (para)
481 #: ../source/book.xml:368
482 msgid "Used for commands, command output, and options"
483 msgstr "用于命令,命令输出和选项"
485 #. (replaceable)
486 #: ../source/book.xml:373
487 msgid "Constant width italic"
488 msgstr "等宽斜体"
490 #. (para)
491 #: ../source/book.xml:376
492 msgid "Used for replaceable items in code and text"
493 msgstr "用于代码和文本中的可替换部分"
495 #. (filename)
496 #: ../source/book.xml:381
497 msgid "Italic"
498 msgstr "斜体"
500 #. (para)
501 #: ../source/book.xml:384
502 msgid "Used for file and directory names"
503 msgstr "用于文件和路径名"
505 #. (title)
506 #: ../source/book.xml:392
507 msgid "Icons"
508 msgstr "图标"
510 #. (para)
511 #: ../source/book.xml:395
512 msgid "This icon designates a note relating to the surrounding text."
513 msgstr "此图标表示旁边的文本内容需特别注意。"
515 #. (para)
516 #: ../source/book.xml:399
517 msgid "This icon designates a helpful tip relating to the surrounding text."
518 msgstr "此图标表示旁边的文本描述了一个有用的小技巧。"
520 #. (para)
521 #: ../source/book.xml:403
522 msgid "This icon designates a warning relating to the surrounding text."
523 msgstr "此图标表示旁边的文本是警告信息。"
525 #. (title)
526 #: ../source/book.xml:413
527 msgid "Organization of This Book"
528 msgstr "本书的结构"
530 #. (para)
531 #: ../source/book.xml:415
532 msgid "The chapters that follow and their contents are listed here:"
533 msgstr "以下是各个章节的内容介绍:"
535 #. (para)
536 #: ../source/book.xml:423
537 msgid "Covers the history of Subversion as well as its features, architecture, and components."
538 msgstr "回顾了Subversion的历史,描述了Subversion的特性、架构、组件。"
540 #. (para)
541 #: ../source/book.xml:432
542 msgid "Explains the basics of version control and different versioning models, along with Subversion's repository, working copies, and revisions."
543 msgstr "介绍了版本控制的基础知识及不同的版本模型,同时讲述了Subversion版本库,工作拷贝和修订版本的概念。"
545 #. (para)
546 #: ../source/book.xml:442
547 msgid "Walks you through a day in the life of a Subversion user. It demonstrates how to use a Subversion client to obtain, modify, and commit data."
548 msgstr "引领你开始一个Subversion用户的工作。示范怎样使用Subversion获得、修改和提交数据。"
550 #. (para)
551 #: ../source/book.xml:452
552 msgid "Covers more complex features that regular users will eventually come into contact with, such as versioned metadata, file locking, and peg revisions."
553 msgstr "覆盖了许多普通用户最终要面对的复杂特性,例如版本化的元数据、文件锁定和peg修订版本。"
555 #. (para)
556 #: ../source/book.xml:462
557 msgid "Discusses branches, merges, and tagging, including best practices for branching and merging, common use cases, how to undo changes, and how to easily swing from one branch to the next."
558 msgstr "讨论分支、合并与标签,包括最佳实践的介绍,常见用例的描述,怎样取消修改,以及怎样从一个分支转到另一个分支。"
560 #. (para)
561 #: ../source/book.xml:473
562 msgid "Describes the basics of the Subversion repository, how to create, configure, and maintain a repository, and the tools you can use to do all of this."
563 msgstr "讲述Subversion版本库的基本概念,怎样建立、配置和维护版本库,以及哪些工具可以完成上述的工作。"
565 #. (para)
566 #: ../source/book.xml:483
567 msgid "Explains how to configure your Subversion server and different ways to access your repository: <literal>HTTP</literal>, the <literal>svn</literal> protocol, and local disk access. It also covers the details of authentication, authorization and anonymous access."
568 msgstr "描述了如何配置Subversion服务器,以及三种访问版本库的方式,<literal>HTTP</literal>、<literal>svn</literal>协议和本地磁盘访问。这里也介绍了认证,授权与匿名访问的细节。"
570 #. (para)
571 #: ../source/book.xml:496
572 msgid "Explores the Subversion client configuration files, the handling of internationalized text, and how to make external tools cooperate with Subversion."
573 msgstr "研究了Subversion的客户端配置文件,对国际化字符的处理,以及Subversion如何与外置工具交互。"
575 #. (para)
576 #: ../source/book.xml:506
577 msgid "Describes the internals of Subversion, the Subversion filesystem, and the working copy administrative areas from a programmer's point of view. Demonstrates how to use the public APIs to write a program that uses Subversion, and most importantly, how to contribute to the development of Subversion."
578 msgstr "介绍了Subversion的核心部件、Subversion的文件系统,以及程序员眼中的工作拷贝管理区域,展示了如何使用公共API编写Subversion应用程序。最重要的内容是,如何为Subversion的开发贡献力量。"
580 #. (para)
581 #: ../source/book.xml:519
582 msgid "Explains in great detail every subcommand of <command>svn</command>, <command>svnadmin</command>, and <command>svnlook</command> with plenty of examples for the whole family!"
583 msgstr "以大量的实例,详细描述了<command>svn</command>、<command>svnadmin</command>和<command>svnlook</command>的所有子命令。"
585 #. (para)
586 #: ../source/book.xml:530
587 msgid "For the impatient, a whirlwind explanation of how to install Subversion and start using it immediately. You have been warned."
588 msgstr "因为缺乏耐心,我们会立刻解释如何安装和使用Subversion,我们已经告诉你了。"
590 #. (para)
591 #: ../source/book.xml:540
592 msgid "Covers the similarities and differences between Subversion and CVS, with numerous suggestions on how to break all the bad habits you picked up from years of using CVS. Included are descriptions of Subversion revision numbers, versioned directories, offline operations, <command>update</command> vs. <command>status</command>, branches, tags, metadata, conflict resolution, and authentication."
593 msgstr "详细比较了Subversion与CVS的异同,并针对如何消除多年使用CVS养成的坏习惯提出建议。内容包括Subversion修订版本号、版本化的目录、离线操作、<command>update</command>与<command>status</command>的对比、分支、标签、元数据、冲突处理和认证。"
595 #. (para)
596 #: ../source/book.xml:555
597 msgid "Describes the details of WebDAV and DeltaV, and how you can configure your Subversion repository to be mounted read/write as a DAV share."
598 msgstr "描述了WebDAV与DeltaV的细节,并介绍了如何将Subversion版本库作为可读/写的DAV共享装载。"
600 #. (para)
601 #: ../source/book.xml:565
602 msgid "Discusses tools that support or use Subversion, including alternative client programs, repository browser tools, and so on."
603 msgstr "讨论一些支持和使用Subversion的工具,包括其它客户端工具,版本库浏览工具等。"
605 #. (title)
606 #: ../source/book.xml:577
607 msgid "This Book is Free"
608 msgstr "本书是免费的"
610 #. (para)
611 #: ../source/book.xml:579
612 msgid "This book started out as bits of documentation written by Subversion project developers, which were then coalesced into a single work and rewritten. As such, it has always been under a free license. (See <xref linkend=\"svn.copyright\"/>.) In fact, the book was written in the public eye, originally as a part of Subversion project itself. This means two things:"
613 msgstr "本书最初是作为Subversion项目的文档并由Subversion的开发者开始撰写的,后来成为一个独立的项目并进行了重写。与Subversion相同,它始终按免费许可证(见<xref linkend=\"svn.copyright\"/>)发布。事实上,本书是在公众的关注中写出来的,最初是Subversion项目的一部分,这有两种含义:"
615 #. (para)
616 #: ../source/book.xml:587
617 msgid "You will always find the latest version of this book in the book's own Subversion repository."
618 msgstr "总可以在Subversion的版本库里找到本书的最新版本。"
620 #. (para)
621 #: ../source/book.xml:591
622 msgid "You can make changes to this book and redistribute it however you wish—it's under a free license. Your only obligation is to maintain proper attribution to the original authors. Of course, rather than distribute your own private version of this book, we'd much rather you send feedback and patches to the Subversion developer community."
623 msgstr "可以任意分发或修改本书—它在免费许可证的控制之下,你的唯一限制是必须保留正确的最初作者。当然,与其独自发布私有版本,不如向Subversion开发社区提供反馈和修正信息。"
625 #. O'REILLY SHOULD TWEAK THIS PARAGRAPH
626 #. (para)
627 #: ../source/book.xml:600
628 msgid "The online home of this book's development and most of the volunteer-driven translation efforts around it is <uri href=\"http://svnbook.red-bean.com\">http://svnbook.red-bean.com</uri>. There, you can find links to the latest releases and tagged versions of the book in various formats, as well as instructions for accessing the book's Subversion repository (where lives its DocBook XML source code). Feedback is welcome—encouraged, even. Please submit all comments, complaints, and patches against the book sources to <email>svnbook-dev@red-bean.com</email>."
629 msgstr "本书的在线主页在<uri href=\"http://svnbook.red-bean.com\">http://svnbook.red-bean.com</uri>,有许多志愿的翻译工作。在网站上,你可以找到许多本书最新快照和标签版本的链接,也可以访问到本书的Subversion版本库(存放了DocBook XML源文件)。我们欢迎反馈—也愿意接受鼓励。请将所有的评论、抱怨和对本书源文件的补丁发送到<email>svnbook-dev@red-bean.com</email>。"
631 #. (title)
632 #: ../source/book.xml:615
633 msgid "Acknowledgments"
634 msgstr "致谢"
636 #. (para)
637 #: ../source/book.xml:623
638 msgid "Oh, and thanks, Karl, for being too overworked to write this book yourself."
639 msgstr "噢,还要感谢Karl为了本书所付出的辛勤工作。"
641 #. (para)
642 #: ../source/book.xml:617
643 msgid "This book would not be possible (nor very useful) if Subversion did not exist. For that, the authors would like to thank Brian Behlendorf and CollabNet for the vision to fund such a risky and ambitious new Open Source project; Jim Blandy for the original Subversion name and design—we love you, Jim; Karl Fogel for being such a good friend and a great community leader, in that order.<placeholder-1/>"
644 msgstr "没有Subversion就不可能有(即使有也没什么价值)这本书。所以作者衷心感谢Brian Behlendorf和CollabNet,他们独到的眼光开创了这个充满冒险但雄心勃勃的开源项目;Jim Blandy贡献了Subversion最初的名字和设计—我们爱你,Jim。还有Karl Fogel,一个好朋友和伟大的社区领袖。<placeholder-1/>"
646 #. (para)
647 #: ../source/book.xml:625
648 msgid "Thanks to O'Reilly and our editors, Linda Mui and Tatiana Diaz for their patience and support."
649 msgstr "感谢O'Reilly和我们的编辑Linda Mui和Tatiana对我们的耐心和支持。"
651 #. (para)
652 #: ../source/book.xml:627
653 #, fuzzy
654 msgid "Finally, we thank the countless people who contributed to this book with informal reviews, suggestions, and fixes: While this is undoubtedly not a complete list, this book would be incomplete and incorrect without the help of: David Anderson, Jani Averbach, Ryan Barrett, Francois Beausoleil, Jennifer Bevan, Matt Blais, Zack Brown, Martin Buchholz, Brane Cibej, John R. Daily, Peter Davis, Olivier Davy, Robert P. J. Day, Mo DeJong, Brian Denny, Joe Drew, Nick Duffek, Ben Elliston, Justin Erenkrantz, Shlomi Fish, Julian Foad, Chris Foote, Martin Furter, Vlad Georgescu, Dave Gilbert, Eric Gillespie, David Glasser, Matthew Gregan, Art Haas, Eric Hanchrow, Greg Hudson, Alexis Huxley, Jens B. Jorgensen, Tez Kamihira, David Kimdon, Mark Benedetto King, Andreas J. Koenig, Nuutti Kotivuori, Matt Kraai, Scott Lamb, Vincent Lefevre, Morten Ludvigsen, Paul Lussier, Bruce A. Mah, Philip Martin, Feliciano Matias, Patrick Mayweg, Gareth McCaughan, Jon Middleton, Tim Moloney, Christopher Ness, Mats Nilsson, Joe Orton, Amy Lyn Pilato, Kevin Pilch-Bisson, Dmitriy Popkov, Michael Price, Mark Proctor, Steffen Prohaska, Daniel Rall, Jack Repenning, Tobias Ringstrom, Garrett Rooney, Joel Rosdahl, Christian Sauer, Larry Shatzer, Russell Steicke, Sander Striker, Erik Sjoelund, Johan Sundstroem, John Szakmeister, Mason Thomas, Eric Wadsworth, Colin Watson, Alex Waugh, Chad Whitacre, Josef Wolf, Blair Zajac, and the entire Subversion community."
655 msgstr "最后,我们要感谢数不清的曾经为本书作出贡献的人们,他们进行了非正式的审阅,并给出了大量建议和修改意见。虽然无法列出一个完整的列表,但本书的完整和正确离不开他们:David Anderson, Jani Averbach, Ryan Barrett, Francois Beausoleil, Jennifer Bevan, Matt Blais, Zack Brown, Martin Buchholz, Brane Cibej, John R. Daily, Peter Davis, Olivier Davy, Robert P. J. Day, Mo DeJong, Brian Denny, Joe Drew, Nick Duffek, Ben Elliston, Justin Erenkrantz, Shlomi Fish, Julian Foad, Chris Foote, Martin Furter, Dave Gilbert, Eric Gillespie, David Glasser, Matthew Gregan, Art Haas, Eric Hanchrow, Greg Hudson, Alexis Huxley, Jens B. Jorgensen, Tez Kamihira, David Kimdon, Mark Benedetto King, Andreas J. Koenig, Nuutti Kotivuori, Matt Kraai, Scott Lamb, Vincent Lefevre, Morten Ludvigsen, Paul Lussier, Bruce A. Mah, Philip Martin, Feliciano Matias, Patrick Mayweg, Gareth McCaughan, Jon Middleton, Tim Moloney, Christopher Ness, Mats Nilsson, Joe Orton, Amy Lyn Pilato, Kevin Pilch-Bisson, Dmitriy Popkov, Michael Price, Mark Proctor, Steffen Prohaska, Daniel Rall, Jack Repenning, Tobias Ringstrom, Garrett Rooney, Joel Rosdahl, Christian Sauer, Larry Shatzer, Russell Steicke, Sander Striker, Erik Sjoelund, Johan Sundstroem, John Szakmeister, Mason Thomas, Eric Wadsworth, Colin Watson, Alex Waugh, Chad Whitacre, Josef Wolf, Blair Zajac, 以及整个Subversion社区。"
657 #. (title)
658 #: ../source/book.xml:654
659 msgid "From Ben Collins-Sussman"
660 msgstr "来自 Ben Collins-Sussman"
662 #. (para)
663 #: ../source/book.xml:656
664 msgid "Thanks to my wife Frances, who, for many months, got to hear, <quote>But honey, I'm still working on the book</quote>, rather than the usual, <quote>But honey, I'm still doing email.</quote> I don't know where she gets all that patience! She's my perfect counterbalance."
665 msgstr "感谢我的妻子Frances,在好几个月里,我一直在对你说:<quote>但是亲爱的,我还在为这本书工作</quote>,此外还有,<quote>但是亲爱的,我还在处理邮件</quote>。我不知道她为什么会如此耐心!她是我完美的平衡点。"
667 #. (para)
668 #: ../source/book.xml:661
669 msgid "Thanks to my extended family and friends for their sincere encouragement, despite having no actual interest in the subject. (You know, the ones who say, <quote>Ooh, you wrote a book?</quote>, and then when you tell them it's a computer book, sort of glaze over.)"
670 msgstr "感谢我的家人对我的鼓励,无论他们是否真的对我的课题感兴趣。(你知道的,一个人说 <quote>哇,你正在写一本书?</quote>,然后当他知道你是写一本计算机书时,那种惊讶就变得没有那么多了。)"
672 #. (para)
673 #: ../source/book.xml:666
674 msgid "Thanks to all my close friends, who make me a rich, rich man. Don't look at me that way—you know who you are."
675 msgstr "感谢我身边让我富有的朋友,不要那样看我—你们知道你们是谁。"
677 #. (para)
678 #: ../source/book.xml:668
679 msgid "Thanks to my parents for the perfect low-level formatting, and being unbelievable role models. Thanks to my son for the opportunity to pass that on."
680 msgstr "感谢父母对我的低级格式化,和难以置信的角色典范 ,感谢儿子给我机会传承这些东西。"
682 #. (title)
683 #: ../source/book.xml:675
684 msgid "From Brian W. Fitzpatrick"
685 msgstr "来自 Brian W. Fitzpatrick"
687 #. ### TODO(fitz):  update this?
688 #. (para)
689 #: ../source/book.xml:678
690 msgid "Huge thanks to my wife Marie for being incredibly understanding, supportive, and most of all, patient. Thank you to my brother Eric who first introduced me to UNIX programming way back when. Thanks to my Mom and Grandmother for all their support, not to mention enduring a Christmas holiday where I came home and promptly buried my head in my laptop to work on the book."
691 msgstr "非常非常感谢我的妻子Marie的理解,支持和最重要的耐心。感谢引导我学会UNIX编程的兄弟Eric,感谢我的母亲和祖母的支持,对我在圣诞夜里埋头工作的理解。"
693 #. (para)
694 #: ../source/book.xml:685
695 msgid "To Mike and Ben: It was a pleasure working with you on the book. Heck, it's a pleasure working with you at work!"
696 msgstr "Mike和Ben:与你们一起工作非常快乐,Heck,我们在一起工作很愉快!"
698 #. (para)
699 #: ../source/book.xml:687
700 msgid "To everyone in the Subversion community and the Apache Software Foundation, thanks for having me. Not a day goes by where I don't learn something from at least one of you."
701 msgstr "感谢所有在Subversion和Apache软件基金会的人们给我机会与你们在一起,没有一天我不从你们那里学到知识。"
703 #. (para)
704 #: ../source/book.xml:691
705 msgid "Lastly, thanks to my Grandfather who always told me that <quote>freedom equals responsibility.</quote> I couldn't agree more."
706 msgstr "最后,感谢我的祖父,他一直跟我说<quote>自由等于责任</quote>,我深信不疑。"
708 #. (title)
709 #: ../source/book.xml:698
710 msgid "From C. Michael Pilato"
711 msgstr "来自 C. Michael Pilato"
713 #. (para)
714 #: ../source/book.xml:700
715 msgid "Special thanks to Amy, my best friend and wife of nine incredible years, for her love and patient support, for putting up with the late nights, and for graciously enduring the version control processes I've imposed on her. Don't worry, Sweetheart—you'll be a TortoiseSVN wizard in no time!"
716 msgstr "特别感谢Amy,我最好的朋友和9年里不可思议的妻子,因为她的爱和耐心支持,因为她提供的深夜工作,因为她对我强加给她的版本控制过程的优雅忍受 。不要担心,甜心—你会立刻成为TortoiseSVN巫师!"
718 #. (para)
719 #: ../source/book.xml:706
720 msgid "Gavin, there probably aren't many words in this book that you can successfully <quote>sound out</quote> at this stage, but when you've finally got a handle on the written form of this crazy language we speak, I hope you're as proud of your Daddy as he is of you."
721 msgstr "Gavin,或许现在本书的很多词你还不能读出来,但是当你最终能够书写我们所说的疯狂语言时,希望你会为你的父亲感到骄傲,就像他对你一样。"
723 #. (para)
724 #: ../source/book.xml:713
725 msgid "Translation: Daddy loves you and hopes you like computers as much as you like basketball, baseball, and football. (Wasn't that obvious?)"
726 msgstr "翻译:爸爸希望你会像喜欢篮球、棒球和足球一样喜欢计算机。(不是很明显吗?)"
728 #. (para)
729 #: ../source/book.xml:711
730 msgid "Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as Aiduh yike batetball, base-ball, et bootball. <placeholder-1/>"
731 msgstr "Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as Aiduh yike batetball, base-ball, et bootball. <placeholder-1/>"
733 #. (para)
734 #: ../source/book.xml:717
735 msgid "Mom and Dad, thanks for your constant support and enthusiasm. Mom- and Dad-in-law, thanks for all of the same <emphasis>plus</emphasis> your fabulous daughter."
736 msgstr "妈妈和爸爸,感谢你们的支持和热情,岳父岳母,以同样的理由感谢你们,还要感谢你们难以置信的女儿。"
738 #. (para)
739 #: ../source/book.xml:720
740 msgid "Hats off to Shep Kendall, through whom the world of computers was first opened to me; Ben Collins-Sussman, my tour-guide through the open-source world; Karl Fogel—you <emphasis>are</emphasis> my <filename>.emacs</filename>; Greg Stein, for oozing practical programming know-how; Brian Fitzpatrick—for sharing this writing experience with me. To the many folks from whom I am constantly picking up new knowledge—keep dropping it!"
741 msgstr "向你们致敬,Shep Kendall,为我打开了通向计算机世界的大门;Ben Collins Sussman,我在开源世界的导师;Karl Fogel—你<emphasis>是</emphasis>我的<filename>.emacs</filename>;Greg Stain,让我在困境中知道怎样编程;Brain Fitzpatrick—同我分享他的写作经验。所有我曾经从你们那里获得知识的人—尽管又不断忘记。"
743 #. (para)
744 #: ../source/book.xml:728
745 msgid "Finally, to the One who perfectly demonstrates creative excellence—thank You."
746 msgstr "最后,对所有为我展现完美卓越创造力的人们—感谢。"
748 #. (title)
749 #: ../source/book.xml:737
750 msgid "What is Subversion?"
751 msgstr "Subversion 是什么?"
753 #. (para)
754 #: ../source/book.xml:739
755 msgid "Subversion is a free/open-source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of <quote>time machine</quote>."
756 msgstr "Subversion是一个自由/开源的版本控制系统。也就是说,在Subversion管理下,文件和目录可以超越时空。也就是Subversion允许你数据恢复到早期版本,或者是检查数据修改的历史。正因为如此,许多人将版本控制系统当作一种神奇的<quote>时间机器</quote>。"
758 #. (para)
759 #: ../source/book.xml:745
760 msgid "Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change."
761 msgstr "Subversion的版本库可以通过网络访问,从而使用户可以在不同的电脑上进行操作。从某种程度上来说,允许用户在各自的空间里修改和管理同一组数据可以促进团队协作。因为修改不再是单线进行,开发速度会更快。此外,由于所有的工作都已版本化,也就不必担心由于错误的更改而影响软件质量—如果出现不正确的更改,只要撤销那一次更改操作即可。"
763 #. (para)
764 #: ../source/book.xml:754
765 msgid "Some version control systems are also software configuration management (SCM) systems. These systems are specifically tailored to manage trees of source code, and have many features that are specific to software development—such as natively understanding programming languages, or supplying tools for building software. Subversion, however, is not one of these systems. It is a general system that can be used to manage <emphasis>any</emphasis> collection of files. For you, those files might be source code—for others, anything from grocery shopping lists to digital video mixdowns and beyond."
766 msgstr "某些版本控制系统本身也是软件配置管理(SCM)系统,这种系统经过精巧的设计,专门用来管理源代码树,并且具备许多与软件开发有关的特性—比如,对编程语言的支持,或者提供程序构建工具。不过Subversion并不是这样的系统。它是一个通用系统,可以管理<emphasis>任何</emphasis>类型的文件集。对你来说,这些文件这可能是源程序—而对别人,则可能是一个货物清单或者是数字电影。"
768 #. (title)
769 #: ../source/book.xml:768
770 #, fuzzy
771 msgid "Is Subversion the Right Tool?"
772 msgstr "Subversion 会早一天吗?"
774 #. (para)
775 #: ../source/book.xml:770
776 msgid "If you're a user or system administrator pondering the use of Subversion, the first question you should ask yourself is: \"is this the right tool for the job?\" Subversion is a fantastic hammer, but be careful not to view every problem as a nail."
777 msgstr ""
779 #. (para)
780 #: ../source/book.xml:775
781 msgid "If you need to archive old versions of files and directories, possibly resurrect them, or examine logs of how they've changed over time, then Subversion is exactly the right tool for you. If you need to collaborate with people on documents (usually over a network) and keep track of who made which changes, then Subversion is also appropriate. This is why Subversion is so often used in software development environments — programming is an inherently social activity, and Subversion makes it easy to collaborate with other programmers. Of course, there's a cost to using Subversion as well: administrative overhead. You'll need to manage a data-repository to store the information and all its history, and be diligent about backing it up. When working with the data on a daily basis, you won't be able to copy, move, rename, or delete files the way you usually do. Instead, you'll have to do all of those things through Subversion."
782 msgstr ""
784 #. (para)
785 #: ../source/book.xml:803
786 msgid "Or as a friend puts it, <quote>swatting a fly with a Buick.</quote>"
787 msgstr ""
789 #. (para)
790 #: ../source/book.xml:792
791 msgid "Assuming you're fine with the extra workflow, you should still make sure you're not using Subversion to solve a problem that other tools solve better. For example, because Subversion replicates data to all the collaborators involved, a common misuse is to treat it as a generic distribution system. People will sometimes use Subversion to distribute huge collections of photos, digital music, or software packages. The problem is, this sort of data usually isn't changing at all. The collection itself grows over time, but the individual files within the collection aren't being changed. In this case, using Subversion is \"overkill\".<placeholder-1/> There are simpler tools that efficiently replicate data <emphasis>without</emphasis> the overhead of tracking changes, such as <command>rsync</command> or <command>unison</command>."
792 msgstr ""
794 #. (title)
795 #: ../source/book.xml:813
796 msgid "Subversion's History"
797 msgstr "Subversion的历史"
799 #. (para)
800 #: ../source/book.xml:815
801 msgid "<indexterm><primary>Subversion</primary><secondary>history of</secondary></indexterm> In early 2000, CollabNet, Inc. (<uri href=\"http://www.collab.net\">http://www.collab.net</uri>) began seeking developers to write a replacement for CVS. CollabNet offers a collaboration software suite called CollabNet Enterprise Edition (CEE) of which one component is version control. Although CEE used CVS as its initial version control system, CVS's limitations were obvious from the beginning, and CollabNet knew it would eventually have to find something better. Unfortunately, CVS had become the de facto standard in the open source world largely because there <emphasis>wasn't</emphasis> anything better, at least not under a free license. So CollabNet determined to write a new version control system from scratch, retaining the basic ideas of CVS, but without the bugs and misfeatures."
802 msgstr "早在2000年,CollabNet, Inc. (<uri href=\"http://www.collab.net\">http://www.collab.net</uri>)就开始寻找CVS替代产品的开发人员。CollabNet提供了一个名为CollabNet企业版(CEE)的协作软件套件。这个软件套件的一个组成部分就是版本控制系统。尽管CEE在最初采用了CVS作为其版本控制系统,但是CVS的局限性从一开始就很明显,CollabNet知道,迟早要找到一个更好的替代品。遗憾的是,CVS已经成为开源世界事实上的标准,很大程度上是因为<emphasis>没有</emphasis>更好的替代品,至少是没有可以自由使用的替代品。所以CollabNet决定从头编写一个新的版本控制系统,这个系统保留CVS的基本思想,但是要修正其中错误和不合理的特性。"
804 #. (para)
805 #: ../source/book.xml:830
806 msgid "In February 2000, they contacted Karl Fogel, the author of <citetitle>Open Source Development with CVS</citetitle> (Coriolis, 1999), and asked if he'd like to work on this new project. Coincidentally, at the time Karl was already discussing a design for a new version control system with his friend Jim Blandy. In 1995, the two had started Cyclic Software, a company providing CVS support contracts, and although they later sold the business, they still used CVS every day at their jobs. Their frustration with CVS had led Jim to think carefully about better ways to manage versioned data, and he'd already come up with not only the name <quote>Subversion</quote>, but also with the basic design of the Subversion data store. When CollabNet called, Karl immediately agreed to work on the project, and Jim got his employer, Red Hat Software, to essentially donate him to the project for an indefinite period of time. CollabNet hired Karl and Ben Collins-Sussman, and detailed design work began in May. With the help of some well-placed prods from Brian Behlendorf and Jason Robbins of CollabNet, and Greg Stein (at the time an independent developer active in the WebDAV/DeltaV specification process), Subversion quickly attracted a community of active developers. It turned out that many people had had the same frustrating experiences with CVS, and welcomed the chance to finally do something about it."
807 msgstr "2000年2月,他们联系到<citetitle>Open Source Development with CVS</citetitle>(Coriolis, 1999)的作者Karl Fogel,并且询问他是否希望为这个新项目工作。巧合的是,当时Karl正在与朋友Jim Blandy讨论设计一个新的版本控制系统。1995年时,他们两人曾经开办了一个提供CVS支持的公司Cyclic Software,尽管他们最终卖掉了公司,但还是天天使用CVS进行日常工作。使用CVS时的挫折促使Jim认真的思考如何管理版本化的数据,并且他当时不仅使用了<quote>Subversion</quote>这个名字,并且已经完成了Subversion版本库的最初设计。所以当CollabNet提出邀请的时候,Karl马上同意为这个项目工作,同时Jim也找到了他的雇主—Red Hat软件公司—允许他到这个项目工作,并且没有限定最终的期限。CollabNet雇佣了Karl和Ben Collins Sussman,详细设计工作从三月开始,在Behlendorf 、CollabNet、Jason Robbins和Greg Stein(当时是一个独立开发者,活跃在WebDAV/DeltaV系统规范制订工作中)恰到好处的激励下,Subversion很快吸引了许多活跃的开发者,结果是许多对CVS有过失望经历的人很乐于为这个项目做些事情。"
809 #. (para)
810 #: ../source/book.xml:854
811 msgid "The original design team settled on some simple goals. They didn't want to break new ground in version control methodology, they just wanted to fix CVS. They decided that Subversion would match CVS's features, and preserve the same development model, but not duplicate CVS's most obvious flaws. And although it did not need to be a drop-in replacement for CVS, it should be similar enough that any CVS user could make the switch with little effort."
812 msgstr "最初的设计小组设定了简单的开发目标。他们不想在版本控制方法学中开垦处女地,他们只是希望修正CVS。他们决定Subversion应符合CVS的特性,并保留相同的开发模型,但不再重复CVS的一些显著缺陷。尽管Subversion并不需要成为CVS的完全替代品,但它应该与CVS保持足够的相似性,以使CVS用户可以轻松的转移到Subversion上。"
814 #. (para)
815 #: ../source/book.xml:862
816 msgid "After fourteen months of coding, Subversion became <quote>self-hosting</quote> on August 31, 2001. That is, Subversion developers stopped using CVS to manage Subversion's own source code, and started using Subversion instead."
817 msgstr "经过14个月的编码,2001年8月31日,Subversion能够<quote>自己管理自己</quote>了,开发者停止使用CVS保存Subversion的代码,而使用Subversion本身。"
819 #. (para)
820 #: ../source/book.xml:866
821 msgid "While CollabNet started the project, and still funds a large chunk of the work (it pays the salaries of a few full-time Subversion developers), Subversion is run like most open-source projects, governed by a loose, transparent set of rules that encourage meritocracy. CollabNet's copyright license is fully compliant with the Debian Free Software Guidelines. In other words, anyone is free to download, modify, and redistribute Subversion as he pleases; no permission from CollabNet or anyone else is required."
822 msgstr "虽然CollabNet启动了这个项目,并且一直提供了大量的工作支持(它为一些全职的Subversion开发者提供薪水),但Subversion像其它许多开源项目一样,被松散的、透明的规则管理着,这样的规则激励着知识界的精英们。CollabNet的版权许可证完全符合Debian的自由软件方针。也就是说,任何人都可以根据自己的意愿自由的下载、修改和重新发布Subversion,不需要CollabNet或其他人的授权。"
824 #. (title)
825 #: ../source/book.xml:879
826 msgid "Subversion's Features"
827 msgstr "Subversion的特性"
829 #. (para)
830 #: ../source/book.xml:881
831 msgid "When discussing the features that Subversion brings to the version control table, it is often helpful to speak of them in terms of how they improve upon CVS's design. If you're not familiar with CVS, you may not understand all of these features. And if you're not familiar with version control at all, your eyes may glaze over unless you first read <xref linkend=\"svn.basic\"/>, in which we provide a gentle introduction to version control."
832 msgstr "在讲解Subversion为版本控制领域带来的特性时,我们会经常通过Subversion对CVS的改进进行说明。如果不熟悉CVS,了解所有Subversion的特性会有一定的困难。而如果根本就不熟悉版本控制,你就只有干瞪眼的份儿了。因此,最好首先阅读一下<xref linkend=\"svn.basic\"/>,这一章简单介绍了一些版本控制的基本思想和概念。"
834 #. (para)
835 #: ../source/book.xml:888
836 msgid "Subversion provides:"
837 msgstr "Subversion支持:"
839 #. (term)
840 #: ../source/book.xml:891
841 msgid "Directory versioning"
842 msgstr "版本化的目录"
844 #. (para)
845 #: ../source/book.xml:893
846 msgid "CVS only tracks the history of individual files, but Subversion implements a <quote>virtual</quote> versioned filesystem that tracks changes to whole directory trees over time. Files <emphasis>and</emphasis> directories are versioned."
847 msgstr "CVS只能跟踪单个文件的变更历史,但是Subversion实现的<quote>虚拟</quote>版本化文件系统则可以跟踪目录树的变更。在Subversion中,文件<emphasis>和</emphasis>目录都是版本化的。"
849 #. (term)
850 #: ../source/book.xml:901
851 msgid "True version history"
852 msgstr "真实的版本历史"
854 #. (para)
855 #: ../source/book.xml:903
856 msgid "Since CVS is limited to file versioning, operations such as copies and renames—which might happen to files, but which are really changes to the contents of some containing directory—aren't supported in CVS. Additionally, in CVS you cannot replace a versioned file with some new thing of the same name without the new item inheriting the history of the old—perhaps completely unrelated—file. With Subversion, you can add, delete, copy, and rename both files and directories. And every newly added file begins with a fresh, clean history all its own."
857 msgstr "由于只能跟踪单个文件的变更,CVS无法支持如文件拷贝和改名这些常见的操作—这些操作改变了目录的内容。同样,在CVS中,一个目录下的文件只要名字相同即拥有相同的历史,即使这些同名文件在历史上毫无关系。而在Subversion中,可以对文件或目录进行增加、拷贝和改名操作,也解决了同名而无关的文件之间的历史联系问题。"
859 #. (term)
860 #: ../source/book.xml:917
861 msgid "Atomic commits"
862 msgstr "原子提交"
864 #. (para)
865 #: ../source/book.xml:919
866 msgid "A collection of modifications either goes into the repository completely, or not at all. This allows developers to construct and commit changes as logical chunks, and prevents problems that can occur when only a portion of a set of changes is successfully sent to the repository."
867 msgstr "一系列相关的更改,要么全部提交到版本库,要么一个也不提交。这样用户就可以将相关的更改组成一个逻辑整体,防止出现只有部分修改提交到版本库的情况。"
869 #. (term)
870 #: ../source/book.xml:928
871 msgid "Versioned metadata"
872 msgstr "版本化的元数据"
874 #. (para)
875 #: ../source/book.xml:930
876 msgid "Each file and directory has a set of properties—keys and their values—associated with it. You can create and store any arbitrary key/value pairs you wish. Properties are versioned over time, just like file contents."
877 msgstr "每一个文件和目录都有自己的一组属性—键和它们的值。可以根据需要建立并存储任何键/值对。和文件本身的内容一样,属性也在版本控制之下。"
879 #. (term)
880 #: ../source/book.xml:938
881 msgid "Choice of network layers"
882 msgstr "可选的网络层"
884 #. (para)
885 #: ../source/book.xml:940
886 msgid "Subversion has an abstracted notion of repository access, making it easy for people to implement new network mechanisms. Subversion can plug into the Apache HTTP Server as an extension module. This gives Subversion a big advantage in stability and interoperability, and instant access to existing features provided by that server—authentication, authorization, wire compression, and so on. A more lightweight, standalone Subversion server process is also available. This server speaks a custom protocol which can be easily tunneled over SSH."
887 msgstr "Subversion在版本库访问的实现上具有较高的抽象程度,利于人们实现新的网络访问机制。Subversion可以作为一个扩展模块嵌入到Apache之中。这种方式在稳定性和交互性方面有很大的优势,可以直接使用服务器的成熟技术—认证、授权和传输压缩等。此外,Subversion自身也实现了一个轻型的,可独立运行的服务器软件。这个服务器使用了一个自定义协议,可以轻松的用SSH封装。"
889 #. (term)
890 #: ../source/book.xml:954
891 msgid "Consistent data handling"
892 msgstr "一致的数据操作"
894 #. (para)
895 #: ../source/book.xml:956
896 msgid "Subversion expresses file differences using a binary differencing algorithm, which works identically on both text (human-readable) and binary (human-unreadable) files. Both types of files are stored equally compressed in the repository, and differences are transmitted in both directions across the network."
897 msgstr "Subversion用一个二进制差异算法描述文件的变化,对于文本(可读)和二进制(不可读)文件其操作方式是一致的。这两种类型的文件压缩存储在版本库中,而差异信息则在网络上双向传递。"
899 #. (term)
900 #: ../source/book.xml:965
901 msgid "Efficient branching and tagging"
902 msgstr "高效的分支和标签操作"
904 #. (para)
905 #: ../source/book.xml:967
906 msgid "The cost of branching and tagging need not be proportional to the project size. Subversion creates branches and tags by simply copying the project, using a mechanism similar to a hard-link. Thus these operations take only a very small, constant amount of time."
907 msgstr "在Subversion中,分支与标签操作的开销与工程的大小无关。Subversion的分支和标签操作用只是一种类似于硬链接的机制拷贝整个工程。因而这些操作通常只会花费很少且相对固定的时间。"
909 #. (term)
910 #: ../source/book.xml:976
911 msgid "Hackability"
912 msgstr "可修改性"
914 #. (para)
915 #: ../source/book.xml:978
916 msgid "Subversion has no historical baggage; it is implemented as a collection of shared C libraries with well-defined APIs. This makes Subversion extremely maintainable and usable by other applications and languages."
917 msgstr "Subversion没有历史负担,它以一系列优质的共享C程序库的方式实现,具有定义良好的API。这使得Subversion非常容易维护,和其它语言的互操作性很强。"
919 #. (title)
920 #: ../source/book.xml:990 ../source/book.xml:997
921 msgid "Subversion's Architecture"
922 msgstr "Subversion 的架构"
924 #. (para)
925 #: ../source/book.xml:992
926 msgid "<xref linkend=\"svn.intro.architecture.dia-1\"/> illustrates a <quote>mile-high</quote> view of Subversion's design."
927 msgstr "<xref linkend=\"svn.intro.architecture.dia-1\"/>给出了Subversion设计总体上的<quote>俯视图</quote>。"
929 #. (para)
930 #: ../source/book.xml:1005
931 msgid "On one end is a Subversion repository that holds all of your versioned data. On the other end is your Subversion client program, which manages local reflections of portions of that versioned data (called <quote>working copies</quote>). Between these extremes are multiple routes through various Repository Access (RA) layers. Some of these routes go across computer networks and through network servers which then access the repository. Others bypass the network altogether and access the repository directly."
932 msgstr "图中的一端是保存所有版本数据的Subversion版本库,另一端是Subvesion的客户程序,管理着所有版本数据的本地影射(称为<quote>工作拷贝</quote>),在这两极之间是各种各样的版本库访问(RA)层,某些使用电脑网络通过网络服务器访问版本库,某些则绕过网络服务器直接访问版本库。"
934 #. (title)
935 #: ../source/book.xml:1018
936 msgid "Subversion's Components"
937 msgstr "Subversion 的组件"
939 #. (para)
940 #: ../source/book.xml:1020
941 msgid "Subversion, once installed, has a number of different pieces. The following is a quick overview of what you get. Don't be alarmed if the brief descriptions leave you scratching your head—there are <emphasis>plenty</emphasis> more pages in this book devoted to alleviating that confusion."
942 msgstr "安装好的Subversion由几个部分组成,本节将简单的介绍一下这些组件。下文的描述或许过于简略,不易理解,但不用担心,本书后面的章节中会用<emphasis>更多的</emphasis>内容来详细阐述这些组件。"
944 #. (term), (primary)
945 #: ../source/book.xml:1027 ../source/book.xml:17467 ../source/book.xml:17570
946 #: ../source/book.xml:17674 ../source/book.xml:17759 ../source/book.xml:17890
947 #: ../source/book.xml:17966 ../source/book.xml:18094 ../source/book.xml:18273
948 #: ../source/book.xml:18383 ../source/book.xml:18636 ../source/book.xml:18748
949 #: ../source/book.xml:18801 ../source/book.xml:18905 ../source/book.xml:19106
950 #: ../source/book.xml:19224 ../source/book.xml:19318 ../source/book.xml:19542
951 #: ../source/book.xml:19664 ../source/book.xml:19749 ../source/book.xml:19869
952 #: ../source/book.xml:19948 ../source/book.xml:20027 ../source/book.xml:20108
953 #: ../source/book.xml:20196 ../source/book.xml:20321 ../source/book.xml:20410
954 #: ../source/book.xml:20516 ../source/book.xml:20861 ../source/book.xml:21023
955 #: ../source/book.xml:21110
956 msgid "svn"
957 msgstr "svn"
959 #. (para)
960 #: ../source/book.xml:1029
961 msgid "The command-line client program."
962 msgstr "命令行客户端程序。"
964 #. (term), (command), (primary), (refname)
965 #: ../source/book.xml:1033 ../source/book.xml:23597 ../source/book.xml:23602
966 #: ../source/book.xml:23605
967 msgid "svnversion"
968 msgstr "svnversion"
970 #. (para)
971 #: ../source/book.xml:1035
972 msgid "A program for reporting the state (in terms of revisions of the items present) of a working copy."
973 msgstr "此工具用来显示工作拷贝的状态(用术语来说,就是当前项目的修订版本)。"
975 #. (term), (title), (command), (primary)
976 #: ../source/book.xml:1040 ../source/book.xml:10192 ../source/book.xml:22193
977 #: ../source/book.xml:22291 ../source/book.xml:22335 ../source/book.xml:22390
978 #: ../source/book.xml:22480 ../source/book.xml:22524 ../source/book.xml:22593
979 #: ../source/book.xml:22638 ../source/book.xml:22670 ../source/book.xml:22733
980 #: ../source/book.xml:22781 ../source/book.xml:22830 ../source/book.xml:22874
981 #: ../source/book.xml:22927 ../source/book.xml:22989 ../source/book.xml:23042
982 #: ../source/book.xml:23080
983 msgid "svnlook"
984 msgstr "svnlook"
986 #. (para)
987 #: ../source/book.xml:1042
988 msgid "A tool for directly inspecting a Subversion repository."
989 msgstr "直接查看Subversion版本库的工具。"
991 #. (term), (title), (command), (primary)
992 #: ../source/book.xml:1046 ../source/book.xml:10162 ../source/book.xml:21254
993 #: ../source/book.xml:21404 ../source/book.xml:21472 ../source/book.xml:21511
994 #: ../source/book.xml:21614 ../source/book.xml:21647 ../source/book.xml:21693
995 #: ../source/book.xml:21725 ../source/book.xml:21771 ../source/book.xml:21834
996 #: ../source/book.xml:21880 ../source/book.xml:21918 ../source/book.xml:21995
997 #: ../source/book.xml:22039 ../source/book.xml:22087 ../source/book.xml:22144
998 msgid "svnadmin"
999 msgstr "svnadmin"
1001 #. (para)
1002 #: ../source/book.xml:1048
1003 msgid "A tool for creating, tweaking or repairing a Subversion repository."
1004 msgstr "建立、调整和修复Subversion版本库的工具。"
1006 #. (term), (title)
1007 #: ../source/book.xml:1053 ../source/book.xml:10304
1008 msgid "svndumpfilter"
1009 msgstr "svndumpfilter"
1011 #. (para)
1012 #: ../source/book.xml:1055
1013 msgid "A program for filtering Subversion repository dump streams."
1014 msgstr "过滤Subversion版本库转储数据流的工具。"
1016 #. (term), (command), (literal)
1017 #: ../source/book.xml:1060 ../source/book.xml:15819 ../source/book.xml:23734
1018 #: ../source/book.xml:23739
1019 msgid "mod_dav_svn"
1020 msgstr "mod_dav_svn"
1022 #. (para)
1023 #: ../source/book.xml:1062
1024 msgid "A plug-in module for the Apache HTTP Server, used to make your repository available to others over a network."
1025 msgstr "Apache HTTP服务器的一个插件,使版本库可以通过网络访问。"
1027 #. (term), (literal), (entry), (command)
1028 #: ../source/book.xml:1068 ../source/book.xml:1643 ../source/book.xml:11970
1029 #: ../source/book.xml:23435
1030 msgid "svnserve"
1031 msgstr "svnserve"
1033 #. (para)
1034 #: ../source/book.xml:1070
1035 msgid "A custom standalone server program, runnable as a daemon process or invokable by SSH; another way to make your repository available to others over a network."
1036 msgstr "一个单独运行的服务器程序,可以作为守护进程或由SSH调用。这是另一种使版本库可以通过网络访问的方式。"
1038 #. (term), (title), (command), (primary)
1039 #: ../source/book.xml:1076 ../source/book.xml:10354 ../source/book.xml:23120
1040 #: ../source/book.xml:23219 ../source/book.xml:23285 ../source/book.xml:23356
1041 msgid "svnsync"
1042 msgstr "svnsync"
1044 #. (para)
1045 #: ../source/book.xml:1078
1046 msgid "A program for incrementally mirroring one repository to another over a network."
1047 msgstr "一个通过网络增量镜像版本库的程序。"
1049 #. (para)
1050 #: ../source/book.xml:1083
1051 msgid "Assuming you have Subversion installed correctly, you should be ready to start. The next two chapters will walk you through the use of <command>svn</command>, Subversion's command-line client program."
1052 msgstr "如果已经正确完成了Subversion的安装,我们就可以开始我们的学习之旅了。在后面的两章中,我们将讲解如何使用Subversion的客户端程序<command>svn</command>。"
1054 #. (title)
1055 #: ../source/book.xml:1097
1056 msgid "Fundamental Concepts"
1057 msgstr "基本概念"
1059 #. (para)
1060 #: ../source/book.xml:1099
1061 msgid "This chapter is a short, casual introduction to Subversion. If you're new to version control, this chapter is definitely for you. We begin with a discussion of general version control concepts, work our way into the specific ideas behind Subversion, and show some simple examples of Subversion in use."
1062 msgstr "本章主要为那些不熟悉版本控制技术的入门者提供一个简单扼要的、非系统的介绍。我们将从版本控制的基本概念开始,随后阐述Subversion的独特理念,并演示一些使用Subversion的例子。"
1064 #. (para)
1065 #: ../source/book.xml:1105
1066 msgid "Even though the examples in this chapter show people sharing collections of program source code, keep in mind that Subversion can manage any sort of file collection—it's not limited to helping computer programmers."
1067 msgstr "虽然我们在本章中以分享程序源代码作为例子,但是记住Subversion可以管理任何类型的文件集—它并非是程序员专用的。"
1069 #. (title)
1070 #: ../source/book.xml:1114
1071 msgid "The Repository"
1072 msgstr "版本库"
1074 #. (para)
1075 #: ../source/book.xml:1116
1076 msgid "Subversion is a centralized system for sharing information. At its core is a repository, which is a central store of data. The repository stores information in the form of a <firstterm>filesystem tree</firstterm>—a typical hierarchy of files and directories. Any number of <firstterm>clients</firstterm> connect to the repository, and then read or write to these files. By writing data, a client makes the information available to others; by reading data, the client receives information from others. <xref linkend=\"svn.basic.repository.dia-1\"/> illustrates this."
1077 msgstr "Subversion是一个“集中式”的信息共享系统。版本库是Subversion的核心部分,是数据的中央仓库。版本库以典型的文件和目录结构形式<firstterm>文件系统树</firstterm>来保存信息。任意数量的<firstterm>客户端</firstterm>连接到Subversion版本库,读取、修改这些文件。客户端通过写数据将信息分享给其他人,通过读取数据获取别人共享的信息。<xref linkend=\"svn.basic.repository.dia-1\"/>展示了这种系统:"
1079 #. (title)
1080 #: ../source/book.xml:1127
1081 msgid "A typical client/server system"
1082 msgstr "一个典型的客户/服务器系统"
1084 #. (para)
1085 #: ../source/book.xml:1135
1086 msgid "So why is this interesting? So far, this sounds like the definition of a typical file server. And indeed, the repository <emphasis>is</emphasis> a kind of file server, but it's not your usual breed. What makes the Subversion repository special is that <emphasis>it remembers every change</emphasis> ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories."
1087 msgstr "这有什么意义吗?说了这么多,Subversion听起来和一般的文件服务器没什么不同。事实上,Subversion的版本库的确<emphasis>是</emphasis>一种文件服务器,但不是“一般”的文件服务器。Subversion版本库的特别之处在于,<emphasis>它会记录每一次改变</emphasis>:每个文件的改变,甚至是目录树本身的改变,例如文件和目录的添加、删除和重新组织。"
1089 #. (para)
1090 #: ../source/book.xml:1143
1091 msgid "When a client reads data from the repository, it normally sees only the latest version of the filesystem tree. But the client also has the ability to view <emphasis>previous</emphasis> states of the filesystem. For example, a client can ask historical questions like, <quote>What did this directory contain last Wednesday?</quote> or <quote>Who was the last person to change this file, and what changes did he make?</quote> These are the sorts of questions that are at the heart of any <firstterm>version control system</firstterm>: systems that are designed to track changes to data over time."
1092 msgstr "一般情况下,客户端从版本库中获取的数据是文件系统树中的最新数据。但是客户端也具备查看文件系统树<emphasis>以前</emphasis>任何一个状态的能力。举个例子,客户端有时会对一些历史性问题感兴趣,比如<quote>上星期三时的目录结构是什么样的?</quote>或者<quote>谁最后一个修改了这个文件,都修改了什么?</quote>这些都是<firstterm>版本控制系统</firstterm>的核心问题:设计用来记录和跟踪数据变化的系统。"
1094 #. (title)
1095 #: ../source/book.xml:1160
1096 msgid "Versioning Models"
1097 msgstr "版本模型"
1099 #. (para)
1100 #: ../source/book.xml:1162
1101 msgid "The core mission of a version control system is to enable collaborative editing and sharing of data. But different systems use different strategies to achieve this. It's important to understand these different strategies for a couple of reasons. First, it will help you compare and contrast existing version control systems, in case you encounter other systems similar to Subversion. Beyond that, it will also help you make more effective use of Subversion, since Subversion itself supports a couple of different ways of working."
1102 msgstr "版本控制系统的核心任务是实现协作编辑和数据共享,但是不同的系统使用不同的策略实现这个目的。我们有许多理由要去理解这些策略的区别,首先,如果你遇到了其他类似Subversion的系统,可以帮助你比较现有的版本控制系统。此外,可以帮助你更有效的使用Subversion,因为Subversion本身支持不同的工作方式。"
1104 #. (title)
1105 #: ../source/book.xml:1174
1106 msgid "The Problem of File-Sharing"
1107 msgstr "文件共享的问题"
1109 #. (para)
1110 #: ../source/book.xml:1176
1111 msgid "All version control systems have to solve the same fundamental problem: how will the system allow users to share information, but prevent them from accidentally stepping on each other's feet? It's all too easy for users to accidentally overwrite each other's changes in the repository."
1112 msgstr "所有的版本控制系统都需要解决这样一个基础问题:怎样让系统允许用户共享信息,而不会让他们因意外而互相干扰?版本库里意外覆盖别人的更改非常的容易。"
1114 #. (para)
1115 #: ../source/book.xml:1182
1116 msgid "Consider the scenario shown in <xref linkend=\"svn.basic.vsn-models.problem-sharing.dia-1\"/>. Suppose we have two co-workers, Harry and Sally. They each decide to edit the same repository file at the same time. If Harry saves his changes to the repository first, then it's possible that (a few moments later) Sally could accidentally overwrite them with her own new version of the file. While Harry's version of the file won't be lost forever (because the system remembers every change), any changes Harry made <emphasis>won't</emphasis> be present in Sally's newer version of the file, because she never saw Harry's changes to begin with. Harry's work is still effectively lost—or at least missing from the latest version of the file—and probably by accident. This is definitely a situation we want to avoid!"
1117 msgstr "考虑<xref linkend=\"svn.basic.vsn-models.problem-sharing.dia-1\"/>的情景,我们有两个共同工作者,Harry和Sally,他们想同时编辑版本库里的同一个文件,如果首先Harry保存它的修改,过了一会,Sally可能凑巧用自己的版本覆盖了这些文件,Harry的更改不会永远消失(因为系统记录了每次修改),但Harry所有的修改<emphasis>不会</emphasis>出现在Sally新版本的文件中,所以Harry的工作还是丢失了—至少是从最新的版本中丢失了—而且可能是意外的,这就是我们要明确避免的情况!"
1119 #. (title)
1120 #: ../source/book.xml:1198
1121 msgid "The problem to avoid"
1122 msgstr "需要避免的问题"
1124 #. (title)
1125 #: ../source/book.xml:1210
1126 msgid "The Lock-Modify-Unlock Solution"
1127 msgstr "锁定-修改-解锁 方案"
1129 #. (para)
1130 #: ../source/book.xml:1212
1131 msgid "Many version control systems use a <firstterm>lock-modify-unlock</firstterm> model to address the problem of many authors clobbering each other's work. In this model, the repository allows only one person to change a file at a time. This exclusivity policy is managed using locks. Harry must <quote>lock</quote> a file before he can begin making changes to it. If Harry has locked a file, then Sally cannot also lock it, and therefore cannot make any changes to that file. All she can do is read the file, and wait for Harry to finish his changes and release his lock. After Harry unlocks the file, Sally can take her turn by locking and editing the file. <xref linkend=\"svn.basic.vsn-models.lock-unlock.dia-1\"/> demonstrates this simple solution."
1132 msgstr "许多版本控制系统使用<firstterm>锁定-修改-解锁</firstterm>机制解决这种问题,在这样的模型里,在一个时间段里版本库的一个文件只允许被一个人修改。首先在修改之前,Harry要<quote>锁定</quote>住这个文件,锁定很像是从图书馆借一本书,如果Harry锁住这个文件,Sally不能做任何修改,如果Sally想请求得到一个锁,版本库会拒绝这个请求。在Harry结束编辑并且放开这个锁之前,她只可以阅读文件。Harry解锁后,就要换班了,Sally得到自己的轮换位置,锁定并且开始编辑这个文件。<xref linkend=\"svn.basic.vsn-models.lock-unlock.dia-1\"/>描述了这样的解决方案。"
1134 #. (title)
1135 #: ../source/book.xml:1227
1136 msgid "The lock-modify-unlock solution"
1137 msgstr "锁定-修改-解锁 方案"
1139 #. (para)
1140 #: ../source/book.xml:1235
1141 msgid "The problem with the lock-modify-unlock model is that it's a bit restrictive, and often becomes a roadblock for users:"
1142 msgstr "锁定-修改-解锁模型有一点问题就是限制太多,经常会成为用户的障碍:"
1144 #. (para)
1145 #: ../source/book.xml:1240
1146 msgid "<emphasis>Locking may cause administrative problems.</emphasis> Sometimes Harry will lock a file and then forget about it. Meanwhile, because Sally is still waiting to edit the file, her hands are tied. And then Harry goes on vacation. Now Sally has to get an administrator to release Harry's lock. The situation ends up causing a lot of unnecessary delay and wasted time."
1147 msgstr "<emphasis>锁定可能导致管理问题。</emphasis>有时候Harry会锁住文件然后忘了此事,这就是说Sally一直等待解锁来编辑这些文件,她在这里僵住了。然后Harry去旅行了,现在Sally只好去找管理员放开锁,这种情况会导致不必要的耽搁和时间浪费。"
1149 #. (para)
1150 #: ../source/book.xml:1251
1151 msgid "<emphasis>Locking may cause unnecessary serialization.</emphasis> What if Harry is editing the beginning of a text file, and Sally simply wants to edit the end of the same file? These changes don't overlap at all. They could easily edit the file simultaneously, and no great harm would come, assuming the changes were properly merged together. There's no need for them to take turns in this situation."
1152 msgstr "<emphasis>锁定可能导致不必要的线性化开发。</emphasis>如果Harry编辑一个文件的开始,Sally想编辑同一个文件的结尾,这种修改不会冲突,设想修改可以正确的合并到一起,他们可以轻松的并行工作而没有太多的坏处,没有必要让他们轮流工作。"
1154 #. (para)
1155 #: ../source/book.xml:1263
1156 msgid "<emphasis>Locking may create a false sense of security.</emphasis> Suppose Harry locks and edits file A, while Sally simultaneously locks and edits file B. But what if A and B depend on one another, and the changes made to each are semantically incompatible? Suddenly A and B don't work together anymore. The locking system was powerless to prevent the problem—yet it somehow provided a false sense of security. It's easy for Harry and Sally to imagine that by locking files, each is beginning a safe, insulated task, and thus not bother discussing their incompatible changes early on. Locking often becomes a substitute for real communication."
1157 msgstr "<emphasis>锁定可能导致错误的安全状态。</emphasis>假设Harry锁定和编辑一个文件A,同时Sally锁定并编辑文件B,如果A和B互相依赖,这种变化是必须同时作的,这样A和B不能正确的工作了,锁定机制对防止此类问题将无能为力—从而产生了一种处于安全状态的假相。很容易想象Harry和Sally都以为自己锁住了文件,而且从一个安全,孤立的情况开始工作,因而没有尽早发现他们不匹配的修改。锁定经常成为真正交流的替代品"
1159 #. (title)
1160 #: ../source/book.xml:1283
1161 msgid "The Copy-Modify-Merge Solution"
1162 msgstr "拷贝-修改-合并 方案"
1164 #. (para)
1165 #: ../source/book.xml:1285
1166 msgid "Subversion, CVS, and many other version control systems use a <firstterm>copy-modify-merge</firstterm> model as an alternative to locking. In this model, each user's client contacts the project repository and creates a personal <firstterm>working copy</firstterm>—a local reflection of the repository's files and directories. Users then work simultaneously and independently, modifying their private copies. Finally, the private copies are merged together into a new, final version. The version control system often assists with the merging, but ultimately a human being is responsible for making it happen correctly."
1167 msgstr "Subversion,CVS和一些版本控制系统使用<firstterm>拷贝-修改-合并</firstterm>模型,在这种模型里,每一个客户联系项目版本库建立一个个人<firstterm>工作拷贝</firstterm>—版本库中文件和目录的本地映射。用户并行工作,修改各自的工作拷贝,最终,各个私有的拷贝合并在一起,成为最终的版本,这种系统通常可以辅助合并操作,但是最终要靠人工去确定正误。"
1169 #. (para)
1170 #: ../source/book.xml:1296
1171 msgid "Here's an example. Say that Harry and Sally each create working copies of the same project, copied from the repository. They work concurrently, and make changes to the same file A within their copies. Sally saves her changes to the repository first. When Harry attempts to save his changes later, the repository informs him that his file A is <firstterm>out-of-date</firstterm>. In other words, that file A in the repository has somehow changed since he last copied it. So Harry asks his client to <firstterm>merge</firstterm> any new changes from the repository into his working copy of file A. Chances are that Sally's changes don't overlap with his own; so once he has both sets of changes integrated, he saves his working copy back to the repository. <xref linkend=\"svn.basic.vsn-models.copy-merge.dia-1\"/> and <xref linkend=\"svn.basic.vsn-models.copy-merge.dia-2\"/> show this process."
1172 msgstr "这是一个例子,Harry和Sally为同一个项目各自建立了一个工作拷贝,工作是并行的,修改了同一个文件A,Sally首先保存修改到版本库,当Harry想去提交修改的时候,版本库提示文件A已经<firstterm>过期</firstterm>,换句话说,A在他上次更新之后已经更改了,所以当他通过客户端请求<firstterm>合并</firstterm>版本库和他的工作拷贝之后,碰巧Sally的修改和他的不冲突,所以一旦他把所有的修改集成到一起,他可以将工作拷贝保存到版本库,<xref linkend=\"svn.basic.vsn-models.copy-merge.dia-1\"/>和<xref linkend=\"svn.basic.vsn-models.copy-merge.dia-2\"/>展示了这一过程。"
1174 #. (title)
1175 #: ../source/book.xml:1312
1176 msgid "The copy-modify-merge solution"
1177 msgstr "拷贝-修改-合并 方案"
1179 #. (title)
1180 #: ../source/book.xml:1322
1181 msgid "The copy-modify-merge solution (continued)"
1182 msgstr "拷贝-修改-合并 方案(续)"
1184 #. (para)
1185 #: ../source/book.xml:1330
1186 msgid "But what if Sally's changes <emphasis>do</emphasis> overlap with Harry's changes? What then? This situation is called a <firstterm>conflict</firstterm>, and it's usually not much of a problem. When Harry asks his client to merge the latest repository changes into his working copy, his copy of file A is somehow flagged as being in a state of conflict: he'll be able to see both sets of conflicting changes, and manually choose between them. Note that software can't automatically resolve conflicts; only humans are capable of understanding and making the necessary intelligent choices. Once Harry has manually resolved the overlapping changes—perhaps after a discussion with Sally—he can safely save the merged file back to the repository."
1187 msgstr "但是如果Sally和Harry的修改<emphasis>交迭</emphasis>了该怎么办?这种情况叫做<firstterm>冲突</firstterm>,这通常不是个大问题,当Harry告诉他的客户端去合并版本库的最新修改到自己的工作拷贝时,他的文件A就会处于冲突状态:他可以看到一对冲突的修改集,并手工的选择保留一组修改。需要注意的是软件不能自动的解决冲突,只有人可以理解并作出智能的选择,一旦Harry手工的解决了冲突—也许需要与Sally讨论—它可以安全的把合并的文件保存到版本库。"
1189 #. (para)
1190 #: ../source/book.xml:1343
1191 msgid "The copy-modify-merge model may sound a bit chaotic, but in practice, it runs extremely smoothly. Users can work in parallel, never waiting for one another. When they work on the same files, it turns out that most of their concurrent changes don't overlap at all; conflicts are infrequent. And the amount of time it takes to resolve conflicts is usually far less than the time lost by a locking system."
1192 msgstr "拷贝-修改-合并模型感觉有一点混乱,但在实践中,通常运行的很平稳,用户可以并行的工作,不必等待别人,当工作在同一个文件上时,也很少会有交迭发生,冲突并不频繁,处理冲突的时间远比等待解锁花费的时间少。"
1194 #. (para)
1195 #: ../source/book.xml:1350
1196 msgid "In the end, it all comes down to one critical factor: user communication. When users communicate poorly, both syntactic and semantic conflicts increase. No system can force users to communicate perfectly, and no system can detect semantic conflicts. So there's no point in being lulled into a false sense of security that a locking system will somehow prevent conflicts; in practice, locking seems to inhibit productivity more than anything else."
1197 msgstr "最后,一切都要归结到一条重要的因素:用户交流。当用户交流贫乏,语法和语义的冲突就会增加,没有系统可以强制用户完美的交流,没有系统可以检测语义上的冲突,所以没有任何证据能够承诺锁定系统可以防止冲突,实践中,锁定除了约束了生产力,并没有做什么事。"
1199 #. (title)
1200 #: ../source/book.xml:1360
1201 msgid "When Locking is Necessary"
1202 msgstr "什么时候锁定是必需的"
1204 #. (para)
1205 #: ../source/book.xml:1362
1206 msgid "While the lock-modify-unlock model is considered generally harmful to collaboration, there are still times when locking is appropriate."
1207 msgstr "锁定-修改-解锁模型被认为不利于协作,但有时候锁定会更好。"
1209 #. (para)
1210 #: ../source/book.xml:1365
1211 msgid "The copy-modify-merge model is based on the assumption that files are contextually mergeable: that is, that the majority of the files in the repository are line-based text files (such as program source code). But for files with binary formats, such as artwork or sound, it's often impossible to merge conflicting changes. In these situations, it really is necessary to users to take strict turns when changing the file. Without serialized access, somebody ends up wasting time on changes that are ultimately discarded."
1212 msgstr "拷贝-修改-合并模型假定文件是可以根据上下文合并的:就是版本库的文件主要是以行为基础的文本文件(例如程序源代码)。但对于二进制格式,例如艺术品或声音,在这种情况下,十分有必要让用户轮流修改文件,如果没有线性的访问,有些人的许多工作就最终要被放弃。"
1214 #. (para)
1215 #: ../source/book.xml:1375
1216 msgid "While Subversion is still primarily a copy-modify-merge system, it still recognizes the need to lock an occasional file and thus provide mechanisms for this. This feature is discussed later in this book, in <xref linkend=\"svn.advanced.locking\"/>."
1217 msgstr "尽管Subversion一直主要是一个拷贝-修改-合并系统,但是它也意识到了需要锁定一些文件,并且提供这种锁定机制,这个特性的讨论可以见<xref linkend=\"svn.advanced.locking\"/>。"
1219 #. (title)
1220 #: ../source/book.xml:1389
1221 msgid "Subversion in Action"
1222 msgstr "Subversion实践"
1224 #. (para)
1225 #: ../source/book.xml:1391
1226 msgid "It's time to move from the abstract to the concrete. In this section, we'll show real examples of Subversion being used."
1227 msgstr "是时候从抽象转到具体了,在本小节,我们会展示一个Subversion真实使用的例子。"
1229 #. (title)
1230 #: ../source/book.xml:1397
1231 msgid "Subversion Repository URLs"
1232 msgstr "Subversion版本库URL"
1234 #. (para)
1235 #: ../source/book.xml:1399
1236 msgid "Throughout this book, Subversion uses URLs to identify versioned files and directories in Subversion repositories. For the most part, these URLs use the standard syntax, allowing for server names and port numbers to be specified as part of the URL:"
1237 msgstr "正如我们在整本书里描述的,Subversion使用URL来识别Subversion版本库中的版本化资源,通常情况下,这些URL使用标准的语法,允许服务器名称和端口作为URL的一部分:"
1239 #. (screen)
1240 #: ../source/book.xml:1404
1241 #, no-wrap
1242 msgid ""
1243 "\n"
1244 "$ svn checkout http://svn.example.com:9834/repos\n"
1245 "…\n"
1246 msgstr ""
1247 "\n"
1248 "$ svn checkout http://svn.example.com:9834/repos\n"
1249 "…\n"
1251 #. (para)
1252 #: ../source/book.xml:1408
1253 msgid "But there are some nuances in Subversion's handling of URLs that are notable. For example, URLs containing the <literal>file://</literal> access method (used for local repositories) must, in accordance with convention, have either a server name of <literal>localhost</literal> or no server name at all:"
1254 msgstr "但是Subversion处理URL的一些细微的不同之处需要注意,例如,使用<literal>file:</literal>访问方法的URL(用来访问本地版本库)必须与习惯一致,可以包括一个<literal>localhost</literal>服务器名或者没有服务器名:"
1256 #. (screen)
1257 #: ../source/book.xml:1414
1258 #, fuzzy, no-wrap
1259 msgid ""
1260 "\n"
1261 "$ svn checkout file:///var/svn/repos\n"
1262 "…\n"
1263 "$ svn checkout file://localhost/var/svn/repos\n"
1264 "…\n"
1265 msgstr ""
1266 "\n"
1267 "$ svn checkout file:///path/to/repos\n"
1268 "…\n"
1269 "$ svn checkout file://localhost/path/to/repos\n"
1270 "…\n"
1272 #. (para)
1273 #: ../source/book.xml:1420
1274 msgid "Also, users of the <literal>file://</literal> scheme on Windows platforms will need to use an unofficially <quote>standard</quote> syntax for accessing repositories that are on the same machine, but on a different drive than the client's current working drive. Either of the two following URL path syntaxes will work where <literal>X</literal> is the drive on which the repository resides:"
1275 msgstr "同样,在Windows平台下使用<literal>file://</literal>模式时需要使用一个非正式的<quote>标准</quote>语法来访问本机上不在同一个磁盘分区中的版本库。下面的任意一个URL路径语法都可以工作,其中的<literal>X</literal>表示版本库所在的磁盘分区:"
1277 #. (screen)
1278 #: ../source/book.xml:1428
1279 #, fuzzy, no-wrap
1280 msgid ""
1281 "\n"
1282 "C:\\&gt; svn checkout file:///X:/var/svn/repos\n"
1283 "…\n"
1284 "C:\\&gt; svn checkout \"file:///X|/var/svn/repos\"\n"
1285 "…\n"
1286 msgstr ""
1287 "\n"
1288 "C:\\&gt; svn checkout file:///X:/path/to/repos\n"
1289 "…\n"
1290 "C:\\&gt; svn checkout \"file:///X|/path/to/repos\"\n"
1291 "…\n"
1293 #. (para)
1294 #: ../source/book.xml:1434
1295 msgid "In the second syntax, you need to quote the URL so that the vertical bar character is not interpreted as a pipe. Also, note that a URL uses forward slashes even though the native (non-URL) form of a path on Windows uses backslashes."
1296 msgstr "在第二个语法里,你需要使用引号包含整个URL,这样竖线字符才不会被解释为管道。当然,也要注意URL使用普通的斜线而不是Windows本地(不是URL)的反斜线。"
1298 #. (para)
1299 #: ../source/book.xml:1439
1300 msgid "Subversion's <literal>file://</literal> URLs cannot be used in a regular web browser the way typical <literal>file://</literal> URLs can. When you attempt to view a <literal>file://</literal> URL in a regular web browser, it reads and displays the contents of the file at that location by examining the filesystem directly. However, Subversion's resources exist in a virtual filesystem (see <xref linkend=\"svn.developer.layerlib.repos\"/>), and your browser will not understand how to interact with that filesystem."
1301 msgstr "也必须意识到Subversion的<literal>file:</literal> URL不能在普通的web服务器中工作。当你尝试在web服务器查看一个<literal>file:</literal>的URL时,它会通过直接检测文件系统读取和显示那个位置的文件内容,但是Subversion的资源存在于虚拟文件系统(见<xref linkend=\"svn.developer.layerlib.repos\"/>)中,你的浏览器不会理解怎样读取这个文件系统。"
1303 #. (para)
1304 #: ../source/book.xml:1449
1305 msgid "Finally, it should be noted that the Subversion client will automatically encode URLs as necessary, just like a web browser does. For example, if a URL contains a space or upper-ASCII character:"
1306 msgstr "最后,必须注意Subversion的客户端会根据需要自动编码URL,这一点和一般的web浏览器一样,举个例子,如果一个URL包含了空格或是一个字符编码大于128的ASCII字符:"
1308 #. (screen)
1309 #: ../source/book.xml:1453
1310 #, no-wrap
1311 msgid ""
1312 "\n"
1313 "$ svn checkout \"http://host/path with space/project/españa\"\n"
1314 msgstr ""
1315 "\n"
1316 "$ svn checkout \"http://host/path with space/project/españa\"\n"
1318 #. (para)
1319 #: ../source/book.xml:1456
1320 msgid "…then Subversion will escape the unsafe characters and behave as if you had typed:"
1321 msgstr "…Subversion会回避这些不安全字符,并且会像你输入了这些字符一样工作:"
1323 #. (screen)
1324 #: ../source/book.xml:1458
1325 #, no-wrap
1326 msgid ""
1327 "\n"
1328 "$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a\n"
1329 msgstr ""
1330 "\n"
1331 "$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a\n"
1333 #. (para)
1334 #: ../source/book.xml:1461
1335 msgid "If the URL contains spaces, be sure to place it within quote marks, so that your shell treats the whole thing as a single argument to the <command>svn</command> program."
1336 msgstr "如果URL包含空格,一定要使用引号,这样你的脚本才会把它做一个单独的<command>svn</command>参数。"
1338 #. (title)
1339 #: ../source/book.xml:1468
1340 msgid "Working Copies"
1341 msgstr "工作拷贝"
1343 #. (para)
1344 #: ../source/book.xml:1470
1345 msgid "You've already read about working copies; now we'll demonstrate how the Subversion client creates and uses them."
1346 msgstr "你已经阅读过了关于工作拷贝的内容;现在我们要讲一讲客户端怎样建立和使用它。"
1348 #. (para)
1349 #: ../source/book.xml:1473
1350 msgid "A Subversion working copy is an ordinary directory tree on your local system, containing a collection of files. You can edit these files however you wish, and if they're source code files, you can compile your program from them in the usual way. Your working copy is your own private work area: Subversion will never incorporate other people's changes, nor make your own changes available to others, until you explicitly tell it to do so. You can even have multiple working copies of the same project."
1351 msgstr "一个Subversion工作拷贝是你本地机器上的一个普通目录,保存着一些文件,你可以任意的编辑文件,而且如果是源代码文件,你可以像平常一样编译,你的工作拷贝是你的私有工作区,在你明确的做了特定操作之前,Subversion不会把你的修改与其他人的合并,也不会把你的修改展示给别人,你甚至可以拥有同一个项目的多个工作拷贝。"
1353 #. (para)
1354 #: ../source/book.xml:1482
1355 msgid "After you've made some changes to the files in your working copy and verified that they work properly, Subversion provides you with commands to <quote>publish</quote> your changes to the other people working with you on your project (by writing to the repository). If other people publish their own changes, Subversion provides you with commands to merge those changes into your working directory (by reading from the repository)."
1356 msgstr "当你在工作拷贝作了一些修改并且确认它们工作正常之后,Subversion提供了一个命令可以<quote>发布</quote>你的修改给项目中的其他人(通过写到版本库),如果别人发布了各自的修改,Subversion提供了手段可以把这些修改与你的工作目录进行合并(通过读取版本库)。"
1358 #. (para)
1359 #: ../source/book.xml:1490
1360 #, fuzzy
1361 msgid "A working copy also contains some extra files, created and maintained by Subversion, to help it carry out these commands. In particular, each directory in your working copy contains a subdirectory named <filename>.svn</filename>, also known as the working copy <firstterm>administrative directory</firstterm>. The files in each administrative directory help Subversion recognize which files contain unpublished changes, and which files are out-of-date with respect to others' work."
1362 msgstr "一个工作拷贝也包括一些由Subversion创建并维护的额外文件,用来协助执行这些命令。通常情况下,你的工作拷贝的每一个文件夹都有一个以<filename>.svn</filename>为名的文件夹,也被叫做工作拷贝<firstterm>管理目录</firstterm>,这个目录里的文件能够帮助Subversion识别哪一个文件做过修改,哪一个文件相对于别人的工作已经过期。"
1364 #. (para)
1365 #: ../source/book.xml:1499
1366 msgid "A typical Subversion repository often holds the files (or source code) for several projects; usually, each project is a subdirectory in the repository's filesystem tree. In this arrangement, a user's working copy will usually correspond to a particular subtree of the repository."
1367 msgstr "一个典型的Subversion的版本库经常包含许多项目的文件(或者说源代码),通常每一个项目都是版本库的子目录,在这种布局下,一个用户的工作拷贝往往对应版本库的的一个子目录。"
1369 #. (para)
1370 #: ../source/book.xml:1504
1371 msgid "For example, suppose you have a repository that contains two software projects, <literal>paint</literal> and <literal>calc</literal>. Each project lives in its own top-level subdirectory, as shown in <xref linkend=\"svn.basic.in-action.wc.dia-1\"/>."
1372 msgstr "举一个例子,你的版本库包含两个软件项目,<literal>paint</literal>和<literal>calc</literal>。每个项目在它们各自的顶级子目录下,见<xref linkend=\"svn.basic.in-action.wc.dia-1\"/>。"
1374 #. (title)
1375 #: ../source/book.xml:1510
1376 msgid "The repository's filesystem"
1377 msgstr "版本库的文件系统"
1379 #. (para)
1380 #: ../source/book.xml:1518
1381 msgid "To get a working copy, you must <firstterm>check out</firstterm> some subtree of the repository. (The term <quote>check out</quote> may sound like it has something to do with locking or reserving resources, but it doesn't; it simply creates a private copy of the project for you.) For example, if you check out <filename>/calc</filename>, you will get a working copy like this:"
1382 msgstr "为了得到一个工作拷贝,你必须<firstterm>检出</firstterm>(<firstterm>check out</firstterm>)版本库的一个子树,(术语<quote>check out</quote>听起来像是锁定或者保留资源,实际上不是,只是简单的得到一个项目的私有拷贝),举个例子,你检出 <filename>/calc</filename>,你可以得到这样的工作拷贝:"
1384 #. (screen)
1385 #: ../source/book.xml:1525
1386 #, no-wrap
1387 msgid ""
1388 "\n"
1389 "$ svn checkout http://svn.example.com/repos/calc\n"
1390 "A    calc/Makefile\n"
1391 "A    calc/integer.c\n"
1392 "A    calc/button.c\n"
1393 "Checked out revision 56.\n"
1394 "\n"
1395 "$ ls -A calc\n"
1396 "Makefile  integer.c  button.c  .svn/\n"
1397 msgstr ""
1398 "\n"
1399 "$ svn checkout http://svn.example.com/repos/calc\n"
1400 "A    calc/Makefile\n"
1401 "A    calc/integer.c\n"
1402 "A    calc/button.c\n"
1403 "Checked out revision 56.\n"
1404 "\n"
1405 "$ ls -A calc\n"
1406 "Makefile  integer.c  button.c  .svn/\n"
1408 #. (para)
1409 #: ../source/book.xml:1535
1410 msgid "The list of letter A's in the left margin indicates that Subversion is adding a number of items to your working copy. You now have a personal copy of the repository's <filename>/calc</filename> directory, with one additional entry—<filename>.svn</filename>—which holds the extra information needed by Subversion, as mentioned earlier."
1411 msgstr "列表中的A表示Subversion增加了一些条目到工作拷贝,你现在有了一个<filename>/calc</filename>的个人拷贝,有一个附加的目录—<filename>.svn</filename>—保存着前面提及的Subversion需要的额外信息。"
1413 #. (para)
1414 #: ../source/book.xml:1542
1415 msgid "Suppose you make changes to <filename>button.c</filename>. Since the <filename>.svn</filename> directory remembers the file's original modification date and contents, Subversion can tell that you've changed the file. However, Subversion does not make your changes public until you explicitly tell it to. The act of publishing your changes is more commonly known as <firstterm>committing</firstterm> (or <firstterm>checking in</firstterm>) changes to the repository."
1416 msgstr "假定你修改了<filename>button.c</filename>,因为<filename>.svn</filename>目录记录着文件的修改日期和原始内容,Subversion可以告诉你已经修改了文件,然而,在你明确告诉它之前,Subversion不会将你的改变公开,将改变公开的操作被叫做提交(<firstterm>committing</firstterm>,或者是<firstterm>checking in</firstterm>)修改到版本库。"
1418 #. (para)
1419 #: ../source/book.xml:1550
1420 msgid "To publish your changes to others, you can use Subversion's <command>commit</command> command."
1421 msgstr "将你的修改发布给别人,你可以使用Subversion的提交(<command>commit</command>)命令。"
1423 #. (screen)
1424 #: ../source/book.xml:1552
1425 #, no-wrap
1426 msgid ""
1427 "\n"
1428 "$ svn commit button.c -m \"Fixed a typo in button.c.\"\n"
1429 "Sending        button.c\n"
1430 "Transmitting file data .\n"
1431 "Committed revision 57.\n"
1432 msgstr ""
1433 "\n"
1434 "$ svn commit button.c -m \"Fixed a typo in button.c.\"\n"
1435 "Sending        button.c\n"
1436 "Transmitting file data .\n"
1437 "Committed revision 57.\n"
1439 #. (para)
1440 #: ../source/book.xml:1558
1441 msgid "Now your changes to <filename>button.c</filename> have been committed to the repository, with a note describing your change (namely, that you fixed a typo). If another user checks out a working copy of <filename>/calc</filename>, they will see your changes in the latest version of the file."
1442 msgstr "这时你对<filename>button.c</filename>的修改已经提交到了版本库,其中包含了关于此次提交的日志信息(例如是修改了拼写错误)。如果其他人取出了<filename>/calc</filename>的一个工作拷贝,他们会看到这个文件最新的版本。"
1444 #. (para)
1445 #: ../source/book.xml:1564
1446 msgid "Suppose you have a collaborator, Sally, who checked out a working copy of <filename>/calc</filename> at the same time you did. When you commit your change to <filename>button.c</filename>, Sally's working copy is left unchanged; Subversion only modifies working copies at the user's request."
1447 msgstr "假设你有个合作者,Sally,她和你同时取出了<filename>/calc</filename>的一个工作拷贝,你提交了你对<filename>button.c</filename>的修改,Sally的工作拷贝并没有改变,Subversion只在用户要求的时候才改变工作拷贝。"
1449 #. (para)
1450 #: ../source/book.xml:1570
1451 msgid "To bring her project up to date, Sally can ask Subversion to <firstterm>update</firstterm> her working copy, by using the Subversion <command>update</command> command. This will incorporate your changes into her working copy, as well as any others that have been committed since she checked it out."
1452 msgstr "要使项目最新,Sally可以要求Subversion<firstterm>更新</firstterm>她的工作备份,通过使用更新(<command>update</command>)命令,将结合你和所有其他人在她上次更新之后的改变到她的工作拷贝。"
1454 #. (screen)
1455 #: ../source/book.xml:1576
1456 #, no-wrap
1457 msgid ""
1458 "\n"
1459 "$ pwd\n"
1460 "/home/sally/calc\n"
1461 "\n"
1462 "$ ls -A \n"
1463 ".svn/ Makefile integer.c button.c\n"
1464 "\n"
1465 "$ svn update\n"
1466 "U    button.c\n"
1467 "Updated to revision 57.\n"
1468 msgstr ""
1469 "\n"
1470 "$ pwd\n"
1471 "/home/sally/calc\n"
1472 "\n"
1473 "$ ls -A \n"
1474 ".svn/ Makefile integer.c button.c\n"
1475 "\n"
1476 "$ svn update\n"
1477 "U    button.c\n"
1478 "Updated to revision 57.\n"
1480 #. (para)
1481 #: ../source/book.xml:1587
1482 msgid "The output from the <command>svn update</command> command indicates that Subversion updated the contents of <filename>button.c</filename>. Note that Sally didn't need to specify which files to update; Subversion uses the information in the <filename>.svn</filename> directory, and further information in the repository, to decide which files need to be brought up to date."
1483 msgstr "<command>svn update</command>命令的输出表明Subversion更新了<filename>button.c</filename>的内容,注意,Sally不必指定要更新的文件,subversion利用<filename>.svn</filename>以及版本库的进一步信息决定哪些文件需要更新。"
1485 #. (title)
1486 #: ../source/book.xml:1596
1487 msgid "Repository URLs"
1488 msgstr "版本库的 URL"
1490 #. (para)
1491 #: ../source/book.xml:1598
1492 msgid "Subversion repositories can be accessed through many different methods—on local disk, or through various network protocols, depending on how your administrator has set things up for you. A repository location, however, is always a URL. <xref linkend=\"svn.basic.in-action.wc.tbl-1\"/> describes how different URL schemes map to the available access methods."
1493 msgstr "Subversion可以通过多种方式访问—本地磁盘访问,或各种各样不同的网络协议,这要看你的管理员是如何设置,但一个版本库地址永远都只是一个URL,<xref linkend=\"svn.basic.in-action.wc.tbl-1\"/>描述了不同的URL模式对应的访问方法。"
1495 #. (title)
1496 #: ../source/book.xml:1608
1497 msgid "Repository Access URLs"
1498 msgstr "版本库访问 URL"
1500 #. (entry)
1501 #: ../source/book.xml:1613
1502 msgid "Schema"
1503 msgstr "方案"
1505 #. (entry)
1506 #: ../source/book.xml:1614
1507 msgid "Access Method"
1508 msgstr "访问方法"
1510 #. (literal)
1511 #: ../source/book.xml:1620
1512 msgid "file:///"
1513 msgstr "file:///"
1515 #. (entry)
1516 #: ../source/book.xml:1622
1517 msgid "direct repository access (on local disk)"
1518 msgstr "直接版本库访问(本地磁盘)。"
1520 #. (literal)
1521 #: ../source/book.xml:1626 ../source/book.xml:1635
1522 msgid "http://"
1523 msgstr "http://"
1525 #. (entry)
1526 #: ../source/book.xml:1628
1527 msgid "access via WebDAV protocol to Subversion-aware Apache server"
1528 msgstr "通过配置Subversion的Apache服务器的WebDAV协议。"
1530 #. (literal)
1531 #: ../source/book.xml:1633
1532 msgid "https://"
1533 msgstr "https://"
1535 #. (entry)
1536 #: ../source/book.xml:1635
1537 msgid "same as <placeholder-1/>, but with SSL encryption."
1538 msgstr "与<placeholder-1/>相似,但是包括SSL加密。"
1540 #. (literal)
1541 #: ../source/book.xml:1640 ../source/book.xml:1649
1542 msgid "svn://"
1543 msgstr "svn://"
1545 #. (entry)
1546 #: ../source/book.xml:1642
1547 msgid "access via custom protocol to an <placeholder-1/> server"
1548 msgstr "通过<placeholder-1/>服务自定义的协议。"
1550 #. (literal)
1551 #: ../source/book.xml:1647
1552 msgid "svn+ssh://"
1553 msgstr "svn+ssh://"
1555 #. (entry)
1556 #: ../source/book.xml:1649
1557 msgid "same as <placeholder-1/>, but through an SSH tunnel."
1558 msgstr "与<placeholder-1/>相似,但通过SSH封装。"
1560 #. (para)
1561 #: ../source/book.xml:1655
1562 msgid "For more information on how Subversion parses URLs, see <xref linkend=\"svn.advanced.reposurls\"/>. For more information on the different types of network servers available for Subversion, see <xref linkend=\"svn.serverconfig\"/>."
1563 msgstr "关于Subversion解析URL的更多信息,见<xref linkend=\"svn.advanced.reposurls\"/>。关于不同的网络服务器类型,见<xref linkend=\"svn.serverconfig\"/>。"
1565 #. (title)
1566 #: ../source/book.xml:1665
1567 msgid "Revisions"
1568 msgstr "修订版本"
1570 #. (para)
1571 #: ../source/book.xml:1667
1572 msgid "An <command>svn commit</command> operation publishes changes to any number of files and directories as a single atomic transaction. In your working copy, you can change files' contents; create, delete, rename and copy files and directories; then commit a complete set of changes as an atomic transaction."
1573 msgstr "一个<command>svn commit</command>操作可以作为一个原子事务操作发布任意数量文件和目录的修改,在你的工作拷贝里,你可以改变文件内容、删除、改名以及拷贝文件和目录,然后作为一个原子事务一起提交。"
1575 #. (para)
1576 #: ../source/book.xml:1673
1577 msgid "By <quote>atomic transaction</quote>, we mean simply this: either all of the changes happen in the repository, or none of them happen. Subversion tries to retain this atomicity in the face of program crashes, system crashes, network problems, and other users' actions."
1578 msgstr "<quote>原子事务</quote>的意思是:要么所有的改变发生,要么都不发生,Subversion努力保持原子性以应对程序错误、系统错误、网络问题和其他用户行为。"
1580 #. (para)
1581 #: ../source/book.xml:1678
1582 msgid "Each time the repository accepts a commit, this creates a new state of the filesystem tree, called a <firstterm>revision</firstterm>. Each revision is assigned a unique natural number, one greater than the number of the previous revision. The initial revision of a freshly created repository is numbered zero, and consists of nothing but an empty root directory."
1583 msgstr "每当版本库接受了一个提交,文件系统进入了一个新的状态,叫做一次修订(<firstterm>revision</firstterm>),每一个修订版本被赋予一个独一无二的自然数,一个比一个大,初始修订号是0,只创建了一个空目录,没有任何内容。"
1585 #. (para)
1586 #: ../source/book.xml:1685
1587 msgid "<xref linkend=\"svn.basic.in-action.revs.dia-1\"/> illustrates a nice way to visualize the repository. Imagine an array of revision numbers, starting at 0, stretching from left to right. Each revision number has a filesystem tree hanging below it, and each tree is a <quote>snapshot</quote> of the way the repository looked after a commit."
1588 msgstr "<xref linkend=\"svn.basic.in-action.revs.dia-1\"/>可以更形象的描述版本库,想象有一组修订号,从0开始,从左到右,每一个修订号有一个目录树挂在它下面,每一个树好像是一次提交后的版本库<quote>快照</quote>。"
1590 #. (title)
1591 #: ../source/book.xml:1693
1592 msgid "The repository"
1593 msgstr "版本库"
1595 #. (title)
1596 #: ../source/book.xml:1703
1597 msgid "Global Revision Numbers"
1598 msgstr "全局版本号"
1600 #. (para)
1601 #: ../source/book.xml:1705
1602 msgid "Unlike most version control systems, Subversion's revision numbers apply to <emphasis>entire trees</emphasis>, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change. Another way to think about it is that revision N represents the state of the repository filesystem after the Nth commit. When Subversion users talk about <quote>revision 5 of <filename>foo.c</filename></quote>, they really mean <quote><filename>foo.c</filename> as it appears in revision 5.</quote> Notice that in general, revisions N and M of a file do <emphasis>not</emphasis> necessarily differ! Many other version control systems use per-file revision numbers, so this concept may seem unusual at first. (Former CVS users might want to see <xref linkend=\"svn.forcvs\"/> for more details.)"
1603 msgstr "不像其他版本控制系统,Subversion的修订号是针对整个<emphasis>目录树</emphasis>的,而不是单个文件。每一个修订号代表了一次提交后版本库整个目录树的特定状态,另一种理解是修订号N代表版本库已经经过了N次提交。当Subversion用户讨论<quote><filename>foo.c</filename>的修订号5</quote>时,他们的实际意思是<quote>在修订号5时的<filename>foo.c</filename></quote>。需要注意的是,一个文件的修订版本N和M并<emphasis>不必</emphasis>有所不同。许多其它版本控制系统使用每文件一个修订号的策略,所以会感觉这些概念有点不一样。(以前的CVS用户可能希望察看<xref linkend=\"svn.forcvs\"/>来得到更多细节。)"
1605 #. (para)
1606 #: ../source/book.xml:1722
1607 msgid "It's important to note that working copies do not always correspond to any single revision in the repository; they may contain files from several different revisions. For example, suppose you check out a working copy from a repository whose most recent revision is 4:"
1608 msgstr "需要特别注意的是,工作拷贝并不一定对应版本库中的单个修订版本,他们可能包含多个修订版本的文件。举个例子,你从版本库检出一个工作拷贝,最近的修订号是4:"
1610 #. (screen)
1611 #: ../source/book.xml:1727
1612 #, no-wrap
1613 msgid ""
1614 "\n"
1615 "calc/Makefile:4\n"
1616 "     integer.c:4\n"
1617 "     button.c:4\n"
1618 msgstr ""
1619 "\n"
1620 "calc/Makefile:4\n"
1621 "     integer.c:4\n"
1622 "     button.c:4\n"
1624 #. (para)
1625 #: ../source/book.xml:1732
1626 msgid "At the moment, this working directory corresponds exactly to revision 4 in the repository. However, suppose you make a change to <filename>button.c</filename>, and commit that change. Assuming no other commits have taken place, your commit will create revision 5 of the repository, and your working copy will now look like this:"
1627 msgstr "此刻,工作目录与版本库的修订版本4完全对应,然而,你修改了<filename>button.c</filename>并且提交之后,假设没有别的提交出现,你的提交会在版本库建立修订版本5,你的工作拷贝会是这个样子的:"
1629 #. (screen)
1630 #: ../source/book.xml:1738
1631 #, no-wrap
1632 msgid ""
1633 "\n"
1634 "calc/Makefile:4\n"
1635 "     integer.c:4\n"
1636 "     button.c:5\n"
1637 msgstr ""
1638 "\n"
1639 "calc/Makefile:4\n"
1640 "     integer.c:4\n"
1641 "     button.c:5\n"
1643 #. (para)
1644 #: ../source/book.xml:1743
1645 msgid "Suppose that, at this point, Sally commits a change to <filename>integer.c</filename>, creating revision 6. If you use <command>svn update</command> to bring your working copy up to date, then it will look like this:"
1646 msgstr "假设此刻,Sally提交了对<filename>integer.c</filename>的修改,建立修订版本6,如果你使用<command>svn update</command>来更新你的工作拷贝,你会看到:"
1648 #. (screen)
1649 #: ../source/book.xml:1747
1650 #, no-wrap
1651 msgid ""
1652 "\n"
1653 "calc/Makefile:6\n"
1654 "     integer.c:6\n"
1655 "     button.c:6\n"
1656 msgstr ""
1657 "\n"
1658 "calc/Makefile:6\n"
1659 "     integer.c:6\n"
1660 "     button.c:6\n"
1662 #. (para)
1663 #: ../source/book.xml:1752
1664 msgid "Sally's change to <filename>integer.c</filename> will appear in your working copy, and your change will still be present in <filename>button.c</filename>. In this example, the text of <filename>Makefile</filename> is identical in revisions 4, 5, and 6, but Subversion will mark your working copy of <filename>Makefile</filename> with revision 6 to indicate that it is still current. So, after you do a clean update at the top of your working copy, it will generally correspond to exactly one revision in the repository."
1665 msgstr "Sally对<filename>integer.c</filename>的改变会出现在你的工作拷贝,你对<filename>button.c</filename>的改变还在,在这个例子里,<filename>Makefile</filename>在4、5、6修订版本都是一样的,但是Subversion会把他的<filename>Makefile</filename>的修订号设为6来表明它是最新的,所以你在工作拷贝顶级目录作一次干净的更新,会使得所有内容对应版本库的同一修订版本。"
1667 #. (title)
1668 #: ../source/book.xml:1765
1669 msgid "How Working Copies Track the Repository"
1670 msgstr "工作拷贝怎样跟踪版本库"
1672 #. (para)
1673 #: ../source/book.xml:1767
1674 msgid "For each file in a working directory, Subversion records two essential pieces of information in the <filename>.svn/</filename> administrative area:"
1675 msgstr "对于工作拷贝的每一个文件,Subversion在管理区域<filename>.svn/</filename>记录两项关键的信息:"
1677 #. (para)
1678 #: ../source/book.xml:1772
1679 msgid "what revision your working file is based on (this is called the file's <firstterm>working revision</firstterm>), and"
1680 msgstr "工作文件所作为基准的修订版本(叫做文件的<firstterm>工作修订版本</firstterm>)和"
1682 #. (para)
1683 #: ../source/book.xml:1777
1684 msgid "a timestamp recording when the local copy was last updated by the repository."
1685 msgstr "一个本地拷贝最后更新的时间戳。"
1687 #. (para)
1688 #: ../source/book.xml:1781
1689 msgid "Given this information, by talking to the repository, Subversion can tell which of the following four states a working file is in:"
1690 msgstr "给定这些信息,通过与版本库通讯,Subversion可以告诉我们工作文件是处于如下四种状态的那一种:"
1692 #. (term)
1693 #: ../source/book.xml:1786
1694 msgid "Unchanged, and current"
1695 msgstr "未修改且是当前的"
1697 #. (para)
1698 #: ../source/book.xml:1788
1699 msgid "The file is unchanged in the working directory, and no changes to that file have been committed to the repository since its working revision. An <command>svn commit</command> of the file will do nothing, and an <command>svn update</command> of the file will do nothing."
1700 msgstr "文件在工作目录里没有修改,在工作修订版本之后没有修改提交到版本库。<command>svn commit</command>操作不做任何事情,<command>svn update</command>不做任何事情。"
1702 #. (term)
1703 #: ../source/book.xml:1797
1704 msgid "Locally changed, and current"
1705 msgstr "本地已修改且是当前的"
1707 #. (para)
1708 #: ../source/book.xml:1799
1709 msgid "The file has been changed in the working directory, and no changes to that file have been committed to the repository since you last updated. There are local changes that have not been committed to the repository, thus an <command>svn commit</command> of the file will succeed in publishing your changes, and an <command>svn update</command> of the file will do nothing."
1710 msgstr "在工作目录已经修改,从基本修订版本之后没有修改提交到版本库。本地修改没有提交,因此<command>svn commit</command>会成功提交,<command>svn update</command>不做任何事情。"
1712 #. (term)
1713 #: ../source/book.xml:1809
1714 msgid "Unchanged, and out-of-date"
1715 msgstr "未修改且不是当前的了"
1717 #. (para)
1718 #: ../source/book.xml:1811
1719 msgid "The file has not been changed in the working directory, but it has been changed in the repository. The file should eventually be updated, to make it current with the latest public revision. An <command>svn commit</command> of the file will do nothing, and an <command>svn update</command> of the file will fold the latest changes into your working copy."
1720 msgstr "这个文件在工作目录没有修改,但在版本库中已经修改了。这个文件最终将更新到最新版本,成为当时的公共修订版本。<command>svn commit</command>不做任何事情,<command>svn update</command>将会取得最新的版本到工作拷贝。"
1722 #. (term)
1723 #: ../source/book.xml:1821
1724 msgid "Locally changed, and out-of-date"
1725 msgstr "本地已修改且不是最新的"
1727 #. (para)
1728 #: ../source/book.xml:1823
1729 msgid "The file has been changed both in the working directory, and in the repository. An <command>svn commit</command> of the file will fail with an <quote>out-of-date</quote> error. The file should be updated first; an <command>svn update</command> command will attempt to merge the public changes with the local changes. If Subversion can't complete the merge in a plausible way automatically, it leaves it to the user to resolve the conflict."
1730 msgstr "这个文件在工作目录和版本库都得到修改。一个<command>svn commit</command>将会失败,这个文件必须首先更新,<command>svn update</command>命令会合并公共和本地修改,如果Subversion不可以自动完成,将会让用户解决冲突。"
1732 #. (para)
1733 #: ../source/book.xml:1835
1734 msgid "This may sound like a lot to keep track of, but the <command>svn status</command> command will show you the state of any item in your working copy. For more information on that command, see <xref linkend=\"svn.tour.cycle.examine.status\"/>."
1735 msgstr "这看起来需要记录很多事情,但是<command>svn status</command>命令可以告诉你工作拷贝中文件的状态,关于此命令更多的信息,请看<xref linkend=\"svn.tour.cycle.examine.status\"/>。"
1737 #. (title)
1738 #: ../source/book.xml:1844
1739 msgid "Mixed Revision Working Copies"
1740 msgstr "混合版本的工作拷贝"
1742 #. (para)
1743 #: ../source/book.xml:1846
1744 msgid "As a general principle, Subversion tries to be as flexible as possible. One special kind of flexibility is the ability to have a working copy containing files and directories with a mix of different working revision numbers. Unfortunately, this flexibility tends to confuse a number of new users. If the earlier example showing mixed revisions perplexed you, here's a primer on both why the feature exists and how to make use of it."
1745 msgstr "作为一个普遍原理,Subversion努力做到尽可能的灵活,一个特殊的灵活特性就是让工作拷贝包含不同工作修订版本的文件和目录,不幸的是,这个灵活性会让许多新用户感到迷惑。如果上一个混合修订版本的例子让你感到困惑,这里是一个为何有这种特性和如何利用这个特性的基础介绍。"
1747 #. (title)
1748 #: ../source/book.xml:1857
1749 msgid "Updates and Commits are Separate"
1750 msgstr "更新和提交是分开的"
1752 #. (para)
1753 #: ../source/book.xml:1859
1754 msgid "One of the fundamental rules of Subversion is that a <quote>push</quote> action does not cause a <quote>pull</quote>, nor the other way around. Just because you're ready to submit new changes to the repository doesn't mean you're ready to receive changes from other people. And if you have new changes still in progress, then <command>svn update</command> should gracefully merge repository changes into your own, rather than forcing you to publish them."
1755 msgstr "Subversion有一个基本原则就是一个<quote>push</quote>动作不会导致<quote>pull</quote>,反之亦然,因为你准备好了提交你的修改并不意味着你已经准备好了从其他人那里接受修改。如果你的新的修改还在进行,<command>svn update</command>将会优雅的合并版本库的修改到你的工作拷贝,而不会强迫将修改发布。"
1757 #. (para)
1758 #: ../source/book.xml:1868
1759 msgid "The main side-effect of this rule is that it means a working copy has to do extra bookkeeping to track mixed revisions, and be tolerant of the mixture as well. It's made more complicated by the fact that directories themselves are versioned."
1760 msgstr "这个规则的主要副作用就是工作拷贝需要记录额外的信息来追踪混合修订版本,并且也需要能容忍这种混合,当目录本身也是版本化的时候情况更加复杂。"
1762 #. (para)
1763 #: ../source/book.xml:1873
1764 msgid "For example, suppose you have a working copy entirely at revision 10. You edit the file <filename>foo.html</filename> and then perform an <command>svn commit</command>, which creates revision 15 in the repository. After the commit succeeds, many new users would expect the working copy to be entirely at revision 15, but that's not the case! Any number of changes might have happened in the repository between revisions 10 and 15. The client knows nothing of those changes in the repository, since you haven't yet run <command>svn update</command>, and <command>svn commit</command> doesn't pull down new changes. If, on the other hand, <command>svn commit</command><emphasis>were</emphasis> to automatically download the newest changes, then it would be possible to set the entire working copy to revision 15—but then we'd be breaking the fundamental rule of <quote>push</quote> and <quote>pull</quote> remaining separate actions. Therefore the only safe thing the Subversion client can do is mark the one file—<filename>foo.html</filename>—as being at revision 15. The rest of the working copy remains at revision 10. Only by running <command>svn update</command> can the latest changes be downloaded, and the whole working copy be marked as revision 15."
1765 msgstr "举个例子,假定你有一个工作拷贝,修订版本号是10。你修改了<filename>foo.html</filename>,然后执行<command>svn commit</command>,在版本库里创建了修订版本15。当成功提交之后,许多用户希望工作拷贝完全变成修订版本15,但是事实并非如此。修订版本从10到15会发生任何修改,可是客户端在运行<command>svn update</command>之前不知道版本库发生了怎样的改变,<command>svn commit</command>不会拖出任何新的修改。另一方面,如果<command>svn commit</command>会自动下载最新的修改,可以使得整个工作拷贝成为修订版本15—但是,那样我们会打破<quote>push</quote>和<quote>pull</quote>完全分开的原则。因此,Subversion客户端最安全的方式是标记一个文件—<filename>foo.html</filename>—为修订版本15,工作拷贝余下的部分还是修订版本10。只有运行<command>svn update</command>才会下载最新的修改,整个工作拷贝被标记为修订版本15。"
1767 #. (title)
1768 #: ../source/book.xml:1901
1769 msgid "Mixed revisions are normal"
1770 msgstr "混合版本很常见"
1772 #. (para)
1773 #: ../source/book.xml:1903
1774 msgid "The fact is, <emphasis>every time</emphasis> you run <command>svn commit</command>, your working copy ends up with some mixture of revisions. The things you just committed are marked as having larger working revisions than everything else. After several commits (with no updates in-between) your working copy will contain a whole mixture of revisions. Even if you're the only person using the repository, you will still see this phenomenon. To examine your mixture of working revisions, use the <command>svn status --verbose</command> command (see <xref linkend=\"svn.tour.cycle.examine.status\"/> for more information.)"
1775 msgstr "事实上,<emphasis>每次</emphasis>运行<command>svn commit</command>,你的工作拷贝都会进入混合多个修订版本的状态,刚刚提交的文件会比其他文件有更高的修订版本号。经过多次提交(之间没有更新),你的工作拷贝会完全是混合的修订版本。即使只有你一个人使用版本库,你依然会见到这个现象。为了检验混合工作修订版本,可以使用<command>svn status --verbose</command>命令(详细信息见<xref linkend=\"svn.tour.cycle.examine.status\"/>)。"
1777 #. (para)
1778 #: ../source/book.xml:1914
1779 msgid "Often, new users are completely unaware that their working copy contains mixed revisions. This can be confusing, because many client commands are sensitive to the working revision of the item they're examining. For example, the <command>svn log</command> command is used to display the history of changes to a file or directory (see <xref linkend=\"svn.tour.history.log\"/>). When the user invokes this command on a working copy object, they expect to see the entire history of the object. But if the object's working revision is quite old (often because <command>svn update</command> hasn't been run in a long time), then the history of the <emphasis>older</emphasis> version of the object is shown."
1780 msgstr "通常,新用户对于工作拷贝的混合修订版本一无所知,这会让人糊涂,因为许多客户端命令对于所检验条目的修订版本很敏感。例如<command>svn log</command>命令显示一个文件或目录的历史修改信息(见<xref linkend=\"svn.tour.history.log\"/>),当用户对一个工作拷贝对象调用这个命令,他们希望看到这个对象的整个历史信息。但是如果这个对象的修订版本已经相当老了(通常因为很长时间没有运行<command>svn update</command>),此时会显示比这个对象<emphasis>更老的</emphasis>历史。"
1782 #. (title)
1783 #: ../source/book.xml:1931
1784 msgid "Mixed revisions are useful"
1785 msgstr "混合版本很有用"
1787 #. (para)
1788 #: ../source/book.xml:1933
1789 msgid "If your project is sufficiently complex, you'll discover that it's sometimes nice to forcibly <firstterm>backdate</firstterm> (or, update to a revision older than the one you already have) portions of your working copy to an earlier revision; you'll learn how to do that in <xref linkend=\"svn.tour\"/>. Perhaps you'd like to test an earlier version of a sub-module contained in a subdirectory, or perhaps you'd like to figure out when a bug first came into existence in a specific file. This is the <quote>time machine</quote> aspect of a version control system—the feature which allows you to move any portion of your working copy forward and backward in history."
1790 msgstr "如果你的项目十分复杂,有时候你会发现强制工作拷贝的一部分<quote>回溯</quote>到过去非常有用(或者更新到过去的某个修订版本),你将在<xref linkend=\"svn.tour\"/>学习到如何这样做。或许你很希望测试某一子目录下某一子模块的早期版本,又或是要测试一个bug什么时候发生,这是版本控制系统像<quote>时间机器</quote>的一个方面—这个特性允许工作拷贝的任何一个部分在历史中前进或后退。"
1792 #. (title)
1793 #: ../source/book.xml:1949
1794 msgid "Mixed revisions have limitations"
1795 msgstr "混合版本有限制"
1797 #. (para)
1798 #: ../source/book.xml:1951
1799 msgid "However you make use of mixed revisions in your working copy, there are limitations to this flexibility."
1800 msgstr "无论你如何在工作拷贝中利用混合修订版本,这种灵活性还是有限制的。"
1802 #. (para)
1803 #: ../source/book.xml:1953
1804 msgid "First, you cannot commit the deletion of a file or directory which isn't fully up-to-date. If a newer version of the item exists in the repository, your attempt to delete will be rejected, to prevent you from accidentally destroying changes you've not yet seen."
1805 msgstr "首先,你不可以提交一个不是完全最新的文件或目录,如果有个新的版本存在于版本库,你的删除操作会被拒绝,这防止你不小心破坏你没有见到的东西。"
1807 #. (para)
1808 #: ../source/book.xml:1958
1809 msgid "Second, you cannot commit a metadata change to a directory unless it's fully up-to-date. You'll learn about attaching <quote>properties</quote> to items in <xref linkend=\"svn.advanced\"/>. A directory's working revision defines a specific set of entries and properties, and thus committing a property change to an out-of-date directory may destroy properties you've not yet seen."
1810 msgstr "第二,如果目录已经不是最新的了,你不能提交一个目录的元数据更改。你将会在<xref linkend=\"svn.advanced\"/>学习附加<quote>属性</quote>,一个目录的工作修订版本定义了许多条目和属性,因而对一个过期的版本提交属性会破坏一些你没有见到的属性。"
1812 #. (title)
1813 #: ../source/book.xml:1972 ../source/book.xml:3797 ../source/book.xml:9193
1814 #: ../source/book.xml:11876
1815 msgid "Summary"
1816 msgstr "总结"
1818 #. (para)
1819 #: ../source/book.xml:1974
1820 msgid "We've covered a number of fundamental Subversion concepts in this chapter:"
1821 msgstr "我们在这一章里学习了许多Subversion的基本概念:"
1823 #. (para)
1824 #: ../source/book.xml:1978
1825 msgid "We've introduced the notions of the central repository, the client working copy, and the array of repository revision trees."
1826 msgstr "我们介绍了中央版本库、客户工作拷贝和版本修订树的概念。"
1828 #. (para)
1829 #: ../source/book.xml:1983
1830 msgid "We've seen some simple examples of how two collaborators can use Subversion to publish and receive changes from one another, using the <quote>copy-modify-merge</quote> model."
1831 msgstr "我们介绍了两个协作者如何使用Subversion通过<quote>拷贝-修改-合并</quote>模型发布和获得对方的修改。"
1833 #. (para)
1834 #: ../source/book.xml:1989
1835 msgid "We've talked a bit about the way Subversion tracks and manages information in a working copy."
1836 msgstr "我们讨论了一些Subversion跟踪和管理工作拷贝信息的方式。"
1838 #. (para)
1839 #: ../source/book.xml:1993
1840 msgid "At this point, you should have a good idea of how Subversion works in the most general sense. Armed with this knowledge, you should now be ready to move into the next chapter, which is a detailed tour of Subversion's commands and features."
1841 msgstr "现在,你一定对Subversion在多数情形下的工作方式有了很好的认识,有了这些知识的武装,你一定已经准备好跳到下一章去了,一个关于Subversion命令与特性的详细教程。"
1843 #. (title)
1844 #: ../source/book.xml:2006
1845 msgid "Basic Usage"
1846 msgstr "基本使用"
1848 #. (para)
1849 #: ../source/book.xml:2008
1850 msgid "Now we will go into the details of using Subversion. By the time you reach the end of this chapter, you will be able to perform all the tasks you need to use Subversion in a normal day's work. You'll start with getting your files into Subversion, followed by an initial checkout of your code. We'll then walk you through making changes and examining those changes. You'll also see how to bring changes made by others into your working copy, examine them, and work through any conflicts that might arise."
1851 msgstr "现在,我们将要深入到Subversion的使用细节当中,完成本章时,你将学会所有Subversion日常使用的命令,你将从把数据导入到Subversion开始,接着是初始化的检出(check out),然后是做出修改并检查,你也将会学到如何在工作拷贝中获取别人的修改,检查他们,并解决所有可能发生的冲突。"
1853 #. (para)
1854 #: ../source/book.xml:2017
1855 msgid "Note that this chapter is not meant to be an exhaustive list of all Subversion's commands—rather, it's a conversational introduction to the most common Subversion tasks you'll encounter. This chapter assumes that you've read and understood <xref linkend=\"svn.basic\"/> and are familiar with the general model of Subversion. For a complete reference of all commands, see <xref linkend=\"svn.ref\"/>."
1856 msgstr "这一章并不是Subversion命令的完全列表—而是你将会遇到的最常用任务的介绍,这一章假定你已经读过并且理解了<xref linkend=\"svn.basic\"/>,而且熟悉Subversion的模型,如果想查看所有命令的参考,见<xref linkend=\"svn.ref\"/>。"
1858 #. (title), (refpurpose)
1859 #: ../source/book.xml:2029 ../source/book.xml:18754 ../source/book.xml:21620
1860 #: ../source/book.xml:22644
1861 msgid "Help!"
1862 msgstr "求助!"
1864 #. (para)
1865 #: ../source/book.xml:2031
1866 msgid "Before reading on, here is the most important command you'll ever need when using Subversion: <command>svn help</command>. The Subversion command-line client is self-documenting—at any time, a quick <command>svn help <replaceable>SUBCOMMAND</replaceable></command> will describe the syntax, options, and behavior of the subcommand."
1867 msgstr "在继续阅读之前,需要知道Subversion使用中最重要的命令:<command>svn help</command>,Subversion命令行工具是一个自文档的工具—在任何时候你可以运行<command>svn help <replaceable>SUBCOMMAND</replaceable></command>来查看子命令的语法、参数以及行为方式。"
1869 #. (screen)
1870 #: ../source/book.xml:2037
1871 #, no-wrap
1872 msgid ""
1873 "\n"
1874 "$ svn help import\n"
1875 "import: Commit an unversioned file or tree into the repository.\n"
1876 "usage: import [PATH] URL\n"
1877 "\n"
1878 "  Recursively commit a copy of PATH to URL.\n"
1879 "  If PATH is omitted '.' is assumed.\n"
1880 "  Parent directories are created as necessary in the repository.\n"
1881 "  If PATH is a directory, the contents of the directory are added\n"
1882 "  directly under URL.\n"
1883 "\n"
1884 "Valid options:\n"
1885 "  -q [--quiet]             : print as little as possible\n"
1886 "  -N [--non-recursive]     : operate on single directory only\n"
1887 "…\n"
1888 msgstr ""
1889 "\n"
1890 "$ svn help import\n"
1891 "import: Commit an unversioned file or tree into the repository.\n"
1892 "usage: import [PATH] URL\n"
1893 "\n"
1894 "  Recursively commit a copy of PATH to URL.\n"
1895 "  If PATH is omitted '.' is assumed.\n"
1896 "  Parent directories are created as necessary in the repository.\n"
1897 "  If PATH is a directory, the contents of the directory are added\n"
1898 "  directly under URL.\n"
1899 "\n"
1900 "Valid options:\n"
1901 "  -q [--quiet]             : print as little as possible\n"
1902 "  -N [--non-recursive]     : operate on single directory only\n"
1903 "…\n"
1905 #. (title)
1906 #: ../source/book.xml:2055
1907 msgid "Options and Switches and Flags, Oh My!"
1908 msgstr ""
1910 #. (para)
1911 #: ../source/book.xml:2057
1912 msgid "The Subversion command line client has numerous command modifiers (which we call options), but there are two distinct kinds of options—<quote>short options</quote> that are a single hyphen followed by a single letter, and <quote>long options</quote> that consist of two hyphens followed by a number of letters (eg <literal>-s</literal> and <literal>--this-is-a-long-option</literal> respectively). Every option has a long format, but only certain options have an additional short format (these are typically options that are frequently used). In order to maintain clarity, we <emphasis>usually</emphasis> use the long form in code examples, but when describing options, if there's a short form, we'll provide the long form (to improve clarity), and the short form (to make it easier to remember). You should use whichever one you're more comfortable with, but don't try to use both."
1913 msgstr ""
1915 #. (title)
1916 #: ../source/book.xml:2080
1917 msgid "Getting Data into your Repository"
1918 msgstr "导入数据到你的版本库"
1920 #. (para)
1921 #: ../source/book.xml:2082
1922 msgid "There are two ways to get new files into your Subversion repository: <command>svn import</command> and <command>svn add</command>. We'll discuss <command>svn import</command> here and <command>svn add</command> later in this chapter when we review a typical day with Subversion."
1923 msgstr "有两种方法可以将新文件引入Subversion版本库:<command>svn import</command>和<command>svn add</command>,我们将在本章讨论<command>svn import</command>,而会在回顾Subversion的典型一天时讨论<command>svn add</command>。"
1925 #. (title), (refname)
1926 #: ../source/book.xml:2090 ../source/book.xml:18806
1927 msgid "svn import"
1928 msgstr "svn import"
1930 #. (para)
1931 #: ../source/book.xml:2092
1932 msgid "The <command>svn import</command> command is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. <command>svn import</command> doesn't require a working copy, and your files are immediately committed to the repository. This is typically used when you have an existing tree of files that you want to begin tracking in your Subversion repository. For example:"
1933 msgstr "<command>svn import</command>是将未版本化文件导入版本库的最快方法,会根据需要创建中介目录。<command>svn import</command>不需要一个工作拷贝,你的文件会直接提交到版本库,这通常用在你希望将一组文件加入到Subversion版本库时,例如:"
1935 #. (screen)
1936 #: ../source/book.xml:2099
1937 #, fuzzy, no-wrap
1938 msgid ""
1939 "\n"
1940 "$ svnadmin create /var/svn/newrepos\n"
1941 "$ svn import mytree file:///var/svn/newrepos/some/project \\\n"
1942 "             -m \"Initial import\"\n"
1943 "Adding         mytree/foo.c\n"
1944 "Adding         mytree/bar.c\n"
1945 "Adding         mytree/subdir\n"
1946 "Adding         mytree/subdir/quux.h\n"
1947 "\n"
1948 "Committed revision 1.\n"
1949 msgstr ""
1950 "\n"
1951 "$ svnadmin create /usr/local/svn/newrepos\n"
1952 "$ svn import mytree file:///usr/local/svn/newrepos/some/project \\\n"
1953 "             -m \"Initial import\"\n"
1954 "Adding         mytree/foo.c\n"
1955 "Adding         mytree/bar.c\n"
1956 "Adding         mytree/subdir\n"
1957 "Adding         mytree/subdir/quux.h\n"
1958 "\n"
1959 "Committed revision 1.\n"
1961 #. (para)
1962 #: ../source/book.xml:2110
1963 msgid "The previous example copied the contents of directory <filename>mytree</filename> under the directory <filename>some/project</filename> in the repository:"
1964 msgstr "在上一个例子里,将会拷贝目录<filename>mytree</filename>到版本库的<filename>some/project</filename>下:"
1966 #. (screen)
1967 #: ../source/book.xml:2113
1968 #, fuzzy, no-wrap
1969 msgid ""
1970 "\n"
1971 "$ svn list file:///var/svn/newrepos/some/project\n"
1972 "bar.c\n"
1973 "foo.c\n"
1974 "subdir/\n"
1975 msgstr ""
1976 "\n"
1977 "$ svn list file:///usr/local/svn/newrepos/some/project\n"
1978 "bar.c\n"
1979 "foo.c\n"
1980 "subdir/\n"
1982 #. (para)
1983 #: ../source/book.xml:2119
1984 msgid "Note that after the import is finished, the original tree is <emphasis>not</emphasis> converted into a working copy. To start working, you still need to <command>svn checkout</command> a fresh working copy of the tree."
1985 msgstr "注意,在导入之后,原来的目录树并<emphasis>没有</emphasis>转化成工作拷贝,为了开始工作,你还是需要运行<command>svn checkout</command>导出一个工作拷贝。"
1987 #. (title)
1988 #: ../source/book.xml:2127
1989 msgid "Recommended repository layout"
1990 msgstr "推荐的版本库布局"
1992 #. (para)
1993 #: ../source/book.xml:2129
1994 msgid "While Subversion's flexibility allows you to layout your repository in any way that you choose, we recommend that you create a <filename>trunk</filename> directory to hold the <quote>main line</quote> of development, a <filename>branches</filename> directory to contain branch copies, and a <filename>tags</filename> directory to contain tag copies, for example:"
1995 msgstr "尽管Subversion的灵活性允许你自由布局版本库,但我们有一套推荐的方式,创建一个<filename>trunk</filename>目录来保存开发的<quote>主线</quote>,一个<filename>branches</filename>目录存放分支拷贝,<filename>tags</filename>目录保存标签拷贝,例如:"
1997 #. (screen)
1998 #: ../source/book.xml:2136
1999 #, fuzzy, no-wrap
2000 msgid ""
2001 "\n"
2002 "$ svn list file:///var/svn/repos\n"
2003 "/trunk\n"
2004 "/branches\n"
2005 "/tags\n"
2006 msgstr ""
2007 "\n"
2008 "$ svn list file:///usr/local/svn/repos\n"
2009 "/trunk\n"
2010 "/branches\n"
2011 "/tags\n"
2013 #. (para)
2014 #: ../source/book.xml:2142
2015 msgid "You'll learn more about tags and branches in <xref linkend=\"svn.branchmerge\"/>. For details and how to set up multiple projects, see <xref linkend=\"svn.branchmerge.maint.layout\"/> and <xref linkend=\"svn.reposadmin.projects.chooselayout\"/> to read more about <quote>project roots</quote>."
2016 msgstr "你将会在<xref linkend=\"svn.branchmerge\"/>看到标签和分支的详细内容,关于设置多个项目的信息,可以看<xref linkend=\"svn.branchmerge.maint.layout\"/>和<xref linkend=\"svn.reposadmin.projects.chooselayout\"/>中关于<quote>项目根目录</quote>的内容。"
2018 #. (title)
2019 #: ../source/book.xml:2152
2020 msgid "Initial Checkout"
2021 msgstr "初始化检出"
2023 #. (para)
2024 #: ../source/book.xml:2154
2025 msgid "Most of the time, you will start using a Subversion repository by doing a <firstterm>checkout</firstterm> of your project. Checking out a repository creates a <quote>working copy</quote> of it on your local machine. This copy contains the <literal>HEAD</literal> (latest revision) of the Subversion repository that you specify on the command line:"
2026 msgstr "大多数时候,你会使用<firstterm>checkout</firstterm>从版本库取出一个新拷贝开始使用Subversion,这样会在本机创建一个项目的<quote>本地拷贝</quote>,这个拷贝包括了命令行指定版本库中的<literal>HEAD</literal>(最新的)版本:"
2028 #. (screen)
2029 #: ../source/book.xml:2160
2030 #, no-wrap
2031 msgid ""
2032 "\n"
2033 "$ svn checkout http://svn.collab.net/repos/svn/trunk\n"
2034 "A    trunk/Makefile.in\n"
2035 "A    trunk/ac-helpers\n"
2036 "A    trunk/ac-helpers/install.sh\n"
2037 "A    trunk/ac-helpers/install-sh\n"
2038 "A    trunk/build.conf\n"
2039 "…\n"
2040 "Checked out revision 8810.\n"
2041 msgstr ""
2042 "\n"
2043 "$ svn checkout http://svn.collab.net/repos/svn/trunk\n"
2044 "A    trunk/Makefile.in\n"
2045 "A    trunk/ac-helpers\n"
2046 "A    trunk/ac-helpers/install.sh\n"
2047 "A    trunk/ac-helpers/install-sh\n"
2048 "A    trunk/build.conf\n"
2049 "…\n"
2050 "Checked out revision 8810.\n"
2052 #. (title)
2053 #: ../source/book.xml:2172
2054 msgid "What's in a Name?"
2055 msgstr "名称中有什么?"
2057 #. (para)
2058 #: ../source/book.xml:2174
2059 msgid "Subversion tries hard not to limit the type of data you can place under version control. The contents of files and property values are stored and transmitted as binary data, and <xref linkend=\"svn.advanced.props.special.mime-type\"/> tells you how to give Subversion a hint that <quote>textual</quote> operations don't make sense for a particular file. There are a few places, however, where Subversion places restrictions on information it stores."
2060 msgstr "Subversion努力控制版本控制下数据的类型,文件的内容和属性值都是按照二进制数据存储和传递,并且<xref linkend=\"svn.advanced.props.special.mime-type\"/>给Subversion提示以说明对于特定文件<quote>文本化的</quote>操作是没有意义的,也有一些地方,Subversion对存放信息的有限制。"
2062 #. (para)
2063 #: ../source/book.xml:2183
2064 msgid "Subversion internally handles certain bits of data—for example, property names, path names, and log messages—as UTF-8 encoded Unicode. This is not to say that all your interactions with Subversion must involve UTF-8, though. As a general rule, Subversion clients will gracefully and transparently handle conversions between UTF-8 and the encoding system in use on your computer, if such a conversion can meaningfully be done (which is the case for most common encodings in use today)."
2065 msgstr "Subversion内部使用二进制处理数据—例如,属性名称,路径名和日志信息—UTF-8编码的Unicode,这并不意味着与Subversion的交互必须完全使用UTF-8。作为一个惯例,Subversion的客户端能够透明的转化UTF-8和你所使用系统的编码,前提是可以进行有意义的转换(当然是大多数目前常见的编码)。"
2067 #. (para)
2068 #: ../source/book.xml:2192
2069 msgid "In addition, path names are used as XML attribute values in WebDAV exchanges, as well in as some of Subversion's housekeeping files. This means that path names can only contain legal XML (1.0) characters. Subversion also prohibits TAB, CR, and LF characters in path names to prevent paths from being broken up in diffs, or in the output of commands like <xref linkend=\"svn.ref.svn.c.log\"/> or <xref linkend=\"svn.ref.svn.c.status\"/>."
2070 msgstr "此外,路径名称在WebDAV交换中会作为XML属性值,就像Subversion的管理文件。这意味着路径名称只能包含合法的XML(1.0)字符,Subversion也会禁止路径名称中出现TAB、CR或LF字符,所以它们才不会在区别程序或如<xref linkend=\"svn.ref.svn.c.log\"/>和<xref linkend=\"svn.ref.svn.c.status\"/>的输出命令中断掉。"
2072 #. (para)
2073 #: ../source/book.xml:2199
2074 msgid "While it may seem like a lot to remember, in practice these limitations are rarely a problem. As long as your locale settings are compatible with UTF-8, and you don't use control characters in path names, you should have no trouble communicating with Subversion. The command-line client adds an extra bit of help—it will automatically escape illegal path characters as needed in URLs you type to create <quote>legally correct</quote> versions for internal use."
2075 msgstr "虽然看起来要记住很多事情,但在实践中这些限制很少会成为问题。只要你的本地设置兼容UTF-8,也不在路径名称中使用控制字符,与Subversion的通讯就不会有问题。命令行客户端会添加一些额外的帮助字节—自动将你输入的URL路径字符转化为<quote>合法正确的</quote>内部用版本。"
2077 #. (para)
2078 #: ../source/book.xml:2209
2079 msgid "Although the above example checks out the trunk directory, you can just as easily check out any deep subdirectory of a repository by specifying the subdirectory in the checkout URL:"
2080 msgstr "尽管上面的例子取出了trunk目录,你也完全可以通过输入特定URL取出任意深度的子目录:"
2082 #. (screen)
2083 #: ../source/book.xml:2213
2084 #, no-wrap
2085 msgid ""
2086 "\n"
2087 "$ svn checkout \\\n"
2088 "      http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/\n"
2089 "A    cmdline/revert_tests.py\n"
2090 "A    cmdline/diff_tests.py\n"
2091 "A    cmdline/autoprop_tests.py\n"
2092 "A    cmdline/xmltests\n"
2093 "A    cmdline/xmltests/svn-test.sh\n"
2094 "…\n"
2095 "Checked out revision 8810.\n"
2096 msgstr ""
2097 "\n"
2098 "$ svn checkout \\\n"
2099 "      http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/\n"
2100 "A    cmdline/revert_tests.py\n"
2101 "A    cmdline/diff_tests.py\n"
2102 "A    cmdline/autoprop_tests.py\n"
2103 "A    cmdline/xmltests\n"
2104 "A    cmdline/xmltests/svn-test.sh\n"
2105 "…\n"
2106 "Checked out revision 8810.\n"
2108 #. (para)
2109 #: ../source/book.xml:2224
2110 msgid "Since Subversion uses a <quote>copy-modify-merge</quote> model instead of <quote>lock-modify-unlock</quote> (see <xref linkend=\"svn.basic.vsn-models\"/>), you can start right in making changes to the files and directories in your working copy. Your working copy is just like any other collection of files and directories on your system. You can edit and change them, move them around, you can even delete the entire working copy and forget about it."
2111 msgstr "因为Subversion使用<quote>拷贝-修改-合并</quote>模型而不是<quote>锁定-修改-解锁</quote>模型(见<xref linkend=\"svn.basic.vsn-models\"/>),你可以在工作拷贝中开始修改的目录和文件,你的工作拷贝和你的系统中的其它文件和目录完全一样,你可以编辑并改变它,移动它,也可以完全的删掉它,把它忘了。"
2113 #. (para)
2114 #: ../source/book.xml:2232
2115 msgid "While your working copy is <quote>just like any other collection of files and directories on your system</quote>, you can edit files at will, but you must tell Subversion about <emphasis>everything else</emphasis> that you do. For example, if you want to copy or move an item in a working copy, you should use <command>svn copy</command> or <command>svn move</command> instead of the copy and move commands provided by your operating system. We'll talk more about them later in this chapter."
2116 msgstr "因为你的工作拷贝<quote>同你系统上的文件和目录没有任何区别</quote>,你可以随意修改文件,但是你必须告诉Subversion你做的<emphasis>其他任何事</emphasis>。例如,你希望拷贝或移动工作拷贝的一个文件,你应该使用<command>svn copy</command>或者 <command>svn move</command>而不要使用操作系统的拷贝移动命令,我们会在本章后面详细介绍。"
2118 #. (para)
2119 #: ../source/book.xml:2242
2120 msgid "Unless you're ready to commit the addition of a new file or directory, or changes to existing ones, there's no need to further notify the Subversion server that you've done anything."
2121 msgstr "除非你准备好了提交一个新文件或目录,或改变了已存在的,否则没有必要通知Subversion你做了什么。"
2123 #. (title)
2124 #: ../source/book.xml:2248
2125 msgid "What's with the <filename>.svn</filename> directory?"
2126 msgstr "<filename>.svn</filename>目录包含什么?"
2128 #. (para)
2129 #: ../source/book.xml:2250
2130 msgid "Every directory in a working copy contains an administrative area, a subdirectory named <filename>.svn</filename>. Usually, directory listing commands won't show this subdirectory, but it is nevertheless an important directory. Whatever you do, don't delete or change anything in the administrative area! Subversion depends on it to manage your working copy."
2131 msgstr "工作拷贝中的任何一个目录包括一个名为<filename>.svn</filename>管理区域,通常列表操作不显示这个目录,但它仍然是一个非常重要的目录,无论你做什么?不要删除或是更改这个管理区域的任何东西,Subversion使用它来管理工作拷贝。"
2133 #. (para)
2134 #: ../source/book.xml:2257
2135 msgid "If you accidentally remove the <filename>.svn</filename> subdirectory, the easiest way to fix the problem is to remove the entire containing directory (a normal system deletion, not <command>svn delete</command>), then run <command>svn update</command> from a parent directory. The Subversion client will re-download the directory you've deleted, with a new <filename>.svn</filename> area as well."
2136 msgstr "如果你不小心删除了子目录<filename>.svn</filename>,最简单的解决办法是删除包含的目录(普通的文件系统删除,而不是<command>svn delete</command>),然后在父目录运行<command>svn update</command>,Subversion客户端会重新下载你删除的目录,并包含新的<filename>.svn</filename>。"
2138 #. (para)
2139 #: ../source/book.xml:2265
2140 msgid "While you can certainly check out a working copy with the URL of the repository as the only argument, you can also specify a directory after your repository URL. This places your working copy in the new directory that you name. For example:"
2141 msgstr "因为你可以使用版本库的URL作为唯一参数取出一个工作拷贝,你也可以在版本库URL之后指定一个目录,这样会将你的工作目录放到你的新目录,举个例子:"
2143 #. (screen)
2144 #: ../source/book.xml:2269
2145 #, no-wrap
2146 msgid ""
2147 "\n"
2148 "$  svn checkout http://svn.collab.net/repos/svn/trunk subv\n"
2149 "A    subv/Makefile.in\n"
2150 "A    subv/ac-helpers\n"
2151 "A    subv/ac-helpers/install.sh\n"
2152 "A    subv/ac-helpers/install-sh\n"
2153 "A    subv/build.conf\n"
2154 "…\n"
2155 "Checked out revision 8810.\n"
2156 msgstr ""
2157 "\n"
2158 "$  svn checkout http://svn.collab.net/repos/svn/trunk subv\n"
2159 "A    subv/Makefile.in\n"
2160 "A    subv/ac-helpers\n"
2161 "A    subv/ac-helpers/install.sh\n"
2162 "A    subv/ac-helpers/install-sh\n"
2163 "A    subv/build.conf\n"
2164 "…\n"
2165 "Checked out revision 8810.\n"
2167 #. (para)
2168 #: ../source/book.xml:2279
2169 msgid "That will place your working copy in a directory named <literal>subv</literal> instead of a directory named <literal>trunk</literal> as we did previously. The directory <literal>subv</literal> will be created if it doesn't already exist."
2170 msgstr "这样将把你的工作拷贝放到<literal>subv</literal>而不是和前面那样放到<literal>trunk</literal>,如果<literal>subv</literal>不存在,将会自动创建。"
2172 #. (title)
2173 #: ../source/book.xml:2286
2174 msgid "Disabling Password Caching"
2175 msgstr "禁用密码缓存"
2177 #. (para)
2178 #: ../source/book.xml:2293
2179 msgid "Of course, you're not terribly worried—first because you know that you can't <emphasis>really</emphasis> delete anything from Subversion and, secondly, because your Subversion password isn't the same as any of the other three million passwords you have, right? Right?"
2180 msgstr "当然,你不必太过担心—首先你要知道你不会从Subversion<emphasis>真的</emphasis>删除文件,第二,Subversion密码不是和你的三百万个密码的任何一个相同,对吧?对吧?"
2182 #. (para)
2183 #: ../source/book.xml:2288
2184 msgid "When you perform a Subversion operation that requires you to authenticate, by default Subversion caches your authentication credentials on disk. This is done for convenience, so that you don't have to continually re-enter your password for future operations. If you're concerned about caching your Subversion passwords,<placeholder-1/> you can disable caching either permanently or on a case-by-case basis."
2185 msgstr "当你执行的Subversion命令需要认证时,缺省情况下Subversion会在磁盘缓存认证信息,这样做出于便利,在接下来的操作中你就可以不必输入密码,但如果你很在乎密码缓存,<placeholder-1/>你可以永久关闭缓存或每次执行命令时说明。"
2187 #. (para)
2188 #: ../source/book.xml:2301
2189 msgid "To disable password caching for a particular one-time command, pass the <option>--no-auth-cache</option> option on the commandline. To permanently disable caching, you can add the line <literal>store-passwords = no</literal> to your local machine's Subversion configuration file. See <xref linkend=\"svn.serverconfig.netmodel.credcache\"/> for details."
2190 msgstr "在某次命令关闭密码缓存可以在命令中使用<option>--no-auth-cache</option>选项,如果希望永久关闭缓存,可以在本机的Subversion配置文件中添加<literal>store-passwords = no</literal>这一行,详情请见<xref linkend=\"svn.serverconfig.netmodel.credcache\"/>。"
2192 #. (title)
2193 #: ../source/book.xml:2310
2194 msgid "Authenticating as a Different User"
2195 msgstr "用其它身份认证"
2197 #. (para)
2198 #: ../source/book.xml:2312
2199 msgid "Since Subversion caches auth credentials by default (both username and password), it conveniently remembers who you were acting as the last time you modified you working copy. But sometimes that's not helpful—particularly if you're working in a shared working copy, like a system configuration directory or a webserver document root. In this case, just pass the <option>--username</option> option on the commandline and Subversion will attempt to authenticate as that user, prompting you for a password if necessary."
2200 msgstr "因为Subversion认证缓存是缺省设置(包含用户名和密码),"
2202 #. (title)
2203 #: ../source/book.xml:2328
2204 msgid "Basic Work Cycle"
2205 msgstr "基本的工作循环"
2207 #. (para)
2208 #: ../source/book.xml:2330
2209 msgid "Subversion has numerous features, options, bells and whistles, but on a day-to-day basis, odds are that you will only use a few of them. In this section we'll run through the most common things that you might find yourself doing with Subversion in the course of a day's work."
2210 msgstr "Subversion有许多特性、选项和华而不实的高级功能,但日常的工作中你只使用其中的一小部分,在这一节里,我们会介绍许多你在日常工作中常用的命令。"
2212 #. (para)
2213 #: ../source/book.xml:2335
2214 msgid "The typical work cycle looks like this:"
2215 msgstr "典型的工作周期是这样的:"
2217 #. (para)
2218 #: ../source/book.xml:2338
2219 msgid "Update your working copy"
2220 msgstr "更新你的工作拷贝"
2222 #. (command), (refname)
2223 #: ../source/book.xml:2342 ../source/book.xml:2402 ../source/book.xml:21115
2224 msgid "svn update"
2225 msgstr "svn update"
2227 #. (para)
2228 #: ../source/book.xml:2348
2229 msgid "Make changes"
2230 msgstr "做出修改"
2232 #. (command), (refname)
2233 #: ../source/book.xml:2352 ../source/book.xml:17472
2234 msgid "svn add"
2235 msgstr "svn add"
2237 #. (command), (refname)
2238 #: ../source/book.xml:2357 ../source/book.xml:18278
2239 msgid "svn delete"
2240 msgstr "svn delete"
2242 #. (command), (refname)
2243 #: ../source/book.xml:2362 ../source/book.xml:18099
2244 msgid "svn copy"
2245 msgstr "svn copy"
2247 #. (command), (refname)
2248 #: ../source/book.xml:2367 ../source/book.xml:19754
2249 msgid "svn move"
2250 msgstr "svn move"
2252 #. (para)
2253 #: ../source/book.xml:2373
2254 msgid "Examine your changes"
2255 msgstr "检验修改"
2257 #. (command), (refname)
2258 #: ../source/book.xml:2377 ../source/book.xml:20521 ../source/book.xml:24894
2259 msgid "svn status"
2260 msgstr "svn status"
2262 #. (command), (refname)
2263 #: ../source/book.xml:2382 ../source/book.xml:3353 ../source/book.xml:18388
2264 #: ../source/book.xml:24902
2265 msgid "svn diff"
2266 msgstr "svn diff"
2268 #. (para)
2269 #: ../source/book.xml:2388
2270 msgid "Possibly undo some changes"
2271 msgstr "可能会取消一些修改"
2273 #. (command), (refname)
2274 #: ../source/book.xml:2392 ../source/book.xml:20415 ../source/book.xml:24910
2275 msgid "svn revert"
2276 msgstr "svn revert"
2278 #. (para)
2279 #: ../source/book.xml:2398
2280 msgid "Resolve Conflicts (Merge Others' Changes)"
2281 msgstr "解决冲突(合并别人的修改)"
2283 #. (command), (refname)
2284 #: ../source/book.xml:2407 ../source/book.xml:20326
2285 msgid "svn resolved"
2286 msgstr "svn resolved"
2288 #. (para)
2289 #: ../source/book.xml:2413
2290 msgid "Commit your changes"
2291 msgstr "提交你的修改"
2293 #. (command), (refname)
2294 #: ../source/book.xml:2417 ../source/book.xml:17971
2295 msgid "svn commit"
2296 msgstr "svn commit"
2298 #. (title)
2299 #: ../source/book.xml:2426
2300 msgid "Update Your Working Copy"
2301 msgstr "更新你的工作副本"
2303 #. (para)
2304 #: ../source/book.xml:2428
2305 msgid "When working on a project with a team, you'll want to update your working copy to receive any changes made since your last update by other developers on the project. Use <command>svn update</command> to bring your working copy into sync with the latest revision in the repository."
2306 msgstr "当你在一个团队的项目里工作时,你希望更新你的工作拷贝得到所有其他人这段时间作出的修改,使用<command>svn update</command>让你的工作拷贝与最新的版本同步。"
2308 #. (screen)
2309 #: ../source/book.xml:2433
2310 #, no-wrap
2311 msgid ""
2312 "\n"
2313 "$ svn update\n"
2314 "U  foo.c\n"
2315 "U  bar.c\n"
2316 "Updated to revision 2.\n"
2317 msgstr ""
2318 "\n"
2319 "$ svn update\n"
2320 "U  foo.c\n"
2321 "U  bar.c\n"
2322 "Updated to revision 2.\n"
2324 #. (para)
2325 #: ../source/book.xml:2439
2326 msgid "In this case, someone else checked in modifications to both <filename>foo.c</filename> and <filename>bar.c</filename> since the last time you updated, and Subversion has updated your working copy to include those changes."
2327 msgstr "这种情况下,其他人在你上次更新之后提交了对<filename>foo.c</filename>和<filename>bar.c</filename>的修改,因此Subversion更新你的工作拷贝来引入这些更改。"
2329 #. (para)
2330 #: ../source/book.xml:2443
2331 msgid "When the server sends changes to your working copy via <command>svn update</command>, a letter code is displayed next to each item to let you know what actions Subversion performed to bring your working copy up-to-date. To find out what these letters mean, see <xref linkend=\"svn.ref.svn.c.update\"/>."
2332 msgstr "当服务器通过<command>svn update</command>将修改传递到你的工作拷贝时,每一个项目之前会有一个字母,来让你知道Subversion为保持最新对你的工作拷贝作了哪些工作。关于这些字母的详细含义,可以看<xref linkend=\"svn.ref.svn.c.update\"/>。"
2334 #. (title)
2335 #: ../source/book.xml:2452
2336 msgid "Make Changes to Your Working Copy"
2337 msgstr "修改你的工作副本"
2339 #. (para)
2340 #: ../source/book.xml:2454
2341 msgid "Now you can get to work and make changes in your working copy. It's usually most convenient to decide on a discrete change (or set of changes) to make, such as writing a new feature, fixing a bug, etc. The Subversion commands that you will use here are <command>svn add</command>, <command>svn delete</command>, <command>svn copy</command>, <command>svn move</command>, and <command>svn mkdir</command>. However, if you are merely editing files that are already in Subversion, you may not need to use any of these commands until you commit."
2342 msgstr "现在你可以开始工作并且修改你的工作拷贝了,你很容易决定作出一个修改(或者是一组),像写一个新的特性,修正一个错误等等。这时可以使用的Subversion命令包括<command>svn add</command>、 <command>svn delete</command>、<command>svn copy</command>和<command>svn move</command>。如果你只是修改版本库中已经存在的文件,在你提交之前,不必使用上面的任何一个命令。"
2344 #. (para)
2345 #: ../source/book.xml:2464
2346 msgid "There are two kinds of changes you can make to your working copy: file changes and tree changes. You don't need to tell Subversion that you intend to change a file; just make your changes using your text editor, word processor, graphics program, or whatever tool you would normally use. Subversion automatically detects which files have been changed, and in addition handles binary files just as easily as it handles text files—and just as efficiently too. For tree changes, you can ask Subversion to <quote>mark</quote> files and directories for scheduled removal, addition, copying, or moving. These changes may take place immediately in your working copy, but no additions or removals will happen in the repository until you commit them."
2347 msgstr "你可以对工作拷贝做出两种修改:文件修改和目录树修改。你不需要告诉Subversion你希望修改一个文件,只需要用你的编辑器、字处理器、图形程序或任何工具做出修改,Subversion自动监测到文件的更改,此外,二进制文件的处理方式和文本文件一样—也有同样的效率。对于目录树更改,你可以告诉Subversion将文件和目录预定的删除、添加、拷贝或移动标记,这些动作会在工作拷贝上立刻发生效果,但只有提交后才会在版本库里生效。"
2349 #. (para)
2350 #: ../source/book.xml:2477
2351 msgid "Here is an overview of the five Subversion subcommands that you'll use most often to make tree changes."
2352 msgstr "下面是Subversion用来修改目录树结构的五个子命令。"
2354 #. (title)
2355 #: ../source/book.xml:2481
2356 msgid "Versioning symbolic links"
2357 msgstr "版本控制符号连接"
2359 #. (para)
2360 #: ../source/book.xml:2483
2361 msgid "On non-Windows platforms, Subversion is able to version files of the special type <firstterm>symbolic link</firstterm> (or, <quote>symlink</quote>). A symlink is a file which acts as a sort of transparent reference to some other object in the filesystem, allowing programs to read and write to those objects indirectly by way of performing operations on the symlink itself."
2362 msgstr "在非Windows平台,Subversion可以将特殊类型<firstterm>符号链接</firstterm>(或是<quote>symlink</quote>)版本化,一个符号链接是对文件系统中其他对象的透明引用,可以通过对符合链接操作实现对引用对象的读写操作。"
2364 #. (para)
2365 #: ../source/book.xml:2490
2366 msgid "When a symlink is committed into a Subversion repository, Subversion remembers that the file was in fact a symlink, as well as the object to which the symlink <quote>points</quote>. When that symlink is checked out to another working copy on a non-Windows system, Subversion reconstructs a real filesystem-level symbolic link from the versioned symlink. But that doesn't in any way limit the usability of working copies on systems such as Windows which do not support symlinks. On such systems, Subversion simply creates a regular text file whose contents are the path to which to the original symlink pointed. While that file can't be used as a symlink on a Windows system, it also won't prevent Windows users from performing their other Subversion-related activities."
2367 msgstr "当符号链提交到Subversion版本库,Subversion会记住这个文件实际上是一个符号链,也会知道这个符号链指向的<quote>对象</quote>。当这个符号链检出到另一个支持符号链的操作系统上时,Subversion会重新构建文件系统级的符号链接。当然这样不会影响在Windows这类不支持符号链的系统上,在此类系统上,Subversion只会创建一个包含指向对象路径的文本文件,因为这个文件不能在Windows系统上作为符号链使用,所以它也会防止Windows用户作其他Subversion相关的操作。"
2369 #. (command)
2370 #: ../source/book.xml:2508
2371 msgid "svn add foo"
2372 msgstr "svn add foo"
2374 #. (para)
2375 #: ../source/book.xml:2511
2376 msgid "Schedule file, directory, or symbolic link <filename>foo</filename> to be added to the repository. When you next commit, <filename>foo</filename> will become a child of its parent directory. Note that if <filename>foo</filename> is a directory, everything underneath <filename>foo</filename> will be scheduled for addition. If you only want to add <filename>foo</filename> itself, pass the <option>--non-recursive (-N)</option> option."
2377 msgstr "预定将文件、目录或者符号链<filename>foo</filename>添加到版本库,当你下次提交后,<filename>foo</filename>会成为其父目录的一个子对象。注意,如果<filename>foo</filename>是目录,所有foo中的内容也会预定添加进去,如果你只想添加<filename>foo</filename>本身,请使用<option>--non-recursive (-N)</option>参数。"
2379 #. (command)
2380 #: ../source/book.xml:2524
2381 msgid "svn delete foo"
2382 msgstr "svn delete foo"
2384 #. (para)
2385 #: ../source/book.xml:2536
2386 #, fuzzy
2387 msgid "Of course, nothing is ever totally deleted from the repository—just from the <literal>HEAD</literal> of the repository. You can get back anything you delete by checking out (or updating your working copy to) a revision earlier than the one in which you deleted it. Also see <xref linkend=\"svn.branchmerge.advanced.resurrect\"/>."
2388 msgstr "当然没有任何东西是在版本库里被删除了—只是在版本库的<literal>HEAD</literal>里消失了,你可以通过检出(或者更新你的工作拷贝)你做出删除操作的前一个修订版本来找回所有的东西,详细请见<xref linkend=\"svn.branchmerge.commonuses.resurrect\"/>。"
2390 #. (para)
2391 #: ../source/book.xml:2527
2392 msgid "Schedule file, directory, or symbolic link <filename>foo</filename> to be deleted from the repository. If <filename>foo</filename> is a file or link, it is immediately deleted from your working copy. If <filename>foo</filename> is a directory, it is not deleted, but Subversion schedules it for deletion. When you commit your changes, <filename>foo</filename> will be entirely removed from your working copy and the repository. <placeholder-1/>"
2393 msgstr "预定将文件、目录或者符号链<filename>foo</filename>从版本库中删除掉,如果foo是文件,它马上从工作拷贝中删除,如果是目录,不会被删除,但是Subversion准备好删除了,当你提交你的修改,<filename>foo</filename>就会在你的工作拷贝和版本库中被删除。<placeholder-1/>"
2395 #. (command)
2396 #: ../source/book.xml:2548
2397 msgid "svn copy foo bar"
2398 msgstr "svn copy foo bar"
2400 #. (para)
2401 #: ../source/book.xml:2551
2402 #, fuzzy
2403 msgid "Create a new item <filename>bar</filename> as a duplicate of <filename>foo</filename> and automatically schedule <filename>bar</filename> for addition. When <filename>bar</filename> is added to the repository on the next commit, its copy history is recorded (as having originally come from <filename>foo</filename>). <command>svn copy</command> does not create intermediate directories unless you pass the <option>--parents</option>."
2404 msgstr "建立一个新的项目<filename>bar</filename>作为<filename>foo</filename>的复制品,会自动预定将<filename>bar</filename>添加,当在下次提交时会将<filename>bar</filename>添加到版本库,这种拷贝历史会记录下来(按照来自<filename>foo</filename>的方式记录),<command>svn copy</command>并不建立中介目录。"
2406 #. (command)
2407 #: ../source/book.xml:2564
2408 msgid "svn move foo bar"
2409 msgstr "svn move foo bar"
2411 #. (para)
2412 #: ../source/book.xml:2567
2413 #, fuzzy
2414 msgid "This command is exactly the same as running <command>svn copy foo bar; svn delete foo</command>. That is, <filename>bar</filename> is scheduled for addition as a copy of <filename>foo</filename>, and <filename>foo</filename> is scheduled for removal. <command>svn move</command> does not create intermediate directories unless you pass the <option>--parents</option>."
2415 msgstr "这个命令与与运行<command>svn copy foo bar; svn delete foo</command>完全相同,<filename>bar</filename>作为<filename>foo</filename>的拷贝准备添加,<filename>foo</filename>已经预定要被删除,<command>svn move</command>不建立中介的目录。"
2417 #. (command)
2418 #: ../source/book.xml:2579
2419 msgid "svn mkdir blort"
2420 msgstr "svn mkdir blort"
2422 #. (para)
2423 #: ../source/book.xml:2582
2424 msgid "This command is exactly the same as running <command>mkdir blort; svn add blort</command>. That is, a new directory named <filename>blort</filename> is created and scheduled for addition."
2425 msgstr "这个命令同运行 <command>mkdir blort; svn add blort</command>相同,也就是创建一个叫做<filename>blort</filename>的文件,并且预定添加到版本库。"
2427 #. (title)
2428 #: ../source/book.xml:2591
2429 msgid "Changing the Repository Without a Working Copy"
2430 msgstr "不通过工作副本修改版本库"
2432 #. (para)
2433 #: ../source/book.xml:2593
2434 msgid "There <emphasis>are</emphasis> some use cases that immediately commit tree changes to the repository. This only happens when a subcommand is operating directly on a URL, rather than on a working-copy path. In particular, specific uses of <command>svn mkdir</command>, <command>svn copy</command>, <command>svn move</command>, and <command>svn delete</command> can work with URLs (And don't forget that <command>svn import</command> always makes changes to a URL)."
2435 msgstr "有一些情况下会立刻提交目录树的修改到版本库,这只发生在子命令直接操作URL,而不是工作拷贝路径时。以特定的方式使用<command>svn mkdir</command>、<command>svn copy</command>、<command>svn move</command>和<command>svn delete</command>可以针对URL操作(并且不要忘记<command>svn import</command>只针对URL操作)。"
2437 #. (para)
2438 #: ../source/book.xml:2602
2439 msgid "URL operations behave in this manner because commands that operate on a working copy can use the working copy as a sort of <quote>staging area</quote> to set up your changes before committing them to the repository. Commands that operate on URLs don't have this luxury, so when you operate directly on a URL, any of the above actions represent an immediate commit."
2440 msgstr "指定URL的操作方式有一些区别,因为在使用工作拷贝的运作方式时,工作拷贝成为一个<quote>集结地</quote>,可以在提交之前整理组织所要做的修改,直接对URL操作就没有这种奢侈,所以当你直接操作URL的时候,所有以上的动作代表一个立即的提交。"
2442 #. (title)
2443 #: ../source/book.xml:2614
2444 msgid "Examine Your Changes"
2445 msgstr "检查你的修改"
2447 #. (para)
2448 #: ../source/book.xml:2616
2449 msgid "Once you've finished making changes, you need to commit them to the repository, but before you do so, it's usually a good idea to take a look at exactly what you've changed. By examining your changes before you commit, you can make a more accurate log message. You may also discover that you've inadvertently changed a file, and this gives you a chance to revert those changes before committing. Additionally, this is a good opportunity to review and scrutinize changes before publishing them. You can see an overview of the changes you've made by using <command>svn status</command>, and dig into the details of those changes by using <command>svn diff</command>."
2450 msgstr "当你完成修改,你需要提交他们到版本库,但是在此之前,检查一下做过什么修改是个好主意,通过提交前的检查,你可以整理一份精确的日志信息,你也可以发现你不小心修改的文件,给了你一次恢复修改的机会。此外,这是一个审查和仔细察看修改的好机会,你可通过命令<command>svn status</command>浏览所做的修改,通过<command>svn diff</command>检查修改的详细信息。"
2452 #. (title)
2453 #: ../source/book.xml:2630
2454 msgid "Look Ma! No Network!"
2455 msgstr "看!没有网络!"
2457 #. (para)
2458 #: ../source/book.xml:2639
2459 msgid "And also that you don't have a WAN card. Thought you got us, huh?"
2460 msgstr "而且你也没有WAN卡,考虑到你得到我们,哈!"
2462 #. (para)
2463 #: ../source/book.xml:2632
2464 msgid "The commands <command>svn status</command>, <command>svn diff</command>, and <command>svn revert</command> can be used without any network access even if your repository <emphasis>is</emphasis> across the network. This makes it easy to manage your changes-in-progress when you are somewhere without a network connection, such as travelling on an airplane, riding a commuter train or hacking on the beach.<placeholder-1/>"
2465 msgstr "这三个命令(<command>svn status</command>、<command>svn diff</command>和<command>svn revert</command>)都可以在没有网络的情况下工作(假定你的版本库是通过网络而不是本地访问的),这让你在没有网络连接时的管理修改过程更加容易,像在飞机上旅行,乘坐火车往返或是在海滩上奋力工作时。<placeholder-1/>"
2467 #. (para)
2468 #: ../source/book.xml:2642
2469 msgid "Subversion does this by keeping private caches of pristine versions of each versioned file inside of the <filename>.svn</filename> administrative areas. This allows Subversion to report—and revert—local modifications to those files <emphasis>without network access</emphasis>. This cache (called the <quote>text-base</quote>) also allows Subversion to send the user's local modifications during a commit to the server as a compressed <firstterm>delta</firstterm> (or <quote>difference</quote>) against the pristine version. Having this cache is a tremendous benefit—even if you have a fast net connection, it's much faster to send only a file's changes rather than the whole file to the server."
2470 msgstr "Subversion通过在<filename>.svn</filename>管理区域使用原始的版本缓存来做到这一点,这使得报告和恢复本地修改而<emphasis>不必访问网络</emphasis>,这个缓存(叫做<quote>text-base</quote>)也允许Subversion可以根据原始版本生成一个压缩的增量(<quote>区别</quote>) 提交—即使你有个非常快的网络,有这样一个缓存有极大的好处,只向服务器提交修改的部分而不是整个文件。"
2472 #. (para)
2473 #: ../source/book.xml:2657
2474 msgid "Subversion has been optimized to help you with this task, and is able to do many things without communicating with the repository. In particular, your working copy contains a hidden cached <quote>pristine</quote> copy of each version controlled file within the <filename>.svn</filename> area. Because of this, Subversion can quickly show you how your working files have changed, or even allow you to undo your changes without contacting the repository."
2475 msgstr "Subversion已经被优化来帮助你完成这个任务,可以在不与版本库通讯的情况下做许多事情,详细来说,对于每一个文件,你的的工作拷贝在<filename>.svn</filename>包含了一个<quote>原始的</quote>拷贝,所以Subversion可以快速的告诉你那些文件修改了,甚至允许你在不与版本库通讯的情况下恢复修改。"
2477 #. (title)
2478 #: ../source/book.xml:2668
2479 msgid "See an overview of your changes"
2480 msgstr "查看你的修改概况"
2482 #. (para)
2483 #: ../source/book.xml:2670
2484 msgid "To get an overview of your changes, you'll use the <command>svn status</command> command. You'll probably use <command>svn status</command> more than any other Subversion command."
2485 msgstr "为了浏览修改的内容,你会使用这个<command>svn status</command>命令,在所有Subversion命令里,你可能会最多使用<command>svn status</command>。"
2487 #. (title)
2488 #: ../source/book.xml:2676
2489 msgid "CVS Users: Hold That Update!"
2490 msgstr "CVS 用户:控制另类的更新!"
2492 #. (para)
2493 #: ../source/book.xml:2678
2494 msgid "You're probably used to using <command>cvs update</command> to see what changes you've made to your working copy. <command>svn status</command> will give you all the information you need regarding what has changed in your working copy—without accessing the repository or potentially incorporating new changes published by other users."
2495 msgstr "你也许使用<command>cvs update</command>来看你做了哪些修改,<command>svn status</command>会给你所有你做的改变—而不需要访问版本库,并且不会在不知情的情况下与其他用户作的更改比较。"
2497 #. (para)
2498 #: ../source/book.xml:2685
2499 msgid "In Subversion, <command>update</command> does just that—it updates your working copy with any changes committed to the repository since the last time you've updated your working copy. You may have to break the habit of using the <command>update</command> command to see what local modifications you've made."
2500 msgstr "在Subversion,<command>update</command>只是做这件事—将工作拷贝更新到版本库的最新版本,你可以消除使用<command>update</command>察看本地修改的习惯。"
2502 #. (para)
2503 #: ../source/book.xml:2692
2504 msgid "If you run <command>svn status</command> at the top of your working copy with no arguments, it will detect all file and tree changes you've made. Below are a few examples of the most common status codes that <command>svn status</command> can return. (Note that the text following <literal>#</literal> is not actually printed by <command>svn status</command>.)"
2505 msgstr "如果你在工作拷贝的顶级目录运行不带参数的<command>svn status</command>命令,它会检测你做的所有的文件或目录的修改,以下的例子是来展示<command>svn status</command>可能返回的状态码(注意,<literal>#</literal>之后的不是<command>svn status</command>打印的)。"
2507 #. (screen)
2508 #: ../source/book.xml:2699
2509 #, no-wrap
2510 msgid ""
2511 "\n"
2512 "A       stuff/loot/bloo.h   # file is scheduled for addition\n"
2513 "C       stuff/loot/lump.c   # file has textual conflicts from an update\n"
2514 "D       stuff/fish.c        # file is scheduled for deletion\n"
2515 "M       bar.c               # the content in bar.c has local modifications\n"
2516 msgstr ""
2517 "\n"
2518 "A       stuff/loot/bloo.h   # file is scheduled for addition\n"
2519 "C       stuff/loot/lump.c   # file has textual conflicts from an update\n"
2520 "D       stuff/fish.c        # file is scheduled for deletion\n"
2521 "M       bar.c               # the content in bar.c has local modifications\n"
2523 #. (para)
2524 #: ../source/book.xml:2705
2525 msgid "In this output format <command>svn status</command> prints six columns of characters, followed by several whitespace characters, followed by a file or directory name. The first column tells the status of a file or directory and/or its contents. The codes we listed are:"
2526 msgstr "在这种格式下,<command>svn status</command>打印6列字符,紧跟一些空格,接着是文件或者目录名。第一列告诉一个文件或目录的状态或它的内容,返回代码如下:"
2528 #. (computeroutput)
2529 #: ../source/book.xml:2713
2530 #, no-wrap
2531 msgid "A      item"
2532 msgstr "A      item"
2534 #. (para)
2535 #: ../source/book.xml:2716
2536 msgid "The file, directory, or symbolic link <filename>item</filename> has been scheduled for addition into the repository."
2537 msgstr "预定加入到版本库的文件、目录或符号链的<filename>item</filename>。"
2539 #. (computeroutput)
2540 #: ../source/book.xml:2723
2541 #, no-wrap
2542 msgid "C      item"
2543 msgstr "C      item"
2545 #. (para)
2546 #: ../source/book.xml:2726
2547 msgid "The file <filename>item</filename> is in a state of conflict. That is, changes received from the server during an update overlap with local changes that you have in your working copy. You must resolve this conflict before committing your changes to the repository."
2548 msgstr "文件<filename>item</filename>发生冲突,在从服务器更新时与本地版本发生交迭,在你提交到版本库前,必须手工的解决冲突。"
2550 #. (computeroutput)
2551 #: ../source/book.xml:2736
2552 #, no-wrap
2553 msgid "D      item"
2554 msgstr "D      item"
2556 #. (para)
2557 #: ../source/book.xml:2739
2558 msgid "The file, directory, or symbolic link <filename>item</filename> has been scheduled for deletion from the repository."
2559 msgstr "文件、目录或是符号链<filename>item</filename>预定从版本库中删除。"
2561 #. (computeroutput)
2562 #: ../source/book.xml:2746
2563 #, no-wrap
2564 msgid "M      item"
2565 msgstr "M      item"
2567 #. (para)
2568 #: ../source/book.xml:2749
2569 msgid "The contents of the file <filename>item</filename> have been modified."
2570 msgstr "文件<filename>item</filename>的内容被修改了。"
2572 #. (para)
2573 #: ../source/book.xml:2754
2574 msgid "If you pass a specific path to <command>svn status</command>, you get information about that item alone:"
2575 msgstr "如果你传递一个路径给<command>svn status</command>,它只给你这个项目的信息:"
2577 #. (screen)
2578 #: ../source/book.xml:2757
2579 #, no-wrap
2580 msgid ""
2581 "\n"
2582 "$ svn status stuff/fish.c\n"
2583 "D      stuff/fish.c\n"
2584 msgstr ""
2585 "\n"
2586 "$ svn status stuff/fish.c\n"
2587 "D      stuff/fish.c\n"
2589 #. (para)
2590 #: ../source/book.xml:2761
2591 msgid "<command>svn status</command> also has a <option>--verbose (-v)</option> option, which will show you the status of <emphasis>every</emphasis> item in your working copy, even if it has not been changed:"
2592 msgstr "<command>svn status</command>也有一个<option>--verbose (-v)</option>选项,它可以显示工作拷贝中的<emphasis>所有</emphasis>项目,即使没有改变过的:"
2594 #. (screen)
2595 #: ../source/book.xml:2765
2596 #, no-wrap
2597 msgid ""
2598 "\n"
2599 "$ svn status -v\n"
2600 "M               44        23    sally     README\n"
2601 "                44        30    sally     INSTALL\n"
2602 "M               44        20    harry     bar.c\n"
2603 "                44        18    ira       stuff\n"
2604 "                44        35    harry     stuff/trout.c\n"
2605 "D               44        19    ira       stuff/fish.c\n"
2606 "                44        21    sally     stuff/things\n"
2607 "A                0         ?     ?        stuff/things/bloo.h\n"
2608 "                44        36    harry     stuff/things/gloo.c\n"
2609 msgstr ""
2610 "\n"
2611 "$ svn status -v\n"
2612 "M               44        23    sally     README\n"
2613 "                44        30    sally     INSTALL\n"
2614 "M               44        20    harry     bar.c\n"
2615 "                44        18    ira       stuff\n"
2616 "                44        35    harry     stuff/trout.c\n"
2617 "D               44        19    ira       stuff/fish.c\n"
2618 "                44        21    sally     stuff/things\n"
2619 "A                0         ?     ?        stuff/things/bloo.h\n"
2620 "                44        36    harry     stuff/things/gloo.c\n"
2622 #. (para)
2623 #: ../source/book.xml:2777
2624 msgid "This is the <quote>long form</quote> output of <command>svn status</command>. The letters in the first column mean the same as before, but the second column shows the working-revision of the item. The third and fourth columns show the revision in which the item last changed, and who changed it."
2625 msgstr "这是<command>svn status</command>的<quote>加长形式</quote>,第一列保持相同,第二列显示一个工作版本号,第三和第四列显示最后一次修改的版本号和修改人(这些列不会与我们刚才提到的字符混淆)。"
2627 #. (para)
2628 #: ../source/book.xml:2783
2629 msgid "None of the prior invocations to <command>svn status</command> contact the repository—instead, they compare the metadata in the <filename>.svn</filename> directory with the working copy. Finally, there is the <option>--show-updates (-u)</option> option, which contacts the repository and adds information about things that are out-of-date:"
2630 msgstr "上面所有的<command>svn status</command>调用并没有联系版本库,只是与<filename>.svn</filename>中的原始数据进行比较的结果,最后,是<option>--show-updates (-u)</option>选项,它将会联系版本库为已经过时的数据添加新信息:"
2632 #. (screen)
2633 #: ../source/book.xml:2790
2634 #, no-wrap
2635 msgid ""
2636 "\n"
2637 "$ svn status -u -v\n"
2638 "M      *        44        23    sally     README\n"
2639 "M               44        20    harry     bar.c\n"
2640 "       *        44        35    harry     stuff/trout.c\n"
2641 "D               44        19    ira       stuff/fish.c\n"
2642 "A                0         ?     ?        stuff/things/bloo.h\n"
2643 "Status against revision:   46\n"
2644 msgstr ""
2645 "\n"
2646 "$ svn status -u -v\n"
2647 "M      *        44        23    sally     README\n"
2648 "M               44        20    harry     bar.c\n"
2649 "       *        44        35    harry     stuff/trout.c\n"
2650 "D               44        19    ira       stuff/fish.c\n"
2651 "A                0         ?     ?        stuff/things/bloo.h\n"
2652 "Status against revision:   46\n"
2654 #. (para)
2655 #: ../source/book.xml:2799
2656 msgid "Notice the two asterisks: if you were to run <command>svn update</command> at this point, you would receive changes to <filename>README</filename> and <filename>trout.c</filename>. This tells you some very useful information—you'll need to update and get the server changes on <filename>README</filename> before you commit, or the repository will reject your commit for being out-of-date. (More on this subject later.)"
2657 msgstr "注意这两个星号:如果你现在执行<command>svn update</command>,你的<filename>README</filename>和<filename>trout.c</filename>会被更新,这告诉你许多有用的信息—你可以在提交之前,需要使用更新操作得到文件<filename>README</filename>的更新,或者说文件已经过时,版本库会拒绝了你的提交。(后面还有更多关于此主题)。"
2659 #. (para)
2660 #: ../source/book.xml:2807
2661 msgid "<command>svn status</command> can display much more information about the files and directories in your working copy than we've shown here—for an exhaustive description of svn status and its output, see <xref linkend=\"svn.ref.svn.c.status\"/>."
2662 msgstr "关于文件和目录,<command>svn status</command>可以比我们的展示显示更多的内容,完整的描述可以看<xref linkend=\"svn.ref.svn.c.status\"/>。"
2664 #. (title)
2665 #: ../source/book.xml:2815
2666 msgid "Examine the details of your local modifications"
2667 msgstr "检查你的本地修改的详情"
2669 #. (para)
2670 #: ../source/book.xml:2817
2671 msgid "Another way to examine your changes is with the <command>svn diff</command> command. You can find out <emphasis>exactly</emphasis> how you've modified things by running <command>svn diff</command> with no arguments, which prints out file changes in <firstterm>unified diff format</firstterm>:"
2672 msgstr "另一种检查修改的方式是<command>svn diff</command>命令,你可以通过不带参数的<command>svn diff</command><emphasis>精确的</emphasis>找出你所做的修改,这会输出<firstterm>统一区别格式</firstterm>的区别信息:"
2674 #. (screen)
2675 #: ../source/book.xml:2823
2676 #, no-wrap
2677 msgid ""
2678 "\n"
2679 "$ svn diff\n"
2680 "Index: bar.c\n"
2681 "===================================================================\n"
2682 "--- bar.c\t(revision 3)\n"
2683 "+++ bar.c\t(working copy)\n"
2684 "@@ -1,7 +1,12 @@\n"
2685 "+#include &lt;sys/types.h&gt;\n"
2686 "+#include &lt;sys/stat.h&gt;\n"
2687 "+#include &lt;unistd.h&gt;\n"
2688 "+\n"
2689 "+#include &lt;stdio.h&gt;\n"
2690 "\n"
2691 " int main(void) {\n"
2692 "-  printf(\"Sixty-four slices of American Cheese...\\n\");\n"
2693 "+  printf(\"Sixty-five slices of American Cheese...\\n\");\n"
2694 " return 0;\n"
2695 " }\n"
2696 "\n"
2697 "Index: README\n"
2698 "===================================================================\n"
2699 "--- README\t(revision 3)\n"
2700 "+++ README\t(working copy)\n"
2701 "@@ -193,3 +193,4 @@\n"
2702 "+Note to self:  pick up laundry.\n"
2703 "\n"
2704 "Index: stuff/fish.c\n"
2705 "===================================================================\n"
2706 "--- stuff/fish.c\t(revision 1)\n"
2707 "+++ stuff/fish.c\t(working copy)\n"
2708 "-Welcome to the file known as 'fish'.\n"
2709 "-Information on fish will be here soon.\n"
2710 "\n"
2711 "Index: stuff/things/bloo.h\n"
2712 "===================================================================\n"
2713 "--- stuff/things/bloo.h\t(revision 8)\n"
2714 "+++ stuff/things/bloo.h\t(working copy)\n"
2715 "+Here is a new file to describe\n"
2716 "+things about bloo.\n"
2717 msgstr ""
2718 "\n"
2719 "$ svn diff\n"
2720 "Index: bar.c\n"
2721 "===================================================================\n"
2722 "--- bar.c\t(revision 3)\n"
2723 "+++ bar.c\t(working copy)\n"
2724 "@@ -1,7 +1,12 @@\n"
2725 "+#include &lt;sys/types.h&gt;\n"
2726 "+#include &lt;sys/stat.h&gt;\n"
2727 "+#include &lt;unistd.h&gt;\n"
2728 "+\n"
2729 "+#include &lt;stdio.h&gt;\n"
2730 "\n"
2731 " int main(void) {\n"
2732 "-  printf(\"Sixty-four slices of American Cheese...\\n\");\n"
2733 "+  printf(\"Sixty-five slices of American Cheese...\\n\");\n"
2734 " return 0;\n"
2735 " }\n"
2736 "\n"
2737 "Index: README\n"
2738 "===================================================================\n"
2739 "--- README\t(revision 3)\n"
2740 "+++ README\t(working copy)\n"
2741 "@@ -193,3 +193,4 @@\n"
2742 "+Note to self:  pick up laundry.\n"
2743 "\n"
2744 "Index: stuff/fish.c\n"
2745 "===================================================================\n"
2746 "--- stuff/fish.c\t(revision 1)\n"
2747 "+++ stuff/fish.c\t(working copy)\n"
2748 "-Welcome to the file known as 'fish'.\n"
2749 "-Information on fish will be here soon.\n"
2750 "\n"
2751 "Index: stuff/things/bloo.h\n"
2752 "===================================================================\n"
2753 "--- stuff/things/bloo.h\t(revision 8)\n"
2754 "+++ stuff/things/bloo.h\t(working copy)\n"
2755 "+Here is a new file to describe\n"
2756 "+things about bloo.\n"
2758 #. (para)
2759 #: ../source/book.xml:2863
2760 msgid "The <command>svn diff</command> command produces this output by comparing your working files against the cached <quote>pristine</quote> copies within the <filename>.svn</filename> area. Files scheduled for addition are displayed as all added-text, and files scheduled for deletion are displayed as all deleted text."
2761 msgstr "<command>svn diff</command>命令通过比较你的文件和<filename>.svn</filename>的<quote>原始</quote>文件来输出信息,预定要增加的文件会显示所有增加的文本,要删除的文件会显示所有要删除的文本。"
2763 #. (para)
2764 #: ../source/book.xml:2870
2765 msgid "Output is displayed in unified diff format. That is, removed lines are prefaced with <literal>-</literal> and added lines are prefaced with <literal>+</literal>. <command>svn diff</command> also prints filename and offset information useful to the <command>patch</command> program, so you can generate <quote>patches</quote> by redirecting the diff output to a file:"
2766 msgstr "输出的格式为统一区别格式(unified diff format),删除的行前面加一个<literal>-</literal>,添加的行前面有一个<literal>+</literal>,<command>svn diff</command>命令也打印文件名和<command>打补丁</command>需要的信息,所以你可以通过重定向一个区别文件来生成<quote>补丁</quote>:"
2768 #. (screen)
2769 #: ../source/book.xml:2878
2770 #, no-wrap
2771 msgid ""
2772 "\n"
2773 "$ svn diff &gt; patchfile\n"
2774 msgstr ""
2775 "\n"
2776 "$ svn diff &gt; patchfile\n"
2778 #. (para)
2779 #: ../source/book.xml:2881
2780 msgid "You could, for example, email the patch file to another developer for review or testing prior to commit."
2781 msgstr "举个例子,你可以把补丁文件发送邮件到其他开发者,在提交之前审核和测试。"
2783 #. (para)
2784 #: ../source/book.xml:2883
2785 msgid "Subversion uses its internal diff engine, which produces unified diff format, by default. If you want diff output in a different format, specify an external diff program using <option>--diff-cmd</option> and pass any flags you'd like to it using the <option>--extensions (-x)</option> option. For example, to see local differences in file <filename>foo.c</filename> in context output format while ignoring case differences, you might run <command>svn diff --diff-cmd /usr/bin/diff --extensions '-i' foo.c</command>."
2786 msgstr "Subversion使用内置区别引擎,缺省情况下输出为统一区别格式。如果你期望不同的输出格式,你可以使用<option>--diff-cmd</option>指定外置的区别程序,并且通过<option>--extensions</option>传递其他参数,举个例子,察看本地文件<filename>foo.c</filename>的区别,同时忽略大小写差异,你可以运行<command>svn diff --diff-cmd /usr/bin/diff --extensions '-bc' foo.c</command>。"
2788 #. (title)
2789 #: ../source/book.xml:2898
2790 msgid "Undoing Working Changes"
2791 msgstr "取消本地修改"
2793 #. (para)
2794 #: ../source/book.xml:2900
2795 msgid "Suppose while viewing the output of <command>svn diff</command> you determine that all the changes you made to a particular file are mistakes. Maybe you shouldn't have changed the file at all, or perhaps it would be easier to make different changes starting from scratch."
2796 msgstr "假定我们在看<command>svn diff</command>的输出,你发现对某个文件的所有修改都是错误的,或许你根本不应该修改这个文件,或者是从开头重新修改会更加容易。"
2798 #. (para)
2799 #: ../source/book.xml:2905
2800 msgid "This is a perfect opportunity to use <command>svn revert</command>:"
2801 msgstr "这是使用<command>svn revert</command>的好机会:"
2803 #. (screen)
2804 #: ../source/book.xml:2907
2805 #, no-wrap
2806 msgid ""
2807 "\n"
2808 "$ svn revert README\n"
2809 "Reverted 'README'\n"
2810 msgstr ""
2811 "\n"
2812 "$ svn revert README\n"
2813 "Reverted 'README'\n"
2815 #. (para)
2816 #: ../source/book.xml:2911
2817 msgid "Subversion reverts the file to its pre-modified state by overwriting it with the cached <quote>pristine</quote> copy from the <filename>.svn</filename> area. But also note that <command>svn revert</command> can undo <emphasis>any</emphasis> scheduled operations—for example, you might decide that you don't want to add a new file after all:"
2818 msgstr "Subversion把文件恢复到未修改的状态,叫做<filename>.svn</filename>目录的<quote>原始</quote>拷贝,应该知道<command>svn revert</command>可以恢复任何预定要做的操作,举个例子,你不再想添加一个文件:"
2820 #. (screen)
2821 #: ../source/book.xml:2918
2822 #, no-wrap
2823 msgid ""
2824 "\n"
2825 "$ svn status foo\n"
2826 "?      foo\n"
2827 "\n"
2828 "$ svn add foo\n"
2829 "A         foo\n"
2830 "\n"
2831 "$ svn revert foo\n"
2832 "Reverted 'foo'\n"
2833 "\n"
2834 "$ svn status foo\n"
2835 "?      foo\n"
2836 msgstr ""
2837 "\n"
2838 "$ svn status foo\n"
2839 "?      foo\n"
2840 "\n"
2841 "$ svn add foo\n"
2842 "A         foo\n"
2843 "\n"
2844 "$ svn revert foo\n"
2845 "Reverted 'foo'\n"
2846 "\n"
2847 "$ svn status foo\n"
2848 "?      foo\n"
2850 #. (para)
2851 #: ../source/book.xml:2932
2852 msgid "<command>svn revert</command><replaceable>ITEM</replaceable> has exactly the same effect as deleting <replaceable>ITEM</replaceable> from your working copy and then running <command>svn update -r BASE</command><replaceable>ITEM</replaceable>. However, if you're reverting a file, <command>svn revert</command> has one very noticeable difference—it doesn't have to communicate with the repository to restore your file."
2853 msgstr "<command>svn revert</command><replaceable>ITEM</replaceable>的效果与删除<replaceable>ITEM</replaceable>然后执行<command>svn update -r BASE</command><replaceable>ITEM</replaceable>完全一样,但是,如果你使用<command>svn revert</command>它不必通知版本库就可以恢复文件。"
2855 #. (para)
2856 #: ../source/book.xml:2941
2857 msgid "Or perhaps you mistakenly removed a file from version control:"
2858 msgstr "或许你不小心删除了一个文件:"
2860 #. (screen)
2861 #: ../source/book.xml:2943
2862 #, no-wrap
2863 msgid ""
2864 "\n"
2865 "$ svn status README\n"
2866 "       README\n"
2867 "\n"
2868 "$ svn delete README\n"
2869 "D         README\n"
2870 "\n"
2871 "$ svn revert README\n"
2872 "Reverted 'README'\n"
2873 "\n"
2874 "$ svn status README\n"
2875 "       README\n"
2876 msgstr ""
2877 "\n"
2878 "$ svn status README\n"
2879 "       README\n"
2880 "\n"
2881 "$ svn delete README\n"
2882 "D         README\n"
2883 "\n"
2884 "$ svn revert README\n"
2885 "Reverted 'README'\n"
2886 "\n"
2887 "$ svn status README\n"
2888 "       README\n"
2890 #. (title)
2891 #: ../source/book.xml:2960
2892 msgid "Resolve Conflicts (Merging Others' Changes)"
2893 msgstr "解决冲突(合并别人的修改)"
2895 #. (para)
2896 #: ../source/book.xml:2962
2897 msgid "We've already seen how <command>svn status -u</command> can predict conflicts. Suppose you run <command>svn update</command> and some interesting things occur:"
2898 msgstr "我们可以使用<command>svn status -u</command>来预测冲突,当你运行<command>svn update</command>一些有趣的事情发生了:"
2900 #. (screen)
2901 #: ../source/book.xml:2965
2902 #, no-wrap
2903 msgid ""
2904 "\n"
2905 "$ svn update\n"
2906 "U  INSTALL\n"
2907 "G  README\n"
2908 "C  bar.c\n"
2909 "Updated to revision 46.\n"
2910 msgstr ""
2911 "\n"
2912 "$ svn update\n"
2913 "U  INSTALL\n"
2914 "G  README\n"
2915 "C  bar.c\n"
2916 "Updated to revision 46.\n"
2918 #. (para)
2919 #: ../source/book.xml:2972
2920 msgid "The <computeroutput>U</computeroutput> and <computeroutput>G</computeroutput> codes are no cause for concern; those files cleanly absorbed changes from the repository. The files marked with <computeroutput>U</computeroutput> contained no local changes but were <computeroutput>U</computeroutput>pdated with changes from the repository. The <computeroutput>G</computeroutput> stands for mer<computeroutput>G</computeroutput>ed, which means that the file had local changes to begin with, but the changes coming from the repository didn't overlap with the local changes."
2921 msgstr "<computeroutput>U</computeroutput>和<computeroutput>G</computeroutput>没必要关心,文件干净的接受了版本库的变化,文件标示为<computeroutput>U</computeroutput>表明本地没有修改,文件已经根据版本库更新。<computeroutput>G</computeroutput>标示合并,标示本地已经修改过,与版本库没有重迭的地方,已经合并。"
2923 #. (para)
2924 #: ../source/book.xml:2983
2925 msgid "But the <computeroutput>C</computeroutput> stands for <computeroutput>c</computeroutput>onflict. This means that the changes from the server overlapped with your own, and now you have to manually choose between them."
2926 msgstr "但是<computeroutput>C</computeroutput>表示冲突,说明服务器上的改动同你的改动冲突了,你需要自己手工去解决。"
2928 #. (para)
2929 #: ../source/book.xml:2987
2930 msgid "Whenever a conflict occurs, three things typically occur to assist you in noticing and resolving that conflict:"
2931 msgstr "当冲突发生了,有三件事可以帮助你注意到这种情况和解决问题:"
2933 #. (para)
2934 #: ../source/book.xml:2991
2935 msgid "Subversion prints a <computeroutput>C</computeroutput> during the update, and remembers that the file is in a state of conflict."
2936 msgstr "Subversion在更新时打印<computeroutput>C</computeroutput>标记,并且标记这个文件已冲突。"
2938 #. (para)
2939 #: ../source/book.xml:2996
2940 msgid "If Subversion considers the file to be mergeable, it places <firstterm>conflict markers</firstterm>—special strings of text which delimit the <quote>sides</quote> of the conflict—into the file to visibly demonstrate the overlapping areas. (Subversion uses the <literal>svn:mime-type</literal> property to decide if a file is capable of contextual, line-based merging. See <xref linkend=\"svn.advanced.props.special.mime-type\"/> to learn more.)"
2941 msgstr "如果Subversion认为这个文件是可合并的,它会置入<firstterm>冲突标记</firstterm>—特殊的横线分开冲突的<quote>两面</quote>—在文件里可视化的描述重叠的部分(Subversion使用<literal>svn:mime-type</literal>属性来决定一个文件是否可以使用上下文的,以行为基础的合并,更多信息可以看<xref linkend=\"svn.advanced.props.special.mime-type\"/>。)"
2943 #. (para)
2944 #: ../source/book.xml:3007
2945 msgid "For every conflicted file, Subversion places three extra unversioned files in your working copy:"
2946 msgstr "对于每一个冲突的文件,Subversion放置三个额外的未版本化文件到你的工作拷贝:"
2948 #. (filename)
2949 #: ../source/book.xml:3012
2950 msgid "filename.mine"
2951 msgstr "filename.mine"
2953 #. (para)
2954 #: ../source/book.xml:3015
2955 msgid "This is your file as it existed in your working copy before you updated your working copy—that is, without conflict markers. This file has only your latest changes in it. (If Subversion considers the file to be unmergeable, then the <filename>.mine</filename> file isn't created, since it would be identical to the working file.)"
2956 msgstr "你更新前的文件,没有冲突标志,只是你最新更改的内容。(如果Subversion认为这个文件不可以合并,<filename>.mine</filename>文件不会创建,因为它和工作文件相同。)"
2958 #. (filename)
2959 #: ../source/book.xml:3026
2960 msgid "filename.rOLDREV"
2961 msgstr "filename.rOLDREV"
2963 #. (para)
2964 #: ../source/book.xml:3029
2965 msgid "This is the file that was the <literal>BASE</literal> revision before you updated your working copy. That is, the file that you checked out before you made your latest edits."
2966 msgstr "这是你的做更新操作以前的<literal>BASE</literal>版本文件,就是你在上次更新之后未作更改的版本。"
2968 #. (filename)
2969 #: ../source/book.xml:3038
2970 msgid "filename.rNEWREV"
2971 msgstr "filename.rNEWREV"
2973 #. (para)
2974 #: ../source/book.xml:3041
2975 msgid "This is the file that your Subversion client just received from the server when you updated your working copy. This file corresponds to the <literal>HEAD</literal> revision of the repository."
2976 msgstr "这是你的Subversion客户端从服务器刚刚收到的版本,这个文件对应版本库的<literal>HEAD</literal>版本。"
2978 #. (para)
2979 #: ../source/book.xml:3049
2980 msgid "Here <literal>OLDREV</literal> is the revision number of the file in your <filename>.svn</filename> directory and <literal>NEWREV</literal> is the revision number of the repository <literal>HEAD</literal>."
2981 msgstr "这里<literal>OLDREV</literal>是你的<filename>.svn</filename>目录中的修订版本号,<literal>NEWREV</literal>是版本库中<literal>HEAD</literal>的版本号。"
2983 #. (para)
2984 #: ../source/book.xml:3055
2985 msgid "For example, Sally makes changes to the file <filename>sandwich.txt</filename> in the repository. Harry has just changed the file in his working copy and checked it in. Sally updates her working copy before checking in and she gets a conflict:"
2986 msgstr "举一个例子,Sally修改了<filename>sandwich.txt</filename>,Harry刚刚改变了他的本地拷贝中的这个文件并且提交到服务器,Sally在提交之前更新它的工作拷贝得到了冲突:"
2988 #. (screen)
2989 #: ../source/book.xml:3060
2990 #, no-wrap
2991 msgid ""
2992 "\n"
2993 "$ svn update\n"
2994 "C  sandwich.txt\n"
2995 "Updated to revision 2.\n"
2996 "$ ls -1\n"
2997 "sandwich.txt\n"
2998 "sandwich.txt.mine\n"
2999 "sandwich.txt.r1\n"
3000 "sandwich.txt.r2\n"
3001 msgstr ""
3002 "\n"
3003 "$ svn update\n"
3004 "C  sandwich.txt\n"
3005 "Updated to revision 2.\n"
3006 "$ ls -1\n"
3007 "sandwich.txt\n"
3008 "sandwich.txt.mine\n"
3009 "sandwich.txt.r1\n"
3010 "sandwich.txt.r2\n"
3012 #. (para)
3013 #: ../source/book.xml:3070
3014 msgid "At this point, Subversion will <emphasis>not</emphasis> allow you to commit the file <filename>sandwich.txt</filename> until the three temporary files are removed."
3015 msgstr "在这种情况下,Subversion<emphasis>不</emphasis>会允许你提交<filename>sandwich.txt</filename>,直到你的三个临时文件被删掉。"
3017 #. (screen)
3018 #: ../source/book.xml:3073
3019 #, no-wrap
3020 msgid ""
3021 "\n"
3022 "$ svn commit -m \"Add a few more things\"\n"
3023 "svn: Commit failed (details follow):\n"
3024 "svn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict\n"
3025 msgstr ""
3026 "\n"
3027 "$ svn commit -m \"Add a few more things\"\n"
3028 "svn: Commit failed (details follow):\n"
3029 "svn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict\n"
3031 #. (para)
3032 #: ../source/book.xml:3078
3033 msgid "If you get a conflict, you need to do one of three things:"
3034 msgstr "如果你遇到冲突,三件事你可以选择:"
3036 #. (para)
3037 #: ../source/book.xml:3082
3038 msgid "Merge the conflicted text <quote>by hand</quote> (by examining and editing the conflict markers within the file)."
3039 msgstr "<quote>手动</quote>合并冲突文本(检查和修改文件中的冲突标志)。"
3041 #. (para)
3042 #: ../source/book.xml:3087
3043 msgid "Copy one of the temporary files on top of your working file."
3044 msgstr "用某一个临时文件覆盖你的工作文件。"
3046 #. (para)
3047 #: ../source/book.xml:3091
3048 msgid "Run <command>svn revert &lt;filename&gt;</command> to throw away all of your local changes."
3049 msgstr "运行<command>svn revert &lt;filename&gt;</command>来放弃所有的本地修改。"
3051 #. (para)
3052 #: ../source/book.xml:3099
3053 msgid "You can always remove the temporary files yourself, but would you really want to do that when Subversion can do it for you? We didn't think so."
3054 msgstr "你也可以手工的删除这三个临时文件,但是当Subversion会给你做时你会自己去做吗?我们是这样想的。"
3056 #. (para)
3057 #: ../source/book.xml:3095
3058 msgid "Once you've resolved the conflict, you need to let Subversion know by running <command>svn resolved</command>. This removes the three temporary files and Subversion no longer considers the file to be in a state of conflict.<placeholder-1/>"
3059 msgstr "一旦你解决了冲突,你需要通过命令<command>svn resolved</command>让Subversion知道,这样就会删除三个临时文件,Subversion就不会认为这个文件是在冲突状态了。<placeholder-1/>"
3061 #. (screen)
3062 #: ../source/book.xml:3102
3063 #, no-wrap
3064 msgid ""
3065 "\n"
3066 "$ svn resolved sandwich.txt\n"
3067 "Resolved conflicted state of 'sandwich.txt'\n"
3068 msgstr ""
3069 "\n"
3070 "$ svn resolved sandwich.txt\n"
3071 "Resolved conflicted state of 'sandwich.txt'\n"
3073 #. (title)
3074 #: ../source/book.xml:3109
3075 msgid "Merging Conflicts by Hand"
3076 msgstr "手工合并冲突"
3078 #. (para)
3079 #: ../source/book.xml:3111
3080 msgid "Merging conflicts by hand can be quite intimidating the first time you attempt it, but with a little practice, it can become as easy as falling off a bike."
3081 msgstr "第一次尝试解决冲突让人感觉很害怕,但经过一点训练,它简单的像是骑着车子下坡。"
3083 #. (para)
3084 #: ../source/book.xml:3114
3085 msgid "Here's an example. Due to a miscommunication, you and Sally, your collaborator, both edit the file <filename>sandwich.txt</filename> at the same time. Sally commits her changes, and when you go to update your working copy, you get a conflict and you're going to have to edit <filename>sandwich.txt</filename> to resolve the conflicts. First, let's take a look at the file:"
3086 msgstr "这里一个简单的例子,由于不良的交流,你和同事Sally,同时编辑了<filename>sandwich.txt</filename>。Sally提交了修改,当你准备更新你的工作拷贝,冲突发生了,我们不得不去修改<filename>sandwich.txt</filename>来解决这个问题。首先,看一下这个文件:"
3088 #. (screen)
3089 #: ../source/book.xml:3121
3090 #, no-wrap
3091 msgid ""
3092 "\n"
3093 "$ cat sandwich.txt\n"
3094 "Top piece of bread\n"
3095 "Mayonnaise\n"
3096 "Lettuce\n"
3097 "Tomato\n"
3098 "Provolone\n"
3099 "&lt;&lt;&lt;&lt;&lt;&lt;&lt; .mine\n"
3100 "Salami\n"
3101 "Mortadella\n"
3102 "Prosciutto\n"
3103 "=======\n"
3104 "Sauerkraut\n"
3105 "Grilled Chicken\n"
3106 "&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r2\n"
3107 "Creole Mustard\n"
3108 "Bottom piece of bread\n"
3109 msgstr ""
3110 "\n"
3111 "$ cat sandwich.txt\n"
3112 "Top piece of bread\n"
3113 "Mayonnaise\n"
3114 "Lettuce\n"
3115 "Tomato\n"
3116 "Provolone\n"
3117 "&lt;&lt;&lt;&lt;&lt;&lt;&lt; .mine\n"
3118 "Salami\n"
3119 "Mortadella\n"
3120 "Prosciutto\n"
3121 "=======\n"
3122 "Sauerkraut\n"
3123 "Grilled Chicken\n"
3124 "&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r2\n"
3125 "Creole Mustard\n"
3126 "Bottom piece of bread\n"
3128 #. (para)
3129 #: ../source/book.xml:3139
3130 msgid "The strings of less-than signs, equal signs, and greater-than signs are conflict markers, and are not part of the actual data in conflict. You generally want to ensure that those are removed from the file before your next commit. The text between the first two sets of markers is composed of the changes you made in the conflicting area:"
3131 msgstr "小于号、等于号和大于号串是冲突标记,并不是冲突的数据,你一定要确定这些内容在下次提交之前得到删除,前两组标志中间的内容是你在冲突区所做的修改:"
3133 #. (screen)
3134 #: ../source/book.xml:3146
3135 #, no-wrap
3136 msgid ""
3137 "\n"
3138 "&lt;&lt;&lt;&lt;&lt;&lt;&lt; .mine\n"
3139 "Salami\n"
3140 "Mortadella\n"
3141 "Prosciutto\n"
3142 "=======\n"
3143 msgstr ""
3144 "\n"
3145 "&lt;&lt;&lt;&lt;&lt;&lt;&lt; .mine\n"
3146 "Salami\n"
3147 "Mortadella\n"
3148 "Prosciutto\n"
3149 "=======\n"
3151 #. (para)
3152 #: ../source/book.xml:3153
3153 msgid "The text between the second and third sets of conflict markers is the text from Sally's commit:"
3154 msgstr "后两组之间的是Sally提交的修改冲突:"
3156 #. (screen)
3157 #: ../source/book.xml:3155
3158 #, no-wrap
3159 msgid ""
3160 "\n"
3161 "=======\n"
3162 "Sauerkraut\n"
3163 "Grilled Chicken\n"
3164 "&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r2\n"
3165 msgstr ""
3166 "\n"
3167 "=======\n"
3168 "Sauerkraut\n"
3169 "Grilled Chicken\n"
3170 "&gt;&gt;&gt;&gt;&gt;&gt;&gt; .r2\n"
3172 #. (para)
3173 #: ../source/book.xml:3166
3174 msgid "And if you ask them for it, they may very well ride you out of town on a rail."
3175 msgstr "如果你向他们询问,他们非常有理由把你带到城外的铁轨上。"
3177 #. (para)
3178 #: ../source/book.xml:3161
3179 msgid "Usually you won't want to just delete the conflict markers and Sally's changes—she's going to be awfully surprised when the sandwich arrives and it's not what she wanted. So this is where you pick up the phone or walk across the office and explain to Sally that you can't get sauerkraut from an Italian deli.<placeholder-1/> Once you've agreed on the changes you will check in, edit your file and remove the conflict markers."
3180 msgstr "通常你并不希望只是删除冲突标志和Sally的修改—当她收到三明治时,会非常的吃惊。所以你应该走到她的办公室或是拿起电话告诉Sally,你没办法从从意大利熟食店得到想要的泡菜。<placeholder-1/>一旦你们确认了提交内容后,修改文件并且删除冲突标志。"
3182 #. (screen)
3183 #: ../source/book.xml:3171
3184 #, no-wrap
3185 msgid ""
3186 "\n"
3187 "Top piece of bread\n"
3188 "Mayonnaise\n"
3189 "Lettuce\n"
3190 "Tomato\n"
3191 "Provolone\n"
3192 "Salami\n"
3193 "Mortadella\n"
3194 "Prosciutto\n"
3195 "Creole Mustard\n"
3196 "Bottom piece of bread\n"
3197 msgstr ""
3198 "\n"
3199 "Top piece of bread\n"
3200 "Mayonnaise\n"
3201 "Lettuce\n"
3202 "Tomato\n"
3203 "Provolone\n"
3204 "Salami\n"
3205 "Mortadella\n"
3206 "Prosciutto\n"
3207 "Creole Mustard\n"
3208 "Bottom piece of bread\n"
3210 #. (para)
3211 #: ../source/book.xml:3183
3212 msgid "Now run <command>svn resolved</command>, and you're ready to commit your changes:"
3213 msgstr "现在运行<command>svn resolved</command>,你已经准备好提交了:"
3215 #. (screen)
3216 #: ../source/book.xml:3185
3217 #, no-wrap
3218 msgid ""
3219 "\n"
3220 "$ svn resolved sandwich.txt\n"
3221 "$ svn commit -m \"Go ahead and use my sandwich, discarding Sally's edits.\"\n"
3222 msgstr ""
3223 "\n"
3224 "$ svn resolved sandwich.txt\n"
3225 "$ svn commit -m \"Go ahead and use my sandwich, discarding Sally's edits.\"\n"
3227 #. (para)
3228 #: ../source/book.xml:3189
3229 msgid "Note that <command>svn resolved</command>, unlike most of the other commands we deal with in this chapter, requires an argument. In any case, you want to be careful and only run <command>svn resolved</command> when you're certain that you've fixed the conflict in your file—once the temporary files are removed, Subversion will let you commit the file even if it still contains conflict markers."
3230 msgstr "现在我们准备好提交修改了,注意<command>svn resolved</command>不像我们本章学过的其他命令一样需要参数,在任何你认为解决了冲突的时候,只需要小心运行<command>svn resolved</command>,—一旦删除了临时文件,Subversion会让你提交这文件,即使文件中还存在冲突标记。"
3232 #. (para)
3233 #: ../source/book.xml:3196
3234 msgid "If you ever get confused while editing the conflicted file, you can always consult the three files that Subversion creates for you in your working copy—including your file as it was before you updated. You can even use a third-party interactive merging tool to examine those three files."
3235 msgstr "记住,如果你修改冲突时感到混乱,你可以参考subversion生成的三个文件—包括你未作更新的文件。你也可以使用三方交互合并工具检验这三个文件。"
3237 #. (title)
3238 #: ../source/book.xml:3206
3239 msgid "Copying a File Onto Your Working File"
3240 msgstr "复制文件到你的工作文件"
3242 #. (para)
3243 #: ../source/book.xml:3208
3244 msgid "If you get a conflict and decide that you want to throw out your changes, you can merely copy one of the temporary files created by Subversion over the file in your working copy:"
3245 msgstr "如果你只是希望取消你的修改,你可以仅仅拷贝Subversion为你生成的文件替换你的工作拷贝:"
3247 #. (screen)
3248 #: ../source/book.xml:3212
3249 #, no-wrap
3250 msgid ""
3251 "\n"
3252 "$ svn update\n"
3253 "C  sandwich.txt\n"
3254 "Updated to revision 2.\n"
3255 "$ ls sandwich.*\n"
3256 "sandwich.txt  sandwich.txt.mine  sandwich.txt.r2  sandwich.txt.r1\n"
3257 "$ cp sandwich.txt.r2 sandwich.txt\n"
3258 "$ svn resolved sandwich.txt\n"
3259 msgstr ""
3260 "\n"
3261 "$ svn update\n"
3262 "C  sandwich.txt\n"
3263 "Updated to revision 2.\n"
3264 "$ ls sandwich.*\n"
3265 "sandwich.txt  sandwich.txt.mine  sandwich.txt.r2  sandwich.txt.r1\n"
3266 "$ cp sandwich.txt.r2 sandwich.txt\n"
3267 "$ svn resolved sandwich.txt\n"
3269 #. (title)
3270 #: ../source/book.xml:3225
3271 msgid "Punting: Using <command>svn revert</command>"
3272 msgstr "脚注:使用<command>svn revert</command>"
3274 #. (para)
3275 #: ../source/book.xml:3227
3276 msgid "If you get a conflict, and upon examination decide that you want to throw out your changes and start your edits again, just revert your changes:"
3277 msgstr "如果你得到冲突,经过检查你决定取消自己的修改并且重新编辑,你可以恢复你的修改:"
3279 #. (screen)
3280 #: ../source/book.xml:3230
3281 #, no-wrap
3282 msgid ""
3283 "\n"
3284 "$ svn revert sandwich.txt\n"
3285 "Reverted 'sandwich.txt'\n"
3286 "$ ls sandwich.*\n"
3287 "sandwich.txt\n"
3288 msgstr ""
3289 "\n"
3290 "$ svn revert sandwich.txt\n"
3291 "Reverted 'sandwich.txt'\n"
3292 "$ ls sandwich.*\n"
3293 "sandwich.txt\n"
3295 #. (para)
3296 #: ../source/book.xml:3236
3297 msgid "Note that when you revert a conflicted file, you don't have to run <command>svn resolved</command>."
3298 msgstr "注意,当你恢复一个冲突的文件时,不需要再运行<command>svn resolved</command>。"
3300 #. (title)
3301 #: ../source/book.xml:3243
3302 msgid "Commit Your Changes"
3303 msgstr "提交你的修改"
3305 #. (para)
3306 #: ../source/book.xml:3245
3307 msgid "Finally! Your edits are finished, you've merged all changes from the server, and you're ready to commit your changes to the repository."
3308 msgstr "最后!你的修改结束了,你合并了服务器上所有的修改,你准备好提交修改到版本库。"
3310 #. (para)
3311 #: ../source/book.xml:3248
3312 msgid "The <command>svn commit</command> command sends all of your changes to the repository. When you commit a change, you need to supply a <firstterm>log message</firstterm>, describing your change. Your log message will be attached to the new revision you create. If your log message is brief, you may wish to supply it on the command line using the <option>--message</option> (or <option>-m</option>) option:"
3313 msgstr "<command>svn commit</command>命令发送所有的修改到版本库,当你提交修改时,你需要提供一些描述修改的<firstterm>日志信息</firstterm>,你的信息会附到这个修订版本上,如果信息很简短,你可以在命令行中使用<option>--message</option>(或<option>-m</option>)选项:"
3315 #. (screen)
3316 #: ../source/book.xml:3256
3317 #, no-wrap
3318 msgid ""
3319 "\n"
3320 "$ svn commit -m \"Corrected number of cheese slices.\"\n"
3321 "Sending        sandwich.txt\n"
3322 "Transmitting file data .\n"
3323 "Committed revision 3.\n"
3324 msgstr ""
3325 "\n"
3326 "$ svn commit -m \"Corrected number of cheese slices.\"\n"
3327 "Sending        sandwich.txt\n"
3328 "Transmitting file data .\n"
3329 "Committed revision 3.\n"
3331 #. (para)
3332 #: ../source/book.xml:3262
3333 msgid "However, if you've been composing your log message as you work, you may want to tell Subversion to get the message from a file by passing the filename with the <option>--file (-F)</option> option:"
3334 msgstr "然而,如果你把写日志信息当作工作的一部分,你也许会希望告诉Subversion通过一个文件名得到日志信息,使用<option>--file</option>选项:"
3336 #. (screen)
3337 #: ../source/book.xml:3266
3338 #, no-wrap
3339 msgid ""
3340 "\n"
3341 "$ svn commit -F logmsg\n"
3342 "Sending        sandwich.txt\n"
3343 "Transmitting file data .\n"
3344 "Committed revision 4.\n"
3345 msgstr ""
3346 "\n"
3347 "$ svn commit -F logmsg\n"
3348 "Sending        sandwich.txt\n"
3349 "Transmitting file data .\n"
3350 "Committed revision 4.\n"
3352 #. (para)
3353 #: ../source/book.xml:3272
3354 msgid "If you fail to specify either the <option>--message</option> or <option>--file</option> option, then Subversion will automatically launch your favorite editor (see the <literal>editor-cmd</literal> section in <xref linkend=\"svn.advanced.confarea.opts.config\"/>) for composing a log message."
3355 msgstr "如果你没有指定<option>--message</option>或者<option>--file</option>选项,Subversion会自动地启动你最喜欢的编辑器(见<xref linkend=\"svn.advanced.confarea.opts.config\"/>的<literal>editor-cmd</literal>部分)来编辑日志信息。"
3357 #. (para)
3358 #: ../source/book.xml:3279
3359 msgid "If you're in your editor writing a commit message and decide that you want to cancel your commit, you can just quit your editor without saving changes. If you've already saved your commit message, simply delete the text, save again, then abort."
3360 msgstr "如果你使用编辑器撰写日志信息时希望取消提交,你可以直接关掉编辑器,不要保存,如果你已经做过保存,只要简单的删掉所有的文本并再次保存,然后退出。"
3362 #. (screen)
3363 #: ../source/book.xml:3284
3364 #, no-wrap
3365 msgid ""
3366 "\n"
3367 "$ svn commit\n"
3368 "Waiting for Emacs...Done\n"
3369 "\n"
3370 "Log message unchanged or not specified\n"
3371 "a)bort, c)ontinue, e)dit\n"
3372 "a\n"
3373 "$\n"
3374 msgstr ""
3375 "\n"
3376 "$ svn commit\n"
3377 "Waiting for Emacs...Done\n"
3378 "\n"
3379 "Log message unchanged or not specified\n"
3380 "a)bort, c)ontinue, e)dit\n"
3381 "a\n"
3382 "$\n"
3384 #. (para)
3385 #: ../source/book.xml:3294
3386 msgid "The repository doesn't know or care if your changes make any sense as a whole; it only checks to make sure that nobody else has changed any of the same files that you did when you weren't looking. If somebody <emphasis>has</emphasis> done that, the entire commit will fail with a message informing you that one or more of your files is out-of-date:"
3387 msgstr "版本库不知道也不关心你的修改作为一个整体是否有意义,它只检查是否有其他人修改了同一个文件,如果别人<emphasis>已经</emphasis>这样做了,你的整个提交会失败,并且提示你一个或多个文件已经过时了:"
3389 #. (screen)
3390 #: ../source/book.xml:3300
3391 #, no-wrap
3392 msgid ""
3393 "\n"
3394 "$ svn commit -m \"Add another rule\"\n"
3395 "Sending        rules.txt\n"
3396 "svn: Commit failed (details follow):\n"
3397 "svn: Your file or directory 'sandwich.txt' is probably out-of-date\n"
3398 "…\n"
3399 msgstr ""
3400 "\n"
3401 "$ svn commit -m \"Add another rule\"\n"
3402 "Sending        rules.txt\n"
3403 "svn: Commit failed (details follow):\n"
3404 "svn: Your file or directory 'sandwich.txt' is probably out-of-date\n"
3405 "…\n"
3407 #. (para)
3408 #: ../source/book.xml:3307
3409 msgid "(The exact wording of this error message depends on the network protocol and server you're using, but the idea is the same in all cases.)"
3410 msgstr "(错误信息的精确措辞依赖于网络协议和你使用的服务器,但对于所有的情况,其思想完全一样。)"
3412 #. (para)
3413 #: ../source/book.xml:3310
3414 msgid "At this point, you need to run <command>svn update</command>, deal with any merges or conflicts that result, and attempt your commit again."
3415 msgstr "此刻,你需要运行<command>svn update</command>来处理所有的合并和冲突,然后再尝试提交。"
3417 #. (para)
3418 #: ../source/book.xml:3313
3419 msgid "That covers the basic work cycle for using Subversion. There are many other features in Subversion that you can use to manage your repository and working copy, but most of your day-to-day use of Subversion will involve only the commands that we've discussed so far in this chapter. We will, however, cover a few more commands that you'll use fairly often."
3420 msgstr "我们已经覆盖了Subversion基本的工作周期,还有许多其它特性可以管理你得版本库和工作拷贝,但是只使用前面介绍的命令你就可以很进行日常工作了,我们还会覆盖更多用的还算频繁的命令。"
3422 #. (title)
3423 #: ../source/book.xml:3327
3424 msgid "Examining History"
3425 msgstr "检验历史"
3427 #. (para)
3428 #: ../source/book.xml:3329
3429 msgid "Your Subversion repository is like a time machine. It keeps a record of every change ever committed, and allows you to explore this history by examining previous versions of files and directories as well as the metadata that accompanies them. With a single Subversion command, you can check out the repository (or restore an existing working copy) exactly as it was at any date or revision number in the past. However, sometimes you just want to <emphasis>peer into</emphasis> the past instead of <emphasis>going into</emphasis> the past."
3430 msgstr "你的版本库就像是一台时间机器,它记录了所有提交的修改,允许你检查文件或目录以及相关元数据的历史。通过一个Subversion命令你可以根据时间或修订号取出一个过去的版本(或者恢复现在的工作拷贝),然而,有时候我们只是想<emphasis>看看</emphasis>历史而不想<emphasis>回到</emphasis>历史。"
3432 #. (para)
3433 #: ../source/book.xml:3338
3434 msgid "There are several commands that can provide you with historical data from the repository:"
3435 msgstr "有许多命令可以为你提供版本库历史:"
3437 #. (command), (refname)
3438 #: ../source/book.xml:3343 ../source/book.xml:19323
3439 msgid "svn log"
3440 msgstr "svn log"
3442 #. (para)
3443 #: ../source/book.xml:3346
3444 msgid "Shows you broad information: log messages with date and author information attached to revisions, and which paths changed in each revision."
3445 msgstr "展示给你主要信息:每个版本附加在版本上的作者与日期信息和所有路径修改。"
3447 #. (para)
3448 #: ../source/book.xml:3356
3449 msgid "Shows line-level details of a particular change."
3450 msgstr "显示特定修改的行级详细信息。"
3452 #. (command), (refname)
3453 #: ../source/book.xml:3361 ../source/book.xml:3638 ../source/book.xml:17679
3454 msgid "svn cat"
3455 msgstr "svn cat"
3457 #. (para)
3458 #: ../source/book.xml:3364
3459 msgid "Retrieves a file as it existed in a particular revision number and display it on your screen."
3460 msgstr "取得在特定版本的某一个文件显示在当前屏幕。"
3462 #. (command), (refname)
3463 #: ../source/book.xml:3370 ../source/book.xml:3663 ../source/book.xml:19111
3464 msgid "svn list"
3465 msgstr "svn list"
3467 #. (para)
3468 #: ../source/book.xml:3373
3469 msgid "Displays the files in a directory for any given revision."
3470 msgstr "显示一个目录在某一版本存在的文件。"
3472 #. (title)
3473 #: ../source/book.xml:3381
3474 msgid "Generating a list of historical changes"
3475 msgstr "产生历史修改列表"
3477 #. (para)
3478 #: ../source/book.xml:3383
3479 msgid "To find information about the history of a file or directory, use the <command>svn log</command> command. <command>svn log</command> will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit."
3480 msgstr "找出一个文件或目录的历史信息,使用<command>svn log</command>命令,<command>svn log</command>将会提供你一条记录,包括:谁对文件或目录作了修改、哪个修订版本作了修改、修订版本的日期和时间、还有如果你当时提供了日志信息,也会显示。"
3482 #. (screen)
3483 #: ../source/book.xml:3390
3484 #, no-wrap
3485 msgid ""
3486 "\n"
3487 "$ svn log\n"
3488 "------------------------------------------------------------------------\n"
3489 "r3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line\n"
3490 "\n"
3491 "Added include lines and corrected # of cheese slices.\n"
3492 "------------------------------------------------------------------------\n"
3493 "r2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line\n"
3494 "\n"
3495 "Added main() methods.\n"
3496 "------------------------------------------------------------------------\n"
3497 "r1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line\n"
3498 "\n"
3499 "Initial import\n"
3500 "------------------------------------------------------------------------\n"
3501 msgstr ""
3502 "\n"
3503 "$ svn log\n"
3504 "------------------------------------------------------------------------\n"
3505 "r3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line\n"
3506 "\n"
3507 "Added include lines and corrected # of cheese slices.\n"
3508 "------------------------------------------------------------------------\n"
3509 "r2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line\n"
3510 "\n"
3511 "Added main() methods.\n"
3512 "------------------------------------------------------------------------\n"
3513 "r1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line\n"
3514 "\n"
3515 "Initial import\n"
3516 "------------------------------------------------------------------------\n"
3518 #. (para)
3519 #: ../source/book.xml:3406
3520 msgid "Note that the log messages are printed in <emphasis>reverse chronological order</emphasis> by default. If you wish to see a different range of revisions in a particular order, or just a single revision, pass the <option>--revision (-r)</option> option:"
3521 msgstr "注意日志信息缺省根据<emphasis>时间逆序排列</emphasis>,如果希望察看特定顺序的一段修订版本或者单一版本,使用<option>--revision(-r)</option> 选项:"
3523 #. (screen)
3524 #: ../source/book.xml:3411
3525 #, no-wrap
3526 msgid ""
3527 "\n"
3528 "$ svn log -r 5:19    # shows logs 5 through 19 in chronological order\n"
3529 "\n"
3530 "$ svn log -r 19:5    # shows logs 5 through 19 in reverse order\n"
3531 "\n"
3532 "$ svn log -r 8       # shows log for revision 8\n"
3533 msgstr ""
3534 "\n"
3535 "$ svn log -r 5:19    # shows logs 5 through 19 in chronological order\n"
3536 "\n"
3537 "$ svn log -r 19:5    # shows logs 5 through 19 in reverse order\n"
3538 "\n"
3539 "$ svn log -r 8       # shows log for revision 8\n"
3541 #. (para)
3542 #: ../source/book.xml:3418
3543 msgid "You can also examine the log history of a single file or directory. For example:"
3544 msgstr "你也可以检查单个文件或目录的日志历史,举个例子:"
3546 #. (screen)
3547 #: ../source/book.xml:3420
3548 #, no-wrap
3549 msgid ""
3550 "\n"
3551 "$ svn log foo.c\n"
3552 "…\n"
3553 "$ svn log http://foo.com/svn/trunk/code/foo.c\n"
3554 "…\n"
3555 msgstr ""
3556 "\n"
3557 "$ svn log foo.c\n"
3558 "…\n"
3559 "$ svn log http://foo.com/svn/trunk/code/foo.c\n"
3560 "…\n"
3562 #. (para)
3563 #: ../source/book.xml:3426
3564 msgid "These will display log messages <emphasis>only</emphasis> for those revisions in which the working file (or URL) changed."
3565 msgstr "这样<emphasis>只会</emphasis>显示这个工作文件(或者URL)做过修订的版本的日志信息。"
3567 #. (title)
3568 #: ../source/book.xml:3431
3569 #, fuzzy
3570 msgid "Why Does <command>svn log</command> Not Show Me What I Just Committed?"
3571 msgstr "为什么<command>svn log</command>给我一个空的回应?"
3573 #. (para)
3574 #: ../source/book.xml:3434
3575 msgid "If you make a commit and immediately type <command>svn log</command> with no arguments, you may notice that your most recent commit doesn't show up in the list of log messages. This is due to a combination of the behavior of <command>svn commit</command> and the default behavior of <command>svn log</command>. First, when you commit changes to the repository, <command>svn</command> only bumps the revision of files (and directories) that it commits, so usually the parent directory remains at the older revision (See <xref linkend=\"svn.basic.in-action.mixedrevs.update-commit\"/> for why). <command>svn log</command> then defaults to fetching the history of the directory at its current revision, and thus you don't see the newly-committed changes. The solution here is to either update your working copy or explicitly provide a revision number to <command>svn log</command> by using the <option>--revision</option> (<option>-r</option>) option."
3576 msgstr ""
3578 #. (para)
3579 #: ../source/book.xml:3452
3580 msgid "If you want even more information about a file or directory, <command>svn log</command> also takes a <option>--verbose (-v)</option> option. Because Subversion allows you to move and copy files and directories, it is important to be able to track path changes in the filesystem, so in verbose mode, <command>svn log</command> will include a list of changed paths in a revision in its output:"
3581 msgstr "如果你希望得到目录和文件更多的信息,你可以对<command>svn log</command>命令使用<option>--verbose (-v)</option>开关,因为Subversion允许移动和复制文件和目录,所以跟踪路径修改非常重要,在详细模式下,<command>svn log</command> 输出中会包括一个路径修改的历史:"
3583 #. (screen)
3584 #: ../source/book.xml:3459
3585 #, no-wrap
3586 msgid ""
3587 "\n"
3588 "$ svn log -r 8 -v\n"
3589 "------------------------------------------------------------------------\n"
3590 "r8 | sally | 2002-07-14 08:15:29 -0500 | 1 line\n"
3591 "Changed paths:\n"
3592 "M /trunk/code/foo.c\n"
3593 "M /trunk/code/bar.h\n"
3594 "A /trunk/code/doc/README\n"
3595 "\n"
3596 "Frozzled the sub-space winch.\n"
3597 "\n"
3598 "------------------------------------------------------------------------\n"
3599 msgstr ""
3600 "\n"
3601 "$ svn log -r 8 -v\n"
3602 "------------------------------------------------------------------------\n"
3603 "r8 | sally | 2002-07-14 08:15:29 -0500 | 1 line\n"
3604 "Changed paths:\n"
3605 "M /trunk/code/foo.c\n"
3606 "M /trunk/code/bar.h\n"
3607 "A /trunk/code/doc/README\n"
3608 "\n"
3609 "Frozzled the sub-space winch.\n"
3610 "\n"
3611 "------------------------------------------------------------------------\n"
3613 #. (para)
3614 #: ../source/book.xml:3472
3615 msgid "<command>svn log</command> also takes a <option>--quiet</option> (<option>-q</option>) option, which suppresses the body of the log message. When combined with <option>--verbose</option>, it gives just the names of the changed files."
3616 msgstr "<command>svn log</command>也有一个<option>--quiet</option> (<option>-q</option>)选项,会禁止日志信息的主要部分,当与<option>--verbose</option>结合使用,仅会显示修改的文件名。"
3618 #. (title)
3619 #: ../source/book.xml:3478
3620 msgid "Why Does <command>svn log</command> Give Me an Empty Response?"
3621 msgstr "为什么<command>svn log</command>给我一个空的回应?"
3623 #. (para)
3624 #: ../source/book.xml:3481
3625 msgid "After working with Subversion for a bit, most users will come across something like this:"
3626 msgstr "当使用Subversion一些时间后,许多用户会遇到这种情况:"
3628 #. (screen)
3629 #: ../source/book.xml:3483
3630 #, no-wrap
3631 msgid ""
3632 "\n"
3633 "$ svn log -r 2\n"
3634 "------------------------------------------------------------------------\n"
3635 "$\n"
3636 msgstr ""
3637 "\n"
3638 "$ svn log -r 2\n"
3639 "------------------------------------------------------------------------\n"
3640 "$\n"
3642 #. (para)
3643 #: ../source/book.xml:3488
3644 msgid "At first glance, this seems like an error. But recall that while revisions are repository-wide, <command>svn log</command> operates on a path in the repository. If you supply no path, Subversion uses the current working directory as the default target. As a result, if you're operating in a subdirectory of your working copy and attempt to see the log of a revision in which neither that directory nor any of its children was changed, Subversion will show you an empty log. If you want to see what changed in that revision, try pointing <command>svn log</command> directly at the top-most URL of your repository, as in <command>svn log -r 2 http://svn.collab.net/repos/svn</command>."
3645 msgstr "乍一看,好像是一个错误,但是想一下修订版本号是作用在版本库整体之上的,如果你没有提供路径,<command>svn log</command>会使用当前目录作为默认的目标,所以,作为结果,如果你对一个本身和子目录在指定版本到现在没有做过修改的目录运行这个命令,你会得到空的日志。如果你希望察看某个版本做的修改的日志,只需要直接告诉<command>svn log</command>使用版本库顶级的目录作为参数,例如<command>svn log -r 2 http://svn.collab.net/repos/svn</command>。"
3647 #. (title)
3648 #: ../source/book.xml:3505
3649 msgid "Examining the details of historical changes"
3650 msgstr "检查历史修改的详情"
3652 #. (para)
3653 #: ../source/book.xml:3507
3654 msgid "We've already seen <command>svn diff</command> before—it displays file differences in unified diff format; it was used to show the local modifications made to our working copy before committing to the repository."
3655 msgstr "我们已经看过<command>svn diff</command>—使用标准区别文件格式显示区别,它在提交前用来显示本地工作拷贝与版本库的区别。"
3657 #. (para)
3658 #: ../source/book.xml:3511
3659 msgid "In fact, it turns out that there are <emphasis>three</emphasis> distinct uses of <command>svn diff</command>:"
3660 msgstr "事实上,<command>svn diff</command>有<emphasis>三</emphasis>种不同的用法:"
3662 #. (para)
3663 #: ../source/book.xml:3516
3664 msgid "Examining local changes"
3665 msgstr "检查本地修改"
3667 #. (para)
3668 #: ../source/book.xml:3519
3669 msgid "Comparing your working copy to the repository"
3670 msgstr "比较工作拷贝与版本库"
3672 #. (para)
3673 #: ../source/book.xml:3522
3674 msgid "Comparing repository to repository"
3675 msgstr "比较版本库与版本库"
3677 #. (title)
3678 #: ../source/book.xml:3528
3679 msgid "Examining Local Changes"
3680 msgstr "比较本地修改"
3682 #. (para)
3683 #: ../source/book.xml:3530
3684 msgid "As we've seen, invoking <command>svn diff</command> with no options will compare your working files to the cached <quote>pristine</quote> copies in the <filename>.svn</filename> area:"
3685 msgstr "像我们看到的,不使用任何参数调用时,<command>svn diff</command>将会比较你的工作文件与缓存在<filename>.svn</filename>的<quote>原始</quote>拷贝:"
3687 #. (screen)
3688 #: ../source/book.xml:3534
3689 #, no-wrap
3690 msgid ""
3691 "\n"
3692 "$ svn diff\n"
3693 "Index: rules.txt\n"
3694 "===================================================================\n"
3695 "--- rules.txt\t(revision 3)\n"
3696 "+++ rules.txt\t(working copy)\n"
3697 "@@ -1,4 +1,5 @@\n"
3698 " Be kind to others\n"
3699 " Freedom = Responsibility\n"
3700 " Everything in moderation\n"
3701 "-Chew with your mouth open\n"
3702 "+Chew with your mouth closed\n"
3703 "+Listen when others are speaking\n"
3704 "$\n"
3705 msgstr ""
3706 "\n"
3707 "$ svn diff\n"
3708 "Index: rules.txt\n"
3709 "===================================================================\n"
3710 "--- rules.txt\t(revision 3)\n"
3711 "+++ rules.txt\t(working copy)\n"
3712 "@@ -1,4 +1,5 @@\n"
3713 " Be kind to others\n"
3714 " Freedom = Responsibility\n"
3715 " Everything in moderation\n"
3716 "-Chew with your mouth open\n"
3717 "+Chew with your mouth closed\n"
3718 "+Listen when others are speaking\n"
3719 "$\n"
3721 #. (title)
3722 #: ../source/book.xml:3553
3723 msgid "Comparing Working Copy to Repository"
3724 msgstr "比较工作副本和版本库"
3726 #. (para)
3727 #: ../source/book.xml:3555
3728 msgid "If a single <option>--revision</option> (<option>-r</option>) number is passed, then your working copy is compared to the specified revision in the repository."
3729 msgstr "如果传递一个<option>--revision</option>(<option>-r</option>)参数,你的工作拷贝会与指定的版本比较。"
3731 #. (screen)
3732 #: ../source/book.xml:3559
3733 #, no-wrap
3734 msgid ""
3735 "\n"
3736 "$ svn diff -r 3 rules.txt\n"
3737 "Index: rules.txt\n"
3738 "===================================================================\n"
3739 "--- rules.txt\t(revision 3)\n"
3740 "+++ rules.txt\t(working copy)\n"
3741 "@@ -1,4 +1,5 @@\n"
3742 " Be kind to others\n"
3743 " Freedom = Responsibility\n"
3744 " Everything in moderation\n"
3745 "-Chew with your mouth open\n"
3746 "+Chew with your mouth closed\n"
3747 "+Listen when others are speaking\n"
3748 "$\n"
3749 msgstr ""
3750 "\n"
3751 "$ svn diff -r 3 rules.txt\n"
3752 "Index: rules.txt\n"
3753 "===================================================================\n"
3754 "--- rules.txt\t(revision 3)\n"
3755 "+++ rules.txt\t(working copy)\n"
3756 "@@ -1,4 +1,5 @@\n"
3757 " Be kind to others\n"
3758 " Freedom = Responsibility\n"
3759 " Everything in moderation\n"
3760 "-Chew with your mouth open\n"
3761 "+Chew with your mouth closed\n"
3762 "+Listen when others are speaking\n"
3763 "$\n"
3765 #. (title)
3766 #: ../source/book.xml:3578
3767 msgid "Comparing Repository to Repository"
3768 msgstr "比较版本库与版本库"
3770 #. (para)
3771 #: ../source/book.xml:3580
3772 msgid "If two revision numbers, separated by a colon, are passed via <option>--revision (-r)</option>, then the two revisions are directly compared."
3773 msgstr "如果通过<option>--revision</option> (<option>-r</option>)传递两个通过冒号分开的版本号,这两个版本会进行比较。"
3775 #. (screen)
3776 #: ../source/book.xml:3583
3777 #, no-wrap
3778 msgid ""
3779 "\n"
3780 "$ svn diff -r 2:3 rules.txt\n"
3781 "Index: rules.txt\n"
3782 "===================================================================\n"
3783 "--- rules.txt\t(revision 2)\n"
3784 "+++ rules.txt\t(revision 3)\n"
3785 "@@ -1,4 +1,4 @@\n"
3786 " Be kind to others\n"
3787 "-Freedom = Chocolate Ice Cream\n"
3788 "+Freedom = Responsibility\n"
3789 " Everything in moderation\n"
3790 " Chew with your mouth open\n"
3791 "$\n"
3792 msgstr ""
3793 "\n"
3794 "$ svn diff -r 2:3 rules.txt\n"
3795 "Index: rules.txt\n"
3796 "===================================================================\n"
3797 "--- rules.txt\t(revision 2)\n"
3798 "+++ rules.txt\t(revision 3)\n"
3799 "@@ -1,4 +1,4 @@\n"
3800 " Be kind to others\n"
3801 "-Freedom = Chocolate Ice Cream\n"
3802 "+Freedom = Responsibility\n"
3803 " Everything in moderation\n"
3804 " Chew with your mouth open\n"
3805 "$\n"
3807 #. (para)
3808 #: ../source/book.xml:3597
3809 msgid "A more convenient way of comparing a revision to the previous revision is to use the <option>--change (-c)</option>:"
3810 msgstr "与前一个修订版本比较更方便的办法是使用<option>--change (-c)</option>:"
3812 #. (screen)
3813 #: ../source/book.xml:3600
3814 #, no-wrap
3815 msgid ""
3816 "\n"
3817 "$ svn diff -c 3 rules.txt\n"
3818 "Index: rules.txt\n"
3819 "===================================================================\n"
3820 "--- rules.txt\t(revision 2)\n"
3821 "+++ rules.txt\t(revision 3)\n"
3822 "@@ -1,4 +1,4 @@\n"
3823 " Be kind to others\n"
3824 "-Freedom = Chocolate Ice Cream\n"
3825 "+Freedom = Responsibility\n"
3826 " Everything in moderation\n"
3827 " Chew with your mouth open\n"
3828 "$\n"
3829 msgstr ""
3830 "\n"
3831 "$ svn diff -c 3 rules.txt\n"
3832 "Index: rules.txt\n"
3833 "===================================================================\n"
3834 "--- rules.txt\t(revision 2)\n"
3835 "+++ rules.txt\t(revision 3)\n"
3836 "@@ -1,4 +1,4 @@\n"
3837 " Be kind to others\n"
3838 "-Freedom = Chocolate Ice Cream\n"
3839 "+Freedom = Responsibility\n"
3840 " Everything in moderation\n"
3841 " Chew with your mouth open\n"
3842 "$\n"
3844 #. (para)
3845 #: ../source/book.xml:3614
3846 msgid "Lastly, you can compare repository revisions even when you don't have a working copy on your local machine, just by including the appropriate URL on the command line:"
3847 msgstr "最后,即使你在本机没有工作拷贝,还是可以比较版本库的修订版本,只需要在命令行中输入合适的URL:"
3849 #. (screen)
3850 #: ../source/book.xml:3617
3851 #, no-wrap
3852 msgid ""
3853 "\n"
3854 "$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt\n"
3855 "…\n"
3856 "$\n"
3857 msgstr ""
3858 "\n"
3859 "$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt\n"
3860 "…\n"
3861 "$\n"
3863 #. (title)
3864 #: ../source/book.xml:3627
3865 msgid "Browsing the repository"
3866 msgstr "浏览版本库"
3868 #. (para)
3869 #: ../source/book.xml:3629
3870 msgid "Using <command>svn cat</command> and <command>svn list</command>, you can view various revisions of files and directories without changing the working revision of your working copy. In fact, you don't even need a working copy to use either one."
3871 msgstr "通过<command>svn cat</command>和<command>svn list</command>,你可以在未修改工作修订版本的情况下查看文件和目录的内容,实际上,你甚至也不需要有一个工作拷贝。"
3873 #. (para)
3874 #: ../source/book.xml:3641
3875 msgid "If you want to examine an earlier version of a file and not necessarily the differences between two files, you can use <command>svn cat</command>:"
3876 msgstr "如果你只是希望检查一个过去的版本而不希望察看它们的区别,使用<command>svn cat</command>:"
3878 #. (screen)
3879 #: ../source/book.xml:3644
3880 #, no-wrap
3881 msgid ""
3882 "\n"
3883 "$ svn cat -r 2 rules.txt\n"
3884 "Be kind to others\n"
3885 "Freedom = Chocolate Ice Cream\n"
3886 "Everything in moderation\n"
3887 "Chew with your mouth open\n"
3888 "$\n"
3889 msgstr ""
3890 "\n"
3891 "$ svn cat -r 2 rules.txt\n"
3892 "Be kind to others\n"
3893 "Freedom = Chocolate Ice Cream\n"
3894 "Everything in moderation\n"
3895 "Chew with your mouth open\n"
3896 "$\n"
3898 #. (para)
3899 #: ../source/book.xml:3652
3900 msgid "You can also redirect the output directly into a file:"
3901 msgstr "你可以重定向输出到一个文件:"
3903 #. (screen)
3904 #: ../source/book.xml:3654
3905 #, no-wrap
3906 msgid ""
3907 "\n"
3908 "$ svn cat -r 2 rules.txt &gt; rules.txt.v2\n"
3909 "$\n"
3910 msgstr ""
3911 "\n"
3912 "$ svn cat -r 2 rules.txt &gt; rules.txt.v2\n"
3913 "$\n"
3915 #. (para)
3916 #: ../source/book.xml:3666
3917 msgid "The <command>svn list</command> command shows you what files are in a repository directory without actually downloading the files to your local machine:"
3918 msgstr "<command>svn list</command>可以在不下载文件到本地目录的情况下来察看目录中的文件:"
3920 #. (screen)
3921 #: ../source/book.xml:3669
3922 #, no-wrap
3923 msgid ""
3924 "\n"
3925 "$ svn list http://svn.collab.net/repos/svn\n"
3926 "README\n"
3927 "branches/\n"
3928 "clients/\n"
3929 "tags/\n"
3930 "trunk/\n"
3931 msgstr ""
3932 "\n"
3933 "$ svn list http://svn.collab.net/repos/svn\n"
3934 "README\n"
3935 "branches/\n"
3936 "clients/\n"
3937 "tags/\n"
3938 "trunk/\n"
3940 #. (para)
3941 #: ../source/book.xml:3677
3942 msgid "If you want a more detailed listing, pass the <option>--verbose (-v)</option> flag to get output like this:"
3943 msgstr "如果你希望察看详细信息,你可以使用<option>--verbose(-v)</option> 参数:"
3945 #. (screen)
3946 #: ../source/book.xml:3680
3947 #, no-wrap
3948 msgid ""
3949 "\n"
3950 "$ svn list -v http://svn.collab.net/repos/svn\n"
3951 "  20620 harry            1084 Jul 13  2006 README\n"
3952 "  23339 harry                 Feb 04 01:40 branches/\n"
3953 "  21282 sally                 Aug 27 09:41 developer-resources/\n"
3954 "  23198 harry                 Jan 23 17:17 tags/\n"
3955 "  23351 sally                 Feb 05 13:26 trunk/\n"
3956 msgstr ""
3957 "\n"
3958 "$ svn list -v http://svn.collab.net/repos/svn\n"
3959 "  20620 harry            1084 Jul 13  2006 README\n"
3960 "  23339 harry                 Feb 04 01:40 branches/\n"
3961 "  21282 sally                 Aug 27 09:41 developer-resources/\n"
3962 "  23198 harry                 Jan 23 17:17 tags/\n"
3963 "  23351 sally                 Feb 05 13:26 trunk/\n"
3965 #. (para)
3966 #: ../source/book.xml:3688
3967 msgid "The columns tell you the revision at which the file or directory was last modified, the user who modified it, the size if it is a file, the date it was last modified, and the item's name."
3968 msgstr "这些列告诉你文件和目录最后修改的修订版本、做出修改的用户、如果是文件还会有文件的大小,最后是修改日期和项目的名字。"
3970 #. (para)
3971 #: ../source/book.xml:3693
3972 msgid "The <command>svn list</command> with no arguments defaults to the <emphasis>repository URL</emphasis> of the current working directory, <emphasis>not</emphasis> the local working copy directory. After all, if you wanted a listing of your local directory, you could use just plain <command>ls</command> (or any reasonable non-Unixy equivalent)."
3973 msgstr "没有任何参数的<command>svn list</command>命令缺省使用当前工作拷贝的<emphasis>版本库URL</emphasis>,而<emphasis>不是</emphasis>本地工作拷贝的目录。毕竟,如果你希望列出本地目录,你只需要使用<command>ls</command>(或任何合理的非UNIX等价物)。"
3975 #. (title)
3976 #: ../source/book.xml:3706
3977 msgid "Fetching older repository snapshots"
3978 msgstr "获得旧的版本库快照"
3980 #. (para)
3981 #: ../source/book.xml:3712
3982 msgid "See? We told you that Subversion was a time machine."
3983 msgstr "看到了吧?我们说过Subversion是一个时间机器。"
3985 #. (para)
3986 #: ../source/book.xml:3708
3987 msgid "In addition to all of the above commands, you can use <command>svn update</command> and <command>svn checkout</command> with the <option>--revision</option> option to take an entire working copy <quote>back in time</quote><placeholder-1/>:"
3988 msgstr "除了以上的命令,你可以使用带参数<option>--revision</option>的<command>svn update</command>和<command>svn checkout</command>来使整个工作拷贝<quote>回到过去</quote><placeholder-1/>:"
3990 #. (screen)
3991 #: ../source/book.xml:3714
3992 #, no-wrap
3993 msgid ""
3994 "\n"
3995 "$ svn checkout -r 1729 # Checks out a new working copy at r1729\n"
3996 "…\n"
3997 "$ svn update -r 1729 # Updates an existing working copy to r1729\n"
3998 "…\n"
3999 msgstr ""
4000 "\n"
4001 "$ svn checkout -r 1729 # Checks out a new working copy at r1729\n"
4002 "…\n"
4003 "$ svn update -r 1729 # Updates an existing working copy to r1729\n"
4004 "…\n"
4006 #. (para)
4007 #: ../source/book.xml:3721
4008 #, fuzzy
4009 msgid "Many Subversion newcomers attempt to use the above <command>svn update</command> example to <quote>undo</quote> committed changes, but this won't work as you can't commit changes that you obtain from backdating a working copy if the changed files have newer revisions. See <xref linkend=\"svn.branchmerge.advanced.resurrect\"/> for a description of how to <quote>undo</quote> a commit."
4010 msgstr "许多Subversion新手使用前面的<command>svn update</command>实例来<quote>回退</quote>修改,但是你不能提交修改,你获得有新修订版本的过时工作拷贝也是没有用的。关于如何<quote>回退</quote>,我们可以看<xref linkend=\"svn.branchmerge.commonuses.resurrect\"/>。"
4012 #. (para)
4013 #: ../source/book.xml:3728
4014 msgid "Lastly, if you're building a release and wish to bundle up your files from Subversion but don't want those pesky <filename>.svn</filename> directories in the way, then you can use <command>svn export</command> to create a local copy of all or part of your repository sans <filename>.svn</filename> directories. As with <command>svn update</command> and <command>svn checkout</command>, you can also pass the <option>--revision</option> option to <command>svn export</command>:"
4015 msgstr "最后,如果你构建了一个版本,并且希望从Subversion打包文件,但是你不希望有讨厌的.svn目录,这时你可以导出版本库的一部分文件而没有.svn目录。就像<command>svn update</command>和<command>svn checkout</command>,你也可以传递<option>--revision</option>选项给<command>svn export</command>:"
4017 #. (screen)
4018 #: ../source/book.xml:3738
4019 #, no-wrap
4020 msgid ""
4021 "\n"
4022 "$ svn export http://svn.example.com/svn/repos1 # Exports latest revision\n"
4023 "…\n"
4024 "$ svn export http://svn.example.com/svn/repos1 -r 1729\n"
4025 "# Exports revision r1729\n"
4026 "…\n"
4027 msgstr ""
4028 "\n"
4029 "$ svn export http://svn.example.com/svn/repos1 # Exports latest revision\n"
4030 "…\n"
4031 "$ svn export http://svn.example.com/svn/repos1 -r 1729\n"
4032 "# Exports revision r1729\n"
4033 "…\n"
4035 #. (title)
4036 #: ../source/book.xml:3752
4037 msgid "Sometimes You Just Need to Clean Up"
4038 msgstr "有时你只需要清理"
4040 #. (para)
4041 #: ../source/book.xml:3754
4042 msgid "When Subversion modifies your working copy (or any information within <filename>.svn</filename>), it tries to do so as safely as possible. Before changing the working copy, Subversion writes its intentions to a log file. Next it executes the commands in the log file to apply the requested change, holding a lock on the relevant part of the working copy while it works—to prevent other Subversion clients from accessing the working copy in mid-change. Finally, Subversion removes the log file. Architecturally, this is similar to a journaled filesystem. If a Subversion operation is interrupted (if the process is killed, or if the machine crashes, for example), the log files remain on disk. By re-executing the log files, Subversion can complete the previously started operation, and your working copy can get itself back into a consistent state."
4043 msgstr "当Subversion改变你的工作拷贝(或是<filename>.svn</filename>中的任何信息),它会尽可能的小心,在修改任何事情之前,它把意图写到日志文件中去,然后执行log文件中的命令,并且执行过程中在工作拷贝的相关部分保存一个锁— 防止Subversion客户端在变更过程中访问工作拷贝。然后删掉日志文件,这与记帐试的文件系统架构类似。如果Subversion的操作中断了(举个例子:进程被杀死了,机器死掉了),日志文件会保存在硬盘上,通过重新执行日志文件,Subversion可以完成上一次开始的操作,你的工作拷贝可以回到一致的状态。"
4045 #. (para)
4046 #: ../source/book.xml:3769
4047 msgid "And this is exactly what <command>svn cleanup</command> does: it searches your working copy and runs any leftover logs, removing working copy locks in the process. If Subversion ever tells you that some part of your working copy is <quote>locked</quote>, then this is the command that you should run. Also, <command>svn status</command> will display an <literal>L</literal> next to locked items:"
4048 msgstr "这就是<command>svn cleanup</command>所作的:它查找工作拷贝中的所有遗留的日志文件,删除进程中工作拷贝的锁。如果Subversion告诉你工作拷贝中的一部分已经<quote>锁定</quote>了,你就需要运行这个命令了。同样,<command>svn status</command>将会使用<literal>L</literal> 标示锁定的项目:"
4050 #. (screen)
4051 #: ../source/book.xml:3776
4052 #, no-wrap
4053 msgid ""
4054 "\n"
4055 "$ svn status\n"
4056 "  L    somedir\n"
4057 "M      somedir/foo.c\n"
4058 "\n"
4059 "$ svn cleanup\n"
4060 "$ svn status\n"
4061 "M      somedir/foo.c\n"
4062 msgstr ""
4063 "\n"
4064 "$ svn status\n"
4065 "  L    somedir\n"
4066 "M      somedir/foo.c\n"
4067 "\n"
4068 "$ svn cleanup\n"
4069 "$ svn status\n"
4070 "M      somedir/foo.c\n"
4072 #. (para)
4073 #: ../source/book.xml:3785
4074 msgid "Don't confuse these working copy locks with the ordinary locks that Subversion users create when using the <quote>lock-modify-unlock</quote> model of concurrent version control; see <xref linkend=\"svn.advanced.locking.meanings\"/> for clarification."
4075 msgstr "Don't confuse these working copy locks with the ordinary locks that Subversion users create when using the <quote>lock-modify-unlock</quote> model of concurrent version control; see <xref linkend=\"svn.advanced.locking.meanings\"/> for clarification."
4077 #. (para)
4078 #: ../source/book.xml:3799
4079 msgid "Now we've covered most of the Subversion client commands. Notable exceptions are those dealing with branching and merging (see <xref linkend=\"svn.branchmerge\"/>) and properties (see <xref linkend=\"svn.advanced.props\"/>). However, you may want to take a moment to skim through <xref linkend=\"svn.ref\"/> to get an idea of all the many different commands that Subversion has—and how you can use them to make your work easier."
4080 msgstr "我们已经覆盖了大多数Subversion的客户端命令,引人注目的例外是处理分支与合并(见<xref linkend=\"svn.branchmerge\"/>)以及属性(见<xref linkend=\"svn.advanced.props\"/>)的命令,然而你也许会希望跳到<xref linkend=\"svn.ref\"/>来察看所有不同的命令—怎样利用它们使你的工作更容易。"
4082 #. (title)
4083 #: ../source/book.xml:3816
4084 msgid "Advanced Topics"
4085 msgstr "高级主题"
4087 #. (para)
4088 #: ../source/book.xml:3818
4089 msgid "If you've been reading this book chapter by chapter, from start to finish, you should by now have acquired enough knowledge to use the Subversion client to perform the most common version control operations. You understand how to check out a working copy from a Subversion repository. You are comfortable with submitting and receiving changes using the <command>svn commit</command> and <command>svn update</command> functions. You've probably even developed a reflex which causes you to run the <command>svn status</command> command almost unconsciously. For all intents and purposes, you are ready to use Subversion in a typical environment."
4090 msgstr "如果你是从头到尾按章节阅读本书,你一定已经具备了使用Subversion客户端执行大多数不同的版本控制操作足够的知识,你理解了怎样从Subversion版本库取出一个工作拷贝,你已经熟悉了通过<command>svn commit</command>和<command>svn update</command>来提交和接收修改,你甚至也经常下意识的使用<command>svn status</command>,无论目的是什么,你已经可以正常使用Subversion了。"
4092 #. (para)
4093 #: ../source/book.xml:3829
4094 msgid "But the Subversion feature set doesn't stop at <quote>common version control operations</quote>. It has other bits of functionality besides just communicating file and directory changes to and from a central repository."
4095 msgstr "但是Subversion的特性并没有止于<quote>普通的版本控制操作</quote>,它也有一些超越了与版本库传递文件和目录修改以外的功能。"
4097 #. (para)
4098 #: ../source/book.xml:3833
4099 msgid "This chapter highlights some of Subversion's features that, while important, aren't part of the typical user's daily routine. It assumes that you are familiar with Subversion's basic file and directory versioning capabilities. If you aren't, you'll want to first read <xref linkend=\"svn.basic\"/> and <xref linkend=\"svn.tour\"/>. Once you've mastered those basics and consumed this chapter, you'll be a Subversion power-user!"
4100 msgstr "本章重点介绍了一些很重要但不是经常使用的Subversion特性,本章假定你熟悉Subversion对文件和目录的基本版本操作能力,如果你还没有阅读这些内容,或者是需要一个复习,我们建议你重读<xref linkend=\"svn.basic\"/>和<xref linkend=\"svn.tour\"/>,一旦你已经掌握了基础知识和本章的内容,你会变成Subversion的超级用户!"
4102 #. (title)
4103 #: ../source/book.xml:3844
4104 msgid "Revision Specifiers"
4105 msgstr "版本清单"
4107 #. (para)
4108 #: ../source/book.xml:3846
4109 msgid "As you saw in <xref linkend=\"svn.basic.in-action.revs\"/>, revision numbers in Subversion are pretty straightforward—integers that keep getting larger as you commit more changes to your versioned data. Still, it doesn't take long before you can no longer remember exactly what happened in each and every revision. Fortunately, the typical Subversion workflow doesn't often demand that you supply arbitrary revisions to the Subversion operations you perform. For operations that <emphasis>do</emphasis> require a revision specifier, you generally supply a revision number that you saw in a commit email, in the output of some other Subversion operation, or in some other context that would give meaning to that particular number."
4110 msgstr "就像你在<xref linkend=\"svn.basic.in-action.revs\"/>见到的,Subversion的修订版本号码非常直接—就是随提交增大的整数。尽管如此,不会花很长时间你就会忘记每个修订版本的修改,但幸运的是,典型的Subvesion工作流程中一般不会要求你提供任意的修订版本号。在需要输入修订版本号时,通常或者是你在一个提交邮件中看到了一个修订版本,或者是在其他Subversion命令的输出结果中,或者是任何上下文环境得到某个版本号码的情况下。"
4112 #. (para)
4113 #: ../source/book.xml:3859
4114 msgid "But occasionally, you need to pinpoint a moment in time for which you don't already have a revision number memorized or handy. So besides the integer revision numbers, <command>svn</command> allows as input some additional forms of revision specifiers—<firstterm>revision keywords</firstterm>, and revision dates."
4115 msgstr "但是有时候,你需要精确指定一个时间,而无法记住或者记录了某个版本,这时除了使用修订版本号码,<command>svn</command>允许使用其他形式来指定修订版本—修订版本关键字和修订版本日期。"
4117 #. (para)
4118 #: ../source/book.xml:3866
4119 msgid "The various forms of Subversion revision specifiers can be mixed and matched when used to specify revision ranges. For example, you can use <option>-r <replaceable>REV1</replaceable>:<replaceable>REV2</replaceable></option> where <replaceable>REV1</replaceable> is a revision keyword and <replaceable>REV2</replaceable> is a revision number, or where <replaceable>REV1</replaceable> is a date and <replaceable>REV2</replaceable> is a revision keyword, and so on. The individual revision specifiers are independently evaluated, so you can put whatever you want on the opposite sides of that colon."
4120 msgstr "当用来指定修订版本范围时,不同形式的Subversion修订版本可以混合匹配。例如,你可以<replaceable>REV1</replaceable>是修订版本关键字,<replaceable>REV2</replaceable>是修订版本号,或者是<replaceable>REV1</replaceable>是日期,而<replaceable>REV2</replaceable>是修订版本关键字,等等。不同的修订版本指定符是等价的,所以你可以在冒号两边任意使用。"
4122 #. (title)
4123 #: ../source/book.xml:3881
4124 msgid "Revision Keywords"
4125 msgstr "修订版本关键字"
4127 #. (primary)
4128 #: ../source/book.xml:3884 ../source/book.xml:3980
4129 msgid "revisions"
4130 msgstr "版本"
4132 #. (secondary)
4133 #: ../source/book.xml:3885
4134 msgid "revision keywords"
4135 msgstr "版本关键字"
4137 #. (primary), (term)
4138 #: ../source/book.xml:3888 ../source/book.xml:3906
4139 msgid "HEAD"
4140 msgstr "HEAD"
4142 #. (primary), (term)
4143 #: ../source/book.xml:3891 ../source/book.xml:3913
4144 msgid "BASE"
4145 msgstr "BASE"
4147 #. (primary), (term)
4148 #: ../source/book.xml:3894 ../source/book.xml:3922
4149 msgid "COMMITTED"
4150 msgstr "COMMITTED"
4152 #. (primary), (term)
4153 #: ../source/book.xml:3897 ../source/book.xml:3929
4154 msgid "PREV"
4155 msgstr "PREV"
4157 #. (para)
4158 #: ../source/book.xml:3899
4159 msgid "The Subversion client understands a number of revision keywords. These keywords can be used instead of integer arguments to the <option>--revision (-r)</option> switch, and are resolved into specific revision numbers by Subversion:"
4160 msgstr "Subversion客户端可以理解一些<firstterm>修订版本关键字</firstterm>,这些关键字可以用来代替<option>--revision (r)</option>的数字参数,这会被Subversion解释到特定修订版本号:"
4162 #. (para)
4163 #: ../source/book.xml:3908
4164 msgid "The latest (or <quote>youngest</quote>) revision in the repository."
4165 msgstr "版本库中最新的(或者是<quote>最年轻的</quote>)版本。"
4167 #. (para)
4168 #: ../source/book.xml:3915
4169 msgid "The revision number of an item in a working copy. If the item has been locally modified, the <quote>BASE version</quote> refers to the way the item appears without those local modifications."
4170 msgstr "工作拷贝中一个条目的修订版本号,如果这个版本在本地修改了,则<quote>BASE版本</quote>就是这个条目在本地未修改的版本。"
4172 #. (para)
4173 #: ../source/book.xml:3924
4174 msgid "The most recent revision prior to, or equal to, <literal>BASE</literal>, in which an item changed."
4175 msgstr "一个项目修改的<literal>BASE</literal>版本之前或相同的版本。"
4177 #. (para)
4178 #: ../source/book.xml:3931
4179 msgid "The revision immediately <emphasis>before</emphasis> the last revision in which an item changed. Technically, this boils down to <literal>COMMITTED</literal>-1."
4180 msgstr "一个项目最后修改版本<emphasis>之前</emphasis>的那个版本,技术上可以认为是<literal>COMMITTED</literal> -1。"
4182 #. (para)
4183 #: ../source/book.xml:3938
4184 msgid "As can be derived from their descriptions, the <literal>PREV</literal>, <literal>BASE</literal>, and <literal>COMMITTED</literal> revision keywords are used only when referring to a working copy path—they don't apply to repository URLs. <literal>HEAD</literal>, on the other hand, can be used in conjunction with both of these path types."
4185 msgstr "因为可以从描述中得到,关键字<literal>PREV</literal>,<literal>BASE</literal>和<literal>COMMITTED</literal>只在引用工作拷贝路径时使用,而不能用于版本库URL,而关键字<literal>HEAD</literal>则可以用于两种路径类型。"
4187 #. (para)
4188 #: ../source/book.xml:3945
4189 msgid "Here are some examples of revision keywords in action:"
4190 msgstr "下面是一些修订版本关键字的例子:"
4192 #. (screen)
4193 #: ../source/book.xml:3947
4194 #, no-wrap
4195 msgid ""
4196 "\n"
4197 "$ svn diff -r PREV:COMMITTED foo.c\n"
4198 "# shows the last change committed to foo.c\n"
4199 "\n"
4200 "$ svn log -r HEAD\n"
4201 "# shows log message for the latest repository commit\n"
4202 "\n"
4203 "$ svn diff -r HEAD\n"
4204 "# compares your working copy (with all of its local changes) to the\n"
4205 "# latest version of that tree in the repository\n"
4206 "\n"
4207 "$ svn diff -r BASE:HEAD foo.c\n"
4208 "# compares the unmodified version of foo.c with the latest version of\n"
4209 "# foo.c in the repository\n"
4210 "\n"
4211 "$ svn log -r BASE:HEAD\n"
4212 "# shows all commit logs for the current versioned directory since you\n"
4213 "# last updated\n"
4214 "\n"
4215 "$ svn update -r PREV foo.c\n"
4216 "# rewinds the last change on foo.c, decreasing foo.c's working revision\n"
4217 "\n"
4218 "$ svn diff -r BASE:14 foo.c\n"
4219 "# compares the unmodified version of foo.c with the way foo.c looked\n"
4220 "# in revision 14\n"
4221 msgstr ""
4222 "\n"
4223 "$ svn diff -r PREV:COMMITTED foo.c\n"
4224 "# shows the last change committed to foo.c\n"
4225 "\n"
4226 "$ svn log -r HEAD\n"
4227 "# shows log message for the latest repository commit\n"
4228 "\n"
4229 "$ svn diff -r HEAD\n"
4230 "# compares your working copy (with all of its local changes) to the\n"
4231 "# latest version of that tree in the repository\n"
4232 "\n"
4233 "$ svn diff -r BASE:HEAD foo.c\n"
4234 "# compares the unmodified version of foo.c with the latest version of\n"
4235 "# foo.c in the repository\n"
4236 "\n"
4237 "$ svn log -r BASE:HEAD\n"
4238 "# shows all commit logs for the current versioned directory since you\n"
4239 "# last updated\n"
4240 "\n"
4241 "$ svn update -r PREV foo.c\n"
4242 "# rewinds the last change on foo.c, decreasing foo.c's working revision\n"
4243 "\n"
4244 "$ svn diff -r BASE:14 foo.c\n"
4245 "# compares the unmodified version of foo.c with the way foo.c looked\n"
4246 "# in revision 14\n"
4248 #. (title)
4249 #: ../source/book.xml:3977
4250 msgid "Revision Dates"
4251 msgstr "版本日期"
4253 #. (secondary)
4254 #: ../source/book.xml:3981
4255 msgid "specified as dates"
4256 msgstr "以日期指定"
4258 #. (para)
4259 #: ../source/book.xml:3983
4260 msgid "Revision numbers reveal nothing about the world outside the version control system, but sometimes you need to correlate a moment in real time with a moment in version history. To facilitate this, the <option>--revision (-r)</option> option can also accept as input date specifiers wrapped in curly braces (<literal>{</literal> and <literal>}</literal>). Subversion accepts the standard ISO-8601 date and time formats, plus a few others. Here are some examples. (Remember to use quotes around any date that contains spaces.)"
4261 msgstr "在版本控制系统以外,修订版本号码是没有意义的,但是有时候你需要将时间和历史修订版本号关联。为此,<option>--revision (-r)</option>选项接受使用花括号(<literal>{</literal>和<literal>}</literal>)包裹的日期输入,Subversion支持标准ISO-8601日期和时间格式,也支持一些其他的。下面是一些例子。(记住使用引号括起所有包含空格的日期。)"
4263 #. (screen)
4264 #: ../source/book.xml:3993
4265 #, no-wrap
4266 msgid ""
4267 "\n"
4268 "$ svn checkout -r {2006-02-17}\n"
4269 "$ svn checkout -r {15:30}\n"
4270 "$ svn checkout -r {15:30:00.200000}\n"
4271 "$ svn checkout -r {\"2006-02-17 15:30\"}\n"
4272 "$ svn checkout -r {\"2006-02-17 15:30 +0230\"}\n"
4273 "$ svn checkout -r {2006-02-17T15:30}\n"
4274 "$ svn checkout -r {2006-02-17T15:30Z}\n"
4275 "$ svn checkout -r {2006-02-17T15:30-04:00}\n"
4276 "$ svn checkout -r {20060217T1530}\n"
4277 "$ svn checkout -r {20060217T1530Z}\n"
4278 "$ svn checkout -r {20060217T1530-0500}\n"
4279 "…\n"
4280 msgstr ""
4281 "\n"
4282 "$ svn checkout -r {2006-02-17}\n"
4283 "$ svn checkout -r {15:30}\n"
4284 "$ svn checkout -r {15:30:00.200000}\n"
4285 "$ svn checkout -r {\"2006-02-17 15:30\"}\n"
4286 "$ svn checkout -r {\"2006-02-17 15:30 +0230\"}\n"
4287 "$ svn checkout -r {2006-02-17T15:30}\n"
4288 "$ svn checkout -r {2006-02-17T15:30Z}\n"
4289 "$ svn checkout -r {2006-02-17T15:30-04:00}\n"
4290 "$ svn checkout -r {20060217T1530}\n"
4291 "$ svn checkout -r {20060217T1530Z}\n"
4292 "$ svn checkout -r {20060217T1530-0500}\n"
4293 "…\n"
4295 #. (para)
4296 #: ../source/book.xml:4007
4297 msgid "When you specify a date, Subversion resolves that date to the most recent revision of the repository as of that date, and then continues to operate against that resolved revision number:"
4298 msgstr "当你指定一个日期,Subversion会在版本库找到接近这个日期的最近版本,并且对这个版本继续操作:"
4300 #. (screen)
4301 #: ../source/book.xml:4011
4302 #, no-wrap
4303 msgid ""
4304 "\n"
4305 "$ svn log -r {2006-11-28}\n"
4306 "------------------------------------------------------------------------\n"
4307 "r12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines\n"
4308 "…\n"
4309 msgstr ""
4310 "\n"
4311 "$ svn log -r {2006-11-28}\n"
4312 "------------------------------------------------------------------------\n"
4313 "r12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines\n"
4314 "…\n"
4316 #. (title)
4317 #: ../source/book.xml:4019
4318 msgid "Is Subversion a Day Early?"
4319 msgstr "Subversion 会早一天吗?"
4321 #. (para)
4322 #: ../source/book.xml:4021
4323 msgid "If you specify a single date as a revision without specifying a time of day (for example <literal>2006-11-27</literal>), you may think that Subversion should give you the last revision that took place on the 27th of November. Instead, you'll get back a revision from the 26th, or even earlier. Remember that Subversion will find the <emphasis>most recent revision of the repository</emphasis> as of the date you give. If you give a date without a timestamp, like <literal>2006-11-27</literal>, Subversion assumes a time of 00:00:00, so looking for the most recent revision won't return anything on the day of the 27th."
4324 msgstr "如果你只是指定了日期而没有时间(举个例子<literal>2006-11-27</literal>),你也许会以为Subversion会给你11-27号最后的版本,相反,你会得到一个26号版本,甚至更早。记住Subversion会根据你的日期找到<emphasis>最新的</emphasis>版本,如果你给一个日期,而没有给时间,像<literal>2006-11-27</literal>,Subversion会假定时间是00:00:00,所以在27号找不到任何版本。"
4326 #. (para)
4327 #: ../source/book.xml:4033
4328 msgid "If you want to include the 27th in your search, you can either specify the 27th with the time (<literal>{\"2006-11-27 23:59\"}</literal>), or just specify the next day (<literal>{2006-11-28}</literal>)."
4329 msgstr "如果你希望查询包括27号,你既可以使用(<literal>{\"2006-11-27 23:59\"}</literal>),或是直接使用第二天(<literal>{2006-11-28}</literal>)。"
4331 #. (para)
4332 #: ../source/book.xml:4038
4333 msgid "You can also use a range of dates. Subversion will find all revisions between both dates, inclusive:"
4334 msgstr "你可以使用时间段,Subversion会找到这段时间的所有版本:"
4336 #. (screen)
4337 #: ../source/book.xml:4040
4338 #, no-wrap
4339 msgid ""
4340 "\n"
4341 "$ svn log -r {2006-11-20}:{2006-11-29}\n"
4342 "…\n"
4343 msgstr ""
4344 "\n"
4345 "$ svn log -r {2006-11-20}:{2006-11-29}\n"
4346 "…\n"
4348 #. (para)
4349 #: ../source/book.xml:4045
4350 msgid "Since the timestamp of a revision is stored as an unversioned, modifiable property of the revision (see <xref linkend=\"svn.advanced.props\"/>, revision timestamps can be changed to represent complete falsifications of true chronology, or even removed altogether. Subversion's ability to correctly convert revision dates into real revision numbers depends on revision datestamps maintaining a sequential ordering—the younger the revision, the younger its timestamp. If this ordering isn't maintained, you will likely find that trying to use dates to specify revision ranges in your repository doesn't always return the data you might have expected."
4351 msgstr "因为一个版本的时间戳是作为一个属性存储的—不是版本化的,而是可以编辑的属性(见<xref linkend=\"svn.advanced.props\"/>)—版本号的时间戳可以被修改,从而建立一个虚假的年代表,也可以被完全删除。Subversion正确转化修订版本日期到修订版本的能力依赖于修订版本时间戳顺序排列—修订版本越年轻,则时间戳越年轻。如果顺序没有被维护,你会发现使用日期指定修订版本不会返回你期望的数据。"
4353 #. (title)
4354 #: ../source/book.xml:4064
4355 msgid "Properties"
4356 msgstr "属性"
4358 #. (primary)
4359 #: ../source/book.xml:4067
4360 msgid "properties"
4361 msgstr "属性"
4363 #. (para)
4364 #: ../source/book.xml:4069
4365 msgid "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 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."
4366 msgstr "我们已经详细讲述了Subversion存储和检索版本库中不同版本的文件和目录的细节,并且用了好几个章节来论述这个工具的基本功能。到此为止,Subversion还仅仅表现出一个普通的版本控制理念。但是Subversion并没有就此止步。"
4368 #. (para)
4369 #: ../source/book.xml:4075
4370 msgid "But it doesn't stop there."
4371 msgstr "但不仅仅如此。"
4373 #. (para)
4374 #: ../source/book.xml:4076
4375 msgid "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 <firstterm>properties</firstterm>, and they can be thought of as two-column tables that map property names to arbitrary values attached to each item in your working copy. Generally speaking, the names and values of the properties can be whatever you want them to be, with the constraint that the names must be human-readable text. And the best part about these properties is that they, too, are versioned, just like the textual contents of your files. You can modify, commit, and revert property changes as easily as you can file content changes. And the sending and 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."
4376 msgstr "作为目录和文件版本化的补充,Subversion提供了对每一个版本化的目录和文件添加、修改和删除版本化的元数据的接口,我们用<firstterm>属性</firstterm>来表示这些元数据。我们可以认为它们是一个两列的表,附加到你的工作拷贝的每个条目上,映射属性名到任意的值。一般来说,属性的名称和值可以是你希望的任何值,限制就是名称必须是可读的文本,并且最好的一点是这些属性也是版本化的,就像你的文本内容文件,你可以像提交文本修改一样修改、提交和恢复属性修改,当你更新时也会接收到别人的属性修改—你不必为适应属性改变你的工作流程。"
4378 #. (para)
4379 #: ../source/book.xml:4093
4380 msgid "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 avoid creating custom properties for your own needs whose names begin with this prefix. Otherwise, you run the risk that a 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."
4381 msgstr "Subversion自己保留了一组名称以<literal>svn:</literal>开头的属性,现在已经有了一些在用的属性,所以在你根据需要创建自定义属性时,需要避免这些前缀开头的名称,否则,Subversion的新版本可能会采用同名的属性来满足新的特性,而其含义可能会完全不同。"
4383 #. (para)
4384 #: ../source/book.xml:4102
4385 msgid "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 arbitrary properties attached to it. The same constraints apply—human-readable names and anything-you-want binary values. The main difference is that revision properties are not 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."
4386 msgstr "Subversion的属性也可以在别的地方出现,就像文件和目录可能附加有任意的属性名和值,每个修订版本作为一个整体也可以附加任意的属性,也有同样的限制—可读的文本名称和任何你希望的二进制值,主要的区别是修订版本属性是版本化的,换句话说,如果你修改,删除一个修订版本属性,在Subversion领域内没有办法恢复到以前的值。"
4388 #. (para)
4389 #: ../source/book.xml:4111
4390 msgid "Subversion has no particular policy regarding the use of properties. It asks only that you not use property names that begin with the prefix <literal>svn:</literal>. That's the namespace that it sets aside for its own use. And Subversion does, in fact, use properties, both the versioned and unversioned variety. Certain versioned properties have special meaning or effects when found on files and directories, or house a particular bit of information about the revisions on which they are found. Certain revision properties are automatically attached to revisions by Subversion's commit process, and carry information about the revision. Most of these properties are mentioned elsewhere in this or other chapters as part of the more general topics to which they are related. For an exhaustive list of Subversion's pre-defined properties, see <xref linkend=\"svn.ref.properties\"/>."
4391 msgstr "Subversion不关心如何使用属性,但是要求你不要使用<literal>svn:</literal>为前缀的属性名,这是Subversion自己使用的命名空间,Subversion使用了版本化的和未版本化的属性。文件和目录上的特定版本化属性都有特别的意义或效果,或者是提供了修订版本的一些信息。一些修订版本属性会在提交时自动附加到修订版本上,包含了修订版本的信息。大多数这些属性会作为普通的主题在后面提及,关于Subversion预定义的属性的详细列表可以看<xref linkend=\"svn.ref.properties\"/>。"
4393 #. (para)
4394 #: ../source/book.xml:4126
4395 msgid "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."
4396 msgstr "在本小节,我们将会检验这个工具—不仅是对Subversion的用户,也对Subversion本身—对于属性的支持。你会学到与属性相关的<command>svn</command>子命令,和属性怎样影响你的普通Subversion工作流,希望你会感到Subversion的属性可以提高你的版本控制体验。"
4398 #. (title)
4399 #: ../source/book.xml:4134
4400 msgid "Why Properties?"
4401 msgstr "为什么需要属性?"
4403 #. (para)
4404 #: ../source/book.xml:4136
4405 msgid "Just as Subversion uses properties to store extra information about the files, directories, and revisions that it contains, you might also find properties to be of similar use. You might find it useful to have a place close to your versioned data to hang custom metadata about that data."
4406 msgstr "就像Subversion使用属性保存其包含的文件、目录和修订版本的附加信息,你也会发现属性有一些类似的使用,你会发现如果在数据附近有个地方保存自定义元数据会非常有用。"
4408 #. (para)
4409 #: ../source/book.xml:4142
4410 msgid "Say you wish to design a website that houses many digital photos, and displays them with captions and a datestamp. Now, your set of photos is constantly changing, so you'd like to have as much of this site automated as possible. These photos can be quite large, so as is common with sites of this nature, you want to provide smaller thumbnail images to your site visitors."
4411 msgstr "假设你希望设计一个存放许多数码照片的网站,会显示标题和缩略图。现在你的图片会经常修改,所以你希望能够让这个站点尽量自动处理这些事情,这些照片会很大,所以作为网站,你希望为访问者提供相似的缩略图。"
4413 #. (para)
4414 #: ../source/book.xml:4149
4415 msgid "Now, you can get this functionality using traditional files. That is, you can have your <filename>image123.jpg</filename> and an <filename>image123-thumbnail.jpg</filename> side-by-side in a directory. Or if you want to keep the filenames the same, you might have your thumbnails in a different directory, like <filename>thumbnails/image123.jpg</filename>. You can also store your captions and datestamps in a similar fashion, again separated from the original image file. But the problem here is that your collection of files grows in multiples with each new photo added to the site."
4416 msgstr "现在,你可以利用这些功能使用传统文件。你可以有一个<filename>image123.jpg</filename>和一个对应的<filename>image123-thumbnail.jpg</filename>在同一个目录里,有时候你希望保持文件名相同,你可以使用不同的目录,如<filename>thumbnails/image123.jpg</filename>。你可以用一种相似的样式来保存你的标题和时间戳,同原始图像文件分开。每个新图片的添加都会成倍的增加混乱,很快你的目录树会是一团糟。"
4418 #. (para)
4419 #: ../source/book.xml:4160
4420 msgid "Now consider the same website deployed in a way that makes use of Subversion's file properties. Imagine having a single image file, <filename>image123.jpg</filename>, and then properties set on that file named <literal>caption</literal>, <literal>datestamp</literal>, and even <literal>thumbnail</literal>. Now your working copy directory looks much more manageable—in fact, it looks to the casual browser like there are nothing but image files in it. But your automation scripts know better. They know that they can use <command>svn</command> (or better yet, they can use the Subversion language bindings—see <xref linkend=\"svn.developer.usingapi\"/>) to dig out the extra information that your site needs to display without having to read an index file or play path manipulation games."
4421 msgstr "现在考虑使用Subversion文件的属性的方式来管理这个站点,想象我们有一个单独的图像文件<filename>image123.jpg</filename>,然后这个文件的属性集包括<literal>caption</literal>、<literal>datestamp</literal>甚至<literal>thumbnail</literal>。现在你的工作拷贝目录看起来更容易管理—实际上,它看起来只有图像文件,但是你的自动化脚本知道得更多,它们知道可以用<command>svn</command>(更好的选择是使用Subversion的语言绑定—见<xref linkend=\"svn.developer.usingapi\"/>)来挖掘更多的站点显示需要的额外信息,而不必去阅读一个索引文件或者是玩一个路径处理的游戏。"
4423 #. (para)
4424 #: ../source/book.xml:4174
4425 msgid "Custom revision properties are also frequently used. One common such use is a property whose value contains an issue tracker ID with which the revision is associated, perhaps because the change made in that revision fixes a bug filed in the tracker issue with that ID. Other uses include hanging more friendly names on the revision—it might be hard to remember that revision 1935 was a fully tested revision. But if there's, say, a <literal>test-results</literal> property on that revision with a value <literal>all passing</literal>, that's meaningful information to have."
4426 msgstr "自定义修订版本属性也经常被使用,一个常见的用法是一个包含问题跟踪ID的属性,可能是因为这个修改修正了这个ID的问题。另外一些人用属性来存放更容易记的修订版本名称—记住修订版本1935是一个完全测试的版本是很困难的,但是如果在修订版本上设置一个值为<literal>all passing</literal>的<literal>test-results</literal>属性,这就有了一个有用的信息。"
4428 #. (title)
4429 #: ../source/book.xml:4186
4430 msgid "Searchability (or, Why <emphasis>Not</emphasis> Properties)"
4431 msgstr "可搜索性(或者,为什么<emphasis>不</emphasis>使用属性)"
4433 #. (para)
4434 #: ../source/book.xml:4189
4435 msgid "For all their utility, Subversion properties—or, more accurately, the available interfaces to them—have a major shortcoming: while it is a simple matter to <emphasis>set</emphasis> a custom property, <emphasis>finding</emphasis> that property later is whole different ball of wax."
4436 msgstr "对于Subversion属性的所有功能—或者更准确的讲,对于属性的所有接口—都有一些主要的应用会削弱他们的应用。设置一个自定义属性后,很容易发现属性完全变成另外一会儿事。"
4438 #. (para)
4439 #: ../source/book.xml:4195
4440 msgid "Trying to locate a custom revision property generally involves performing a linear walk across all the revisions of the repository, asking of each revision, \"Do you have the property I'm looking for?\" Trying to find a custom versioned property is painful, too, and often involves a recursive <command>svn propget</command> across an entire working copy. In your situation, that might not be as bad as a linear walk across all revisions. But it certainly leaves much to be desired in terms of both performance and likelihood of success, especially if the scope of your search would require a working copy from the root of your repository."
4441 msgstr "为了定位一个自定义属性通常要线形访问版本库的所有修订版本,向每个修订版本询问,“你们有我找的属性吗?”尝试查找自定义版本化属性也是同样的痛苦,通常需要在整个工作拷贝递归调用<command>svn propget</command>。在你的情况下,可能不会比遍历所有修订版本差。但也在性能和成功可能性里留下了许多悬念,特别是当你需要从版本库的根开始搜索时。"
4443 #. (para)
4444 #: ../source/book.xml:4207
4445 msgid "For this reason, you might choose—especially in the revision property use-case—to simply add your metadata to the revision's log message, using some policy-driven (and perhaps programmatically-enforced) formatting that is designed to be quickly parsed from the output of <command>svn log</command>. It is quite common to see in Subversion log messages the likes of:"
4446 msgstr "因为这个原因,你会选择—特别是在修订版本属性用例—简单的添加你的元数据到修订版本日志信息,使用一些政策驱动(并且是编程强制的)且可以通过<command>svn log</command>快速解析格式。如下的Subversion日志信息会很常见:"
4448 #. (programlisting)
4449 #: ../source/book.xml:4214
4450 #, no-wrap
4451 msgid ""
4452 "\n"
4453 "Issue(s): IZ2376, IZ1919\n"
4454 "Reviewed by:  sally\n"
4455 "\n"
4456 "This fixes a nasty segfault in the wort frabbing process\n"
4457 "…\n"
4458 msgstr ""
4459 "\n"
4460 "Issue(s): IZ2376, IZ1919\n"
4461 "Reviewed by:  sally\n"
4462 "\n"
4463 "This fixes a nasty segfault in the wort frabbing process\n"
4464 "…\n"
4466 #. (para)
4467 #: ../source/book.xml:4221
4468 msgid "But here again lies some misfortune. Subversion doesn't yet provide a log message templating mechanism, which would go a long way toward helping users be consistent with the formatting of their log-embedded revision metadata."
4469 msgstr "但是现在依然有一些不幸,Subversion不支持日志信息模版机制,虽然这样对用户与日志嵌入的修订版本元数据保持一致有很大帮助。"
4471 #. (title)
4472 #: ../source/book.xml:4230
4473 msgid "Manipulating Properties"
4474 msgstr "操作属性"
4476 #. (para)
4477 #: ../source/book.xml:4232
4478 msgid "The <command>svn</command> command affords a few ways to add or modify file and directory properties. For properties with short, human-readable values, perhaps the simplest way to add a new property is to specify the property name and value on the command line of the <command>propset</command> subcommand."
4479 msgstr "<command>svn</command>命令提供一些方法来添加和修改文件或目录的属性,对于短的,可读的属性,最简单的添加方法是在<command>propset</command>子命令里指定正确的名称和值。"
4481 #. (screen)
4482 #: ../source/book.xml:4238
4483 #, no-wrap
4484 msgid ""
4485 "\n"
4486 "$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c\n"
4487 "property 'copyright' set on 'calc/button.c'\n"
4488 "$\n"
4489 msgstr ""
4490 "\n"
4491 "$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c\n"
4492 "property 'copyright' set on 'calc/button.c'\n"
4493 "$\n"
4495 #. (para)
4496 #: ../source/book.xml:4243
4497 msgid "But we've been touting the flexibility that Subversion offers for your property values. And if you are planning to have a multi-line textual, or even binary, property value, you probably do not want to supply that value on the command line. So the <command>propset</command> subcommand takes a <option>--file (-F)</option> option for specifying the name of a file which contains the new property value."
4498 msgstr "但是我们已经吹捧了Subversion提供的属性功能的灵活性,如果你计划使用多行文本,或者是二进制属性值,你可能不会希望通过命令行提供这些值,所以<command>propset</command>子命令提供的<option>--file (-F)</option>选项可以指定包含属性值的文件。"
4500 #. (screen)
4501 #: ../source/book.xml:4250
4502 #, no-wrap
4503 msgid ""
4504 "\n"
4505 "$ svn propset license -F /path/to/LICENSE calc/button.c\n"
4506 "property 'license' set on 'calc/button.c'\n"
4507 "$\n"
4508 msgstr ""
4509 "\n"
4510 "$ svn propset license -F /path/to/LICENSE calc/button.c\n"
4511 "property 'license' set on 'calc/button.c'\n"
4512 "$\n"
4514 #. (para)
4515 #: ../source/book.xml:4261
4516 msgid "If you're familiar with XML, this is pretty much the ASCII subset of the syntax for XML \"Name\"."
4517 msgstr "如果你熟悉XML,其实这就是XML的\"Name\"语法的ASCII子集。"
4519 #. (para)
4520 #: ../source/book.xml:4255
4521 msgid "There are some restrictions on the names you can use for properties. A property name must start with a letter, a colon (<literal>:</literal>), or an underscore (<literal>_</literal>); after that, you can also use digits, hyphens (<literal>-</literal>), and periods (<literal>.</literal>). <placeholder-1/>"
4522 msgstr "对于属性名称也有一些限制,属性名必须以一个字符、一个冒号(<literal>:</literal>)或下划线(<literal>_</literal>)开始,之后你可以使用数字,横线(<literal>-</literal>)和句号(<literal>.</literal>)。 <placeholder-1/>"
4524 #. (para)
4525 #: ../source/book.xml:4264
4526 msgid "In addition to the <command>propset</command> command, the <command>svn</command> program supplies the <command>propedit</command> command. This command uses the configured editor program (see <xref linkend=\"svn.advanced.confarea.opts.config\"/>) to add or modify properties. When you run the command, <command>svn</command> invokes your editor program on a temporary file that contains the current value of the property (or which is empty, if you are adding a new property). Then, you just modify that value in your editor program until it represents the new value you wish to store for the property, save the temporary file, and then exit the editor program. If Subversion detects that you've actually changed the existing value of the property, it will accept that as the new property value. If you exit your editor without making any changes, no property modification will occur:"
4527 msgstr "作为<command>propset</command>命令的补充,<command>svn</command>提供了一个<command>propedit</command>命令,这个命令使用定制的编辑器程序(见<xref linkend=\"svn.advanced.confarea.opts.config\"/>)来添加和修改属性。当你运行这个命令,<command>svn</command>调用你的编辑器程序打开一个临时文件,文件中保存当前的属性值(或者是空文件,如果你正在添加新的属性)。然后你只需要修改为你想要的值,保存临时文件,然后离开编辑器程序。如果Subversion发现你已经修改了属性值,就会接受新值,如果你未作任何修改而离开,不会产生属性修改操作:"
4529 #. (screen)
4530 #: ../source/book.xml:4279
4531 #, no-wrap
4532 msgid ""
4533 "\n"
4534 "$ svn propedit copyright calc/button.c  ### exit the editor without changes\n"
4535 "No changes to property 'copyright' on 'calc/button.c'\n"
4536 "$\n"
4537 msgstr ""
4538 "\n"
4539 "$ svn propedit copyright calc/button.c  ### exit the editor without changes\n"
4540 "No changes to property 'copyright' on 'calc/button.c'\n"
4541 "$\n"
4543 #. (para)
4544 #: ../source/book.xml:4284
4545 msgid "We should note that, as with other <command>svn</command> subcommands, those related to properties can act on multiple paths at once. This enables you to modify properties on whole sets of files with a single command. For example, we could have done:"
4546 msgstr "我们也应该注意导,像其它<command>svn</command>子命令一样,这些关联的属性可以一次添加到多个路径上,这样就可以通过一个命令修改一组文件的属性。例如,我们可以:"
4548 #. (screen)
4549 #: ../source/book.xml:4289
4550 #, no-wrap
4551 msgid ""
4552 "\n"
4553 "$ svn propset copyright '(c) 2006 Red-Bean Software' calc/*\n"
4554 "property 'copyright' set on 'calc/Makefile'\n"
4555 "property 'copyright' set on 'calc/button.c'\n"
4556 "property 'copyright' set on 'calc/integer.c'\n"
4557 "…\n"
4558 "$\n"
4559 msgstr ""
4560 "\n"
4561 "$ svn propset copyright '(c) 2006 Red-Bean Software' calc/*\n"
4562 "property 'copyright' set on 'calc/Makefile'\n"
4563 "property 'copyright' set on 'calc/button.c'\n"
4564 "property 'copyright' set on 'calc/integer.c'\n"
4565 "…\n"
4566 "$\n"
4568 #. (para)
4569 #: ../source/book.xml:4297
4570 msgid "All of this property adding and editing isn't really very useful if you can't easily get the stored property value. So the <command>svn</command> program supplies two subcommands for displaying the names and values of properties stored on files and directories. The <command>svn proplist</command> command will list the names of properties that exist on a path. Once you know the names of the properties on the node, you can request their values individually using <command>svn propget</command>. This command will, given a property name and a path (or set of paths), print the value of the property to the standard output stream."
4571 msgstr "如果不能方便的得到存储的属性值,那么属性的添加和编辑操作也不会很容易,所以<command>svn</command>提供了两个子命令来显示文件和目录存储的属性名和值。<command>svn proplist</command>命令会列出路径上存在的所有属性名称,一旦你知道了某个节点的属性名称,你可以用<command>svn propget</command>获取它的值,这个命令获取给定的路径(或者是一组路径)和属性名称,打印这个属性的值到标准输出。"
4573 #. (screen)
4574 #: ../source/book.xml:4308
4575 #, no-wrap
4576 msgid ""
4577 "\n"
4578 "$ svn proplist calc/button.c\n"
4579 "Properties on 'calc/button.c':\n"
4580 "  copyright\n"
4581 "  license\n"
4582 "$ svn propget copyright calc/button.c\n"
4583 "(c) 2006 Red-Bean Software\n"
4584 msgstr ""
4585 "\n"
4586 "$ svn proplist calc/button.c\n"
4587 "Properties on 'calc/button.c':\n"
4588 "  copyright\n"
4589 "  license\n"
4590 "$ svn propget copyright calc/button.c\n"
4591 "(c) 2006 Red-Bean Software\n"
4593 #. (para)
4594 #: ../source/book.xml:4316
4595 msgid "There's even a variation of the <command>proplist</command> command that will list both the name and value of all of the properties. Simply supply the <option>--verbose</option> (<option>-v</option>) option."
4596 msgstr "还有一个<command>proplist</command>变种命令会列出所有属性的名称和值,只需要设置<option>--verbose</option>(<option>-v</option>)选项。"
4598 #. (screen)
4599 #: ../source/book.xml:4320
4600 #, no-wrap
4601 msgid ""
4602 "\n"
4603 "$ svn proplist -v calc/button.c\n"
4604 "Properties on 'calc/button.c':\n"
4605 "  copyright : (c) 2006 Red-Bean Software\n"
4606 "  license : ================================================================\n"
4607 "Copyright (c) 2006 Red-Bean Software.  All rights reserved.\n"
4608 "\n"
4609 "Redistribution and use in source and binary forms, with or without\n"
4610 "modification, are permitted provided that the following conditions \n"
4611 "are met:\n"
4612 "\n"
4613 "1. Redistributions of source code must retain the above copyright\n"
4614 "notice, this list of conditions, and the recipe for Fitz's famous\n"
4615 "red-beans-and-rice.\n"
4616 "…\n"
4617 msgstr ""
4618 "\n"
4619 "$ svn proplist -v calc/button.c\n"
4620 "Properties on 'calc/button.c':\n"
4621 "  copyright : (c) 2006 Red-Bean Software\n"
4622 "  license : ================================================================\n"
4623 "Copyright (c) 2006 Red-Bean Software.  All rights reserved.\n"
4624 "\n"
4625 "Redistribution and use in source and binary forms, with or without\n"
4626 "modification, are permitted provided that the following conditions \n"
4627 "are met:\n"
4628 "\n"
4629 "1. Redistributions of source code must retain the above copyright\n"
4630 "notice, this list of conditions, and the recipe for Fitz's famous\n"
4631 "red-beans-and-rice.\n"
4632 "…\n"
4634 #. (para)
4635 #: ../source/book.xml:4336
4636 msgid "The last property-related subcommand is <command>propdel</command>. Since Subversion allows you to store properties with empty values, you can't remove a property altogether using <command>propedit</command> or <command>propset</command>. For example, this command will <emphasis>not</emphasis> yield the desired effect:"
4637 msgstr "最后一个与属性相关的子命令是<command>propdel</command>,因为Subversion允许属性值为空,所有不能用<command>propedit</command>或者<command>propset</command>命令删除一个属性。例如,这个命令<emphasis>不会</emphasis>产生预期的效果:"
4639 #. (screen)
4640 #: ../source/book.xml:4342
4641 #, no-wrap
4642 msgid ""
4643 "\n"
4644 "$ svn propset license '' calc/button.c\n"
4645 "property 'license' set on 'calc/button.c'\n"
4646 "$ svn proplist -v calc/button.c\n"
4647 "Properties on 'calc/button.c':\n"
4648 "  copyright : (c) 2006 Red-Bean Software\n"
4649 "  license : \n"
4650 "$\n"
4651 msgstr ""
4652 "\n"
4653 "$ svn propset license '' calc/button.c\n"
4654 "property 'license' set on 'calc/button.c'\n"
4655 "$ svn proplist -v calc/button.c\n"
4656 "Properties on 'calc/button.c':\n"
4657 "  copyright : (c) 2006 Red-Bean Software\n"
4658 "  license : \n"
4659 "$\n"
4661 #. (para)
4662 #: ../source/book.xml:4351
4663 msgid "You need to use the <command>propdel</command> subcommand to delete properties altogether. The syntax is similar to the other property commands:"
4664 msgstr "你需要用<command>propdel</command>来删除属性,语法与其它与属性命令相似:"
4666 #. (screen)
4667 #: ../source/book.xml:4354
4668 #, no-wrap
4669 msgid ""
4670 "\n"
4671 "$ svn propdel license calc/button.c\n"
4672 "property 'license' deleted from 'calc/button.c'.\n"
4673 "$ svn proplist -v calc/button.c\n"
4674 "Properties on 'calc/button.c':\n"
4675 "  copyright : (c) 2006 Red-Bean Software\n"
4676 "$\n"
4677 msgstr ""
4678 "\n"
4679 "$ svn propdel license calc/button.c\n"
4680 "property 'license' deleted from 'calc/button.c'.\n"
4681 "$ svn proplist -v calc/button.c\n"
4682 "Properties on 'calc/button.c':\n"
4683 "  copyright : (c) 2006 Red-Bean Software\n"
4684 "$\n"
4686 #. (para)
4687 #: ../source/book.xml:4375
4688 msgid "Fixing spelling errors, grammatical gotchas, and <quote>just-plain-wrongness</quote> in commit log messages is perhaps the most common use case for the <option>--revprop</option> option."
4689 msgstr "修正提交日志信息的拼写错误,文法错误和<quote>简单的错误</quote>是<option>--revprop</option>选项最常见用例。"
4691 #. (para)
4692 #: ../source/book.xml:4362
4693 msgid "Remember those unversioned revision properties? You can modify those, too, using the same <command>svn</command> subcommands that we just described. Simply add the <option>--revprop</option> command-line parameter, and specify the revision whose property you wish to modify. Since revisions are global, you don't need to specify a target path to these property-related commands so long as you are positioned in a working copy of the repository whose revision property you wish to modify. Otherwise, you can simply provide the URL of any path in the repository of interest (including the repository's root URL). For example, you might want to replace the commit log message of an existing revision. <placeholder-1/> If your current working directory is part of a working copy of your repository, you can simply run the <command>svn propset</command> command with no target path:"
4694 msgstr "还记的这些未版本化的修订版本属性?你也可以使用<command>svn</command>子命令修改这些属性。只需要添加<option>--revprop</option>命令参数,说明希望修改属性的修订版本。因为修订版本是全局的,你不需要指定一个路径,只要你已经位于你希望修改属性的工作拷贝路径,或者,你也可以提供版本库的URL的任何路径(也包括版本库的根URL)。例如,<placeholder-1/>如果你当前的工作路径是一个版本库工作拷贝的一部分,你可以简单的运行没有目标路径的<command>svn propset</command>命令:"
4696 #. (screen)
4697 #: ../source/book.xml:4382
4698 #, no-wrap
4699 msgid ""
4700 "\n"
4701 "$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop\n"
4702 "property 'svn:log' set on repository revision '11'\n"
4703 "$\n"
4704 msgstr ""
4705 "\n"
4706 "$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop\n"
4707 "property 'svn:log' set on repository revision '11'\n"
4708 "$\n"
4710 #. (para)
4711 #: ../source/book.xml:4387
4712 msgid "But even if you haven't checked out a working copy from that repository, you can still affect the property change by providing the repository's root URL:"
4713 msgstr "但是即使你没有从版本库检出一个工作拷贝,你仍然可以通过提供版本库根URL来影响属性修改。"
4715 #. (screen)
4716 #: ../source/book.xml:4390
4717 #, no-wrap
4718 msgid ""
4719 "\n"
4720 "$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \\\n"
4721 "              http://svn.example.com/repos/project\n"
4722 "property 'svn:log' set on repository revision '11'\n"
4723 "$\n"
4724 msgstr ""
4725 "\n"
4726 "$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \\\n"
4727 "              http://svn.example.com/repos/project\n"
4728 "property 'svn:log' set on repository revision '11'\n"
4729 "$\n"
4731 #. (para)
4732 #: ../source/book.xml:4396
4733 msgid "Note that the ability to modify these unversioned properties must be explicitly added by the repository administrator (see <xref linkend=\"svn.reposadmin.maint.setlog\"/>). That's because the properties aren't versioned, so you run the risk of losing information if you aren't careful with your edits. The repository administrator can set up methods to protect against this loss, and by default, modification of unversioned properties is disabled."
4734 msgstr "注意,修改这些未版本化的属性的能力一定要明确的添加给版本库管理员(见<xref linkend=\"svn.reposadmin.maint.setlog\"/>)。因为属性没有版本化,如果编辑的时候不小心,就会冒丢失信息的风险,版本库管理员可以设置方法来防范这种意外,缺省情况下,修改未版本化的属性是禁止的。"
4736 #. (para)
4737 #: ../source/book.xml:4405
4738 msgid "Users should, where possible, use <command>svn propedit</command> instead of <command>svn propset</command>. While the end result of the commands is identical, the former will allow them to see the current value of the property they are about to change, which helps them to verify that they are, in fact, making the change they think they are making. This is especially true when modifying unversioned revision properties. Also, it is significantly easier to modify multiline property values in a text editor than at the command line."
4739 msgstr "用户必须在可能的情况下使用<command>svn propedit</command>,而不是<command>svn propset</command>。然而这两个命令的结果是相同的,前一个会允许他们查看修改以前的内容,可以帮助用户验证,实际上,作出他们所期望的修改,当修改未版本化修订版本属性时,这一点特别需要。另外,这个命令也可以通过文本编辑器或命令行轻松的修改多行属性。"
4741 #. (title)
4742 #: ../source/book.xml:4420
4743 msgid "Properties and the Subversion Workflow"
4744 msgstr "属性和 Subversion 工作流程"
4746 #. (para)
4747 #: ../source/book.xml:4422
4748 msgid "Now that you are familiar with all of the property-related <command>svn</command> subcommands, let's see how property modifications affect the usual Subversion workflow. As we mentioned earlier, file and directory properties are versioned, just like your file contents. As a result, Subversion provides the same opportunities for merging—cleanly or with conflicts—someone else's modifications into your own."
4749 msgstr "现在你已经熟悉了所有与属性相关的<command>svn</command>子命令,让我们看看属性修改如何影响Subversion的工作流。我们前面提到过,文件和目录的属性是版本化的,这一点类似于版本化的文件内容。后果之一,就是Subversion具有了同样的机制来合并—用干净或者冲突的方式—其他人的修改应用到你的修改。"
4751 #. (para)
4752 #: ../source/book.xml:4430
4753 msgid "And as with file contents, your property changes are local modifications, only made permanent when you commit them to the repository with <command>svn commit</command>. Your property changes can be easily unmade, too—the <command>svn revert</command> command will restore your files and directories to their un-edited states—contents, properties, and all. Also, you can receive interesting information about the state of your file and directory properties by using the <command>svn status</command> and <command>svn diff</command> commands."
4754 msgstr "就像文件内容,你的属性修改是本地修改,只有使用<command>svn commit</command>命令提交后才会保存到版本库中,属性修改也可以很容易的取消—<command>svn revert</command>命令会恢复你的文件和目录为编辑前状态,包括内容、属性和其它的信息。另外,你可以使用<command>svn status</command>和<command>svn diff</command>接受感兴趣的文件和目录属性的状态信息。"
4756 #. (screen)
4757 #: ../source/book.xml:4440
4758 #, no-wrap
4759 msgid ""
4760 "\n"
4761 "$ svn status calc/button.c\n"
4762 " M     calc/button.c\n"
4763 "$ svn diff calc/button.c\n"
4764 "Property changes on: calc/button.c\n"
4765 "___________________________________________________________________\n"
4766 "Name: copyright\n"
4767 "   + (c) 2006 Red-Bean Software\n"
4768 "\n"
4769 "$\n"
4770 msgstr ""
4771 "\n"
4772 "$ svn status calc/button.c\n"
4773 " M     calc/button.c\n"
4774 "$ svn diff calc/button.c\n"
4775 "Property changes on: calc/button.c\n"
4776 "___________________________________________________________________\n"
4777 "Name: copyright\n"
4778 "   + (c) 2006 Red-Bean Software\n"
4779 "\n"
4780 "$\n"
4782 #. (para)
4783 #: ../source/book.xml:4451
4784 msgid "Notice how the <command>status</command> subcommand displays <literal>M</literal> in the second column instead of the first. That is because we have modified the properties on <filename>calc/button.c</filename>, but not its textual contents. Had we changed both, we would have seen <literal>M</literal> in the first column, too (see <xref linkend=\"svn.tour.cycle.examine.status\"/>)."
4785 msgstr "注意<command>status</command>子命令显示的<literal>M</literal>在第二列而不是在第一列,这是因为我们修改了<filename>calc/button.c</filename>的属性,而不是它的文本内容,如果我们都修改了,我们也会看到<literal>M</literal>出现在第一列(见<xref linkend=\"svn.tour.cycle.examine.status\"/>)。"
4787 #. (title)
4788 #: ../source/book.xml:4459
4789 msgid "Property Conflicts"
4790 msgstr "属性冲突"
4792 #. (para)
4793 #: ../source/book.xml:4461
4794 msgid "As with file contents, local property modifications can conflict with changes committed by someone else. If you update your working copy directory and receive property changes on a versioned object that clash with your own, Subversion will report that the object is in a conflicted state."
4795 msgstr "与文件内容一样,本地的属性修改也会同别人的提交冲突,如果你更新你的工作拷贝目录并且接收到有资源属性修改与你的修改冲突,Subversion会报告资源处于冲突状态。"
4797 #. (screen)
4798 #: ../source/book.xml:4467
4799 #, no-wrap
4800 msgid ""
4801 "\n"
4802 "% svn update calc\n"
4803 "M  calc/Makefile.in\n"
4804 " C calc/button.c\n"
4805 "Updated to revision 143.\n"
4806 "$ \n"
4807 msgstr ""
4808 "\n"
4809 "% svn update calc\n"
4810 "M  calc/Makefile.in\n"
4811 " C calc/button.c\n"
4812 "Updated to revision 143.\n"
4813 "$ \n"
4815 #. (para)
4816 #: ../source/book.xml:4474
4817 msgid "Subversion will also create, in the same directory as the conflicted object, a file with a <filename>.prej</filename> extension which contains the details of the conflict. You should examine the contents of this file so you can decide how to resolve the conflict. Until the conflict is resolved, you will see a <literal>C</literal> in the second column of <command>svn status</command> output for that object, and attempts to commit your local modifications will fail."
4818 msgstr "Subversion也会在冲突资源的同一个目录创建一个<filename>.prej</filename>扩展名的文件,保存冲突的细节。你一定要检查这个文件的内容来决定如何解决冲突,在你解决冲突之前,你会在使用<command>svn status</command>时看到这个资源的输出的第二列是一个<literal>C</literal>,提交本地修改的尝试会失败。"
4820 #. (screen)
4821 #: ../source/book.xml:4483
4822 #, no-wrap
4823 msgid ""
4824 "\n"
4825 "$ svn status calc\n"
4826 " C     calc/button.c\n"
4827 "?      calc/button.c.prej\n"
4828 "$ cat calc/button.c.prej \n"
4829 "prop 'linecount': user set to '1256', but update set to '1301'.\n"
4830 "$\n"
4831 msgstr ""
4832 "\n"
4833 "$ svn status calc\n"
4834 " C     calc/button.c\n"
4835 "?      calc/button.c.prej\n"
4836 "$ cat calc/button.c.prej \n"
4837 "prop 'linecount': user set to '1256', but update set to '1301'.\n"
4838 "$\n"
4840 #. (para)
4841 #: ../source/book.xml:4491
4842 msgid "To resolve property conflicts, simply ensure that the conflicting properties contain the values that they should, and then use the <command>svn resolved</command> command to alert Subversion that you have manually resolved the problem."
4843 msgstr "为了解决属性冲突,只需要确定冲突的属性保存了它们应该的值,然后使用<command>svn resolved</command>命令告诉Subversion你已经手工解决了问题。"
4845 #. (para)
4846 #: ../source/book.xml:4497
4847 msgid "You might also have noticed the non-standard way that Subversion currently displays property differences. You can still run <command>svn diff</command> and redirect the output to create a usable patch file. The <command>patch</command> program will ignore property patches—as a rule, it ignores any noise it can't understand. This does, unfortunately, mean that to fully apply a patch generated by <command>svn diff</command>, any property modifications will need to be applied by hand."
4848 msgstr "你也许已经注意到了Subversion在显示属性时的非标准方式。你还可以运行<command>svn diff</command>并且重定向输出来产生一个有用的补丁文件,<command>patch</command>程序会忽略属性补丁—作为规则,它会忽略任何不理解的噪音。很遗憾,这意味着完全应用<command>svn diff</command>产生的补丁时,任何属性修改必须手工实施。"
4850 #. (title)
4851 #: ../source/book.xml:4510
4852 msgid "Automatic Property Setting"
4853 msgstr "自动设置属性"
4855 #. (para)
4856 #: ../source/book.xml:4512
4857 msgid "Properties are a powerful feature of Subversion, acting as key components of many Subversion features discussed elsewhere in this and other chapters—textual diff and merge support, keyword substitution, newline translation, etc. But to get the full benefit of properties, they must be set on the right files and directories. Unfortunately, that step can be easily forgotten in the routine of things, especially since failing to set a property doesn't usually result in an obvious error (at least compared to, say, failing to add a file to version control). To help your properties get applied to the places that need them, Subversion provides a couple of simple but useful features."
4858 msgstr "属性是Subversion一个强大的特性,成为本章和其它章讨论的许多Subversion特性的关键组成部分—文本区别和合并支持、关键字替换、新行的自动转换等等。但是为了从属性得到完全的利益,他们必须设置到正确的文件和目录。不幸的是,在日常工作中很容易忘记这一步工作,特别是当没有设置属性不会引起明显的错误时(至少相对与未能添加一个文件到版本控制这种操作),为了帮助你在需要添加属性的文件上添加属性,Subversion提供了一些简单但是有用的特性。"
4860 #. (para)
4861 #: ../source/book.xml:4524
4862 msgid "Whenever you introduce a file to version control using the <command>svn add</command> or <command>svn import</command> commands, Subversion tries to assist by setting some common file properties automatically. First, on operating systems whose filesystems support an execute permission bit, Subversion will automatically set the <literal>svn:executable</literal> property on newly added or imported files whose execute bit is enabled. (See <xref linkend=\"svn.advanced.props.special.executable\"/> for more about this property.) Secondly, it runs a very basic heuristic to determine if that file contains human-readable content. If not, Subversion will automatically set the <literal>svn:mime-type</literal> property on that file to <literal>application/octet-stream</literal> (the generic <quote>this is a collection of bytes</quote> MIME type). Of course, if Subversion guesses incorrectly, or if you wish to set the <literal>svn:mime-type</literal> property to something more precise—perhaps <literal>image/png</literal> or <literal>application/x-shockwave-flash</literal>—you can always remove or edit that property. (For more on Subversion's use of MIME types, see <xref linkend=\"svn.advanced.props.special.mime-type\"/>.)"
4863 msgstr "当你使用<command>svn add</command>或是<command>svn import</command>准备加入一个版本控制的文件时,Subversion会自动运行一个基本探测来检查文件是包含了可读还是不可读的内容,首先,在支持执行允许位的操作系统,Subversion会自动会为设置执行位的文件设置<literal>svn:executable</literal>属性(更多信息见<xref linkend=\"svn.advanced.props.special.executable\"/>)。第二,它会运行非常基础的启发式检查来检测文件是否可读,如果不是,Subversion会自动设置文件的<literal>svn:mime-type</literal>属性为<literal>application/octet-stream</literal>(原始的<quote>一组字节</quote>的MIME类型)。如果Subversion猜测错误,或者是你希望使用<literal>svn:mime-type</literal>属性更精确的设置—或许是<literal>image/png</literal>或者<literal>application/x-shockwave-flash</literal>—你可以一直删除或编辑那个属性(关于Subversion使用MIME类型的更多信息,见<xref linkend=\"svn.advanced.props.special.mime-type\"/>。)"
4865 #. (para)
4866 #: ../source/book.xml:4544
4867 msgid "Subversion also provides, via its runtime configuration system (see <xref linkend=\"svn.advanced.confarea\"/>), a more flexible automatic property setting feature which allows you to create mappings of filename patterns to property names and values. Once again, these mappings affect adds and imports, and can not only override the default MIME type decision made by Subversion during those operations, but can also set additional Subversion or custom properties, too. For example, you might create a mapping that says that any time you add JPEG files—ones whose names match the pattern <literal>*.jpg</literal>—Subversion should automatically set the <literal>svn:mime-type</literal> property on those files to <literal>image/jpeg</literal>. Or perhaps any files that match <literal>*.cpp</literal> should have <literal>svn:eol-style</literal> set to <literal>native</literal>, and <literal>svn:keywords</literal> set to <literal>Id</literal>. Automatic property support is perhaps the handiest property-related tool in the Subversion toolbox. See <xref linkend=\"svn.advanced.confarea.opts.config\"/> for more about configuring that support."
4868 msgstr "Subversion也通过运行配置系统(见<xref linkend=\"svn.advanced.confarea\"/>)提供了自动属性特性,允许你创建文件名到属性名称与值影射,这个影射在你的运行配置区域设置,它们会影响添加和导入操作,而且不仅仅会覆盖Subversion所有缺省的MIME类型判断操作,也会设置额外的Subversion或者自定义的属性。举个例子,你会创建一个影射文件说在任何时候你添加了一个JPEG文件—一些符合<literal>*.jpg</literal>的文件—Subversion一定会自动设置它们的<literal>svn:mime-type</literal>属性为<literal>image/jpeg</literal>。或者是任何匹配<literal>*.cpp</literal>的文件,必须把<literal>svn:eol-style</literal>设置为<literal>native</literal>,并且<literal>svn:keywords</literal>设置为<literal>Id</literal>。自动属性支持是Subversion工具箱中属性相关最垂手可得的工具,见<xref linkend=\"svn.advanced.confarea.opts.config\"/>来查看更多的配置支持。"
4870 #. (title)
4871 #: ../source/book.xml:4571
4872 msgid "File Portability"
4873 msgstr "文件移植性"
4875 #. (para)
4876 #: ../source/book.xml:4573
4877 msgid "Fortunately for Subversion users who routinely find themselves on different computers with different operating systems, Subversion's command-line program behaves almost identically on all those systems. If you know how to wield <command>svn</command> on one platform, you know how to wield it everywhere."
4878 msgstr "幸运的是,对于许多在不同操作系统下工作的用户,Subversion命令行程序的行为方式几乎完全一致,如果你知道在一个平台上如何运行<command>svn</command>,你也就学会了在其他平台上运行。"
4880 #. (para)
4881 #: ../source/book.xml:4579
4882 msgid "However, the same is not always true of other general classes of software, or of the actual files you keep in Subversion. For example, on a Windows machine, the definition of a <quote>text file</quote> would be similar to that used on a Linux box, but with a key difference—the character sequences used to mark the ends of the lines of those files. There are other differences, too. Unix platforms have (and Subversion supports) symbolic links; Windows does not. Unix platforms use filesystem permission to determine executability; Windows uses filename extensions."
4883 msgstr "然而,这一点在本软件的其他几类地方或Subversion保持的实际文件并不一定都是正确的。例如,在一个Windows系统,<quote>文本文件</quote>的定义与Linux环境下的类似,但是也有区别—行结束的字符串并不相同。当然也有其他的区别,Unix平台支持(Subversion也支持)符号链;Windows不知吃,Unix使用文件系统执行位来检测可执行性;而Windows使用文件扩展名。"
4885 #. (para)
4886 #: ../source/book.xml:4589
4887 msgid "Because Subversion is in no position to unite the whole world in common definitions and implementations of all of these things, the best it can do is to try to help make your life simpler when you need to work with your versioned files and directories on multiple computers and operating systems. This section describes some of the ways Subversion does this."
4888 msgstr "因为Subversion不是要将世界上的所有此类事情统一起来,所以我们最好是尽可能让我们在多个计算机和操作系统上使用版本化文件和目录时能够更简单,本节描述了Subversion是如何做的。"
4890 #. (title)
4891 #: ../source/book.xml:4598
4892 msgid "File Content Type"
4893 msgstr "文件内容类型"
4895 #. (para)
4896 #: ../source/book.xml:4600
4897 msgid "Subversion joins the ranks of the many applications which recognize and make use of Multipurpose Internet Mail Extensions (MIME) content types. Besides being a general-purpose storage location for a file's content type, the value of the <literal>svn:mime-type</literal> file property determines some behavioral characteristics of Subversion itself."
4898 msgstr "Subversion同很多应用一样利用多用途网际邮件扩展(MIME)内容类型,<literal>svn:mime-type</literal>属性为Subversion的许多目的服务,除了保存一个文件的MIME分类以外,这个<literal>svn:mime-type</literal>属性值也描述了一些Subversion自己使用的行为特性。"
4900 #. (title)
4901 #: ../source/book.xml:4609
4902 msgid "Identifying File Types"
4903 msgstr "识别文件类型"
4905 #. (para)
4906 #: ../source/book.xml:4611
4907 msgid "Various programs on most modern operating systems make assumptions about the type and format of the contents of a file by the file's name, specifically its file extension. For example, files whose names end in <filename>.txt</filename> are generally assumed to be human-readable, able to be understood by simple perusal rather than requiring complex processing to decipher. Files whose names end in <filename>.png</filename>, on the other hand, are assumed to be of the Portable Network Graphics type—not human-readable at all, and sensible only when interpreted by software which understands the PNG format and can render the information in that format as a raster image."
4908 msgstr "大多数现代操作系统通过文件名的扩展名推断文件的类型和格式,例如,以<filename>.txt</filename>为后缀的文件通常被认为是可读的,不需要通过复杂的解码处理就可以被阅读。对于后缀名为<filename>.png</filename>文件,则被认为是Portable Network Graphics类型—不是可读的格式,只能通过识别PNG格式并且可以将信息转化为光栅的软件使用。"
4910 #. (para)
4911 #: ../source/book.xml:4636
4912 msgid "You think that was rough? During that same era, WordPerfect also used <filename>.DOC</filename> for their proprietary file format's preferred extension!"
4913 msgstr "你认为那样过于粗狂?在同一个时代里,WordPerfect也使用<filename>.DOC</filename>作为它们私有文件格式的扩展名!"
4915 #. (para)
4916 #: ../source/book.xml:4624
4917 msgid "Unfortunately, some of those extensions have changed their meanings over time. When personal computers first appeared, a file named <filename>README.DOC</filename> would have almost certainly been a plaintext file, just like today's <filename>.txt</filename> files. But by the mid-1990's, you could almost bet that a file of that name would not be a plaintext file at all, but instead a Microsoft Word document in a proprietary, non-human-readable format. But this change didn't occur overnight—there was certainly a period of confusion for computer users over what exactly they had in hand when they saw a <filename>.DOC</filename> file. <placeholder-1/>"
4918 msgstr "不幸的是,一些扩展名已经随时间改变了意义。当个人电脑第一次出现时,一个叫做<filename>README.DOC</filename>的文件一定是一个纯文本文件了,就像现在的<filename>.txt</filename>文件。但是在九十年代中期,你可以打赌这个文件已经不是文本文件,而变成了微软的私有的、不可读的Word文档格式。但是这个变化不是一夜完成的—在一段时间里一定会有用户在看到一个<filename>.DOC</filename>时感到困惑。<placeholder-1/>"
4920 #. (para)
4921 #: ../source/book.xml:4640
4922 msgid "The popularity of computer networking cast still more doubt on the mapping between a file's name and its content. With information being served across networks and generated dynamically by server-side scripts, there was often no real file per se, and therefore no file name. Web servers, for example, needed some other way to tell browsers what they were downloading so the browser could do something intelligent with that information, whether that was to display the data using a program registered to handle that data type, or to prompt the user for where on the client machine to store the downloaded data."
4923 msgstr "计算机网络的普及导致对于文件名和其关联内容的更多混淆,当信息存放在网络上并由服务器脚本动态生成时,会没有文件名。Web服务器,需要使用其他方式告诉浏览器它们所请求内容的信息,这样浏览器才能智能的根据信息作一些事情,或者是使用注册的程序显示数据,或者是提示用户将文件下载到某个地方。"
4925 #. (para)
4926 #: ../source/book.xml:4651
4927 msgid "Eventually, a standard emerged for, among other things, describing the contents of a data stream. In 1996, RFC2045 was published, the first of five RFCs describing MIME. It describes the concept of media types and subtypes, and recommends a syntax for the representation of those types. Today, MIME media types—or <quote>MIME types</quote>—are used almost universally across e-mail applications, Web servers, and other software as the de facto mechanism for clearing up the file content confusion."
4928 msgstr "最终,一个描述数据流内容的标准出现了。1996年,5个描述MIME的RFC中的第一个RFC2045发布了,这个RFC描述了媒体类型和子类型概念,并且提出了表示这些类型的推荐语法。现在,MIME媒体类型—MIME类型已经广泛应用在电邮应用,Web服务器和其他软件,成为了防止文件内容混淆的标准机制。"
4930 #. (para)
4931 #: ../source/book.xml:4662
4932 msgid "For example, one of the benefits that Subversion typically provides is contextual, line-based merging of changes received from the server during an update into your working file. But for files containing non-textual data, there is often no concept of a <quote>line</quote>. So, for versioned files whose <literal>svn:mime-type</literal> property is set to a non-textual MIME type (generally, something that doesn't begin with <literal>text/</literal>, though there are exceptions), Subversion does not attempt to perform contextual merges during updates. Instead, any time you have locally modified a binary working copy file that is also being updated, your file is left untouched and Subversion creates two new files. One file has a <filename>.oldrev</filename> extension and contains the BASE revision of the file. The other file has a <filename>.newrev</filename> extension and contains the contents of the updated revision of the file. This behavior is really for the protection of the user against failed attempts at performing contextual merges on files that simply cannot be contextually merged."
4933 msgstr "举个例子,一个好处就是Subversion在更新时通常可以提供基于上下文的行为基础的合并,如果一个文件<literal>svn:mime-type</literal>属性设置为非文本的MIME类型(通常是那些不是<literal>text/</literal>开头的类型,但也有例外),Subversion会假定这个文件保存了二进制内容—也就是不可读的数据。一个好处就是Subversion通常在更新工作拷贝时提供了一个前后相关的以行为基础的修改合并,但是对于二进制数据文件,没有<quote>行</quote>的概念,所以对这些文件,Subversion不会在更新时尝试执行合并操作,相反,任何时候你在本地已经修改的一个二进制文件有了更新,你的文件扩展名会修改为<filename>.orig</filename>,然后Subversion保存一个新的工作拷贝文件来保存更新时得到的修改,但原来的文件名已经不是你自己的本地修改。这个行为模式是用来保护用户在对不可文本合并的文件尝试执行文本的合并时失败的情形。"
4935 #. (para)
4936 #: ../source/book.xml:4681
4937 msgid "Also, if the <literal>svn:mime-type</literal> property is set, then the Subversion Apache module will use its value to populate the <literal>Content-type:</literal> HTTP header when responding to GET requests. This gives your web browser a crucial clue about how to display a file when you use it to peruse your Subversion repository's contents."
4938 msgstr "另外,如果设置了<literal>svn:mime-type</literal>属性,Subversion的Apache模块会使用这个值来在HTTP头里输入<literal>Content-type:</literal>,这给了web浏览器如何显示版本库的一个文件提供了至关重要的线索。"
4940 #. (title)
4941 #: ../source/book.xml:4691
4942 msgid "File Executability"
4943 msgstr "文件的可执行性"
4945 #. (para)
4946 #: ../source/book.xml:4693
4947 msgid "On many operating systems, the ability to execute a file as a command is governed by the presence of an execute permission bit. This bit usually defaults to being disabled, and must be explicitly enabled by the user for each file that needs it. But it would be a monumental hassle to have to remember exactly which files in freshly checked-out working copy were supposed to have their executable bits toggled on, and then to have to do that toggling. So, Subversion provides the <literal>svn:executable</literal> property as a way to specify that the executable bit for the file on which that property is set should be enabled, and Subversion honors that request when populating working copies with such files."
4948 msgstr "在多数操作系统,执行一个文件或命令的能力是由执行位管理的,这些位缺省是关闭的,必须由用户根据需要显式的指定,但是记住应该为哪些检出的文件设置可执行位会是一件很麻烦的事情,所以Subversion提供了<literal>svn:executable</literal>这个属性来保持打开执行位,在工作拷贝得到这些文件时设置执行位。"
4950 #. (para)
4951 #: ../source/book.xml:4708
4952 msgid "The Windows filesystems use file extensions (such as <literal>.EXE</literal>, <literal>.BAT</literal>, and <literal>.COM</literal>) to denote executable files."
4953 msgstr "Windows文件系统使用文件扩展名(如<literal>.EXE</literal>、<literal>.BAT</literal>和<literal>.COM</literal>)来标示可执行文件。"
4955 #. (para)
4956 #: ../source/book.xml:4705
4957 msgid "This property has no effect on filesystems that have no concept of an executable permission bit, such as FAT32 and NTFS. <placeholder-1/> Also, although it has no defined values, Subversion will force its value to <literal>*</literal> when setting this property. Finally, this property is valid only on files, not on directories."
4958 msgstr "这个属性对于没有可执行权限位的文件系统无效,如FAT32和NTFS。 <placeholder-1/>也就是说,尽管它没有定义的值,在设置这个属性时,Subversion会强制它的值为<literal>*</literal>,最后,这个属性只对文件有效,目录无效。"
4960 #. (title)
4961 #: ../source/book.xml:4720
4962 msgid "End-of-Line Character Sequences"
4963 msgstr "行结束字符串"
4965 #. (para)
4966 #: ../source/book.xml:4722
4967 msgid "Unless otherwise noted using a versioned file's <literal>svn:mime-type</literal> property, Subversion assumes the file contains human-readable data. Generally speaking, Subversion only uses this knowledge to determine if contextual difference reports for that file are possible. Otherwise, to Subversion, bytes are bytes."
4968 msgstr "除非使用版本化文件的<literal>svn:mime-type</literal>属性注明,Subversion会假定这个文件保存了可读的数据,一般来讲,Subversion只使用这些信息来判断一个文件是否可以用上下文区别的报告,否则,对Subversion来说只是字节。"
4970 #. (para)
4971 #: ../source/book.xml:4728
4972 msgid "This means that by default, Subversion doesn't pay any attention to the type of <firstterm>end-of-line (EOL) markers</firstterm> used in your files. Unfortunately, different operating systems have different conventions about which character sequences represent the end of a line of text in a file. For example, the usual line ending token used by software on the Windows platform is a pair of ASCII control characters—a carriage return (<literal>CR</literal>) followed by a line feed (<literal>LF</literal>). Unix software, however, just uses the <literal>LF</literal> character to denote the end of a line."
4973 msgstr "这意味着缺省情况下,Subversion不会关注任何<firstterm>行结束标记(end-of-line,EOL)</firstterm>,不幸的是不同的操作系统在文本文件使用不同的行结束标志,举个例子,Windows平台下的A编辑工具使用一对ASCII控制字符—回车(<literal>CR</literal>)和一个换行(<literal>LF</literal>),而Unix软件,只使用一个<literal>LF</literal>来表示一个行的结束。"
4975 #. (para)
4976 #: ../source/book.xml:4739
4977 msgid "Not all of the various tools on these operating systems understand files that contain line endings in a format that differs from the <firstterm>native line ending style</firstterm> of the operating system on which they are running. So, typically, Unix programs treat the <literal>CR</literal> character present in Windows files as a regular character (usually rendered as <literal>^M</literal>), and Windows programs combine all of the lines of a Unix file into one giant line because no carriage return-linefeed (or <literal>CRLF</literal>) character combination was found to denote the ends of the lines."
4978 msgstr "并不是所有操作系统的工具准备好了理解与<firstterm>本地行结束样式</firstterm>不一样的行结束格式,一个常见的结果是Unix程序会把Windows文件中的<literal>CR</literal>当作一个不同的字符(通常表现为<literal>^M</literal>),而Windows程序会把Unix文件合并为一个非常大的行,因为没有发现标志行结束的回车加换行(或者是<literal>CRLF</literal>)字符。"
4980 #. (para)
4981 #: ../source/book.xml:4751
4982 msgid "This sensitivity to foreign EOL markers can be frustrating for folks who share a file across different operating systems. For example, consider a source code file, and developers that edit this file on both Windows and Unix systems. If all the developers always use tools which preserve the line ending style of the file, no problems occur."
4983 msgstr "对外来EOL标志的敏感会让在多种操作系统分享文件的人们感到沮丧,例如,考虑有一个源代码文件,开发者会在Windows和Unix系统上编辑这个文件,如果所有的用户使用的工具可以展示文件的行结束,那就没有问题了。"
4985 #. (para)
4986 #: ../source/book.xml:4758
4987 msgid "But in practice, many common tools either fail to properly read a file with foreign EOL markers, or they convert the file's line endings to the native style when the file is saved. If the former is true for a developer, he has to use an external conversion utility (such as <command>dos2unix</command> or its companion, <command>unix2dos</command>) to prepare the file for editing. The latter case requires no extra preparation. But both cases result in a file that differs from the original quite literally on every line! Prior to committing his changes, the user has two choices. Either he can use a conversion utility to restore the modified file to the same line ending style that it was in before his edits were made. Or, he can simply commit the file—new EOL markers and all."
4988 msgstr "但实践中,许多常用的工具不会正确的读取外来的EOL标志,或者只是在保存文件时将文件的行结束符转化为本地的样式,如果是前者,他需要一个外部的转化工具(如<command>dos2unix</command>,或是他的伴侣<command>unix2dos</command>)来准备需要编辑的文件。后一种情况不需要额外的准备工作,两种方法都会造成文件会与原来的文件在每一行上都不一样!在提交之前,用户有两个选择,或者选择用一个转化工具恢复文件的行结束样式,或者是简单的提交文件—包含新的EOL标志。"
4990 #. (para)
4991 #: ../source/book.xml:4773
4992 msgid "The result of scenarios like these include wasted time and unnecessary modifications to committed files. Wasted time is painful enough. But when commits change every line in a file, this complicates the job of determining which of those lines were changed in a non-trivial way. Where was that bug really fixed? On what line was a syntax error introduced?"
4993 msgstr "这个情景的结局看起来像是要浪费时间对提交的文件作不必要的修改,浪费时间是痛苦的,但是如果提交修改了文件的每一行,判断文件修改了哪一行会是一件复杂的工作,bug在哪一行修正的?哪一行导致了语法错误?"
4995 #. (para)
4996 #: ../source/book.xml:4780
4997 msgid "The solution to this problem is the <literal>svn:eol-style</literal> property. When this property is set to a valid value, Subversion uses it to determine what special processing to perform on the file so that the file's line ending style isn't flip-flopping with every commit that comes from a different operating system. The valid values are:"
4998 msgstr "这个问题的解决方案是<literal>svn:eol-style</literal>属性,当这个属性设置为一个正确的值时,Subversion使用它来判断针对行结束样式执行何种特殊的操作,而不会随着多种操作系统的每次提交而发生剧烈变化,正确的值有:"
5000 #. (literal)
5001 #: ../source/book.xml:4790
5002 msgid "native"
5003 msgstr "native"
5005 #. (para)
5006 #: ../source/book.xml:4793
5007 msgid "This causes the file to contain the EOL markers that are native to the operating system on which Subversion was run. In other words, if a user on a Windows machine checks out a working copy that contains a file with an <literal>svn:eol-style</literal> property set to <literal>native</literal>, that file will contain <literal>CRLF</literal> EOL markers. A Unix user checking out a working copy which contains the same file will see <literal>LF</literal> EOL markers in his copy of the file."
5008 msgstr "这会导致保存EOL标志的文件使用Subversion运行的操作系统的本地编码,换句话说,如果一个Windows用户取出一个工作拷贝包含的文件设置<literal>native</literal>的属性为<literal>svn:eol-style</literal>,这个文件会使用<literal>CRLF</literal>的EOL标志,一个Unix用户取出相同的文件会看到他的文件使用<literal>LF</literal>的EOL标志。"
5010 #. (para)
5011 #: ../source/book.xml:4804
5012 msgid "Note that Subversion will actually store the file in the repository using normalized <literal>LF</literal> EOL markers regardless of the operating system. This is basically transparent to the user, though."
5013 msgstr "注意Subversion实际上使用<literal>LF</literal>的EOL标志,而不会考略操作系统,尽管这对用户来说是透明的。"
5015 #. (literal)
5016 #: ../source/book.xml:4813
5017 msgid "CRLF"
5018 msgstr "CRLF"
5020 #. (para)
5021 #: ../source/book.xml:4816
5022 msgid "This causes the file to contain <literal>CRLF</literal> sequences for EOL markers, regardless of the operating system in use."
5023 msgstr "这会导致这个文件使用<literal>CRLF</literal>序列作为EOL标志,不管使用何种操作系统。"
5025 #. (literal)
5026 #: ../source/book.xml:4823
5027 msgid "LF"
5028 msgstr "LF"
5030 #. (para)
5031 #: ../source/book.xml:4826
5032 msgid "This causes the file to contain <literal>LF</literal> characters for EOL markers, regardless of the operating system in use."
5033 msgstr "这会导致文件使用<literal>LF</literal>字符作为EOL标志,不管使用何种操作系统。"
5035 #. (literal)
5036 #: ../source/book.xml:4833
5037 msgid "CR"
5038 msgstr "CR"
5040 #. (para)
5041 #: ../source/book.xml:4836
5042 msgid "This causes the file to contain <literal>CR</literal> characters for EOL markers, regardless of the operating system in use. This line ending style is not very common. It was used on older Macintosh platforms (on which Subversion doesn't even run)."
5043 msgstr "这会导致文件使用<literal>CR</literal>字符作为EOL标志,不管使用何种操作系统。这种行结束样式不是很常见,它用在一些老的苹果机(Subversion不会运行的机器上)上。"
5045 #. (title)
5046 #: ../source/book.xml:4852
5047 msgid "Ignoring Unversioned Items"
5048 msgstr "忽略未版本控制的条目"
5050 #. (para)
5051 #: ../source/book.xml:4854
5052 msgid "In any given working copy there is a good chance that alongside all those versioned files and directories are other files and directories which are neither versioned nor intended to be. Text editors litter directories with backup files. Software compilers generate intermediate—or even final—files which you typically wouldn't bother to version. And users themselves drop various other files and directories wherever they see fit, often in version control working copies."
5053 msgstr "在任何工作拷贝,将版本化文件和目录与没有也不准备版本化的文件分开会是非常常见的情况。文本编辑器的备份文件会将目录搞乱,代码编译过程中生成的中间文件,甚至最终文件也不是你希望版本化的,用户在见到这些文件和目录(经常是版本控制工作拷贝中)的任何时候都会将他们删除。"
5055 #. (para)
5056 #: ../source/book.xml:4863
5057 msgid "It's ludicrous to expect Subversion working copies to be somehow impervious to this kind of clutter and impurity. In fact, Subversion counts it as a <emphasis>feature</emphasis> that its working copies are just typical directories, just like unversioned trees. But these not-to-be-versioned files and directories can cause some annoyance for Subversion users. For example, because the <command>svn add</command> and <command>svn import</command> commands act recursively by default, and don't know which files in a given tree you do and don't wish to version, it's easy to accidentally add stuff to version control that you didn't mean to. And because <command>svn status</command> reports, by default, every item of interest in a working copy—including unversioned files and directories—its output can get quite noisy where many of these things exist."
5058 msgstr "期望让Subversion的工作拷贝摆脱混乱保持干净是可笑的,实际上Subversion将工作拷贝是普通目录作为它的一项<emphasis>特性</emphasis>。但是这些没有版本化的文件和目录会给Subversion用户带来一些烦恼,例如,因为<command>svn add</command>和<command>svn import</command>命令都是会递归执行的,并不知道哪些文件你不希望版本化,很容易意外的添加一些文件。因为<command>svn status</command>会报告工作拷贝中包括未版本化文件和目录的信息,如果这种文件很多,它的输出会变得非常嘈杂。"
5060 #. (para)
5061 #: ../source/book.xml:4878
5062 msgid "So Subversion provides two ways for telling it which files you would prefer that it simply disregard. One of the ways involves the use of Subversion's runtime configuration system (see <xref linkend=\"svn.advanced.confarea\"/>), and therefore applies to all the Subversion operations which make use of that runtime configuration, generally those performed on a particular computer, or by a particular user of a computer. The other way makes use of Subversion's directory property support, is more tightly bound to the versioned tree itself, and therefore affects everyone who has a working copy of that tree. Both of the mechanisms use file patterns."
5063 msgstr "所以Subversion提供了两种方法让你指明哪些文件可以被漠视,一种方法需要你修改Subversion的运行配置系统(见<xref linkend=\"svn.advanced.confarea\"/>),这样会使所有的Subversion操作都利用这个配置,通常来说,这是在某一个计算机上的操作,或者是某个计算机某个用户的操作。另一种方法利用了Subversion目录属性支持,与版本化的目录树紧密结合,因而会影响所有拥有这个目录树工作拷贝的人。两种机制都使用文件模式。"
5065 #. (para)
5066 #: ../source/book.xml:4889
5067 msgid "The Subversion runtime configuration system provides an option, <literal>global-ignores</literal>, whose value is a whitespace-delimited collection of file patterns (also known as <firstterm>globs</firstterm>). The Subversion client checks these patterns against the names of the files which are candidates for addition to version control, as well as to unversioned files which the <command>svn status</command> command notices. If any file's name matches one of the patterns, Subversion will basically act as if the file didn't exist at all. This is really useful for the kinds of files that you almost never want to version, such as editor backup files like Emacs' <literal>*~</literal> and <literal>.*~</literal> files."
5068 msgstr "Subversion运行配置系统提供一个<literal>global-ignores</literal>选项,其中的值是空格分开的文件名模式(或glob)。这些模式会应用到可以添加到版本控制的候选者,也就是<command>svn status</command>显示出来的未版本化文件。如果文件名与其中的某个模式匹配,Subversion会当这个文件不存在。这个文件模式最好是全局不期望版本化的模式,例如编辑器Emacs的备份文件<literal>*~</literal>和<literal>.*~</literal>。"
5070 #. (para)
5071 #: ../source/book.xml:4902
5072 msgid "When found on a versioned directory, the <literal>svn:ignore</literal> property is expected to contain a list of newline-delimited file patterns which Subversion should use to determine ignorable objects in that same directory. These patterns do not override those found in the <literal>global-ignores</literal> runtime configuration option, but are instead appended to that list. And it's worth noting again that, unlike the <literal>global-ignores</literal> option, the patterns found in the <literal>svn:ignore</literal> property apply only to the directory on which that property is set, and not to any of its subdirectories. The <literal>svn:ignore</literal> property is a good way to tell Subversion to ignore files that are likely to be present in every user's working copy of that directory, such as compiler output or—to use an example more appropriate to this book—the HTML, PDF, or PostScript files generated as the result of a conversion of some source DocBook XML files to a more legible output format."
5073 msgstr "如果是在版本化目录上发现<literal>svn:ignore</literal>属性,其内容是一列以行分割的文件模式,Subversion用来判断在这个目录下对象是否被忽略。这些模式不会覆盖在运行配置设置的全局忽略,而是向其添加忽略模式。不像全局忽略选项,在<literal>svn:ignore</literal>属性中设置的值只会应用到其设置的目录,而不会应用到其子目录。<literal>svn:ignore</literal>属性是告诉Subversion在每个用户的工作拷贝对应目录忽略相同的文件的好方法,例如编译输出或—使用一个本书相关的例子—本书从DocBook XML文件生成的HTML、PDF或PostScript。"
5075 #. (para)
5076 #: ../source/book.xml:4921
5077 msgid "Subversion's support for ignorable file patterns extends only to the one-time process of adding unversioned files and directories to version control. Once an object is under Subversion's control, the ignore pattern mechanisms no longer apply to it. In other words, don't expect Subversion to avoid committing changes you've made to a versioned file simply because that file's name matches an ignore pattern—Subversion <emphasis>always</emphasis> notices all of its versioned objects."
5078 msgstr "Subversion对于忽略文件模式的支持仅限于将未版本化文件和目录添加到版本控制时,如果一个文件已经在Subversion控制下,忽略模式机制不会再有效果,不要期望Subversion会阻止你提交一个符合忽略条件的修改—Subversion一直认为它是版本化的对象。"
5080 #. (title)
5081 #: ../source/book.xml:4933
5082 msgid "Ignore Patterns for CVS Users"
5083 msgstr "CVS 用户的忽略模式"
5085 #. (para)
5086 #: ../source/book.xml:4935
5087 msgid "The Subversion <literal>svn:ignore</literal> property is very similar in syntax and function to the CVS <filename>.cvsignore</filename> file. In fact, if you are migrating a CVS working copy to Subversion, you can directly migrate the ignore patterns by using the <filename>.cvsignore</filename> file as input file to the <command>svn propset</command> command:"
5088 msgstr "Subversion的<literal>svn:ignore</literal>属性与CVS的<filename>.cvsignore</filename>文件的语法和功能非常类似,实际上,如果你移植一个CVS的工作拷贝到Subversion,你可以直接使用<filename>.cvsignore</filename>作为<command>svn propset</command>输入文件参数:"
5090 #. (screen)
5091 #: ../source/book.xml:4942
5092 #, no-wrap
5093 msgid ""
5094 "\n"
5095 "$ svn propset svn:ignore -F .cvsignore .\n"
5096 "property 'svn:ignore' set on '.'\n"
5097 "$\n"
5098 msgstr ""
5099 "\n"
5100 "$ svn propset svn:ignore -F .cvsignore .\n"
5101 "property 'svn:ignore' set on '.'\n"
5102 "$\n"
5104 #. (para)
5105 #: ../source/book.xml:4947
5106 msgid "There are, however, some differences in the ways that CVS and Subversion handle ignore patterns. The two systems use the ignore patterns at some different times, and there are slight discrepancies in what the ignore patterns apply to. Also, Subversion does not recognize the use of the <literal>!</literal> pattern as a reset back to having no ignore patterns at all."
5107 msgstr "但是CVS和Subversion处理忽略模式的方式有一些不同,这两个系统在不同的时候使用忽略模式,忽略模式应用的对象也由微小的不同,另外Subversion不可以使用<literal>!</literal>模式来去取消忽略模式。"
5109 #. (para)
5110 #: ../source/book.xml:4955
5111 msgid "The global list of ignore patterns tends to be more a matter of personal taste, and tied more closely to a user's particular tool chain than to the details of any particular working copy's needs. So, the rest of this section will focus on the <literal>svn:ignore</literal> property and its uses."
5112 msgstr "全局忽略模式只是一种个人喜好,可能更接近于用户的特定工具链,而不是特定工作拷贝的需要,所以余下的小节将关注<literal>svn:ignore</literal>属性和它的使用。"
5114 #. (para)
5115 #: ../source/book.xml:4961
5116 msgid "Say you have the following output from <command>svn status</command>:"
5117 msgstr "假定你的<command>svn status</command>有如下输出:"
5119 #. (screen)
5120 #: ../source/book.xml:4963
5121 #, no-wrap
5122 msgid ""
5123 "\n"
5124 "$ svn status calc\n"
5125 " M     calc/button.c\n"
5126 "?      calc/calculator\n"
5127 "?      calc/data.c\n"
5128 "?      calc/debug_log\n"
5129 "?      calc/debug_log.1\n"
5130 "?      calc/debug_log.2.gz\n"
5131 "?      calc/debug_log.3.gz\n"
5132 msgstr ""
5133 "\n"
5134 "$ svn status calc\n"
5135 " M     calc/button.c\n"
5136 "?      calc/calculator\n"
5137 "?      calc/data.c\n"
5138 "?      calc/debug_log\n"
5139 "?      calc/debug_log.1\n"
5140 "?      calc/debug_log.2.gz\n"
5141 "?      calc/debug_log.3.gz\n"
5143 #. (para)
5144 #: ../source/book.xml:4981
5145 msgid "Isn't that the whole point of a build system?"
5146 msgstr "这不是编译系统的基本功能吗?"
5148 #. (para)
5149 #: ../source/book.xml:4973
5150 msgid "In this example, you have made some property modifications to <filename>button.c</filename>, but in your working copy you also have some unversioned files: the latest <filename>calculator</filename> program that you've compiled from your source code, a source file named <filename>data.c</filename>, and a set of debugging output log files. Now, you know that your build system always results in the <filename>calculator</filename> program being generated. <placeholder-1/> And you know that your test suite always leaves those debugging log files lying around. These facts are true for all working copies of this project, not just your own. And you know that you aren't interested in seeing those things every time you run <command>svn status</command>, and pretty sure that nobody else is interested in them either. So you use <command>svn propedit svn:ignore calc</command> to add some ignore patterns to the <filename>calc</filename> directory. For example, you might add this as the new value of the <literal>svn:ignore</literal> property:"
5151 msgstr "在这个例子里,你对<filename>button.c</filename>文件作了一些属性修改,但是你的工作拷贝也有一些未版本化的文件:你从源代码编译的最新<filename>计算器</filename>程序,一系列调试输出日志文件,现在你知道你的编译系统一直会编译生成<filename>计算器</filename>程序。 <placeholder-1/>而且你知道你的测试组件总是会留下这些调试日志,这对所有的工作拷贝都是一样的,不仅仅是你的。你也知道你不会有兴趣在<command>svn status</command>命令中显示这些信息,所以使用<command>svn propedit svn:ignore calc</command>来为<filename>calc</filename>目录增加一些忽略模式,举个例子,你或许会添加如下的值作为<literal>svn:ignore</literal>的属性:"
5153 #. (programlisting)
5154 #: ../source/book.xml:4992
5155 #, no-wrap
5156 msgid ""
5157 "\n"
5158 "calculator\n"
5159 "debug_log*\n"
5160 msgstr ""
5161 "\n"
5162 "calculator\n"
5163 "debug_log*\n"
5165 #. (para)
5166 #: ../source/book.xml:4996
5167 msgid "After you've added this property, you will now have a local property modification on the <filename>calc</filename> directory. But notice what else is different about your <command>svn status</command> output:"
5168 msgstr "当你添加完这些属性,你会在<filename>calc</filename>目录有一个本地修改,但是注意你的<command>svn status</command>输出有什么其他的不同:"
5170 #. (screen)
5171 #: ../source/book.xml:5000
5172 #, no-wrap
5173 msgid ""
5174 "\n"
5175 "$ svn status\n"
5176 " M     calc\n"
5177 " M     calc/button.c\n"
5178 "?      calc/data.c\n"
5179 msgstr ""
5180 "\n"
5181 "$ svn status\n"
5182 " M     calc\n"
5183 " M     calc/button.c\n"
5184 "?      calc/data.c\n"
5186 #. (para)
5187 #: ../source/book.xml:5006
5188 msgid "Now, all that cruft is missing from the output! Of course, your <filename>calculator</filename> compiled program and all those logfiles are still in your working copy. Subversion is simply not reminding you that they are present and unversioned. And now with all the uninteresting noise removed from the display, you are left with more interesting items—such as that source code file <filename>data.c</filename> that you probably forgot to add to version control."
5189 msgstr "现在,所有多余的输出不见了!当然,你的<filename>计算器</filename>程序和所有的日志文件还在工作拷贝中,Subversion仅仅是不再提醒你它们的存在和未版本化。现在所有讨厌的噪音都已经不再显示,只留下了你感兴趣的条目—如你忘记添加到版本控制的源代码文件<filename>data.c</filename>。"
5191 #. (para)
5192 #: ../source/book.xml:5014
5193 msgid "Of course, this less-verbose report of your working copy status isn't the only one available. If you actually want to see the ignored files as part of the status report, you can pass the <option>--no-ignore</option> option to Subversion:"
5194 msgstr "当然,不仅仅只有这种简略的工作拷贝状态输出,如果想查看被忽略的文件,可以使用Subversion的<option>--no-ignore</option>选项:"
5196 #. (screen)
5197 #: ../source/book.xml:5018
5198 #, no-wrap
5199 msgid ""
5200 "\n"
5201 "$ svn status --no-ignore\n"
5202 " M     calc\n"
5203 " M     calc/button.c\n"
5204 "I      calc/calculator\n"
5205 "?      calc/data.c\n"
5206 "I      calc/debug_log\n"
5207 "I      calc/debug_log.1\n"
5208 "I      calc/debug_log.2.gz\n"
5209 "I      calc/debug_log.3.gz\n"
5210 msgstr ""
5211 "\n"
5212 "$ svn status --no-ignore\n"
5213 " M     calc\n"
5214 " M     calc/button.c\n"
5215 "I      calc/calculator\n"
5216 "?      calc/data.c\n"
5217 "I      calc/debug_log\n"
5218 "I      calc/debug_log.1\n"
5219 "I      calc/debug_log.2.gz\n"
5220 "I      calc/debug_log.3.gz\n"
5222 #. (para)
5223 #: ../source/book.xml:5029
5224 msgid "As mentioned earlier, the list of file patterns to ignore is also used by <command>svn add</command> and <command>svn import</command>. Both of these operations involve asking Subversion to begin managing some set of files and directories. Rather than force the user to pick and choose which files in a tree she wishes to start versioning, Subversion uses the ignore patterns—both the global and the per-directory lists—to determine which files should not be swept into the version control system as part of a larger recursive addition or import operation. And here again, you can use the <option>--no-ignore</option> option to tell Subversion ignore its ignores list and operate on all the files and directories present."
5225 msgstr "我们在前面提到过,<command>svn add</command>和<command>svn import</command>也会使用这个忽略模式列表,这两个操作都包括了询问Subversion来开始管理一组文件和目录。比强制用户挑拣目录树中那个文件要纳入版本控制的方式更好,Subversion使用忽略模式来检测那个文件不应该在大的迭代添加和导入操作中进入版本控制系统。再次说明,操作Subversion文件和目录时你可以使用<option>--no-ignore</option>选项忽略这个忽略列表。"
5227 #. (title)
5228 #: ../source/book.xml:5048
5229 msgid "Keyword Substitution"
5230 msgstr "关键字替换"
5232 #. (para)
5233 #: ../source/book.xml:5050
5234 msgid "Subversion has the ability to substitute <firstterm>keywords</firstterm>—pieces of useful, dynamic information about a versioned file—into the contents of the file itself. Keywords generally provide information about the last modification made to the file. Because this information changes each time the file changes, and more importantly, just <emphasis>after</emphasis> the file changes, it is a hassle for any process except the version control system to keep the data completely up-to-date. Left to human authors, the information would inevitably grow stale."
5235 msgstr "Subversion具备添加<firstterm>关键字</firstterm>的能力—一些有用的,关于版本化的文件动态信息的片断—不必直接添加到文件本身。关键字通常会用来描述文件最后一次修改的一些信息,因为这些信息每次都有改变,更重要的一点,这是在文件修改<emphasis>之后</emphasis>,除了版本控制系统,对于任何企图保持数据最新的过程都是一场混乱,作为人类作者,信息变得陈旧是不可避免的。"
5237 #. (para)
5238 #: ../source/book.xml:5061
5239 msgid "For example, say you have a document in which you would like to display the last date on which it was modified. You could burden every author of that document to, just before committing their changes, also tweak the part of the document that describes when it was last changed. But sooner or later, someone would forget to do that. Instead, simply ask Subversion to perform keyword substitution on the <literal>LastChangedDate</literal> keyword. You control where the keyword is inserted into your document by placing a <firstterm>keyword anchor</firstterm> at the desired location in the file. This anchor is just a string of text formatted as <literal>$</literal><replaceable>KeywordName</replaceable><literal>$</literal>."
5240 msgstr "举个例子,你有一个文档希望显示最后修改的日期,你需要麻烦每个作者提交之前做这件事情,也要修改文档的一部分来描述何时作的修改,但是迟早会有人忘记做这件事,不选择简单的告诉Subversion来执行替换<literal>LastChangedDate</literal>关键字的操作,你通过在目标位置放置一个<firstterm>keyword anchor</firstterm>来控制关键字插入的位置,这个anchor只是一个格式为<literal>$</literal><replaceable>KeywordName</replaceable><literal>$</literal>字符串。"
5242 #. (para)
5243 #: ../source/book.xml:5074
5244 msgid "All keywords are case-sensitive where they appear as anchors in files: you must use the correct capitalization in order for the keyword to be expanded. You should consider the value of the <literal>svn:keywords</literal> property to be case-sensitive too—certain keyword names will be recognized regardless of case, but this behavior is deprecated."
5245 msgstr "所有作为anchor出现在文件里的关键字是大小写敏感的:为了关键字的扩展,你必须使用正确的大写,你必须考虑<literal>svn:keywords</literal>的属性值也是大小写敏感—特定的关键字名会忽略大小写,但是这个特性已经被废弃了。"
5247 #. (para)
5248 #: ../source/book.xml:5080
5249 msgid "Subversion defines the list of keywords available for substitution. That list contains the following five keywords, some of which have aliases that you can also use:"
5250 msgstr "Subversion定义了用来替换的关键字列表,这个列表保存了如下五个关键字,有一些也包括了可用的别名:"
5252 #. (literal)
5253 #: ../source/book.xml:5086
5254 msgid "Date"
5255 msgstr "Date"
5257 #. (para)
5258 #: ../source/book.xml:5089
5259 msgid "This keyword describes the last time the file was known to have been changed in the repository, and is of the form <literal>$Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $</literal>. It may also be specified as <literal>LastChangedDate</literal>."
5260 msgstr "这个关键字保存了文件最后一次在版本库修改的日期,看起来类似于<literal>$Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $</literal>,它也可以用<literal>LastChangedDate</literal>来指定。"
5262 #. (literal), (para)
5263 #: ../source/book.xml:5099 ../source/book.xml:18944
5264 msgid "Revision"
5265 msgstr "Revision"
5267 #. (para)
5268 #: ../source/book.xml:5102
5269 msgid "This keyword describes the last known revision in which this file changed in the repository, and looks something like <literal>$Revision: 144 $</literal>. It may also be specified as <literal>LastChangedRevision</literal> or <literal>Rev</literal>."
5270 msgstr "这个关键字描述了这个文件最后一次修改的修订版本,看起来像<literal>$Revision: 144 $</literal>,也可以通过<literal>LastChangedRevision</literal>或者<literal>Rev</literal>引用。"
5272 #. (literal)
5273 #: ../source/book.xml:5112
5274 msgid "Author"
5275 msgstr "Author"
5277 #. (para)
5278 #: ../source/book.xml:5115
5279 msgid "This keyword describes the last known user to change this file in the repository, and looks something like <literal>$Author: harry $</literal>. It may also be specified as <literal>LastChangedBy</literal>."
5280 msgstr "这个关键字描述了最后一个修改这个文件的用户,看起来类似<literal>$Author: harry $</literal>,也可以用<literal>LastChangedBy</literal>来指定。"
5282 #. (literal)
5283 #: ../source/book.xml:5124
5284 msgid "HeadURL"
5285 msgstr "HeadURL"
5287 #. (para)
5288 #: ../source/book.xml:5127
5289 msgid "This keyword describes the full URL to the latest version of the file in the repository, and looks something like <literal>$HeadURL: http://svn.collab.net/repos/trunk/README $</literal>. It may be abbreviated as <literal>URL</literal>."
5290 msgstr "这个关键字描述了这个文件在版本库最新版本的完全URL,看起来类似<literal>$HeadURL: http://svn.collab.net/repos/trunk/README $</literal>,可以缩写为<literal>URL</literal>。"
5292 #. (literal)
5293 #: ../source/book.xml:5137
5294 msgid "Id"
5295 msgstr "Id"
5297 #. (para)
5298 #: ../source/book.xml:5140
5299 msgid "This keyword is a compressed combination of the other keywords. Its substitution looks something like <literal>$Id: calc.c 148 2006-07-28 21:30:43Z sally $</literal>, and is interpreted to mean that the file <filename>calc.c</filename> was last changed in revision 148 on the evening of July 28, 2006 by the user <literal>sally</literal>."
5300 msgstr "这个关键字是其他关键字一个压缩组合,它看起来就像<literal>$Id: calc.c 148 2006-07-28 21:30:43Z sally $</literal>,可以解释为文件<filename>calc.c</filename>上一次修改的修订版本号是148,时间是2006年7月28日,作者是<literal>sally</literal>。"
5302 #. (para)
5303 #: ../source/book.xml:5150
5304 msgid "Several of the previous descriptions use the phrase <quote>last known</quote> or similar wording. Keep in mind that keyword expansion is a client-side operation, and your client only <quote>knows</quote> about changes which have occurred in the repository when you update your working copy to include those changes. If you never update your working copy, your keywords will never expand to different values even if those versioned files are being changed regularly in the repository."
5305 msgstr "前面的一些描述使用了类似<quote>最后已知的</quote>短语,请记住关键字扩展是客户端操作,你的客户端只<quote>知道</quote>在你更新工作拷贝时版本库发生的修改,如果你从不更新工作拷贝,即使文件在版本库里有规律的修改,这些关键字也不会扩展为不同的值。"
5307 #. (para)
5308 #: ../source/book.xml:5164
5309 msgid "… or maybe even a section of a book …"
5310 msgstr "… 或者可能是一本书的一个小节 …"
5312 #. (para)
5313 #: ../source/book.xml:5159
5314 msgid "Simply adding keyword anchor text to your file does nothing special. Subversion will never attempt to perform textual substitutions on your file contents unless explicitly asked to do so. After all, you might be writing a document <placeholder-1/> about how to use keywords, and you don't want Subversion to substitute your beautiful examples of un-substituted keyword anchors!"
5315 msgstr "只在你的文件增加关键字anchor不会做什么特别的事情,Subversion不会尝试对你的文件内容执行文本替换,除非明确的被告知这样做,毕竟,你可以撰写一个关于如何使用关键字的文档<placeholder-1/>,你不希望Subversion会替换你漂亮的关于不需要替换的关键字anchor实例!"
5317 #. (para)
5318 #: ../source/book.xml:5168
5319 msgid "To tell Subversion whether or not to substitute keywords on a particular file, we again turn to the property-related subcommands. The <literal>svn:keywords</literal> property, when set on a versioned file, controls which keywords will be substituted on that file. The value is a space-delimited list of the keyword names or aliases found in the previous table."
5320 msgstr "为了告诉Subversion是否替代某个文件的关键字,我们要再次求助于属性相关的子命令,当<literal>svn:keywords</literal>属性设置到一个版本化的文件,这些属性控制了哪些关键字将会替换到这个文件,这个属性的值是空格分隔的前面列表的名称或是别名列表。"
5322 #. (para)
5323 #: ../source/book.xml:5175
5324 msgid "For example, say you have a versioned file named <filename>weather.txt</filename> that looks like this:"
5325 msgstr "举个例子,假定你有一个版本化的文件<filename>weather.txt</filename>,内容如下:"
5327 #. (programlisting)
5328 #: ../source/book.xml:5178
5329 #, no-wrap
5330 msgid ""
5331 "\n"
5332 "Here is the latest report from the front lines.\n"
5333 "$LastChangedDate$\n"
5334 "$Rev$\n"
5335 "Cumulus clouds are appearing more frequently as summer approaches.\n"
5336 msgstr ""
5337 "\n"
5338 "Here is the latest report from the front lines.\n"
5339 "$LastChangedDate$\n"
5340 "$Rev$\n"
5341 "Cumulus clouds are appearing more frequently as summer approaches.\n"
5343 #. (para)
5344 #: ../source/book.xml:5184
5345 msgid "With no <literal>svn:keywords</literal> property set on that file, Subversion will do nothing special. Now, let's enable substitution of the <literal>LastChangedDate</literal> keyword."
5346 msgstr "当没有<literal>svn:keywords</literal>属性设置到这个文件,Subversion不会有任何特别操作,现在让我们允许<literal>LastChangedDate</literal>关键字的替换。"
5348 #. (screen)
5349 #: ../source/book.xml:5188
5350 #, no-wrap
5351 msgid ""
5352 "\n"
5353 "$ svn propset svn:keywords \"Date Author\" weather.txt\n"
5354 "property 'svn:keywords' set on 'weather.txt'\n"
5355 "$\n"
5356 msgstr ""
5357 "\n"
5358 "$ svn propset svn:keywords \"Date Author\" weather.txt\n"
5359 "property 'svn:keywords' set on 'weather.txt'\n"
5360 "$\n"
5362 #. (para)
5363 #: ../source/book.xml:5193
5364 msgid "Now you have made a local property modification on the <filename>weather.txt</filename> file. You will see no changes to the file's contents (unless you made some of your own prior to setting the property). Notice that the file contained a keyword anchor for the <literal>Rev</literal> keyword, yet we did not include that keyword in the property value we set. Subversion will happily ignore requests to substitute keywords that are not present in the file, and will not substitute keywords that are not present in the <literal>svn:keywords</literal> property value."
5365 msgstr "现在你已经对<filename>weather.txt</filename>的属性作了修改,你会看到文件的内容没有改变(除非你之前做了一些属性设置),注意这个文件包含了<literal>Rev</literal>的关键字anchor,但我们没有在属性值中包括这个关键字,Subversion会高兴的忽略替换这个文件中的关键字,也不会替换<literal>svn:keywords</literal>属性中没有出现的关键字。"
5367 #. (para)
5368 #: ../source/book.xml:5203
5369 msgid "Immediately after you commit this property change, Subversion will update your working file with the new substitute text. Instead of seeing your keyword anchor <literal>$LastChangedDate$</literal>, you'll see its substituted result. That result also contains the name of the keyword, and continues to be bounded by the dollar sign (<literal>$</literal>) characters. And as we predicted, the <literal>Rev</literal> keyword was not substituted because we didn't ask for it to be."
5370 msgstr "在你提交了属性修改后,Subversion会立刻更新你的工作文件为新的替代文本,你将无法找到<literal>$LastChangedDate$</literal>的关键字anchor,你会看到替换的结果,这个结果也保存了关键字的名字,与美元符号(<literal>$</literal>)绑定在一起,而且我们预测的,<literal>Rev</literal>关键字不会被替换,因为我们没有要求这样做。"
5372 #. (para)
5373 #: ../source/book.xml:5212
5374 msgid "Note also that we set the <literal>svn:keywords</literal> property to <quote>Date Author</quote> yet the keyword anchor used the alias <literal>$LastChangedDate$</literal> and still expanded correctly."
5375 msgstr "注意我们设置<literal>svn:keywords</literal>属性为<quote>Date Author</quote>,关键字anchor使用别名<literal>$LastChangedDate$</literal>并且正确的扩展。"
5377 #. (screen)
5378 #: ../source/book.xml:5216
5379 #, no-wrap
5380 msgid ""
5381 "\n"
5382 "Here is the latest report from the front lines.\n"
5383 "$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $\n"
5384 "$Rev$\n"
5385 "Cumulus clouds are appearing more frequently as summer approaches.\n"
5386 msgstr ""
5387 "\n"
5388 "Here is the latest report from the front lines.\n"
5389 "$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $\n"
5390 "$Rev$\n"
5391 "Cumulus clouds are appearing more frequently as summer approaches.\n"
5393 #. (para)
5394 #: ../source/book.xml:5222
5395 msgid "If someone else now commits a change to <filename>weather.txt</filename>, your copy of that file will continue to display the same substituted keyword value as before—until you update your working copy. At that time the keywords in your <filename>weather.txt</filename> file will be re-substituted with information that reflects the most recent known commit to that file."
5396 msgstr "如果有其他人提交了<filename>weather.txt</filename>的修改,你的此文件的拷贝还会显示同样的替换关键字值—直到你更新你的工作拷贝,此时你的<filename>weather.txt</filename>重的关键字将会被替换来反映最新的提交信息。"
5398 #. (title)
5399 #: ../source/book.xml:5231
5400 msgid "Where's $GlobalRev$?"
5401 msgstr "$GlobalRev$? 在哪里?"
5403 #. (para)
5404 #: ../source/book.xml:5233
5405 msgid "New users are often confused by how the <literal>$Rev$</literal> keyword works. Since the repository has a single, globally increasing revision number, many people assume that it is this number which is reflected by the <literal>$Rev$</literal> keyword's value. But <literal>$Rev$</literal> expands to show the last revision in which the file <emphasis>changed</emphasis>, not the last revision to which it was updated. Understanding this clears the confusion, but frustration often remains—without the support of a Subversion keyword to do so, how can you automatically get the global revision number into your files?"
5406 msgstr "新用户经常为如何使用<literal>$Rev$</literal>关键字迷惑,自从版本库有了单独的全局增长的修订版本号码,许多人以为<literal>$Rev$</literal>关键字是反映修订版本号码的,但实际上<literal>$Rev$</literal>是文件最后修改的修订版本,而不是最后更新的。理解这一点,会减少一些混淆,但是还有一些挫折—如果没有Subversion关键字的支持,你怎么才能在你的文件自动得到全局修订版本号到。"
5408 #. (para)
5409 #: ../source/book.xml:5245
5410 msgid "To do this, you need external processing. Subversion ships with a tool called <command>svnversion</command> which was designed for just this purpose. <command>svnversion</command> crawls your working copy and generates as output the revision(s) it finds. You can use this program, plus some additional tooling, to embed that revision information into your files. For more information on <command>svnversion</command>, see <xref linkend=\"svn.ref.svnversion\"/>."
5411 msgstr "为此你需要外置处理,Subversion中有一个工具<command>svnversion</command>就是为此设计。<command>svnversion</command>遍历你的工作拷贝,然后输出它发现的修订版本,你可以使用这个程序,外加一些工具,将修订版本信息嵌入到你的文件。关于<command>svnversion</command>的更多信息,见<xref linkend=\"svn.ref.svnversion\"/>。"
5413 #. (para)
5414 #: ../source/book.xml:5254
5415 msgid "Subversion 1.2 introduced a new variant of the keyword syntax which brought additional, useful—though perhaps atypical—functionality. You can now tell Subversion to maintain a fixed length (in terms of the number of bytes consumed) for the substituted keyword. By using a double-colon (<literal>::</literal>) after the keyword name, followed by a number of space characters, you define that fixed width. When Subversion goes to substitute your keyword for the keyword and its value, it will essentially replace only those space characters, leaving the overall width of the keyword field unchanged. If the substituted value is shorter than the defined field width, there will be extra padding characters (spaces) at the end of the substituted field; if it is too long, it is truncated with a special hash (<literal>#</literal>) character just before the final dollar sign terminator."
5416 msgstr "Subversion 1.2引入了另一种关键字的语法,提供了额外和有用的,尽管是非典型的功能。你现在可以告诉Subversion为替代的关键字维护一个固定长度(从消耗字节的观点),通过在关键字名后使用双冒号(<literal>::</literal>),然后紧跟一组空格,你就定义了固定宽度。当Subversion使用替代值代替你的关键字,只会替换这些空白字符,保持关键字字段长度保持不变,如果替代值比定义的字段短,会有替代字段后保留空格;如果替代值太长,就会在最后的美元符号终止符前用井号(<literal>#</literal>)截断。"
5418 #. (para)
5419 #: ../source/book.xml:5270
5420 msgid "For example, say you have a document in which you have some section of tabular data reflecting the document's Subversion keywords. Using the original Subversion keyword substitution syntax, your file might look something like:"
5421 msgstr "例如,你有一篇文档,其中一段是一些反映Subversion关键字的表格数据,使用原始的Subversion关键字替换语法,你的文件或许像这样:"
5423 #. (screen)
5424 #: ../source/book.xml:5275
5425 #, no-wrap
5426 msgid ""
5427 "\n"
5428 "$Rev$:     Revision of last commit\n"
5429 "$Author$:  Author of last commit\n"
5430 "$Date$:    Date of last commit\n"
5431 msgstr ""
5432 "\n"
5433 "$Rev$:     Revision of last commit\n"
5434 "$Author$:  Author of last commit\n"
5435 "$Date$:    Date of last commit\n"
5437 #. (para)
5438 #: ../source/book.xml:5280
5439 msgid "Now, that looks nice and tabular at the start of things. But when you then commit that file (with keyword substitution enabled, of course), you see:"
5440 msgstr "现在,表格看起来佷漂亮,但是当你提交文件(当然,关键字替换功能已打开),你会看到:"
5442 #. (screen)
5443 #: ../source/book.xml:5283
5444 #, no-wrap
5445 msgid ""
5446 "\n"
5447 "$Rev: 12 $:     Revision of last commit\n"
5448 "$Author: harry $:  Author of last commit\n"
5449 "$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $:    Date of last commit\n"
5450 msgstr ""
5451 "\n"
5452 "$Rev: 12 $:     Revision of last commit\n"
5453 "$Author: harry $:  Author of last commit\n"
5454 "$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $:    Date of last commit\n"
5456 #. (para)
5457 #: ../source/book.xml:5288
5458 msgid "The result is not so beautiful. And you might be tempted to then adjust the file after the substitution so that it again looks tabular. But that only holds as long as the keyword values are the same width. If the last committed revision rolls into a new place value (say, from 99 to 100), or if another person with a longer username commits the file, stuff gets all crooked again. However, if you are using Subversion 1.2 or better, you can use the new fixed-length keyword syntax, define some field widths that seem sane, and now your file might look like this:"
5459 msgstr "结果并不漂亮,你可能会尝试重新调整文件使之更像一个列表。只有关键字的长度是相同的时候才能保证保持样式,如果进入另一个修订版本(如从99到100),或者是另一个有较长用户名的人提交了文件,表格又会变形。然而,如果你使用Subversion 1.2,你可以使用新的固定长度的关键字语法,定义合适的字段宽度,然后你的文件可能如此:"
5461 #. (screen)
5462 #: ../source/book.xml:5298
5463 #, no-wrap
5464 msgid ""
5465 "\n"
5466 "$Rev::               $:  Revision of last commit\n"
5467 "$Author::            $:  Author of last commit\n"
5468 "$Date::              $:  Date of last commit\n"
5469 msgstr ""
5470 "\n"
5471 "$Rev::               $:  Revision of last commit\n"
5472 "$Author::            $:  Author of last commit\n"
5473 "$Date::              $:  Date of last commit\n"
5475 #. (para)
5476 #: ../source/book.xml:5303
5477 msgid "You commit this change to your file. This time, Subversion notices the new fixed-length keyword syntax, and maintains the width of the fields as defined by the padding you placed between the double-colon and the trailing dollar sign. After substitution, the width of the fields is completely unchanged—the short values for <literal>Rev</literal> and <literal>Author</literal> are padded with spaces, and the long <literal>Date</literal> field is truncated by a hash character:"
5478 msgstr "你提交这个文件的修改,这一次Subversion注意到了新的固定长度的关键字语法,根据你在双冒号之间指定的空格长度调整格式,并且紧跟一个美元符号。经过替换,字段的长度没有发生变化—<literal>Rev</literal>和<literal>Author</literal>多了一些空格,而较长的<literal>Date</literal>字段被一个分号截断:"
5480 #. (screen)
5481 #: ../source/book.xml:5312
5482 #, no-wrap
5483 msgid ""
5484 "\n"
5485 "$Rev:: 13            $:  Revision of last commit\n"
5486 "$Author:: harry      $:  Author of last commit\n"
5487 "$Date:: 2006-03-15 0#$:  Date of last commit\n"
5488 msgstr ""
5489 "\n"
5490 "$Rev:: 13            $:  Revision of last commit\n"
5491 "$Author:: harry      $:  Author of last commit\n"
5492 "$Date:: 2006-03-15 0#$:  Date of last commit\n"
5494 #. (para)
5495 #: ../source/book.xml:5317
5496 msgid "The use of fixed-length keywords is especially handy when performing substitutions into complex file formats that themselves use fixed-length fields for data, or for which the stored size of a given data field is overbearingly difficult to modify from outside the format's native application (such as for Microsoft Office documents)."
5497 msgstr "固定长度关键字在执行复杂文件格式的替换中非常易用,也可以处理那些很难通过其他程序(例如Microsoft Office文档)进行修改的文件。"
5499 #. (para)
5500 #: ../source/book.xml:5324
5501 msgid "Be aware that because the width of a keyword field is measured in bytes, the potential for corruption of multi-byte values exists. For example, a username which contains some multi-byte UTF-8 characters might suffer truncation in the middle of the string of bytes which make up one of those characters. The result will be a mere truncation when viewed at the byte level, but will likely appear as a string with an incorrect or garbled final character when viewed as UTF-8 text. It is conceivable that certain applications, when asked to load the file, would notice the broken UTF-8 text and deem the entire file corrupt, refusing to operate on the file altogether. So, when limiting keywords to a fixed size, choose a size that allows for this type of byte-wise expansion."
5502 msgstr "需要意识到,因为关键字字段的长度是以字节为单位,可能会破坏多字节值,例如一个用户名包含多字节的UTF-8字符,可能会遭遇从某个字符中间截断的情况,从字节角度看仅仅是一种截断,但是从UTF-8字符串角度看可能是错误和曲解的,当载入文件时,破坏的UTF-8文本可能导致整个文件的破坏,整个文件无法操作。所以,当限制关键字为固定大小时,需要选择一个可以扩展的大小。"
5504 #. (title)
5505 #: ../source/book.xml:5346
5506 msgid "Locking"
5507 msgstr "锁定"
5509 #. (para)
5510 #: ../source/book.xml:5348
5511 msgid "Subversion's copy-modify-merge version control model lives and dies on its data merging algorithms, specifically on how well those algorithms perform when trying to resolve conflicts caused by multiple users modifying the same file concurrently. Subversion itself provides only one such algorithm, a three-way differencing algorithm which is smart enough to handle data at a granularity of a single line of text. Subversion also allows you to supplement its content merge processing with external differencing utilities (as described in <xref linkend=\"svn.advanced.externaldifftools.diff3\"/>), some of which may do an even better job, perhaps providing granularity of a word or a single character of text. But common among those algorithms is that they generally work only on text files. The landscape starts to look pretty grim when you start talking about content merges of non-textual file formats. And when you can't find a tool that can handle that type of merging, you begin to run into problems with the copy-modify-merge model."
5512 msgstr "Subversion的拷贝-修改-合并版本控制模型的关键是其合并算法,也就是如何处理多个用户修改同时修改一个文件产生冲突时的算法。Subversion本身只提供了一个这样的算法,其三方区别算法可以足够聪明的的行粒度的数据处理,Subversion也支持使用外置比较工具(<xref linkend=\"svn.advanced.externaldifftools.diff3\"/>中有描述),有一些可以做得非常好,或许可以提供以单词或字母粒度的算法。但是,这些工具的共同点是基于文本的,当你讨论非文本文件格式时,这看起来有一点残酷。如果你无法找到一个工具支持这种类型的合并,你的拷贝-修改-合并模型就会遇到麻烦。"
5514 #. (para)
5515 #: ../source/book.xml:5365
5516 msgid "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 automobile mechanic. Central to the design of a particular poster is an image of a car in need of some body work, stored in a file using the PNG image format. The poster's layout is almost finished, and both Harry and Sally are pleased with the 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."
5517 msgstr "让我们看一个使用这个模型的真实例子,Harry和Sally是同一个项目的图形设计师,汽车技工的间接营销。海报的设计一个小车,需要一些主要部分的工作,使用PNG文件格式。海报的布局几乎完成,Harry和Sally都看上了一个从损坏小车得到的特别照片—一个1967的淡蓝色的Ford Mustang,挡泥板有一些溅迹。"
5519 #. (para)
5520 #: ../source/book.xml:5375
5521 msgid "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 her photo editing software, and sets about tweaking the image so that the car is now cherry red. Meanwhile, Harry, feeling particularly inspired that day, decides that the image would have greater impact if the car also appears to have suffered greater impact. He, too, updates to <literal>HEAD</literal>, and then draws some cracks on the vehicle's windshield. He manages to finish his work before Sally finishes hers, and after admiring the fruits of his undeniable talent, commits the modified image. Shortly thereafter, Sally is finished with the car's new finish, and tries to commit her changes. But, as expected, Subversion fails the commit, informing Sally that now her version of the image is out of date."
5522 msgstr "现在,作为图像设计的惯例,计划的改变导致车的颜色很重要,所以Sally将工作拷贝更新到<literal>HEAD</literal>,启动图形编辑软件,修改图像将车的颜色修改为樱桃红,同时Harry那一天特别有灵感,所以决定如果这个车受到更大的撞击可能会有更好的效果。他也更新到<literal>HEAD</literal>,然后在车挡风玻璃上制作了一些裂痕,他设法在Sally完成前结束修改,因为受到自己不可阻挡天赋的鼓舞,提交了图像。没过多久,Sally结束了她的工作,尝试提交。但是如我们所料,Subversion提交失败,告诉Sally她的图像已经过期了。"
5524 #. (para)
5525 #: ../source/book.xml:5390
5526 msgid "Here's where the difficulty sets in. Were Harry and Sally making changes to a text file, Sally would simply update her working copy, receiving Harry's changes in the process. In the worst possible case, they would have modified the same region of the file, and Sally would have to work out by hand the proper resolution to the conflict. But these aren't text files—they are binary images. And while it's a simple matter to describe what one would expect the results of this content merge to be, there is precious little chance that any software exists which is smart enough to examine the common baseline image that each of these graphic artists worked against, the changes that Harry made, and the changes that Sally made, and spit out an image of a busted-up red Mustang with a cracked windshield!"
5527 msgstr "这里就是麻烦的地方,如果Harry和Sally修改的是文本文件,她只需要简单得更新工作拷贝,接收Harry的修改。在最坏的情况下,他们会修改文件的同一部分,Sally需要人工解决冲突。但是现在不是文本文件—而是二进制图像,没法估计合并的结果会是什么样子的,已存的软件不可能从基线图像分离出Harry和Sally的工作,并组合出一个挡风玻璃坏掉0的红色Mustang。"
5529 #. (para)
5530 #: ../source/book.xml:5411
5531 #, fuzzy
5532 msgid "Communication wouldn't have been such bad medicine for Harry and Sally's Hollywood namesakes, either, for that matter."
5533 msgstr "交流不是这样坏的。。。。"
5535 #. (para)
5536 #: ../source/book.xml:5404
5537 msgid "Clearly, 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 of a car whose windshield was already cracked. As is discussed 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 exists. <placeholder-1/> But as one's version control system is, in fact, one form of communication, it follows that having that software facilitate the serialization of non-parallelizable editing efforts is no bad thing. This where Subversion's implementation of the lock-modify-unlock model steps into the spotlight. This is where we talk about Subversion's <firstterm>locking</firstterm> feature, which is similar to the <quote>reserved checkouts</quote> mechanisms of other version control systems."
5538 msgstr "很显然,如果能够将Harry和Sally的工作串行话事情会变得平滑,也就是说Harry可以等到Sally的红车然后再画上破坏的挡风玻璃,或者Sally在破坏之后改变颜色。就像在<xref linkend=\"svn.basic.vsn-models.copy-merge\"/>讨论的,如果Harry和Sally之间有完美的交流,就不会有这种问题发生。<placeholder-1/>但是作为一种版本控制系统,实际上是一种交流的形式,使得软件遵循非并行编辑的串行化也不是一件坏事,这里Subversion实现了锁定-修改-解锁模型,这里我们要讨论Subversion的<firstterm>锁定</firstterm>特性,与其他版本控制系统的<quote>保留检出</quote>机制类似。"
5540 #. (para)
5541 #: ../source/book.xml:5423
5542 msgid "Subversion's locking feature serves two main purposes:"
5543 msgstr "Subversion 的锁定特性为两个主要目的服务:"
5545 #. (para)
5546 #: ../source/book.xml:5427
5547 msgid "<emphasis>Serializing access to a versioned object</emphasis>. By allowing a user to programmatically claim the exclusive right to change to a file in the repository, that user can be reasonably confident that energy invested on unmergeable changes won't be wasted—his commit of those changes will succeed."
5548 msgstr "<emphasis>顺序访问资源</emphasis>。允许用户得到一个排他的修改文件权,这个用户可以确定不可合并的修改不会被浪费—他对这个修改的提交会成功。"
5550 #. (para)
5551 #: ../source/book.xml:5435
5552 msgid "<emphasis>Aiding communication</emphasis>. By alerting other users that serialization is in effect for a particular versioned object, those other users can reasonably expect that the object is about to be changed by someone else, and they, too, can avoid wasting their time and energy on unmergeable changes that won't be committable due to eventual out-of-dateness."
5553 msgstr "<emphasis>辅助交流</emphasis>。通过要求用户对某个版本化对象串行工作,用户可以知道对象正在被别人修改,这样可以防止浪费精力和时间去修改一个不可合并和提交的对象。"
5555 #. (para)
5556 #: ../source/book.xml:5447
5557 msgid "Subversion does not currently allow locks on directories."
5558 msgstr "Subversion目前不允许锁定目录。"
5560 #. (para)
5561 #: ../source/book.xml:5444
5562 msgid "When referring to Subversion's locking feature, one is actually talking about a fairly diverse collection of behaviors which include the ability to lock a versioned file <placeholder-1/> (claiming the exclusive right to modify the file), to unlock that file (yielding that exclusive right to modify), to see reports about which files are locked and by whom, to annotate files for which locking before editing is strongly advised, and so on. In this section, we'll cover all of these facets of the larger locking feature."
5563 msgstr "当我们引用Subversion锁定特性时,这是在讨论一个处理版本化文件的行为特性<placeholder-1/>(声明对一个文件排他性修改特权),包括对文件的锁定和解锁(释放排他性修改权限),察看包括文件被谁锁定的报告,以及提醒企图修改锁定文件的用户。在本小节,我们会覆盖锁定特性的大部分内容。"
5565 #. (title)
5566 #: ../source/book.xml:5456
5567 msgid "The three meanings of <quote>lock</quote>"
5568 msgstr "<quote>锁定</quote>的三种含义"
5570 #. (para)
5571 #: ../source/book.xml:5458
5572 msgid "In this section, and almost everywhere in this book, the words <quote>lock</quote> and <quote>locking</quote> describe a mechanism for mutual exclusion between users to avoid clashing commits. Unfortunately, there are two other sorts of <quote>lock</quote> with which Subversion, and therefore this book, sometimes needs to be concerned."
5573 msgstr "在本小节,和几乎本书的每一个地方<quote>lock</quote>和<quote>locking</quote>描述了一种避免用户之间冲突提交的排他机制,但是佷不幸,Subversion中还有另外两种锁,因此需要在本书格外关心。"
5575 #. (para)
5576 #: ../source/book.xml:5464
5577 msgid "The first is <firstterm>working copy locks</firstterm>, used internally by Subversion to prevent clashes between multiple Subversion clients operating on the same working copy. This is the sort of lock indicated by an <computeroutput>L</computeroutput> in the third column of <command>svn status</command> output, and removed by the <command>svn cleanup</command> command, as described in <xref linkend=\"svn.tour.cleanup\"/>."
5578 msgstr "第一种是<firstterm>工作拷贝锁</firstterm>,Subversion内部用来防止不同客户端同时操作同一份工作拷贝的锁,这种锁使用<command>svn status</command>输出中第三列出现的<computeroutput>L</computeroutput>表示,可以使用<command>svn cleanup</command>删除,<xref linkend=\"svn.tour.other.cleanup\"/>有介绍。"
5580 #. (para)
5581 #: ../source/book.xml:5471
5582 msgid "Secondly, there are <firstterm>database locks</firstterm>, used internally by the Berkeley DB backend to prevent clashes between multiple programs trying to access the database. This is the sort of lock whose unwanted persistence after an error can cause a repository to be <quote>wedged</quote>, as described in <xref linkend=\"svn.reposadmin.maint.recovery\"/>."
5583 msgstr "第二种,<firstterm>数据库锁</firstterm>,在Berkeley DB后端内部使用,防止多个程序访问数据库发生冲突,一个导致版本库<quote>楔住</quote>的错误发生后产生,<xref linkend=\"svn.reposadmin.maint.recovery\"/>有描述。"
5585 #. (para)
5586 #: ../source/book.xml:5477
5587 msgid "You can generally forget about these other kinds of locks until something goes wrong that requires you to care about them. In this book, <quote>lock</quote> means the first sort unless the contrary is either clear from context or explicitly stated."
5588 msgstr "在发生问题之前你完全可以忘记上面两种锁,在本书,<quote>锁定</quote>意味着第一种锁,除非是在从上下文中十分明确或明确指出的。"
5590 #. (title)
5591 #: ../source/book.xml:5486
5592 msgid "Creating locks"
5593 msgstr "创建锁定"
5595 #. (para)
5596 #: ../source/book.xml:5488
5597 msgid "In the Subversion repository, a <firstterm>lock</firstterm> is a piece of metadata which grants exclusive access to one user to change a file. This user is said to be the <firstterm>lock owner</firstterm>. Each lock also has a unique identifier, typically a long string of characters, known as the <firstterm>lock token</firstterm>. The repository manages locks, ultimately handling their creation, enforcement, and removal. If any commit transaction attempts to modify or delete a locked file (or delete one of the parent directories of the file), the repository will demand two pieces of information—that the client performing the commit be authenticated as the lock owner, and that the lock token has been provided as part of the commit process as a sort of proof that client knows which lock it is using."
5598 msgstr "在Subversion的版本库,一个<firstterm>锁</firstterm>是一份元数据,可以排它赋予某个用户修改权,这个用户被称作<firstterm>锁的拥有者</firstterm>。每个锁都有一个唯一标识,通常是一长串字符,叫做<firstterm>锁令牌</firstterm>。版本库管理锁,控制着锁的创建,权限控制和删除。如果提交包含了修改或者删除锁"
5600 #. (para)
5601 #: ../source/book.xml:5503
5602 msgid "To demonstrate lock creation, let's refer back to our example of multiple graphic designers working with on the same binary image files. Harry has decided to change a JPEG image. To prevent other people from committing changes to the file while he is modifying it (as well as alerting them that he is about to change it), he locks the file in the repository using the <command>svn lock</command> command."
5603 msgstr "为了描述锁的产生,我们回到前面那个关于多个图形设计师共同工作的例子,Harry决定修改一个JPEG图像,为了防止其他用户此时提交这个文件的修改(也是警告别人他正在修改它),他使用<command>svn lock</command>命令锁定了版本库中的这个文件:"
5605 #. (screen)
5606 #: ../source/book.xml:5510
5607 #, no-wrap
5608 msgid ""
5609 "\n"
5610 "$ svn lock banana.jpg -m \"Editing file for tomorrow's release.\"\n"
5611 "'banana.jpg' locked by user 'harry'.\n"
5612 "$\n"
5613 msgstr ""
5614 "\n"
5615 "$ svn lock banana.jpg -m \"Editing file for tomorrow's release.\"\n"
5616 "'banana.jpg' locked by user 'harry'.\n"
5617 "$\n"
5619 #. (para)
5620 #: ../source/book.xml:5515
5621 msgid "There are a number of new things demonstrated in the previous example. First, notice that Harry passed the <option>--message (-m)</option> option to <command>svn lock</command>. Similar to <command>svn commit</command>, the <command>svn lock</command> command can take comments (either via <option>--message (-m)</option> or <option>--file (-F)</option>) to describe the reason for locking the file. Unlike <command>svn commit</command>, however, <command>svn lock</command> will not demand a message by launching your preferred text editor. Lock comments are optional, but still recommended to aid communication."
5622 msgstr "前一个例子描述了许多新事物,第一,注意Harry在<command>svn lock</command>中使用了<option>--message (-m)</option>选项,类似于<command>svn commit</command>,<command>svn lock</command>命令可以有描述锁定原因的注释(通过<option>--message (-m)</option>或<option>--file (-F)</option>)。然而不像<command>svn commit</command>,<command>svn lock</command>不会自动强制启动你喜欢的编辑器,锁定注释是可选的,但是为了方便交流我们还是推荐使用。"
5624 #. (para)
5625 #: ../source/book.xml:5526
5626 msgid "Secondly, the lock attempt succeeded. This means that the file wasn't already locked, and that Harry had the latest version of the file. If Harry's working copy of the file had been out-of-date, the repository would have rejected the request, forcing Harry to <command>svn update</command> and reattempt the locking command. The locking command would also have failed if the file already been locked by someone else."
5627 msgstr "第二,锁定成功了,这意味着文件没有被别人锁定,Harry的文件是最新的版本。如果Harry的工作拷贝文件不是最新的,版本库会拒绝请求,强制Harry执行<command>svn update</command>并重新运行锁定命令,同样,如果此文件已经被别的用户锁定了,锁定命令也会失败。"
5629 #. (para)
5630 #: ../source/book.xml:5534
5631 msgid "As you can see, the <command>svn lock</command> command prints confirmation of the successful lock. At this point, the fact that the file is locked becomes apparent in the output of the <command>svn status</command> and <command>svn info</command> reporting subcommands."
5632 msgstr "就像你看到的,<command>svn lock</command>打印了锁定成功的确认信息。此时,通过<command>svn status</command>和<command>svn info</command>的输出我们可以看到文件已经锁定。"
5634 #. (screen)
5635 #: ../source/book.xml:5539
5636 #, no-wrap
5637 msgid ""
5638 "\n"
5639 "$ svn status\n"
5640 "     K banana.jpg\n"
5641 "\n"
5642 "$ svn info banana.jpg\n"
5643 "Path: banana.jpg\n"
5644 "Name: banana.jpg\n"
5645 "URL: http://svn.example.com/repos/project/banana.jpg\n"
5646 "Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n"
5647 "Revision: 2198\n"
5648 "Node Kind: file\n"
5649 "Schedule: normal\n"
5650 "Last Changed Author: frank\n"
5651 "Last Changed Rev: 1950\n"
5652 "Last Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006)\n"
5653 "Text Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n"
5654 "Properties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n"
5655 "Checksum: 3b110d3b10638f5d1f4fe0f436a5a2a5\n"
5656 "Lock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e\n"
5657 "Lock Owner: harry\n"
5658 "Lock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006)\n"
5659 "Lock Comment (1 line):\n"
5660 "Editing file for tomorrow's release.\n"
5661 "\n"
5662 "$\n"
5663 msgstr ""
5664 "\n"
5665 "$ svn status\n"
5666 "     K banana.jpg\n"
5667 "\n"
5668 "$ svn info banana.jpg\n"
5669 "Path: banana.jpg\n"
5670 "Name: banana.jpg\n"
5671 "URL: http://svn.example.com/repos/project/banana.jpg\n"
5672 "Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n"
5673 "Revision: 2198\n"
5674 "Node Kind: file\n"
5675 "Schedule: normal\n"
5676 "Last Changed Author: frank\n"
5677 "Last Changed Rev: 1950\n"
5678 "Last Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006)\n"
5679 "Text Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n"
5680 "Properties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n"
5681 "Checksum: 3b110d3b10638f5d1f4fe0f436a5a2a5\n"
5682 "Lock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e\n"
5683 "Lock Owner: harry\n"
5684 "Lock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006)\n"
5685 "Lock Comment (1 line):\n"
5686 "Editing file for tomorrow's release.\n"
5687 "\n"
5688 "$\n"
5690 #. (para)
5691 #: ../source/book.xml:5565
5692 msgid "That the <command>svn info</command> command, which does not contact the repository when run against working copy paths, can display the lock token reveals an important fact about lock tokens—that they are cached in the working copy. The presence of the lock token is critical. It gives the working copy authorization to make use of the lock later on. Also, the <command>svn status</command> command shows a <literal>K</literal> next to the file (short for locKed), indicating that the lock token is present."
5693 msgstr "<command>svn info</command>命令不会联系版本库,当对工作拷贝路径应用<command>svn info</command>命令时,可以揭示令牌的一个重要事实—它们缓存在工作拷贝。有锁定令牌是非常重要的,这给了工作拷贝权利利用这个锁的能力。<command>svn status</command>会在文件后面显示一个<literal>K</literal>(locKed的缩写),表明了拥有锁定令牌。"
5695 #. (title)
5696 #: ../source/book.xml:5576
5697 msgid "Regarding lock tokens"
5698 msgstr "关于锁定令牌"
5700 #. (para)
5701 #: ../source/book.xml:5578
5702 msgid "A lock token isn't an authentication token, so much as an <emphasis>authorization</emphasis> token. The token isn't a protected secret. In fact, a lock's unique token is discoverable by anyone who runs <command>svn info URL</command>. A lock token is special only when it lives inside a working copy. It's proof that the lock was created in that particular working copy, and not somewhere else by some other client. Merely authenticating as the lock owner isn't enough to prevent accidents."
5703 msgstr "一个锁不是一个认证令牌,而是一个<emphasis>授权</emphasis>令牌,这个令牌不是一个受保护的秘密,事实上,任何人都可以通过<command>svn info URL</command>发现这个唯一令牌。一个锁定令牌只有在工作拷贝中才有特别的意义,它是锁定建立在这个工作拷贝的证据,而不是其它用户在其他地方,仅仅检验锁定拥有者还不能防止出现意外。"
5705 #. (para)
5706 #: ../source/book.xml:5587
5707 msgid "For example, suppose you lock a file using a computer at your office, but leave work for the day before you finish your changes to that file. It should not be possible to accidentally commit changes to that same file from your home computer later that evening simply because you've authenticated as the lock's owner. In other words, the lock token prevents one piece of Subversion-related software from undermining the work of another. (In our example, if you really need to change the file from an alternate working copy, you would need to <firstterm>break</firstterm> the lock and re-lock the file.)"
5708 msgstr "例如,你在办公室电脑上锁定了一个文件,或许修改正在进行中。很有可能在你的家用计算机上的一个工作拷贝(或别的Subversion客户端)里你又不小心修改了同一个文件,仅仅因为检验了你就是锁定的拥有者。换句话说,锁定令牌防止你通过一个Subversion相关软件的工作破坏另一个的工作。(在我们的例子里,如果你真的需要在另一个工作拷贝修改这个文件,你必须<firstterm>打破</firstterm>锁定再重新锁定文件。)"
5710 #. (para)
5711 #: ../source/book.xml:5599
5712 msgid "Now that Harry has locked <filename>banana.jpg</filename>, Sally is unable to change or delete that file:"
5713 msgstr "现在Harry已经锁定了<filename>banana.jpg</filename>,Sally不能修改或删除这个文件:"
5715 #. (screen)
5716 #: ../source/book.xml:5601
5717 #, no-wrap
5718 msgid ""
5719 "\n"
5720 "$ svn delete banana.jpg\n"
5721 "D         banana.jpg\n"
5722 "$ svn commit -m \"Delete useless file.\"\n"
5723 "Deleting       banana.jpg\n"
5724 "svn: Commit failed (details follow):\n"
5725 "svn: DELETE of\n"
5726 "'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg':\n"
5727 "423 Locked (http://svn.example.com)\n"
5728 "$\n"
5729 msgstr ""
5730 "\n"
5731 "$ svn delete banana.jpg\n"
5732 "D         banana.jpg\n"
5733 "$ svn commit -m \"Delete useless file.\"\n"
5734 "Deleting       banana.jpg\n"
5735 "svn: Commit failed (details follow):\n"
5736 "svn: DELETE of\n"
5737 "'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg':\n"
5738 "423 Locked (http://svn.example.com)\n"
5739 "$\n"
5741 #. (para)
5742 #: ../source/book.xml:5612
5743 msgid "But Harry, after touching up the banana's shade of yellow, is able to commit his changes to the file. That's because he authenticates as the lock owner, and also because his working copy holds the correct lock token:"
5744 msgstr "但是,当完成了香蕉的黄色渐变,就可以提交文件的修改,因为认证为锁定的拥有者,也因为他的工作拷贝有正确的锁定令牌:"
5746 #. (screen)
5747 #: ../source/book.xml:5616
5748 #, no-wrap
5749 msgid ""
5750 "\n"
5751 "$ svn status\n"
5752 "M    K banana.jpg\n"
5753 "$ svn commit -m \"Make banana more yellow\"\n"
5754 "Sending        banana.jpg\n"
5755 "Transmitting file data .\n"
5756 "Committed revision 2201.\n"
5757 "$ svn status\n"
5758 "$\n"
5759 msgstr ""
5760 "\n"
5761 "$ svn status\n"
5762 "M    K banana.jpg\n"
5763 "$ svn commit -m \"Make banana more yellow\"\n"
5764 "Sending        banana.jpg\n"
5765 "Transmitting file data .\n"
5766 "Committed revision 2201.\n"
5767 "$ svn status\n"
5768 "$\n"
5770 #. (para)
5771 #: ../source/book.xml:5626
5772 msgid "Notice that after the commit is finished, <command>svn status</command> shows that the lock token is no longer present in working copy. This is the standard behavior of <command>svn commit</command>—it searches the working copy (or list of targets, if you provide such a list) for local modifications, and sends all the lock tokens it encounters during this walk to the server as part of the commit transaction. After the commit completes successfully, all of the repository locks that were mentioned are released—<emphasis>even on files that weren't committed</emphasis>. This is meant to discourage users from being sloppy about locking, or from holding locks for too long. If Harry haphazardly locks thirty files in a directory named <filename>images</filename> because he's unsure of which files he needs to change, yet only only changes four of those files, when he runs <command>svn commit images</command>, the process will still release all thirty locks."
5773 msgstr "需要注意到提交之后,<command>svn status</command>显示工作拷贝已经没有锁定令牌了,这是<command>svn commit</command>的标准行为方式—它会遍历工作拷贝(或者从目标列表,如果有列表的话),并且作为提交的一部分发送所有遇到的锁定令牌到服务器。当提交完全成功,前面用到的所有版本库锁定都会被释放—<emphasis>即使是没有提交的文件。</emphasis>这样的原因是不鼓励用户滥用锁定,或者是长时间的保持锁定。例如,假定Harry不小心锁定了<filename>images</filename>目录的30个文件,因为他不确定要修改什么文件,他最后只修改了四个文件,当他运行<command>svn commit images</command>,会释放所有的30个锁定。"
5775 #. (para)
5776 #: ../source/book.xml:5643
5777 msgid "This behavior of automatically releasing locks can be overridden with the <option>--no-unlock</option> option to <command>svn commit</command>. This is best used for those times when you want to commit changes, but still plan to make more changes and thus need to retain existing locks. You can also make this your default behavior by setting the <literal>no-unlock</literal> runtime configuration option (see <xref linkend=\"svn.advanced.confarea\"/>)."
5778 msgstr "自动释放锁定的特性可以通过<command>svn commit</command>的<option>--no-unlock</option>选项关闭,当你要提交文件,同时期望继续修改而必须保留锁定时非常有用。这个特性也可以半永久性的设定,方法是设置运行中<filename>config</filename>文件(见<xref linkend=\"svn.advanced.confarea\"/>)的<literal>no-unlock = yes</literal>。"
5780 #. (para)
5781 #: ../source/book.xml:5651
5782 msgid "Of course, locking a file doesn't oblige one to commit a change to it. The lock can be released at any time with a simple <command>svn unlock</command> command:"
5783 msgstr "当然,锁定一个文件不会强制一个人要提交修改,任何时候都可以通过运行<command>svn unlock</command>命令释放锁定:"
5785 #. (screen)
5786 #: ../source/book.xml:5654
5787 #, no-wrap
5788 msgid ""
5789 "\n"
5790 "$ svn unlock banana.c\n"
5791 "'banana.c' unlocked.\n"
5792 msgstr ""
5793 "\n"
5794 "$ svn unlock banana.c\n"
5795 "'banana.c' unlocked.\n"
5797 #. (title)
5798 #: ../source/book.xml:5662
5799 msgid "Discovering locks"
5800 msgstr "发现锁定"
5802 #. (para)
5803 #: ../source/book.xml:5664
5804 msgid "When a commit fails due to someone else's locks, it's fairly easy to learn about them. The easiest of these is <command>svn status --show-updates</command>:"
5805 msgstr "最明显的方式就是因为锁定而不能提交一个文件,最简单的方式是<command>svn status --show-updates</command>:"
5807 #. (screen)
5808 #: ../source/book.xml:5667
5809 #, no-wrap
5810 msgid ""
5811 "\n"
5812 "$ svn status -u\n"
5813 "M              23   bar.c\n"
5814 "M    O         32   raisin.jpg\n"
5815 "       *       72   foo.h\n"
5816 "Status against revision:     105\n"
5817 "$\n"
5818 msgstr ""
5819 "\n"
5820 "$ svn status -u\n"
5821 "M              23   bar.c\n"
5822 "M    O         32   raisin.jpg\n"
5823 "       *       72   foo.h\n"
5824 "Status against revision:     105\n"
5825 "$\n"
5827 #. (para)
5828 #: ../source/book.xml:5675
5829 msgid "In this example, Sally can see not only that her copy of <filename>foo.h</filename> is out-of-date, but that one of the two modified files she plans to commit is locked in the repository. The <literal>O</literal> symbol stands for <quote>Other</quote>, meaning that a lock exists on the file, and was created by somebody else. If she were to attempt a commit, the lock on <filename>raisin.jpg</filename> would prevent it. Sally is left wondering who made the lock, when, and why. Once again, <command>svn info</command> has the answers:"
5830 msgstr "在这个例子里,Sally可以见到不仅她的<filename>foo.h</filename>是过期的,而且发现两个计划要提交的文件被锁定了。<literal>O</literal>符号表示其他人所订了文件。如果她尝试提交,<filename>raisin.jpg</filename>的锁定会阻止她,Sally会纳闷谁锁定了文件,什么时候,为什么。再一次,<command>svn info</command>拥有答案:"
5832 #. (screen)
5833 #: ../source/book.xml:5685
5834 #, no-wrap
5835 msgid ""
5836 "\n"
5837 "$ svn info http://svn.example.com/repos/project/raisin.jpg\n"
5838 "Path: raisin.jpg\n"
5839 "Name: raisin.jpg\n"
5840 "URL: http://svn.example.com/repos/project/raisin.jpg\n"
5841 "Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n"
5842 "Revision: 105\n"
5843 "Node Kind: file\n"
5844 "Last Changed Author: sally\n"
5845 "Last Changed Rev: 32\n"
5846 "Last Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006)\n"
5847 "Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
5848 "Lock Owner: harry\n"
5849 "Lock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n"
5850 "Lock Comment (1 line):\n"
5851 "Need to make a quick tweak to this image.\n"
5852 "$\n"
5853 msgstr ""
5854 "\n"
5855 "$ svn info http://svn.example.com/repos/project/raisin.jpg\n"
5856 "Path: raisin.jpg\n"
5857 "Name: raisin.jpg\n"
5858 "URL: http://svn.example.com/repos/project/raisin.jpg\n"
5859 "Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n"
5860 "Revision: 105\n"
5861 "Node Kind: file\n"
5862 "Last Changed Author: sally\n"
5863 "Last Changed Rev: 32\n"
5864 "Last Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006)\n"
5865 "Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
5866 "Lock Owner: harry\n"
5867 "Lock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n"
5868 "Lock Comment (1 line):\n"
5869 "Need to make a quick tweak to this image.\n"
5870 "$\n"
5872 #. (para)
5873 #: ../source/book.xml:5703
5874 msgid "Just as <command>svn info</command> can be used to examine objects in the working copy, it can also be used to examine objects in the repository. If the main argument to <command>svn info</command> is a working copy path, then all of the working copy's cached information is displayed; any mention of a lock means that the working copy is holding a lock token (if a file is locked by another user or in another working copy, <command>svn info</command> on a working copy path will show no lock information at all). If the main argument to <command>svn info</command> is a URL, then the information reflects the latest version of an object in the repository, and any mention of a lock describes the current lock on the object."
5875 msgstr "就像<command>svn info</command>可以检验工作拷贝的对象,它也可以检验版本库的对象,如果<command>svn info</command>的主要参数是工作拷贝路径,所有工作拷贝的缓存信息都会显示,发现了锁定就意味着工作拷贝拥有锁定令牌(如果一个文件被另一个用户在另一个工作拷贝锁定,工作拷贝路径上运行<command>svn info</command>不会显示锁定信息)。如果<command>svn info</command>的主参数是URL,就会反映版本库中最新版本的对象信息,任何对锁定的提及描述了当前对象的锁定。"
5877 #. (para)
5878 #: ../source/book.xml:5716
5879 msgid "So in this particular example, Sally can see that Harry locked the file on February 16th to <quote>make a quick tweak</quote>. It being June, she suspects that he probably forgot all about the lock. She might phone Harry to complain and ask him to release the lock. If he's unavailable, she might try to forcibly break the lock herself or ask an administrator to do so."
5880 msgstr "所以在这个特定的例子里,Sally可以看到Harry在二月十六日为了<quote>做修改</quote>而锁定了这个文件,现在已经六月了,她怀疑他可能是忘记了这个锁定,她会打电话给Harry去询问他应该释放这个锁定,如果他不再,她就要自己强制解除这个锁定或者是找管理员去做。"
5882 #. (title)
5883 #: ../source/book.xml:5727
5884 msgid "Breaking and stealing locks"
5885 msgstr "解除和偷窃锁定"
5887 #. (para)
5888 #: ../source/book.xml:5729
5889 msgid "A repository lock isn't sacred—in Subversion's default configuration state, locks can be released not only by the person who created them, but by anyone at all. When somebody other than the original lock creator destroys a lock, we refer to this as <firstterm>breaking</firstterm> the lock."
5890 msgstr "版本库锁定并不是神圣不可侵犯的,在Subversion的缺省配置状态,不只是创建者可以释放锁定,任何人都可以。当有其他人期望消灭锁定时,我们称之为<firstterm>打破</firstterm>锁定。"
5892 #. (para)
5893 #: ../source/book.xml:5735
5894 msgid "From the administrator's chair, it's simple to break locks. The <command>svnlook</command> and <command>svnadmin</command> programs have the ability to display and remove locks directly from the repository. (For more information about these tools, see <xref linkend=\"svn.reposadmin.maint.tk\"/>.)"
5895 msgstr "从管理员的位子上很容易打破锁定,<command>svnlook</command>和<command>svnadmin</command>程序都有能力从版本库直接显示和删除锁定。(关于这些工具的信息可以看<xref linkend=\"svn.reposadmin.maint.tk\"/>。)"
5897 #. (screen)
5898 #: ../source/book.xml:5741
5899 #, fuzzy, no-wrap
5900 msgid ""
5901 "\n"
5902 "$ svnadmin lslocks /var/svn/repos\n"
5903 "Path: /project2/images/banana.jpg\n"
5904 "UUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923\n"
5905 "Owner: frank\n"
5906 "Created: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006)\n"
5907 "Expires: \n"
5908 "Comment (1 line):\n"
5909 "Still improving the yellow color.\n"
5910 "\n"
5911 "Path: /project/raisin.jpg\n"
5912 "UUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
5913 "Owner: harry\n"
5914 "Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n"
5915 "Expires: \n"
5916 "Comment (1 line):\n"
5917 "Need to make a quick tweak to this image.\n"
5918 "\n"
5919 "$ svnadmin rmlocks /var/svn/repos /project/raisin.jpg\n"
5920 "Removed lock on '/project/raisin.jpg'.\n"
5921 "$\n"
5922 msgstr ""
5923 "\n"
5924 "$ svnadmin lslocks /usr/local/svn/repos\n"
5925 "Path: /project2/images/banana.jpg\n"
5926 "UUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923\n"
5927 "Owner: frank\n"
5928 "Created: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006)\n"
5929 "Expires: \n"
5930 "Comment (1 line):\n"
5931 "Still improving the yellow color.\n"
5932 "\n"
5933 "Path: /project/raisin.jpg\n"
5934 "UUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
5935 "Owner: harry\n"
5936 "Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n"
5937 "Expires: \n"
5938 "Comment (1 line):\n"
5939 "Need to make a quick tweak to this image.\n"
5940 "\n"
5941 "$ svnadmin rmlocks /usr/local/svn/repos /project/raisin.jpg\n"
5942 "Removed lock on '/project/raisin.jpg'.\n"
5943 "$\n"
5945 #. (para)
5946 #: ../source/book.xml:5763
5947 msgid "The more interesting option is allowing users to break each other's locks over the network. To do this, Sally simply needs to pass the <option>--force</option> to the unlock command:"
5948 msgstr "更有趣的选项是允许用户互相打破锁定,为此,Sally只需要使用unlock命令的<option>--force</option>选项:"
5950 #. (screen)
5951 #: ../source/book.xml:5767
5952 #, no-wrap
5953 msgid ""
5954 "\n"
5955 "$ svn status -u\n"
5956 "M              23   bar.c\n"
5957 "M    O         32   raisin.jpg\n"
5958 "       *       72   foo.h\n"
5959 "Status against revision:     105\n"
5960 "$ svn unlock raisin.jpg\n"
5961 "svn: 'raisin.jpg' is not locked in this working copy\n"
5962 "$ svn info raisin.jpg | grep URL\n"
5963 "URL: http://svn.example.com/repos/project/raisin.jpg\n"
5964 "$ svn unlock http://svn.example.com/repos/project/raisin.jpg\n"
5965 "svn: Unlock request failed: 403 Forbidden (http://svn.example.com)\n"
5966 "$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg\n"
5967 "'raisin.jpg' unlocked.\n"
5968 "$\n"
5969 msgstr ""
5970 "\n"
5971 "$ svn status -u\n"
5972 "M              23   bar.c\n"
5973 "M    O         32   raisin.jpg\n"
5974 "       *       72   foo.h\n"
5975 "Status against revision:     105\n"
5976 "$ svn unlock raisin.jpg\n"
5977 "svn: 'raisin.jpg' is not locked in this working copy\n"
5978 "$ svn info raisin.jpg | grep URL\n"
5979 "URL: http://svn.example.com/repos/project/raisin.jpg\n"
5980 "$ svn unlock http://svn.example.com/repos/project/raisin.jpg\n"
5981 "svn: Unlock request failed: 403 Forbidden (http://svn.example.com)\n"
5982 "$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg\n"
5983 "'raisin.jpg' unlocked.\n"
5984 "$\n"
5986 #. (para)
5987 #: ../source/book.xml:5783
5988 msgid "Now, Sally's initial attempt to unlock failed because she ran <command>svn unlock</command> directly on her working copy of the file, and no lock token was present. To remove the lock directly from the repository, she needs to pass a URL to <command>svn unlock</command>. Her first attempt to unlock the URL fails, because she can't authenticate as the lock owner (nor does she have the lock token). But when she passes <option>--force</option>, the authentication and authorization requirements are ignored, and the remote lock is broken."
5989 msgstr "Sally初始的unlock命令失败了,因为她直接在自己的工作拷贝上运行了<command>svn unlock</command>,而这里没有锁定令牌。为了直接从版本库删除锁定,她需要给<command>svn unlock</command>传递URL参数,她的这一次尝试又失败了,因为她不是锁定的拥有者(也没有锁定令牌)。当她使用了<option>--force</option>选项后,认证和授权的要求被忽略了,远程的锁定被打破了。"
5991 #. (para)
5992 #: ../source/book.xml:5793
5993 msgid "Simply breaking a lock may not be enough. In the running example, Sally may not only want to break Harry's long-forgotten lock, but re-lock the file for her own use. She can accomplish this by running <command>svn unlock --force</command> and then <command>svn lock</command> back-to-back, but there's a small chance that somebody else might lock the file between the two commands. The simpler thing to is <firstterm>steal</firstterm> the lock, which involves breaking and re-locking the file all in one atomic step. To do this, Sally passes the <option>--force</option> option to <command>svn lock</command>:"
5994 msgstr "当然,简单的打破锁定也许还不够,在这个例子里,Sally不仅想要打破Harry遗忘的锁定,她也希望自己重新锁定。她可以通过运行<command>svn unlock --force</command>紧接着<command>svn lock</command>,但是有可能有人在这两次命令之间锁定了文件,最简单的方式是<firstterm>窃取</firstterm>这个锁定,将打破和重新锁定变成一种原子操作,为此需要运行<command>svn lock</command>加<option>--force</option>选项:"
5996 #. (screen)
5997 #: ../source/book.xml:5804
5998 #, no-wrap
5999 msgid ""
6000 "\n"
6001 "$ svn lock raisin.jpg\n"
6002 "svn: Lock request failed: 423 Locked (http://svn.example.com)\n"
6003 "$ svn lock --force raisin.jpg\n"
6004 "'raisin.jpg' locked by user 'sally'.\n"
6005 "$\n"
6006 msgstr ""
6007 "\n"
6008 "$ svn lock raisin.jpg\n"
6009 "svn: Lock request failed: 423 Locked (http://svn.example.com)\n"
6010 "$ svn lock --force raisin.jpg\n"
6011 "'raisin.jpg' locked by user 'sally'.\n"
6012 "$\n"
6014 #. (para)
6015 #: ../source/book.xml:5811
6016 msgid "In any case, whether the lock is broken or stolen, Harry may be in for a surprise. Harry's working copy still contains the original lock token, but that lock no longer exists. The lock token is said to be <firstterm>defunct</firstterm>. The lock represented by the lock token has either been broken (no longer in the repository), or stolen (replaced with a different lock). Either way, Harry can see this by asking <command>svn status</command> to contact the repository:"
6017 msgstr "在任何情况下,无论锁定被打破还是窃取,Harry都会感到惊讶。Harry的工作拷贝还保留有原来的锁定令牌,但是锁定已经不存在了,锁定令牌可以说已经<firstterm>死掉了</firstterm>。锁定令牌指代的锁定被打破(版本库中不再存在)或者是窃取了(被另一个锁定代替了),任何一种情况下,Harry都可以使用<command>svn status</command>询问版本库:"
6019 #. (screen)
6020 #: ../source/book.xml:5820
6021 #, no-wrap
6022 msgid ""
6023 "\n"
6024 "$ svn status\n"
6025 "     K raisin.jpg\n"
6026 "$ svn status -u\n"
6027 "     B         32   raisin.jpg\n"
6028 "$ svn update\n"
6029 "  B  raisin.jpg\n"
6030 "$ svn status\n"
6031 "$\n"
6032 msgstr ""
6033 "\n"
6034 "$ svn status\n"
6035 "     K raisin.jpg\n"
6036 "$ svn status -u\n"
6037 "     B         32   raisin.jpg\n"
6038 "$ svn update\n"
6039 "  B  raisin.jpg\n"
6040 "$ svn status\n"
6041 "$\n"
6043 #. (para)
6044 #: ../source/book.xml:5830
6045 msgid "If the repository lock was broken, then <command>svn status --show-updates</command> displays a <literal>B</literal> (Broken) symbol next to the file. If a new lock exists in place of the old one, then a <literal>T</literal> (sTolen) symbol is shown. Finally, <command>svn update</command> notices any defunct lock tokens and removes them from the working copy."
6046 msgstr "如果版本库锁定被打破了,<command>svn status --show-updates</command>会在文件旁边显示一个<literal>B</literal> (Broken)。如果有一个新的锁,就会显示一个<literal>T</literal> (sTolen)符号。最终,<command>svn update</command>会注意到所有死掉的锁定并且把它们从工作拷贝中删除掉。"
6048 #. (title)
6049 #: ../source/book.xml:5839
6050 msgid "Locking Policies"
6051 msgstr "锁定策略"
6053 #. (para)
6054 #: ../source/book.xml:5841
6055 msgid "Different systems have different notions of how strict a lock should be. Some folks argue that locks must be strictly enforced at all costs, releasable only by the original creator or administrator. They argue that if anyone can break a lock, then chaos runs rampant and the whole point of locking is defeated. The other side argues that locks are first and foremost a communication tool. If users are constantly breaking each others' locks, then it represents a cultural failure within the team and the problem falls outside the scope of software enforcement."
6056 msgstr "不同的系统有不同的锁定限制程度的观念。有些人认为锁定必须不顾任何代价的严格执行,只有原始的创建者和管理员可以释放。他们认为如果有人打破了锁定,混乱就会放任,锁定就完全失去了意义。另外一些人认为锁定是第一个和最首要的交流工具,如果用户经常的打破别人的锁定,代表了团队的文化失败和软件之外的问题。"
6058 #. (para)
6059 #: ../source/book.xml:5851
6060 msgid "Subversion defaults to the <quote>softer</quote> approach, but still allows administrators to create stricter enforcement policies through the use of hook scripts. In particular, the <filename>pre-lock</filename> and <filename>pre-unlock</filename> hooks allow administrators to decide when lock creation and lock releases are allowed to happen. Depending on whether or not a lock already exists, these two hooks can decide whether or not to allow a certain user to break or steal a lock. The <filename>post-lock</filename> and <filename>post-unlock</filename> hooks are also available, and can be used to send email after locking actions. To learn more about repository hooks, see <xref linkend=\"svn.reposadmin.create.hooks\"/>."
6061 msgstr "Subversion缺省是比较<quote>宽松的</quote>方式,但也允许管理员创建钩子脚本来建立严格的控制策略。具体来说,<filename>pre-lock</filename>和<filename>pre-unlock</filename>钩子允许管理员决定什么时候创建和释放锁定。根据锁定是否已经存在,这两个钩子脚本可以决定是否允许特定用户打破或窃取锁定。也有<filename>post-lock</filename>和<filename>post-unlock</filename>钩子,可以用来发送锁定动作的通知邮件。关于版本库钩子的更多信息可以看<xref linkend=\"svn.reposadmin.create.hooks\"/>。"
6063 #. (title)
6064 #: ../source/book.xml:5869
6065 msgid "Lock Communication"
6066 msgstr "锁定交流"
6068 #. (para)
6069 #: ../source/book.xml:5871
6070 msgid "We've seen how <command>svn lock</command> and <command>svn unlock</command> can be used to create, release, break, and steal locks. This satisfies the goal of serializing commit access to a file. But what about the larger problem of preventing wasted time?"
6071 msgstr "我们已经见到了如何利用<command>svn lock</command>和<command>svn unlock</command>来创建、释放、打破和窃取锁定,这就满足了顺序访问文件的要求,但是浪费时间这个大问题该如何呢?"
6073 #. (para)
6074 #: ../source/book.xml:5876
6075 msgid "For example, suppose Harry locks an image file and then begins editing it. Meanwhile, miles away, Sally wants to do the same thing. She doesn't think to run <command>svn status --show-updates</command>, so she has no idea that Harry has already locked the file. She spends hours editing the file, and when she tries to commit her change, she discovers that either the file is locked or that she's out-of-date. Regardless, her changes aren't mergeable with Harry's. One of these two people has to throw away their work, and a lot of time has been wasted."
6076 msgstr "例如,假定Harry锁定了一个图片,并开始编辑。同时,几英里之外的Sally希望做同样的工作,她没想到运行<command>svn status --show-updates</command>,她不知道Harry已经锁定了文件。她花费了数小时来修改文件,当她真被提交时发现文件已经被锁定或者是她的文件已经过期了。她的修改不能和Harry的合并,他们中的一人需要抛弃自己的工作,许多时间被浪费了。"
6078 #. (para)
6079 #: ../source/book.xml:5886
6080 msgid "Subversion's solution to this problem is to provide a mechanism to remind users that a file ought to be locked <emphasis>before</emphasis> the editing begins. The mechanism is a special property, <literal>svn:needs-lock</literal>. If that property is attached to a file (regardless of its value, which is irrelevant), then Subversion will try to use filesystem-level permissions to make the file read-only—unless, of course, the user has explicitly locked the file. When a lock token is present (as a result of running <command>svn lock</command>), the file becomes read-write. When the lock is released, the file becomes read-only again."
6081 msgstr "Subversion针对此问题的解决方案是提供一种机制,提醒用户在开始编辑<emphasis>以前</emphasis>必须锁定这个文件,这个机制就是提供一种特别的属性--<literal>svn:needs-lock</literal>。当有这个值时,<emphasis>除非</emphasis>用户锁定这个文件,否则文件一直是只读的。当得到一个锁定令牌(运行<command>svn lock</command>的结果),文件变成可读写,当释放这个锁后,文件又变成只读。"
6083 #. (para)
6084 #: ../source/book.xml:5898
6085 msgid "The theory, then, is that if the image file has this property attached, then Sally would immediately notice something is strange when she opens the file for editing: many applications alert users immediately when a read-only file is opened for editing, and nearly all would prevent her from saving changes to the file. This reminds her to lock the file before editing, whereby she discovers the pre-existing lock:"
6086 msgstr "根据这个原理,如果一个图像文件有这个属性,Sally打开编辑文件就会立刻注意到有些特别,大多数程序会在打开只读文件时立刻警告,至少所有的程序会防止她保存修改,这提醒了她编辑之前需要锁定文件,这样她就发现了原来存在的锁定:"
6088 #. (screen)
6089 #: ../source/book.xml:5906
6090 #, no-wrap
6091 msgid ""
6092 "\n"
6093 "$ /usr/local/bin/gimp raisin.jpg\n"
6094 "gimp: error: file is read-only!\n"
6095 "$ ls -l raisin.jpg\n"
6096 "-r--r--r--   1 sally   sally   215589 Jun  8 19:23 raisin.jpg\n"
6097 "$ svn lock raisin.jpg\n"
6098 "svn: Lock request failed: 423 Locked (http://svn.example.com)\n"
6099 "$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock\n"
6100 "Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
6101 "Lock Owner: harry\n"
6102 "Lock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006)\n"
6103 "Lock Comment (1 line):\n"
6104 "Making some tweaks.  Locking for the next two hours.\n"
6105 "$\n"
6106 msgstr ""
6107 "\n"
6108 "$ /usr/local/bin/gimp raisin.jpg\n"
6109 "gimp: error: file is read-only!\n"
6110 "$ ls -l raisin.jpg\n"
6111 "-r--r--r--   1 sally   sally   215589 Jun  8 19:23 raisin.jpg\n"
6112 "$ svn lock raisin.jpg\n"
6113 "svn: Lock request failed: 423 Locked (http://svn.example.com)\n"
6114 "$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock\n"
6115 "Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n"
6116 "Lock Owner: harry\n"
6117 "Lock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006)\n"
6118 "Lock Comment (1 line):\n"
6119 "Making some tweaks.  Locking for the next two hours.\n"
6120 "$\n"
6122 #. (para)
6123 #: ../source/book.xml:5922
6124 msgid "Users and administrators alike are encouraged to attach the <literal>svn:needs-lock</literal> property to any file which cannot be contextually merged. This is the primary technique for encouraging good locking habits and preventing wasted effort."
6125 msgstr "我们鼓励用户和管理员都应该给不能根据上下文的文件添加<literal>svn:needs-lock</literal>属性,这是鼓励好的锁定习惯和防止浪费的主要技术手段。"
6127 #. (para)
6128 #: ../source/book.xml:5928
6129 msgid "Note that this property is a communication tool which works independently from the locking system. In other words, any file can be locked, whether or not this property is present. And conversely, the presence of this property doesn't make the repository require a lock when committing."
6130 msgstr "需要注意到这个属性是依赖于锁定系统的交流工具,不管是否有这个属性,文件都可以锁定。相反的,无论有没有这个属性,并不会要求提交需要首先锁定文件。"
6132 #. (para)
6133 #: ../source/book.xml:5942
6134 #, fuzzy
6135 msgid "Except, perhaps, a classic Vulcan mind-meld."
6136 msgstr "?"
6138 #. (para)
6139 #: ../source/book.xml:5934
6140 msgid "Unfortunately, the system isn't flawless. It's possible that even when a file has the property, the read-only reminder won't always work. Sometimes applications misbehave and <quote>hijack</quote> the read-only file, silently allowing users to edit and save the file anyway. There's not much that Subversion can do in this situation—at the end of the day, there's simply no substitution for good interpersonal communication. <placeholder-1/>"
6141 msgstr "这个系统并不是毫无瑕疵,即使有这个属性,只读提醒也有可能失效。有些程序<quote>偷偷的篡改了</quote>文件的只读属性,悄无声息的允许用户编辑和保存文件,不幸的是,Subversion对此无能为力—即时到了现今,还是没有任何工具能够代替人与人的良好交流。<placeholder-1/>"
6143 #. (title)
6144 #: ../source/book.xml:5951
6145 msgid "Externals Definitions"
6146 msgstr "外部定义"
6148 #. (para)
6149 #: ../source/book.xml:5953
6150 msgid "Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. You could certainly set up such a scenario by hand—using <command>svn checkout</command> to create the sort of nested working copy structure you are trying to achieve. But if this layout is important for everyone who uses your repository, every other user will need to perform the same checkout operations that you did."
6151 msgstr "有时候创建一个由多个不同检出得到的工作拷贝是非常有用的,举个例子,你或许希望不同的子目录来自不同的版本库位置,或者是不同的版本库。你可以手工设置这样一个工作拷贝—使用<command>svn checkout</command>来创建这种你需要的嵌套的工作拷贝结构。但是如果这个结构对所有的用户是很重要的,每个用户需要执行同样的检出操作。"
6153 #. (para)
6154 #: ../source/book.xml:5963
6155 msgid "Fortunately, Subversion provides support for <firstterm>externals definitions</firstterm>. An externals definition is a mapping of a local directory to the URL—and ideally a particular revision—of a versioned directory. In Subversion, you declare externals definitions in groups using the <literal>svn:externals</literal> property. You can create or modify this property using <command>svn propset</command> or <command>svn propedit</command> (see <xref linkend=\"svn.advanced.props.manip\"/>). It can be set on any versioned directory, and its value is a multi-line table of subdirectories (relative to the versioned directory on which the property is set), optional revision flags, and fully qualified, absolute Subversion repository URLs."
6156 msgstr "很幸运,Subversion提供了<firstterm>外部定义</firstterm>的支持,一个外部定义是一个本地路经到URL的影射—也有可能一个特定的修订版本—一些版本化的资源。在Subversion你可以使用<literal>svn:externals</literal>属性来定义外部定义,你可以用<command>svn propset</command>或<command>svn propedit</command>(见<xref linkend=\"svn.advanced.props.manip\"/>)创建和修改这个属性。它可以设置到任何版本化的路经,它的值是一个多行的子目录,可选的修订版本标记和完全有效的Subversion版本库URL的列表(相对于设置属性的版本化目录)。"
6158 #. (screen)
6159 #: ../source/book.xml:5976
6160 #, no-wrap
6161 msgid ""
6162 "\n"
6163 "$ svn propget svn:externals calc\n"
6164 "third-party/sounds             http://sounds.red-bean.com/repos\n"
6165 "third-party/skins              http://skins.red-bean.com/repositories/skinproj\n"
6166 "third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker\n"
6167 msgstr ""
6168 "\n"
6169 "$ svn propget svn:externals calc\n"
6170 "third-party/sounds             http://sounds.red-bean.com/repos\n"
6171 "third-party/skins              http://skins.red-bean.com/repositories/skinproj\n"
6172 "third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker\n"
6174 #. (para)
6175 #: ../source/book.xml:5982
6176 msgid "The convenience of the <literal>svn:externals</literal> property is that once it is set on a versioned directory, everyone who checks out a working copy with that directory also gets the benefit of the externals definition. In other words, once one person has made the effort to define those nested working copy checkouts, no one else has to bother—Subversion will, upon checkout of the original working copy, also check out the external working copies."
6177 msgstr "<literal>svn:externals</literal>的方便之处是这个属性设置到版本化的路径后,任何人可以从那个目录取出一个工作拷贝,同样得到外部定义的好处。换句话说,一旦一个人努力来定义这些嵌套的工作拷贝检出,其他任何人不需要再麻烦了—Subversion会在原先的工作拷贝检出之后,也会检出外部工作拷贝。"
6179 #. (para)
6180 #: ../source/book.xml:5991
6181 msgid "The relative target subdirectories of externals definitions <emphasis>must not</emphasis> already exist on your or other users' systems—Subversion will create them when it checks out the external working copy."
6182 msgstr "外部定义的相对目标子目录不需要存在于你的或其它用户的系统中—Subversion会在检出工作拷贝时创建这些文件。实际上,你一定不要使用外部定义来产生已经在版本控制路径。"
6184 #. (para)
6185 #: ../source/book.xml:5996
6186 msgid "Note the previous externals definition example. When someone checks out a working copy of the <filename>calc</filename> directory, Subversion also continues to check out the items found in its externals definition."
6187 msgstr "注意前一个外部定义实例,当有人取出了一个<filename>calc</filename>目录的工作拷贝,Subversion会继续来取出外部定义的项目。"
6189 #. (screen)
6190 #: ../source/book.xml:6000
6191 #, no-wrap
6192 msgid ""
6193 "\n"
6194 "$ svn checkout http://svn.example.com/repos/calc\n"
6195 "A  calc\n"
6196 "A  calc/Makefile\n"
6197 "A  calc/integer.c\n"
6198 "A  calc/button.c\n"
6199 "Checked out revision 148.\n"
6200 "\n"
6201 "Fetching external item into calc/third-party/sounds\n"
6202 "A  calc/third-party/sounds/ding.ogg\n"
6203 "A  calc/third-party/sounds/dong.ogg\n"
6204 "A  calc/third-party/sounds/clang.ogg\n"
6205 "…\n"
6206 "A  calc/third-party/sounds/bang.ogg\n"
6207 "A  calc/third-party/sounds/twang.ogg\n"
6208 "Checked out revision 14.\n"
6209 "\n"
6210 "Fetching external item into calc/third-party/skins\n"
6211 "…\n"
6212 msgstr ""
6213 "\n"
6214 "$ svn checkout http://svn.example.com/repos/calc\n"
6215 "A  calc\n"
6216 "A  calc/Makefile\n"
6217 "A  calc/integer.c\n"
6218 "A  calc/button.c\n"
6219 "Checked out revision 148.\n"
6220 "\n"
6221 "Fetching external item into calc/third-party/sounds\n"
6222 "A  calc/third-party/sounds/ding.ogg\n"
6223 "A  calc/third-party/sounds/dong.ogg\n"
6224 "A  calc/third-party/sounds/clang.ogg\n"
6225 "…\n"
6226 "A  calc/third-party/sounds/bang.ogg\n"
6227 "A  calc/third-party/sounds/twang.ogg\n"
6228 "Checked out revision 14.\n"
6229 "\n"
6230 "Fetching external item into calc/third-party/skins\n"
6231 "…\n"
6233 #. (para)
6234 #: ../source/book.xml:6020
6235 msgid "If you need to change the externals definition, you can do so using the regular property modification subcommands. When you commit a change to the <literal>svn:externals</literal> property, Subversion will synchronize the checked-out items against the changed externals definition when you next run <command>svn update</command>. The same thing will happen when others update their working copies and receive your changes to the externals definition."
6236 msgstr "如果你希望修改外部定义,你可以使用普通的属性修改子命令,当你提交一个<literal>svn:externals</literal>属性修改后,当你运行<command>svn update</command>时,Subversion会根据修改的外部定义同步检出的项目,同样的事情也会发生在别人更新他们的工作拷贝接受你的外部定义修改时。"
6238 #. (para)
6239 #: ../source/book.xml:6029
6240 msgid "Because the <literal>svn:externals</literal> property has a multiline value, we strongly recommend that you use <command>svn propedit</command> instead of <command>svn propset</command>."
6241 msgstr "因为<literal>svn:externals</literal>的值是多行的,所以我们强烈建议使用<command>svn propedit</command>,而不是使用<command>svn propset</command>。"
6243 #. (para)
6244 #: ../source/book.xml:6035
6245 msgid "You should seriously consider using explicit revision numbers in all of your externals definitions. Doing so means that you get to decide when to pull down a different snapshot of external information, and exactly which snapshot to pull. Besides avoiding the surprise of getting changes to third-party repositories that you might not have any control over, using explicit revision numbers also means that as you backdate your working copy to a previous revision, your externals definitions will also revert to the way they looked in that previous revision, which in turn means that the external working copies will be updated to match they way <emphasis>they</emphasis> looked back when your repository was at that previous revision. For software projects, this could be the difference between a successful and a failed build of an older snapshot of your complex codebase."
6246 msgstr "你一定要要考虑在所有的外部定义中使用明确的修订版本,这样做意味着你已经决定了何时拖出外部信息不同的快照,和精确的拖出哪个快照。除了不会受到第三方版本库的意外修改的影响以外,当你的工作拷贝回溯到以前的版本库时,使用明确的修订版本号会让外部定义回到以前的那个修订版本,也意味着外部定义的工作拷贝更新会匹配以前修订版本的样子。对于软件项目,这可能是编译复杂代码基的老快照成功和失败的区别。"
6248 #. (para)
6249 #: ../source/book.xml:6051
6250 msgid "The <command>svn status</command> command also recognizes externals definitions, displaying a status code of <literal>X</literal> for the disjoint subdirectories into which externals are checked out, and then recursing into those subdirectories to display the status of the external items themselves."
6251 msgstr "<command>svn status</command>命令也认识外部定义,会为外部定义的子目录显示<literal>X</literal>状态码,然后迭代这些子目录来显示外部项目的子目录状态信息。"
6253 #. (para)
6254 #: ../source/book.xml:6057
6255 msgid "The support that exists for externals definitions in Subversion is less than ideal, though. First, an externals definition can only point to directories, not files. Second, the externals definition cannot point to relative paths (paths like <filename>../../skins/myskin</filename>). Third, the working copies created via the externals definition support are still disconnected from the primary working copy (on whose versioned directories the <literal>svn:externals</literal> property was actually set). And Subversion still only truly operates on non-disjoint working copies. So, for example, if you want to commit changes that you've made in one or more of those external working copies, you must run <command>svn commit</command> explicitly on those working copies—committing on the primary working copy will not recurse into any external ones."
6256 msgstr "Subversion目前对外部定义的支持可能会引起误导,首先,一个外部定义只可以指向目录,而不是文件。第二,外部定义不可以指向相对路径(如<filename>../../skins/myskin</filename>)。第三,通过外部定义创建的工作拷贝与主工作拷贝没有连接(设置<literal>svn:externals</literal>属性的工作拷贝的版本库),所以Subversion会以不关联的工作拷贝操作。所以举个例子,如果你希望提交一个或多个外部定义的拷贝,你必须在这些工作拷贝显示的运行<command>svn commit</command>—对主工作拷贝的提交不会迭代到外部定义的部分。"
6258 #. (para)
6259 #: ../source/book.xml:6072
6260 msgid "Also, since the definitions themselves use absolute URLs, moving or copying a directory to which they are attached will not affect what gets checked out as an external (though the relative local target subdirectory will, of course, move with renamed directory). This can be confusing—even frustrating—in certain situations. For example, say you have a top-level directory named <filename>my-project</filename>, and you've created an externals definition on one of its subdirectories (<filename>my-project/some-dir</filename>) which tracks the latest revision of another of its subdirectories (<filename>my-project/external-dir</filename>)."
6261 msgstr "另外,因为定义本身使用绝对路径,移动和拷贝路径他们附着的路径不会影响他们作为外部的检出(尽管相对的本地目标子目录会这样,当然,根据重命名的目录)。在特定情形下这看起来有些迷惑—甚至让人沮丧。举个例子,你的顶级目录叫作<filename>my-project</filename>,你在它的子目录(filename moreinfo=\"none\">my-project/some-dir</filename>)创建了一个外部定义,而这个外部定义指向的是另一个子目录(<filename>my-project/external-dir</filename>)的最新版本。"
6263 #. (screen)
6264 #: ../source/book.xml:6084
6265 #, no-wrap
6266 msgid ""
6267 "\n"
6268 "$ svn checkout http://svn.example.com/projects .\n"
6269 "A    my-project\n"
6270 "A    my-project/some-dir\n"
6271 "A    my-project/external-dir\n"
6272 "…\n"
6273 "Fetching external item into 'my-project/some-dir/subdir'\n"
6274 "Checked out external at revision 11.\n"
6275 "\n"
6276 "Checked out revision 11.\n"
6277 "$ svn propget svn:externals my-project/some-dir\n"
6278 "subdir http://svn.example.com/projects/my-project/external-dir\n"
6279 "\n"
6280 "$\n"
6281 msgstr ""
6282 "\n"
6283 "$ svn checkout http://svn.example.com/projects .\n"
6284 "A    my-project\n"
6285 "A    my-project/some-dir\n"
6286 "A    my-project/external-dir\n"
6287 "…\n"
6288 "Fetching external item into 'my-project/some-dir/subdir'\n"
6289 "Checked out external at revision 11.\n"
6290 "\n"
6291 "Checked out revision 11.\n"
6292 "$ svn propget svn:externals my-project/some-dir\n"
6293 "subdir http://svn.example.com/projects/my-project/external-dir\n"
6294 "\n"
6295 "$\n"
6297 #. (para)
6298 #: ../source/book.xml:6099
6299 msgid "Now you use <command>svn move</command> to rename the <filename>my-project</filename> directory. At this point, your externals definition will still refer to a path under the <filename>my-project</filename> directory, even though that directory no longer exists."
6300 msgstr "现在你使用<command>svn move</command>将目录<filename>my-project</filename>改名,此刻,你的外部定义还是指向<filename>my-project</filename>目录,即使这个目录已经不存在了。"
6302 #. (screen)
6303 #: ../source/book.xml:6104
6304 #, no-wrap
6305 msgid ""
6306 "\n"
6307 "$ svn move -q my-project renamed-project\n"
6308 "$ svn commit -m \"Rename my-project to renamed-project.\"\n"
6309 "Deleting       my-project\n"
6310 "Adding         my-renamed-project\n"
6311 "\n"
6312 "Committed revision 12.\n"
6313 "$ svn update\n"
6314 "\n"
6315 "Fetching external item into 'renamed-project/some-dir/subdir'\n"
6316 "svn: Target path does not exist\n"
6317 "$\n"
6318 msgstr ""
6319 "\n"
6320 "$ svn move -q my-project renamed-project\n"
6321 "$ svn commit -m \"Rename my-project to renamed-project.\"\n"
6322 "Deleting       my-project\n"
6323 "Adding         my-renamed-project\n"
6324 "\n"
6325 "Committed revision 12.\n"
6326 "$ svn update\n"
6327 "\n"
6328 "Fetching external item into 'renamed-project/some-dir/subdir'\n"
6329 "svn: Target path does not exist\n"
6330 "$\n"
6332 #. (para)
6333 #: ../source/book.xml:6117
6334 msgid "Also, the absolute URLs that externals definitions use can cause problems with repositories that are available via multiple URL schemes. For example, if your Subversion server is configured to allow everyone to check out the repository over <literal>http://</literal> or <literal>https://</literal>, but only allow commits to come in via <literal>https://</literal>, you have an interesting problem on your hands. If your externals definitions use the <literal>http://</literal> form of the repository URLs, you won't be able to commit anything from the working copies created by those externals. On the other hand, if they use the <literal>https://</literal> form of the URLs, anyone who might be checking out via <literal>http://</literal> because their client doesn't support <literal>https://</literal> will be unable to fetch the external items. Be aware, too, that if you need to re-parent your working copy (using <command>svn switch --relocate</command>), externals definitions will <emphasis>not</emphasis> also be re-parented."
6335 msgstr "当然,如果版本库存在多种URL模式时,使用绝对URL来引用外部定义会导致问题。例如,如果你的Subversion服务器已经配置为任何用户可以使用<literal>http://</literal>或<literal>https://</literal>检出,但是只能通过<literal>https://</literal>提交,你现在有了一个很有趣的问题。如果你的外部定义使用<literal>http://</literal>形式,则你不能从这个工作拷贝提交任何内容。另一方面,如果他们使用<literal>https://</literal>方式的URL,任何因为不支持<literal>https://</literal>的客户使用<literal>http://</literal>检出的工作拷贝不能得到外部项目。也需要意识到,如果你需要重定位你的工作拷贝(使用<command>svn switch --relocate</command>),外部定义不会重新定位。"
6337 #. (para)
6338 #: ../source/book.xml:6135
6339 msgid "Finally, there might be times when you would prefer that <command>svn</command> subcommands would not recognize, or otherwise operate upon, the external working copies. In those instances, you can pass the <option>--ignore-externals</option> option to the subcommand."
6340 msgstr "最后,你或许经常希望<command>svn</command>子命令不会识别或其它作为外部定义处理的结果的外部工作拷贝上的操作,在这种情况下,你可以对子命令使用<option>--ignore-externals</option>选项。"
6342 #. (title)
6343 #: ../source/book.xml:6146
6344 msgid "Peg and Operative Revisions"
6345 msgstr "Peg 算法和版本"
6347 #. (para)
6348 #: ../source/book.xml:6148
6349 msgid "We copy, move, rename, and completely replace files and directories on our computers all the time. And your version control system shouldn't get in the way of your doing these things with your version-controlled files and directories, either. Subversion's file management support is quite liberating, affording almost as much flexibility for versioned files as you'd expect when manipulating your unversioned ones. But that flexibility means that across the lifetime of your repository, a given versioned object might have many paths, and a given path might represent several entirely different versioned objects. And this introduces a certain level of complexity to your interactions with those paths and objects."
6350 msgstr "文件和目录的拷贝、改名和移动能力使你可以创建一个项目,然后删除它,然后在同一个位置添加一个新的—这是在我们的计算机中经常发生的操作,而你的版本控制系统不应该成为你这样操作的障碍。Subversion的文件管理操作是这样的开放,提供了几乎和普通文件一样的操作版本化文件的灵活性,但是灵活意味着在整个版本库的生命周期中,一个给定的版本化的资源可能会出现在许多不同的路径,一个给定的路径会展示给我们许多完全不同的版本化资源。当然这些功能也增加了你与这些路径和资源交互的难度。"
6352 #. (para)
6353 #: ../source/book.xml:6161
6354 msgid "Subversion is pretty smart about noticing when an object's version history includes such <quote>changes of address</quote>. For example, if you ask for the revision history log of a particular file that was renamed last week, Subversion happily provides all those logs—the revision in which the rename itself happened, plus the logs of relevant revisions both before and after that rename. So, most of the time, you don't even have to think about such things. But occasionally, Subversion needs your help to clear up ambiguities."
6355 msgstr "Subversion可以非常聪明的注意到一个对象的包括一个<quote>地址改变</quote>历史变化,举个例子,如果你询问一个曾经上周改过名的文件的所有的日志信息,Subversion会很高兴提供所有的日志—重命名发生的修订版本,外加相关版本之前和之后的修订版本日志,所以大多数时间里,你不需要考虑这些事情,但是偶尔,Subversion会需要你的帮助来清除混淆。"
6357 #. (para)
6358 #: ../source/book.xml:6170
6359 msgid "The simplest example of this occurs when a directory or file is deleted from version control, and then a new directory or file is created with the same name and added to version control. Clearly the thing you deleted and the thing you later added aren't the same thing. They merely happen to have had the same path, <filename>/trunk/object</filename> for example. What, then, does it mean to ask Subversion about the history of <filename>/trunk/object</filename>? Are you asking about the thing currently at that location, or the old thing you deleted from that location? Are you asking about the operations that have happened to <emphasis>all</emphasis> the objects that have ever lived at that path? Clearly, Subversion needs a hint about what you really want."
6360 msgstr "这个最简单的例子发生在当一个目录或者文件从版本控制中删除时,然后一个新的同样名字目录或者文件添加到版本控制,显然你删除的和你后来添加的不是同样的东西,它们仅仅是有同样的路径,例如<filename>/trunk/object</filename>。什么,这意味着询问Subversion来查看<filename>/trunk/object</filename>的历史?你是询问当前这个位置的东西还是你在这个位置删除的那个对象?你是希望询问对这个对象的所有操作还是这个路径的所有对象?很明显,Subversion需要线索知道你真实的想法。"
6362 #. (para)
6363 #: ../source/book.xml:6190
6364 msgid "<quote>You're not supposed to name it. Once you name it, you start getting attached to it.</quote>—Mike Wazowski"
6365 msgstr "<quote>你不是被期望去命名它,一旦你取了名字,你开始与之联系在一起。</quote> — Mike Wazowski"
6367 #. (para)
6368 #: ../source/book.xml:6183
6369 msgid "And thanks to moves, versioned object history can get far more twisted than that, even. For example, you might have a directory named <filename>concept</filename>, containing some nascent software project you've been toying with. Eventually, though, that project matures to the point that the idea seems to actually have some wings, so you do the unthinkable and decide to give the project a name. <placeholder-1/> Let's say you called your software Frabnaggilywort. At this point, it makes sense to rename the directory to reflect the project's new name, so <filename>concept</filename> is renamed to <filename>frabnaggilywort</filename>. Life goes on, Frabnaggilywort releases a 1.0 version, and is downloaded and used daily by hordes of people aiming to improve their lives."
6370 msgstr "由于移动,版本化对象的历史会变得非常扭曲。举个例子,你会有一个目录叫做<filename>concept</filename>,保存了一些你用来试验的初生的软件项目,最终,这个项目变得足够成熟,说明这个注意确实需要一些翅膀了,所以你决定给这个项目一个名字。 <placeholder-1/>假定你叫你的软件为Frabnaggilywort,此刻,把你的目录命名为反映项目名称的名字是有意义的,所以<filename>concept</filename>改名为<filename>frabnaggilywort</filename>。生活还在继续,Frabnaggilywort发布了1.0版本,并且被许多希望改进他们生活的分散用户天天使用。"
6372 #. (para)
6373 #: ../source/book.xml:6200
6374 msgid "It's a nice story, really, but it doesn't end there. Entrepreneur that you are, you've already got another think in the tank. So you make a new directory, <filename>concept</filename>, and the cycle begins again. In fact, the cycle begins again many times over the years, each time starting with that old <filename>concept</filename> directory, then sometimes seeing that directory renamed as the idea cures, sometimes seeing it deleted when you scrap the idea. Or, to get really sick, maybe you rename <filename>concept</filename> to something else for a while, but later rename the thing back to <filename>concept</filename> for some reason."
6375 msgstr "这是一个美好的故事,但是没有在这里结束,作为主办人,你一定想到了另一件事,所以你创建了一个目录叫做<filename>concept</filename>,周期重新开始。实际上,这个循环在几年里开始了多次,每一个想法从使用旧的<filename>concept</filename>目录开始,然后有时在想法成熟之后重新命名,有时你放弃了这个注意而删除了这个目录。或者更加变态一点,或许你把<filename>concept</filename>改成其他名字之后又因为一些原因重新改回<filename>concept</filename>。"
6377 #. (para)
6378 #: ../source/book.xml:6212
6379 msgid "In scenarios like these, attempting to instruct Subversion to work with these re-used paths can be a little like instructing a motorist in Chicago's West Suburbs to drive east down Roosevelt Road and turn left onto Main Street. In a mere twenty minutes, you can cross <quote>Main Street</quote> in Wheaton, Glen Ellyn, and Lombard. And no, they aren't the same street. Our motorist—and our Subversion—need a little more detail in order to do the right thing."
6380 msgstr "当这样的情景发生时,指导Subversion工作在重新使用的路径上的尝试就像指导一个芝加哥西郊的乘客驾车到东面的罗斯福路并且左转到主大道。仅仅20分钟,你可以穿过惠顿、格伦埃林何朗伯德的<quote>主大道</quote>,但是它们不是一样的街道,我们的乘客—和我们的Subversion—需要更多的细节来做正确的事情。"
6382 #. (para)
6383 #: ../source/book.xml:6220
6384 msgid "In version 1.1, Subversion introduced a way for you to tell it exactly which Main Street you meant. It's called the <firstterm>peg revision</firstterm>, and it is a revision provided to Subversion for the sole purpose of identifying a unique line of history. Because at most one versioned object may occupy a path at any given time—or, more precisely, in any one revision—the combination of a path and a peg revision is all that is needed to refer to a specific line of history. Peg revisions are specified to the Subversion command-line client using <firstterm>at syntax</firstterm>, so called because the syntax involves appending an <quote>at sign</quote> (<literal>@</literal>) and the peg revision to the end of the path with which the revision is associated."
6385 msgstr "在1.1版本,Subversion提供了一种方法来说明你所指是哪一个街道,叫做<firstterm>peg修订版本</firstterm>,通过这个修订版本我们可以为以确定一条历史线路,因为一个版本化的文件会在任何时间占用某个路径—路径和peg修订版本的合并是可以指定一个历史的特定线路。Peg修订版本可以在Subversion命令行客户端中用<firstterm>at语法</firstterm>指定,之所以使用这个名称是因为会在关联的修订版本的路径后面追加一个<quote>at符号</quote>(<literal>@</literal>)。"
6387 #. (para)
6388 #: ../source/book.xml:6242
6389 msgid "606 N. Main Street, Wheaton, Illinois, is the home of the Wheaton History Center. Get it—<quote>History Center</quote>? It seemed appropriate…."
6390 msgstr "伊利诺伊州惠顿主大道606号市惠顿离市中心,让它作为—<quote>历史中心</quote>?看起来是恰当的…。"
6392 #. (para)
6393 #: ../source/book.xml:6233
6394 msgid "But what of the <option>--revision (-r)</option> of which we've spoken so much in this book? That revision (or set of revisions) is called the <firstterm>operative revision</firstterm> (or <firstterm>operative revision range</firstterm>). Once a particular line of history has been identified using a path and peg revision, Subversion performs the requested operation using the operative revision(s). To map this to our Chicagoland streets analogy, if we are told to go to 606 N. Main Street in Wheaton, <placeholder-1/> we can think of <quote>Main Street</quote> as our path and <quote>Wheaton</quote> as our peg revision. These two pieces of information identify a unique path which can travelled (north or south on Main Street), and will keep us from travelling up and down the wrong Main Street in search of our destination. Now we throw in <quote>606 N.</quote> as our operative revision, of sorts, and we know <emphasis>exactly</emphasis> where to go."
6395 msgstr "但是我们在本书多次提到的<option>--revision (-r)</option>到底是什么?修订版本(或者是修订版本集)叫做<firstterm>实施的修订版本</firstterm>(或者叫做<firstterm>实施的修订版本范围</firstterm>),一旦一个特定历史线路通过一个路径和peg修订版本指定,Subversion会使用实施的修订版本执行要求的操作。类似的,为了指出这个到我们芝加哥的道路,如果我们被告知到惠顿主大道606号, <placeholder-1/> 我们可以把<quote>主大道</quote>看作路径,把<quote>惠顿</quote>当作我们的peg修订版本。这两段信息确认了我们可以旅行(主大道的北方或南方)的唯一路径,也会保持我们不会在前前后后寻找目标时走到错误的主大道。现在我们把<quote>606 N.</quote>作为我们实施的修订版本,我们<emphasis>精确的</emphasis>知道到哪里。"
6397 #. (title)
6398 #: ../source/book.xml:6255
6399 msgid "The peg revision algorithm"
6400 msgstr "Peg 版本算法"
6402 #. (para)
6403 #: ../source/book.xml:6257
6404 msgid "The Subversion command-line performs the peg revision algorithm any time it needs to resolve possible ambiguities in the paths and revisions provided to it. Here's an example of such an invocation:"
6405 msgstr "Subversion命令行在解决路径和修订版本混淆时需要peg修订版本算法,这里是一个用以说明的例子:"
6407 #. (replaceable)
6408 #: ../source/book.xml:6262
6409 msgid "command"
6410 msgstr "command"
6412 #. (replaceable)
6413 #: ../source/book.xml:6262
6414 msgid "OPERATIVE-REV"
6415 msgstr "OPERATIVE-REV"
6417 #. (replaceable)
6418 #: ../source/book.xml:6262
6419 msgid "PEG-REV"
6420 msgstr "PEG-REV"
6422 #. (screen)
6423 #: ../source/book.xml:6261
6424 #, no-wrap
6425 msgid ""
6426 "\n"
6427 "$ svn <placeholder-1/> -r <placeholder-2/> item@<placeholder-3/>\n"
6428 msgstr ""
6429 "\n"
6430 "$ svn <placeholder-1/> -r <placeholder-2/> item@<placeholder-3/>\n"
6432 #. (para)
6433 #: ../source/book.xml:6264
6434 msgid "If <replaceable>OPERATIVE-REV</replaceable> is older than <replaceable>PEG-REV</replaceable>, then the algorithm is as follows:"
6435 msgstr "如果<replaceable>OPERATIVE-REV</replaceable>比<replaceable>PEG-REV</replaceable>更老,则算法如下:"
6437 #. (para)
6438 #: ../source/book.xml:6269
6439 msgid "Locate <replaceable>item</replaceable> in the revision identified by <replaceable>PEG-REV</replaceable>. There can be only one such object."
6440 msgstr "来到修订版本<replaceable>PEG-REV</replaceable>,找到<replaceable>item</replaceable>,在版本库定位到一个唯一的对象。"
6442 #. (para)
6443 #: ../source/book.xml:6274
6444 msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision <replaceable>OPERATIVE-REV</replaceable>."
6445 msgstr "追踪对象的历史背景(通过任何可能的改名)来到修订版本<replaceable>OPERATIVE-REV</replaceable>的祖先。"
6447 #. (para)
6448 #: ../source/book.xml:6279
6449 msgid "Perform the requested action on that ancestor, wherever it is located, or whatever its name might be or have been at that time."
6450 msgstr "对那个祖先执行请求的动作,无论它的位置,无论它是什么名字,无论当时是否存在。"
6452 #. (para)
6453 #: ../source/book.xml:6284
6454 msgid "But what if <replaceable>OPERATIVE-REV</replaceable> is <emphasis>younger</emphasis> than <replaceable>PEG-REV</replaceable>? Well, that adds some complexity to the theoretical problem of locating the path in <replaceable>OPERATIVE-REV</replaceable>, because the path's history could have forked multiple times (thanks to copy operations) between <replaceable>PEG-REV</replaceable> and <replaceable>OPERATIVE-REV</replaceable>. And that's not all—Subversion doesn't store enough information to performantly trace an object's history forward, anyway. So the algorithm is a little different:"
6455 msgstr "但是如果<replaceable>OPERATIVE-REV</replaceable>比<replaceable>PEG-REV</replaceable>更年轻时会怎么样?这为定位<replaceable>OPERATIVE-REV</replaceable>中的路径的理论问题增加了一些复杂性,因为在<replaceable>PEG-REV</replaceable>和<replaceable>OPERATIVE-REV</replaceable>之间,路径在历史中可以出现多次(由于拷贝操作),而且那还不是全部—Subversion不会保存向前跟踪历史的足够信息,所以算法会有一点不同:"
6457 #. (para)
6458 #: ../source/book.xml:6297
6459 msgid "Locate <replaceable>item</replaceable> in the revision identified by <replaceable>OPERATIVE-REV</replaceable>. There can be only one such object."
6460 msgstr "来到修订版本<replaceable>PEG-REV</replaceable>,找到<replaceable>item</replaceable>,在版本库定位到一个唯一的对象。"
6462 #. (para)
6463 #: ../source/book.xml:6302
6464 msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision <replaceable>PEG-REV</replaceable>."
6465 msgstr "追踪对象的历史背景(通过任何可能的改名)来到修订版本<replaceable>PEG-REV</replaceable>的祖先。"
6467 #. (para)
6468 #: ../source/book.xml:6307
6469 msgid "Verify that the object's location (path-wise) in <replaceable>PEG-REV</replaceable> is the same as it is in <replaceable>OPERATIVE-REV</replaceable>. If that's the case, then at least the two locations are known to be directly related, so perform the requested action on the location in <replaceable>OPERATIVE-REV</replaceable>. Otherwise, relatedness was not established, so error out with a loud complaint that no viable location was found. (Someday, we expect that Subversion will be able to handle this usage scenario with more flexibility and grace.)"
6470 msgstr "在<replaceable>PEG-REV</replaceable>中检验对象的位置(顺序)与在<replaceable>OPERATIVE-REV</replaceable>中相同,如果那是问题,则至少两个位置是直接关联的,所以在<replaceable>OPERATIVE-REV</replaceable>的位置执行请求动作。否则,关联没有建立,所以会报告没有可用位置的错误。(有一天,我们希望Subversion可以更灵活和优雅的处理这种场景。)"
6472 #. (para)
6473 #: ../source/book.xml:6320
6474 msgid "Note that even when you don't explicitly supply a peg revision or operative revision, they are still present. For your convenience, the default peg revision is <literal>BASE</literal> for working copy items and <literal>HEAD</literal> for repository URLs. And when no operative revision is provided, it defaults to being the same revision as the peg revision."
6475 msgstr "注意,即使你没有明确提供peg修订版本或操作修订版本,他们依然是存在的。为了使用的简便,对于工作拷贝项目的缺省peg修订版本是<literal>BASE</literal>,而版本库URL的缺省值是<literal>HEAD</literal>。当没有提供操作修订版本时,缺省是与peg修订版本一样。"
6477 #. (para)
6478 #: ../source/book.xml:6328
6479 msgid "Say that long ago we created our repository, and in revision 1 added our first <filename>concept</filename> directory, plus an <filename>IDEA</filename> file in that directory talking about the concept. After several revisions in which real code was added and tweaked, we, in revision 20, renamed this directory to <filename>frabnaggilywort</filename>. By revision 27, we had a new concept, a new <filename>concept</filename> directory to hold it, and a new <filename>IDEA</filename> file to describe it. And then five years and twenty thousand revisions flew by, just like they would in any good romance story."
6480 msgstr "也就是说很久以前我们创建了我们的版本库,在修订版本1添加我们第一个<filename>concept</filename>目录,并且在这个目录增加一个<filename>IDEA</filename>文件与concept相关,在几个修订版本之后,真实的代码被添加和修改,我们在修订版本20,修改这个目录为<filename>frabnaggilywort</filename>。通过修订版本27,我们有了一个新的概念,所以一个新的<filename>concept</filename>目录用来保存这些东西,一个新的<filename>IDEA</filename>文件来描述这个概念,然后经过5年20000个修订版本,就像他们都有一个非常浪漫的历史。"
6482 #. (para)
6483 #: ../source/book.xml:6338
6484 msgid "Now, years later, we wonder what the <filename>IDEA</filename> file looked like back in revision 1. But Subversion needs to know if we are asking about how the <emphasis>current</emphasis> file looked back in revision 1, or if we are asking for the contents of whatever file lived at <filename>concepts/IDEA</filename> in revision 1. Certainly those questions have different answers, and because of peg revisions, you can ask either of them. To find out how the current <filename>IDEA</filename> file looked in that old revision, you run:"
6485 msgstr "现在,一年之后,我们想知道<filename>IDEA</filename>在修订版本1时是什么样子,但是Subversion需要知道我们是想询问<emphasis>当前</emphasis>文件在修订版本1时的样子,还是希望知道<filename>concepts/IDEA</filename>在修订版本1时的那个文件?确定这些问题有不同的答案,并且因为peg修订版本,你可以用两种方式询问。为了知道当前的<filename>IDEA</filename>文件在旧版本的样子,我们可以运行:"
6487 #. (screen)
6488 #: ../source/book.xml:6348
6489 #, no-wrap
6490 msgid ""
6491 "\n"
6492 "$ svn cat -r 1 concept/IDEA \n"
6493 "svn: Unable to find repository location for 'concept/IDEA' in revision 1\n"
6494 msgstr ""
6495 "\n"
6496 "$ svn cat -r 1 concept/IDEA \n"
6497 "svn: Unable to find repository location for 'concept/IDEA' in revision 1\n"
6499 #. (para)
6500 #: ../source/book.xml:6352
6501 msgid "Of course, in this example, the current <filename>IDEA</filename> file didn't exist yet in revision 1, so Subversion gives an error. The command above is shorthand for a longer notation which explicitly lists a peg revision. The expanded notation is:"
6502 msgstr "当然,在这个例子里,当前的<filename>IDEA</filename>文件在修订版本1中并不存在,所以Subversion给出一个错误,这个上面的命令是长的peg修订版本命令一个缩写,扩展的写法是:"
6504 #. (screen)
6505 #: ../source/book.xml:6357
6506 #, no-wrap
6507 msgid ""
6508 "\n"
6509 "$ svn cat -r 1 concept/IDEA@BASE\n"
6510 "svn: Unable to find repository location for 'concept/IDEA' in revision 1\n"
6511 msgstr ""
6512 "\n"
6513 "$ svn cat -r 1 concept/IDEA@BASE\n"
6514 "svn: Unable to find repository location for 'concept/IDEA' in revision 1\n"
6516 #. (para)
6517 #: ../source/book.xml:6361
6518 msgid "And when executed, it has the expected results."
6519 msgstr "当执行时,它包含期望的结果。"
6521 #. (para)
6522 #: ../source/book.xml:6362
6523 msgid "The perceptive reader is probably wondering at this point if the peg revision syntax causes problems for working copy paths or URLs that actually have at signs in them. After all, how does <command>svn</command> know whether <literal>news@11</literal> is the name of a directory in my tree, or just a syntax for <quote>revision 11 of <filename>news</filename></quote>? Thankfully, while <command>svn</command> will always assume the latter, there is a trivial workaround. You need only append an at sign to the end of the path, such as <literal>news@11@</literal>. <command>svn</command> only cares about the last at sign in the argument, and it is not considered illegal to omit a literal peg revision specifier after that at sign. This workaround even applies to paths that end in an at sign—you would use <literal>filename@@</literal> to talk about a file named <filename>filename@</filename>."
6524 msgstr "如果工作拷贝路径或URL中确实有一个at记号,peg修订版本语法是否会导致问题?深刻理解的读者可能会产生这样的疑问。毕竟,<command>svn</command>是如何知道<literal>news@11</literal>是我的目录树中的一个目录,还是修订版本11的<filename>news</filename>文件?幸好,<command>svn</command>会一直假定后者。你只需要在路径最后添加一个at符号,例如<literal>news@11@</literal>,<command>svn</command>只关心最后一个at标记,如果遗漏了最后的修订版本号,不会认为不合法。这个法则甚至可以应用到以at结尾的路径—你可以使用<literal>filename@@</literal>来引用<filename>filename@</filename>。"
6526 #. (para)
6527 #: ../source/book.xml:6378
6528 msgid "Let's ask the other question, then—in revision 1, what were the contents of whatever file occupied the address <filename>concepts/IDEA</filename> at the time? We'll use an explicit peg revision to help us out."
6529 msgstr "然后让我们询问另一个问题—在修订版本1 ,占据<filename>concepts/IDEA</filename>路径的文件的内容到底是什么?我们会使用一个明确的peg修订版本来帮助我们完成。"
6531 #. (screen)
6532 #: ../source/book.xml:6382
6533 #, no-wrap
6534 msgid ""
6535 "\n"
6536 "$ svn cat concept/IDEA@1\n"
6537 "The idea behind this project is to come up with a piece of software\n"
6538 "that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6539 "business, and doing it incorrectly can have serious ramifications, so\n"
6540 "we need to employ over-the-top input validation and data verification\n"
6541 "mechanisms.\n"
6542 msgstr ""
6543 "\n"
6544 "$ svn cat concept/IDEA@1\n"
6545 "The idea behind this project is to come up with a piece of software\n"
6546 "that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6547 "business, and doing it incorrectly can have serious ramifications, so\n"
6548 "we need to employ over-the-top input validation and data verification\n"
6549 "mechanisms.\n"
6551 #. (para)
6552 #: ../source/book.xml:6390
6553 msgid "Notice that we didn't provide an operative revision this time. That's because when no operative revision is specified, Subversion assumes a default operative revision that's the same as the peg revision."
6554 msgstr "注意我们这一次没有提供操作修订版本,那是因为如果没有指定操作修订版本,Subversion假定缺省的操作修订版本是peg修订版本。"
6556 #. (para)
6557 #: ../source/book.xml:6394
6558 msgid "As you can see, the output from our operation appears to be correct. The text even mentions frabbing naggily worts, so this is almost certainly the file which describes the software now called Frabnaggilywort. In fact, we can verify this using the combination of an explicit peg revision and explicit operative revision. We know that in <literal>HEAD</literal>, the Frabnaggilywort project is located in the <filename>frabnaggilywort</filename> directory. So we specify that we want to see how the line of history identified in <literal>HEAD</literal> as the path <filename>frabnaggilywort/IDEA</filename> looked in revision 1."
6559 msgstr "正像你看到的,这看起来是正确的输出,这些文本甚至提到“frabbing naggily worts”,所以这就是现在叫做Frabnaggilywort项目的那个文件,实际上,我们可以使用显示的peg修订版本和实施修订版本的组合核实这一点。我们知道在<literal>HEAD</literal>,Frabnaggilywort项目坐落在<filename>frabnaggilywort</filename>目录,所以我们指定我们希望看到<literal>HEAD</literal>的<filename>frabnaggilywort/IDEA</filename>路经在历史上的修订版本1的内容。"
6561 #. (screen)
6562 #: ../source/book.xml:6406
6563 #, no-wrap
6564 msgid ""
6565 "\n"
6566 "$ svn cat -r 1 frabnaggilywort/IDEA@HEAD\n"
6567 "The idea behind this project is to come up with a piece of software\n"
6568 "that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6569 "business, and doing it incorrectly can have serious ramifications, so\n"
6570 "we need to employ over-the-top input validation and data verification\n"
6571 "mechanisms.\n"
6572 msgstr ""
6573 "\n"
6574 "$ svn cat -r 1 frabnaggilywort/IDEA@HEAD\n"
6575 "The idea behind this project is to come up with a piece of software\n"
6576 "that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6577 "business, and doing it incorrectly can have serious ramifications, so\n"
6578 "we need to employ over-the-top input validation and data verification\n"
6579 "mechanisms.\n"
6581 #. (para)
6582 #: ../source/book.xml:6414
6583 msgid "And the peg and operative revisions need not be so trivial, either. For example, say <filename>frabnaggilywort</filename> had been deleted from <literal>HEAD</literal>, but we know it existed in revision 20, and we want to see the diffs for its <filename>IDEA</filename> file between revisions 4 and 10. We can use the peg revision 20 in conjunction with the URL that would have held Frabnaggilywort's <filename>IDEA</filename> file in revision 20, and then use 4 and 10 as our operative revision range."
6584 msgstr "而且peg修订版本和实施修订版本也不需要这样琐碎,举个例子,我们的<filename>frabnaggilywort</filename>已经在<literal>HEAD</literal>删除,但我们知道在修订版本20它是存在的,我们希望知道<filename>IDEA</filename>从修订版本4到10的区别,我们可以使用peg修订版本20和<filename>IDEA</filename>文件的修订版本20的URL的组合,然后使用4到10作为我们的实施修订版本范围。"
6586 #. (screen)
6587 #: ../source/book.xml:6423
6588 #, no-wrap
6589 msgid ""
6590 "\n"
6591 "$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20\n"
6592 "Index: frabnaggilywort/IDEA\n"
6593 "===================================================================\n"
6594 "--- frabnaggilywort/IDEA\t(revision 4)\n"
6595 "+++ frabnaggilywort/IDEA\t(revision 10)\n"
6596 "@@ -1,5 +1,5 @@\n"
6597 "-The idea behind this project is to come up with a piece of software\n"
6598 "-that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6599 "-business, and doing it incorrectly can have serious ramifications, so\n"
6600 "-we need to employ over-the-top input validation and data verification\n"
6601 "-mechanisms.\n"
6602 "+The idea behind this project is to come up with a piece of\n"
6603 "+client-server software that can remotely frab a naggily wort.\n"
6604 "+Frabbing naggily worts is tricky business, and doing it incorrectly\n"
6605 "+can have serious ramifications, so we need to employ over-the-top\n"
6606 "+input validation and data verification mechanisms.\n"
6607 msgstr ""
6608 "\n"
6609 "$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20\n"
6610 "Index: frabnaggilywort/IDEA\n"
6611 "===================================================================\n"
6612 "--- frabnaggilywort/IDEA\t(revision 4)\n"
6613 "+++ frabnaggilywort/IDEA\t(revision 10)\n"
6614 "@@ -1,5 +1,5 @@\n"
6615 "-The idea behind this project is to come up with a piece of software\n"
6616 "-that can frab a naggily wort.  Frabbing naggily worts is tricky\n"
6617 "-business, and doing it incorrectly can have serious ramifications, so\n"
6618 "-we need to employ over-the-top input validation and data verification\n"
6619 "-mechanisms.\n"
6620 "+The idea behind this project is to come up with a piece of\n"
6621 "+client-server software that can remotely frab a naggily wort.\n"
6622 "+Frabbing naggily worts is tricky business, and doing it incorrectly\n"
6623 "+can have serious ramifications, so we need to employ over-the-top\n"
6624 "+input validation and data verification mechanisms.\n"
6626 #. (para)
6627 #: ../source/book.xml:6441
6628 msgid "Fortunately, most folks aren't faced with such complex situations. But when you are, remember that peg revisions are that extra hint Subversion needs to clear up ambiguity."
6629 msgstr "幸运的是,几乎所有的人不会面临如此复杂的情形,但是如果是,记住peg修订版本是帮助Subversion清除混淆的额外提示。"
6631 #. (title)
6632 #: ../source/book.xml:6450
6633 msgid "Network Model"
6634 msgstr "网络模型"
6636 #. (para)
6637 #: ../source/book.xml:6452
6638 msgid "At some point, you're going to need to understand how your Subversion client communicates with its server. Subversion's networking layer is abstracted, meaning that Subversion clients exhibit the same general behaviors no matter what sort of server they are operating against. Whether speaking the HTTP protocol (<literal>http://</literal>) with the Apache HTTP Server or speaking the custom Subversion protocol (<literal>svn://</literal>) with <command>svnserve</command>, the basic network model is the same. In this section, we'll explain the basics of that network model, including how Subversion manages authentication and authorization matters."
6639 msgstr "在某些情况下,你需要理解Subversion客户端如何与服务器通讯。Subversion网络层是抽象的,意味着Subversion客户端不管其操作的对象都会使用相同的行为方式,不管是使用HTTP协议(<literal>http://</literal>)与Apache HTTP服务器通讯或是使用自定义Subversion协议(<literal>svn://</literal>)与<command>svnserve</command>通讯,基本的网络模型是相同的。在本小节,我们要解释网络模型基础,包括Subversion如何管理认证和授权信息。"
6641 #. (title)
6642 #: ../source/book.xml:6467
6643 msgid "Requests and Responses"
6644 msgstr "请求和响应"
6646 #. (para)
6647 #: ../source/book.xml:6469
6648 msgid "The Subversion client spends most of its time managing working copies. When it needs information from a remote repository, however, it makes a network request, and the server responds with an appropriate answer. The details of the network protocol are hidden from the user—the client attempts to access a URL, and depending on the URL scheme, a particular protocol is used to contact the server (see <xref linkend=\"svn.basic.in-action.wc.sb-1\"/>)."
6649 msgstr "Subversion客户端花费大量的时间来管理工作拷贝,当它需要远程版本库的信息,它会做一个网络请求,然后服务器给一个恰当的回答,具体的网络协议细节对用户不可见,客户端尝试去访问一个URL,根据URL模式的不同,会使用特定的协议与服务器联系(见<xref linkend=\"svn.basic.in-action.wc.sb-1\"/>)。"
6651 #. (para)
6652 #: ../source/book.xml:6477
6653 msgid "Run <command>svn --version</command> to see which URL schemes and protocols the client knows how to use."
6654 msgstr "用户可以运行<command>svn --version</command>来查看客户端可以使用的URL模式和协议。"
6656 #. (para)
6657 #: ../source/book.xml:6481
6658 msgid "When the server process receives a client request, it often demands that the client identify itself. It issues an authentication challenge to the client, and the client responds by providing <firstterm>credentials</firstterm> back to the server. Once authentication is complete, the server responds with the original information the client asked for. Notice that this system is different from systems like CVS, where the client pre-emptively offers credentials (<quote>logs in</quote>) to the server before ever making a request. In Subversion, the server <quote>pulls</quote> credentials by challenging the client at the appropriate moment, rather than the client <quote>pushing</quote> them. This makes certain operations more elegant. For example, if a server is configured to allow anyone in the world to read a repository, then the server will never issue an authentication challenge when a client attempts to <command>svn checkout</command>."
6659 msgstr "当服务器处理一个客户端请求,它通常会要求客户端确定它自己的身份,它会发出一个认证请求给客户端,而客户端通过提供<firstterm>凭证</firstterm>给服务器作为响应,一旦认证结束,服务器会响应客户端最初请求的信息。注意这个系统与CVS之类的系统不一样,它们会在请求之前,预先提供凭证(<quote>logs in</quote>)给服务器,在Subversion里,服务器通过请求客户端适时地<quote>拖入</quote>凭证,而不是客户端<quote>推</quote>出,这使得这种操作更加的优雅。例如,如果一个服务器配置为世界上的任何人都可以读取版本库,在客户使用<command>svn checkout</command>时,服务器永远不会发起一个认证请求。"
6661 #. (para)
6662 #: ../source/book.xml:6497
6663 msgid "If the particular network requests issued by the client result in a new revision being created in the repository, (e.g. <command>svn commit</command>), then Subversion uses the authenticated username associated with those requests as the author of the revision. That is, the authenticated user's name is stored as the value of the <literal>svn:author</literal> property on the new revision (see <xref linkend=\"svn.ref.properties\"/>). If the client was not authenticated (in other words, the server never issued an authentication challenge), then the revision's <literal>svn:author</literal> property is empty."
6664 msgstr "如果客户端的请求会在版本库创建新的修订版本(例如<command>svn commit</command>),Subversion就会使用认证过的用户名作为此次提交的作者。也就是说经过认证的用户名作为<literal>svn:author</literal>属性的值保存到新的修订本里(见<xref linkend=\"svn.ref.properties\"/>)。如果客户端没有经过认证(换句话说,服务器没有发起过认证请求),这时修订本的<literal>svn:author</literal>的值是空的。"
6666 #. (title)
6667 #: ../source/book.xml:6513
6668 msgid "Client Credentials Caching"
6669 msgstr "客户端凭证缓存"
6671 #. (para)
6672 #: ../source/book.xml:6515
6673 msgid "Many servers are configured to require authentication on every request. This would be a big annoyance to users, if they were forced to type their passwords over and over again. Fortunately, the Subversion client has a remedy for this—a built-in system for caching authentication credentials on disk. By default, whenever the command-line client successfully responds to a server's authentication challenge, it saves the credentials in the user's private runtime configuration area (<filename>~/.subversion/auth/</filename> on Unix-like systems or <filename>%APPDATA%/Subversion/auth/</filename> on Windows; see <xref linkend=\"svn.advanced.confarea\"/> for more details about the runtime configuration system). Successful credentials are cached on disk, keyed on a combination of the server's hostname, port, and authentication realm."
6674 msgstr "许多服务器配置为每次请求要求认证,对被强制每次输入用户名密码,许多用户会感到很讨厌。幸运的是,Subversion客户端对此有一个修补—存在一个在磁盘上保存认证凭证缓存的系统,缺省情况下,当一个命令行客户端成功的响应了服务器的认证请求,它会保存一个认证文件到用户的私有运行配置区(类Unix系统下会在<filename>~/.subversion/auth/</filename>,Windows下在<filename>%APPDATA%/Subversion/auth/</filename>,运行配置系统在<xref linkend=\"svn.advanced.confarea\"/>会有更多细节描述)。成功的凭证会缓存在磁盘,以主机名、端口和认证域的组合作为唯一性区别。"
6676 #. (para)
6677 #: ../source/book.xml:6530
6678 msgid "When the client receives an authentication challenge, it first looks for the appropriate credentials in the user's disk cache. If seemingly suitable credentials are not present, or if the cached credentials ultimately fail to authenticate, then the client will, by default, fall back to prompting the user for the necessary information."
6679 msgstr "当客户端接收到一个认证请求,它会首先查找用户磁盘中的认证凭证缓存,如果没有发现,或者是缓存的凭证认证失败,客户端会提示用户提供需要的信息。"
6681 #. (para)
6682 #: ../source/book.xml:6536
6683 msgid "The security-conscious reader will suspect immediately that there is reason for concern here. <quote>Caching passwords on disk? That's terrible! You should never do that!</quote>"
6684 msgstr "十分关心安全的人们一定会想<quote>把密码缓存在磁盘?太可怕了,永远不要这样做!</quote>"
6686 #. (para)
6687 #: ../source/book.xml:6540
6688 msgid "The Subversion developers recognize the legitimacy of such concerns, and so Subversion works with available mechanisms provided by the operating system and environment to try to minimize the risk of leaking this information. Here's a breakdown of what this means for users on the most common platforms:"
6689 msgstr "Subversion开发者认识到这种关注的正确性,所以Subversion使用操作系统和环境提供的机制来减少泄露这些信息的风险,下面是在大多数平台上这种含义的列表:"
6691 #. (para)
6692 #: ../source/book.xml:6548
6693 msgid "On Windows 2000 and later, the Subversion client uses standard Windows cryptography services to encrypt the password on disk. Because the encryption key is managed by Windows and is tied to the user's own login credentials, only the user can decrypt the cached password. (Note that if the user's Windows account password is reset by an administrator, all of the cached passwords become undecipherable. The Subversion client will behave as if they don't exist, prompting for passwords when required.)"
6694 msgstr "在Windows 2000或更新的系统上,Subversion客户端使用标准Windows加密服务来加密磁盘上的密码。因为加密密钥是Windows管理的,与用户的登陆凭证相关,只有用户可以解密密码。(注意:如果用户的Windows账户密码被管理员重置,所有的缓存密码就不可以解密了,此时Subversion客户端就会当它们根本不存在,在需要时继续询问密码。)"
6696 #. (para)
6697 #: ../source/book.xml:6560
6698 msgid "Similarly, on Mac OS X, the Subversion client stores all repository passwords in the login keyring (managed by the Keychain service), which is protected by the user's account password. User preference settings can impose additional policies, such as requiring the user's account password be entered each time the Subversion password is used."
6699 msgstr "类似的,在Mac OS X,Subversion客户端在登陆keyring(使用Keychain管理)保存了所有的版本库密码,使用户用帐号密码保护。用户选择的设置可以强加额外的政策,例如在需要用户密码时要求输入用户帐号密码。"
6701 #. (para)
6702 #: ../source/book.xml:6569
6703 msgid "For other Unix-like operating systems, no standard <quote>keychain</quote> services exist. However, the <filename>auth/</filename> caching area is still permission-protected so that only the user (owner) can read data from it, not the world at large. The operating system's own file permissions protect the passwords."
6704 msgstr "对于其他类Unix系统,没有标准的加密服务。然而<filename>auth/</filename>缓存区只有用户(拥有者)可以访问,而不是全世界都可以,操作系统的访问许可可以保护密码文件。"
6706 #. (para)
6707 #: ../source/book.xml:6577
6708 msgid "Of course, for the truly paranoid, none of these mechanisms meets the test of perfection. So for those folks willing to sacrifice convenience for the ultimate security, Subversion provides various ways of disabling its credentials caching system altogether."
6709 msgstr "当然,对于真正的妄想狂,没有任何机制是完美的。这类人希望用无限的安全来牺牲便利性,Subversion提供了各种方法来完全关闭凭证缓存。"
6711 #. (para)
6712 #: ../source/book.xml:6582
6713 msgid "To disable caching for a single command, pass the <option>--no-auth-cache</option> option:"
6714 msgstr "你可以关闭凭证缓存,只需要一个简单的命令,使用参数<option>--no-auth-cache</option>:"
6716 #. (screen)
6717 #: ../source/book.xml:6584
6718 #, no-wrap
6719 msgid ""
6720 "\n"
6721 "$ svn commit -F log_msg.txt --no-auth-cache\n"
6722 "Authentication realm: &lt;svn://host.example.com:3690&gt; example realm\n"
6723 "Username:  joe\n"
6724 "Password for 'joe':\n"
6725 "\n"
6726 "Adding         newfile\n"
6727 "Transmitting file data .\n"
6728 "Committed revision 2324.\n"
6729 "\n"
6730 "# password was not cached, so a second commit still prompts us\n"
6731 "\n"
6732 "$ svn delete newfile\n"
6733 "$ svn commit -F new_msg.txt\n"
6734 "Authentication realm: &lt;svn://host.example.com:3690&gt; example realm\n"
6735 "Username:  joe\n"
6736 "…\n"
6737 msgstr ""
6738 "\n"
6739 "$ svn commit -F log_msg.txt --no-auth-cache\n"
6740 "Authentication realm: &lt;svn://host.example.com:3690&gt; example realm\n"
6741 "Username:  joe\n"
6742 "Password for 'joe':\n"
6743 "\n"
6744 "Adding         newfile\n"
6745 "Transmitting file data .\n"
6746 "Committed revision 2324.\n"
6747 "\n"
6748 "# password was not cached, so a second commit still prompts us\n"
6749 "\n"
6750 "$ svn delete newfile\n"
6751 "$ svn commit -F new_msg.txt\n"
6752 "Authentication realm: &lt;svn://host.example.com:3690&gt; example realm\n"
6753 "Username:  joe\n"
6754 "…\n"
6756 #. (para)
6757 #: ../source/book.xml:6602
6758 msgid "Or, if you want to disable credential caching permanently, you can edit the <filename>config</filename> file in your runtime configuration area, and set the <option>store-auth-creds</option> option to <literal>no</literal>. This will prevent the storing of credentials used in any Subversion interactions you perform on the affected computer. This can be extended to cover all users on the computer, too, by modifying the system-wide runtime configuration area (described in <xref linkend=\"svn.advanced.confarea.layout\"/>)."
6759 msgstr "或许,你希望永远关闭凭证缓存,你可以编辑你的运行运行配置区的<filename>config</filename>文件,只需要把<literal>store-auth-creds</literal>设置为<literal>no</literal>,这样在影响的主机上的Subversion操作就不会有凭证缓存在磁盘。通过修改系统级的运行配置区,这个功能也会影响到本机的所有用户(详细内容见<xref linkend=\"svn.advanced.confarea.layout\"/>)。"
6761 #. (screen)
6762 #: ../source/book.xml:6611
6763 #, no-wrap
6764 msgid ""
6765 "\n"
6766 "[auth]\n"
6767 "store-auth-creds = no\n"
6768 msgstr ""
6769 "\n"
6770 "[auth]\n"
6771 "store-auth-creds = no\n"
6773 #. (para)
6774 #: ../source/book.xml:6615
6775 msgid "Sometimes users will want to remove specific credentials from the disk cache. To do this, you need to navigate into the <filename>auth/</filename> area and manually delete the appropriate cache file. Credentials are cached in individual files; if you look inside each file, you will see keys and values. The <literal>svn:realmstring</literal> key describes the particular server realm that the file is associated with:"
6776 msgstr "有时候,用户希望从磁盘缓存删除特定的凭证,为此你可以浏览到<filename>auth/</filename>区域,删除特定的缓存文件,凭证都是作为一个单独的文件缓存,如果你打开每一个文件,你会看到键和值,<literal>svn:realmstring</literal>描述了这个文件关联的特定服务器的域:"
6778 #. (screen)
6779 #: ../source/book.xml:6623
6780 #, no-wrap
6781 msgid ""
6782 "\n"
6783 "$ ls ~/.subversion/auth/svn.simple/\n"
6784 "5671adf2865e267db74f09ba6f872c28\n"
6785 "3893ed123b39500bca8a0b382839198e\n"
6786 "5c3c22968347b390f349ff340196ed39\n"
6787 "\n"
6788 "$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28\n"
6789 "\n"
6790 "K 8\n"
6791 "username\n"
6792 "V 3\n"
6793 "joe\n"
6794 "K 8\n"
6795 "password\n"
6796 "V 4\n"
6797 "blah\n"
6798 "K 15\n"
6799 "svn:realmstring\n"
6800 "V 45\n"
6801 "&lt;https://svn.domain.com:443&gt; Joe's repository\n"
6802 "END\n"
6803 msgstr ""
6804 "\n"
6805 "$ ls ~/.subversion/auth/svn.simple/\n"
6806 "5671adf2865e267db74f09ba6f872c28\n"
6807 "3893ed123b39500bca8a0b382839198e\n"
6808 "5c3c22968347b390f349ff340196ed39\n"
6809 "\n"
6810 "$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28\n"
6811 "\n"
6812 "K 8\n"
6813 "username\n"
6814 "V 3\n"
6815 "joe\n"
6816 "K 8\n"
6817 "password\n"
6818 "V 4\n"
6819 "blah\n"
6820 "K 15\n"
6821 "svn:realmstring\n"
6822 "V 45\n"
6823 "&lt;https://svn.domain.com:443&gt; Joe's repository\n"
6824 "END\n"
6826 #. (para)
6827 #: ../source/book.xml:6645
6828 msgid "Once you have located the proper cache file, just delete it."
6829 msgstr "一旦你定位了正确的缓存文件,只需要删除它。"
6831 #. (para)
6832 #: ../source/book.xml:6658
6833 msgid "Again, a common mistake is to misconfigure a server so that it never issues an authentication challenge. When users pass <option>--username</option> and <option>--password</option> options to the client, they're surprised to see that they're never used, i.e. new revisions still appear to have been committed anonymously!"
6834 msgstr "再次重申,一个常见的错误是把服务器配置为从不会请求认证,当用户传递<option>--username</option>和<option>--password</option>给客户端时,他们惊奇的发现它们没有被使用,如新的修订版本看起来始终是由匿名用户提交的!"
6836 #. (para)
6837 #: ../source/book.xml:6647
6838 msgid "One last word about <command>svn</command>'s authentication behavior, specifically regarding the <option>--username</option> and <option>--password</option> options. Many client subcommands accept these options, but it is important to understand using these options does <emphasis>not</emphasis> automatically send credentials to the server. As discussed earlier, the server <quote>pulls</quote> credentials from the client when it deems necessary; the client cannot <quote>push</quote> them at will. If a username and/or password are passed as options, they will only be presented to the server if the server requests them. <placeholder-1/> These options are typically used to authenticate as a different user than Subversion would have chosen by default (such as your system login name), or when trying to avoid interactive prompting (such as when calling <command>svn</command> from a script)."
6839 msgstr "<command>svn</command认证的行为的最后一点,对使用<option>--username</option>和<option>--password</option>选项的一点说明,许多客户端和子命令接受这个选项,但是要明白使用这个选项<emphasis>不会</emphasis>主动地发送凭证信息到服务器,就像前面讨论过的,服务器会在需要的时候才会从客户端<quote>拖</quote>入凭证,客户端不会随意<quote>推</quote>出。如果一个用户名和/或密码作为选项传入,它们<emphasis>只会</emphasis>在服务器需要时才展现给服务器。<placeholder-1/>通常,只有在使用非缺省用户(例如系统登陆名)进行认证,或者是为了防止交互式输入(例如在脚本里调用<command>svn</command>)时,才会使用这些选项。"
6841 #. (para)
6842 #: ../source/book.xml:6671
6843 msgid "Here is a final summary that describes how a Subversion client behaves when it receives an authentication challenge."
6844 msgstr "这里是Subversion客户端在收到认证请求的时候的行为方式最终总结:"
6846 #. (para)
6847 #: ../source/book.xml:6676
6848 msgid "First, the client checks whether the user specified any credentials as command-line options (<option>--username</option> and/or <option>--password</option>). If not, or if these options fail to authenticate successfully, then"
6849 msgstr "首先,检查用户是否通过命令选项(<option>--username</option>和/或<option>--password</option>)指定了任何凭证信息,如果没有,或者这些选项没有认证成功,然后"
6851 #. (para)
6852 #: ../source/book.xml:6683
6853 msgid "the client looks up the server's hostname, port, and realm in the runtime <filename>auth/</filename> area, to see if the user already has the appropriate credentials cached. If not, or if the cached credentials fail to authenticate, then"
6854 msgstr "查找运行中的<filename>auth/</filename>区域保存的服务器名,端口和认证域信息,来确定用户是否已经有了恰当的认证缓存,如果没有,或者缓存凭证认证失败,然后"
6856 #. (para)
6857 #: ../source/book.xml:6690
6858 msgid "finally, the client resorts to prompting the user (unless instructed not to do so via the <option>--non-interactive</option> option or its client-specific equivalents)."
6859 msgstr "最终,客户端返回要求用户(除非使用<option>--non-interactive</option>选项或客户端对等的方式)。"
6861 #. (para)
6862 #: ../source/book.xml:6696
6863 msgid "If the client successfully authenticates by any of the methods listed above, it will attempt to cache the credentials on disk (unless the user has disabled this behavior, as mentioned earlier)."
6864 msgstr "如果客户端通过以上的任何一种方式成功认证,它会尝试在磁盘缓存凭证(除非用户已经关闭了这种行为方式,在前面提到过。)"
6866 #. (title)
6867 #: ../source/book.xml:6710
6868 msgid "Branching and Merging"
6869 msgstr "分支与合并"
6871 #. (attribution)
6872 #: ../source/book.xml:6713
6873 msgid "Confucius"
6874 msgstr "孔子"
6876 #. (quote)
6877 #: ../source/book.xml:6715
6878 msgid "君子务本 (It is upon the Trunk that a gentleman works.)"
6879 msgstr "君子务本"
6881 #. (para)
6882 #: ../source/book.xml:6719
6883 msgid "Branching, tagging, and merging are concepts common to almost all version control systems. If you're not familiar with these ideas, we provide a good introduction in this chapter. If you are familiar, then hopefully you'll find it interesting to see how Subversion implements these ideas."
6884 msgstr "分支、标签和合并是所有版本控制系统的共同概念,如果你并不熟悉这些概念,我们会在这一章里很好的介绍,如果你很熟悉,非常希望你有兴趣知道Subversion是怎样实现这些概念的。"
6886 #. (para)
6887 #: ../source/book.xml:6724
6888 msgid "Branching is a fundamental part of version control. If you're going to allow Subversion to manage your data, then this is a feature you'll eventually come to depend on. This chapter assumes that you're already familiar with Subversion's basic concepts (<xref linkend=\"svn.basic\"/>)."
6889 msgstr "分支是版本控制的基础组成部分,如果你允许Subversion来管理你的数据,这个特性将是你所必须依赖的 ,这一章假定你已经熟悉了Subversion的基本概念(<xref linkend=\"svn.basic\"/>)。"
6891 #. (title)
6892 #: ../source/book.xml:6734
6893 msgid "What's a Branch?"
6894 msgstr "什么是分支?"
6896 #. (para)
6897 #: ../source/book.xml:6736
6898 msgid "Suppose it's your job to maintain a document for a division in your company, a handbook of some sort. One day a different division asks you for the same handbook, but with a few parts <quote>tweaked</quote> for them, since they do things slightly differently."
6899 msgstr "假设你的工作是维护本公司一个部门的手册文档,一天,另一个部门问你要相同的手册,但一些地方会有<quote>区别</quote>,因为他们有不同的需要。"
6901 #. (para)
6902 #: ../source/book.xml:6741
6903 msgid "What do you do in this situation? You do the obvious thing: you make a second copy of your document, and begin maintaining the two copies separately. As each department asks you to make small changes, you incorporate them into one copy or the other."
6904 msgstr "这种情况下你会怎样做?显而易见的方法是:作一个版本的拷贝,然后分别维护两个版本,只要任何一个部门告诉要做一些小修改,你必须选择在对应的版本进行更改。"
6906 #. (para)
6907 #: ../source/book.xml:6746
6908 msgid "You often want to make the same change to both copies. For example, if you discover a typo in the first copy, it's very likely that the same typo exists in the second copy. The two documents are almost the same, after all; they only differ in small, specific ways."
6909 msgstr "你也许希望在两个版本同时作修改,举个例子,你在第一个版本发现了一个拼写错误,很显然这个错误也会出现在第二个版本里。两份文档几乎相同,毕竟,只有许多特定的微小区别。"
6911 #. (para)
6912 #: ../source/book.xml:6751
6913 msgid "This is the basic concept of a <firstterm>branch</firstterm>—namely, a line of development that exists independently of another line, yet still shares a common history if you look far enough back in time. A branch always begins life as a copy of something, and moves on from there, generating its own history (see <xref linkend=\"svn.branchmerge.whatis.dia-1\"/>)."
6914 msgstr "这是<firstterm>分支</firstterm>的基本概念—正如它的名字,开发的一条线独立于另一条线,如果回顾历史,可以发现两条线分享共同的历史,一个分支总是从一个备份开始的,从那里开始,发展自己独有的历史(见 <xref linkend=\"svn.branchmerge.whatis.dia-1\"/>)。"
6916 #. (title)
6917 #: ../source/book.xml:6759
6918 msgid "Branches of development"
6919 msgstr "分支与开发"
6921 #. (para)
6922 #: ../source/book.xml:6767
6923 msgid "Subversion has commands to help you maintain parallel branches of your files and directories. It allows you to create branches by copying your data, and remembers that the copies are related to one another. It also helps you duplicate changes from one branch to another. Finally, it can make portions of your working copy reflect different branches, so that you can <quote>mix and match</quote> different lines of development in your daily work."
6924 msgstr "Subversion允许你并行的维护文件和目录的分支,它允许你通过拷贝数据建立分支,记住,分支互相联系,它也帮助你从一个分支复制修改到另一个分支。最终,它可以让你的工作拷贝反映到不同的分支上,所以你在日常工作可以<quote>混合和比较</quote>不同的开发线。"
6926 #. (title)
6927 #: ../source/book.xml:6781
6928 msgid "Using Branches"
6929 msgstr "使用分支"
6931 #. (para)
6932 #: ../source/book.xml:6783
6933 msgid "At this point, you should understand how each commit creates an entire new filesystem tree (called a <quote>revision</quote>) in the repository. If not, go back and read about revisions in <xref linkend=\"svn.basic.in-action.revs\"/>."
6934 msgstr "在这一点上,你必须理解每一次提交是怎样建立整个新的文件系统树(叫做<quote>修订版本</quote>)的,如果没有,可以回头去读<xref linkend=\"svn.basic.in-action.revs\"/>。"
6936 #. (para)
6937 #: ../source/book.xml:6787
6938 msgid "For this chapter, we'll go back to the same example from <xref linkend=\"svn.basic\"/>. Remember that you and your collaborator, Sally, are sharing a repository that contains two projects, <filename>paint</filename> and <filename>calc</filename>. Notice that in <xref linkend=\"svn.branchmerge.using.dia-1\"/>, however, each project directory now contains subdirectories named <filename>trunk</filename> and <filename>branches</filename>. The reason for this will soon become clear."
6939 msgstr "对于本章节,我们会回到<xref linkend=\"svn.basic\"/>的同一个例子,还记得你和你的合作者Sally分享一个包含两个项目的版本库,<filename>paint</filename>和<filename>calc</filename>。注意<xref linkend=\"svn.branchmerge.using.dia-1\"/>,然而,现在每个项目的都有一个<filename>trunk</filename>和<filename>branches</filename>子目录,它们存在的理由很快就会清晰起来。"
6941 #. (title)
6942 #: ../source/book.xml:6797
6943 msgid "Starting repository layout"
6944 msgstr "开始规划版本库"
6946 #. (para)
6947 #: ../source/book.xml:6805
6948 msgid "As before, assume that Sally and you both have working copies of the <quote>calc</quote> project. Specifically, you each have a working copy of <filename>/calc/trunk</filename>. All the files for the project are in this subdirectory rather than in <filename>/calc</filename> itself, because your team has decided that <filename>/calc/trunk</filename> is where the <quote>main line</quote> of development is going to take place."
6949 msgstr "像以前一样,假定Sally和你都有<quote>calc</quote>项目的一份拷贝,更准确地说,你有一份<filename>/calc/trunk</filename>的工作拷贝,这个项目的所有的文件在这个子目录里,而不是在<filename>/calc</filename>下,因为你的小组决定使用<filename>/calc/trunk</filename>作为开发使用的<quote>主线</quote>。"
6951 #. (para)
6952 #: ../source/book.xml:6813
6953 #, fuzzy
6954 msgid "Let's say that you've been given the task of implementing a large software feature. It will take a long time to write, and will affect all the files in the project. The immediate problem is that you don't want to interfere with Sally, who is in the process of fixing small bugs here and there. She's depending on the fact that the latest version of the project (in <filename>/calc/trunk</filename>) is always usable. If you start committing your changes bit-by-bit, you'll surely break things for Sally (and other team members as well.)"
6955 msgstr "假定你有一个任务,将要对项目做基本的重新组织,这需要花费大量时间来完成,会影响项目的所有文件,问题是你不会希望打扰Sally,她正在处理这样或那样的程序小Bug,一直使用整个项目(<filename moreinfo=\"none\">/calc/trunk</filename>)的最新版本,如果你一点一点的提交你的修改,你一定会干扰Sally的工作。"
6957 #. (para)
6958 #: ../source/book.xml:6822
6959 #, fuzzy
6960 msgid "One strategy is to crawl into a hole: you and Sally can stop sharing information for a week or two. That is, start gutting and reorganizing all the files in your working copy, but don't commit or update until you're completely finished with the task. There are a number of problems with this, though. First, it's not very safe. Most people like to save their work to the repository frequently, should something bad accidentally happen to their working copy. Second, it's not very flexible. If you do your work on different computers (perhaps you have a working copy of <filename>/calc/trunk</filename> on two different machines), you'll need to manually copy your changes back and forth, or just do all the work on a single computer. By that same token, it's difficult to share your changes-in-progress with anyone else. A common software development <quote>best practice</quote> is to allow your peers to review your work as you go. If nobody sees your intermediate commits, you lose potential feedback, and may end up going down the wrong path for weeks before another person on your team notices. Finally, when you're finished with all your changes, you might find it very difficult to re-merge your final work with the rest of the company's main body of code. Sally (or others) may have made many other changes in the repository that are difficult to incorporate into your working copy—especially if you run <command>svn update</command> after weeks of isolation."
6961 msgstr "一种策略是自己闭门造车:你和Sally可以停止一个到两个星期的共享,也就是说,开始作出本质上的修改和重新组织工作拷贝的文件,但是在完成这个任务之前不做提交和更新。这样会有很多问题,首先,这样并不安全,许多人习惯频繁的保存修改到版本库,工作拷贝一定有许多意外的修改。第二,这样并不灵活,如果你的工作在不同的计算机(或许你在不同的机器有两份<filename>/calc/trunk</filename>的工作拷贝),你需要手工的来回拷贝修改,或者只在一个计算机上工作,这时很难做到共享你即时的修改,一项软件开发的<quote>最佳实践</quote>就是允许审核你做过的工作,如果没有人看到你的提交,你失去了潜在的反馈。最后,当你完成了公司主干代码的修改工作,你会发现合并你的工作拷贝和公司的主干代码会是一件非常困难的事情,Sally(或者其他人)也许已经对版本库做了许多修改,已经很难和你的工作拷贝结合—当你单独工作几周后运行<command>svn update</command>时就会发现这一点。"
6963 #. (para)
6964 #: ../source/book.xml:6847
6965 #, fuzzy
6966 msgid "The better solution is to create your own branch, or line of development, in the repository. This allows you to save your half-broken work frequently without interfering with others, yet you can still selectively share information with your collaborators. You'll see exactly how this works as we go."
6967 msgstr "最佳方案是创建你自己的分支,或者是版本库的开发线。这允许你保存破坏了一半的工作而不打扰别人,尽管你仍可以选择性的同你的合作者分享信息,你将会看到这是怎样工作的。"
6969 #. (title)
6970 #: ../source/book.xml:6856
6971 msgid "Creating a Branch"
6972 msgstr "创建分支"
6974 #. (para)
6975 #: ../source/book.xml:6858
6976 msgid "Creating a branch is very simple—you make a copy of the project in the repository using the <command>svn copy</command> command. Subversion is not only able to copy single files, but whole directories as well. In this case, you want to make a copy of the <filename>/calc/trunk</filename> directory. Where should the new copy live? Wherever you wish—it's a matter of project policy. Let's say that your team has a policy of creating branches in the <filename>/calc/branches</filename> area of the repository, and you want to name your branch <literal>my-calc-branch</literal>. You'll want to create a new directory, <filename>/calc/branches/my-calc-branch</filename>, which begins its life as a copy of <filename>/calc/trunk</filename>."
6977 msgstr "建立分支非常的简单—使用<command>svn copy</command>命令给你的工程做个拷贝,Subversion不仅可以拷贝单个文件,也可以拷贝整个目录,在目前情况下,你希望作<filename>/calc/trunk</filename>的拷贝,新的拷贝应该在哪里?在你希望的任何地方—它只是在于项目的政策,我们假设你们项目的政策是在<filename>/calc/branches</filename>建立分支,并且你希望把你的分支叫做<literal>my-calc-branch</literal>,你希望建立一个新的目录<filename>/calc/branches/my-calc-branch</filename>,作为/calc/trunk的拷贝开始它的生命周期。"
6979 #. (para)
6980 #: ../source/book.xml:6873
6981 msgid "At this point, you might have seen <command>svn copy</command> used to copy one file to another within a working copy. But it can also be used to do a <quote>remote</quote> copy entirely within the repository. Just copy one URL to another:"
6982 msgstr ""
6984 #. (screen)
6985 #: ../source/book.xml:6878
6986 #, no-wrap
6987 msgid ""
6988 "\n"
6989 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
6990 "           http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
6991 "      -m \"Creating a private branch of /calc/trunk.\"\n"
6992 "\n"
6993 "Committed revision 341.\n"
6994 msgstr ""
6995 "\n"
6996 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
6997 "           http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
6998 "      -m \"Creating a private branch of /calc/trunk.\"\n"
6999 "\n"
7000 "Committed revision 341.\n"
7002 #. (para)
7003 #: ../source/book.xml:6890
7004 msgid "Subversion does not support copying between different repositories. When using URLs with <command>svn copy</command> or <command>svn move</command>, you can only copy items within the same repository."
7005 msgstr "Subversion不支持跨版本库的拷贝,当使用<command>svn copy</command>或者<command>svn move</command>直接操作URL时你只能在同一个版本库内操作。"
7007 #. (para)
7008 #: ../source/book.xml:6885
7009 msgid "This command causes a near-instantaneous commit in the repository, creating a new directory in revision 341. The new directory is a copy of <filename>/calc/trunk</filename>. This is shown in <xref linkend=\"svn.branchmerge.using.create.dia-1\"/>. <placeholder-1/> While it's also possible to create a branch by using <command>svn copy</command> to duplicate a directory within the working copy, this technique isn't recommended. It can be quite slow, in fact! Copying a directory on the client-side is a linear-time operation, in that it actually has to duplicate every file and subdirectory on local disk. Copying a directory on the server, however, is a constant-time operation, and it's the way most people create branches."
7010 msgstr ""
7012 #. (title)
7013 #: ../source/book.xml:6906
7014 msgid "Repository with new copy"
7015 msgstr "版本库与复制"
7017 #. (title)
7018 #: ../source/book.xml:6916
7019 msgid "Cheap Copies"
7020 msgstr "廉价复制"
7022 #. (para)
7023 #: ../source/book.xml:6918
7024 #, fuzzy
7025 msgid "Subversion's repository has a special design. When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an <emphasis>existing</emphasis> tree. If you're an experienced Unix user, you'll recognize this as the same concept behind a hard-link. As further changes are made to files and directories beneath the copied directory, Subversion continues to employ this hard-link concept where it can. It only duplicates data when it is necessary to disambiguate different versions of objects."
7026 msgstr "Subversion的版本库有特殊的设计,当你复制一个目录,你不需要担心版本库会变得十分巨大—Subversion并不是拷贝所有的数据,相反,它建立了一个<emphasis>已存在</emphasis>目录树的入口,如果你是Unix用户,可以把它理解成硬链接,在对拷贝的文件和目录操作之前,Subversion还仅仅把它当作硬链接,只有为了区分不同版本的对象时才会复制数据。"
7028 #. (para)
7029 #: ../source/book.xml:6929
7030 #, fuzzy
7031 msgid "This is why you'll often hear Subversion users talk about <quote>cheap copies</quote>. It doesn't matter how large the directory is—it takes a very tiny, constant amount of time and space to make a copy of it. In fact, this feature is the basis of how commits work in Subversion: each revision is a <quote>cheap copy</quote> of the previous revision, with a few items lazily changed within. (To read more about this, visit Subversion's website and read about the <quote>bubble up</quote> method in Subversion's design documents.)"
7032 msgstr "这就是为什么经常听到Subversion用户谈论<quote>廉价的拷贝</quote>,与目录的大小无关—这个操作会使用很少的时间,事实上,这个特性是Subversion提交工作的基础:每一次版本都是前一个版本的一个<quote>廉价的拷贝</quote>,只有少数项目修改了。(要阅读更多关于这部分的内容,访问Subversion网站并且阅读设计文档中的<quote>bubble up</quote>方法)。"
7034 #. (para)
7035 #: ../source/book.xml:6939
7036 msgid "Of course, these internal mechanics of copying and sharing data are hidden from the user, who simply sees copies of trees. The main point here is that copies are cheap, both in time and space. If you create a branch entirely within the repository (by running <command>svn copy URL1 URL2</command>), it's a quick, constant-time operation. Make branches as often as you want."
7037 msgstr "当然,拷贝与分享的内部机制对用户来讲是不可见的,用户只是看到拷贝树,这里的要点是拷贝的时间与空间代价很小。如果你完全在版本库里创建分支(通过运行<command>svn copy URL1 URL2</command>),这是一个快速的,时间基本固定的操作,只要你希望,可以随意创建分支。"
7039 #. (title)
7040 #: ../source/book.xml:6951
7041 msgid "Working with Your Branch"
7042 msgstr "在分支上工作"
7044 #. (para)
7045 #: ../source/book.xml:6953
7046 msgid "Now that you've created a branch of the project, you can check out a new working copy to start using it:"
7047 msgstr "现在你已经在项目里建立分支了,你可以取出一个新的工作拷贝来开始使用:"
7049 #. (screen)
7050 #: ../source/book.xml:6955
7051 #, no-wrap
7052 msgid ""
7053 "\n"
7054 "$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch\n"
7055 "A  my-calc-branch/Makefile\n"
7056 "A  my-calc-branch/integer.c\n"
7057 "A  my-calc-branch/button.c\n"
7058 "Checked out revision 341.\n"
7059 msgstr ""
7060 "\n"
7061 "$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch\n"
7062 "A  my-calc-branch/Makefile\n"
7063 "A  my-calc-branch/integer.c\n"
7064 "A  my-calc-branch/button.c\n"
7065 "Checked out revision 341.\n"
7067 #. (para)
7068 #: ../source/book.xml:6962
7069 #, fuzzy
7070 msgid "There's nothing special about this working copy; it simply mirrors a different directory in the repository. When you commit changes, however, Sally won't see them when she updates, because her working copy is of <filename>/calc/trunk</filename>. (Be sure to read <xref linkend=\"svn.branchmerge.switchwc\"/> later in this chapter: the <command>svn switch</command> command is an alternate way of creating a working copy of a branch.)"
7071 msgstr "这一份工作拷贝没有什么特别的,它只是版本库另一个目录的一个镜像罢了,当你提交修改时,Sally在更新时不会看到改变,她是<filename moreinfo=\"none\">/calc/trunk</filename>的工作拷贝。(确定要读本章后面的<xref linkend=\"svn.branchmerge.switchwc\"/>,<command moreinfo=\"none\">svn switch</command>命令是建立分支工作拷贝的另一个选择。)"
7073 #. (para)
7074 #: ../source/book.xml:6969
7075 msgid "Let's pretend that a week goes by, and the following commits happen:"
7076 msgstr "我们假定本周就要过去了,如下的提交发生:"
7078 #. (para)
7079 #: ../source/book.xml:6973
7080 msgid "You make a change to <filename>/calc/branches/my-calc-branch/button.c</filename>, which creates revision 342."
7081 msgstr "你修改了<filename>/calc/branches/my-calc-branch/button.c</filename>,生成修订版本342。"
7083 #. (para)
7084 #: ../source/book.xml:6979
7085 msgid "You make a change to <filename>/calc/branches/my-calc-branch/integer.c</filename>, which creates revision 343."
7086 msgstr "你修改了<filename>/calc/branches/my-calc-branch/integer.c</filename>,生成修订版本343。"
7088 #. (para)
7089 #: ../source/book.xml:6985
7090 msgid "Sally makes a change to <filename>/calc/trunk/integer.c</filename>, which creates revision 344."
7091 msgstr "Sally修改了<filename>/calc/trunk/integer.c</filename>,生成了修订版本344。"
7093 #. (para)
7094 #: ../source/book.xml:6991
7095 msgid "There are now two independent lines of development, shown in <xref linkend=\"svn.branchmerge.using.work.dia-1\"/>, happening on <filename>integer.c</filename>."
7096 msgstr "现在有两个独立开发线,<xref linkend=\"svn.branchmerge.using.work.dia-1\"/>显示了<filename>integer.c</filename>的历史。"
7098 #. (title)
7099 #: ../source/book.xml:6996
7100 msgid "The branching of one file's history"
7101 msgstr "一个文件的分支历史"
7103 #. (para)
7104 #: ../source/book.xml:7004
7105 msgid "Things get interesting when you look at the history of changes made to your copy of <filename>integer.c</filename>:"
7106 msgstr "当你看到<filename>integer.c</filename>的改变时,你会发现很有趣:"
7108 #. (screen)
7109 #: ../source/book.xml:7007
7110 #, no-wrap
7111 msgid ""
7112 "\n"
7113 "$ pwd\n"
7114 "/home/user/my-calc-branch\n"
7115 "\n"
7116 "$ svn log -v integer.c\n"
7117 "------------------------------------------------------------------------\n"
7118 "r343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7119 "Changed paths:\n"
7120 "   M /calc/branches/my-calc-branch/integer.c\n"
7121 "\n"
7122 "* integer.c:  frozzled the wazjub.\n"
7123 "\n"
7124 "------------------------------------------------------------------------\n"
7125 "r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7126 "Changed paths:\n"
7127 "   A /calc/branches/my-calc-branch (from /calc/trunk:340)\n"
7128 "\n"
7129 "Creating a private branch of /calc/trunk.\n"
7130 "\n"
7131 "------------------------------------------------------------------------\n"
7132 "r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n"
7133 "Changed paths:\n"
7134 "   M /calc/trunk/integer.c\n"
7135 "\n"
7136 "* integer.c:  changed a docstring.\n"
7137 "\n"
7138 "------------------------------------------------------------------------\n"
7139 "r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n"
7140 "Changed paths:\n"
7141 "   M /calc/trunk/integer.c\n"
7142 "\n"
7143 "* integer.c:  adding this file to the project.\n"
7144 "\n"
7145 "------------------------------------------------------------------------\n"
7146 msgstr ""
7147 "\n"
7148 "$ pwd\n"
7149 "/home/user/my-calc-branch\n"
7150 "\n"
7151 "$ svn log -v integer.c\n"
7152 "------------------------------------------------------------------------\n"
7153 "r343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7154 "Changed paths:\n"
7155 "   M /calc/branches/my-calc-branch/integer.c\n"
7156 "\n"
7157 "* integer.c:  frozzled the wazjub.\n"
7158 "\n"
7159 "------------------------------------------------------------------------\n"
7160 "r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7161 "Changed paths:\n"
7162 "   A /calc/branches/my-calc-branch (from /calc/trunk:340)\n"
7163 "\n"
7164 "Creating a private branch of /calc/trunk.\n"
7165 "\n"
7166 "------------------------------------------------------------------------\n"
7167 "r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n"
7168 "Changed paths:\n"
7169 "   M /calc/trunk/integer.c\n"
7170 "\n"
7171 "* integer.c:  changed a docstring.\n"
7172 "\n"
7173 "------------------------------------------------------------------------\n"
7174 "r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n"
7175 "Changed paths:\n"
7176 "   M /calc/trunk/integer.c\n"
7177 "\n"
7178 "* integer.c:  adding this file to the project.\n"
7179 "\n"
7180 "------------------------------------------------------------------------\n"
7182 #. (para)
7183 #: ../source/book.xml:7042
7184 msgid "Notice that Subversion is tracing the history of your branch's <filename>integer.c</filename> all the way back through time, even traversing the point where it was copied. It shows the creation of the branch as an event in the history, because <filename>integer.c</filename> was implicitly copied when all of <filename>/calc/trunk/</filename> was copied. Now look what happens when Sally runs the same command on her copy of the file:"
7185 msgstr "注意,Subversion追踪分支上的<filename>integer.c</filename>的历史,包括所有的操作,甚至追踪到拷贝之前。这表示了建立分支也是历史中的一次事件,因为在拷贝整个<filename>/calc/trunk/</filename>时已经拷贝了一份<filename>integer.c</filename>。现在看Sally在她的工作拷贝运行同样的命令:"
7187 #. (screen)
7188 #: ../source/book.xml:7050
7189 #, no-wrap
7190 msgid ""
7191 "\n"
7192 "$ pwd\n"
7193 "/home/sally/calc\n"
7194 "\n"
7195 "$ svn log -v integer.c\n"
7196 "------------------------------------------------------------------------\n"
7197 "r344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7198 "Changed paths:\n"
7199 "   M /calc/trunk/integer.c\n"
7200 "\n"
7201 "* integer.c:  fix a bunch of spelling errors.\n"
7202 "\n"
7203 "------------------------------------------------------------------------\n"
7204 "r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n"
7205 "Changed paths:\n"
7206 "   M /calc/trunk/integer.c\n"
7207 "\n"
7208 "* integer.c:  changed a docstring.\n"
7209 "\n"
7210 "------------------------------------------------------------------------\n"
7211 "r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n"
7212 "Changed paths:\n"
7213 "   M /calc/trunk/integer.c\n"
7214 "\n"
7215 "* integer.c:  adding this file to the project.\n"
7216 "\n"
7217 "------------------------------------------------------------------------\n"
7218 msgstr ""
7219 "\n"
7220 "$ pwd\n"
7221 "/home/sally/calc\n"
7222 "\n"
7223 "$ svn log -v integer.c\n"
7224 "------------------------------------------------------------------------\n"
7225 "r344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
7226 "Changed paths:\n"
7227 "   M /calc/trunk/integer.c\n"
7228 "\n"
7229 "* integer.c:  fix a bunch of spelling errors.\n"
7230 "\n"
7231 "------------------------------------------------------------------------\n"
7232 "r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n"
7233 "Changed paths:\n"
7234 "   M /calc/trunk/integer.c\n"
7235 "\n"
7236 "* integer.c:  changed a docstring.\n"
7237 "\n"
7238 "------------------------------------------------------------------------\n"
7239 "r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n"
7240 "Changed paths:\n"
7241 "   M /calc/trunk/integer.c\n"
7242 "\n"
7243 "* integer.c:  adding this file to the project.\n"
7244 "\n"
7245 "------------------------------------------------------------------------\n"
7247 #. (para)
7248 #: ../source/book.xml:7078
7249 msgid "Sally sees her own revision 344 change, but not the change you made in revision 343. As far as Subversion is concerned, these two commits affected different files in different repository locations. However, Subversion <emphasis>does</emphasis> show that the two files share a common history. Before the branch-copy was made in revision 341, they used to be the same file. That's why you and Sally both see the changes made in revisions 303 and 98."
7250 msgstr "sally看到她自己的344修订,你做的343修改她看不到,从Subversion看来,两次提交只是影响版本库中不同位置上的两个文件。然而,Subversion<emphasis>显示</emphasis>了两个文件有共同的历史,在分支拷贝之前,他们使用同一个文件,所以你和Sally都看到版本号303到98的修改。"
7252 #. (title)
7253 #: ../source/book.xml:7090
7254 #, fuzzy
7255 msgid "The Key Concepts Behind Branching"
7256 msgstr "分支背后的关键概念"
7258 #. (para)
7259 #: ../source/book.xml:7092
7260 #, fuzzy
7261 msgid "There are two important lessons that you should remember from this section. First, Subversion has no internal concept of a branch—it only knows how to make copies. When you copy a directory, the resulting directory is only a <quote>branch</quote> because <emphasis>you</emphasis> attach that meaning to it. You may think of the directory differently, or treat it differently, but to Subversion it's just an ordinary directory that happens to carry some extra historical information."
7262 msgstr "在本节,你需要记住两件重要的课程。首先,Subversion并没有内在的分支概念—只有拷贝,当你拷贝一个目录,这个结果目录就是一个<quote>分支</quote>,只是因为你给了它这样一个含义而已。你可以换一种角度考虑,或者特别对待,但是对于Subversion它只是一个普通的拷贝,只不过碰巧包含了一些额外的历史信息。第二,因为拷贝机制,Subversion的分支是以<emphasis>普通文件系统目录</emphasis>存在的,这与其他版本控制系统不同,它们都为分支定义了另一维度的<quote>标签</quote>。"
7264 #. (para)
7265 #: ../source/book.xml:7101
7266 msgid "Second, because of this copy mechanism, Subversion's branches exist as <emphasis>normal filesystem directories</emphasis> in the repository. This is different from other version control systems, where branches are typically defined by adding extra-dimensional <quote>labels</quote> to collections of files. The location of your branch directory doesn't matter to Subversion. Most teams follow a convention of putting all branches into a <filename>/branches</filename> directory, but you're free to invent any policy you wish."
7267 msgstr ""
7269 #. (title)
7270 #: ../source/book.xml:7118
7271 #, fuzzy
7272 msgid "Basic Merging"
7273 msgstr "分支与合并"
7275 #. (para)
7276 #: ../source/book.xml:7120
7277 msgid "Now you and Sally are working on parallel branches of the project: you're working on a private branch, and Sally is working on the <firstterm>trunk</firstterm>, or main line of development."
7278 msgstr "现在你与Sally在同一个项目的并行分支上工作:你在私有分支上,而Sally在主干(<firstterm>trunk</firstterm>)或者叫做开发主线上。"
7280 #. (para)
7281 #: ../source/book.xml:7124
7282 msgid "For projects that have a large number of contributors, it's common for most people to have working copies of the trunk. Whenever someone needs to make a long-running change that is likely to disrupt the trunk, a standard procedure is to create a private branch and commit changes there until all the work is complete."
7283 msgstr "由于有众多的人参与项目,大多数人拥有主干拷贝是很正常的,任何人如果进行一个长周期的修改会使得主干陷入混乱,所以通常的做法是建立一个私有分支,提交修改到自己的分支,直到这阶段工作结束。"
7285 #. (para)
7286 #: ../source/book.xml:7130
7287 msgid "So, the good news is that you and Sally aren't interfering with each other. The bad news is that it's very easy to drift <emphasis>too</emphasis> far apart. Remember that one of the problems with the <quote>crawl in a hole</quote> strategy is that by the time you're finished with your branch, it may be near-impossible to merge your changes back into the trunk without a huge number of conflicts."
7288 msgstr "所以,好消息就是你和Sally不会互相打扰,坏消息是有时候分离会<emphasis>太</emphasis>远。记住<quote>闭门造车</quote>策略的问题,当你完成你的分支后,可能因为太多冲突,已经无法轻易合并你的分支和主干的修改。"
7290 #. (para)
7291 #: ../source/book.xml:7137
7292 #, fuzzy
7293 msgid "Instead, you and Sally might continue to share changes as you work. It's up to you to decide which changes are worth sharing; Subversion gives you the ability to selectively <quote>copy</quote> changes between branches. And when you're completely finished with your branch, your entire set of branch changes can be copied back into the trunk. In Subversion terminology, the general act of replicating changes from one branch to another is called <firstterm>merging</firstterm>, and is performed using various invocations of the <command>svn merge</command> command."
7294 msgstr "相反,在你工作的时候你和Sally仍然可以继续分享修改,这依赖于你决定什么值得分享,Subversion给你在分支间选择性<quote>拷贝</quote>修改的能力,当你完成了分支上的所有工作,所有的分支修改可以被拷贝回到主干。"
7296 #. (para)
7297 #: ../source/book.xml:7147
7298 msgid "In the examples that follow, we're assuming that both your Subversion client and server are running Subversion 1.5 (or later). If either client or server is older than version 1.5, then things are more complicated: the system won't track changes automatically, and you'll have to use <quote>manual</quote> methods to achieve similar results. (See <xref linkend=\"svn.branchmerge.advanced\"/>.)"
7299 msgstr ""
7301 #. (title)
7302 #: ../source/book.xml:7157
7303 #, fuzzy
7304 msgid "Keeping a Branch in Sync"
7305 msgstr "创建分支"
7307 #. (para)
7308 #: ../source/book.xml:7159
7309 msgid "Continuing with our running example, let's suppose that a week has passed since you started working on your private branch. Your new feature isn't finished yet, but at the same time you know that other people on your team have continued to make important changes in the project's <filename>/trunk</filename>. It's in your best interest to replicate those changes to your own branch, just to make sure they mesh well with your changes. In fact, this is a best practice: by frequently keeping your branch in sync with the main development line, it helps prevent <quote>surprise</quote> conflicts when it comes time for you to fold your changes back into the trunk."
7310 msgstr ""
7312 #. (para)
7313 #: ../source/book.xml:7171
7314 msgid "Subversion is aware of the history of your branch, and knows when it divided away from the trunk. To replicate the latest, greatest trunk changes to your branch, simply run:"
7315 msgstr ""
7317 #. (screen)
7318 #: ../source/book.xml:7175
7319 #, fuzzy, no-wrap
7320 msgid ""
7321 "\n"
7322 "$ pwd\n"
7323 "/home/user/my-calc-branch\n"
7324 "\n"
7325 "$ svn merge http://svn.example.com/repos/calc/trunk\n"
7326 "--- Merging r345 through r356 into '.':\n"
7327 "U  button.c\n"
7328 "U  integer.c\n"
7329 msgstr ""
7330 "\n"
7331 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n"
7332 "U  integer.c\n"
7333 "\n"
7334 "$ svn status\n"
7335 "M  integer.c\n"
7337 #. (para)
7338 #: ../source/book.xml:7184
7339 msgid "Your branch working copy now contains new local modifications, and these edits are duplications of all of the changes that have happened on the trunk since you first created your branch:"
7340 msgstr ""
7342 #. (screen)
7343 #: ../source/book.xml:7188
7344 #, fuzzy, no-wrap
7345 msgid ""
7346 "\n"
7347 "$ svn status\n"
7348 "M  button.c\n"
7349 "M  integer.c\n"
7350 msgstr ""
7351 "\n"
7352 "$ svn status\n"
7353 "M      foo.c\n"
7354 "M      bar/baz.c\n"
7356 #. (para)
7357 #: ../source/book.xml:7193
7358 msgid "At this point, the wise thing to do is look at the changes carefully with <command>svn diff</command>, then build and test your branch. You might need to resolve some conflicts (just as you do with <command>svn update</command>), or possibly make some small edits to get things working properly. (Remember, just because there are no <emphasis>syntactic</emphasis> conflicts doesn't mean there aren't any <emphasis>semantic</emphasis> conflicts!) If you encounter serious problems, you can always abort the local changes by running <command>svn revert</command> and start a long <quote>what's going on?</quote> discussion with your collaborators. If things look good, however, then you can submit your changes into the repository:"
7359 msgstr ""
7361 #. (screen)
7362 #: ../source/book.xml:7206
7363 #, fuzzy, no-wrap
7364 msgid ""
7365 "\n"
7366 "$ svn commit -m \"Merged /trunk to /my-calc-branch.\"\n"
7367 "Sending        button.c\n"
7368 "Sending        integer.c\n"
7369 "Transmitting file data ..\n"
7370 "Committed revision 357.\n"
7371 msgstr ""
7372 "\n"
7373 "$ svn commit button.c -m \"Fixed a typo in button.c.\"\n"
7374 "Sending        button.c\n"
7375 "Transmitting file data .\n"
7376 "Committed revision 57.\n"
7378 #. (para)
7379 #: ../source/book.xml:7213
7380 msgid "At this point, your private branch is now <quote>in sync</quote> with the trunk, so you can rest easier knowing that as you continue to work in isolation, you're not drifting <emphasis>too</emphasis> far away from what everyone else is doing."
7381 msgstr ""
7383 #. (title)
7384 #: ../source/book.xml:7220
7385 msgid "Why Not Use Patches Instead?"
7386 msgstr "为什么不使用补丁?"
7388 #. (para)
7389 #: ../source/book.xml:7222
7390 msgid "A question may be on your mind, especially if you're a Unix user: why bother to use <command>svn merge</command> at all? Why not simply use the operating system's <command>patch</command> command to accomplish the same job? For example:"
7391 msgstr "也许你的脑中会出现一个问题,特别如果你是Unix用户,为什么非要使用<command>svn merge</command>?为什么不简单的使用操作系统的<command>patch</command>命令来进行相同的工作?例如:"
7393 #. (screen)
7394 #: ../source/book.xml:7227
7395 #, fuzzy, no-wrap
7396 msgid ""
7397 "\n"
7398 "$ cd my-calc-branch\n"
7399 "$ svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk &gt; patchfile\n"
7400 "$ patch -p0  &lt; patchfile\n"
7401 "Patching file integer.c using Plan A...\n"
7402 "Hunk #1 succeeded at 147.\n"
7403 "Hunk #2 succeeded at 164.\n"
7404 "Hunk #3 succeeded at 241.\n"
7405 "Hunk #4 succeeded at 249.\n"
7406 "done\n"
7407 msgstr ""
7408 "\n"
7409 "$ svn diff -c 344 http://svn.example.com/repos/calc/trunk &gt; patchfile\n"
7410 "$ patch -p0  &lt; patchfile\n"
7411 "Patching file integer.c using Plan A...\n"
7412 "Hunk #1 succeeded at 147.\n"
7413 "Hunk #2 succeeded at 164.\n"
7414 "Hunk #3 succeeded at 241.\n"
7415 "Hunk #4 succeeded at 249.\n"
7416 "done\n"
7418 #. (para)
7419 #: ../source/book.xml:7238
7420 #, fuzzy
7421 msgid "In this particular case, yes, there really is no difference. But <command>svn merge</command> has special abilities that surpass the <command>patch</command> program. The file format used by <command>patch</command> is quite limited; it's only able to tweak file contents. There's no way to represent changes to <emphasis>trees</emphasis>, such as the addition, removal, or renaming of files and directories. Nor can the <command>patch</command> program notice changes to properties. If Sally's change had, say, added a new directory, the output of <command>svn diff</command> wouldn't have mentioned it at all. <command>svn diff</command> only outputs the limited patch-format, so there are some ideas it simply can't express."
7422 msgstr "在这种情况下,确实没有区别,但是<command>svn merge</command>有超越<command>patch</command>的特别能力,使用<command>patch</command>对文件格式有一定的限制,它只能针对文件内容,没有方法表现<emphasis>目录树</emphasis>的修改,例如添加、删除或是改名。如果Sally的修改包括增加一个新的目录,<command>svn diff</command>不会注意到这些,<command>svn diff</command>只会输出有限的补丁格式,所以有些问题无法表达。 但是<command>svn merge</command>命令会通过直接作用你的工作拷贝来表示目录树的结构和属性变化。"
7424 #. (para)
7425 #: ../source/book.xml:7252
7426 msgid "The <command>svn merge</command> command, however, can express changes in tree structure and properties by directly applying them to your working copy. Even more important, this command records the changes that have been duplicated to your branch, so that Subversion is aware of exactly which changes exist in each location (see <xref linkend=\"svn.branchmerge.basicmerging.basicmergetracking.mergeinfo\"/>.) This is a critical feature that makes branch management usable; without it, users would have to manually keep notes on which sets of changes have or haven't been merged yet."
7427 msgstr ""
7429 #. (para)
7430 #: ../source/book.xml:7264
7431 msgid "Suppose, now, that another week has passed. You've committed more changes to your branch, and your comrades have continued to improve the trunk as well. Once again, you'd like to replicate the latest trunk changes to your branch and bring yourself in sync. Just run the same merge command again!"
7432 msgstr ""
7434 #. (screen)
7435 #: ../source/book.xml:7270
7436 #, fuzzy, no-wrap
7437 msgid ""
7438 "\n"
7439 "$ svn merge http://svn.example.com/repos/calc/trunk\n"
7440 "--- Merging r357 through r380 into '.':\n"
7441 "U  integer.c\n"
7442 "U  Makefile\n"
7443 "A  README\n"
7444 msgstr ""
7445 "\n"
7446 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n"
7447 "U  integer.c\n"
7448 "\n"
7449 "$ svn status\n"
7450 "M  integer.c\n"
7452 #. (para)
7453 #: ../source/book.xml:7277
7454 msgid "Subversion knows which trunk changes you've already replicated to your branch, so it carefully only replicates those changes you don't yet have. Once again, you'll have to build, test, and <command>svn commit</command> the local modifications to your branch."
7455 msgstr ""
7457 #. (para)
7458 #: ../source/book.xml:7282
7459 msgid "What happens when you finally finish your work, though? Your new feature is finished, and you're ready to merge your branch changes back to the trunk (so your team can enjoy the bounty of your labor.) The process is simple. First, bring your branch in sync with trunk again, just as you've been doing all along:"
7460 msgstr ""
7462 #. (screen)
7463 #: ../source/book.xml:7288
7464 #, fuzzy, no-wrap
7465 msgid ""
7466 "\n"
7467 "$ svn merge http://svn.example.com/repos/calc/trunk\n"
7468 "--- Merging r381 through r385 into '.':\n"
7469 "U  button.c\n"
7470 "U  README\n"
7471 "\n"
7472 "$ # build, test, ...\n"
7473 "\n"
7474 "$ svn commit -m \"Final merge of trunk changes to my-calc-branch.\"\n"
7475 "Sending        button.c\n"
7476 "Sending        README\n"
7477 "Transmitting file data ..\n"
7478 "Committed revision 390.\n"
7479 msgstr ""
7480 "\n"
7481 "$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n"
7482 "U  integer.c\n"
7483 "\n"
7484 "$ svn status\n"
7485 "M  integer.c\n"
7486 "\n"
7487 "$ svn diff\n"
7488 "…\n"
7489 "# verify that the change is removed\n"
7490 "…\n"
7491 "\n"
7492 "$ svn commit -m \"Undoing change committed in r303.\"\n"
7493 "Sending        integer.c\n"
7494 "Transmitting file data .\n"
7495 "Committed revision 350.\n"
7497 #. (para)
7498 #: ../source/book.xml:7302
7499 msgid "Now, you use <command>svn merge</command> to replicate your branch changes back into the trunk. To do this, you'll need a working copy of <filename>/trunk</filename>. You can do this by either doing an <command>svn checkout</command>, dredging up an old trunk working copy from somewhere on your disk, or by using <command>svn switch</command> (see <xref linkend=\"svn.branchmerge.switchwc\"/>.) Then invoke <command>svn merge</command> within your trunk working copy:"
7500 msgstr ""
7502 #. (screen)
7503 #: ../source/book.xml:7311
7504 #, fuzzy, no-wrap
7505 msgid ""
7506 "\n"
7507 "$ pwd\n"
7508 "/home/user/calc-trunk\n"
7509 "\n"
7510 "$ svn merge http://svn.example.com/repos/calc/branches/my-calc-branch\n"
7511 "--- Merging r341 through r390 into '.':\n"
7512 "U  button.c\n"
7513 "U  integer.c\n"
7514 "U  Makefile\n"
7515 "\n"
7516 "$ # build, test, verify, ...\n"
7517 "\n"
7518 "$ svn commit -m \"Merge my-calc-branch back into trunk!\"\n"
7519 "Sending        button.c\n"
7520 "Sending        integer.c\n"
7521 "Sending        Makefile\n"
7522 "Transmitting file data ..\n"
7523 "Committed revision 391.\n"
7524 msgstr ""
7525 "\n"
7526 "$ cd calc/trunk\n"
7527 "$ svn update\n"
7528 "At revision 405.\n"
7529 "\n"
7530 "$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
7531 "U   integer.c\n"
7532 "U   button.c\n"
7533 "U   Makefile\n"
7534 "\n"
7535 "$ svn status\n"
7536 "M   integer.c\n"
7537 "M   button.c\n"
7538 "M   Makefile\n"
7539 "\n"
7540 "# ...examine the diffs, compile, test, etc...\n"
7541 "\n"
7542 "$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n"
7543 "Sending        integer.c\n"
7544 "Sending        button.c\n"
7545 "Sending        Makefile\n"
7546 "Transmitting file data ...\n"
7547 "Committed revision 406.\n"
7549 #. (para)
7550 #: ../source/book.xml:7330
7551 msgid "Congratulations, your branch has now been re-merged back into the main line of development. You'll no longer need your branch at this point anymore, so you can do some basic housecleaning in the repository:"
7552 msgstr ""
7554 #. (screen)
7555 #: ../source/book.xml:7334
7556 #, fuzzy, no-wrap
7557 msgid ""
7558 "\n"
7559 "$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch\n"
7560 "Committed revision 392.\n"
7561 msgstr ""
7562 "\n"
7563 "$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
7564 "             -m \"Removing obsolete branch of calc project.\"\n"
7565 "\n"
7566 "Committed revision 375.\n"
7568 #. (para)
7569 #: ../source/book.xml:7338
7570 msgid "But wait! Isn't the history of that branch valuable? What if somebody wants to audit the evolution of your feature someday, and look at all your commits? No need to worry. Remember that even though your branch is no longer visible in the <filename>/branches</filename> directory, its existence is still an immutable part of the repository's history. A simple <command>svn log</command> command on the <filename>/branches</filename> URL will show the entire history of your branch. Your branch can even be resurrected at some point, should you desire. (See <xref linkend=\"svn.branchmerge.advanced.resurrect\"/>.)"
7571 msgstr ""
7573 #. (title)
7574 #: ../source/book.xml:7353
7575 msgid "Basic Merge Tracking"
7576 msgstr ""
7578 #. (para)
7579 #: ../source/book.xml:7355
7580 msgid "###TODO: set expectations on what gets tracked and what doesn't."
7581 msgstr ""
7583 #. (title)
7584 #: ../source/book.xml:7360
7585 #, fuzzy
7586 msgid "Mergeinfo"
7587 msgstr "合并"
7589 #. (para)
7590 #: ../source/book.xml:7362
7591 msgid "###TODO: explain svn:mergeinfo prop and 'svn mergeinfo' command, so users get a general sense of how the system is tracking changes."
7592 msgstr ""
7594 #. (title)
7595 #: ../source/book.xml:7369
7596 msgid "Previewing Merges"
7597 msgstr "预览合并"
7599 #. (para)
7600 #: ../source/book.xml:7371
7601 #, fuzzy
7602 msgid "It's a best practice to do your merge into a working copy that has <emphasis>no</emphasis> local edits and has been recently updated. If your working copy isn't <quote>clean</quote> in these ways, you can run into some headaches."
7603 msgstr "首先,一定要记住合并的工作拷贝<emphasis>没有</emphasis>本地更改,并且最近已更新过。如果你的工作拷贝用这样的方法<quote>清理</quote>,你会发现一些头痛的事情。"
7605 #. (para)
7606 #: ../source/book.xml:7376
7607 msgid "Assuming your working copy is tidy, merging isn't a particularly high-risk operation. If you get the merge wrong the first time, simply <command>svn revert</command> the changes and try again."
7608 msgstr "因为合并只是导致本地修改,它不是一个高风险的操作,如果你在第一次操作错误,你可以运行<command>svn revert</command>来再试一次。"
7610 #. (para)
7611 #: ../source/book.xml:7380
7612 msgid "If you've merged into a working copy that already has local modifications, the changes applied by a merge will be mixed with your pre-existing ones, and running <command>svn revert</command> is no longer an option. The two sets of changes may be impossible to separate."
7613 msgstr "有时候你的工作拷贝很可能已经改变了,合并会针对存在的那一个文件,这时运行<command>svn revert</command>不会恢复你在本地作的修改,两部分的修改无法识别出来。"
7615 #. (para)
7616 #: ../source/book.xml:7385
7617 msgid "In cases like this, people take comfort in being able to predict or examine merges before they happen. One simple way to do that is to run <command>svn diff</command> with the same arguments you plan to pass to <command>svn merge</command>, as we already showed in our first example of merging. Another method of previewing is to pass the <option>--dry-run</option> option to the merge command:"
7618 msgstr "在这个情况下,人们很乐意能够在合并之前预测一下,一个简单的方法是使用运行<command>svn merge</command>同样的参数运行<command>svn diff</command>,另一种方式是传递<option>--dry-run</option>选项给merge命令来预览:"
7620 #. (screen)
7621 #: ../source/book.xml:7393
7622 #, fuzzy, no-wrap
7623 msgid ""
7624 "\n"
7625 "$ svn merge --dry-run http://svn.example.com/repos/calc/trunk\n"
7626 "U  integer.c\n"
7627 "\n"
7628 "$ svn status\n"
7629 "#  nothing printed, working copy is still unchanged.\n"
7630 msgstr ""
7631 "\n"
7632 "$ svn merge --dry-run -c 344 http://svn.example.com/repos/calc/trunk\n"
7633 "U  integer.c\n"
7634 "\n"
7635 "$ svn status\n"
7636 "#  nothing printed, working copy is still unchanged.\n"
7638 #. (para)
7639 #: ../source/book.xml:7400
7640 msgid "The <option>--dry-run</option> option doesn't actually apply any local changes to the working copy. It only shows status codes that <emphasis>would</emphasis> be printed in a real merge. It's useful for getting a <quote>high level</quote> preview of the potential merge, for those times when running <command>svn diff</command> gives too much detail."
7641 msgstr "<option>--dry-run</option>选项实际上并不修改本地拷贝,它只是显示实际合并时的状态信息,对于得到潜在合并的<quote>整体</quote>预览,这个命令很有用,因为<command>svn diff</command>包括太多细节。"
7643 #. (title)
7644 #: ../source/book.xml:7411
7645 msgid "Multi-Layered Merges"
7646 msgstr ""
7648 #. (para)
7649 #: ../source/book.xml:7413
7650 msgid "###TODO: explain how a merge can apply successive patches, and that any intermediate conflicts *must* be resolved (for now, at least.)"
7651 msgstr ""
7653 #. (title)
7654 #: ../source/book.xml:7424
7655 #, fuzzy
7656 msgid "Advanced Merging"
7657 msgstr "高级用户"
7659 #. (para)
7660 #: ../source/book.xml:7426
7661 msgid "###TODO: Intro: talk about how and why advanced users can pass specific revision numbers to 'svn merge'."
7662 msgstr ""
7664 #. (title)
7665 #: ../source/book.xml:7431
7666 msgid "Copying Specific Changes"
7667 msgstr "复制特定的修改"
7669 #. (para)
7670 #: ../source/book.xml:7433
7671 msgid "Let's go back in time and imagine that you haven't yet merged your private branch back to the trunk. ... ### TODO: explain why we'd want to cherrypick one change, and let's say it's r344:"
7672 msgstr ""
7674 #. (para)
7675 #: ../source/book.xml:7437
7676 #, fuzzy
7677 msgid "Assume you get word that Sally made an interesting change to <filename>integer.c</filename> on the trunk. ###TODO: blah blah: If you look at Sally's log message for revision 344, you can see that she fixed some spelling errors. No doubt, your copy of the same file still has the same spelling errors. It's likely that your future changes to this file will be affecting the same areas that have the spelling errors, so you're in for some potential conflicts when you merge your branch someday. It's better, then, to receive Sally's change now, <emphasis>before</emphasis> you start working too heavily in the same places."
7678 msgstr "在上一章节,我们提到你和Sally对<filename>integer.c</filename>在不同的分支上做过修改,如果你看了Sally的344版本的日志信息,你会知道她修正了一些拼写错误,毋庸置疑,你的拷贝的文件也一定存在这些拼写错误,所以你以后的对这个文件修改也会保留这些拼写错误,所以你会在将来合并时得到许多冲突。最好是现在接收Sally的修改,而不是作了许多工作之后才来做。"
7680 #. (screen)
7681 #: ../source/book.xml:7448
7682 #, no-wrap
7683 msgid ""
7684 "\n"
7685 "$ svn diff -c 344 http://svn.example.com/repos/calc/trunk\n"
7686 "\n"
7687 "Index: integer.c\n"
7688 "===================================================================\n"
7689 "--- integer.c\t(revision 343)\n"
7690 "+++ integer.c\t(revision 344)\n"
7691 "@@ -147,7 +147,7 @@\n"
7692 "     case 6:  sprintf(info-&gt;operating_system, \"HPFS (OS/2 or NT)\"); break;\n"
7693 "     case 7:  sprintf(info-&gt;operating_system, \"Macintosh\"); break;\n"
7694 "     case 8:  sprintf(info-&gt;operating_system, \"Z-System\"); break;\n"
7695 "-    case 9:  sprintf(info-&gt;operating_system, \"CPM\"); break;\n"
7696 "+    case 9:  sprintf(info-&gt;operating_system, \"CP/M\"); break;\n"
7697 "     case 10:  sprintf(info-&gt;operating_system, \"TOPS-20\"); break;\n"
7698 "     case 11:  sprintf(info-&gt;operating_system, \"NTFS (Windows NT)\"); break;\n"
7699 "     case 12:  sprintf(info-&gt;operating_system, \"QDOS\"); break;\n"
7700 "@@ -164,7 +164,7 @@\n"
7701 "     low = (unsigned short) read_byte(gzfile);  /* read LSB */\n"
7702 "     high = (unsigned short) read_byte(gzfile); /* read MSB */\n"
7703 "     high = high &lt;&lt; 8;  /* interpret MSB correctly */\n"
7704 "-    total = low + high; /* add them togethe for correct total */\n"
7705 "+    total = low + high; /* add them together for correct total */\n"
7706 "\n"
7707 "     info-&gt;extra_header = (unsigned char *) my_malloc(total);\n"
7708 "     fread(info-&gt;extra_header, total, 1, gzfile);\n"
7709 "@@ -241,7 +241,7 @@\n"
7710 "      Store the offset with ftell() ! */\n"
7711 "\n"
7712 "   if ((info-&gt;data_offset = ftell(gzfile))== -1) {\n"
7713 "-    printf(\"error: ftell() retturned -1.\\n\");\n"
7714 "+    printf(\"error: ftell() returned -1.\\n\");\n"
7715 "     exit(1);\n"
7716 "   }\n"
7717 "\n"
7718 "@@ -249,7 +249,7 @@\n"
7719 "   printf(\"I believe start of compressed data is %u\\n\", info-&gt;data_offset);\n"
7720 "   #endif\n"
7721 "\n"
7722 "-  /* Set postion eight bytes from the end of the file. */\n"
7723 "+  /* Set position eight bytes from the end of the file. */\n"
7724 "\n"
7725 "   if (fseek(gzfile, -8, SEEK_END)) {\n"
7726 "     printf(\"error: fseek() returned non-zero\\n\");\n"
7727 msgstr ""
7728 "\n"
7729 "$ svn diff -c 344 http://svn.example.com/repos/calc/trunk\n"
7730 "\n"
7731 "Index: integer.c\n"
7732 "===================================================================\n"
7733 "--- integer.c\t(revision 343)\n"
7734 "+++ integer.c\t(revision 344)\n"
7735 "@@ -147,7 +147,7 @@\n"
7736 "     case 6:  sprintf(info-&gt;operating_system, \"HPFS (OS/2 or NT)\"); break;\n"
7737 "     case 7:  sprintf(info-&gt;operating_system, \"Macintosh\"); break;\n"
7738 "     case 8:  sprintf(info-&gt;operating_system, \"Z-System\"); break;\n"
7739 "-    case 9:  sprintf(info-&gt;operating_system, \"CPM\"); break;\n"
7740 "+    case 9:  sprintf(info-&gt;operating_system, \"CP/M\"); break;\n"
7741 "     case 10:  sprintf(info-&gt;operating_system, \"TOPS-20\"); break;\n"
7742 "     case 11:  sprintf(info-&gt;operating_system, \"NTFS (Windows NT)\"); break;\n"
7743 "     case 12:  sprintf(info-&gt;operating_system, \"QDOS\"); break;\n"
7744 "@@ -164,7 +164,7 @@\n"
7745 "     low = (unsigned short) read_byte(gzfile);  /* read LSB */\n"
7746 "     high = (unsigned short) read_byte(gzfile); /* read MSB */\n"
7747 "     high = high &lt;&lt; 8;  /* interpret MSB correctly */\n"
7748 "-    total = low + high; /* add them togethe for correct total */\n"
7749 "+    total = low + high; /* add them together for correct total */\n"
7750 "\n"
7751 "     info-&gt;extra_header = (unsigned char *) my_malloc(total);\n"
7752 "     fread(info-&gt;extra_header, total, 1, gzfile);\n"
7753 "@@ -241,7 +241,7 @@\n"
7754 "      Store the offset with ftell() ! */\n"
7755 "\n"
7756 "   if ((info-&gt;data_offset = ftell(gzfile))== -1) {\n"
7757 "-    printf(\"error: ftell() retturned -1.\\n\");\n"
7758 "+    printf(\"error: ftell() returned -1.\\n\");\n"
7759 "     exit(1);\n"
7760 "   }\n"
7761 "\n"
7762 "@@ -249,7 +249,7 @@\n"
7763 "   printf(\"I believe start of compressed data is %u\\n\", info-&gt;data_offset);\n"
7764 "   #endif\n"
7765 "\n"
7766 "-  /* Set postion eight bytes from the end of the file. */\n"
7767 "+  /* Set position eight bytes from the end of the file. */\n"
7768 "\n"
7769 "   if (fseek(gzfile, -8, SEEK_END)) {\n"
7770 "     printf(\"error: fseek() returned non-zero\\n\");\n"
7772 #. (para)
7773 #: ../source/book.xml:7492
7774 msgid "The <command>svn merge</command> command is almost exactly the same. Instead of printing the differences to your terminal, however, it applies them directly to your working copy as <emphasis>local modifications</emphasis>:"
7775 msgstr "<command>svn merge</command>命令几乎完全相同,但不是打印区别到你的终端,它会直接作为<emphasis>本地修改</emphasis>作用到你的本地拷贝:"
7777 #. (screen)
7778 #: ../source/book.xml:7496
7779 #, no-wrap
7780 msgid ""
7781 "\n"
7782 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n"
7783 "U  integer.c\n"
7784 "\n"
7785 "$ svn status\n"
7786 "M  integer.c\n"
7787 msgstr ""
7788 "\n"
7789 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n"
7790 "U  integer.c\n"
7791 "\n"
7792 "$ svn status\n"
7793 "M  integer.c\n"
7795 #. (para)
7796 #: ../source/book.xml:7503
7797 msgid "The output of <command>svn merge</command> shows that your copy of <filename>integer.c</filename> was patched. It now contains Sally's change—the change has been <quote>copied</quote> from the trunk to your working copy of your private branch, and now exists as a local modification. At this point, it's up to you to review the local modification and make sure it works correctly."
7798 msgstr "<command>svn merge</command>的输出告诉你的<filename>integer.c</filename>文件已经作了补丁(patched),现在已经保留了Sally修改—修改从主干<quote>拷贝</quote>到你的私有分支的工作拷贝,现在作为一个本地修改,在这种情况下,要靠你审查本地的修改来确定它们工作正常。"
7800 #. (para)
7801 #: ../source/book.xml:7510
7802 msgid "In another scenario, it's possible that things may not have gone so well, and that <filename>integer.c</filename> may have entered a conflicted state. You might need to resolve the conflict using standard procedures (see <xref linkend=\"svn.tour\"/>), or if you decide that the merge was a bad idea altogether, simply give up and <command>svn revert</command> the local change."
7803 msgstr "在另一种情境下,事情并不会运行得这样正常,也许<filename>integer.c</filename>也许会进入冲突状态,你必须使用标准过程(见<xref linkend=\"svn.tour\"/>)来解决这种状态,或者你认为合并是一个错误的决定,你只需要运行<command>svn revert</command>放弃本地修改。"
7805 #. (para)
7806 #: ../source/book.xml:7516
7807 msgid "But assuming that you've reviewed the merged change, you can <command>svn commit</command> the change as usual. At that point, the change has been merged into your repository branch. In version control terminology, this act of copying changes between branches is commonly called <firstterm>porting</firstterm> changes."
7808 msgstr "但是当你审查过你的合并结果后,你可以使用<command>svn commit</command>提交修改,在那一刻,修改已经合并到你的分支上了,在版本控制术语中,这种在分支之间拷贝修改的行为叫做<firstterm>搬运</firstterm>修改。"
7810 #. (para)
7811 #: ../source/book.xml:7522
7812 #, fuzzy
7813 msgid "When you commit the local modification, it's a good practice to mention that you're porting a specific change from one branch to another. For example:"
7814 msgstr "当你提交你的修改时,确定你的日志信息中说明你是从某一版本搬运了修改,举个例子:"
7816 #. (screen)
7817 #: ../source/book.xml:7525
7818 #, no-wrap
7819 msgid ""
7820 "\n"
7821 "$ svn commit -m \"integer.c: ported r344 (spelling fixes) from trunk.\"\n"
7822 "Sending        integer.c\n"
7823 "Transmitting file data .\n"
7824 "Committed revision 360.\n"
7825 msgstr ""
7826 "\n"
7827 "$ svn commit -m \"integer.c: ported r344 (spelling fixes) from trunk.\"\n"
7828 "Sending        integer.c\n"
7829 "Transmitting file data .\n"
7830 "Committed revision 360.\n"
7832 #. (para)
7833 #: ../source/book.xml:7531
7834 msgid "A word of warning: while <command>svn diff</command> and <command>svn merge</command> are very similar in concept, they do have different syntax in many cases. Be sure to read about them in <xref linkend=\"svn.ref\"/> for details, or ask <command>svn help</command>. For example, <command>svn merge</command> requires a working-copy path as a target, i.e. a place where it should apply the tree-changes. If the target isn't specified, it assumes you are trying to perform one of the following common operations:"
7835 msgstr "一个警告:为什么<command>svn diff</command>和<command>svn merge</command>在概念上是很接近,但语法上有许多不同,一定阅读<xref linkend=\"svn.ref\"/>来查看其细节或者使用<command>svn help</command>查看帮助。举个例子,<command>svn merge</command>需要一个工作拷贝作为目标,就是一个地方来施展目录树修改,如果一个目标都没有指定,它会假定你要做以下某个普通的操作:"
7837 #. (para)
7838 #: ../source/book.xml:7542
7839 msgid "You want to merge directory changes into your current working directory."
7840 msgstr "你希望合并目录修改到工作拷贝的当前目录。"
7842 #. (para)
7843 #: ../source/book.xml:7546
7844 msgid "You want to merge the changes in a specific file into a file by the same name which exists in your current working directory."
7845 msgstr "你希望合并修改到你的当前工作目录的相同文件名的文件。"
7847 #. (para)
7848 #: ../source/book.xml:7551
7849 msgid "If you are merging a directory and haven't specified a target path, <command>svn merge</command> assumes the first case above and tries to apply the changes into your current directory. If you are merging a file, and that file (or a file by the same name) exists in your current working directory, <command>svn merge</command> assumes the second case and tries to apply the changes to a local file with the same name."
7850 msgstr "如果你合并一个目录而没有指定特定的目标,<command>svn merge</command>假定第一种情况,在你的当前目录应用修改。如果你合并一个文件,而这个文件(或是一个有相同的名字文件)在你的当前工作目录存在,<command>svn merge</command>假定第二种情况,你想对这个同名文件使用合并。"
7852 #. (para)
7853 #: ../source/book.xml:7558
7854 msgid "If you want changes applied somewhere else, you'll need to say so. For example, if you're sitting in the parent directory of your working copy, you'll have to specify the target directory to receive the changes:"
7855 msgstr "如果你希望修改应用到别的目录,你需要说出来。举个例子,你在工作拷贝的父目录,你需要指定目标目录:"
7857 #. (screen)
7858 #: ../source/book.xml:7562
7859 #, no-wrap
7860 msgid ""
7861 "\n"
7862 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n"
7863 "U   my-calc-branch/integer.c\n"
7864 msgstr ""
7865 "\n"
7866 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n"
7867 "U   my-calc-branch/integer.c\n"
7869 #. (title)
7870 #: ../source/book.xml:7570
7871 #, fuzzy
7872 msgid "Advanced Merge Syntax"
7873 msgstr "高级用户"
7875 #. (para)
7876 #: ../source/book.xml:7572
7877 #, fuzzy
7878 msgid "You've now seen some examples of the <command>svn merge</command> command, and you're about to see several more. If you're feeling confused about exactly how merging works, you're not alone. Many users (especially those new to version control) are initially perplexed about the proper syntax of the command, and about how and when the feature should be used. But fear not, this command is actually much simpler than you think! There's a very easy technique for understanding exactly how <command>svn merge</command> behaves."
7879 msgstr "你已经看到了<command>svn merge</command>命令的例子,你将会看到更多,如果你对合并是如何工作的感到迷惑,这并不奇怪,很多人和你一样。许多新用户(特别是对版本控制很陌生的用户)会对这个命令的正确语法感到不知所措,不知道怎样和什么时候使用这个特性,不要害怕,这个命令实际上比你想象的简单!有一个简单的技巧来帮助你理解<command>svn merge</command>的行为。"
7881 #. (para)
7882 #: ../source/book.xml:7582
7883 msgid "The main source of confusion is the <emphasis>name</emphasis> of the command. The term <quote>merge</quote> somehow denotes that branches are combined together, or that there's some sort of mysterious blending of data going on. That's not the case. A better name for the command might have been <command>svn diff-and-apply</command>, because that's all that happens: two repository trees are compared, and the differences are applied to a working copy."
7884 msgstr "迷惑的主要原因是这个命令的<emphasis>名称</emphasis>,术语<quote>合并</quote>不知什么原因被用来表明分支的组合,或者是其他什么神奇的数据混合,这不是事实,一个更好的名称应该是<command>svn diff-and-apply</command>,这是发生的所有事件:首先两个版本库树比较,然后将区别应用到本地拷贝。"
7886 #. (para)
7887 #: ../source/book.xml:7591
7888 msgid "If you're using <command>svn merge</command> to do basic copying of changes between branches, it will generally do the right thing automatically. For example, a command like"
7889 msgstr ""
7891 #. (screen)
7892 #: ../source/book.xml:7594
7893 #, fuzzy, no-wrap
7894 msgid ""
7895 "\n"
7896 "$ svn merge http://svn.example.com/repos/calc/some-branch\n"
7897 msgstr ""
7898 "\n"
7899 "$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n"
7900 "U   my-calc-branch/integer.c\n"
7902 #. (para)
7903 #: ../source/book.xml:7597
7904 msgid "... will attempt to duplicate any changes made on <filename>some-branch</filename> into your current working directory, which is presumably a working copy that shares some historical connection to the branch. The command is smart enough to only duplicate changes that your working copy doesn't yet have. If you repeat this command once a week, it will only duplicate the <quote>newest</quote> branch changes that happened since you last merged."
7905 msgstr ""
7907 #. (para)
7908 #: ../source/book.xml:7605
7909 msgid "If you choose to use the <command>svn merge</command> command in all its full glory by giving it specific revision ranges to duplicate, then the command takes three main arguments:"
7910 msgstr ""
7912 #. (para)
7913 #: ../source/book.xml:7611
7914 msgid "An initial repository tree (often called the <firstterm>left side</firstterm> of the comparison),"
7915 msgstr "初始的版本树(通常叫做比较的<firstterm>左边</firstterm>),"
7917 #. (para)
7918 #: ../source/book.xml:7616
7919 msgid "A final repository tree (often called the <firstterm>right side</firstterm> of the comparison),"
7920 msgstr "最终的版本树(通常叫做比较的<firstterm>右边</firstterm>),"
7922 #. (para)
7923 #: ../source/book.xml:7621
7924 msgid "A working copy to accept the differences as local changes (often called the <firstterm>target</firstterm> of the merge)."
7925 msgstr "一个接收区别的工作拷贝(通常叫做合并的<firstterm>目标</firstterm>)。"
7927 #. (para)
7928 #: ../source/book.xml:7626
7929 msgid "Once these three arguments are specified, the two trees are compared, and the resulting differences are applied to the target working copy as local modifications. When the command is done, the results are no different than if you had hand-edited the files, or run various <command>svn add</command> or <command>svn delete</command> commands yourself. If you like the results, you can commit them. If you don't like the results, you can simply <command>svn revert</command> all of the changes."
7930 msgstr "一旦这三个参数指定以后,两个目录树将要做比较,比较结果将会作为本地修改应用到目标工作拷贝,当命令结束后,结果同你手工修改或者是使用<command>svn add</command>或<command>svn delete</command>没有什么区别,如果你喜欢这结果,你可以提交,如果不喜欢,你可以使用<command>svn revert</command>恢复修改。"
7932 #. (para)
7933 #: ../source/book.xml:7635
7934 msgid "The syntax of <command>svn merge</command> allows you to specify the three necessary arguments rather flexibly. Here are some examples:"
7935 msgstr "<command>svn merge</command>的语法允许非常灵活的指定三个必要的参数,如下是一些例子:"
7937 #. (screen)
7938 #: ../source/book.xml:7638
7939 #, no-wrap
7940 msgid ""
7941 "\n"
7942 "$ svn merge http://svn.example.com/repos/branch1@150 \\\n"
7943 "            http://svn.example.com/repos/branch2@212 \\\n"
7944 "            my-working-copy\n"
7945 "\n"
7946 "$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy\n"
7947 "\n"
7948 "$ svn merge -r 100:200 http://svn.example.com/repos/trunk\n"
7949 msgstr ""
7950 "\n"
7951 "$ svn merge http://svn.example.com/repos/branch1@150 \\\n"
7952 "            http://svn.example.com/repos/branch2@212 \\\n"
7953 "            my-working-copy\n"
7954 "\n"
7955 "$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy\n"
7956 "\n"
7957 "$ svn merge -r 100:200 http://svn.example.com/repos/trunk\n"
7959 #. (para)
7960 #: ../source/book.xml:7647
7961 msgid "The first syntax lays out all three arguments explicitly, naming each tree in the form <emphasis>URL@REV</emphasis> and naming the working copy target. The second syntax can be used as a shorthand for situations when you're comparing two different revisions of the same URL. The last syntax shows how the working-copy argument is optional; if omitted, it defaults to the current directory."
7962 msgstr "第一种语法使用<emphasis>URL@REV</emphasis>的形式直接列出了所有参数,第二种语法可以用来作为比较同一个URL的不同版本的简略写法,最后一种语法表示工作拷贝是可选的,如果省略,默认是当前目录。"
7964 #. (title)
7965 #: ../source/book.xml:7658
7966 msgid "Undoing Changes"
7967 msgstr "取消修改"
7969 #. (para)
7970 #: ../source/book.xml:7660
7971 msgid "Another common use for <command>svn merge</command> is to roll back a change that has already been committed. Suppose you're working away happily on a working copy of <filename>/calc/trunk</filename>, and you discover that the change made way back in revision 303, which changed <filename>integer.c</filename>, is completely wrong. It never should have been committed. You can use <command>svn merge</command> to <quote>undo</quote> the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a <emphasis>reverse</emphasis> difference. (You can do this by specifying <option>--revision 303:302</option>, or by an equivalent <option>--change -303</option>.)"
7972 msgstr "<command>svn merge</command>另一个常用的做法是取消已经做得提交,假设你愉快的在<filename>/calc/trunk</filename>工作,你发现303版本对<filename>integer.c</filename>的修改完全错了,它不应该被提交,你可以使用<command>svn merge</command>来<quote>取消</quote>这个工作拷贝上所作的操作,然后提交本地修改到版本库,你要做得只是指定一个相反的区别。(你可以通过指定<option>--revision 303:302</option,或等价的<option>--change -303</option>完成。)"
7974 #. (screen)
7975 #: ../source/book.xml:7673
7976 #, no-wrap
7977 msgid ""
7978 "\n"
7979 "$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n"
7980 "U  integer.c\n"
7981 "\n"
7982 "$ svn status\n"
7983 "M  integer.c\n"
7984 "\n"
7985 "$ svn diff\n"
7986 "…\n"
7987 "# verify that the change is removed\n"
7988 "…\n"
7989 "\n"
7990 "$ svn commit -m \"Undoing change committed in r303.\"\n"
7991 "Sending        integer.c\n"
7992 "Transmitting file data .\n"
7993 "Committed revision 350.\n"
7994 msgstr ""
7995 "\n"
7996 "$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n"
7997 "U  integer.c\n"
7998 "\n"
7999 "$ svn status\n"
8000 "M  integer.c\n"
8001 "\n"
8002 "$ svn diff\n"
8003 "…\n"
8004 "# verify that the change is removed\n"
8005 "…\n"
8006 "\n"
8007 "$ svn commit -m \"Undoing change committed in r303.\"\n"
8008 "Sending        integer.c\n"
8009 "Transmitting file data .\n"
8010 "Committed revision 350.\n"
8012 #. (para)
8013 #: ../source/book.xml:7690
8014 msgid "One way to think about a repository revision is as a specific group of changes (some version control systems call these <firstterm>changesets</firstterm>). By using the <option>-r</option> option, you can ask <command>svn merge</command> to apply a changeset, or whole range of changesets, to your working copy. In our case of undoing a change, we're asking <command>svn merge</command> to apply changeset #303 to our working copy <emphasis>backwards</emphasis>."
8015 msgstr "我们可以把版本库修订版本想象成一组修改(一些版本控制系统叫做<firstterm>修改集</firstterm>),通过<option>-r</option>选项,你可以告诉<command>svn merge</command>来应用修改集或是一个修改集范围到你的工作拷贝,在我们的情况例子里,我们使用<command>svn merge</command>合并修改集#303到工作拷贝。"
8017 #. (title)
8018 #: ../source/book.xml:7701
8019 msgid "Subversion and Changesets"
8020 msgstr "Subversion 与修改集"
8022 #. (para)
8023 #: ../source/book.xml:7703
8024 msgid "Everyone seems to have a slightly different definition of <quote>changeset</quote>, or at least a different expectation of what it means for a version control system to have <quote>changeset features</quote>. For our purpose, let's say that a changeset is just a collection of changes with a unique name. The changes might include textual edits to file contents, modifications to tree structure, or tweaks to metadata. In more common speak, a changeset is just a patch with a name you can refer to."
8025 msgstr "每一个人对于<quote>修改集</quote>的概念都有些不一样,至少对于版本控制系统的<quote>修改集特性</quote>这一概念有着不同的期望,根据我们的用途,可以说修改集只是一个有唯一名字的一系列修改集合,修改也许包括文件内容的修改,目录树结构的修改,或是元数据的调整,更通常的说法,一个修改集就是我们可以引用的有名字的补丁。"
8027 #. (para)
8028 #: ../source/book.xml:7712
8029 #, fuzzy
8030 msgid "In Subversion, a global revision number N names a tree in the repository: it's the way the repository looked after the Nth commit. It's also the name of an implicit changeset: if you compare tree N with tree N-1, you can derive the exact patch that was committed. For this reason, it's easy to think of <quote>revision N</quote> as not just a tree, but a changeset as well. If you use an issue tracker to manage bugs, you can use the revision numbers to refer to particular patches that fix bugs—for example, <quote>this issue was fixed by revision 9238.</quote>. Somebody can then run <command>svn log -r9238</command> to read about the exact changeset which fixed the bug, and run <command>svn diff -c 9238</command> to see the patch itself. And Subversion's <literal>merge</literal> command also uses revision numbers. You can merge specific changesets from one branch to another by naming them in the merge arguments: <command>svn merge -c 9238</command> would merge changeset #9238 into your working copy."
8031 msgstr "在Subversion里,一个全局的修订版本号N标示一个版本库中的树:它代表版本库在N次提交后的样子,它也是一个修改集的隐含名称:如果你比较树N与树N-1,你可以得到你提交的补丁。出于这个原因,想象<quote>版本N</quote>并不只是一棵树,也是一个修改集。如果你使用一个问题追踪工具来管理bug,你可以使用版本号来表示特定的补丁修正了bug—举个例子,<quote>这个问题是在版本9238修正的</quote>,然后其他人可以运行<command>svn log -r9238</command>来查看修正这个bug的修改集,或者使用<command>svn diff -r9237:9238</command>来看补丁本身。Subversion的<literal>合并</literal>命令也使用版本号作为参数,可以将特定修改集从一个分支合到另一个分支:<command>svn merge -r9237:9238</command>将会合并修改集#9238到本地拷贝。"
8033 #. (para)
8034 #: ../source/book.xml:7731
8035 msgid "Keep in mind that rolling back a change like this is just like any other <command>svn merge</command> operation, so you should use <command>svn status</command> and <command>svn diff</command> to confirm that your work is in the state you want it to be in, and then use <command>svn commit</command> to send the final version to the repository. After committing, this particular changeset is no longer reflected in the <literal>HEAD</literal> revision."
8036 msgstr "记住回滚修改和任何一个<command>svn merge</command>命令都一样,所以你应该使用<command>svn status</command>或是<command>svn diff</command>来确定你的工作处于期望的状态中,然后使用<command>svn commit</command>来提交,提交之后,这个特定修改集不会反映到<literal>HEAD</literal>版本了。"
8038 #. (para)
8039 #: ../source/book.xml:7739
8040 msgid "Again, you may be thinking: well, that really didn't undo the commit, did it? The change still exists in revision 303. If somebody checks out a version of the <filename>calc</filename> project between revisions 303 and 349, they'll still see the bad change, right?"
8041 msgstr "继续,你也许会想:好吧,这不是真的取消提交吧!是吧?版本303还依然存在着修改,如果任何人取出<filename>calc</filename>的303-349版本,他还会得到错误的修改,对吧?"
8043 #. (para)
8044 #: ../source/book.xml:7759
8045 msgid "The Subversion project has plans, however, to someday implement a command that would accomplish the task of permanently deleting information. In the meantime, see <xref linkend=\"svn.reposadmin.maint.tk.svndumpfilter\"/> for a possible workaround."
8046 msgstr "Subversion项目有计划,不管用什么方式,会有一天要实现<command>svnadmin obliterate</command>命令来进行永久删除操作,而此时可以看<xref linkend=\"svn.reposadmin.maint.tk.svndumpfilter\"/>找到可行的方案。"
8048 #. (para)
8049 #: ../source/book.xml:7744
8050 msgid "Yes, that's true. When we talk about <quote>removing</quote> a change, we're really talking about removing it from <literal>HEAD</literal>. The original change still exists in the repository's history. For most situations, this is good enough. Most people are only interested in tracking the <literal>HEAD</literal> of a project anyway. There are special cases, however, where you really might want to destroy all evidence of the commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, it turns out, because Subversion was deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies. <placeholder-1/>"
8051 msgstr "是的,这是对的。当我们说<quote>删除</quote>一个修改时,我们只是说从<literal>HEAD</literal>删除,原始的修改还保存在版本库历史中,在多数情况下,这是足够好的。大多数人只是对追踪<literal>HEAD</literal>版本感兴趣,在一些特定情况下,你也许希望毁掉所有提交的证据(或许某个人提交了一个秘密文件),这不是很容易的,因为Subversion设计用来不丢失任何信息,每个修订版本都是依赖其它修订版本的不可变目录树 ,从历史删除一个版本会导致多米诺效应,会在后面的版本导致混乱甚至会影响所有的工作拷贝。 <placeholder-1/>"
8053 #. (title)
8054 #: ../source/book.xml:7769
8055 msgid "Resurrecting Deleted Items"
8056 msgstr "找回删除的项目"
8058 #. (para)
8059 #: ../source/book.xml:7771
8060 msgid "The great thing about version control systems is that information is never lost. Even when you delete a file or directory, it may be gone from the <literal>HEAD</literal> revision, but the object still exists in earlier revisions. One of the most common questions new users ask is, <quote>How do I get my old file or directory back?</quote>."
8061 msgstr "版本控制系统非常重要的一个特性就是它的信息从不丢失,即使当你删除了文件或目录,它也许从<literal>HEAD</literal>版本消失了 ,但这个对象依然存在于历史的早期版本 ,一个新手经常问到的问题是<quote>怎样找回我的文件和目录?</quote>。"
8063 #. (para)
8064 #: ../source/book.xml:7777
8065 msgid "The first step is to define exactly <emphasis role=\"bold\">which</emphasis> item you're trying to resurrect. Here's a useful metaphor: you can think of every object in the repository as existing in a sort of two-dimensional coordinate system. The first coordinate is a particular revision tree, and the second coordinate is a path within that tree. So every version of your file or directory can be defined by a specific coordinate pair. (Remember the <quote>peg revision</quote> syntax—foo.c@224 —mentioned back in <xref linkend=\"svn.advanced.pegrevs\"/>.)"
8066 msgstr "第一步首先要知道需要拯救的项目是<emphasis role=\"bold\">什么</emphasis>,这里有个很有用的比喻:你可以认为任何存在于版本库的对象生活在一个二维的坐标系统里,第一维是一个特定的版本树,第二维是在树中的路径,所以你的文件或目录的任何版本可以通过这样一对坐标定义。(记住常见的<quote>peg修订版本</quote>语法— foo.c@224 — 在前面的<xref linkend=\"svn.advanced.pegrevs\"/>提到过。 )"
8068 #. (para)
8069 #: ../source/book.xml:7788
8070 msgid "First, you might need to use <command>svn log</command> to discover the exact coordinate pair you wish to resurrect. A good strategy is to run <command>svn log --verbose</command> in a directory which used to contain your deleted item. The <option>--verbose (-v)</option> option shows a list of all changed items in each revision; all you need to do is find the revision in which you deleted the file or directory. You can do this visually, or by using another tool to examine the log output (via <command>grep</command>, or perhaps via an incremental search in an editor)."
8071 msgstr "首先,你需要<command>svn log</command>来察看你需要找回的坐标对,一个好的策略是使用<command>svn log --verbose</command>来察看包含删除项目的目录,--verbose选项显示所有改变的项目的每一个版本 ,你只需要找出你删除文件或目录的那一个版本。你可以通过目测找出这个版本,也可以使用另一种工具来检查日志的输出 (通过<command>grep</command>或是在编辑器里增量查找)。"
8073 #. (screen)
8074 #: ../source/book.xml:7798
8075 #, no-wrap
8076 msgid ""
8077 "\n"
8078 "$ cd parent-dir\n"
8079 "$ svn log -v\n"
8080 "…\n"
8081 "------------------------------------------------------------------------\n"
8082 "r808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines\n"
8083 "Changed paths:\n"
8084 "   D /calc/trunk/real.c\n"
8085 "   M /calc/trunk/integer.c\n"
8086 "\n"
8087 "Added fast fourier transform functions to integer.c.\n"
8088 "Removed real.c because code now in double.c.\n"
8089 "…\n"
8090 msgstr ""
8091 "\n"
8092 "$ cd parent-dir\n"
8093 "$ svn log -v\n"
8094 "…\n"
8095 "------------------------------------------------------------------------\n"
8096 "r808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines\n"
8097 "Changed paths:\n"
8098 "   D /calc/trunk/real.c\n"
8099 "   M /calc/trunk/integer.c\n"
8100 "\n"
8101 "Added fast fourier transform functions to integer.c.\n"
8102 "Removed real.c because code now in double.c.\n"
8103 "…\n"
8105 #. (para)
8106 #: ../source/book.xml:7812
8107 msgid "In the example, we're assuming that you're looking for a deleted file <filename>real.c</filename>. By looking through the logs of a parent directory, you've spotted that this file was deleted in revision 808. Therefore, the last version of the file to exist was in the revision right before that. Conclusion: you want to resurrect the path <filename>/calc/trunk/real.c</filename> from revision 807."
8108 msgstr "在这个例子里,你可以假定你正在找已经删除了的文件<filename>real.c</filename>,通过查找父目录的历史 ,你知道这个文件在808版本被删除,所以存在这个对象的版本在此之前 。结论:你想从版本807找回<filename>/calc/trunk/real.c</filename>。"
8110 #. (para)
8111 #: ../source/book.xml:7820
8112 msgid "That was the hard part—the research. Now that you know what you want to restore, you have two different choices."
8113 msgstr "以上是最重要的部分—重新找到你需要恢复的对象。现在你已经知道该恢复的文件,而你有两种选择。"
8115 #. (para)
8116 #: ../source/book.xml:7823
8117 #, fuzzy
8118 msgid "One option is to use <command>svn merge</command> to apply revision 808 <quote>in reverse</quote>. (We've already discussed how to undo changes, see <xref linkend=\"svn.branchmerge.advanced.undo\"/>.) This would have the effect of re-adding <filename>real.c</filename> as a local modification. The file would be scheduled for addition, and after a commit, the file would again exist in <literal>HEAD</literal>."
8119 msgstr "一种是对版本反向使用<command>svn merge</command>到808(我们已经学会了如何取消修改,见<xref linkend=\"svn.branchmerge.commonuses.undo\"/>),这样会重新添加<filename>real.c</filename>,这个文件会列入增加的计划,经过一次提交,这个文件重新回到<literal>HEAD</literal>。"
8121 #. (para)
8122 #: ../source/book.xml:7831
8123 msgid "In this particular example, however, this is probably not the best strategy. Reverse-applying revision 808 would not only schedule <filename>real.c</filename> for addition, but the log message indicates that it would also undo certain changes to <filename>integer.c</filename>, which you don't want. Certainly, you could reverse-merge revision 808 and then <command>svn revert</command> the local modifications to <filename>integer.c</filename>, but this technique doesn't scale well. What if there were 90 files changed in revision 808?"
8124 msgstr "在这个例子里,这不是一个好的策略,这样做不仅把<filename>real.c</filename>加入添加到计划,也取消了对<filename>integer.c</filename>的修改,而这不是你期望的。确实,你可以恢复到版本808,然后对<filename>integer.c</filename>执行取消<command>svn revert</command>操作,但这样的操作无法扩大使用,因为如果从版本808修改了90个文件怎么办?"
8126 #. (para)
8127 #: ../source/book.xml:7841
8128 msgid "A second, more targeted strategy is not to use <command>svn merge</command> at all, but rather the <command>svn copy</command> command. Simply copy the exact revision and path <quote>coordinate pair</quote> from the repository to your working copy:"
8129 msgstr "所以第二个方法不是使用<command>svn merge</command>,而是使用<command>svn copy</command>命令,精确的拷贝版本和路径<quote>坐标对</quote>到你的工作拷贝:"
8131 #. (screen)
8132 #: ../source/book.xml:7846
8133 #, no-wrap
8134 msgid ""
8135 "\n"
8136 "$ svn copy -r 807 \\\n"
8137 "           http://svn.example.com/repos/calc/trunk/real.c ./real.c\n"
8138 "\n"
8139 "$ svn status\n"
8140 "A  +   real.c\n"
8141 "\n"
8142 "$ svn commit -m \"Resurrected real.c from revision 807, /calc/trunk/real.c.\"\n"
8143 "Adding         real.c\n"
8144 "Transmitting file data .\n"
8145 "Committed revision 1390.\n"
8146 msgstr ""
8147 "\n"
8148 "$ svn copy -r 807 \\\n"
8149 "           http://svn.example.com/repos/calc/trunk/real.c ./real.c\n"
8150 "\n"
8151 "$ svn status\n"
8152 "A  +   real.c\n"
8153 "\n"
8154 "$ svn commit -m \"Resurrected real.c from revision 807, /calc/trunk/real.c.\"\n"
8155 "Adding         real.c\n"
8156 "Transmitting file data .\n"
8157 "Committed revision 1390.\n"
8159 #. (para)
8160 #: ../source/book.xml:7858
8161 msgid "The plus sign in the status output indicates that the item isn't merely scheduled for addition, but scheduled for addition <quote>with history</quote>. Subversion remembers where it was copied from. In the future, running <command>svn log</command> on this file will traverse back through the file's resurrection and through all the history it had prior to revision 807. In other words, this new <filename>real.c</filename> isn't really new; it's a direct descendant of the original, deleted file."
8162 msgstr "加号标志表明这个项目不仅仅是计划增加中,而且还包含了历史,Subversion记住了它是从哪个拷贝过来的。在将来,对这个文件运行<command>svn log</command>会看到这个文件在版本807之前的历史,换句话说,<filename>real.c</filename>不是新的,而是原先删除的那一个的后代。"
8164 #. (para)
8165 #: ../source/book.xml:7867
8166 msgid "Although our example shows us resurrecting a file, note that these same techniques work just as well for resurrecting deleted directories."
8167 msgstr "尽管我们的例子告诉我们如何找回文件,对于恢复删除的目录也是一样的。"
8169 #. (title)
8170 #: ../source/book.xml:7874
8171 #, fuzzy
8172 msgid "Manually Merging a Branch"
8173 msgstr "创建分支"
8175 #. (para)
8176 #: ../source/book.xml:7876
8177 msgid "###TODO: if basic merge tracking isn't available (client or server is older than 1.5), then here is the 'manual' method for keeping a private branch in sync with trunk, and how to merge it back into trunk:"
8178 msgstr ""
8180 #. (para)
8181 #: ../source/book.xml:7880
8182 msgid "To complete our running example, we'll move forward in time. Suppose several days have passed, and many changes have happened on both the trunk and your private branch. Suppose that you've finished working on your private branch; the feature or bug fix is finally complete, and now you want to merge all of your branch changes back into the trunk for others to enjoy."
8183 msgstr "为了完成这个例子,我们将时间往前推进,假定已经过了几天,在主干和你的分支上都有许多更改,假定你完成了分支上的工作,已经完成了特性或bug修正,你想合并所有分支的修改到主干上,让别人也可以使用。"
8185 #. (para)
8186 #: ../source/book.xml:7887
8187 msgid "So how do we use <command>svn merge</command> in this scenario? Remember that this command compares two trees, and applies the differences to a working copy. So to receive the changes, you need to have a working copy of the trunk. We'll assume that either you still have your original one lying around (fully updated), or that you recently checked out a fresh working copy of <filename>/calc/trunk</filename>."
8188 msgstr "这种场景下如何使用<command>svn merge</command>?记住这个命令比较两个目录树,然后应用比较结果到工作拷贝,所以要接受这种变化,你需要主干的工作拷贝,我们假设你有一个最初的主干工作拷贝(完全更新),或者是你最近取出了<filename>/calc/trunk</filename>的一个干净的工作拷贝。"
8190 #. (para)
8191 #: ../source/book.xml:7894
8192 msgid "But which two trees should be compared? At first glance, the answer may seem obvious: just compare the latest trunk tree with your latest branch tree. But beware—this assumption is <emphasis>wrong</emphasis>, and has burned many a new user! Since <command>svn merge</command> operates like <command>svn diff</command>, comparing the latest trunk and branch trees will <emphasis>not</emphasis> merely describe the set of changes you made to your branch. Such a comparison shows too many changes: it would not only show the addition of your branch changes, but also the <emphasis>removal</emphasis> of trunk changes that never happened on your branch."
8193 msgstr "但是要哪两个树进行比较呢?乍一看,回答很明确,只要比较最新的主干与分支。但是你要意识到—这个想法是<emphasis>错误的</emphasis>,伤害了许多新用户!因为<command>svn merge</command>的操作很像<command>svn diff</command>,比较最新的主干和分支树不仅仅会描述你在分支上所作的修改,这样的比较会展示太多的不同,不仅包括分支上的增加,也包括了主干上的删除操作,而这些删除根本就没有在分支上发生过。"
8195 #. (para)
8196 #: ../source/book.xml:7905
8197 msgid "To express only the changes that happened on your branch, you need to compare the initial state of your branch to its final state. Using <command>svn log</command> on your branch, you can see that your branch was created in revision 341. And the final state of your branch is simply a matter of using the <literal>HEAD</literal> revision. That means you want to compare revisions 341 and <literal>HEAD</literal> of your branch directory, and apply those differences to a working copy of the trunk."
8198 msgstr "为了表示你的分支上的修改,你只需要比较分支的初始状态与最终状态,在你的分支上使用<command>svn log</command>命令,你可以看到你的分支在341版本建立,你的分支最终的状态用<literal>HEAD</literal>版本表示,这意味着你希望能够比较版本341和<literal>HEAD</literal>的分支目录,然后应用这些分支的修改到主干目录的工作拷贝。"
8200 #. (para)
8201 #: ../source/book.xml:7915
8202 msgid "A nice way of finding the revision in which a branch was created (the <quote>base</quote> of the branch) is to use the <option>--stop-on-copy</option> option to <command>svn log</command>. The log subcommand will normally show every change ever made to the branch, including tracing back through the copy which created the branch. So normally, you'll see history from the trunk as well. The <option>--stop-on-copy</option> will halt log output as soon as <command>svn log</command> detects that its target was copied or renamed."
8203 msgstr "查找分支产生的版本(分支的<quote>基准</quote>)的最好方法是在<command>svn log</command>中使用<option>--stop-on-copy</option>选项,log子命令通常会显示所有关于分支的变化,包括创建分支的过程,就好像你在主干上一样,<option>--stop-on-copy</option>会在<command>svn log</command>检测到目标拷贝或者改名时中止日志输出。"
8205 #. (para)
8206 #: ../source/book.xml:7925
8207 msgid "So in our continuing example,"
8208 msgstr "所以,在我们的例子里,"
8210 #. (screen)
8211 #: ../source/book.xml:7926
8212 #, no-wrap
8213 msgid ""
8214 "\n"
8215 "$ svn log -v --stop-on-copy \\\n"
8216 "          http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8217 "…\n"
8218 "------------------------------------------------------------------------\n"
8219 "r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
8220 "Changed paths:\n"
8221 "   A /calc/branches/my-calc-branch (from /calc/trunk:340)\n"
8222 "\n"
8223 "$\n"
8224 msgstr ""
8225 "\n"
8226 "$ svn log -v --stop-on-copy \\\n"
8227 "          http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8228 "…\n"
8229 "------------------------------------------------------------------------\n"
8230 "r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n"
8231 "Changed paths:\n"
8232 "   A /calc/branches/my-calc-branch (from /calc/trunk:340)\n"
8233 "\n"
8234 "$\n"
8236 #. (para)
8237 #: ../source/book.xml:7937
8238 msgid "As expected, the final revision printed by this command is the revision in which <filename>my-calc-branch</filename> was created by copying."
8239 msgstr "正如所料,最后打印出的版本正是由<filename>my-calc-branch</filename>拷贝生成的版本。"
8241 #. (para)
8242 #: ../source/book.xml:7941
8243 msgid "Here's the final merging procedure, then:"
8244 msgstr "如下是最终的合并过程,然后:"
8246 #. (screen)
8247 #: ../source/book.xml:7942
8248 #, no-wrap
8249 msgid ""
8250 "\n"
8251 "$ cd calc/trunk\n"
8252 "$ svn update\n"
8253 "At revision 405.\n"
8254 "\n"
8255 "$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8256 "U   integer.c\n"
8257 "U   button.c\n"
8258 "U   Makefile\n"
8259 "\n"
8260 "$ svn status\n"
8261 "M   integer.c\n"
8262 "M   button.c\n"
8263 "M   Makefile\n"
8264 "\n"
8265 "# ...examine the diffs, compile, test, etc...\n"
8266 "\n"
8267 "$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n"
8268 "Sending        integer.c\n"
8269 "Sending        button.c\n"
8270 "Sending        Makefile\n"
8271 "Transmitting file data ...\n"
8272 "Committed revision 406.\n"
8273 msgstr ""
8274 "\n"
8275 "$ cd calc/trunk\n"
8276 "$ svn update\n"
8277 "At revision 405.\n"
8278 "\n"
8279 "$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8280 "U   integer.c\n"
8281 "U   button.c\n"
8282 "U   Makefile\n"
8283 "\n"
8284 "$ svn status\n"
8285 "M   integer.c\n"
8286 "M   button.c\n"
8287 "M   Makefile\n"
8288 "\n"
8289 "# ...examine the diffs, compile, test, etc...\n"
8290 "\n"
8291 "$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n"
8292 "Sending        integer.c\n"
8293 "Sending        button.c\n"
8294 "Sending        Makefile\n"
8295 "Transmitting file data ...\n"
8296 "Committed revision 406.\n"
8298 #. (para)
8299 #: ../source/book.xml:7966
8300 msgid "Again, notice that the commit log message very specifically mentions the range of changes that was merged into the trunk. Always remember to do this, because it's critical information you'll need later on."
8301 msgstr "再次说明,日志信息中详细描述了合并到主干的的修改范围,记住一定要这么做,这是你以后需要的重要信息。"
8303 #. (para)
8304 #: ../source/book.xml:7970
8305 #, fuzzy
8306 msgid "For example, suppose you decide to keep working on your branch for another week, in order to complete an enhancement to your original feature or bug fix. The repository's <literal>HEAD</literal> revision is now 480, and you're ready to do another merge from your private branch to the trunk. But don't want to merge the changes you've already merged before; you only want to merge everything <quote>new</quote> on your branch since the last time you merged. The trick is to figure out what's new."
8307 msgstr "举个例子,你希望在分支上继续工作一周,来进一步加强你的修正,这时版本库的<literal>HEAD</literal>版本是480,你准备好了另一次合并,但是我们在<xref linkend=\"svn.branchmerge.copychanges.bestprac\"/>提到过,你不想合并已经合并的内容,你只想合并新的东西,技巧就是指出什么是<quote>新</quote>的。"
8309 #. (para)
8310 #: ../source/book.xml:7979
8311 msgid "The first step is to run <command>svn log</command> on the trunk, and look for a log message about the last time you merged from the branch:"
8312 msgstr "第一步是在主干上运行<command>svn log</command>察看最后一次与分支合并的日志信息:"
8314 #. (screen)
8315 #: ../source/book.xml:7982
8316 #, no-wrap
8317 msgid ""
8318 "\n"
8319 "$ cd calc/trunk\n"
8320 "$ svn log\n"
8321 "…\n"
8322 "------------------------------------------------------------------------\n"
8323 "r406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line\n"
8324 "\n"
8325 "Merged my-calc-branch changes r341:405 into the trunk.\n"
8326 "------------------------------------------------------------------------\n"
8327 "…\n"
8328 msgstr ""
8329 "\n"
8330 "$ cd calc/trunk\n"
8331 "$ svn log\n"
8332 "…\n"
8333 "------------------------------------------------------------------------\n"
8334 "r406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line\n"
8335 "\n"
8336 "Merged my-calc-branch changes r341:405 into the trunk.\n"
8337 "------------------------------------------------------------------------\n"
8338 "…\n"
8340 #. (para)
8341 #: ../source/book.xml:7993
8342 msgid "Aha! Since all branch-changes that happened between revisions 341 and 405 were previously merged to the trunk as revision 406, you now know that you want to merge only the branch changes after that—by comparing revisions 406 and <literal>HEAD</literal>."
8343 msgstr "阿哈!因为分支上341到405之间的所有修改已经在版本406合并了,现在你只需要合并分支在此之后的修改—通过比较406和<literal>HEAD</literal>。"
8345 #. (screen)
8346 #: ../source/book.xml:7998
8347 #, no-wrap
8348 msgid ""
8349 "\n"
8350 "$ cd calc/trunk\n"
8351 "$ svn update\n"
8352 "At revision 480.\n"
8353 "\n"
8354 "# We notice that HEAD is currently 480, so we use it to do the merge:\n"
8355 "\n"
8356 "$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8357 "U   integer.c\n"
8358 "U   button.c\n"
8359 "U   Makefile\n"
8360 "\n"
8361 "$ svn commit -m \"Merged my-calc-branch changes r406:480 into the trunk.\"\n"
8362 "Sending        integer.c\n"
8363 "Sending        button.c\n"
8364 "Sending        Makefile\n"
8365 "Transmitting file data ...\n"
8366 "Committed revision 481.\n"
8367 msgstr ""
8368 "\n"
8369 "$ cd calc/trunk\n"
8370 "$ svn update\n"
8371 "At revision 480.\n"
8372 "\n"
8373 "# We notice that HEAD is currently 480, so we use it to do the merge:\n"
8374 "\n"
8375 "$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8376 "U   integer.c\n"
8377 "U   button.c\n"
8378 "U   Makefile\n"
8379 "\n"
8380 "$ svn commit -m \"Merged my-calc-branch changes r406:480 into the trunk.\"\n"
8381 "Sending        integer.c\n"
8382 "Sending        button.c\n"
8383 "Sending        Makefile\n"
8384 "Transmitting file data ...\n"
8385 "Committed revision 481.\n"
8387 #. (para)
8388 #: ../source/book.xml:8017
8389 msgid "Now the trunk contains the complete second wave of changes made to the branch. At this point, you can either delete your branch (we'll discuss this later on), or continue working on your branch and repeat this procedure for subsequent merges."
8390 msgstr "现在主干有了分支上第二波修改的完全结果,此刻,你可以删除你的分支(我们会在以后讨论),或是继续在你分支上工作,重复这个步骤。"
8392 #. (title)
8393 #: ../source/book.xml:8026
8394 msgid "Merge Conflicts"
8395 msgstr "合并冲突"
8397 #. (para)
8398 #: ../source/book.xml:8028
8399 msgid "Just like the <command>svn update</command> command, <command>svn merge</command> applies changes to your working copy. And therefore it's also capable of creating conflicts. The conflicts produced by <command>svn merge</command>, however, are sometimes different, and this section explains those differences."
8400 msgstr "就像<command>svn update</command>命令,<command>svn merge</command>会把修改应用到工作拷贝,因此它也会造成冲突,因为<command>svn merge</command>造成的冲突有时候会有些不同,本小节会解释这些区别。"
8402 #. (para)
8403 #: ../source/book.xml:8034
8404 msgid "To begin with, assume that your working copy has no local edits. When you <command>svn update</command> to a particular revision, the changes sent by the server will always apply <quote>cleanly</quote> to your working copy. The server produces the delta by comparing two trees: a virtual snapshot of your working copy, and the revision tree you're interested in. Because the left-hand side of the comparison is exactly equal to what you already have, the delta is guaranteed to correctly convert your working copy into the right-hand tree."
8405 msgstr "作为开始,我们假定本地没有修改,当你<command>svn update</command>到一个特定修订版本时,修改会<quote>干净的</quote>应用到工作拷贝,服务器产生比较两树的增量数据:一个工作拷贝和你关注的版本树的虚拟快照,因为比较的左边同你拥有的完全相同,增量数据确保你把工作拷贝转化到右边的树。"
8407 #. (para)
8408 #: ../source/book.xml:8044
8409 #, fuzzy
8410 msgid "But <command>svn merge</command> has no such guarantees and can be much more chaotic: the advanced user can ask the server to compare <emphasis>any</emphasis> two trees at all, even ones that are unrelated to the working copy! This means there's large potential for human error. Users will sometimes compare the wrong two trees, creating a delta that doesn't apply cleanly. <command>svn merge</command> will do its best to apply as much of the delta as possible, but some parts may be impossible. Just as the Unix <command>patch</command> command sometimes complains about <quote>failed hunks</quote>, <command>svn merge</command> will complain about <quote>skipped targets</quote>:"
8411 msgstr "但是<command>svn merge</command>没有这样的保证,会导致很多的混乱:用户可以询问服务器比较<emphasis>任何</emphasis>两个树,即使一个与工作拷贝毫不相关的!这意味着有潜在的人为错误,用户有时候会比较两个错误的树,创建的增量数据不会干净的应用,<command>svn merge</command>会尽力应用更多的增量数据,但是有一些部分也许会难以完成,就像Unix下<command>patch</command>命令有时候会报告<quote>failed hunks</quote>错误,<command>svn merge</command>会报告<quote>skipped targets</quote>:"
8413 #. (screen)
8414 #: ../source/book.xml:8056
8415 #, fuzzy, no-wrap
8416 msgid ""
8417 "\n"
8418 "        $ svn merge -r 1288:1351 http://svn.example.com/repos/branch\n"
8419 "        U  foo.c\n"
8420 "        U  bar.c\n"
8421 "        Skipped missing target: 'baz.c'\n"
8422 "        U  glub.c\n"
8423 "        C  glorb.h\n"
8424 "\n"
8425 "        $\n"
8426 "      "
8427 msgstr ""
8428 "\n"
8429 "$ svn merge -r 1288:1351 http://svn.example.com/repos/branch\n"
8430 "U  foo.c\n"
8431 "U  bar.c\n"
8432 "Skipped missing target: 'baz.c'\n"
8433 "U  glub.c\n"
8434 "C  glorb.h\n"
8435 "\n"
8436 "$\n"
8438 #. (para)
8439 #: ../source/book.xml:8066
8440 msgid "In the previous example it might be the case that <filename>baz.c</filename> exists in both snapshots of the branch being compared, and the resulting delta wants to change the file's contents, but the file doesn't exist in the working copy. Whatever the case, the <quote>skipped</quote> message means that the user is most likely comparing the wrong two trees; they're the classic sign of user error. When this happens, it's easy to recursively revert all the changes created by the merge (<command>svn revert --recursive</command>), delete any unversioned files or directories left behind after the revert, and re-run <command>svn merge</command> with different arguments."
8441 msgstr "在前一个例子中,<filename>baz.c</filename>也许会存在于比较的两个分支快照里,但工作拷贝里不存在,比较的增量数据要应用到这个文件,这种情况下会发生什么?<quote>skipped</quote>信息意味着用户可能是在比较错误的两棵树,这是经典的用户错误,当发生这种情况,可以使用迭代恢复(<command>svn revert --recursive</command>)合并所作的修改,删除恢复后留下的所有未版本化的文件和目录,并且使用另外的参数运行<command>svn merge</command>。"
8443 #. (para)
8444 #: ../source/book.xml:8079
8445 msgid "Also notice that the previous example shows a conflict happening on <filename>glorb.h</filename>. We already stated that the working copy has no local edits: how can a conflict possibly happen? Again, because the user can use <command>svn merge</command> to define and apply any old delta to the working copy, that delta may contain textual changes that don't cleanly apply to a working file, even if the file has no local modifications."
8446 msgstr "也应当注意前一个例子显示<filename>glorb.h</filename>发生了冲突,我们已经规定本地拷贝没有修改:冲突怎么会发生呢?因为用户可以使用<command>svn merge</command>将过去的任何变化应用到当前工作拷贝,变化包含的文本修改也许并不能干净的应用到工作拷贝文件,即使这些文件没有本地修改。"
8448 #. (para)
8449 #: ../source/book.xml:8087
8450 msgid "Another small difference between <command>svn update</command> and <command>svn merge</command> are the names of the full-text files created when a conflict happens. In <xref linkend=\"svn.tour.cycle.resolve\"/>, we saw that an update produces files named <filename>filename.mine</filename>, <filename>filename.rOLDREV</filename>, and <filename>filename.rNEWREV</filename>. When <command>svn merge</command> produces a conflict, though, it creates three files named <filename>filename.working</filename>, <filename>filename.left</filename>, and <filename>filename.right</filename>. In this case, the terms <quote>left</quote> and <quote>right</quote> are describing which side of the double-tree comparison the file came from. In any case, these differing names will help you distinguish between conflicts that happened as a result of an update versus ones that happened as a result of a merge."
8451 msgstr "另一个<command>svn update</command>和<command>svn merge</command>的小区别是冲突产生的文件的名字不同,在<xref linkend=\"svn.tour.cycle.resolve\"/>,我们看到过更新产生的文件名字为<filename>filename.mine</filename>、<filename>filename.rOLDREV</filename>和<filename>filename.rNEWREV</filename>,当<command>svn merge</command>产生冲突时,它产生的三个文件分别为 <filename>filename.working</filename>、<filename>filename.left</filename>和<filename>filename.right</filename>。在这种情况下,术语<quote>left</quote>和<quote>right</quote>表示了两棵树比较时的两边,在两种情况下,不同的名字会帮助你区分冲突是因为更新造成的还是合并造成的。"
8453 #. (title)
8454 #: ../source/book.xml:8109
8455 #, fuzzy
8456 msgid "Blocking Changes"
8457 msgstr "取消修改"
8459 #. (para)
8460 #: ../source/book.xml:8111
8461 msgid "###TODO: discuss use of 'svn merge --record-only', give example. Explain the need to differentiate between 'not merged' and 'don't want to merge'. Explain that in 1.5, users need to manualy track blocked revisions in a text file or in property. A future version of svn will learn to differentiate between the two concepts."
8462 msgstr ""
8464 #. (title)
8465 #: ../source/book.xml:8121
8466 msgid "Logging and Blaming"
8467 msgstr ""
8469 #. (para)
8470 #: ../source/book.xml:8123
8471 msgid "###TODO: demonstrate 'svn log -g' and 'svn blame -g', and explain why they're useful."
8472 msgstr ""
8474 #. (title)
8475 #: ../source/book.xml:8129
8476 msgid "Noticing or Ignoring Ancestry"
8477 msgstr "关注还是忽视祖先"
8479 #. (para)
8480 #: ../source/book.xml:8131
8481 msgid "When conversing with a Subversion developer, you might very likely hear reference to the term <firstterm>ancestry</firstterm>. This word is used to describe the relationship between two objects in a repository: if they're related to each other, then one object is said to be an ancestor of the other."
8482 msgstr "当与Subversion开发者交谈时你一定会听到提及术语<firstterm>祖先</firstterm>,这个词是用来描述两个对象的关系:如果他们互相关联,一个对象就是另一个的祖先,或者相反。"
8484 #. (para)
8485 #: ../source/book.xml:8137
8486 msgid "For example, suppose you commit revision 100, which includes a change to a file <filename>foo.c</filename>. Then <filename>foo.c@99</filename> is an <quote>ancestor</quote> of <filename>foo.c@100</filename>. On the other hand, suppose you commit the deletion of <filename>foo.c</filename> in revision 101, and then add a new file by the same name in revision 102. In this case, <filename>foo.c@99</filename> and <filename>foo.c@102</filename> may appear to be related (they have the same path), but in fact are completely different objects in the repository. They share no history or <quote>ancestry</quote>."
8487 msgstr "举个例子,假设你提交版本100,包括对<filename>foo.c</filename>的修改,则foo.c@99是foo.c@100的一个<quote>祖先</quote>,另一方面,假设你在版本101删除这个文件,而在102版本提交一个同名的文件,在这个情况下,<filename>foo.c@99</filename>与<filename>foo.c@102</filename>看起来是关联的(有同样的路径),但是事实上他们是完全不同的对象,它们并不共享同一个历史或者说<quote>祖先</quote>。"
8489 #. (para)
8490 #: ../source/book.xml:8149
8491 msgid "The reason for bringing this up is to point out an important difference between <command>svn diff</command> and <command>svn merge</command>. The former command ignores ancestry, while the latter command is quite sensitive to it. For example, if you asked <command>svn diff</command> to compare revisions 99 and 102 of <filename>foo.c</filename>, you would see line-based diffs; the <literal>diff</literal> command is blindly comparing two paths. But if you asked <command>svn merge</command> to compare the same two objects, it would notice that they're unrelated and first attempt to delete the old file, then add the new file; the output would indicate a deletion followed by an add:"
8492 msgstr "指出<command>svn diff</command>和<command>svn merge</command>区别的重要性在于,前一个命令忽略祖先,如果你询问<command>svn diff</command>来比较文件<filename>foo.c</filename>的版本99和102,你会看到行为基础的区别,<literal>diff</literal>命令只是盲目的比较两条路径,但是如果你使用<command>svn merge</command>是比较同样的两个对象,它会注意到他们是不关联的,而且首先尝试删除旧文件,然后添加新文件,输出会是一个删除紧接着一个增加:"
8494 #. (screen)
8495 #: ../source/book.xml:8161
8496 #, fuzzy, no-wrap
8497 msgid ""
8498 "\n"
8499 "        D  foo.c\n"
8500 "        A  foo.c\n"
8501 "      "
8502 msgstr ""
8503 "\n"
8504 "$ svn add foo.c \n"
8505 "A         foo.c\n"
8507 #. (para)
8508 #: ../source/book.xml:8165
8509 msgid "Most merges involve comparing trees that are ancestrally related to one another, and therefore <command>svn merge</command> defaults to this behavior. Occasionally, however, you may want the <literal>merge</literal> command to compare two unrelated trees. For example, you may have imported two source-code trees representing different vendor releases of a software project (see <xref linkend=\"svn.advanced.vendorbr\"/>). If you asked <command>svn merge</command> to compare the two trees, you'd see the entire first tree being deleted, followed by an add of the entire second tree! In these situations, you'll want <command>svn merge</command> to do a path-based comparison only, ignoring any relations between files and directories. Add the <option>--ignore-ancestry</option> option to your merge command, and it will behave just like <command>svn diff</command>. (And conversely, the <option>--notice-ancestry</option> option will cause <command>svn diff</command> to behave like the <literal>merge</literal> command.)"
8510 msgstr "大多数合并包括比较包括祖先关联的两条树,因此<command>svn merge</command>这样运作,然而,你也许会希望<literal>merge</literal>命令能够比较两个不相关的目录树,举个例子,你有两个目录树分别代表了卖主软件项目的不同版本(见<xref linkend=\"svn.advanced.vendorbr\"/>),如果你使用<command>svn merge</command>进行比较,你会看到第一个目录树被删除,而第二个树添加上!在这个情况下,你仅仅是希望<command>svn merge</command>以路径为基础比较两棵树,而忽略文件和目录的不相关性,当为合并命令添加<option>--ignore-ancestry</option>选项时,就会像<command>svn diff</command>一样工作。(相反,<option>--notice-ancestry</option>会导致<command>svn diff</command>像<literal>merge</literal>命令一样工作。)"
8512 #. (title)
8513 #: ../source/book.xml:8187
8514 msgid "Merges and Moves"
8515 msgstr "合并和移动"
8517 #. (para)
8518 #: ../source/book.xml:8189
8519 msgid "A common desire is to refactor source code, especially in Java-based software projects. Files and directories are shuffled around and renamed, often causing great disruption to everyone working on the project. Sounds like a perfect case to use a branch, doesn't it? Just create a branch, shuffle things around, then merge the branch back to the trunk, right?"
8520 msgstr "一个普遍的愿望是重构源程序,特别是Java软件项目。在改名中文件和目录变乱,通常导致每个项目成员的极大破坏。听起来好像应该使用分支,不是吗?只是创建分支,变乱事情,然后合并回主干,不对吗?"
8522 #. (para)
8523 #: ../source/book.xml:8196
8524 msgid "Alas, this scenario doesn't work so well right now, and is considered one of Subversion's current weak spots. The problem is that Subversion's <command>update</command> command isn't as robust as it should be, particularly when dealing with copy and move operations."
8525 msgstr "唉,这个场景下这样并不正确,可以看作Subversion当前的弱点,这个问题是因为Subversion的<command>update</command>还不是足够的强壮,特别是针对拷贝和移动操作。"
8527 #. (para)
8528 #: ../source/book.xml:8201
8529 msgid "When you use <command>svn copy</command> to duplicate a file, the repository remembers where the new file came from, but it fails to transmit that information to the client which is running <command>svn update</command> or <command>svn merge</command>. Instead of telling the client, <quote>Copy that file you already have to this new location</quote>, it instead sends down an entirely new file. This can lead to problems, especially because the same thing happens with renamed files. A lesser-known fact about Subversion is that it lacks <quote>true renames</quote>—the <command>svn move</command> command is nothing more than an aggregation of <command>svn copy</command> and <command>svn delete</command>."
8530 msgstr "当你使用<command>svn copy</command>复制文件时,版本库会记住新文件的出处,但是它不能将这个信息传递给使用<command>svn update</command>或<command>svn merge</command>的客户端,不是告诉客户端<quote> 将文件拷贝到新的位置</quote>,而是传递一整个新文件。这样会导致问题,特别是因为这件事也发生在改名的文件。 一个鲜为人知的事实是Subversion缺乏真正的重命名—<command>svn move</command>命令只是一个<command>svn copy</command>和<command>svn delete</command>的组合。"
8532 #. (para)
8533 #: ../source/book.xml:8214
8534 msgid "For example, suppose that while working on your private branch, you rename <filename>integer.c</filename> to <filename>whole.c</filename>. Effectively you've created a new file in your branch that is a copy of the original file, and deleted the original file. Meanwhile, back on <filename>trunk</filename>, Sally has committed some improvements to <filename>integer.c</filename>. Now you decide to merge your branch to the trunk:"
8535 msgstr "例如,假定我们在一个私有分支工作,你将<filename>integer.c</filename>改名为<filename>whole.c</filename>,你这是在分支上创建了原来文件的一个拷贝,并且删除了原来的文件。同时,回到<filename>trunk</filename>,Sally提交了一些<filename>integer.c</filename>的修改,所以你需要将分支合并到主干:"
8537 #. (screen)
8538 #: ../source/book.xml:8222
8539 #, fuzzy, no-wrap
8540 msgid ""
8541 "\n"
8542 "        $ cd calc/trunk\n"
8543 "\n"
8544 "        $ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8545 "        D   integer.c\n"
8546 "        A   whole.c\n"
8547 "      "
8548 msgstr ""
8549 "\n"
8550 "$ cd calc/trunk\n"
8551 "\n"
8552 "$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8553 "D   integer.c\n"
8554 "A   whole.c\n"
8556 #. (para)
8557 #: ../source/book.xml:8229
8558 msgid "This doesn't look so bad at first glance, but it's also probably not what you or Sally expected. The merge operation has deleted the latest version of <filename>integer.c</filename> file (the one containing Sally's latest changes), and blindly added your new <filename>whole.c</filename> file—which is a duplicate of the <emphasis>older</emphasis> version of <filename>integer.c</filename>. The net effect is that merging your <quote>rename</quote> to the branch has removed Sally's recent changes from the latest revision!"
8559 msgstr "第一眼看起来不是很差,但是很可能这不是你和Sally希望的,合并操作已经删除了最新版本的<filename>integer.c</filename>(包含了Sally最新的修改),而且盲目的添加了你的<filename>whole.c</filename>文件—是旧版本的<filename>integer.c</filename>复制品。最终的结果是将你的<quote>rename</quote>合并到分支,并且从最新修订版本删除了Sally最近的修改。"
8561 #. (para)
8562 #: ../source/book.xml:8239
8563 msgid "This isn't true data-loss; Sally's changes are still in the repository's history, but it may not be immediately obvious that this has happened. The moral of this story is that until Subversion improves, be very careful about merging copies and renames from one branch to another."
8564 msgstr "这不是真的数据丢失;Sally的修改还在版本库的历史中,但是。在Subversion改进之前,最好小心对分支进行合并和改名。"
8566 #. (title)
8567 #: ../source/book.xml:8249
8568 #, fuzzy
8569 msgid "Blocking Pre-1.5 Clients"
8570 msgstr "锁定策略"
8572 #. (para)
8573 #: ../source/book.xml:8251
8574 msgid "###TODO: Why you might want to do this. (How did we decide to do this??)"
8575 msgstr ""
8577 #. (title)
8578 #: ../source/book.xml:8260
8579 msgid "Common Branching Patterns"
8580 msgstr "常用分支模式"
8582 #. (para)
8583 #: ../source/book.xml:8262
8584 msgid "There are many different uses for branching and <command>svn merge</command>, and this section describes the most common ones you're likely to run into."
8585 msgstr "分支和<command>svn merge</command>有很多不同的用法,这个小节描述了最常见的用法。"
8587 #. (para)
8588 #: ../source/book.xml:8265
8589 msgid "Version control is most often used for software development, so here's a quick peek at two of the most common branching/merging patterns used by teams of programmers. If you're not using Subversion for software development, feel free to skip this section. If you're a software developer using version control for the first time, pay close attention, as these patterns are often considered best practices by experienced folk. These processes aren't specific to Subversion; they're applicable to any version control system. Still, it may help to see them described in Subversion terms."
8590 msgstr "版本控制在软件开发中广泛使用,这里是团队里程序员最常用的两种分支/合并模式的介绍,如果你不是使用Subversion软件开发,可随意跳过本小节,如果你是第一次使用版本控制的软件开发者,请更加注意,以下模式被许多老兵当作最佳实践,这个过程并不只是针对Subversion,在任何版本控制系统中都一样,但是在这里使用Subversion术语会感觉更方便一点。"
8592 #. (title)
8593 #: ../source/book.xml:8279
8594 msgid "Release Branches"
8595 msgstr "发布分支"
8597 #. (para)
8598 #: ../source/book.xml:8281
8599 msgid "Most software has a typical lifecycle: code, test, release, repeat. There are two problems with this process. First, developers need to keep writing new features while quality-assurance teams take time to test supposedly-stable versions of the software. New work cannot halt while the software is tested. Second, the team almost always needs to support older, released versions of software; if a bug is discovered in the latest code, it most likely exists in released versions as well, and customers will want to get that bugfix without having to wait for a major new release."
8600 msgstr "大多数软件存在这样一个生命周期:编码、测试、发布,然后重复。这样有两个问题,第一,开发者需要在质量保证小组测试假定稳定版本时继续开发新特性,新工作在软件测试时不可以中断,第二,小组必须一直支持老的发布版本和软件;如果一个bug在最新的代码中发现,它一定也存在已发布的版本中,客户希望立刻得到错误修正而不必等到新版本发布。"
8602 #. (para)
8603 #: ../source/book.xml:8292
8604 msgid "Here's where version control can help. The typical procedure looks like this:"
8605 msgstr "这是版本控制可以做的帮助,典型的过程如下:"
8607 #. (para)
8608 #: ../source/book.xml:8296
8609 msgid "<emphasis>Developers commit all new work to the trunk.</emphasis> Day-to-day changes are committed to <filename>/trunk</filename>: new features, bugfixes, and so on."
8610 msgstr "<emphasis>开发者提交所有的新特性到主干。</emphasis> 每日的修改提交到<filename>/trunk</filename>:新特性,bug修正和其他。"
8612 #. (para)
8613 #: ../source/book.xml:8304
8614 msgid "<emphasis>The trunk is copied to a <quote>release</quote> branch.</emphasis> When the team thinks the software is ready for release (say, a 1.0 release), then <filename>/trunk</filename> might be copied to <filename>/branches/1.0</filename>."
8615 msgstr "<emphasis>这个主干被拷贝到<quote>发布</quote>分支。</emphasis> 当小组认为软件已经做好发布的准备(如,版本1.0)然后<filename>/trunk</filename>会被拷贝到<filename>/branches/1.0</filename>。"
8617 #. (para)
8618 #: ../source/book.xml:8313
8619 msgid "<emphasis>Teams continue to work in parallel.</emphasis> One team begins rigorous testing of the release branch, while another team continues new work (say, for version 2.0) on <filename>/trunk</filename>. If bugs are discovered in either location, fixes are ported back and forth as necessary. At some point, however, even that process stops. The branch is <quote>frozen</quote> for final testing right before a release."
8620 msgstr "<emphasis>项目组继续并行工作,</emphasis>一个小组开始对分支进行严酷的测试,同时另一个小组在<filename>/trunk</filename>继续新的工作(如,准备2.0),如果一个bug在任何一个位置被发现,错误修正需要来回运送。然而这个过程有时候也会结束,例如分支已经为发布前的最终测试<quote>停滞</quote>了。"
8622 #. (para)
8623 #: ../source/book.xml:8324
8624 msgid "<emphasis>The branch is tagged and released.</emphasis> When testing is complete, <filename>/branches/1.0</filename> is copied to <filename>/tags/1.0.0</filename> as a reference snapshot. The tag is packaged and released to customers."
8625 msgstr "<emphasis>分支已经作了标签并且发布,</emphasis>当测试结束,<filename>/branches/1.0</filename>作为引用快照已经拷贝到<filename>/tags/1.0.0</filename>,这个标签被打包发布给客户。"
8627 #. (para)
8628 #: ../source/book.xml:8333
8629 msgid "<emphasis>The branch is maintained over time.</emphasis> While work continues on <filename>/trunk</filename> for version 2.0, bugfixes continue to be ported from <filename>/trunk</filename> to <filename>/branches/1.0</filename>. When enough bugfixes have accumulated, management may decide to do a 1.0.1 release: <filename>/branches/1.0</filename> is copied to <filename>/tags/1.0.1</filename>, and the tag is packaged and released."
8630 msgstr "<emphasis>分支多次维护。</emphasis>当继续在<filename>/trunk</filename>上为版本2.0工作,bug修正继续从<filename>/trunk</filename>运送到<filename>/branches/1.0</filename>,如果积累了足够的bug修正,管理部门决定发布1.0.1版本:拷贝<filename>/branches/1.0</filename>到<filename>/tags/1.0.1</filename>,标签被打包发布。"
8632 #. (para)
8633 #: ../source/book.xml:8345
8634 msgid "This entire process repeats as the software matures: when the 2.0 work is complete, a new 2.0 release branch is created, tested, tagged, and eventually released. After some years, the repository ends up with a number of release branches in <quote>maintenance</quote> mode, and a number of tags representing final shipped versions."
8635 msgstr "整个过程随着软件的成熟不断重复:当2.0完成,一个新的2.0分支被创建,测试、打标签和最终发布,经过许多年,版本库结束了许多版本发布,进入了<quote>维护</quote>模式,许多标签代表了最终的发布版本。"
8637 #. (title)
8638 #: ../source/book.xml:8355
8639 msgid "Feature Branches"
8640 msgstr "特性分支"
8642 #. (para)
8643 #: ../source/book.xml:8357
8644 msgid "A <firstterm>feature branch</firstterm> is the sort of branch that's been the dominant example in this chapter, the one you've been working on while Sally continues to work on <filename>/trunk</filename>. It's a temporary branch created to work on a complex change without interfering with the stability of <filename>/trunk</filename>. Unlike release branches (which may need to be supported forever), feature branches are born, used for a while, merged back to the trunk, then ultimately deleted. They have a finite span of usefulness."
8645 msgstr "一个<firstterm>特性分支</firstterm>是本章中那个重要例子中的分支,你正在那个分支上工作,而Sally还在<filename>/trunk</filename>继续工作,这是一个临时分支,用来作复杂的修改而不会干扰<filename>/trunk</filename>的稳定性,不象发布分支(也许要永远支持),特性分支出生,使用了一段时间,合并到主干,然后最终被删除掉,它们在有限的时间里有用。"
8647 #. (para)
8648 #: ../source/book.xml:8367
8649 msgid "Again, project policies vary widely concerning exactly when it's appropriate to create a feature branch. Some projects never use feature branches at all: commits to <filename>/trunk</filename> are a free-for-all. The advantage to this system is that it's simple—nobody needs to learn about branching or merging. The disadvantage is that the trunk code is often unstable or unusable. Other projects use branches to an extreme: no change is <emphasis>ever</emphasis> committed to the trunk directly. Even the most trivial changes are created on a short-lived branch, carefully reviewed and merged to the trunk. Then the branch is deleted. This system guarantees an exceptionally stable and usable trunk at all times, but at the cost of tremendous process overhead."
8650 msgstr "还有,关于是否创建特性分支的项目政策也变化广泛,一些项目永远不使用特性分支:大家都可以提交到<filename>/trunk</filename>,好处是系统的简单—没有人需要知道分支和合并,坏处是主干会经常不稳定或者不可用,另外一些项目使用分支达到极限:没有修改<emphasis>曾经</emphasis>直接提交到主干,即使最细小的修改都要创建短暂的分支,然后小心的审核合并到主干,然后删除分支,这样系统保持主干一直稳定和可用,但是造成了巨大的负担。"
8652 #. (para)
8653 #: ../source/book.xml:8381
8654 msgid "Most projects take a middle-of-the-road approach. They commonly insist that <filename>/trunk</filename> compile and pass regression tests at all times. A feature branch is only required when a change requires a large number of destabilizing commits. A good rule of thumb is to ask this question: if the developer worked for days in isolation and then committed the large change all at once (so that <filename>/trunk</filename> were never destabilized), would it be too large a change to review? If the answer to that question is <quote>yes</quote>, then the change should be developed on a feature branch. As the developer commits incremental changes to the branch, they can be easily reviewed by peers."
8655 msgstr "许多项目采用折中的方式,坚持每次编译<filename>/trunk</filename>并进行回归测试,只有需要多次不稳定提交时才需要一个特性分支,这个规则可以用这样一个问题检验:如果开发者在好几天里独立工作,一次提交大量修改(这样<filename>/trunk</filename>就不会不稳定。),是否会有太多的修改要来回顾?如果答案是<quote>是</quote>,这些修改应该在特性分支上进行,因为开发者增量的提交修改,你可以容易的回头检查。"
8657 #. (para)
8658 #: ../source/book.xml:8394
8659 msgid "Finally, there's the issue of how to best keep a feature branch in <quote>sync</quote> with the trunk as work progresses. As we mentioned earlier, there's a great risk to working on a branch for weeks or months; trunk changes may continue to pour in, to the point where the two lines of development differ so greatly that it may become a nightmare trying to merge the branch back to the trunk."
8660 msgstr "最终,有一个问题就是怎样保持一个特性分支<quote>同步</quote>于工作中的主干,在前面提到过,在一个分支上工作数周或几个月是很有风险的,主干的修改也许会持续涌入,因为这一点,两条线的开发会区别巨大,合并分支回到主干会成为一个噩梦。"
8662 #. (para)
8663 #: ../source/book.xml:8401
8664 #, fuzzy
8665 msgid "This situation is best avoided by regularly merging trunk changes to the branch. Make up a policy: once a week, merge the last week's worth of trunk changes to the branch. Take care when doing this; the merging needs to be hand-tracked to avoid the problem of repeated merges. You'll need to write careful log messages detailing exactly which revision ranges have been merged already. It may sound intimidating, but it's actually pretty easy to do."
8666 msgstr "这种情况最好通过有规律的将主干合并到分支来避免,制定这样一个政策:每周将上周的修改合并到分支,注意这样做时需要小心,需要手工记录合并的过程,以避免重复的合并(在<xref linkend=\"svn.branchmerge.copychanges.bestprac.track\"/>描述过),你需要小心的撰写合并的日志信息,精确的描述合并包括的范围(在<xref linkend=\"svn.branchmerge.commonuses.wholebr\"/>中描述过),这看起来像是胁迫,可是实际上是容易做到的。"
8668 #. (para)
8669 #: ../source/book.xml:8409
8670 msgid "At some point, you'll be ready to merge the <quote>synchronized</quote> feature branch back to the trunk. To do this, begin by doing a final merge of the latest trunk changes to the branch. When that's done, the latest versions of branch and trunk will be absolutely identical except for your branch changes. So in this special case, you would merge by comparing the branch with the trunk:"
8671 msgstr "在一些时候,你已经准备好了将<quote>同步的</quote>特性分支合并回到主干,为此,开始做一次将主干最新修改和分支的最终合并,这样以后,除了你的分支修改的部分,最新的分支和主干将会绝对一致,所以在这个特别的例子里,你会通过直接比较分支和主干来进行合并:"
8673 #. (para)
8674 #: ../source/book.xml:8416
8675 msgid "###TODO: SIMPLIFY THIS EXAMPLE TO SHOW MERGE-TRACKING"
8676 msgstr ""
8678 #. (screen)
8679 #: ../source/book.xml:8417
8680 #, fuzzy, no-wrap
8681 msgid ""
8682 "\n"
8683 "        $ cd trunk-working-copy\n"
8684 "\n"
8685 "        $ svn update\n"
8686 "        At revision 1910.\n"
8687 "\n"
8688 "        $ svn merge http://svn.example.com/repos/calc/trunk@1910 \\\n"
8689 "        http://svn.example.com/repos/calc/branches/mybranch@1910\n"
8690 "        U  real.c\n"
8691 "        U  integer.c\n"
8692 "        A  newdirectory\n"
8693 "        A  newdirectory/newfile\n"
8694 "        …\n"
8695 "      "
8696 msgstr ""
8697 "\n"
8698 "$ cd trunk-working-copy\n"
8699 "\n"
8700 "$ svn update\n"
8701 "At revision 1910.\n"
8702 "\n"
8703 "$ svn merge http://svn.example.com/repos/calc/trunk@1910 \\\n"
8704 "            http://svn.example.com/repos/calc/branches/mybranch@1910\n"
8705 "U  real.c\n"
8706 "U  integer.c\n"
8707 "A  newdirectory\n"
8708 "A  newdirectory/newfile\n"
8709 "…\n"
8711 #. (para)
8712 #: ../source/book.xml:8431
8713 msgid "By comparing the <literal>HEAD</literal> revision of the trunk with the <literal>HEAD</literal> revision of the branch, you're defining a delta that describes only the changes you made to the branch; both lines of development already have all of the trunk changes."
8714 msgstr "通过比较<literal>HEAD</literal>修订版本的主干和<literal>HEAD</literal>修订版本的分支,你确定了只在分支上的增量信息,两条开发线都有了分枝的修改。"
8716 #. (para)
8717 #: ../source/book.xml:8436
8718 msgid "Another way of thinking about this pattern is that your weekly sync of trunk to branch is analogous to running <command>svn update</command> in a working copy, while the final merge step is analogous to running <command>svn commit</command> from a working copy. After all, what else <emphasis>is</emphasis> a working copy but a very shallow private branch? It's a branch that's only capable of storing one change at a time."
8719 msgstr "可以用另一种考虑这种模式,你每周按时同步分支到主干,类似于在工作拷贝执行<command>svn update</command>的命令,最终的合并操作类似于在工作拷贝运行<command>svn commit</command>,毕竟,工作拷贝不就是一个非常浅的分支吗?只是它一次只可以保存一个修改。"
8721 #. (title)
8722 #: ../source/book.xml:8451
8723 msgid "Traversing Branches"
8724 msgstr "使用分支"
8726 #. (para)
8727 #: ../source/book.xml:8453
8728 msgid "The <command>svn switch</command> command transforms an existing working copy to reflect a different branch. While this command isn't strictly necessary for working with branches, it provides a nice shortcut. In our earlier example, after creating your private branch, you checked out a fresh working copy of the new repository directory. Instead, you can simply ask Subversion to change your working copy of <filename>/calc/trunk</filename> to mirror the new branch location:"
8729 msgstr "<command>svn switch</command>命令改变存在的工作拷贝到另一个分支,然而这个命令在分支上工作时不是严格必要的,它只是提供了一个快捷方式。在前面的例子里,完成了私有分支的建立,你取出了新目录的工作拷贝,相反,你可以简单的告诉Subversion改变你的<filename>/calc/trunk</filename>的工作拷贝到分支的路径:"
8731 #. (screen)
8732 #: ../source/book.xml:8462
8733 #, no-wrap
8734 msgid ""
8735 "\n"
8736 "$ cd calc\n"
8737 "\n"
8738 "$ svn info | grep URL\n"
8739 "URL: http://svn.example.com/repos/calc/trunk\n"
8740 "\n"
8741 "$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8742 "U   integer.c\n"
8743 "U   button.c\n"
8744 "U   Makefile\n"
8745 "Updated to revision 341.\n"
8746 "\n"
8747 "$ svn info | grep URL\n"
8748 "URL: http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8749 msgstr ""
8750 "\n"
8751 "$ cd calc\n"
8752 "\n"
8753 "$ svn info | grep URL\n"
8754 "URL: http://svn.example.com/repos/calc/trunk\n"
8755 "\n"
8756 "$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8757 "U   integer.c\n"
8758 "U   button.c\n"
8759 "U   Makefile\n"
8760 "Updated to revision 341.\n"
8761 "\n"
8762 "$ svn info | grep URL\n"
8763 "URL: http://svn.example.com/repos/calc/branches/my-calc-branch\n"
8765 #. (para)
8766 #: ../source/book.xml:8477
8767 msgid "After <quote>switching</quote> to the branch, your working copy is no different than what you would get from doing a fresh checkout of the directory. And it's usually more efficient to use this command, because often branches only differ by a small degree. The server sends only the minimal set of changes necessary to make your working copy reflect the branch directory."
8768 msgstr "完成了到分支的<quote>跳转</quote>,你的目录与直接取出一个干净的版本没有什么不同。这样会更有效率,因为分支只有很小的区别,服务器只是发送修改的部分来使你的工作拷贝反映分支。"
8770 #. (para)
8771 #: ../source/book.xml:8484
8772 msgid "The <command>svn switch</command> command also takes a <option>--revision</option> (<option>-r</option>) option, so you need not always move your working copy to the <literal>HEAD</literal> of the branch."
8773 msgstr "<command>svn switch</command>命令也可以带<option>--revision</option>(<option>-r</option>)参数,所以你不需要一直移动你的工作拷贝到分支的<literal>HEAD</literal>。"
8775 #. (para)
8776 #: ../source/book.xml:8488
8777 msgid "Of course, most projects are more complicated than our <filename>calc</filename> example, containing multiple subdirectories. Subversion users often follow a specific algorithm when using branches:"
8778 msgstr "当然,许多项目比我们的<filename>calc</filename>要复杂的多,有更多的子目录,Subversion用户通常用如下的法则使用分支:"
8780 #. (para)
8781 #: ../source/book.xml:8494
8782 msgid "Copy the project's entire <quote>trunk</quote> to a new branch directory."
8783 msgstr "拷贝整个项目的<quote>trunk</quote>目录到一个新的分支目录。"
8785 #. (para)
8786 #: ../source/book.xml:8498
8787 msgid "Switch only <emphasis>part</emphasis> of the trunk working copy to mirror the branch."
8788 msgstr "只是转换工作拷贝的<emphasis>部分</emphasis>目录到分支。"
8790 #. (para)
8791 #: ../source/book.xml:8502
8792 msgid "In other words, if a user knows that the branch-work only needs to happen on a specific subdirectory, they use <command>svn switch</command> to move only that subdirectory to the branch. (Or sometimes users will switch just a single working file to the branch!) That way, they can continue to receive normal <quote>trunk</quote> updates to most of their working copy, but the switched portions will remain immune (unless someone commits a change to their branch). This feature adds a whole new dimension to the concept of a <quote>mixed working copy</quote>—not only can working copies contain a mixture of working revisions, but a mixture of repository locations as well."
8793 msgstr "换句话说,如果一个用户知道分支工作只发生在部分子目录,我们使用<command>svn switch</command>来跳转部分目录(有时候只是单个文件),这样的话,他们依然可以继续得到普通的<quote>trunk</quote>主干的更新,但是已经跳转的部分则被免去了更新(除非分支上有更新)。这个特性给<quote>混合工作拷贝</quote>概念添加了新的维度—不仅工作拷贝的版本可以混合,在版本库中的位置也可以混合。"
8795 #. (para)
8796 #: ../source/book.xml:8514
8797 msgid "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 will still be applied as a single, atomic change to the repository."
8798 msgstr "如果你的工作拷贝包含许多来自不同版本库目录跳转的子树,它会工作如常。当你更新时,你会得到每一个目录适当的补丁,当你提交时,你的本地修改会一直作为一个单独的原子修改提交到版本库。"
8800 #. (para)
8801 #: ../source/book.xml:8525
8802 msgid "You <emphasis>can</emphasis>, however, use <command>svn switch</command> with the <option>--relocate</option> option if the URL of your server changes and you don't want to abandon an existing working copy. See <xref linkend=\"svn.ref.svn.c.switch\"/> for more information and an example."
8803 msgstr "如果你不希望抛弃已存在的工作拷贝,你<emphasis>可以</emphasis>使用带<option>--relocate</option>选项的<command>svn switch</command>命令转换URL,更多信息和例子可以看<xref linkend=\"svn.ref.svn.c.switch\"/>。"
8805 #. (para)
8806 #: ../source/book.xml:8519
8807 msgid "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 repositories aren't yet able to communicate with one another; that's a feature planned for the future. <placeholder-1/>"
8808 msgstr "注意,因为你的工作拷贝可以在混合位置的情况下工作正常,但是所有的位置必须在同一个版本库,Subversion的版本库不能互相通信,这个特性还不在Subversion未来的计划里。"
8810 #. (title)
8811 #: ../source/book.xml:8532
8812 msgid "Switches and Updates"
8813 msgstr "切换和更新"
8815 #. (para)
8816 #: ../source/book.xml:8534
8817 msgid "Have you noticed that the output of <command>svn switch</command> and <command>svn update</command> look the same? The <literal>switch</literal> command is actually a superset of the update command."
8818 msgstr "你注意到<command>svn switch</command>和<command>svn update</command>的输出很像?<literal>switch</literal>命令只是update命令的一个超集。"
8820 #. (para)
8821 #: ../source/book.xml:8538
8822 msgid "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 client. The only difference between <command>svn switch</command> and <command>svn update</command> is that the <literal>update</literal> command always compares two identical paths."
8823 msgstr "当你运行<command>svn update</command>时,你会告诉版本库比较两个目录树,版本库这样做,并且返回给客户区别的描述,<command>svn switch</command>和<command>svn update</command>两个命令唯一区别就是<command>update</command>会一直比较同一路径。"
8825 #. (para)
8826 #: ../source/book.xml:8545
8827 msgid "That is, if your working copy is a mirror of <filename>/calc/trunk</filename>, then <command>svn update</command> will automatically compare your working copy of <filename>/calc/trunk</filename> to <filename>/calc/trunk</filename> in the <literal>HEAD</literal> revision. If you're switching your working copy to a branch, then <command>svn switch</command> will compare your working copy of <filename>/calc/trunk</filename> to some <emphasis>other</emphasis> branch-directory in the <literal>HEAD</literal> revision."
8828 msgstr "也就是了,如果你的工作拷贝是<filename>/calc/trunk</filename>的一个镜像,当运行<command>svn update</command>时会自动地比较你的工作拷贝的<filename>/calc/trunk</filename>与HEAD版本的<filename>/calc/trunk</filename>。如果你使用<command>svn switch</command>跳转工作拷贝到分支,则会比较你的工作拷贝的<filename>/calc/trunk</filename>与相应分支目录的<literal>HEAD</literal>版本。"
8830 #. (para)
8831 #: ../source/book.xml:8556
8832 msgid "In other words, an update moves your working copy through time. A switch moves your working copy through time <emphasis>and</emphasis> space."
8833 msgstr "换句话说,一个更新通过时间移动你的工作拷贝,一个转换通过时间和空间移动工作拷贝。"
8835 #. (para)
8836 #: ../source/book.xml:8560
8837 msgid "Because <command>svn switch</command> is essentially a variant of <command>svn update</command>, it shares the same behaviors; any local modifications in your working copy are preserved when new data arrives from the repository. This allows you to perform all sorts of clever tricks."
8838 msgstr "因为<command>svn switch</command>是<command>svn update</command>的一个变种,具有相同的行为,当新的数据到达时,任何工作拷贝的已经完成的本地修改会被保存,这里允许你作各种聪明的把戏。"
8840 #. (para)
8841 #: ../source/book.xml:8565
8842 msgid "For example, suppose you have a working copy of <filename>/calc/trunk</filename> and make a number of changes to it. Then you suddenly realize that you meant to make the changes to a branch instead. No problem! When you <command>svn switch</command> your working copy to the branch, the local changes will remain. You can then test and commit them to the branch."
8843 msgstr "举个例子,你的工作拷贝目录是<filename>/calc/trunk</filename>,你已经做了很多修改,然后你突然发现应该在分支上修改更好,没问题!你可以使用<command>svn switch</command>,而你本地修改还会保留,你可以测试并提交它们到分支。"
8845 #. (title)
8846 #: ../source/book.xml:8578
8847 msgid "Tags"
8848 msgstr "标签"
8850 #. (para)
8851 #: ../source/book.xml:8580
8852 msgid "Another common version control concept is a <firstterm>tag</firstterm>. A tag is just a <quote>snapshot</quote> of a project in time. In Subversion, this idea already seems to be everywhere. Each repository revision is exactly that—a snapshot of the filesystem after each commit."
8853 msgstr "另一个常见的版本控制系统概念是标­¾(<firstterm>tag</firstterm>),一个标签只是一个项目某一时间的<quote>快照</quote>,在Subversion里这个概念无处不在—每一次提交的修订版本都是一个精确的快照。"
8855 #. (para)
8856 #: ../source/book.xml:8586
8857 msgid "However, people often want to give more human-friendly names to tags, like <literal>release-1.0</literal>. And they want to make snapshots of smaller subdirectories of the filesystem. After all, it's not so easy to remember that release-1.0 of a piece of software is a particular subdirectory of revision 4822."
8858 msgstr "然而人们希望更人性化的标签名称,像<literal>release-1.0</literal>。他们也希望可以对一个子目录快照,毕竟,记住release-1.0是修订版本4822的某一小部分不是件很容易的事。"
8860 #. (title)
8861 #: ../source/book.xml:8595
8862 msgid "Creating a Simple Tag"
8863 msgstr "建立简单标签"
8865 #. (para)
8866 #: ../source/book.xml:8597
8867 msgid "Once again, <command>svn copy</command> comes to the rescue. If you want to create a snapshot of <filename>/calc/trunk</filename> exactly as it looks in the <literal>HEAD</literal> revision, then make a copy of it:"
8868 msgstr "<command>svn copy</command>再次登场,你希望建立一个<filename>/calc/trunk</filename>的一个快照,就像<literal>HEAD</literal>修订版本,建立这样一个拷贝:"
8870 #. (screen)
8871 #: ../source/book.xml:8601
8872 #, no-wrap
8873 msgid ""
8874 "\n"
8875 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
8876 "           http://svn.example.com/repos/calc/tags/release-1.0 \\\n"
8877 "      -m \"Tagging the 1.0 release of the 'calc' project.\"\n"
8878 "\n"
8879 "Committed revision 351.\n"
8880 msgstr ""
8881 "\n"
8882 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
8883 "           http://svn.example.com/repos/calc/tags/release-1.0 \\\n"
8884 "      -m \"Tagging the 1.0 release of the 'calc' project.\"\n"
8885 "\n"
8886 "Committed revision 351.\n"
8888 #. (para)
8889 #: ../source/book.xml:8608
8890 msgid "This example assumes that a <filename>/calc/tags</filename> directory already exists. (If it doesn't, you can create it using <command>svn mkdir</command>.) After the copy completes, the new <filename>release-1.0</filename> directory is forever a snapshot of how the project looked in the <literal>HEAD</literal> revision at the time you made the copy. Of course you might want to be more precise about exactly which revision you copy, in case somebody else may have committed changes to the project when you weren't looking. So if you know that revision 350 of <filename>/calc/trunk</filename> is exactly the snapshot you want, you can specify it by passing <option>-r 350</option> to the <command>svn copy</command> command."
8891 msgstr "这个例子假定<filename>/calc/tags</filename>目录已经存在(如果不是,可以使用<command>svn mkdir</command>创建。),拷贝完成之后,一个表示当时<literal>HEAD</literal>版本的/calc/trunk目录的镜像已经永久的拷贝到<filename>release-1.0</filename>目录。当然,你会希望更精确一点,以防其他人在你不注意的时候提交修改,所以,如果你知道<filename>/calc/trunk</filename>的版本350是你想要的快照,你可以使用<command>svn copy</command>加参数 <option>-r 350</option>。"
8893 #. (para)
8894 #: ../source/book.xml:8622
8895 msgid "But wait a moment: isn't this tag-creation procedure the same procedure we used to create a branch? Yes, in fact, it is. In Subversion, there's no difference between a tag and a branch. Both are just ordinary directories that are created by copying. Just as with branches, the only reason a copied directory is a <quote>tag</quote> is because <emphasis>humans</emphasis> have decided to treat it that way: as long as nobody ever commits to the directory, it forever remains a snapshot. If people start committing to it, it becomes a branch."
8896 msgstr "但是等一下:标签的产生过程与建立分支是一样的?是的,实际上在Subversion中标签与分支没有区别,都是普通的目录,通过copy命令得到,与分支一样,一个目录之所以是标签只是<emphasis>人们</emphasis>决定这样使用它,只要没有人提交这个目录,它永远是一个快照,但如果人们开始提交,它就变成了分支。"
8898 #. (para)
8899 #: ../source/book.xml:8632
8900 msgid "If you are administering a repository, there are two approaches you can take to managing tags. The first approach is <quote>hands off</quote>: as a matter of project policy, decide where your tags will live, and make sure all users know how to treat the directories they copy in there. (That is, make sure they know not to commit to them.) The second approach is more paranoid: you can use one of the access-control scripts provided with Subversion to prevent anyone from doing anything but creating new copies in the tags-area (See <xref linkend=\"svn.serverconfig\"/>.) The paranoid approach, however, isn't usually necessary. If a user accidentally commits a change to a tag-directory, you can simply undo the change as discussed in the previous section. This is version control, after all."
8901 msgstr "如果你管理一个版本库,你有两种方式管理标签,第一种方法是禁止命令:作为项目的政策,我们要决定标签所在的位置,确定所有用户知道如何处理拷贝的目录(也就是确保他们不会提交他们),第二种方法看来很过分:使用访问控制脚本来阻止任何想对标签目录做的非拷贝的操作(见<xref linkend=\"svn.serverconfig\"/>)这种方法通常是不必要的,如果一个人不小心提交了到标签目录一个修改,你可以简单的取消,毕竟这是版本控制啊。"
8903 #. (title)
8904 #: ../source/book.xml:8650
8905 msgid "Creating a Complex Tag"
8906 msgstr "建立复杂标签"
8908 #. (para)
8909 #: ../source/book.xml:8652
8910 msgid "Sometimes you may want your <quote>snapshot</quote> to be more complicated than a single directory at a single revision."
8911 msgstr "有时候你希望你的<quote>快照</quote>能够很复杂,而不只是一个单独修订版本的一个单独目录。"
8913 #. (para)
8914 #: ../source/book.xml:8655
8915 msgid "For example, pretend your project is much larger than our <filename>calc</filename> example: suppose it contains a number of subdirectories and many more files. In the course of your work, you may decide that you need to create a working copy that is designed to have specific features and bug fixes. You can accomplish this by selectively backdating files or directories to particular revisions (using <command>svn update -r</command> liberally), or by switching files and directories to particular branches (making use of <command>svn switch</command>). When you're done, your working copy is a hodgepodge of repository locations from different revisions. But after testing, you know it's the precise combination of data you need."
8916 msgstr "举个例子,假定你的项目比我们的的例子<filename>calc</filename>大的多:假设它保存了一组子目录和许多文件,在你工作时,你或许决定创建一个包括特定特性和Bug修正的工作拷贝,你可以通过选择性的回溯文件和目录到特定修订版本(使用<command>svn update -r</command>)来实现,或者转换文件和目录到特定分支(使用<command>svn switch</command>),这样做之后,你的工作拷贝成为版本库不同版本和分支的司令部,但是经过测试,你会知道这是你需要的一种精确数据组合。"
8918 #. (para)
8919 #: ../source/book.xml:8668
8920 msgid "Time to make a snapshot. Copying one URL to another won't work here. In this case, you want to make a snapshot of your exact working copy arrangement and store it in the repository. Luckily, <command>svn copy</command> actually has four different uses (which you can read about in <xref linkend=\"svn.ref\"/>), including the ability to copy a working-copy tree to the repository:"
8921 msgstr "是时候进行快照了,拷贝URL在这里不能工作,在这个例子里,你希望把本地拷贝的布局做镜像并且保存到版本库中,幸运的是,<command>svn copy</command>包括四种不同的使用方式(在<xref linkend=\"svn.ref\"/>可以详细阅读),包括拷贝工作拷贝到版本库:"
8923 #. (screen)
8924 #: ../source/book.xml:8674
8925 #, no-wrap
8926 msgid ""
8927 "\n"
8928 "$ ls\n"
8929 "my-working-copy/\n"
8930 "\n"
8931 "$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag\n"
8932 "\n"
8933 "Committed revision 352.\n"
8934 msgstr ""
8935 "\n"
8936 "$ ls\n"
8937 "my-working-copy/\n"
8938 "\n"
8939 "$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag\n"
8940 "\n"
8941 "Committed revision 352.\n"
8943 #. (para)
8944 #: ../source/book.xml:8682
8945 msgid "Now there is a new directory in the repository, <filename>/calc/tags/mytag</filename>, which is an exact snapshot of your working copy—mixed revisions, URLs, and all."
8946 msgstr "现在在版本库有一个新的目录<filename>/calc/tags/mytag</filename>,这是你的本地拷贝的一个快照—混合了修订版本,URL等等。"
8948 #. (para)
8949 #: ../source/book.xml:8686
8950 msgid "Other users have found interesting uses for this feature. Sometimes there are situations where you have a bunch of local changes made to your working copy, and you'd like a collaborator to see them. Instead of running <command>svn diff</command> and sending a patch file (which won't capture tree changes, symlink changes or changes in properties), you can instead use <command>svn copy</command> to <quote>upload</quote> your working copy to a private area of the repository. Your collaborator can then either check out a verbatim copy of your working copy, or use <command>svn merge</command> to receive your exact changes."
8951 msgstr "一些人也发现这一特性一些有趣的使用方式,有些时候本地拷贝有一组本地修改,你希望你的协作者看到这些,不使用<command>svn diff</command>并发送一个补定文件(不会捕捉到目录、符号链和属性的修改),而是使用<command>svn copy</command>来<quote>上传</quote>你的工作拷贝到一个版本库的私有区域,你的协作者可以选择完整的取出你的工作拷贝,或使用<command>svn merge</command>来接受你的精确修改。"
8953 #. (para)
8954 #: ../source/book.xml:8697
8955 msgid "While this is a nice method for uploading a quick snapshot of your working copy, note that this is <emphasis>not</emphasis> a good way to initially create a branch. Branch creation should be an event onto itself, and this method conflates the creation of a branch with extra changes to files, all within a single revision. This makes it very difficult (later on) to identify a single revision number as a branch point."
8956 msgstr "虽然这是上传快速工作拷贝快照的一个好方法,但这<emphasis>不是</emphasis>初始创建分支的好方法。分支创建必须是它本身的事件,而这个方法创建的分支包含了额外修改,都包含在一个单独修订版本里。这让我们很难识别分支点的单个修订版本号码。"
8958 #. (para)
8959 #: ../source/book.xml:8705
8960 msgid "Have you ever found yourself making some complex edits (in your <filename>/trunk</filename> working copy) and suddenly realized, <quote>hey, these changes ought to be in their own branch?</quote> A great technique to do this can be summarized in two steps:"
8961 msgstr "你是否发现你做出了复杂的修改(在<filename>/trunk</filename>的工作拷贝),并突然发现,<quote>这些修改必须在它们自己的分支?</quote>处理这个问题的技术可以总结为两步:"
8963 #. (screen)
8964 #: ../source/book.xml:8710
8965 #, no-wrap
8966 msgid ""
8967 "\n"
8968 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
8969 "           http://svn.example.com/repos/calc/branches/newbranch\n"
8970 "Committed revision 353.\n"
8971 "\n"
8972 "$ svn switch http://svn.example.com/repos/calc/branches/newbranch\n"
8973 "At revision 353.\n"
8974 msgstr ""
8975 "\n"
8976 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
8977 "           http://svn.example.com/repos/calc/branches/newbranch\n"
8978 "Committed revision 353.\n"
8979 "\n"
8980 "$ svn switch http://svn.example.com/repos/calc/branches/newbranch\n"
8981 "At revision 353.\n"
8983 #. (para)
8984 #: ../source/book.xml:8718
8985 msgid "The <command>svn switch</command> command, like <command>svn update</command>, preserves your local edits. At this point, your working copy is now a reflection of the newly created branch, and your next <command>svn commit</command> invocation will send your changes there."
8986 msgstr "就像<command>svn update</command>命令,<command>svn switch</command>会保留工作拷贝的本地修改,此刻,你的工作拷贝反映到新建的分支上,而你的下一次<command>svn commit</command>会发送修改到服务器。"
8988 #. (title)
8989 #: ../source/book.xml:8732
8990 msgid "Branch Maintenance"
8991 msgstr "分支维护"
8993 #. (para)
8994 #: ../source/book.xml:8734
8995 msgid "You may have noticed by now that Subversion is extremely flexible. Because it implements branches and tags with the same underlying mechanism (directory copies), and because branches and tags appear in normal filesystem space, many people find Subversion intimidating. It's almost <emphasis>too</emphasis> flexible. In this section, we'll offer some suggestions for arranging and managing your data over time."
8996 msgstr "你一定注意到了Subversion极度的灵活性,因为它用相同的底层机制(目录拷贝)实现了分支和标签,因为分支和标签是作为普通的文件系统出现,会让人们感到害怕,因为它<emphasis>太</emphasis>灵活了,在这个小节里,我们会提供安排和管理数据的一些建议。"
8998 #. (title)
8999 #: ../source/book.xml:8744
9000 msgid "Repository Layout"
9001 msgstr "版本库布局"
9003 #. (para)
9004 #: ../source/book.xml:8746
9005 msgid "There are some standard, recommended ways to organize a repository. Most people create a <filename>trunk</filename> directory to hold the <quote>main line</quote> of development, a <filename>branches</filename> directory to contain branch copies, and a <filename>tags</filename> directory to contain tag copies. If a repository holds only one project, then often people create these top-level directories:"
9006 msgstr "有一些标准的,推荐的组织版本库的方式,许多人创建一个<filename>trunk</filename>目录来保存开发的<quote>主线</quote>,一个<filename>branches</filename>目录存放分支拷贝,一个<filename>tags</filename>目录保存标签拷贝,如果一个版本库只是存放一个项目,人们会在顶级目录创建这些目录:"
9008 #. (screen)
9009 #: ../source/book.xml:8753
9010 #, no-wrap
9011 msgid ""
9012 "\n"
9013 "/trunk\n"
9014 "/branches\n"
9015 "/tags\n"
9016 msgstr ""
9017 "\n"
9018 "/trunk\n"
9019 "/branches\n"
9020 "/tags\n"
9022 #. (para)
9023 #: ../source/book.xml:8758
9024 msgid "If a repository contains multiple projects, admins typically index their layout by project (see <xref linkend=\"svn.reposadmin.projects.chooselayout\"/> to read more about <quote>project roots</quote>):"
9025 msgstr "如果一个版本库保存了多个项目,管理员会通过项目来布局(见<xref linkend=\"svn.reposadmin.projects.chooselayout\"/>关于<quote>项目根目录</quote>):"
9027 #. (screen)
9028 #: ../source/book.xml:8761
9029 #, no-wrap
9030 msgid ""
9031 "\n"
9032 "/paint/trunk\n"
9033 "/paint/branches\n"
9034 "/paint/tags\n"
9035 "/calc/trunk\n"
9036 "/calc/branches\n"
9037 "/calc/tags\n"
9038 msgstr ""
9039 "\n"
9040 "/paint/trunk\n"
9041 "/paint/branches\n"
9042 "/paint/tags\n"
9043 "/calc/trunk\n"
9044 "/calc/branches\n"
9045 "/calc/tags\n"
9047 #. (para)
9048 #: ../source/book.xml:8769
9049 msgid "Of course, you're free to ignore these common layouts. You can create any sort of variation, whatever works best for you or your team. Remember that whatever you choose, it's not a permanent commitment. You can reorganize your repository at any time. Because branches and tags are ordinary directories, the <command>svn move</command> command can move or rename them however you wish. Switching from one layout to another is just a matter of issuing a series of server-side moves; if you don't like the way things are organized in the repository, just juggle the directories around."
9050 msgstr "当然,你可以自由的忽略这些通常的布局方式,你可以创建任意的变化,只要是对你和你的项目有益,记住无论你选择什么,这不会是一种永久的承诺,你可以随时重新组织你的版本库。因为分支和标签都是普通的目录,<command>svn move</command>命令可以任意的改名和移动它们,从一种布局到另一种大概只是一系列服务器端的移动,如果你不喜欢版本库的组织方式,你可以任意修改目录结构。"
9052 #. (para)
9053 #: ../source/book.xml:8779
9054 msgid "Remember, though, that while moving directories may be easy to do, you need to be considerate of your users as well. Your juggling can be disorienting to users with existing working copies. If a user has a working copy of a particular repository directory, your <command>svn move</command> operation might remove the path from the latest revision. When the user next runs <command>svn update</command>, she will be told that her working copy represents a path that no longer exists, and the user will be forced to <command>svn switch</command> to the new location."
9055 msgstr "记住,尽管移动目录非常容易,你必须体谅你的用户,你的修改会让你的用户感到迷惑,如果一个用户的拥有一个版本库目录的工作拷贝,你的<command>svn move</command>命令也许会删除最新的版本的这个路径,当用户运行<command>svn update</command>,会被告知这个工作拷贝引用的路径已经不再存在,用户需要强制使用<command>svn switch</command>转到新的位置。"
9057 #. (title)
9058 #: ../source/book.xml:8794
9059 msgid "Data Lifetimes"
9060 msgstr "数据的生命周期"
9062 #. (para)
9063 #: ../source/book.xml:8796
9064 msgid "Another nice feature of Subversion's model is that branches and tags can have finite lifetimes, just like any other versioned item. For example, suppose you eventually finish all your work on your personal branch of the <filename>calc</filename> project. After merging all of your changes back into <filename>/calc/trunk</filename>, there's no need for your private branch directory to stick around anymore:"
9065 msgstr "另一个Subversion模型的可爱特性是分支和标签可以有有限的生命周期,就像其它的版本化的项目,举个例子,假定你最终完成了<filename>calc</filename>项目你的个人分支上的所有工作,在合并了你的所有修改到<filename>/calc/trunk</filename>后,没有必要继续保留你的私有分支目录:"
9067 #. (screen)
9068 #: ../source/book.xml:8804
9069 #, no-wrap
9070 msgid ""
9071 "\n"
9072 "$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
9073 "             -m \"Removing obsolete branch of calc project.\"\n"
9074 "\n"
9075 "Committed revision 375.\n"
9076 msgstr ""
9077 "\n"
9078 "$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
9079 "             -m \"Removing obsolete branch of calc project.\"\n"
9080 "\n"
9081 "Committed revision 375.\n"
9083 #. (para)
9084 #: ../source/book.xml:8810
9085 msgid "And now your branch is gone. Of course it's not really gone: the directory is simply missing from the <literal>HEAD</literal> revision, no longer distracting anyone. If you use <command>svn checkout</command>, <command>svn switch</command>, or <command>svn list</command> to examine an earlier revision, you'll still be able to see your old branch."
9086 msgstr "你的分支已经消失了,当然不是真的消失了:这个目录只是在<literal>HEAD</literal>修订版本里消失了,如果你使用<command>svn checkout</command>、<command>svn switch</command>或者<command>svn list</command>来检查一个旧的版本,你仍会见到这个旧的分支。"
9088 #. (para)
9089 #: ../source/book.xml:8817
9090 msgid "If browsing your deleted directory isn't enough, you can always bring it back. Resurrecting data is very easy in Subversion. If there's a deleted directory (or file) that you'd like to bring back into <literal>HEAD</literal>, simply use <command>svn copy -r</command> to copy it from the old revision:"
9091 msgstr "如果浏览你删除的目录还不足够,你可以把它找回来,恢复数据对Subversion来说很简单,如果你希望恢复一个已经删除的目录(或文件)到<literal>HEAD</literal>,仅需要使用<command>svn copy -r</command>来从旧的版本拷贝出来:"
9093 #. (screen)
9094 #: ../source/book.xml:8823
9095 #, no-wrap
9096 msgid ""
9097 "\n"
9098 "$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
9099 "                  http://svn.example.com/repos/calc/branches/my-calc-branch\n"
9100 "\n"
9101 "Committed revision 376.\n"
9102 msgstr ""
9103 "\n"
9104 "$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \\\n"
9105 "                  http://svn.example.com/repos/calc/branches/my-calc-branch\n"
9106 "\n"
9107 "Committed revision 376.\n"
9109 #. (para)
9110 #: ../source/book.xml:8829
9111 msgid "In our example, your personal branch had a relatively short lifetime: you may have created it to fix a bug or implement a new feature. When your task is done, so is the branch. In software development, though, it's also common to have two <quote>main</quote> branches running side-by-side for very long periods. For example, suppose it's time to release a stable version of the <filename>calc</filename> project to the public, and you know it's going to take a couple of months to shake bugs out of the software. You don't want people to add new features to the project, but you don't want to tell all developers to stop programming either. So instead, you create a <quote>stable</quote> branch of the software that won't change much:"
9112 msgstr "在我们的例子里,你的个人分支只有一个相对短的生命周期:你会为修复一个Bug或实现一个小的特性来创建它,当任务完成,分支也该结束了。在软件开发过程中,有两个<quote>主要的</quote>分支一直存在很长的时间也是很常见的情况,举个例子,假定我们是发布一个稳定的<filename>calc</filename>项目的时候了,但我们仍会需要几个月的时间来修复Bug,你不希望添加新的特性,但你不希望告诉开发者停止开发,所以作为替代,你为软件创建了一个<quote>分支</quote>,这个分支更改不会很多:"
9114 #. (screen)
9115 #: ../source/book.xml:8842
9116 #, no-wrap
9117 msgid ""
9118 "\n"
9119 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
9120 "         http://svn.example.com/repos/calc/branches/stable-1.0 \\\n"
9121 "         -m \"Creating stable branch of calc project.\"\n"
9122 "\n"
9123 "Committed revision 377.\n"
9124 msgstr ""
9125 "\n"
9126 "$ svn copy http://svn.example.com/repos/calc/trunk \\\n"
9127 "         http://svn.example.com/repos/calc/branches/stable-1.0 \\\n"
9128 "         -m \"Creating stable branch of calc project.\"\n"
9129 "\n"
9130 "Committed revision 377.\n"
9132 #. (para)
9133 #: ../source/book.xml:8849
9134 msgid "And now developers are free to continue adding cutting-edge (or experimental) features to <filename>/calc/trunk</filename>, and you can declare a project policy that only bug fixes are to be committed to <filename>/calc/branches/stable-1.0</filename>. That is, as people continue to work on the trunk, a human selectively ports bug fixes over to the stable branch. Even after the stable branch has shipped, you'll probably continue to maintain the branch for a long time—that is, as long as you continue to support that release for customers."
9135 msgstr "而且开发者可以自由的继续添加新的(试验的)特性到<filename>/calc/trunk</filename>,你可以宣布这样一种政策,只有bug修正提交到<filename>/calc/branches/stable-1.0</filename>,这样的话,人们继续在主干上工作,某个人会选择在稳定分支上做出一些Bug修正,甚至在稳定版本发布之后。你或许会在这个维护分支上工作很长时间—也就是说,你会一直继续为客户提供这个版本的支持。"
9137 #. (title)
9138 #: ../source/book.xml:8866
9139 msgid "Vendor branches"
9140 msgstr "卖主分支"
9142 #. (para)
9143 #: ../source/book.xml:8868
9144 msgid "As is especially the case when developing software, the data that you maintain under version control is often closely related to, or perhaps dependent upon, someone else's data. Generally, the needs of your project will dictate that you stay as up-to-date as possible with the data provided by that external entity without sacrificing the stability of your own project. This scenario plays itself out all the time—anywhere that the information generated by one group of people has a direct effect on that which is generated by another group."
9145 msgstr "当开发软件时有这样一个情况,你版本控制的数据可能关联于或者是依赖于其他人的数据,通常来讲,你的项目的需要会要求你自己的项目对外部实体提供的数据保持尽可能最新的版本,同时不会牺牲稳定性,这种情况总是会出现—只要某个小组的信息对另一个小组的信息有直接的影响。"
9147 #. (para)
9148 #: ../source/book.xml:8877
9149 msgid "For example, software developers might be working on an application which makes use of a third-party library. Subversion has just such a relationship with the Apache Portable Runtime library (see <xref linkend=\"svn.developer.usingapi.apr\"/>). The Subversion source code depends on the APR library for all its portability needs. In earlier stages of Subversion's development, the project closely tracked APR's changing API, always sticking to the <quote>bleeding edge</quote> of the library's code churn. Now that both APR and Subversion have matured, Subversion attempts to synchronize with APR's library API only at well-tested, stable release points."
9150 msgstr "举个例子,软件开发者会工作在一个使用第三方库的应用,Subversion恰好是和Apache的Portable Runtime library(见<xref linkend=\"svn.developer.usingapi.apr\"/>)有这样一个关系。Subversion源代码依赖于APR库来实现可移植需求。在Subversion的早期开发阶段,项目紧密地追踪APR的API修改,经常在库代码的<quote>流血的边缘</quote>粘住,现在APR和Subversion都已经成熟了,Subversion只尝试同步APR的经过良好测试的,稳定的API库。"
9152 #. (para)
9153 #: ../source/book.xml:8888
9154 msgid "Now, if your project depends on someone else's information, there are several ways that you could attempt to synchronize that information with your own. Most painfully, you could issue oral or written instructions to all the contributors of your project, telling them to make sure that they have the specific versions of that third-party information that your project needs. If the third-party information is maintained in a Subversion repository, you could also use Subversion's externals definitions to effectively <quote>pin down</quote> specific versions of that information to some location in your own working copy directory (see <xref linkend=\"svn.advanced.externals\"/>)."
9155 msgstr "现在,如果你的项目依赖于其他人的信息,有许多方法可以用来尝试同步你的信息,最痛苦的,你可以为项目所有的贡献者发布口头或书写的指导,告诉他们确信他们拥有你们的项目需要的特定版本的第三方信息。如果第三方信息是用Subversion版本库维护,你可以使用Subversion的外部定义来有效的<quote>强制</quote>特定的版本的信息在你的工作拷贝的的位置(见<xref linkend=\"svn.advanced.externals\"/>)。"
9157 #. (para)
9158 #: ../source/book.xml:8899
9159 msgid "But sometimes you want to maintain custom modifications to third-party data in your own version control system. Returning to the software development example, programmers might need to make modifications to that third-party library for their own purposes. These modifications might include new functionality or bug fixes, maintained internally only until they become part of an official release of the third-party library. Or the changes might never be relayed back to the library maintainers, existing solely as custom tweaks to make the library further suit the needs of the software developers."
9160 msgstr "但是有时候,你希望在你自己的版本控制系统维护一个针对第三方数据的自定义修改,回到软件开发的例子,程序员为了他们自己的目的会需要修改第三方库,这些修改会包括新的功能和bug修正,在成为第三方工具官方发布之前,只是内部维护。或者这些修改永远不会传给库的维护者,只是作为满足软件开发需要的单独的自定义修改存在。"
9162 #. (para)
9163 #: ../source/book.xml:8909
9164 msgid "Now you face an interesting situation. Your project could house its custom modifications to the third-party data in some disjointed fashion, such as using patch files or full-fledged alternate versions of files and directories. But these quickly become maintenance headaches, requiring some mechanism by which to apply your custom changes to the third-party data, and necessitating regeneration of those changes with each successive version of the third-party data that you track."
9165 msgstr "现在你会面对一个有趣的情形,你的项目可以用某种脱节的样式保持它关于第三方数据自己的修改,如使用补丁文件或者是完全的可选版本的文件和目录。但是这很快会成为维护的头痛的事情,需要一种机制来应用你对第三方数据的自定义修改,并且迫使在第三方数据的后续版本重建这些修改。"
9167 #. (para)
9168 #: ../source/book.xml:8917
9169 msgid "The solution to this problem is to use <firstterm>vendor branches</firstterm>. A vendor branch is a directory tree in your own version control system that contains information provided by a third-party entity, or vendor. Each version of the vendor's data that you decide to absorb into your project is called a <firstterm>vendor drop</firstterm>."
9170 msgstr "这个问题的解决方案是使用<firstterm>卖主分支</firstterm>,一个卖主分支是一个目录树保存了第三方实体或卖主的信息,每一个卖主数据的版本吸收到你的项目叫做<firstterm>卖主drop</firstterm>。"
9172 #. (para)
9173 #: ../source/book.xml:8923
9174 msgid "Vendor branches provide two benefits. First, by storing the currently supported vendor drop in your own version control system, the members of your project never need to question whether they have the right version of the vendor's data. They simply receive that correct version as part of their regular working copy updates. Secondly, because the data lives in your own Subversion repository, you can store your custom changes to it in-place—you have no more need of an automated (or worse, manual) method for swapping in your customizations."
9175 msgstr "卖主分支提供了两个关键的益处,第一,通过在我们的版本控制系统保存现在支持的卖主drop,你项目的成员不需要指导他们是否有了正确版本的卖主数据,他们只需要作为不同工作拷贝更新的一部份,简单的接受正确的版本就可以了。第二,因为数据存在于你自己的Subversion版本库,你可以在恰当的位置保存你的自定义修改—你不需要一个自动的(或者是更坏,手工的)方法来交换你的自定义行为。"
9177 #. (title)
9178 #: ../source/book.xml:8935
9179 msgid "General Vendor Branch Management Procedure"
9180 msgstr "常规的卖主分支管理过程"
9182 #. (para)
9183 #: ../source/book.xml:8937
9184 msgid "Managing vendor branches generally works like this. You create a top-level directory (such as <filename>/vendor</filename>) to hold the vendor branches. Then you import the third party code into a subdirectory of that top-level directory. You then copy that subdirectory into your main development branch (for example, <filename>/trunk</filename>) at the appropriate location. You always make your local changes in the main development branch. With each new release of the code you are tracking you bring it into the vendor branch and merge the changes into <filename>/trunk</filename>, resolving whatever conflicts occur between your local changes and the upstream changes."
9185 msgstr "管理卖主分支通常会像这个样子,你创建一个顶级的目录(如<filename>/vendor</filename>)来保存卖主分支,然后你导入第三方的代码到你的子目录。然后你将拷贝这个子目录到主要的开发分支(例如<filename>/trunk</filename>)的适当位置。你一直在你的主要开发分支上做本地修改,当你的追踪的代码有了新版本,你会把带到卖主分支并且把它合并到你的<filename>/trunk</filename>,解决任何你的本地修改和他们的修改的冲突。"
9187 #. (para)
9188 #: ../source/book.xml:8950
9189 msgid "Perhaps an example will help to clarify this algorithm. We'll use a scenario where your development team is creating a calculator program that links against a third-party complex number arithmetic library, libcomplex. We'll begin with the initial creation of the vendor branch, and the import of the first vendor drop. We'll call our vendor branch directory <filename>libcomplex</filename>, and our code drops will go into a subdirectory of our vendor branch called <filename>current</filename>. And since <command>svn import</command> creates all the intermediate parent directories it needs, we can actually accomplish both of these steps with a single command."
9190 msgstr "也许一个例子有助于我们阐述这个算法,我们会使用这样一个场景,我们的开发团队正在开发一个计算器程序,与一个第三方的复杂数字运算库libcomplex关联。我们从卖主分支的初始创建开始,并且导入卖主drop,我们会把每株分支目录叫做<filename>libcomplex</filename>,我们的代码drop会进入到卖主分支的子目录<filename>current</filename>,并且因为<command>svn import</command>创建所有的需要的中间父目录,我们可以使用一个命令完成这一步。"
9192 #. (screen)
9193 #: ../source/book.xml:8962
9194 #, no-wrap
9195 msgid ""
9196 "\n"
9197 "$ svn import /path/to/libcomplex-1.0 \\\n"
9198 "             http://svn.example.com/repos/vendor/libcomplex/current \\\n"
9199 "             -m 'importing initial 1.0 vendor drop'\n"
9200 "…\n"
9201 msgstr ""
9202 "\n"
9203 "$ svn import /path/to/libcomplex-1.0 \\\n"
9204 "             http://svn.example.com/repos/vendor/libcomplex/current \\\n"
9205 "             -m 'importing initial 1.0 vendor drop'\n"
9206 "…\n"
9208 #. (para)
9209 #: ../source/book.xml:8968
9210 msgid "We now have the current version of the libcomplex source code in <filename>/vendor/libcomplex/current</filename>. Now, we tag that version (see <xref linkend=\"svn.branchmerge.tags\"/>) and then copy it into the main development branch. Our copy will create a new directory called <filename>libcomplex</filename> in our existing <filename>calc</filename> project directory. It is in this copied version of the vendor data that we will make our customizations."
9211 msgstr "我们现在在<filename>/vendor/libcomplex/current</filename>有了libcomplex当前版本的代码,现在我们为那个版本作标签(见<xref linkend=\"svn.branchmerge.tags\"/>),然后拷贝它到主要开发分支,我们的拷贝会在<filename>calc</filename>项目目录创建一个新的目录<filename>libcomplex</filename>,它是这个我们将要进行自定义的卖主数据的拷贝版本。"
9213 #. (screen)
9214 #: ../source/book.xml:8977
9215 #, no-wrap
9216 msgid ""
9217 "\n"
9218 "$ svn copy http://svn.example.com/repos/vendor/libcomplex/current  \\\n"
9219 "           http://svn.example.com/repos/vendor/libcomplex/1.0      \\\n"
9220 "           -m 'tagging libcomplex-1.0'\n"
9221 "…\n"
9222 "$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0  \\\n"
9223 "           http://svn.example.com/repos/calc/libcomplex        \\\n"
9224 "           -m 'bringing libcomplex-1.0 into the main branch'\n"
9225 "…\n"
9226 msgstr ""
9227 "\n"
9228 "$ svn copy http://svn.example.com/repos/vendor/libcomplex/current  \\\n"
9229 "           http://svn.example.com/repos/vendor/libcomplex/1.0      \\\n"
9230 "           -m 'tagging libcomplex-1.0'\n"
9231 "…\n"
9232 "$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0  \\\n"
9233 "           http://svn.example.com/repos/calc/libcomplex        \\\n"
9234 "           -m 'bringing libcomplex-1.0 into the main branch'\n"
9235 "…\n"
9237 #. (para)
9238 #: ../source/book.xml:8992
9239 msgid "And entirely bug-free, of course!"
9240 msgstr "而且完全没有bug,当然!"
9242 #. (para)
9243 #: ../source/book.xml:8987
9244 msgid "We check out our project's main branch—which now includes a copy of the first vendor drop—and we get to work customizing the libcomplex code. Before we know it, our modified version of libcomplex is now completely integrated into our calculator program. <placeholder-1/>"
9245 msgstr "我们取出我们项目的主分支—现在包括了第一个卖主释放的拷贝—我们开始自定义libcomplex的代码,在我们知道之前,我们的libcomplex修改版本是已经与我们的计算器程序完全集成了。 <placeholder-1/>"
9247 #. (para)
9248 #: ../source/book.xml:8994
9249 msgid "A few weeks later, the developers of libcomplex release a new version of their library—version 1.1—which contains some features and functionality that we really want. We'd like to upgrade to this new version, but without losing the customizations we made to the existing version. What we essentially would like to do is to replace our current baseline version of libcomplex 1.0 with a copy of libcomplex 1.1, and then re-apply the custom modifications we previously made to that library to the new version. But we actually approach the problem from the other direction, applying the changes made to libcomplex between versions 1.0 and 1.1 to our modified copy of it."
9250 msgstr "几周之后,libcomplex得开发者发布了一个新的版本—版本1.1—包括了我们很需要的一些特性和功能。我们很希望升级到这个版本,但不希望失去在当前版本所作的修改。我们本质上会希望把我们当前基线版本是的libcomplex1.0的拷贝替换为libcomplex 1.1,然后把前面自定义的修改应用到新的版本。但是实际上我们通过一个相反的方向解决这个问题,应用libcomplex从版本1.0到1.1的修改到我们修改的拷贝。"
9252 #. (para)
9253 #: ../source/book.xml:9006
9254 msgid "To perform this upgrade, we check out a copy of our vendor branch, and replace the code in the <filename>current</filename> directory with the new libcomplex 1.1 source code. We quite literally copy new files on top of existing files, perhaps exploding the libcomplex 1.1 release tarball atop our existing files and directories. The goal here is to make our <filename>current</filename> directory contain only the libcomplex 1.1 code, and to ensure that all that code is under version control. Oh, and we want to do this with as little version control history disturbance as possible."
9255 msgstr "为了执行这个升级,我们取出一个我们卖主分支的拷贝,替换<filename>current</filename>目录为新的libcomplex 1.1的代码,我们只是拷贝新文件到存在的文件上,或者是解压缩libcomplex 1.1的打包文件到我们存在的文件和目录。此时的目标是让我们的<filename>current</filename>目录只保留libcomplex 1.1的代码,并且保证所有的代码在版本控制之下,哦,我们希望在最小的版本控制历史扰动下完成这件事。"
9257 #. (para)
9258 #: ../source/book.xml:9017
9259 msgid "After replacing the 1.0 code with 1.1 code, <command>svn status</command> will show files with local modifications as well as, perhaps, some unversioned or missing files. If we did what we were supposed to do, the unversioned files are only those new files introduced in the 1.1 release of libcomplex—we run <command>svn add</command> on those to get them under version control. The missing files are files that were in 1.0 but not in 1.1, and on those paths we run <command>svn delete</command>. Finally, once our <filename>current</filename> working copy contains only the libcomplex 1.1 code, we commit the changes we made to get it looking that way."
9260 msgstr "完成了这个从1.0到1.1的代码替换,<command>svn status</command>会显示文件的本地修改,或许也包括了一些未版本化或者丢失的文件,如果我们做了我们应该做的事情,未版本化的文件应该都是libcomplex在1.1新引入的文件—我们运行<command>svn add</command>来将它们加入到版本控制。丢失的文件是存在于1.1但是不是在1.1,在这些路径我们运行<command>svn delete</command>。最终一旦我们的<filename>current</filename>工作拷贝只是包括了libcomplex1.1的代码,我们可以提交这些改变目录和文件的修改。"
9262 #. (para)
9263 #: ../source/book.xml:9029
9264 msgid "Our <filename>current</filename> branch now contains the new vendor drop. We tag the new version (in the same way we previously tagged the version 1.0 vendor drop), and then merge the differences between the tag of the previous version and the new current version into our main development branch."
9265 msgstr "我们的<filename>current</filename>分支现在保存了新的卖主drop,我们为这个新的版本创建一个新的标签(就像我们为1.0版本drop所作的),然后合并这从个标签前一个版本的区别到主要开发分支。"
9267 #. (screen)
9268 #: ../source/book.xml:9035
9269 #, no-wrap
9270 msgid ""
9271 "\n"
9272 "$ cd working-copies/calc\n"
9273 "$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0      \\\n"
9274 "            http://svn.example.com/repos/vendor/libcomplex/current  \\\n"
9275 "            libcomplex\n"
9276 "… # resolve all the conflicts between their changes and our changes\n"
9277 "$ svn commit -m 'merging libcomplex-1.1 into the main branch'\n"
9278 "…\n"
9279 msgstr ""
9280 "\n"
9281 "$ cd working-copies/calc\n"
9282 "$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0      \\\n"
9283 "            http://svn.example.com/repos/vendor/libcomplex/current  \\\n"
9284 "            libcomplex\n"
9285 "… # resolve all the conflicts between their changes and our changes\n"
9286 "$ svn commit -m 'merging libcomplex-1.1 into the main branch'\n"
9287 "…\n"
9289 #. (para)
9290 #: ../source/book.xml:9044
9291 msgid "In the trivial use case, the new version of our third-party tool would look, from a files-and-directories point of view, just like the previous version. None of the libcomplex source files would have been deleted, renamed or moved to different locations—the new version would contain only textual modifications against the previous one. In a perfect world, our modifications would apply cleanly to the new version of the library, with absolutely no complications or conflicts."
9292 msgstr "在这个琐碎的用例里,第三方工具的新版本会从一个文件和目录的角度来看,就像前一个版本。没有任何libcomplex源文件会被删除、被改名或是移动到别的位置—新的版本只会保存针对上一个版本的文本修改。在完美世界,我们对呢修改会干净得应用到库的新版本,不会产生任何并发和冲突。"
9294 #. (para)
9295 #: ../source/book.xml:9053
9296 msgid "But things aren't always that simple, and in fact it is quite common for source files to get moved around between releases of software. This complicates the process of ensuring that our modifications are still valid for the new version of code, and can quickly degrade into a situation where we have to manually recreate our customizations in the new version. Once Subversion knows about the history of a given source file—including all its previous locations—the process of merging in the new version of the library is pretty simple. But we are responsible for telling Subversion how the source file layout changed from vendor drop to vendor drop."
9297 msgstr "但是事情总不是这样简单,实际上源文件在不同的版本间的移动是很常见的,这种过程复杂性可以确保我们的修改会一直对新的版本代码有效,可以很快使形势退化到我们需要在新版本手工的重新创建我们的自定义修改。一旦Subversion知道了给定文件的历史—包括了所有以前的位置—合并到新版本的进程就会很简单,但是我们需要负责告诉Subversion卖主drop之间源文件布局的改变。"
9299 #. (command)
9300 #: ../source/book.xml:9074
9301 msgid "svn_load_dirs.pl"
9302 msgstr "svn_load_dirs.pl"
9304 #. (para)
9305 #: ../source/book.xml:9077
9306 msgid "Vendor drops that contain more than a few deletes, additions and moves complicate the process of upgrading to each successive version of the third-party data. So Subversion supplies the <command>svn_load_dirs.pl</command> script to assist with this process. This script automates the importing steps we mentioned in the general vendor branch management procedure to make sure that mistakes are minimized. You will still be responsible for using the merge commands to merge the new versions of the third-party data into your main development branch, but <command>svn_load_dirs.pl</command> can help you more quickly and easily arrive at that stage."
9307 msgstr "不仅仅包含一些删除、添加和移动的卖主drops使得升级第三方数据后续版本的过程变得复杂,所以Subversion提供了一个<command>svn_load_dirs.pl</command>脚本来辅助这个过程,这个脚本自动进行我们前面提到的常规卖主分支管理过程的导入步骤,从而使得错误最小化。你仍要负责使用合并命令合并第三方的新 版本数据合并到主要开发分支,但是<command>svn_load_dirs.pl</command>帮助你快速到达这一步骤。"
9309 #. (para)
9310 #: ../source/book.xml:9089
9311 msgid "In short, <command>svn_load_dirs.pl</command> is an enhancement to <command>svn import</command> that has several important characteristics:"
9312 msgstr "一句话,<command>svn_load_dirs.pl</command>是一个增强的<command>svn import</command>,具备了许多重要的特性:"
9314 #. (para)
9315 #: ../source/book.xml:9094
9316 msgid "It can be run at any point in time to bring an existing directory in the repository to exactly match an external directory, performing all the necessary adds and deletes, and optionally performing moves, too."
9317 msgstr "它可以在任何有一个存在的版本库目录与一个外部的目录匹配时执行,会执行所有必要的添加和删除并且可以选则执行移动。"
9319 #. (para)
9320 #: ../source/book.xml:9100
9321 msgid "It takes care of complicated series of operations between which Subversion requires an intermediate commit—such as before renaming a file or directory twice."
9322 msgstr "它可以用来操作一系列复杂的操作,如那些需要一个中间媒介的提交—如在操作之前重命名一个文件或者目录两次。"
9324 #. (para)
9325 #: ../source/book.xml:9105
9326 msgid "It will optionally tag the newly imported directory."
9327 msgstr "它可以随意的为新导入目录打上标签。"
9329 #. (para)
9330 #: ../source/book.xml:9108
9331 msgid "It will optionally add arbitrary properties to files and directories that match a regular expression."
9332 msgstr "它可以随意为符合正则表达式的文件和目录添加任意的属性。"
9334 #. (para)
9335 #: ../source/book.xml:9112
9336 msgid "<command>svn_load_dirs.pl</command> takes three mandatory arguments. The first argument is the URL to the base Subversion directory to work in. This argument is followed by the URL—relative to the first argument—into which the current vendor drop will be imported. Finally, the third argument is the local directory to import. Using our previous example, a typical run of <command>svn_load_dirs.pl</command> might look like:"
9337 msgstr "<command>svn_load_dirs.pl</command>利用三个强制的参数,第一个参数是Subversion工作的基本目录URL,第二个参数在URL之后—相对于第一个参数—指向当前的卖主分支将会导入的目录,最后,第三个参数是一个需要导入的本地目录,使用前面的例子,一个典型的<command>svn_load_dirs.pl</command>调用看起来如下:"
9339 #. (screen)
9340 #: ../source/book.xml:9120
9341 #, no-wrap
9342 msgid ""
9343 "\n"
9344 "$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \\\n"
9345 "                   current                                        \\\n"
9346 "                   /path/to/libcomplex-1.1\n"
9347 "…\n"
9348 msgstr ""
9349 "\n"
9350 "$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \\\n"
9351 "                   current                                        \\\n"
9352 "                   /path/to/libcomplex-1.1\n"
9353 "…\n"
9355 #. (para)
9356 #: ../source/book.xml:9126
9357 msgid "You can indicate that you'd like <command>svn_load_dirs.pl</command> to tag the new vendor drop by passing the <option>-t</option> command-line option and specifying a tag name. This tag is another URL relative to the first program argument."
9358 msgstr "你可以说明你会希望<command>svn_load_dirs.pl</command>同时打上标签,这使用<option>-t</option>命令行选项,需要指定一个标签名,这个标签是第一个参数的一个相对URL。"
9360 #. (screen)
9361 #: ../source/book.xml:9131
9362 #, no-wrap
9363 msgid ""
9364 "\n"
9365 "$ svn_load_dirs.pl -t libcomplex-1.1                              \\\n"
9366 "                   http://svn.example.com/repos/vendor/libcomplex \\\n"
9367 "                   current                                        \\\n"
9368 "                   /path/to/libcomplex-1.1\n"
9369 "…\n"
9370 msgstr ""
9371 "\n"
9372 "$ svn_load_dirs.pl -t libcomplex-1.1                              \\\n"
9373 "                   http://svn.example.com/repos/vendor/libcomplex \\\n"
9374 "                   current                                        \\\n"
9375 "                   /path/to/libcomplex-1.1\n"
9376 "…\n"
9378 #. (para)
9379 #: ../source/book.xml:9138
9380 msgid "When you run <command>svn_load_dirs.pl</command>, it examines the contents of your existing <quote>current</quote> vendor drop, and compares them with the proposed new vendor drop. In the trivial case, there will be no files that are in one version and not the other, and the script will perform the new import without incident. If, however, there are discrepancies in the file layouts between versions, <command>svn_load_dirs.pl</command> will ask you how to resolve those differences. For example, you will have the opportunity to tell the script that you know that the file <filename>math.c</filename> in version 1.0 of libcomplex was renamed to <filename>arithmetic.c</filename> in libcomplex 1.1. Any discrepancies not explained by moves are treated as regular additions and deletions."
9381 msgstr "当你运行<command>svn_load_dirs.pl</command>,它会检验你的存在的<quote>current</quote>卖主drop,并且与提议的新卖主drop比较,在这个琐碎的例子里,没有文件只出现在一个版本里,脚本执行新的导入而不会发生意外。然而如果版本之间有了文件布局的区别,<command>svn_load_dirs.pl</command>会询问你如何解决这个区别,例如你会有机会告诉脚本libcomplex版本1.0的<filename>math.c</filename>文件在1.1已经重命名为<filename>arithmetic.c</filename>,任何没有解释为移动的差异都会被看作是常规的添加和删除。"
9383 #. (para)
9384 #: ../source/book.xml:9152
9385 msgid "The script also accepts a separate configuration file for setting properties on files and directories matching a regular expression that are <emphasis>added</emphasis> to the repository. This configuration file is specified to <command>svn_load_dirs.pl</command> using the <option>-p</option> command-line option. Each line of the configuration file is a whitespace-delimited set of two or four values: a Perl-style regular expression to match the added path against, a control keyword (either <literal>break</literal> or <literal>cont</literal>), and then optionally a property name and value."
9386 msgstr "这个脚本也接受单独配置文件用来为<emphasis>添加到</emphasis>版本库的文件和目录设置匹配正则表达式的属性。配置文件通过<command>svn_load_dirs.pl</command>的<option>-p</option>命令行选项指定,这个配置文件的每一行都是一个空白分割的两列或者四列值:一个Perl样式的正则表达式来匹配添加的路径、一个控制关键字(<literal>break</literal>或者是<literal>cont</literal>)和可选的属性名和值。"
9388 #. (screen)
9389 #: ../source/book.xml:9163
9390 #, no-wrap
9391 msgid ""
9392 "\n"
9393 "\\.png$              break   svn:mime-type   image/png\n"
9394 "\\.jpe?g$            break   svn:mime-type   image/jpeg\n"
9395 "\\.m3u$              cont    svn:mime-type   audio/x-mpegurl\n"
9396 "\\.m3u$              break   svn:eol-style   LF\n"
9397 ".*                  break   svn:eol-style   native\n"
9398 msgstr ""
9399 "\n"
9400 "\\.png$              break   svn:mime-type   image/png\n"
9401 "\\.jpe?g$            break   svn:mime-type   image/jpeg\n"
9402 "\\.m3u$              cont    svn:mime-type   audio/x-mpegurl\n"
9403 "\\.m3u$              break   svn:eol-style   LF\n"
9404 ".*                  break   svn:eol-style   native\n"
9406 #. (para)
9407 #: ../source/book.xml:9170
9408 msgid "For each added path, the configured property changes whose regular expression matches the path are applied in order, unless the control specification is <literal>break</literal> (which means that no more property changes should be applied to that path). If the control specification is <literal>cont</literal>—an abbreviation for <literal>continue</literal>—then matching will continue with the next line of the configuration file."
9409 msgstr "对每一个添加的路径,会按照顺序为匹配正则表达式的文件配置属性,除非控制标志是<literal>break</literal>(意味着不需要更多的路径匹配应用到这个路径)。如果控制说明是<literal>cont</literal>—<literal>continue</literal>的缩写—然后匹配工作会继续到配置文件的下一行。"
9411 #. (para)
9412 #: ../source/book.xml:9178
9413 msgid "Any whitespace in the regular expression, property name, or property value must be surrounded by either single or double quote characters. You can escape quote characters that are not used for wrapping whitespace by preceding them with a backslash (<literal>\\</literal>) character. The backslash escapes only quotes when parsing the configuration file, so do not protect any other characters beyond what is necessary for the regular expression."
9414 msgstr "任何正则表达式,属性名或者属性值的空格必须使用单引号或者双引号环绕,你可以使用反斜杠(<literal>\\</literal>)换码符来回避引号,反斜杠只会在解析配置文件时回避引号,所以不能保护必要正则表达式字符之外的的其它字符。"
9416 #. (para)
9417 #: ../source/book.xml:9195
9418 msgid "We've covered a lot of ground in this chapter. We've discussed the concepts of tags and branches, and demonstrated how Subversion implements these concepts by copying directories with the <command>svn copy</command> command. We've shown how to use <command>svn merge</command> to copy changes from one branch to another, or roll back bad changes. We've gone over the use of <command>svn switch</command> to create mixed-location working copies. And we've talked about how one might manage the organization and lifetimes of branches in a repository."
9419 msgstr "我们已经在本章覆盖了许多基础知识,我们讨论了标签和分支的概念,然后描述了Subversion怎样用<command>svn copy</command>命令拷贝目录实现了这些概念,我们也已经展示了怎样使用<command>svn merge</command>命令来在分支之间拷贝修改,或是撤销错误的修改。我们仔细研究了使用<command>svn switch</command>来创建混合位置的工作拷贝,然后我们也讨论了怎样管理和组织版本库中分支的生命周期。"
9421 #. (para)
9422 #: ../source/book.xml:9205
9423 msgid "Remember the Subversion mantra: branches and tags are cheap. So use them liberally! At the same time, don't forget to use good merging habits. Cheap copies are only useful when you're careful about tracking your merging actions."
9424 msgstr "记住Subversion的颂歌:分支和标签是廉价的,所以可以自由的使用!在同一时间,不要忘记使用好的合并习惯,廉价的拷贝只在你小心的跟踪你的合并操作时有用。"
9426 #. (title)
9427 #: ../source/book.xml:9218
9428 msgid "Repository Administration"
9429 msgstr "版本库管理"
9431 #. (para)
9432 #: ../source/book.xml:9220
9433 msgid "The Subversion repository is the central storehouse of all your versioned data. As such, it becomes an obvious candidate for all the love and attention an administrator can offer. While the repository is generally a low-maintenance item, it is important to understand how to properly configure and care for it so that potential problems are avoided, and actual problems are safely resolved."
9434 msgstr "Subversion版本库是保存任意数量项目版本化数据的中央仓库,因此,版本库成为管理员关注的对象。版本库的维护一般并不需要太多的关注,但为了避免一些潜在的问题和解决一些实际问题,理解怎样适当的配置和维护还是非常重要的。"
9436 #. (para)
9437 #: ../source/book.xml:9227
9438 msgid "In this chapter, we'll discuss how to create and configure a Subversion repository. We'll also talk about repository maintenance, providing examples of how and when to use the <command>svnlook</command> and <command>svnadmin</command> tools provided with Subversion. We'll address some common questions and mistakes, and give some suggestions on how to arrange the data in the repository."
9439 msgstr "在这一章里,我们将讨论如何建立和配置一个Subversion版本库,还会讨论版本库的维护,包括<command>svnlook</command>和<command>svnadmin</command>工具的使用实例。我们将说明一些常见的问题和错误,并提供一些安排版本库数据的建议。"
9441 #. (para)
9442 #: ../source/book.xml:9239
9443 msgid "This may sound really prestigious and lofty, but we're just talking about anyone who is interested in that mysterious realm beyond the working copy where everyone's data hangs out."
9444 msgstr "这可能听起来很崇高, 但我们所指的只是那些对管理别人工作拷贝数据之外的神秘领域感兴趣的人。"
9446 #. (para)
9447 #: ../source/book.xml:9234
9448 msgid "If you plan to access a Subversion repository only in the role of a user whose data is under version control (that is, via a Subversion client), you can skip this chapter altogether. However, if you are, or wish to become, a Subversion repository administrator, <placeholder-1/> this chapter is for you."
9449 msgstr "如果您只是以普通用户的身份访问版本库对数据进行版本控制(就是说通过Subversion客户端),您完全可以跳过本章。但是如果您已经是或打算成为Subversion版本库的管理员,<placeholder-1/>您一定要关注一下本章的内容。"
9451 #. (title)
9452 #: ../source/book.xml:9249
9453 msgid "The Subversion Repository, Defined"
9454 msgstr "Subversion 版本库的定义"
9456 #. (para)
9457 #: ../source/book.xml:9251
9458 msgid "Before jumping into the broader topic of repository administration, let's further define what a repository is. How does it look? How does it feel? Does it take its tea hot or iced, sweetened, and with lemon? As an administrator, you'll be expected to understand the composition of a repository both from a literal, OS-level perspective—how a repository looks and acts with respect to non-Subversion tools—and from a logical perspective—dealing with how data is represented <emphasis>inside</emphasis> the repository."
9459 msgstr "在进入版本库管理这块宽泛的主题之前,让我们进一步确定一下版本库的定义,它是怎样工作的?让人有什么感觉?它希望茶是热的还是冰的,加糖或柠檬吗?作为一名管理员,你应该既能够从物理具体细节的视角-版本库如何响应一个非Subversion的工具,也能够从逻辑视角-数据在版本库中如何展示。"
9461 #. (para)
9462 #: ../source/book.xml:9260
9463 msgid "Seen through the eyes of a typical file browser application (such as the Windows Explorer) or command-line based filesystem navigation tools, the Subversion repository is just another directory full of stuff. There are some subdirectories with human-readable configuration files in them, some subdirectories with some not-so-human-readable data files, and so on. As in other areas of the Subversion design, modularity is given high regard, and hierarchical organization is preferred to cluttered chaos. So a shallow glance into a typical repository from a nuts-and-bolts perspective is sufficient to reveal the basic components of the repository:"
9464 msgstr "通过典型的文件浏览器应用程序或命令行为基础的文件系统浏览工具查看,Subversion版本库只是另一个目录。也有一些子目录下包含可读的数据文件,也有一些子目录包含不可读的数据文件。Subversion设计的其他地方,模块化被认真考虑,等级化的组织可以减少混乱,所以脱离细节粗略看一下典型的版本库可以有效地揭示版本库的基本组件。"
9466 #. (screen)
9467 #: ../source/book.xml:9271
9468 #, no-wrap
9469 msgid ""
9470 "\n"
9471 "$ ls repos\n"
9472 "conf/  dav/  db/  format  hooks/  locks/  README.txt\n"
9473 msgstr ""
9474 "\n"
9475 "$ ls repos\n"
9476 "conf/  dav/  db/  format  hooks/  locks/  README.txt\n"
9478 #. (para)
9479 #: ../source/book.xml:9275
9480 msgid "Here's a quick fly-by overview of what exactly you're seeing in this directory listing. (Don't get bogged down in the terminology—detailed coverage of these components exists elsewhere in this and other chapters.)"
9481 msgstr "下面是一个你看到列出目录的快速总揽。(不要因为术语陷入困境—这些组件的细节介绍可以从本章或其他章节找到。)"
9483 #. (term)
9484 #: ../source/book.xml:9281
9485 msgid "conf"
9486 msgstr "conf"
9488 #. (para)
9489 #: ../source/book.xml:9283
9490 msgid "A directory containing repository configuration files."
9491 msgstr "一个存储版本库配置文件的目录。"
9493 #. (term)
9494 #: ../source/book.xml:9287
9495 msgid "dav"
9496 msgstr "dav"
9498 #. (para)
9499 #: ../source/book.xml:9289
9500 msgid "A directory provided to mod_dav_svn for its private housekeeping data."
9501 msgstr "提供给Apache和mod_dav_svn的目录,让它们存储自己的数据。"
9503 #. (term)
9504 #: ../source/book.xml:9294
9505 msgid "db"
9506 msgstr "db"
9508 #. (para)
9509 #: ../source/book.xml:9296
9510 msgid "The data store for all of your versioned data."
9511 msgstr "你的版本化数据的数据存储方式。"
9513 #. (term)
9514 #: ../source/book.xml:9300
9515 msgid "format"
9516 msgstr "format"
9518 #. (para)
9519 #: ../source/book.xml:9302
9520 msgid "A file that contains a single integer that indicates the version number of the repository layout."
9521 msgstr "包含了一个用来表示版本库布局版本号整数的文件。"
9523 #. (term), (secondary)
9524 #: ../source/book.xml:9307 ../source/book.xml:24037 ../source/book.xml:24084
9525 #: ../source/book.xml:24133 ../source/book.xml:24179 ../source/book.xml:24242
9526 #: ../source/book.xml:24304 ../source/book.xml:24355 ../source/book.xml:24401
9527 #: ../source/book.xml:24454
9528 msgid "hooks"
9529 msgstr "hooks"
9531 #. (para)
9532 #: ../source/book.xml:9309
9533 msgid "A directory full of hook script templates (and hook scripts themselves, once you've installed some)."
9534 msgstr "一个存储钩子脚本模版的目录(还有钩子脚本本身, 如果你安装了的话)。"
9536 #. (term)
9537 #: ../source/book.xml:9314
9538 msgid "locks"
9539 msgstr "locks"
9541 #. (para)
9542 #: ../source/book.xml:9316
9543 msgid "A directory for Subversion's repository lock files, used for tracking accessors to the repository."
9544 msgstr "一个存储Subversion版本库锁定文件的目录,被用来追踪对版本库的访问。"
9546 #. (term)
9547 #: ../source/book.xml:9321
9548 msgid "README.txt"
9549 msgstr "README.txt"
9551 #. (para)
9552 #: ../source/book.xml:9323
9553 msgid "A file whose contents merely inform its readers that they are looking at a Subversion repository."
9554 msgstr "这个文件只是用来告诉它的阅读者,他现在看的是 Subversion 的版本库。"
9556 #. (para)
9557 #: ../source/book.xml:9328
9558 msgid "Of course, when accessed via the Subversion libraries, this otherwise unremarkable collection of files and directories suddenly becomes an implementation of a virtual, versioned filesystem, complete with customizable event triggers. This filesystem has its own notions of directories and files, very similar to the notions of such things held by real filesystems (such as NTFS, FAT32, ext3, and so on). But this is a special filesystem—it hangs these directories and files from revisions, keeping all the changes you've ever made to them safely stored and forever accessible. This is where the entirety of your versioned data lives."
9559 msgstr "当然,当通过Subversion库访问时,这些平常的文件和目录立刻变成了虚拟文件系统的实现,由自定义的事件触发完成。这个文件系统的目录和文件都有自己的概念,与真实的文件系统(例如NTFS、FAT32、ext3等等)很类似,但是也有特别的地方—它在修订版本间锁定目录和文件,保持你的所有修改可以永远访问的,这是你的所有版本化数据存放的地方。"
9561 #. (title)
9562 #: ../source/book.xml:9345
9563 msgid "Strategies for Repository Deployment"
9564 msgstr "版本库开发策略"
9566 #. (para)
9567 #: ../source/book.xml:9347
9568 msgid "Due largely to the simplicity of the overall design of the Subversion repository and the technologies on which it relies, creating and configuring a repository are fairly straightforward tasks. There are a few preliminary decisions you'll want to make, but the actual work involved in any given setup of a Subversion repository is pretty straightforward, tending towards mindless repetition if you find yourself setting up multiples of these things."
9569 msgstr "因为Subversion版本库本身和所依赖技术设计的简单性,创建和配置版本库是一件相对直接的任务。需要做一些的预备决定,但是设置Subversion版本库的实际工作非常直接,在做过几次之后就会发现不必费太多心思去做这件事。"
9571 #. (para)
9572 #: ../source/book.xml:9355
9573 msgid "Some things you'll want to consider up front, though, are:"
9574 msgstr "下面是一些你需要预先考虑的事情:"
9576 #. (para)
9577 #: ../source/book.xml:9358
9578 msgid "What data do you expect to live in your repository (or repositories), and how will that data be organized?"
9579 msgstr "你的版本库将要存放什么数据(或多个版本库),这些数据如何组织?"
9581 #. (para)
9582 #: ../source/book.xml:9362
9583 msgid "Where will your repository live, and how will it be accessed?"
9584 msgstr "版本库存放在哪里,如何被访问?"
9586 #. (para)
9587 #: ../source/book.xml:9366
9588 msgid "What types of access control and repository event reporting do you need?"
9589 msgstr "你需要什么类型的访问控制和版本库事件报告?"
9591 #. (para)
9592 #: ../source/book.xml:9370
9593 msgid "Which of the available types of data store do you want to use?"
9594 msgstr "你希望使用哪种数据存储方式?"
9596 #. (para)
9597 #: ../source/book.xml:9374
9598 msgid "In this section, we'll try to help you answer those questions."
9599 msgstr "在本节,我们要尝试帮你回答这些问题。"
9601 #. (title)
9602 #: ../source/book.xml:9379
9603 msgid "Planning Your Repository Organization"
9604 msgstr "规划你的版本库结构"
9606 #. (para)
9607 #: ../source/book.xml:9381
9608 msgid "While Subversion allows you to move around versioned files and directories without any loss of information, and even provides ways of moving whole sets of versioned history from one repository to another, doing so can greatly disrupt the workflow of those who access the repository often and come to expect things to be at certain locations. So before creating a new repository, try to peer into the future a bit; plan ahead before placing your data under version control. By conscientiously <quote>laying out</quote> your repository or repositories and their versioned contents ahead of time, you can prevent many future headaches."
9609 msgstr "在Subversion版本库中,移动版本化的文件和目录不会损失任何信息,甚至也可以将版本库的的一组数据无损历史的移植到另一个版本库,但是这样一来那些经常访问版本库并且以为文件总是在同一个路径的用户可能会受到干扰。为将来着想,最好预先对你的版本库布局进行规划。以一种高效的<quote>布局</quote>开始项目,可以减少将来很多不必要的麻烦。"
9611 #. (para)
9612 #: ../source/book.xml:9392
9613 msgid "Let's assume that as repository administrator, you will be responsible for supporting the version control system for several projects. Your first decision is whether to use a single repository for multiple projects, or to give each project its own repository, or some compromise of these two."
9614 msgstr "假如你是一个版本库管理员,需要向多个项目提供版本控制支持。那么,你首先要决定的是,用一个版本库支持多个项目,还是为每个项目建立一个版本库,还是两种方法的混合方式。"
9616 #. (para)
9617 #: ../source/book.xml:9398
9618 msgid "There are benefits to using a single repository for multiple projects, most obviously the lack of duplicated maintenance. A single repository means that there is one set of hook programs, one thing to routinely backup, one thing to dump and load if Subversion releases an incompatible new version, and so on. Also, you can move data between projects easily, and without losing any historical versioning information."
9619 msgstr "使用一个版本库支持多个项目有很多好处,最明显的无过于不需要维护好几个版本库。单一版本库就意味着只有一个钩子程序,只需要备份一个数据库,当Subversion进行不兼容升级时,只需要一次转储和装载操作,等等。还有,你可以轻易的在项目之间移动数据,还不会损失任何历史版本信息。"
9621 #. (para)
9622 #: ../source/book.xml:9422
9623 msgid "Whether founded in ignorance or in poorly considered concepts about how to derive legitimate software development metrics, global revision numbers are a silly thing to fear, and <emphasis>not</emphasis> the kind of thing you should weigh when deciding how to arrange your projects and repositories."
9624 msgstr "无论是在忽略情况下建立或很少考虑过如何产生正确的软件开发矩阵,都不应该愚蠢的担心全局的修订版本号码,这不应该成为安排项目和版本库的理由。"
9626 #. (para)
9627 #: ../source/book.xml:9406
9628 msgid "The downside of using a single repository is that different projects may have different requirements in terms of the repository event triggers, such as needing to send commit notification emails to different mailing lists, or having different definitions about what does and does not constitute a legitimate commit. These aren't insurmountable problems, of course—it just means that all of your hook scripts have to be sensitive to the layout of your repository rather than assuming that the whole repository is associated with a single group of people. Also, remember that Subversion uses repository-global revision numbers. While those numbers don't have any particular magical powers, some folks still don't like the fact that even though no changes have been made to their project lately, the youngest revision number for the repository keeps climbing because other projects are actively adding new revisions. <placeholder-1/>"
9629 msgstr "单一版本库的缺点是,不同的项目通常都有不同的版本库触发事件需求,例如需要发送提交通知邮件到不同的邮件列表,需要不同的鉴定提交是否合法的定义。这些都不是不可逾越的问题,当然—之需要你的钩子程序能够察看版本库的布局,而不是假定整个版本库与同一组人关联。还有,别忘了Subversion的修订版本号是针对整个版本库的,这些号码没有任何魔力。即使最近没有对某个项目作出修改,版本库的修订版本号还是会因为其它项目的修改而不停的提升,许多人并不喜欢这样的事实。<placeholder-1/>"
9631 #. (para)
9632 #: ../source/book.xml:9429
9633 msgid "A middle-ground approach can be taken, too. For example, projects can be grouped by how well they relate to each other. You might have a few repositories with a handful of projects in each repository. That way, projects that are likely to want to share data can do so easily, and as new revisions are added to the repository, at least the developers know that those new revisions are at least remotely related to everyone who uses that repository."
9634 msgstr "可以采用折中的办法。比如,可以把许多项目按照彼此之间的关联程度划分为几个组合,然后为每一个项目组合建立一个版本库。这样,在相关项目之间共享数据依旧很简单,而如果修订版本号有了变化,至少开发人员知道,改变的东西多少和他们有些关系。"
9636 #. (para)
9637 #: ../source/book.xml:9454
9638 msgid "The <filename>trunk</filename>, <filename>tags</filename>, and <filename>branches</filename> trio are sometimes referred to as <quote>the TTB directories</quote>."
9639 msgstr "<filename>trunk</filename>、<filename>tags</filename>和<filename>branches</filename>可以使用<quote>TTB目录</quote>来表示。"
9641 #. (para)
9642 #: ../source/book.xml:9437
9643 msgid "After deciding how to organize your projects with respect to repositories, you'll probably want to think about directory hierarchies within the repositories themselves. Because Subversion uses regular directory copies for branching and tagging (see <xref linkend=\"svn.branchmerge\"/>), the Subversion community recommends that you choose a repository location for each <firstterm>project root</firstterm>—the <quote>top-most</quote> directory which contains data related to that project—and then create three subdirectories beneath that root: <filename>trunk</filename>, meaning the directory under which the main project development occurs; <filename>branches</filename>, which is a directory in which to create various named branches of the main development line; <filename>tags</filename>, which is a collection of tree snapshots that are created, and perhaps destroyed, but never changed. <placeholder-1/>"
9644 msgstr "在决定了如何用版本库组织项目以后,就该决定如何设置版本库的目录层次了。由于Subversion按普通的目录复制方式完成分支和标签操作(参见<xref linkend=\"svn.branchmerge\"/>),Subversion社区建议为每一个项目建立一个<firstterm>项目根目录</firstterm>—项目的<quote>顶级</quote>目录—然后在根目录下建立三个子目录:<filename>trunk</filename>,保存项目的开发主线;<filename>branches</filename>,保存项目的各种开发分支;<filename>tags</filename>,保存项目的标签,也就是创建后永远不会修改的分支(可能会删除)。 <placeholder-1/>"
9646 #. (para)
9647 #: ../source/book.xml:9458
9648 msgid "For example, your repository might look like:"
9649 msgstr "举个例子,一个版本库可能会有如下的布局:"
9651 #. (screen)
9652 #: ../source/book.xml:9459
9653 #, no-wrap
9654 msgid ""
9655 "\n"
9656 "/\n"
9657 "   calc/\n"
9658 "      trunk/\n"
9659 "      tags/\n"
9660 "      branches/\n"
9661 "   calendar/\n"
9662 "      trunk/\n"
9663 "      tags/\n"
9664 "      branches/\n"
9665 "   spreadsheet/\n"
9666 "      trunk/\n"
9667 "      tags/\n"
9668 "      branches/\n"
9669 "   …\n"
9670 msgstr ""
9671 "\n"
9672 "/\n"
9673 "   calc/\n"
9674 "      trunk/\n"
9675 "      tags/\n"
9676 "      branches/\n"
9677 "   calendar/\n"
9678 "      trunk/\n"
9679 "      tags/\n"
9680 "      branches/\n"
9681 "   spreadsheet/\n"
9682 "      trunk/\n"
9683 "      tags/\n"
9684 "      branches/\n"
9685 "   …\n"
9687 #. (para)
9688 #: ../source/book.xml:9475
9689 msgid "Note that it doesn't matter where in your repository each project root is. If you have only one project per repository, the logical place to put each project root is at the root of that project's respective repository. If you have multiple projects, you might want to arrange them in groups inside the repository, perhaps putting projects with similar goals or shared code in the same subdirectory, or maybe just grouping them alphabetically. Such an arrangement might look like:"
9690 msgstr "项目在版本库中的根目录地址并不重要。如果每个版本库中只有一个项目,那么就可以认为项目的根目录就是版本库的根目录。如果版本库中包含多个项目,那么可以将这些项目划分成不同的组合(按照项目的目标或者是否需要共享代码甚至是字母顺序)保存在不同子目录中,下面的例子给出了一个类似的布局:"
9692 #. (screen)
9693 #: ../source/book.xml:9484
9694 #, no-wrap
9695 msgid ""
9696 "\n"
9697 "/\n"
9698 "   utils/\n"
9699 "      calc/\n"
9700 "         trunk/\n"
9701 "         tags/\n"
9702 "         branches/\n"
9703 "      calendar/\n"
9704 "         trunk/\n"
9705 "         tags/\n"
9706 "         branches/\n"
9707 "      …\n"
9708 "   office/\n"
9709 "      spreadsheet/\n"
9710 "         trunk/\n"
9711 "         tags/\n"
9712 "         branches/\n"
9713 "      …\n"
9714 msgstr ""
9715 "\n"
9716 "/\n"
9717 "   utils/\n"
9718 "      calc/\n"
9719 "         trunk/\n"
9720 "         tags/\n"
9721 "         branches/\n"
9722 "      calendar/\n"
9723 "         trunk/\n"
9724 "         tags/\n"
9725 "         branches/\n"
9726 "      …\n"
9727 "   office/\n"
9728 "      spreadsheet/\n"
9729 "         trunk/\n"
9730 "         tags/\n"
9731 "         branches/\n"
9732 "      …\n"
9734 #. (para)
9735 #: ../source/book.xml:9503
9736 msgid "Lay out your repository in whatever way you see fit. Subversion does not expect or enforce a particular layout—in its eyes, a directory is a directory is a directory. Ultimately, you should choose the repository arrangement that meets the needs of the people who work on the projects that live there."
9737 msgstr "按照你认为合适的方式安排版本库的布局,Subversion自身并不强制或者偏好某一种布局形式,对于Subversion来说,目录就是目录。最后,在设计版本库布局的时候,不要忘了考虑一下项目参与者们的意见。"
9739 #. (para)
9740 #: ../source/book.xml:9509
9741 msgid "In the name of full disclosure, though, we'll mention another very common layout. In this layout, the <filename>trunk</filename>, <filename>tags</filename>, and <filename>branches</filename> directories live in the root directory of your repository, and your projects are in subdirectories beneath those, like:"
9742 msgstr "为了完整性,我们需要提一下另一种常见的布局,在这种布局中<filename>trunk</filename>、<filename>tags</filename>和<filename>branches</filename>都在根目录下,而你的项目在各个子目录下,例如:"
9744 #. (screen)
9745 #: ../source/book.xml:9515
9746 #, no-wrap
9747 msgid ""
9748 "\n"
9749 "/\n"
9750 "   trunk/\n"
9751 "      calc/\n"
9752 "      calendar/\n"
9753 "      spreadsheet/\n"
9754 "      …\n"
9755 "   tags/\n"
9756 "      calc/\n"
9757 "      calendar/\n"
9758 "      spreadsheet/\n"
9759 "      …\n"
9760 "   branches/\n"
9761 "      calc/\n"
9762 "      calendar/\n"
9763 "      spreadsheet/\n"
9764 "      …\n"
9765 msgstr ""
9766 "\n"
9767 "/\n"
9768 "   trunk/\n"
9769 "      calc/\n"
9770 "      calendar/\n"
9771 "      spreadsheet/\n"
9772 "      …\n"
9773 "   tags/\n"
9774 "      calc/\n"
9775 "      calendar/\n"
9776 "      spreadsheet/\n"
9777 "      …\n"
9778 "   branches/\n"
9779 "      calc/\n"
9780 "      calendar/\n"
9781 "      spreadsheet/\n"
9782 "      …\n"
9784 #. (para)
9785 #: ../source/book.xml:9533
9786 msgid "There's nothing particularly incorrect about such a layout, but it may or may not seem as intuitive for your users. Especially in large, multi-project situations with many users, those users may tend to be familiar with only one or two of the projects in the repository. But the projects-as-branch-siblings tends to de-emphasize project individuality and focus on the entire set of projects as a single entity. That's a social issue though. We like our originally suggested arrangement for purely practical reasons—it's easier to ask about (or modify, or migrate elsewhere) the entire history of a single project when there's a single repository path that holds the entire history—past, present, tagged, and branched—for that project and that project alone."
9787 msgstr "这种布局没有什么不对的,但是它只是或不是你的用户的直觉。特别是在大的,有许多用户的多项目情况下,用户可能只熟悉版本库中一两个项目。但是项目作为分支的方式可以鼓励项目的个性和将注意力集中在一个单独的实体。尽管这也是一个社会问题,因为实践的原因,我们很愿意对安排提出一些建议—当一个项目的历史都在一个目录里时,很容易查询(或是修改、移植)单个项目的历史—过去、现在、标签和分支—单独为那个项目。"
9789 #. (title)
9790 #: ../source/book.xml:9551
9791 msgid "Deciding Where and How to Host Your Repository"
9792 msgstr "决定在哪里与如何部署你的版本库"
9794 #. (para)
9795 #: ../source/book.xml:9553
9796 msgid "Before creating your Subversion repository, an obvious question you'll need to answer is where the thing is going to live. This is strongly connected to a myriad of other questions involving how the repository will be accessed (via a Subversion server or directly), by whom (users behind your corporate firewall or the whole world out on the open Internet), what other services you'll be providing around Subversion (repository browsing interfaces, e-mail based commit notification, etc.), your data backup strategy, and so on."
9797 msgstr "在创建Subversion版本库之前,一个明显的问题是所有的东西要存放在什么地方,这与很多问题关联,包括版本库如何访问(通过Subversion服务器或直接访问)、被谁访问(防火墙后的用户或全部是在Internet上)、你将围绕Subversion提供哪些服务(版本库浏览接口,e-mail为基础的提交通知等)、你的数据备份策略,等等。"
9799 #. (para)
9800 #: ../source/book.xml:9563
9801 msgid "We cover server choice and configuration in <xref linkend=\"svn.serverconfig\"/>, but the point we'd like to briefly make here is simply that the answers to some of these other questions might have implications that force your hand when deciding where your repository will live. For example, certain deployment scenarios might require accessing the repository via a remote filesystem from multiple computers, in which case (as you'll read in the next section) your choice of a repository back-end data store turns out not to be a choice at all because only one of the available back-ends will work in this scenario."
9802 msgstr "我们在<xref linkend=\"svn.serverconfig\"/>覆盖了服务器的选择和配置,我们也提供一些可能会使你必须决定使用某种服务器的问题的答案。例如,特定的部署策略可能会需要从多个计算机通过远程文件系统访问版本库,这个情况下(下一小节会读到)要求你不能选择一种版本库后端数据存储方式,因为只有一种后端在这种场景下可以工作。"
9804 #. (para)
9805 #: ../source/book.xml:9573
9806 msgid "Addressing each possible way to deploy Subversion is both impossible, and outside the scope of this book. We simply encourage you to evaluate your options using these pages and other sources as your reference material, and plan ahead."
9807 msgstr "列出所有的Subversion可能的部署方法是不可能的,超出了本书的范围,我们只是简单的鼓励你使用这部分内容和参考材料验证你的想法,并往前计划。"
9809 #. (title)
9810 #: ../source/book.xml:9582
9811 msgid "Choosing a Data Store"
9812 msgstr "选择数据存储格式"
9814 #. (para)
9815 #: ../source/book.xml:9595
9816 msgid "Often pronounced <quote>fuzz-fuzz</quote>, if Jack Repenning has anything to say about it. (This book, however, assumes that the reader is thinking <quote>eff-ess-eff-ess</quote>.)"
9817 msgstr "通常读作<quote>fuzz-fuzz</quote>, 如果Jack Repenning说起这个问题。(本书,假定读者认为是<quote>eff-ess-eff-ess</quote>。)"
9819 #. (para)
9820 #: ../source/book.xml:9584
9821 msgid "As of version 1.1, Subversion provides two options for the type of underlying data store—often referred to as <quote>the back-end</quote> or, somewhat confusingly, <quote>the (versioned) filesystem</quote>—that each repository uses. One type of data store keeps everything in a Berkeley DB (or BDB) database environment; repositories that use this type are often referred to as being <quote>BDB-backed</quote>. The other type stores data in ordinary flat files, using a custom format. Subversion developers have adopted the habit of referring to this latter data storage mechanism as <firstterm>FSFS</firstterm><placeholder-1/> —a versioned filesystem implementation that uses the native OS filesystem directly—rather than via a database library or some other abstraction layer—to store data."
9822 msgstr "在Subversion1.1中,版本库中有两种数据存储方式—通常叫做<quote>后端</quote>或其他容易混淆的名字,如<quote>(版本化的) 文件系统</quote>,每一个版本库都会使用一种。一种是在Berkeley DB数据库中存储数据,我们称之为<quote>BDB后端</quote>;另一种是使用普通的文件,自定义格式,Subversion开发者根据习惯称之为<firstterm>FSFS</firstterm><placeholder-1/> —一种使用本地操作系统文件存储数据的版本化文件系统直接实现—而不是通过某个数据库层或其他抽象层来保存数据。"
9824 #. (para)
9825 #: ../source/book.xml:9602
9826 msgid "<xref linkend=\"svn.reposadmin.basics.backends.tbl-1\"/> gives a comparative overview of Berkeley DB and FSFS repositories."
9827 msgstr "<xref linkend=\"svn.reposadmin.basics.backends.tbl-1\"/>从总体上比较了Berkeley DB和FSFS版本库。"
9829 #. (title)
9830 #: ../source/book.xml:9607
9831 msgid "Repository Data Store Comparison"
9832 msgstr "版本库数据存储对照表"
9834 #. (entry)
9835 #: ../source/book.xml:9612
9836 msgid "Category"
9837 msgstr "分类"
9839 #. (entry)
9840 #: ../source/book.xml:9613 ../source/book.xml:11968
9841 msgid "Feature"
9842 msgstr "特性"
9844 #. (entry), (title)
9845 #: ../source/book.xml:9614 ../source/book.xml:9715
9846 msgid "Berkeley DB"
9847 msgstr "Berkeley DB"
9849 #. (entry), (title)
9850 #: ../source/book.xml:9615 ../source/book.xml:9831
9851 msgid "FSFS"
9852 msgstr "FSFS"
9854 #. (entry)
9855 #: ../source/book.xml:9620
9856 msgid "Reliability"
9857 msgstr "可靠性"
9859 #. (entry)
9860 #: ../source/book.xml:9621
9861 msgid "Data integrity"
9862 msgstr "数据完整性"
9864 #. (entry)
9865 #: ../source/book.xml:9622
9866 msgid "when properly deployed, extremely reliable; Berkeley DB 4.4 brings auto-recovery"
9867 msgstr "当正确部署,非常可靠;Berkeley DB 4.4支持自动恢复"
9869 #. (entry)
9870 #: ../source/book.xml:9624
9871 msgid "older versions had some rarely demonstrated, but data-destroying bugs"
9872 msgstr "较老的版本较少被描述,但是有数据毁坏bug"
9874 #. (entry)
9875 #: ../source/book.xml:9628
9876 msgid "Sensitivity to interruptions"
9877 msgstr "对操作中断的敏感"
9879 #. (quote)
9880 #: ../source/book.xml:9630
9881 msgid "wedged"
9882 msgstr "塞住"
9884 #. (entry)
9885 #: ../source/book.xml:9629
9886 msgid "very; crashes and permission problems can leave the database <placeholder-1/>, requiring journaled recovery procedures"
9887 msgstr "很敏感;系统崩溃或者权限问题会导致数据库<placeholder-1/>,需要定期进行恢复。"
9889 #. (entry)
9890 #: ../source/book.xml:9632
9891 msgid "quite insensitive"
9892 msgstr "十分敏感"
9894 #. (entry)
9895 #: ../source/book.xml:9635
9896 msgid "Accessibility"
9897 msgstr "可用性"
9899 #. (entry)
9900 #: ../source/book.xml:9636
9901 msgid "Usable from a read-only mount"
9902 msgstr "可只读加载"
9904 #. (entry)
9905 #: ../source/book.xml:9637 ../source/book.xml:9642
9906 msgid "no"
9907 msgstr "不能"
9909 #. (entry)
9910 #: ../source/book.xml:9638 ../source/book.xml:9643 ../source/book.xml:9648
9911 msgid "yes"
9912 msgstr "可以"
9914 #. (entry)
9915 #: ../source/book.xml:9641
9916 msgid "Platform-independent storage"
9917 msgstr "存储平台无关"
9919 #. (entry)
9920 #: ../source/book.xml:9646
9921 msgid "Usable over network filesystems"
9922 msgstr "可从网络文件系统访问"
9924 #. (entry)
9925 #: ../source/book.xml:9647
9926 msgid "generally, no"
9927 msgstr "通常,不"
9929 #. (entry)
9930 #: ../source/book.xml:9651
9931 msgid "Group permissions handling"
9932 msgstr "组访问权处理"
9934 #. (entry)
9935 #: ../source/book.xml:9652
9936 msgid "sensitive to user umask problems; best if accessed by only one user"
9937 msgstr "对于用户的umask设置十分敏感,最好只由一个用户访问。"
9939 #. (entry)
9940 #: ../source/book.xml:9654
9941 msgid "works around umask problems"
9942 msgstr "对umask设置不敏感"
9944 #. (entry)
9945 #: ../source/book.xml:9657
9946 msgid "Scalability"
9947 msgstr "伸缩性"
9949 #. (entry)
9950 #: ../source/book.xml:9658
9951 msgid "Repository disk usage"
9952 msgstr "版本库磁盘使用情况"
9954 #. (entry)
9955 #: ../source/book.xml:9659
9956 msgid "larger (especially if logfiles aren't purged)"
9957 msgstr "较大(特别是没有清除日志时)"
9959 #. (entry)
9960 #: ../source/book.xml:9660
9961 msgid "smaller"
9962 msgstr "较小"
9964 #. (entry)
9965 #: ../source/book.xml:9663
9966 msgid "Number of revision trees"
9967 msgstr "修订版本树的数量"
9969 #. (entry)
9970 #: ../source/book.xml:9664
9971 msgid "database; no problems"
9972 msgstr "数据库,没有限制"
9974 #. (entry)
9975 #: ../source/book.xml:9665
9976 msgid "some older native filesystems don't scale well with thousands of entries in a single directory"
9977 msgstr "许多古老的本地文件系统在处理单一目录包含上千个条目时出现问题。"
9979 #. (entry)
9980 #: ../source/book.xml:9669
9981 msgid "Directories with many files"
9982 msgstr "有很多文件的目录"
9984 #. (entry)
9985 #: ../source/book.xml:9670
9986 msgid "slower"
9987 msgstr "较慢"
9989 #. (entry)
9990 #: ../source/book.xml:9671
9991 msgid "faster"
9992 msgstr "较快"
9994 #. (entry)
9995 #: ../source/book.xml:9674
9996 msgid "Performance"
9997 msgstr "性能"
9999 #. (entry)
10000 #: ../source/book.xml:9675
10001 msgid "Checking out latest revision"
10002 msgstr "检出最新的代码"
10004 #. (entry)
10005 #: ../source/book.xml:9676 ../source/book.xml:9677
10006 msgid "no meaningful difference"
10007 msgstr "没有有意义的区别"
10009 #. (entry)
10010 #: ../source/book.xml:9680
10011 msgid "Large commits"
10012 msgstr "大的提交"
10014 #. (entry)
10015 #: ../source/book.xml:9681
10016 msgid "slower overall, but cost is amortized across the lifetime of the commit"
10017 msgstr "整体较慢,但是在整个提交周期中消耗被分摊"
10019 #. (entry)
10020 #: ../source/book.xml:9683
10021 msgid "faster overall, but finalization delay may cause client timeouts"
10022 msgstr "较快,但是最后较长的延时可能会导致客户端操作超时"
10024 #. (para)
10025 #: ../source/book.xml:9689
10026 msgid "There are advantages and disadvantages to each of these two back-end types. Neither of them is more <quote>official</quote> than the other, though the newer FSFS is the default data store as of Subversion 1.2. Both are reliable enough to trust with your versioned data. But as you can see in <xref linkend=\"svn.reposadmin.basics.backends.tbl-1\"/>, the FSFS backend provides quite a bit more flexibility in terms of its supported deployment scenarios. More flexibility means you have to work a little harder to find ways to deploy it incorrectly. Those reasons—plus the fact that not using Berkeley DB means there's one fewer component in the system—largely explain why today almost everyone uses the FSFS backend when creating new repositories."
10027 msgstr "两种后端都有优点和缺点,没有一种更加<quote>正式</quote>,尽管新的FSFS在Subversion1.2成为缺省数据存储,两者用来存储版本化数据都是可靠的。但是就象你在<xref linkend=\"svn.reposadmin.basics.backends.tbl-1\"/>看到的,FSFS后端在部署场景中提供了更多的灵活性,更灵活意味着你很难错误的配置。那些原因—加上不使用Berkeley DB意味着在这个系统有更少的组件—这就是为什么今天几乎所有的人都使用FSFS来创建新的版本库。"
10029 #. (para)
10030 #: ../source/book.xml:9702
10031 msgid "Fortunately, most programs which access Subversion repositories are blissfully ignorant of which back-end data store is in use. And you aren't even necessarily stuck with your first choice of a data store—in the event that you change your mind later, Subversion provides ways of migrating your repository's data into another repository that uses a different back-end data store. We talk more about that later in this chapter."
10032 msgstr "幸运的是,大多数访问Subversion的程序不会在意其所用的后端数据存储。而且你不必一定要使用你最初的数据存储方法—如果后来你改变了主意,Subversion提供了移植版本库数据到另一个版本库的方法,我们会在后面详细讨论。"
10034 #. (para)
10035 #: ../source/book.xml:9710
10036 msgid "The following subsections provide a more detailed look at the available data store types."
10037 msgstr "下面的小节提供了数据存储类型更加详细的介绍。"
10039 #. (para)
10040 #: ../source/book.xml:9717
10041 msgid "When the initial design phase of Subversion was in progress, the developers decided to use Berkeley DB for a variety of reasons, including its open-source license, transaction support, reliability, performance, API simplicity, thread-safety, support for cursors, and so on."
10042 msgstr "在Subversion的初始设计阶段,开发者因为多种原因而决定采用Berkeley DB,比如它的开源协议、事务支持、可靠性、性能、简单的API、线程安全、支持游标等。"
10044 #. (para)
10045 #: ../source/book.xml:9723
10046 msgid "Berkeley DB provides real transaction support—perhaps its most powerful feature. Multiple processes accessing your Subversion repositories don't have to worry about accidentally clobbering each other's data. The isolation provided by the transaction system is such that for any given operation, the Subversion repository code sees a static view of the database—not a database that is constantly changing at the hand of some other process—and can make decisions based on that view. If the decision made happens to conflict with what another process is doing, the entire operation is rolled back as if it never happened, and Subversion gracefully retries the operation against a new, updated (and yet still static) view of the database."
10047 msgstr "Berkeley DB提供了真正的事务支持-这或许是它最强大的特性,访问你的Subversion版本库的多个进程不必担心偶尔会破坏其他进程的数据。事务系统提供的隔离对于任何给定的操作,Subversion版本库代码看到的只是数据库的静态视图-而不是一个在其他进程影响不断变化的数据库-并能够根据该视图作出决定。如果该决定正好同其他进程所做操作冲突,整个操作会回滚,就像什么都没有发生一样,并且Subversion会优雅的再次对更新的静态视图进行操作。"
10049 #. (para)
10050 #: ../source/book.xml:9737
10051 msgid "Another great feature of Berkeley DB is <firstterm>hot backups</firstterm>—the ability to backup the database environment without taking it <quote>offline</quote>. We'll discuss how to backup your repository in <xref linkend=\"svn.reposadmin.maint.backup\"/>, but the benefits of being able to make fully functional copies of your repositories without any downtime should be obvious."
10052 msgstr "Berkeley DB另一个强大的特性是热备份-不必<quote>脱机</quote>就可以备份数据库环境的能力。我们将会在<xref linkend=\"svn.reposadmin.maint.backup\"/>讨论如何备份你的版本库,能够不停止系统对版本库做全面备份的好处是显而易见的。"
10054 #. (para)
10055 #: ../source/book.xml:9743
10056 msgid "Berkeley DB is also a very reliable database system when properly used. Subversion uses Berkeley DB's logging facilities, which means that the database first writes to on-disk log files a description of any modifications it is about to make, and then makes the modification itself. This is to ensure that if anything goes wrong, the database system can back up to a previous <firstterm>checkpoint</firstterm>—a location in the log files known not to be corrupt—and replay transactions until the data is restored to a usable state. See <xref linkend=\"svn.reposadmin.maint.diskspace\"/> for more about Berkeley DB log files."
10057 msgstr "Berkeley DB同时是一个可信赖的数据库系统。Subversion利用了Berkeley DB可以记日志的便利,这意味着数据库先在磁盘上写一个日志文件,描述它将要做的修改,然后再做这些修改。这是为了确保如果如果任何地方出了差错,数据库系统能恢复到先前的<firstterm>检查点</firstterm>—一个日志文件认为没有错误的位置,重新开始事务直到数据恢复为一个可用的状态。关于Berkeley DB日志文件的更多信息请查看<xref linkend=\"svn.reposadmin.maint.diskspace\"/>。"
10059 #. (para)
10060 #: ../source/book.xml:9755
10061 msgid "But every rose has its thorn, and so we must note some known limitations of Berkeley DB. First, Berkeley DB environments are not portable. You cannot simply copy a Subversion repository that was created on a Unix system onto a Windows system and expect it to work. While much of the Berkeley DB database format is architecture independent, there are other aspects of the environment that are not. Secondly, Subversion uses Berkeley DB in a way that will not operate on Windows 95/98 systems—if you need to house a BDB-backed repository on a Windows machine, stick with Windows 2000 or newer."
10062 msgstr "但是每朵玫瑰都有刺,我们也必须记录一些Berkeley DB已知的缺陷。首先,Berkeley DB环境不是跨平台的。你不能简单的拷贝一个在Unix上创建的Subversion版本库到一个Windows系统并期望它能够正常工作。尽管Berkeley DB数据库的大部分格式是不受架构约束的,但环境还是有一些方面没有独立出来。其次,使用Berkeley DB的Subversion不能在95/98系统上运行—如果你需要将版本库建在一个Windows机器上,请装到Windows2000或WindowsXP上。"
10064 #. (para)
10065 #: ../source/book.xml:9768
10066 msgid "Berkeley DB requires that the underlying filesystem implement strict POSIX locking semantics, and more importantly, the ability to map files directly into process memory."
10067 msgstr "Berkeley DB需要底层的文件系统实现严格的POSIX锁定语法,更重要的是,将文件直接映射到内存的能力。"
10069 #. (para)
10070 #: ../source/book.xml:9766
10071 msgid "While Berkeley DB promises to behave correctly on network shares that meet a particular set of specifications, <placeholder-1/> most networked filesystem types and appliances do <emphasis>not</emphasis> actually meet those requirements. And in no case can you allow a BDB-backed repository that resides on a network share to be accessed by multiple clients of that share at once (which quite often is the whole point of having the repository live on a network share in the first place)."
10072 msgstr "然而Berkeley DB对于在网络共享上工作提出了一组规范,<placeholder-1/>大多数网络文件系统和应用没有实现这个要求,所以不能允许在网络共享上的BDB后端版本库被多个客户端同时访问(首先要知道版本库存放在网络共享上是非常普遍的)。"
10074 #. (para)
10075 #: ../source/book.xml:9780
10076 msgid "If you attempt to use Berkeley DB on a non-compliant remote filesystem, the results are unpredictable—you may see mysterious errors right away, or it may be months before you discover that your repository database is subtly corrupted. You should strongly consider using the FSFS data store for repositories that need to live on a network share."
10077 msgstr "如果你尝试在不顺从的远程文件系统上使用Berkeley DB,结果是不可预知的—你会立刻看到神秘的错误,或者是在发生隐含错误之后几个月之后才发现。你必须认真考虑在网络共享情况下使用FSFS数据存储。"
10079 #. (para)
10080 #: ../source/book.xml:9788
10081 msgid "Finally, because Berkeley DB is a library linked directly into Subversion, it's more sensitive to interruptions than a typical relational database system. Most SQL systems, for example, have a dedicated server process that mediates all access to tables. If a program accessing the database crashes for some reason, the database daemon notices the lost connection and cleans up any mess left behind. And because the database daemon is the only process accessing the tables, applications don't need to worry about permission conflicts. These things are not the case with Berkeley DB, however. Subversion (and programs using Subversion libraries) access the database tables directly, which means that a program crash can leave the database in a temporarily inconsistent, inaccessible state. When this happens, an administrator needs to ask Berkeley DB to restore to a checkpoint, which is a bit of an annoyance. Other things can cause a repository to <quote>wedge</quote> besides crashed processes, such as programs conflicting over ownership and permissions on the database files."
10082 msgstr "最后,因为Berkeley DB的库直接链接到了Subversion中,它对于中断比典型的关系型数据库系统更为敏感。大多数SQL系统,举例来说,有一个主服务进程来协调对数据库表的访问。如果一个访问数据库的程序因为某种原因出现问题,数据库守护进程察觉到连接中断会做一些清理。因为数据库守护进程是唯一访问数据库表的进程,应用程序不需要担心访问许可的冲突。但是,这些情况与Berkeley DB不同。Subversion(和使用Subversion库的程序)直接访问数据库的表,这意味着如果有一个程序崩溃,就会使数据库处于一个暂时的不一致、不可访问的状态。当这种情况发生时,管理员需要让Berkeley DB恢复到一个检查点,这的确有点讨厌。除了崩溃的进程,还有一些情况能让版本库出现异常,比如程序在数据库文件的所有权或访问权限上发生冲突。"
10084 #. (para)
10085 #: ../source/book.xml:9808
10086 msgid "Berkeley DB 4.4 brings (to Subversion 1.4 and better) the ability for Subversion to automatically and transparently recover Berkeley DB environments in need of such recovery. When a Subversion process attaches to a repository's Berkeley DB environment, it uses some process accounting mechanisms to detect any unclean disconnections by previous processes, performs any necessary recovery, and then continues on as if nothing happened. This doesn't completely eliminate instances of repository wedging, but it does drastically reduce the amount of human interaction required to recover from them."
10087 msgstr "Berkeley DB 4.4(对应Subversion 1.4和更高)提供了在需要恢复时自动恢复Berkeley DB环境的能力,当Subversion进程发现任何以前进程未清理的连接,就会执行所有可能的恢复,然后就当什么都没有发生一样继续执行。这样不会完全消除版本库楔住的可能,但是大大减少了人工干预恢复的数量。"
10089 #. (para)
10090 #: ../source/book.xml:9820
10091 msgid "So while a Berkeley DB repository is quite fast and scalable, it's best used by a single server process running as one user—such as Apache's <command>httpd</command> or <command>svnserve</command> (see <xref linkend=\"svn.serverconfig\"/>)—rather than accessing it as many different users via <literal>file://</literal> or <literal>svn+ssh://</literal> URLs. If using a Berkeley DB repository directly as multiple users, be sure to read <xref linkend=\"svn.serverconfig.multimethod\"/>."
10092 msgstr "因为Berkeley DB是这样快速和可伸缩,最好是使用某种单用户单服务进程方式处理—例如Apache的<command>httpd</command>或<command>svnserve</command>(见<xref linkend=\"svn.serverconfig\"/>)—而最好不要使用许多不同的用户通过<literal>file://</literal>或<literal>svn+ssh://</literal>的URL访问的方法。如果使用多个用户直接访问Berkeley DB版本库的,请确定要读<xref linkend=\"svn.serverconfig.multimethod\"/>。"
10094 #. (para)
10095 #: ../source/book.xml:9833
10096 msgid "In mid-2004, a second type of repository storage system—one which doesn't use a database at all—came into being. An FSFS repository stores the changes associated with a revision in a single file, and so all of a repository's revisions can be found in a single subdirectory full of numbered files. Transactions are created in separate subdirectories as individual files. When complete, the transaction file is renamed and moved into the revisions directory, thus guaranteeing that commits are atomic. And because a revision file is permanent and unchanging, the repository also can be backed up while <quote>hot</quote>, just like a BDB-backed repository."
10097 msgstr "在2004年中期,另一种版本库存储系统慢慢形成了:一种不需要数据库的存储系统。FSFS版本库在单一文件中存储修订版本树,所以版本库中所有的修订版本都在一个子文件夹中有限的几个文件里。事务在单独的子目录中被创建,创建完成后,一个单独的事务文件被创建并移动到修订版本目录,这保证提交是原子性的。因为一个修订版本文件是持久不可改变的,版本库也可以做到<quote>热</quote>备份,就象Berkeley DB版本库一样。"
10099 #. (para)
10100 #: ../source/book.xml:9846
10101 msgid "The FSFS revision files describe a revision's directory structure, file contents, and deltas against files in other revision trees. Unlike a Berkeley DB database, this storage format is portable across different operating systems and isn't sensitive to CPU architecture. Because there's no journaling or shared-memory files being used, the repository can be safely accessed over a network filesystem and examined in a read-only environment. The lack of database overhead also means that the overall repository size is a bit smaller."
10102 msgstr "修订版本文件格式代表了一个修订版本的目录结构,文件内容,和其它修订版本树中相关信息。不像Berkeley DB数据库,这种存储格式可跨平台并且与CPU架构无关。因为没有日志或用到共享内存的文件,数据库能被网络文件系统安全的访问和在只读环境下检查。缺少数据库花消同时也意味着版本库的总体体积可以稍小一点。"
10104 #. (para)
10105 #: ../source/book.xml:9856
10106 msgid "FSFS has different performance characteristics too. When committing a directory with a huge number of files, FSFS is able to more quickly append directory entries. On the other hand, FSFS writes the latest version of a file as a delta against an earlier version, which means that checking out the latest tree is a bit slower than fetching the fulltexts stored in a Berkeley DB HEAD revision. FSFS also has a longer delay when finalizing a commit, which could in extreme cases cause clients to time out while waiting for a response."
10107 msgstr "FSFS也有一种不同的性能特性。当提交大量文件时,FSFS可以更快的追加条目。另一方面,FSFS通过写入与上一个版本比较的变化来记录新版本,这也意味着获取最新修订版本时会比Berkeley DB慢一点,提交时FSFS也会有一个更长的延迟,在某些极端情况下会导致客护端在等待回应时超时。"
10109 #. (para)
10110 #: ../source/book.xml:9866
10111 msgid "The most important distinction, however, is FSFS's imperviousness to <quote>wedging</quote> when something goes wrong. If a process using a Berkeley DB database runs into a permissions problem or suddenly crashes, the database can be left in an unusable state until an administrator recovers it. If the same scenarios happen to a process using an FSFS repository, the repository isn't affected at all. At worst, some transaction data is left behind."
10112 msgstr "最重要的区别是当出现错误时FSFS不会楔住的能力。如果使用Berkeley DB的进程发生许可错误或突然崩溃,数据库会一直无法使用,直到管理员恢复。假如在应用FSFS版本库时发生同样的情况,版本库不会受到任何干扰,最坏情况下也就是会留下一些事务数据。"
10114 #. (para)
10115 #: ../source/book.xml:9878
10116 msgid "Oracle bought Sleepycat and its flagship software, Berkeley DB, on Valentine's Day in 2006."
10117 msgstr "Oracle在2006情人节购买了Sleepycat和它的旗舰软件Berkeley DB。"
10119 #. (para)
10120 #: ../source/book.xml:9874
10121 msgid "The only real argument against FSFS is its relative immaturity compared to Berkeley DB. Unlike Berkeley DB, which has years of history, its own dedicated development team and, now, Oracle's mighty name attached to it, <placeholder-1/> FSFS is a much newer bit of engineering. Prior to Subversion 1.4, it was still shaking out some pretty serious data integrity bugs which, while only triggered in very rare cases, nonetheless did occur. That said, FSFS has quickly become the back-end of choice for some of the largest public and private Subversion repositories, and promises a lower barrier to entry for Subversion across the board."
10122 msgstr "FSFS的唯一真实的争议是其相对于Berkeley DB的不成熟,不像Berkeley DB有着多年历史的,而且有专门的开发团队,强大的Oracle会提供支持。<placeholder-1/>FSFS在工程上更新一点,在Subversion1.4之前,我们还未一些确实很严重的数据一致性问题颤抖,尽管只在非常罕见的情况下发生,然而还是发生了。但是,FSFS还是很快被一些最大的开放和私有Subversion版本库所采用,并且承诺了在跨平台时的有较少的麻烦。"
10124 #. (title)
10125 #: ../source/book.xml:9895
10126 msgid "Creating and Configuring Your Repository"
10127 msgstr "创建和配置你的版本库"
10129 #. (para)
10130 #: ../source/book.xml:9897
10131 msgid "In <xref linkend=\"svn.reposadmin.planning\"/>, we looked at some of the important decisions that should be made before creating and configuring your Subversion repository. Now, we finally get to get our hands dirty! In this section, we'll see how to actually create a Subversion repository and configure it to perform custom actions when special repository events occur."
10132 msgstr "在<xref linkend=\"svn.reposadmin.planning\"/>,我们我们看了一些在创建和配置Subversion版本库之前需要做的重要决定,现在我们最终要干活了!在本小节,我们要看看如何真实的创建一个Subversion版本库,并配置它在特定版本库事件执行自定义动作。"
10134 #. (title)
10135 #: ../source/book.xml:9907
10136 msgid "Creating the Repository"
10137 msgstr "创建版本库"
10139 #. (para)
10140 #: ../source/book.xml:9909
10141 msgid "Subversion repository creation is an incredibly simple task. The <command>svnadmin</command> utility that comes with Subversion provides a subcommand (<literal>create</literal>) for doing just that."
10142 msgstr "创建一个 Subversion 版本库出乎寻常的简单。 Subversion 提供的<command>svnadmin</command> 工具,有一个执行这个功能的子命令(<literal>create</literal>)。"
10144 #. (screen)
10145 #: ../source/book.xml:9913 ../source/book.xml:21457
10146 #, fuzzy, no-wrap
10147 msgid ""
10148 "\n"
10149 "$ svnadmin create /var/svn/repos\n"
10150 msgstr ""
10151 "\n"
10152 "$ svnadmin create /usr/local/svn/repos\n"
10154 #. (para)
10155 #: ../source/book.xml:9916
10156 #, fuzzy
10157 msgid "This creates a new repository in the directory <filename>/var/svn/repos</filename>, and with the default filesystem data store. Prior to Subversion 1.2, the default was to use Berkeley DB; the default is now FSFS. You can explicitly choose the filesystem type using the <option>--fs-type</option> argument, which accepts as a parameter either <literal>fsfs</literal> or <literal>bdb</literal>."
10158 msgstr " 这样在目录<filename>/path/to/repos</filename>使用默认数据存储方式创建了一个新的版本库。在Subversion 1.2之前,缺省值是Berkeley DB;而现在是FSFS。你可以通过<option>--fs-type</option>参数明确地指定文件系统类型,可选的值包括<literal>fsfs</literal>和<literal>bdb</literal>。"
10160 #. (screen)
10161 #: ../source/book.xml:9924
10162 #, fuzzy, no-wrap
10163 msgid ""
10164 "\n"
10165 "$ # Create an FSFS-backed repository\n"
10166 "$ svnadmin create --fs-type fsfs /var/svn/repos\n"
10167 "$\n"
10168 msgstr ""
10169 "\n"
10170 "$ # Create an FSFS-backed repository\n"
10171 "$ svnadmin create --fs-type fsfs /path/to/repos\n"
10172 "$\n"
10174 #. (screen)
10175 #: ../source/book.xml:9929
10176 #, fuzzy, no-wrap
10177 msgid ""
10178 "\n"
10179 "# Create a Berkeley-DB-backed repository\n"
10180 "$ svnadmin create --fs-type bdb /var/svn/repos\n"
10181 "$\n"
10182 msgstr ""
10183 "\n"
10184 "# Create a Berkeley-DB-backed repository\n"
10185 "$ svnadmin create --fs-type bdb /path/to/repos\n"
10186 "$\n"
10188 #. (para)
10189 #: ../source/book.xml:9934
10190 msgid "After running this simple command, you have a Subversion repository."
10191 msgstr "运行这个命令之后,你有了一个Subversion版本库。"
10193 #. (para)
10194 #: ../source/book.xml:9937
10195 msgid "The path argument to <command>svnadmin</command> is just a regular filesystem path and not a URL like the <command>svn</command> client program uses when referring to repositories. Both <command>svnadmin</command> and <command>svnlook</command> are considered server-side utilities—they are used on the machine where the repository resides to examine or modify aspects of the repository, and are in fact unable to perform tasks across a network. A common mistake made by Subversion newcomers is trying to pass URLs (even <quote>local</quote><literal>file://</literal> ones) to these two programs."
10196 msgstr "你可能已经注意到了,<command>svnadmin</command>命令的路径参数只是一个普通的文件系统路径,而不是一个<command>svn</command>客户端程序访问版本库时使用的URL。<command>svnadmin</command>和<command>svnlook</command>都被认为是服务器端工具—它们在版本库所在的机器上使用,用来检查或修改版本库,不能通过网络来执行任务。一个Subversion的新手通常会犯的错误,就是试图将URL(甚至<quote>本地</quote><literal>file:</literal>路径)传给这两个程序。"
10198 #. (para)
10199 #: ../source/book.xml:9949
10200 msgid "Present in the <filename>db/</filename> subdirectory of your repository is the implementation of the versioned filesystem. Your new repository's versioned filesystem begins life at revision 0, which is defined to consist of nothing but the top-level root (<filename>/</filename>) directory. Initially, revision 0 also has a single revision property, <literal>svn:date</literal>, set to the time at which the repository was created."
10201 msgstr "这个命令在目录<filename>/path/to/repos</filename>创建了一个新的版本库。这个新的版本库会以修订版本版本0开始其生命周期,里面除了最上层的根目录(<filename>/</filename>),什么都没有。刚开始,修订版本0有一个修订版本属性<literal>svn:date</literal>,设置为版本库创建的时间。"
10203 #. (para)
10204 #: ../source/book.xml:9957
10205 msgid "Now that you have a repository, it's time to customize it."
10206 msgstr "现在你有了一个版本库,可以用户化了。"
10208 #. (para)
10209 #: ../source/book.xml:9960
10210 msgid "While some parts of a Subversion repository—such as the configuration files and hook scripts—are meant to be examined and modified manually, you shouldn't (and shouldn't need to) tamper with the other parts of the repository <quote>by hand</quote>. The <command>svnadmin</command> tool should be sufficient for any changes necessary to your repository, or you can look to third-party tools (such as Berkeley DB's tool suite) for tweaking relevant subsections of the repository. Do <emphasis>not</emphasis> attempt manual manipulation of your version control history by poking and prodding around in your repository's data store files!"
10211 msgstr "一般来说,版本库除了一小部分—例如配置文件和钩子脚本,你不要(也不需要)手动干预版本库。<command>svnadmin</command>工具应该足以用来处理对版本库的任何修改,或者你也可以使用第三方工具(比如Berkeley DB的工具包)来调整部分版本库。<emphasis>不</emphasis>要尝试通过处理版本库数据存储文件手工修改版本控制历史,"
10213 #. (title)
10214 #: ../source/book.xml:9977
10215 msgid "Implementing Repository Hooks"
10216 msgstr "实现版本库钩子"
10218 #. (para)
10219 #: ../source/book.xml:9979
10220 msgid "A <firstterm>hook</firstterm> is a program triggered by some repository event, such as the creation of a new revision or the modification of an unversioned property. Some hooks (the so-called <quote>pre hooks</quote>) run in advance of a repository operation and provide a means by which to both report what is about to happen and to prevent it from happening at all. Other hooks (the <quote>post hooks</quote>) run after the completion of a repository event, and are useful for performing tasks that examine—but don't modify—the repository. Each hook is handed enough information to tell what that event is (or was), the specific repository changes proposed (or completed), and the username of the person who triggered the event."
10221 msgstr "<firstterm>钩子</firstterm>是通过版本库事件触发,例如新版本的创建或一个未版本化属性的修改。一些钩子(叫做<quote>pre hooks</quote>)在事件发生前运行,可以用来报告发生了什么以及防止它发生。还有一些钩子(<quote>post hooks</quote>)在版本库事件之后发生,只是用来报告。每个钩子能够获得事件的足够信息,例如提出的(或完成的)版本库修改细节,还有触发事件的用户名。"
10223 #. (para)
10224 #: ../source/book.xml:9992
10225 msgid "The <filename>hooks</filename> subdirectory is, by default, filled with templates for various repository hooks."
10226 msgstr "默认情况下,<filename>hooks</filename>子目录中包含各种版本库钩子模板。"
10228 #. (screen)
10229 #: ../source/book.xml:9995
10230 #, no-wrap
10231 msgid ""
10232 "\n"
10233 "$ ls repos/hooks/\n"
10234 "post-commit.tmpl\t  post-unlock.tmpl  pre-revprop-change.tmpl\n"
10235 "post-lock.tmpl\t\t  pre-commit.tmpl   pre-unlock.tmpl\n"
10236 "post-revprop-change.tmpl  pre-lock.tmpl     start-commit.tmpl\n"
10237 msgstr ""
10238 "\n"
10239 "$ ls repos/hooks/\n"
10240 "post-commit.tmpl\t  post-unlock.tmpl  pre-revprop-change.tmpl\n"
10241 "post-lock.tmpl\t\t  pre-commit.tmpl   pre-unlock.tmpl\n"
10242 "post-revprop-change.tmpl  pre-lock.tmpl     start-commit.tmpl\n"
10244 #. (para)
10245 #: ../source/book.xml:10001
10246 msgid "There is one template for each hook that the Subversion repository supports, and by examining the contents of those template scripts, you can see what triggers each script to run and what data is passed to that script. Also present in many of these templates are examples of how one might use that script, in conjunction with other Subversion-supplied programs, to perform common useful tasks. To actually install a working hook, you need only place some executable program or script into the <filename>repos/hooks</filename> directory which can be executed as the name (like <command>start-commit</command> or <command>post-commit</command>) of the hook."
10247 msgstr "对每种Subversion版本库支持的钩子的都有一个模板,通过查看这些脚本的内容,你能看到是什么事件触发了脚本及如何给传脚本传递数据。同时,这些模版也是如何使用这些脚本,结合Subversion支持的工具来完成有用任务的例子。要实际安装一个可用的钩子,你需要在<filename>repos/hooks</filename>目录下安装一些与钩子同名(如 <command>start-commit</command>或者<command>post-commit</command>)的可执行程序或脚本。"
10249 #. (para)
10250 #: ../source/book.xml:10013
10251 msgid "On Unix platforms, this means supplying a script or program (which could be a shell script, a Python program, a compiled C binary, or any number of other things) named exactly like the name of the hook. Of course, the template files are present for more than just informational purposes—the easiest way to install a hook on Unix platforms is to simply copy the appropriate template file to a new file that lacks the <literal>.tmpl</literal> extension, customize the hook's contents, and ensure that the script is executable. Windows, however, uses file extensions to determine whether or not a program is executable, so you would need to supply a program whose basename is the name of the hook, and whose extension is one of the special extensions recognized by Windows for executable programs, such as <filename>.exe</filename> for programs, and <filename>.bat</filename> for batch files."
10252 msgstr "在Unix平台上,这意味着要提供一个与钩子同名的脚本或程序(可能是shell 脚本,Python 程序,编译过的c语言二进制文件或其他东西)。当然,脚本模板文件不仅仅是展示了一些信息—在Unix下安装钩子最简单的办法就是拷贝这些模板,并且去掉<literal>.tmpl</literal>扩展名,然后自定义钩子的内容,确定脚本是可运行的。Windows用文件的扩展名来决定一个程序是否可运行,所以你要使程序的基本名与钩子同名,同时,它的扩展名是Windows系统所能辨认的,例如<filename>exe</filename>、<filename>com</filename>和批处理的<filename>bat</filename>。"
10254 #. (para)
10255 #: ../source/book.xml:10030
10256 msgid "For security reasons, the Subversion repository executes hook programs with an empty environment—that is, no environment variables are set at all, not even <literal>$PATH</literal> (or <literal>%PATH%</literal>, under Windows). Because of this, many administrators are baffled when their hook program runs fine by hand, but doesn't work when run by Subversion. Be sure to explicitly set any necessary environment variables in your hook program and/or use absolute paths to programs."
10257 msgstr "由于安全原因,Subversion版本库在一个空环境中执行钩子脚本—就是没有设置任何环境变量,甚至没有<literal>$PATH</literal>或<literal>%PATH%</literal>。由于这个原因,许多管理员会感到很困惑,它们的钩子脚本手工运行时正常,可在Subversion中却不能运行。要注意,必须在你的钩子中设置好环境变量或为你的程序指定好绝对路径。"
10259 #. (para)
10260 #: ../source/book.xml:10040
10261 msgid "Subversion executes hooks as the same user who owns the process which is accessing the Subversion repository. In most cases, the repository is being accessed via a Subversion server, so this user is the same user as which that server runs on the system. The hooks themselves will need to be configured with OS-level permissions that allow that user to execute them. Also, this means that any file or programs (including the Subversion repository itself) accessed directly or indirectly by the hook will be accessed as the same user. In other words, be alert to potential permission-related problems that could prevent the hook from performing the tasks it is designed to perform."
10262 msgstr "Subversion会试图以当前访问版本库的用户身份执行钩子。通常,对版本库的访问总是通过Apache HTTP服务器和mod_dav_svn进行,因此,执行钩子的用户就是运行Apache的用户。钩子本身需要具有操作系统级的访问许可,用户可以运行它。另外,其它被钩子直接或间接使用的文件或程序(包括Subversion版本库本身)也要被同一个用户访问。换句话说,要注意潜在的访问控制问题,它可能会让你的钩子无法按照你的目的顺利执行。"
10264 #. (para)
10265 #: ../source/book.xml:10052
10266 msgid "There are nine hooks implemented by the Subversion repository, and you can get details about each of them in <xref linkend=\"svn.ref.reposhooks\"/>. As a repository administrator, you'll need to decide which of hooks you wish to implement (by way of providing an appropriately named and permissioned hook program), and how. When you make this decision, keep in mind the big picture of how your repository is deployed. For example, if you are using server configuration to determine which users are permitted to commit changes to your repository, then you don't need to do this sort of access control via the hook system."
10267 msgstr "Subversion版本库有9种钩子实现,你可以在<xref linkend=\"svn.ref.reposhooks\"/>获得每个的信息。作为一个版本库管理员,你需要决定你要实现的钩子(通过提供家当名称和执行许可的程序)类型和方法,这种决策需要对版本库的部署非常熟悉。例如,如果你使用服务器配置方式,通过版本库检测用户名称和权限,你不需要通过钩子系统实现访问控制。"
10269 #. (para)
10270 #: ../source/book.xml:10064
10271 msgid "There is no shortage of Subversion hook programs and scripts freely available either from the Subversion community itself or elsewhere. These scripts cover a wide range of utility—basic access control, policy adherence checking, issue tracker integration, email- or syndication-based commit notification, and beyond. See <xref linkend=\"svn.3rdparty\"/> for discussion of some of the most commonly used hook programs. Or, if you wish to write your own, see <xref linkend=\"svn.developer\"/>."
10272 msgstr "在Subversion社区和其他地方都不缺Subversion钩子,这些脚本覆盖了广泛的工具—基本的访问控制,政策相关检查,问题追踪集成,email或提交通知等等。关于最常用的钩子程序的讨论,可以看<xref linkend=\"svn.3rdparty\"/>,如果你希望写你自己的,可以看<xref linkend=\"svn.developer\"/>。"
10274 #. (para)
10275 #: ../source/book.xml:10073
10276 msgid "While hook scripts can do almost anything, there is one dimension in which hook script authors should show restraint: do <emphasis>not</emphasis> modify a commit transaction using hook scripts. While it might be tempting to use hook scripts to automatically correct errors or shortcomings or policy violations present in the files being committed, doing so can cause problems. Subversion keeps client-side caches of certain bits of repository data, and if you change a commit transaction in this way, those caches become indetectably stale. This inconsistency can lead to surprising and unexpected behavior. Instead of modifying the transaction, you should simply <emphasis>validate</emphasis> the transaction in the <filename>pre-commit</filename> hook and reject the commit if it does not meet the desired requirements. As a bonus, your users will learn the value of careful, compliance-minded work habits."
10277 msgstr "尽管经过调整钩子脚本可以作任何事情,但钩子脚本的作者仍会受到一些限制:不要修改使用钩子脚本修改提交事务,因为使用钩子脚本自动修改错误或提交文件的政策违例的尝试会导致问题。Subversion会在客户端缓存对应的版本库数据,如果你这样修改了提交事务,这些缓存就进入了未知的状态,这种不一致会导致令人吃惊和预想不到的行为。作为对事物修改的替换,你可以简单的在<filename>pre-commit</filename>确认事物信息并且拒绝提交,如果这样满足不了需求,作为额外的奖赏,你的用户会学会小心顺从的工作习惯。"
10279 #. (title)
10280 #: ../source/book.xml:10095
10281 msgid "Berkeley DB Configuration"
10282 msgstr "Berkeley DB 配置"
10284 #. (para)
10285 #: ../source/book.xml:10097
10286 msgid "A Berkeley DB environment is an encapsulation of one or more databases, log files, region files and configuration files. The Berkeley DB environment has its own set of default configuration values for things like the number of database locks allowed to be taken out at any given time, or the maximum size of the journaling log files, etc. Subversion's filesystem logic additionally chooses default values for some of the Berkeley DB configuration options. However, sometimes your particular repository, with its unique collection of data and access patterns, might require a different set of configuration option values."
10287 msgstr "Berkeley DB环境是对一个或多个数据库、日志文件、区域文件和配置文件的封装。Berkeley DB环境对许多参数有自己的缺省值,例如任何时间里可用的数据库锁定数目、日志文件的最大值等。Subversion文件系统会使用Berkeley DB的默认值。 不过,有时候你的特定版本库与它独特的数据集合和访问类型,可能需要不同的配置选项。"
10289 #. (para)
10290 #: ../source/book.xml:10108
10291 msgid "The producers of Berkeley DB understand that different applications and database environments have different requirements, and so they have provided a mechanism for overriding at runtime many of the configuration values for the Berkeley DB environment: BDB checks for the presence of a file named <filename>DB_CONFIG</filename> in the environment directory (namely, the repository's <filename>db</filename> subdirectory), and parses the options found in that file . Subversion itself creates this file when it creates the rest of the repository. The file initially contains some default options, as well as pointers to the Berkeley DB online documentation so you can read about what those options do. Of course, you are free to add any of the supported Berkeley DB options to your <filename>DB_CONFIG</filename> file. Just be aware that while Subversion never attempts to read or interpret the contents of the file, and makes no direct use of the option settings in it, you'll want to avoid any configuration changes that may cause Berkeley DB to behave in a fashion that is at odds with what Subversion might expect. Also, changes made to <filename>DB_CONFIG</filename> won't take effect until you recover the database environment (using <command>svnadmin recover</command>)."
10292 msgstr "你的版本库的Berkeley配置文件位于<filename>db</filename>目录的<filename>db/DB_CONFIG</filename>, Subversion在创建版本库时自己创建了这个文件。这个文件初始时包含了一些默认选项,也包含了Berkeley DB在线文档,使你能够了解这些选项是做什么的。当然,你也可以为你的<filename>DB_CONFIG</filename> 文件添加任何Berkeley DB支持的选项。需要注意到,虽然Subversion不会尝试读取并解析这个文件,或使用其中的设置,你一定要避免会导致Berkeley DB按照Subversion代码不习惯的方式工作的修改。另外,<filename>DB_CONFIG</filename>的修改在复原数据库环境(用<command>svnadmin recover</command>)之前不会产生任何效果。"
10294 #. (title)
10295 #: ../source/book.xml:10137
10296 msgid "Repository Maintenance"
10297 msgstr "版本库维护"
10299 #. (para)
10300 #: ../source/book.xml:10139
10301 msgid "Maintaining a Subversion repository can be daunting, mostly due to the complexities inherent in systems which have a database backend. Doing the task well is all about knowing the tools—what they are, when to use them, and how to use them. This section will introduce you to the repository administration tools provided by Subversion, and how to wield them to accomplish tasks such as repository data migration, upgrades, backups and cleanups."
10302 msgstr "维护一个Subversion版本库是一项令人沮丧的工作,主要因为有数据库后端与生俱来的复杂性。做好这项工作需要知道一些工具——它们是什么,什么时候用以及如何使用。这一节将会向你介绍Subversion自带的版本库管理工具,以及如何使用它们来完成诸如版本库移植、升级、备份和整理之类的任务。"
10304 #. (title)
10305 #: ../source/book.xml:10150
10306 msgid "An Administrator's Toolkit"
10307 msgstr "管理员的工具箱"
10309 #. (para)
10310 #: ../source/book.xml:10152
10311 msgid "Subversion provides a handful of utilities useful for creating, inspecting, modifying and repairing your repository. Let's look more closely at each of those tools. Afterward, we'll briefly examine some of the utilities included in the Berkeley DB distribution that provide functionality specific to your repository's database backend not otherwise provided by Subversion's own tools."
10312 msgstr "Subversion提供了一些用来创建、查看、修改和修复版本库的工具。让我们首先详细了解一下每个工具,然后,我们再看一下仅在Berkeley DB后端分发版本中提供的版本数据库工具。"
10314 #. (para)
10315 #: ../source/book.xml:10164
10316 msgid "The <command>svnadmin</command> program is the repository administrator's best friend. Besides providing the ability to create Subversion repositories, this program allows you to perform several maintenance operations on those repositories. The syntax of <command>svnadmin</command> is similar to that of other Subversion command-line programs:"
10317 msgstr "<command>svnadmin</command>程序是版本库管理员最好的朋友。除了提供创建Subversion版本库的功能,这个程序使你可以维护这些版本库。<command>svnadmin</command>的语法同其他Subversion命令类似:"
10319 #. (screen)
10320 #: ../source/book.xml:10171
10321 #, no-wrap
10322 msgid ""
10323 "\n"
10324 "$ svnadmin help\n"
10325 "general usage: svnadmin SUBCOMMAND REPOS_PATH  [ARGS &amp; OPTIONS ...]\n"
10326 "Type 'svnadmin help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10327 "Type 'svnadmin --version' to see the program version and FS modules.\n"
10328 "\n"
10329 "Available subcommands:\n"
10330 "   crashtest\n"
10331 "   create\n"
10332 "   deltify\n"
10333 "…\n"
10334 msgstr ""
10335 "\n"
10336 "$ svnadmin help\n"
10337 "general usage: svnadmin SUBCOMMAND REPOS_PATH  [ARGS &amp; OPTIONS ...]\n"
10338 "Type 'svnadmin help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10339 "Type 'svnadmin --version' to see the program version and FS modules.\n"
10340 "\n"
10341 "Available subcommands:\n"
10342 "   crashtest\n"
10343 "   create\n"
10344 "   deltify\n"
10345 "…\n"
10347 #. (para)
10348 #: ../source/book.xml:10183
10349 msgid "We've already mentioned <command>svnadmin</command>'s <literal>create</literal> subcommand (see <xref linkend=\"svn.reposadmin.basics.creating\"/>). Most of the others we will cover later in this chapter. And you can consult <xref linkend=\"svn.ref.svnadmin\"/> for a full rundown of subcommands and what each of them offers."
10350 msgstr "我们已经讨论了<command>svnadmin</command>的<literal>create</literal>子命令(参照<xref linkend=\"svn.reposadmin.create\"/>),本章后面我们会详细讲解大多数其他的子命令,关于所有的子命令你可以参考<xref linkend=\"svn.ref.svnadmin\"/>。"
10352 #. (para)
10353 #: ../source/book.xml:10194
10354 msgid "<command>svnlook</command> is a tool provided by Subversion for examining the various revisions and <firstterm>transactions</firstterm> (which are revisions in-the-making) in a repository. No part of this program attempts to change the repository. <command>svnlook</command> is typically used by the repository hooks for reporting the changes that are about to be committed (in the case of the <command>pre-commit</command> hook) or that were just committed (in the case of the <command>post-commit</command> hook) to the repository. A repository administrator may use this tool for diagnostic purposes."
10355 msgstr "<command>svnlook</command>是Subversion提供的用来查看版本库中不同的修订版本和事务(正在产生的修订版本)。这个程序不会修改版本库内容-这是个<quote>只读</quote>的工具。<command>svnlook</command>通常用在版本库钩子程序中,用来记录版本库即将提交(<command>用在pre-commit钩子时)</command>或者已经提交的(用在<command>post-commit</command>钩子时)修改。版本库管理员可以将这个工具用于诊断。"
10357 #. (para)
10358 #: ../source/book.xml:10205
10359 msgid "<command>svnlook</command> has a straightforward syntax:"
10360 msgstr "<command>svnlook</command>的语法很直接:"
10362 #. (screen)
10363 #: ../source/book.xml:10207
10364 #, no-wrap
10365 msgid ""
10366 "\n"
10367 "$ svnlook help\n"
10368 "general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS &amp; OPTIONS ...]\n"
10369 "Note: any subcommand which takes the '--revision' and '--transaction'\n"
10370 "      options will, if invoked without one of those options, act on\n"
10371 "      the repository's youngest revision.\n"
10372 "Type 'svnlook help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10373 "Type 'svnlook --version' to see the program version and FS modules.\n"
10374 "…\n"
10375 msgstr ""
10376 "\n"
10377 "$ svnlook help\n"
10378 "general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS &amp; OPTIONS ...]\n"
10379 "Note: any subcommand which takes the '--revision' and '--transaction'\n"
10380 "      options will, if invoked without one of those options, act on\n"
10381 "      the repository's youngest revision.\n"
10382 "Type 'svnlook help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10383 "Type 'svnlook --version' to see the program version and FS modules.\n"
10384 "…\n"
10386 #. (para)
10387 #: ../source/book.xml:10217
10388 #, fuzzy
10389 msgid "Nearly every one of <command>svnlook</command>'s subcommands can operate on either a revision or a transaction tree, printing information about the tree itself, or how it differs from the previous revision of the repository. You use the <option>--revision (-r)</option> and <option>--transaction (-t)</option> options to specify which revision or transaction, respectively, to examine. In the absence of both the <option>--revision (-r)</option> and <option>--transaction (-t)</option> options, <command>svnlook</command> will examine the youngest (or <quote>HEAD</quote>) revision in the repository. So the following two commands do exactly the same thing when 19 is the youngest revision in the repository located at <filename>/var/svn/repos</filename>:"
10390 msgstr "几乎<command>svnlook</command>的每一个子命令都能操作修订版本或事务树,显示树本身的信息,或是它与版本库中上一个修订版本的不同。你可以用<option>--revision (-r)</option> 和 <option>--transaction (-t)</option>选项指定要查看的修订版本或事务。如果没有指定<option>--revision (-r)</option>和<option>--transaction (-t)</option>选项,<command>svnlook</command>会检查版本库最新的(或者说<quote>HEAD</quote>)修订版本。所以当19是位于<filename>/path/to/repos</filename>的版本库的最新版本时,如下的两个名字起到相同的效果:"
10392 #. (screen)
10393 #: ../source/book.xml:10231
10394 #, fuzzy, no-wrap
10395 msgid ""
10396 "\n"
10397 "$ svnlook info /var/svn/repos\n"
10398 "$ svnlook info /var/svn/repos -r 19\n"
10399 msgstr ""
10400 "\n"
10401 "$ svnlook info /path/to/repos\n"
10402 "$ svnlook info /path/to/repos -r 19\n"
10404 #. (para)
10405 #: ../source/book.xml:10235
10406 msgid "The only exception to these rules about subcommands is the <command>svnlook youngest</command> subcommand, which takes no options, and simply prints out the repository's youngest revision number."
10407 msgstr "这些子命令的唯一例外是<command>svnlook youngest</command>,它不需要任何选项,只会打印出版本库的最新修订版本号。"
10409 #. (screen)
10410 #: ../source/book.xml:10239
10411 #, fuzzy, no-wrap
10412 msgid ""
10413 "\n"
10414 "$ svnlook youngest /var/svn/repos\n"
10415 "19\n"
10416 msgstr ""
10417 "\n"
10418 "$ svnlook youngest /path/to/repos\n"
10419 "19\n"
10421 #. (para)
10422 #: ../source/book.xml:10244
10423 msgid "Keep in mind that the only transactions you can browse are uncommitted ones. Most repositories will have no such transactions, because transactions are usually either committed (in which case, you should access them as revision with the <option>--revision (-r)</option> option) or aborted and removed."
10424 msgstr "请记住只能浏览未提交的事物,大多数版本库没有这样的事物,因为事物要么是已经提交的(也就是你可以<option>--revision (-r)</option>访问的修订版本),要么是退出的和删除的。"
10426 #. (para)
10427 #: ../source/book.xml:10251
10428 msgid "Output from <command>svnlook</command> is designed to be both human- and machine-parsable. Take as an example the output of the <literal>info</literal> subcommand:"
10429 msgstr "<command>svnlook</command>的输出被设计为人和机器都易理解,拿<literal>info</literal>子命令举例来说:"
10431 #. (screen)
10432 #: ../source/book.xml:10254
10433 #, fuzzy, no-wrap
10434 msgid ""
10435 "\n"
10436 "$ svnlook info /var/svn/repos\n"
10437 "sally\n"
10438 "2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002)\n"
10439 "27\n"
10440 "Added the usual\n"
10441 "Greek tree.\n"
10442 msgstr ""
10443 "\n"
10444 "$ svnlook info /path/to/repos\n"
10445 "sally\n"
10446 "2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002)\n"
10447 "27\n"
10448 "Added the usual\n"
10449 "Greek tree.\n"
10451 #. (para)
10452 #: ../source/book.xml:10262
10453 msgid "The output of the <literal>info</literal> subcommand is defined as:"
10454 msgstr "<literal>info</literal>子命令的输出定义如下:"
10456 #. (para)
10457 #: ../source/book.xml:10266
10458 msgid "The author, followed by a newline."
10459 msgstr "作者,后接换行。"
10461 #. (para)
10462 #: ../source/book.xml:10269
10463 msgid "The date, followed by a newline."
10464 msgstr "日期,后接换行。"
10466 #. (para)
10467 #: ../source/book.xml:10272
10468 msgid "The number of characters in the log message, followed by a newline."
10469 msgstr "日志消息的字数,后接换行。"
10471 #. (para)
10472 #: ../source/book.xml:10276
10473 msgid "The log message itself, followed by a newline."
10474 msgstr "日志信息本身, 后接换行。"
10476 #. (para)
10477 #: ../source/book.xml:10279
10478 msgid "This output is human-readable, meaning items like the datestamp are displayed using a textual representation instead of something more obscure (such as the number of nanoseconds since the Tasty Freeze guy drove by). But the output is also machine-parsable—because the log message can contain multiple lines and be unbounded in length, <command>svnlook</command> provides the length of that message before the message itself. This allows scripts and other wrappers around this command to make intelligent decisions about the log message, such as how much memory to allocate for the message, or at least how many bytes to skip in the event that this output is not the last bit of data in the stream."
10479 msgstr "这种输出是人可阅读的,像是时间戳这种有意义的条目,使用文本表示,而不是其他比较晦涩的方式(例如许多无聊的人推荐的十亿分之一秒的数量)。这种输出也是机器可读的—因为日志信息可以有多行,没有长度的限制,<command>svnlook</command>在日志消息之前提供了消息的长度,这使得脚本或者其他这个命令的封装器能够针对日志信息做出许多职能的决定,或仅仅是在这个输出成为最后一个字节之前应该略过多少字节。"
10481 #. (para)
10482 #: ../source/book.xml:10292
10483 msgid "<command>svnlook</command> can perform a variety of other queries: displaying subsets of bits of information we've mentioned previously, recursively listing versioned directory trees, reporting which paths were modified in a given revision or transaction, showing textual and property differences made to files and directories, and so on. See <xref linkend=\"svn.ref.svnlook\"/> for a full reference of <command>svnlook</command>'s features."
10484 msgstr "<command>svnlook</command>还可以做很多别的查询:显示我们先前提到的信息的一些子集,递归显示版本目录树,报告指定的修订版本或事务中哪些路径曾经被修改过,显示对文件和目录做过的文本和属性的修改,等等。<xref linkend=\"svn.ref.svnlook\"/>是<command>svnlook</command>命令能接受子命令的完全特性参考。"
10486 #. (para)
10487 #: ../source/book.xml:10306
10488 msgid "While it won't be the most commonly used tool at the administrator's disposal, <command>svndumpfilter</command> provides a very particular brand of useful functionality—the ability to quickly and easily modify streams of Subversion repository history data by acting as a path-based filter."
10489 msgstr "虽然在管理员的日常工作中并不会经常使用,不过<command>svndumpfilter</command>提供了一项特别有用的功能—可以简单快速的作为Subversion版本库历史的以路径为基础的过滤器。"
10491 #. (para)
10492 #: ../source/book.xml:10312
10493 msgid "The syntax of <command>svndumpfilter</command> is as follows:"
10494 msgstr "<command>svndumpfilter</command>的语法如下:"
10496 #. (screen)
10497 #: ../source/book.xml:10314
10498 #, no-wrap
10499 msgid ""
10500 "\n"
10501 "$ svndumpfilter help\n"
10502 "general usage: svndumpfilter SUBCOMMAND [ARGS &amp; OPTIONS ...]\n"
10503 "Type \"svndumpfilter help &lt;subcommand&gt;\" for help on a specific subcommand.\n"
10504 "Type 'svndumpfilter --version' to see the program version.\n"
10505 "  \n"
10506 "Available subcommands:\n"
10507 "   exclude\n"
10508 "   include\n"
10509 "   help (?, h)\n"
10510 msgstr ""
10511 "\n"
10512 "$ svndumpfilter help\n"
10513 "general usage: svndumpfilter SUBCOMMAND [ARGS &amp; OPTIONS ...]\n"
10514 "Type \"svndumpfilter help &lt;subcommand&gt;\" for help on a specific subcommand.\n"
10515 "Type 'svndumpfilter --version' to see the program version.\n"
10516 "  \n"
10517 "Available subcommands:\n"
10518 "   exclude\n"
10519 "   include\n"
10520 "   help (?, h)\n"
10522 #. (para)
10523 #: ../source/book.xml:10325
10524 msgid "There are only two interesting subcommands. They allow you to make the choice between explicit or implicit inclusion of paths in the stream:"
10525 msgstr "有意义的子命令只有两个。你可以使用这两个子命令说明你希望保留和不希望保留的路径:"
10527 #. (literal)
10528 #: ../source/book.xml:10331
10529 msgid "exclude"
10530 msgstr "exclude"
10532 #. (para)
10533 #: ../source/book.xml:10334
10534 msgid "Filter out a set of paths from the dump data stream."
10535 msgstr "将指定路径的数据从转储数据流中排除。"
10537 #. (literal)
10538 #: ../source/book.xml:10340
10539 msgid "include"
10540 msgstr "include"
10542 #. (para)
10543 #: ../source/book.xml:10343
10544 msgid "Allow only the requested set of paths to pass through the dump data stream."
10545 msgstr "将指定路径的数据添加到转储数据流中。"
10547 #. (para)
10548 #: ../source/book.xml:10348
10549 msgid "You can learn more about these subcommands and <command>svndumpfilter</command>'s unique purpose in <xref linkend=\"svn.reposadmin.maint.filtering\"/>."
10550 msgstr "关于这些子命令和<command>svndumpfilter</command>的唯一目的的,可以见<xref linkend=\"svn.reposadmin.maint.filtering\"/>。"
10552 #. (para)
10553 #: ../source/book.xml:10365
10554 msgid "Or is that, the <quote>sync</quote>?"
10555 msgstr "或者是, <quote>sync</quote> ?"
10557 #. (para)
10558 #: ../source/book.xml:10356
10559 msgid "The <command>svnsync</command> program, which is new to the 1.4 release of Subversion, provides all the functionality required for maintaining a read-only mirror of a Subversion repository. The program really has one job—to transfer one repository's versioned history into another repository. And while there are few ways to do that, its primary strength is that it can operate remotely—the <quote>source</quote> and <quote>sink</quote><placeholder-1/> repositories may be on different computers from each other and from <command>svnsync</command> itself."
10560 msgstr "<command>svnsync</command>程序是Subversion 1.4版的新特性,提供了维护一个只读版本库镜像的全部功能。这个程序只有一个工作—将一个版本库的历史转移到另一个,尽管有几种方法,但这种方法的主要特点是可以远程操作—<quote>源</quote>,<quote>目标</quote><placeholder-1/>版本库以及<command>svnsync</command>程序可能在不同的计算机上。"
10562 #. (para)
10563 #: ../source/book.xml:10368
10564 msgid "As you might expect, <command>svnsync</command> has a syntax that looks very much like every other program we've mentioned in this chapter:"
10565 msgstr "就像你期望的,<command>svnsync</command>的语法与本节提到的其他命令非常类似。"
10567 #. (screen)
10568 #: ../source/book.xml:10371
10569 #, no-wrap
10570 msgid ""
10571 "\n"
10572 "$ svnsync help\n"
10573 "general usage: svnsync SUBCOMMAND DEST_URL  [ARGS &amp; OPTIONS ...]\n"
10574 "Type 'svnsync help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10575 "Type 'svnsync --version' to see the program version and RA modules.\n"
10576 "\n"
10577 "Available subcommands:\n"
10578 "   initialize (init)\n"
10579 "   synchronize (sync)\n"
10580 "   copy-revprops\n"
10581 "   help (?, h)\n"
10582 "$\n"
10583 msgstr ""
10584 "\n"
10585 "$ svnsync help\n"
10586 "general usage: svnsync SUBCOMMAND DEST_URL  [ARGS &amp; OPTIONS ...]\n"
10587 "Type 'svnsync help &lt;subcommand&gt;' for help on a specific subcommand.\n"
10588 "Type 'svnsync --version' to see the program version and RA modules.\n"
10589 "\n"
10590 "Available subcommands:\n"
10591 "   initialize (init)\n"
10592 "   synchronize (sync)\n"
10593 "   copy-revprops\n"
10594 "   help (?, h)\n"
10595 "$\n"
10597 #. (para)
10598 #: ../source/book.xml:10384
10599 msgid "We talk more about replication repositories with <command>svnsync</command> in <xref linkend=\"svn.reposadmin.maint.replication\"/>."
10600 msgstr "我们会在<xref linkend=\"svn.reposadmin.maint.replication\"/>详细讨论使用<command>svnsync</command>实现版本库复制。"
10602 #. (title)
10603 #: ../source/book.xml:10390
10604 msgid "Berkeley DB Utilities"
10605 msgstr "Berkeley DB 工具"
10607 #. (para)
10608 #: ../source/book.xml:10392
10609 msgid "If you're using a Berkeley DB repository, then all of your versioned filesystem's structure and data live in a set of database tables within the <filename>db/</filename> subdirectory of your repository. This subdirectory is a regular Berkeley DB environment directory, and can therefore be used in conjunction with any of the Berkeley database tools, typically provided as part of the Berkeley DB distribution."
10610 msgstr "如果你使用Berkeley DB版本库,那么所有纳入版本控制的文件系统结构和数据都储存在一系列数据库的表中,而这个目录就是版本库的<filename>db/</filename>。这个子目录是一个标准的Berkeley DB环境目录,可以应用任何Berkeley数据库工具进行操作,通常这些工具随Berkeley DB发布。"
10612 #. (para)
10613 #: ../source/book.xml:10400
10614 msgid "For day-to-day Subversion use, these tools are unnecessary. Most of the functionality typically needed for Subversion repositories has been duplicated in the <command>svnadmin</command> tool. For example, <command>svnadmin list-unused-dblogs</command> and <command>svnadmin list-dblogs</command> perform a subset of what is provided by the Berkeley <command>db_archive</command> command, and <command>svnadmin recover</command> reflects the common use cases of the <command>db_recover</command> utility."
10615 msgstr "对于Subversion的日常使用来说,这些工具并没有什么用处。大多数Subversion版本库必须的数据库操作都集成到<command>svnadmin</command>工具中。比如,<command>svnadmin list-unused-dblogs</command>和<command>svnadmin list-dblogs</command>实现了Berkeley <command>db_archive</command>命令功能的一个子集,而<command>svnadmin recover</command>则起到了<command>db_recover</command>工具的作用。"
10617 #. (para)
10618 #: ../source/book.xml:10410
10619 msgid "However, there are still a few Berkeley DB utilities that you might find useful. The <command>db_dump</command> and <command>db_load</command> programs write and read, respectively, a custom file format which describes the keys and values in a Berkeley DB database. Since Berkeley databases are not portable across machine architectures, this format is a useful way to transfer those databases from machine to machine, irrespective of architecture or operating system. As we describe later in this chapter, you can also use <command>svnadmin dump</command> and <command>svnadmin load</command> for similar purposes, but <command>db_dump</command> and <command>db_load</command> can do certain jobs just as well and much faster. They can also be useful if the experienced Berkeley DB hacker needs to do in-place tweaking of the data in a BDB-backed repository for some reason, which is something Subversion's utilities won't allow. Also, the <command>db_stat</command> utility can provide useful information about the status of your Berkeley DB environment, including detailed statistics about the locking and storage subsystems."
10620 msgstr "当然,还有一些Berkeley DB工具有时是有用的。<command>db_load</command>和<command>db_dump</command>分别将Berkeley DB数据库中的键值对以特定的格式读写文件。Berkeley数据库本身不支持跨平台转移,这两个工具在这样的情况下就可以实现在平台间转移数据库的功能,而无需关心操作系统或机器架构。就像我们以前描述的,你可以使用<command>svnadmin dump</command>和<command>svnadmin load</command>实现类似的目的,但是<command>db_dump</command>和<command>db_load</command>可以更快一点,它们也可以协助Berkeley DB的hacker来篡改BDB后端的数据,这是Subversion工具不允许的。此外,<command>db_stat</command>工具能够提供关于Berkeley DB环境的许多有用信息,包括详细的锁定和存储子系统的统计信息。"
10622 #. (para)
10623 #: ../source/book.xml:10430
10624 msgid "For more information on the Berkeley DB tool chain, visit the documentation section of the Berkeley DB section of Oracle's website, located at <uri href=\"http://www.oracle.com/technology/documentation/berkeley-db/db/\">http://www.oracle.com/technology/documentation/berkeley-db/db/</uri>."
10625 msgstr "关于Berkeley DB工具的更多信息,可以访问Oracle网站的Berkeley DB文档部分,在<uri href=\"http://www.oracle.com/technology/documentation/berkeley-db/db/\">http://www.oracle.com/technology/documentation/berkeley-db/db/</uri>。"
10627 #. (title)
10628 #: ../source/book.xml:10438
10629 msgid "Commit Log Message Correction"
10630 msgstr "修正提交消息"
10632 #. (para)
10633 #: ../source/book.xml:10440
10634 msgid "Sometimes a user will have an error in her log message (a misspelling or some misinformation, perhaps). If the repository is configured (using the <literal>pre-revprop-change</literal> hook; see <xref linkend=\"svn.reposadmin.create.hooks\"/>) to accept changes to this log message after the commit is finished, then the user can <quote>fix</quote> her log message remotely using the <command>svn</command> program's <literal>propset</literal> command (see <xref linkend=\"svn.ref.svn.c.propset\"/>). However, because of the potential to lose information forever, Subversion repositories are not, by default, configured to allow changes to unversioned properties—except by an administrator."
10635 msgstr "有时用户输入的日志信息有错误(比如拼写错误或者内容错误)。如果配置版本库时设置了(使用<literal>pre-revprop-change</literal>和 <literal>post-revprop-change</literal>钩子;参见<xref linkend=\"svn.reposadmin.create.hooks\"/>)允许用户在提交后修改日志信息的选项,那么用户可以使用<command>svn</command>程序的<literal>propset</literal>命令(参见<xref linkend=\"svn.ref\"/>)<quote>修正</quote>日志信息中的错误。不过为了避免永远丢失信息,Subversion版本库通常设置为仅能由管理员修改非版本化属性(这也是默认的选项)。"
10637 #. (para)
10638 #: ../source/book.xml:10452
10639 msgid "If a log message needs to be changed by an administrator, this can be done using <command>svnadmin setlog</command>. This command changes the log message (the <literal>svn:log</literal> property) on a given revision of a repository, reading the new value from a provided file."
10640 msgstr "如果管理员想要修改日志信息,那么可以使用<command>svnadmin setlog</command>命令。这个命令从指定的文件中读取信息,取代版本库中某个修订版本的日志信息(<literal>svn:log</literal>属性)。"
10642 #. (screen)
10643 #: ../source/book.xml:10457
10644 #, no-wrap
10645 msgid ""
10646 "\n"
10647 "$ echo \"Here is the new, correct log message\" &gt; newlog.txt\n"
10648 "$ svnadmin setlog myrepos newlog.txt -r 388\n"
10649 msgstr ""
10650 "\n"
10651 "$ echo \"Here is the new, correct log message\" &gt; newlog.txt\n"
10652 "$ svnadmin setlog myrepos newlog.txt -r 388\n"
10654 #. (para)
10655 #: ../source/book.xml:10461
10656 msgid "The <command>svnadmin setlog</command> command, by default, is still bound by the same protections against modifying unversioned properties as a remote client is—the <literal>pre-</literal> and <literal>post-revprop-change</literal> hooks are still triggered, and therefore must be set up to accept changes of this nature. But an administrator can get around these protections by passing the <option>--bypass-hooks</option> option to the <command>svnadmin setlog</command> command."
10657 msgstr "即使是<command>svnadmin setlog</command>命令也受到限制。<literal>pre-</literal>和 <literal>post-revprop-change</literal>钩子同样会被触发,因此必须进行相应的设置才能允许修改非版本化属性。不过管理员可以使用<command>svnadmin setlog</command>命令的<option>--bypass-hooks</option>选项跳过钩子。"
10659 #. (para)
10660 #: ../source/book.xml:10472
10661 msgid "Remember, though, that by bypassing the hooks, you are likely avoiding such things as email notifications of property changes, backup systems which track unversioned property changes, and so on. In other words, be very careful about what you are changing, and how you change it."
10662 msgstr "不过需要注意的是,一旦跳过钩子也就跳过了钩子所提供的所有功能,比如邮件通知(通知属性有改动)、系统备份(可以用来跟踪非版本化的属性变更)等等。换句话说,要留心你所作出的修改,以及你作出修改的方式。"
10664 #. (title)
10665 #: ../source/book.xml:10483
10666 msgid "Managing Disk Space"
10667 msgstr "管理磁盘空间"
10669 #. (para)
10670 #: ../source/book.xml:10485
10671 msgid "While the cost of storage has dropped incredibly in the past few years, disk usage is still a valid concern for administrators seeking to version large amounts of data. Every bit of version history information stored in the live repository needs to be backed up elsewhere, perhaps multiple times as part of rotating backup schedules. It is useful to know what pieces of Subversion's repository data need to remain on the live site, which need to be backed up, and which can be safely removed."
10672 msgstr "虽然存储器的价格在过去的几年里以让人难以致信的速度滑落,但是对于那些需要对大量数据进行版本管理的管理员们来说,磁盘空间的消耗依然是一个重要的因素。版本库每增加一个字节都意味着需要多一个字节的磁盘空间进行备份,对于多重备份来说,就需要消耗更多的磁盘空间。Berkeley DB版本库的主要存储机制是基于一个复杂的数据库系统建立的,因此了解一些数据性质是有意义的,比如哪些数据必须保持在线,哪些数据需要备份、哪些数据可以安全的删除等等。"
10674 #. (title)
10675 #: ../source/book.xml:10497
10676 msgid "How Subversion saves disk space"
10677 msgstr "Subversion 如何节约磁盘空间"
10679 #. (para)
10680 #: ../source/book.xml:10499
10681 msgid "To keep the repository small, Subversion uses <firstterm>deltification</firstterm> (or, <quote>deltified storage</quote>) within the repository itself. Deltification involves encoding the representation of a chunk of data as a collection of differences against some other chunk of data. If the two pieces of data are very similar, this deltification results in storage savings for the deltified chunk—rather than taking up space equal to the size of the original data, it takes up only enough space to say, <quote>I look just like this other piece of data over here, except for the following couple of changes</quote>. The result is that most of the repository data that tends to be bulky—namely, the contents of versioned files—is stored at a much smaller size than the original <quote>fulltext</quote> representation of that data. And for repositories created with Subversion 1.4 or later, the space savings are even better—now those fulltext representations of file contents are themselves compressed."
10682 msgstr "为了尽可能减小版本库的体积,Subversion在版本库中采用了<firstterm>增量化技术</firstterm>(或称为<quote>增量存储技术</quote>)。增量化技术可以将一组数据表示为相对于另一组数据的不同。如果这两组数据十分相似,增量化技术就可以仅保存其中一组数据以及两组数据的差别,而不需要同时保存两组数据,从而节省了磁盘空间。每次一个文件的新版本提交到版本库,版本库就会将之前的版本(之前的多个版本)相对于新版本做增量化处理。采用了这项技术,版本库的数据量大小基本上是可以估算出来的—主要是版本化的文件的大小—并且远小于<quote>全文</quote>保存所需的数据量。而Subversion 1.4以后,空间存储变得更为节省—现在文件内容的全文本身都是压缩的了。"
10684 #. (para)
10685 #: ../source/book.xml:10519
10686 msgid "Because all of the data that is subject to deltification in a BDB-backed repository is stored in a single Berkeley DB database file, reducing the size of the stored values will not immediately reduce the size of the database file itself. Berkeley DB will, however, keep internal records of unused areas of the database file, and consume those areas first before growing the size of the database file. So while deltification doesn't produce immediate space savings, it can drastically slow future growth of the database."
10687 msgstr "由于Subversion版本库的增量化数据保存在单一Berkeley DB数据库文件中,减少数据的体积并不一定能够减小数据库文件的大小。但是,Berkeley DB会在内部记录未使用的数据库文件区域,并且在增加数据库文件大小之前会首先使用这些未使用的区域。因此,即使增量化技术不能立杆见影的节省磁盘空间,也可以极大的减慢数据库的膨胀速度。"
10689 #. (title)
10690 #: ../source/book.xml:10534
10691 msgid "Removing dead transactions"
10692 msgstr "删除终止的事务"
10694 #. (para)
10695 #: ../source/book.xml:10536
10696 msgid "Though they are uncommon, there are circumstances in which a Subversion commit process might fail, leaving behind in the repository the remnants of the revision-to-be that wasn't—an uncommitted transaction and all the file and directory changes associated with it. This could happen for several reasons: perhaps the client operation was inelegantly terminated by the user, or a network failure occurred in the middle of an operation. Regardless of the reason, dead transactions can happen. They don't do any real harm, other than consuming disk space. A fastidious administrator may nonetheless wish to remove them."
10697 msgstr "尽管不太常见,Subversion的提交进程也有失败,同时留下将要生成的修订版本—未提交的事物和所有随之的文件和目录修改。出现这种情况可能有以下原因:客户端的用户粗暴的结束了操作,操作过程中出现网络故障,等等。不管是什么原因,死亡的事务总是有可能会出现。这类事务不会产生什么负面影响,仅仅是消耗了一点点磁盘空间。不过,严厉的管理员总是希望能够将它们清除出去。"
10699 #. (para)
10700 #: ../source/book.xml:10548
10701 msgid "You can use <command>svnadmin</command>'s <literal>lstxns</literal> command to list the names of the currently outstanding transactions."
10702 msgstr "可以使用<command>svnadmin</command>的<literal>lstxns</literal> 命令列出当前的事务名。"
10704 #. (screen)
10705 #: ../source/book.xml:10551
10706 #, no-wrap
10707 msgid ""
10708 "\n"
10709 "$ svnadmin lstxns myrepos\n"
10710 "19\n"
10711 "3a1\n"
10712 "a45\n"
10713 "$\n"
10714 msgstr ""
10715 "\n"
10716 "$ svnadmin lstxns myrepos\n"
10717 "19\n"
10718 "3a1\n"
10719 "a45\n"
10720 "$\n"
10722 #. (para)
10723 #: ../source/book.xml:10558
10724 msgid "Each item in the resultant output can then be used with <command>svnlook</command> (and its <option>--transaction (-t)</option> option) to determine who created the transaction, when it was created, what types of changes were made in the transaction—information that is helpful in determining whether or not the transaction is a safe candidate for removal! If you do indeed want to remove a transaction, its name can be passed to <command>svnadmin rmtxns</command>, which will perform the cleanup of the transaction. In fact, the <literal>rmtxns</literal> subcommand can take its input directly from the output of <literal>lstxns</literal>!"
10725 msgstr "将输出的结果条目作为<command>svnlook</command>(设置<option>--transaction (-t)</option>选项)的参数,就可以获得事务的详细信息,如事务的创建者、创建时间,事务已作出的更改类型,由这些信息可以判断出是否可以将这个事务安全的删除。如果可以安全删除,那么只需将事务名作为参数输入到<command>svnadmin rmtxns</command>,就可以将事务清除掉了。其实<literal>rmtxns</literal>子命令可以直接以<literal>lstxns</literal>的输出作为输入进行清理。"
10727 #. (screen)
10728 #: ../source/book.xml:10571
10729 #, no-wrap
10730 msgid ""
10731 "\n"
10732 "$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos`\n"
10733 "$\n"
10734 msgstr ""
10735 "\n"
10736 "$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos`\n"
10737 "$\n"
10739 #. (para)
10740 #: ../source/book.xml:10575
10741 msgid "If you use these two subcommands like this, you should consider making your repository temporarily inaccessible to clients. That way, no one can begin a legitimate transaction before you start your cleanup. <xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns.ex-1\"/> contains a bit of shell-scripting that can quickly generate information about each outstanding transaction in your repository."
10742 msgstr "在按照上面例子中的方法清理版本库之前,你或许应该暂时关闭版本库和客户端的连接。这样在你开始清理之前,不会有正常的事务进入版本库。<xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns.ex-1\"/>中的shell脚本可以用来迅速获得版本库中异常事务的信息。"
10744 #. (title)
10745 #: ../source/book.xml:10584
10746 msgid "txn-info.sh (Reporting Outstanding Transactions)"
10747 msgstr "txn-info.sh(报告异常事务)"
10749 #. (programlisting)
10750 #: ../source/book.xml:10586
10751 #, no-wrap
10752 msgid ""
10753 "\n"
10754 "#!/bin/sh\n"
10755 "\n"
10756 "### Generate informational output for all outstanding transactions in\n"
10757 "### a Subversion repository.\n"
10758 "\n"
10759 "REPOS=\"${1}\"\n"
10760 "if [ \"x$REPOS\" = x ] ; then\n"
10761 "  echo \"usage: $0 REPOS_PATH\"\n"
10762 "  exit\n"
10763 "fi\n"
10764 "\n"
10765 "for TXN in `svnadmin lstxns ${REPOS}`; do \n"
10766 "  echo \"---[ Transaction ${TXN} ]-------------------------------------------\"\n"
10767 "  svnlook info \"${REPOS}\" -t \"${TXN}\"\n"
10768 "done\n"
10769 msgstr ""
10770 "\n"
10771 "#!/bin/sh\n"
10772 "\n"
10773 "### Generate informational output for all outstanding transactions in\n"
10774 "### a Subversion repository.\n"
10775 "\n"
10776 "REPOS=\"${1}\"\n"
10777 "if [ \"x$REPOS\" = x ] ; then\n"
10778 "  echo \"usage: $0 REPOS_PATH\"\n"
10779 "  exit\n"
10780 "fi\n"
10781 "\n"
10782 "for TXN in `svnadmin lstxns ${REPOS}`; do \n"
10783 "  echo \"---[ Transaction ${TXN} ]-------------------------------------------\"\n"
10784 "  svnlook info \"${REPOS}\" -t \"${TXN}\"\n"
10785 "done\n"
10787 #. (para)
10788 #: ../source/book.xml:10604
10789 msgid "The output of the script is basically a concatenation of several chunks of <command>svnlook info</command> output (see <xref linkend=\"svn.reposadmin.maint.tk.svnlook\"/>), and will look something like:"
10790 msgstr "该命令的输出主要由多个<command>svnlook info</command>(参见<xref linkend=\"svn.reposadmin.maint.tk.svnlook\"/>)的输出组成,类似于下面的例子:"
10792 #. (screen)
10793 #: ../source/book.xml:10608
10794 #, no-wrap
10795 msgid ""
10796 "\n"
10797 "$ txn-info.sh myrepos\n"
10798 "---[ Transaction 19 ]-------------------------------------------\n"
10799 "sally\n"
10800 "2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001)\n"
10801 "0\n"
10802 "---[ Transaction 3a1 ]-------------------------------------------\n"
10803 "harry\n"
10804 "2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001)\n"
10805 "39\n"
10806 "Trying to commit over a faulty network.\n"
10807 "---[ Transaction a45 ]-------------------------------------------\n"
10808 "sally\n"
10809 "2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001)\n"
10810 "0\n"
10811 "$\n"
10812 msgstr ""
10813 "\n"
10814 "$ txn-info.sh myrepos\n"
10815 "---[ Transaction 19 ]-------------------------------------------\n"
10816 "sally\n"
10817 "2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001)\n"
10818 "0\n"
10819 "---[ Transaction 3a1 ]-------------------------------------------\n"
10820 "harry\n"
10821 "2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001)\n"
10822 "39\n"
10823 "Trying to commit over a faulty network.\n"
10824 "---[ Transaction a45 ]-------------------------------------------\n"
10825 "sally\n"
10826 "2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001)\n"
10827 "0\n"
10828 "$\n"
10830 #. (para)
10831 #: ../source/book.xml:10625
10832 msgid "A long-abandoned transaction usually represents some sort of failed or interrupted commit. A transaction's datestamp can provide interesting information—for example, how likely is it that an operation begun nine months ago is still active?"
10833 msgstr "一个废弃了很长时间的事务通常是提交错误或异常中断的结果。事务的时间戳可以提供给我们一些有趣的信息,比如一个进行了9个月的操作居然还是活动的等等。"
10835 #. (para)
10836 #: ../source/book.xml:10630
10837 msgid "In short, transaction cleanup decisions need not be made unwisely. Various sources of information—including Apache's error and access logs, Subversion's operational logs, Subversion revision history, and so on—can be employed in the decision-making process. And of course, an administrator can often simply communicate with a seemingly dead transaction's owner (via email, for example) to verify that the transaction is, in fact, in a zombie state."
10838 msgstr "简言之,作出事务清理的决定前应该仔细考虑一下。许多信息源—比如Apache的错误和访问日志,已成功完成的Subversion提交日志等等—都可以作为决策的参考。当然,管理员还可以直接和那些似乎已经死亡事务的提交者直接交流(比如通过邮件),来确认该事务确实已经死亡了。"
10840 #. (title)
10841 #: ../source/book.xml:10642
10842 msgid "Purging unused Berkeley DB logfiles"
10843 msgstr "删除不使用的 Berkeley DB 日志文件"
10845 #. (para)
10846 #: ../source/book.xml:10644
10847 msgid "Until recently, the largest offender of disk space usage with respect to BDB-backed Subversion repositories was the log files in which Berkeley DB performs its pre-writes before modifying the actual database files. These files capture all the actions taken along the route of changing the database from one state to another—while the database files, at any given time, reflect a particular state, the log files contain all the many changes along the way <emphasis>between</emphasis> states. Thus, they can grow and accumulate quite rapidly."
10848 msgstr "目前为止,Subversion版本库中耗费磁盘空间的最大凶手是日志文件,每次Berkeley DB在修改真正的数据文件之前都会进行预写入(pre-writes)操作。这些文件记录了数据库从一个状态变化到另一个状态的所有动作——数据库文件反映了特定时刻数据库的状态,而日志文件则记录了所有状态变化的信息。因此,日志文件会以很快的速度膨胀起来。"
10850 #. (para)
10851 #: ../source/book.xml:10654
10852 msgid "Fortunately, beginning with the 4.2 release of Berkeley DB, the database environment has the ability to remove its own unused log files automatically. Any repositories created using an <command>svnadmin</command> which is compiled against Berkeley DB version 4.2 or greater will be configured for this automatic log file removal. If you don't want this feature enabled, simply pass the <option>--bdb-log-keep</option> option to the <command>svnadmin create</command> command. If you forget to do this, or change your mind at a later time, simply edit the <filename>DB_CONFIG</filename> file found in your repository's <filename>db</filename> directory, comment out the line which contains the <literal>set_flags DB_LOG_AUTOREMOVE</literal> directive, and then run <command>svnadmin recover</command> on your repository to force the configuration changes to take effect. See <xref linkend=\"svn.reposadmin.create.bdb\"/> for more information about database configuration."
10853 msgstr "幸运的是,从版本4.2开始,Berkeley DB的数据库环境无需额外的操作即可删除无用的日志文件。如果编译<command>svnadmin</command>时使用了高于4.2版本的Berkeley DB,那么由此<command>svnadmin</command>程序创建的版本库就具备了自动清除日志文件的功能。如果想屏蔽这个功能,只需设置<command>svnadmin create</command>命令的<option>--bdb-log-keep</option>选项即可。如果创建版本库以后想要修改关于此功能的设置,只需编辑版本库中<filename>db</filename>目录下的<filename>DB_CONFIG</filename>文件,注释掉包含<literal>set_flags DB_LOG_AUTOREMOVE</literal>内容的这一行,然后运行<command>svnadmin recover</command>强制设置生效就行了。查阅<xref linkend=\"svn.reposadmin.create.bdb\"/>获得更多关于数据库配置的帮助信息。"
10855 #. (para)
10856 #: ../source/book.xml:10671
10857 msgid "Without some sort of automatic log file removal in place, log files will accumulate as you use your repository. This is actually somewhat of a feature of the database system—you should be able to recreate your entire database using nothing but the log files, so these files can be useful for catastrophic database recovery. But typically, you'll want to archive the log files that are no longer in use by Berkeley DB, and then remove them from disk to conserve space. Use the <command>svnadmin list-unused-dblogs</command> command to list the unused log files:"
10858 msgstr "如果不自动删除日志文件,那么日志文件会随着版本库的使用逐渐增加。这多少应该算是数据库系统的特性,通过这些日志文件可以在数据库严重损坏时恢复整个数据库的内容。但是一般情况下,最好是能够将无用的日志文件收集起来并删除,这样就可以节省磁盘空间。使用<command>svnadmin list-unused-dblogs</command>命令可以列出无用的日志文件:"
10860 #. (screen)
10861 #: ../source/book.xml:10682
10862 #, fuzzy, no-wrap
10863 msgid ""
10864 "\n"
10865 "$ svnadmin list-unused-dblogs /var/svn/repos\n"
10866 "/var/svn/repos/log.0000000031\n"
10867 "/var/svn/repos/log.0000000032\n"
10868 "/var/svn/repos/log.0000000033\n"
10869 "…\n"
10870 "$ rm `svnadmin list-unused-dblogs /var/svn/repos`\n"
10871 "## disk space reclaimed!\n"
10872 msgstr ""
10873 "\n"
10874 "$ svnadmin list-unused-dblogs /path/to/repos\n"
10875 "/path/to/repos/log.0000000031\n"
10876 "/path/to/repos/log.0000000032\n"
10877 "/path/to/repos/log.0000000033\n"
10878 "…\n"
10879 "$ rm `svnadmin list-unused-dblogs /path/to/repos`\n"
10880 "## disk space reclaimed!\n"
10882 #. (para)
10883 #: ../source/book.xml:10692
10884 msgid "BDB-backed repositories whose log files are used as part of a backup or disaster recovery plan should <emphasis>not</emphasis> make use of the log file autoremoval feature. Reconstruction of a repository's data from log files can only be accomplished when <emphasis>all</emphasis> the log files are available. If some of the log files are removed from disk before the backup system has a chance to copy them elsewhere, the incomplete set of backed-up log files is essentially useless."
10885 msgstr "BDB后端的版本库的日志文件如果是用来作为备份或容灾恢复计划时,不要使用日志文件的自动删除特性。从日志文件重新构建版本库数据只有在所有的日志文件都存在时才能完成,如果有一些文件在别的程序将其拷贝之前就已经被删除了,不完整的备份日志文件就没有用了。"
10887 #. (title)
10888 #: ../source/book.xml:10707
10889 msgid "Berkeley DB Recovery"
10890 msgstr "Berkeley DB 恢复"
10892 #. (para)
10893 #: ../source/book.xml:10709
10894 msgid "As mentioned in <xref linkend=\"svn.reposadmin.basics.backends.bdb\"/>, a Berkeley DB repository can sometimes be left in frozen state if not closed properly. When this happens, an administrator needs to rewind the database back into a consistent state. This is unique to BDB-backed repositories, though—if you are using FSFS-backed ones instead, this won't apply to you. And for those of you using Subversion 1.4 with Berkeley DB 4.4 or better, you should find that Subversion has become much more resilient in these types of situations. Still, wedged Berkeley DB repositories do occur, and an administrator needs to know how to safely deal with this circumstance."
10895 msgstr "就像在<xref linkend=\"svn.reposadmin.basics.backends.bdb\"/>提到的,如果没有正确的关闭,Berkeley DB版本库有时候会进入冻结的状态。当发生这种情况时,管理员需要恢复版本库进入一致的状态。当然这种情况只发生在BDB版本库,FSFS版本库不会有这种情况。对于使用Subversion 1.4和Berkeley DB 4.4或更新版本的用户,你一定发现Subversion对于这种情况已经更富弹性,但是Berkeley DB楔住的情况还是会发生,管理员需要知道如何安全的处理种情况。"
10897 #. (para)
10898 #: ../source/book.xml:10720
10899 msgid "In order to protect the data in your repository, Berkeley DB uses a locking mechanism. This mechanism ensures that portions of the database are not simultaneously modified by multiple database accessors, and that each process sees the data in the correct state when that data is being read from the database. When a process needs to change something in the database, it first checks for the existence of a lock on the target data. If the data is not locked, the process locks the data, makes the change it wants to make, and then unlocks the data. Other processes are forced to wait until that lock is removed before they are permitted to continue accessing that section of the database. (This has nothing to do with the locks that you, as a user, can apply to versioned files within the repository; we try to clear up the confusion caused by this terminology collision in <xref linkend=\"svn.advanced.locking.meanings\"/>.)"
10900 msgstr "Berkeley DB使用一种锁机制保护版本库中的数据。锁机制确保数据库不会同时被多个访问进程修改,也就保证了从数据库中读取到的数据始终是稳定而且正确的。当一个进程需要修改数据库中的数据时,首先必须检查目标数据是否已经上锁。如果目标数据没有上锁,进程就将它锁上,然后作出修改,最后再将锁解除。而其它进程则必须等待锁解除后才能继续访问数据库中的相关内容。(你对这种锁无能为力,作为一个用户,可以应用版本库的版本化文件;我们会在<xref linkend=\"svn.advanced.locking.meanings\"/>讨论因为术语冲突导致的概念混淆。)"
10902 #. (para)
10903 #: ../source/book.xml:10735
10904 msgid "In the course of using your Subversion repository, fatal errors or interruptions can prevent a process from having the chance to remove the locks it has placed in the database. The result is that the back-end database system gets <quote>wedged</quote>. When this happens, any attempts to access the repository hang indefinitely (since each new accessor is waiting for a lock to go away—which isn't going to happen)."
10905 msgstr "在操作Subversion版本库的过程中,致命错误(如内存或硬盘空间不足)或异常中断可能会导致某个进程没能及时将锁解除。结果就是后端的数据库系统被<quote>塞住</quote>了。一旦发生这种情况,任何访问版本库的进程都会挂起(每个访问进程都在等待锁被解除,但是锁已经无法解除了)。"
10907 #. (para)
10908 #: ../source/book.xml:10747
10909 msgid "E.g.: hard drive + huge electromagnet = disaster."
10910 msgstr "比如:硬盘 + 大号电磁铁 = 毁灭。"
10912 #. (para)
10913 #: ../source/book.xml:10743
10914 msgid "If this happens to your repository, don't panic. The Berkeley DB filesystem takes advantage of database transactions and checkpoints and pre-write journaling to ensure that only the most catastrophic of events <placeholder-1/> can permanently destroy a database environment. A sufficiently paranoid repository administrator will have made off-site backups of the repository data in some fashion, but don't head off to the tape backup storage closet just yet."
10915 msgstr "如果你的版本库出现这种情况,没什么好惊慌的。Berkeley DB的文件系统采用了数据库事务、检查点以及预写入日志等技术来确保只有灾难性的事件<placeholder-1/>才能永久性的破坏数据库环境。所以虽然一个过于稳重的版本库管理员通常都会按照某种方案进行大量的版本库离线备份,不过不要急着通知你的管理员进行恢复。"
10917 #. (para)
10918 #: ../source/book.xml:10752
10919 msgid "Instead, use the following recipe to attempt to <quote>unwedge</quote> your repository:"
10920 msgstr "然后,使用下面的方法试着<quote>恢复</quote>你的版本库:"
10922 #. (para)
10923 #: ../source/book.xml:10756
10924 msgid "Make sure that there are no processes accessing (or attempting to access) the repository. For networked repositories, this means shutting down the Apache HTTP Server or svnserve daemon, too."
10925 msgstr "确保没有其它进程访问(或者试图访问)版本库。对于网络版本库,这意味着关闭Apache HTTP Server或svnserve。"
10927 #. (para)
10928 #: ../source/book.xml:10762
10929 msgid "Become the user who owns and manages the repository. This is important, as recovering a repository while running as the wrong user can tweak the permissions of the repository's files in such a way that your repository will still be inaccessible even after it is <quote>unwedged</quote>."
10930 msgstr "成为版本库的拥有者和管理员。这一点很重要,如果以其它用户的身份恢复版本库,可能会改变版本库文件的访问权限,导致在版本库<quote>恢复</quote>后依旧无法访问。"
10932 #. (para)
10933 #: ../source/book.xml:10770
10934 #, fuzzy
10935 msgid "Run the command <command>svnadmin recover /var/svn/repos</command>. You should see output like this:"
10936 msgstr "运行命令<command>svnadmin recover /path/to/repos</command>。 输出如下:"
10938 #. (screen)
10939 #: ../source/book.xml:10773
10940 #, no-wrap
10941 msgid ""
10942 "\n"
10943 "Repository lock acquired.\n"
10944 "Please wait; recovering the repository may take some time...\n"
10945 "\n"
10946 "Recovery completed.\n"
10947 "The latest repos revision is 19.\n"
10948 msgstr ""
10949 "\n"
10950 "Repository lock acquired。\n"
10951 "Please wait; recovering the repository may take some time...\n"
10952 "\n"
10953 "Recovery completed.\n"
10954 "The latest repos revision is 19.\n"
10956 #. (para)
10957 #: ../source/book.xml:10780
10958 msgid "This command may take many minutes to complete."
10959 msgstr "此命令可能需要数分钟才能完成。"
10961 #. (para)
10962 #: ../source/book.xml:10783
10963 msgid "Restart the server process."
10964 msgstr "重新启动服务进程。"
10966 #. (para)
10967 #: ../source/book.xml:10786
10968 msgid "This procedure fixes almost every case of repository lock-up. Make sure that you run this command as the user that owns and manages the database, not just as <literal>root</literal>. Part of the recovery process might involve recreating from scratch various database files (shared memory regions, for example). Recovering as <literal>root</literal> will create those files such that they are owned by <literal>root</literal>, which means that even after you restore connectivity to your repository, regular users will be unable to access it."
10969 msgstr "这个方法能修复几乎所有版本库锁住的问题。记住,要以数据库的拥有者和管理员的身份运行这个命令,而不一定是<literal>root</literal>用户。恢复过程中可能会使用其它数据存储区(例如共享内存区)重建一些数据库文件。如果以<literal>root</literal>用户身份恢复版本库,这些重建的文件拥有者将变成<literal>root</literal>用户,也就是说,即使恢复了到版本库的连接,一般的用户也无权访问这些文件。"
10971 #. (para)
10972 #: ../source/book.xml:10796
10973 msgid "If the previous procedure, for some reason, does not successfully unwedge your repository, you should do two things. First, move your broken repository directory aside (perhaps by renaming it to something like <filename>repos.BROKEN</filename>) and then restore your latest backup of it. Then, send an email to the Subversion user list (at <email>users@subversion.tigris.org</email>) describing your problem in detail. Data integrity is an extremely high priority to the Subversion developers."
10974 msgstr "如果因为某些原因,上面的方法没能成功的恢复版本库,那么你可以做两件事。首先,将破损的版本库保存到其它地方,然后从最新的备份中恢复版本库。然后,发送一封邮件到Subversion用户列表(地址是:<email>users@subversion.tigris.org</email>),写清你所遇到的问题。对于Subversion的开发者来说,数据安全是最重要的问题。"
10976 #. (title)
10977 #: ../source/book.xml:10809
10978 msgid "Migrating Repository Data Elsewhere"
10979 msgstr "版本库数据的移植"
10981 #. (para)
10982 #: ../source/book.xml:10811
10983 msgid "A Subversion filesystem has its data spread throughout files in the repository, in a fashion generally understood by (and of interest to) only the Subversion developers themselves. However, circumstances may arise that call for all, or some subset, of that data to be copied or moved into another repository."
10984 msgstr "Subversion文件系统将数据保存在许多数据库表中,而这些表的结构只有Subversion开发者们才了解(也只有他们才感兴趣),不过,有些时候我们会想到把所有或一部分数据转移到另一个版本库。"
10986 #. (para)
10987 #: ../source/book.xml:10817
10988 msgid "Subversion provides such functionality by way of repository dump streams. A repository dump stream (often referred to as a <quote>dumpfile</quote> when stored as a file on disk) is a portable, flat file format that describes the various revisions in your repository—what was changed, by whom, when, and so on. This dump stream is the primary mechanism used to marshal versioned history—in whole or in part, with or without modification—between repositories. And Subversion provides the tools necessary for creating and loading these dump streams—the <command>svnadmin dump</command> and <command>svnadmin load</command> subcommands, respectively."
10989 msgstr "Subversion提供了转储版本库的功能,一个版本库转储流(当存放在磁盘上叫做<quote>dumpfile</quote>)是一种可移植的,普通文件格式,可以用来描述版本库的不同版本—什么发生了修改,谁做的,何时等等。这种转储流是解析版本化历史的主要机制—全部或部分,包含或部包含修改—在版本库之间。Subversion也提供了创建和加载这些转储流的工具—对应的<command>svnadmin dump</command>和<command>svnadmin load</command>子命令。"
10991 #. (para)
10992 #: ../source/book.xml:10830
10993 msgid "While the Subversion repository dump format contains human-readable portions and a familiar structure (it resembles an RFC-822 format, the same type of format used for most email), it is <emphasis>not</emphasis> a plaintext file format. It is a binary file format, highly sensitive to meddling. For example, many text editors will corrupt the file by automatically converting line endings."
10994 msgstr "虽然Subversion版本库转储格式包含了人可读的部分和熟悉的结构(类似RFC-822格式,大多数邮件使用的),它不是纯文本的格式,这种格式必须作为二进制文件格式处理,对修改高度敏感。例如,许多文本编辑器会破坏这种文件的内容,通常是因为自动换行符替换。"
10996 #. (para)
10997 #: ../source/book.xml:10838
10998 msgid "There are many reasons for dumping and loading Subversion repository data. Early in Subversion's life, the most common reason was due to the evolution of Subversion itself. As Subversion matured, there were times when changes made to the back-end database schema caused compatibility issues with previous versions of the repository, so users had to dump their repository data using the previous version of Subversion, and load it into a freshly created repository with the new version of Subversion. Now, these types of schema changes haven't occurred since Subversion's 1.0 release, and the Subversion developers promise not to force users to dump and load their repositories when upgrading between minor versions (such as from 1.3 to 1.4) of Subversion. But there are still other reasons for dumping and loading, including re-deploying a Berkeley DB repository on a new OS or CPU architecture, switching between the Berkeley DB and FSFS back-ends, or (as we'll cover in <xref linkend=\"svn.reposadmin.maint.filtering\"/>) purging versioned data from repository history."
10999 msgstr "有很多导出和加载Subversion版本库数据的方法,在Subversion的早期阶段,最主要的原因是Subversion本身的进化。随着Subversion的成熟,对于数据后端模式的改变会导致更多的兼容性问题,所以用户需要使用旧版本的Subversion将版本库数据导出,然后用新版的版本库加载内容到新建的版本库。目前,这种类型的模式修改从Subversion 1.0版本还没有发生,而且Subversion开发者也许诺不会强制用户在小版本(如1.3到1.4)升级之间导入和导出版本库。但是也有一些其它原因导出和导入,包括重新部署Berkeley DB到版本库到新的OS或CPU架构,在Berkeley DB和FSFS后端之间切换,或者(我们会在<xref linkend=\"svn.reposadmin.maint.filtering\"/>覆盖)从版本库历史中清理文件。"
11001 #. (para)
11002 #: ../source/book.xml:10856
11003 msgid "Whatever your reason for migrating repository history, using the <command>svnadmin dump</command> and <command>svnadmin load</command> subcommands is straightforward. <command>svnadmin dump</command> will output a range of repository revisions that are formatted using Subversion's custom filesystem dump format. The dump format is printed to the standard output stream, while informative messages are printed to the standard error stream. This allows you to redirect the output stream to a file while watching the status output in your terminal window. For example:"
11004 msgstr "无论你是什么原因需要移植版本库历史,都可以直接使用<command>svnadmin dump</command>和<command>svnadmin load</command>。<command>svnadmin dump</command>命令会将版本库中的修订版本数据按照特定的格式输出到转储流中,转储数据会输出到标准输出,而提示信息会输出到标准错误。这就是说,可以将转储数据存储到文件中,而同时在终端窗口中监视运行状态,例如:"
11006 #. (screen)
11007 #: ../source/book.xml:10867
11008 #, no-wrap
11009 msgid ""
11010 "\n"
11011 "$ svnlook youngest myrepos\n"
11012 "26\n"
11013 "$ svnadmin dump myrepos &gt; dumpfile\n"
11014 "* Dumped revision 0.\n"
11015 "* Dumped revision 1.\n"
11016 "* Dumped revision 2.\n"
11017 "…\n"
11018 "* Dumped revision 25.\n"
11019 "* Dumped revision 26.\n"
11020 msgstr ""
11021 "\n"
11022 "$ svnlook youngest myrepos\n"
11023 "26\n"
11024 "$ svnadmin dump myrepos &gt; dumpfile\n"
11025 "* Dumped revision 0.\n"
11026 "* Dumped revision 1.\n"
11027 "* Dumped revision 2.\n"
11028 "…\n"
11029 "* Dumped revision 25.\n"
11030 "* Dumped revision 26.\n"
11032 #. (para)
11033 #: ../source/book.xml:10878
11034 msgid "At the end of the process, you will have a single file (<filename>dumpfile</filename> in the previous example) that contains all the data stored in your repository in the requested range of revisions. Note that <command>svnadmin dump</command> is reading revision trees from the repository just like any other <quote>reader</quote> process would (<command>svn checkout</command>, for example), so it's safe to run this command at any time."
11035 msgstr "最后,版本库中的指定的修订版本数据被转储到一个独立的文件中(在上面的例子中是<filename>dumpfile</filename>)。注意,<command>svnadmin dump</command>从版本库中读取修订版本树与其它<quote>读者</quote>(比如<command>svn checkout</command>)的过程相同,所以可以在任何时候安全的运行这个命令。"
11037 #. (para)
11038 #: ../source/book.xml:10886
11039 msgid "The other subcommand in the pair, <command>svnadmin load</command>, parses the standard input stream as a Subversion repository dump file, and effectively replays those dumped revisions into the target repository for that operation. It also gives informative feedback, this time using the standard output stream:"
11040 msgstr "另一个命令,<command>svnadmin load</command>,从标准输入流中读取Subversion转储数据,并且高效的将数据转载到目标版本库中。这个命令的提示信息输出到标准输出流中:"
11042 #. (screen)
11043 #: ../source/book.xml:10892
11044 #, no-wrap
11045 msgid ""
11046 "\n"
11047 "$ svnadmin load newrepos &lt; dumpfile\n"
11048 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
11049 "     * adding path : A ... done.\n"
11050 "     * adding path : A/B ... done.\n"
11051 "     …\n"
11052 "------- Committed new rev 1 (loaded from original rev 1) &gt;&gt;&gt;\n"
11053 "\n"
11054 "&lt;&lt;&lt; Started new txn, based on original revision 2\n"
11055 "     * editing path : A/mu ... done.\n"
11056 "     * editing path : A/D/G/rho ... done.\n"
11057 "\n"
11058 "------- Committed new rev 2 (loaded from original rev 2) &gt;&gt;&gt;\n"
11059 "\n"
11060 "…\n"
11061 "\n"
11062 "&lt;&lt;&lt; Started new txn, based on original revision 25\n"
11063 "     * editing path : A/D/gamma ... done.\n"
11064 "\n"
11065 "------- Committed new rev 25 (loaded from original rev 25) &gt;&gt;&gt;\n"
11066 "\n"
11067 "&lt;&lt;&lt; Started new txn, based on original revision 26\n"
11068 "     * adding path : A/Z/zeta ... done.\n"
11069 "     * editing path : A/mu ... done.\n"
11070 "\n"
11071 "------- Committed new rev 26 (loaded from original rev 26) &gt;&gt;&gt;\n"
11072 "\n"
11073 msgstr ""
11074 "\n"
11075 "$ svnadmin load newrepos &lt; dumpfile\n"
11076 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
11077 "     * adding path : A ... done.\n"
11078 "     * adding path : A/B ... done.\n"
11079 "     …\n"
11080 "------- Committed new rev 1 (loaded from original rev 1) &gt;&gt;&gt;\n"
11081 "\n"
11082 "&lt;&lt;&lt; Started new txn, based on original revision 2\n"
11083 "     * editing path : A/mu ... done.\n"
11084 "     * editing path : A/D/G/rho ... done.\n"
11085 "\n"
11086 "------- Committed new rev 2 (loaded from original rev 2) &gt;&gt;&gt;\n"
11087 "\n"
11088 "…\n"
11089 "\n"
11090 "&lt;&lt;&lt; Started new txn, based on original revision 25\n"
11091 "     * editing path : A/D/gamma ... done.\n"
11092 "\n"
11093 "------- Committed new rev 25 (loaded from original rev 25) &gt;&gt;&gt;\n"
11094 "\n"
11095 "&lt;&lt;&lt; Started new txn, based on original revision 26\n"
11096 "     * adding path : A/Z/zeta ... done.\n"
11097 "     * editing path : A/mu ... done.\n"
11098 "\n"
11099 "------- Committed new rev 26 (loaded from original rev 26) &gt;&gt;&gt;\n"
11100 "\n"
11102 #. (para)
11103 #: ../source/book.xml:10920
11104 msgid "The result of a load is new revisions added to a repository—the same thing you get by making commits against that repository from a regular Subversion client. And just as in a commit, you can use hook programs to perform actions before and after each of the commits made during a load process. By passing the <option>--use-pre-commit-hook</option> and <option>--use-post-commit-hook</option> options to <command>svnadmin load</command>, you can instruct Subversion to execute the pre-commit and post-commit hook programs, respectively, for each loaded revision. You might use these, for example, to ensure that loaded revisions pass through the same validation steps that regular commits pass through. Of course, you should use these options with care—if your post-commit hook sends emails to a mailing list for each new commit, you might not want to spew hundreds or thousands of commit emails in rapid succession at that list! You can read more about the use of hook scripts in <xref linkend=\"svn.reposadmin.create.hooks\"/>."
11105 msgstr "load命令的结果就是添加一些新的修订版本—与使用普通Subversion客户端直接提交到版本库相同。正像一次简单的提交,你也可以使用钩子脚本在每次load的开始和结束执行一些操作。通过传递<option>--use-pre-commit-hook</option>和<option>--use-post-commit-hook</option>选项给<command>svnadmin load</command>,你可以告诉Subversion的对每一个加载修订版本执行pre-commit和post-commit钩子脚本,可以利用这个选项确保这种提交也能通过一般提交的检验。当然,你要小心使用这个选项,你一定不想接受一大堆提交邮件。你可以查看<xref linkend=\"svn.reposadmin.create.hooks\"/>来得到更多相关信息。"
11107 #. (para)
11108 #: ../source/book.xml:10938
11109 msgid "Note that because <command>svnadmin</command> uses standard input and output streams for the repository dump and load process, people who are feeling especially saucy can try things like this (perhaps even using different versions of <command>svnadmin</command> on each side of the pipe):"
11110 msgstr "既然<command>svnadmin</command>使用标准输入流和标准输出流作为转储和装载的输入和输出,那么更漂亮的用法是(管道两端可以是不同版本的<command>svnadmin</command>:"
11112 #. (screen)
11113 #: ../source/book.xml:10943
11114 #, no-wrap
11115 msgid ""
11116 "\n"
11117 "$ svnadmin create newrepos\n"
11118 "$ svnadmin dump oldrepos | svnadmin load newrepos\n"
11119 msgstr ""
11120 "\n"
11121 "$ svnadmin create newrepos\n"
11122 "$ svnadmin dump oldrepos | svnadmin load newrepos\n"
11124 #. (para)
11125 #: ../source/book.xml:10947
11126 msgid "By default, the dump file will be quite large—much larger than the repository itself. That's because by default every version of every file is expressed as a full text in the dump file. This is the fastest and simplest behavior, and nice if you're piping the dump data directly into some other process (such as a compression program, filtering program, or into a loading process). But if you're creating a dump file for longer-term storage, you'll likely want to save disk space by using the <option>--deltas</option> option. With this option, successive revisions of files will be output as compressed, binary differences—just as file revisions are stored in a repository. This option is slower, but results in a dump file much closer in size to the original repository."
11127 msgstr "默认情况下,转储文件的体积可能会相当庞大——比版本库自身大很多。这是因为在转储文件中,每个文件的每个版本都以完整的文本形式保存下来。这种方法速度很快,而且很简单,尤其是直接将转储数据通过管道输入到其它进程中时(比如一个压缩程序,过滤程序,或者一个装载进程)。不过如果要长期保存转储文件,那么可以使用<option>--deltas</option>选项来节省磁盘空间。设置这个选项,同一个文件的数个连续修订版本会以增量式的方式保存—就像储存在版本库中一样。这个方法较慢,但是转储文件的体积则基本上与版本库的体积相当。"
11129 #. (para)
11130 #: ../source/book.xml:10961
11131 msgid "We mentioned previously that <command>svnadmin dump</command> outputs a range of revisions. Use the <option>--revision (-r)</option> option to specify a single revision to dump, or a range of revisions. If you omit this option, all the existing repository revisions will be dumped."
11132 msgstr "之前我们提到<command>svnadmin dump</command>输出指定范围内的修订版本,使用<option>--revision (-r)</option>选项可以指定一个单独的修订版本,或者一个修订版本的范围。如果忽略这个选项,所有版本库中的修订版本都会被转储。"
11134 #. (screen)
11135 #: ../source/book.xml:10967
11136 #, no-wrap
11137 msgid ""
11138 "\n"
11139 "$ svnadmin dump myrepos -r 23 &gt; rev-23.dumpfile\n"
11140 "$ svnadmin dump myrepos -r 100:200 &gt; revs-100-200.dumpfile\n"
11141 msgstr ""
11142 "\n"
11143 "$ svnadmin dump myrepos -r 23 &gt; rev-23.dumpfile\n"
11144 "$ svnadmin dump myrepos -r 100:200 &gt; revs-100-200.dumpfile\n"
11146 #. (para)
11147 #: ../source/book.xml:10971
11148 msgid "As Subversion dumps each new revision, it outputs only enough information to allow a future loader to re-create that revision based on the previous one. In other words, for any given revision in the dump file, only the items that were changed in that revision will appear in the dump. The only exception to this rule is the first revision that is dumped with the current <command>svnadmin dump</command> command."
11149 msgstr "Subversion在转储修订版本时,仅会输出与前一个修订版本之间的差异,通过这些差异足以从前一个修订版本中重建当前的修订版本。换句话说,在转储文件中的每一个修订版本仅包含这个修订版本作出的修改。这个规则的唯一一个例外是当前<command>svnadmin dump</command>转储的第一个修订版本。"
11151 #. (para)
11152 #: ../source/book.xml:10979
11153 msgid "By default, Subversion will not express the first dumped revision as merely differences to be applied to the previous revision. For one thing, there is no previous revision in the dump file! And secondly, Subversion cannot know the state of the repository into which the dump data will be loaded (if it ever is). To ensure that the output of each execution of <command>svnadmin dump</command> is self-sufficient, the first dumped revision is by default a full representation of every directory, file, and property in that revision of the repository."
11154 msgstr "默认情况下,Subversion不会把转储的第一个修订版本看作对前一个修订版本的更改。 首先,转储文件中没有比第一个修订版本更靠前的修订版本了!其次,Subversion不知道装载转储数据时(如果真的需要装载的话)的版本库是什么样的情况。为了保证每次运行<command>svnadmin dump</command>都能得到一个独立的结果,第一个转储的修订版本默认情况下会完整的保存目录、文件以及属性等数据。"
11156 #. (para)
11157 #: ../source/book.xml:10989
11158 msgid "However, you can change this default behavior. If you add the <option>--incremental</option> option when you dump your repository, <command>svnadmin</command> will compare the first dumped revision against the previous revision in the repository, the same way it treats every other revision that gets dumped. It will then output the first revision exactly as it does the rest of the revisions in the dump range—mentioning only the changes that occurred in that revision. The benefit of this is that you can create several small dump files that can be loaded in succession, instead of one large one, like so:"
11159 msgstr "不过,这些都是可以改变的。如果转储时设置了<option>--incremental</option>选项,<command>svnadmin</command>会比较第一个转储的修订版本和版本库中前一个修订版本,就像对待其它转储的修订版本一样。转储时也是一样,转储文件中将仅包含第一个转储的修订版本的增量信息。这样的好处是,可以创建几个连续的小体积的转储文件代替一个大文件,比如:"
11161 #. (screen)
11162 #: ../source/book.xml:11000
11163 #, no-wrap
11164 msgid ""
11165 "\n"
11166 "$ svnadmin dump myrepos -r 0:1000 &gt; dumpfile1\n"
11167 "$ svnadmin dump myrepos -r 1001:2000 --incremental &gt; dumpfile2\n"
11168 "$ svnadmin dump myrepos -r 2001:3000 --incremental &gt; dumpfile3\n"
11169 msgstr ""
11170 "\n"
11171 "$ svnadmin dump myrepos -r 0:1000 &gt; dumpfile1\n"
11172 "$ svnadmin dump myrepos -r 1001:2000 --incremental &gt; dumpfile2\n"
11173 "$ svnadmin dump myrepos -r 2001:3000 --incremental &gt; dumpfile3\n"
11175 #. (para)
11176 #: ../source/book.xml:11005
11177 msgid "These dump files could be loaded into a new repository with the following command sequence:"
11178 msgstr "这些转储文件可以使用下列命令装载到一个新的版本库中:"
11180 #. (screen)
11181 #: ../source/book.xml:11007
11182 #, no-wrap
11183 msgid ""
11184 "\n"
11185 "$ svnadmin load newrepos &lt; dumpfile1\n"
11186 "$ svnadmin load newrepos &lt; dumpfile2\n"
11187 "$ svnadmin load newrepos &lt; dumpfile3\n"
11188 msgstr ""
11189 "\n"
11190 "$ svnadmin load newrepos &lt; dumpfile1\n"
11191 "$ svnadmin load newrepos &lt; dumpfile2\n"
11192 "$ svnadmin load newrepos &lt; dumpfile3\n"
11194 #. (para)
11195 #: ../source/book.xml:11012
11196 msgid "Another neat trick you can perform with this <option>--incremental</option> option involves appending to an existing dump file a new range of dumped revisions. For example, you might have a <literal>post-commit</literal> hook that simply appends the repository dump of the single revision that triggered the hook. Or you might have a script that runs nightly to append dump file data for all the revisions that were added to the repository since the last time the script ran. Used like this, <command>svnadmin dump</command> can be one way to back up changes to your repository over time in case of a system crash or some other catastrophic event."
11197 msgstr "另一个有关的技巧是,可以使用<option>--incremental</option>选项在一个转储文件中增加新的转储修订版本。举个例子,可以使用<literal>post-commit</literal>钩子在每次新的修订版本提交后将其转储到文件中。或者,可以编写一个脚本,在每天夜里将所有新增的修订版本转储到文件中。这样,<command>svnadmin dump</command>命令就变成了很好的版本库备份工具,以防万一出现系统崩溃或其它灾难性事件。"
11199 #. (para)
11200 #: ../source/book.xml:11023
11201 msgid "The dump format can also be used to merge the contents of several different repositories into a single repository. By using the <option>--parent-dir</option> option of <command>svnadmin load</command>, you can specify a new virtual root directory for the load process. That means if you have dump files for three repositories, say <filename>calc-dumpfile</filename>, <filename>cal-dumpfile</filename>, and <filename>ss-dumpfile</filename>, you can first create a new repository to hold them all:"
11202 msgstr "转储还可以用来将几个独立的版本库合并为一个版本库。使用<command>svnadmin load</command>的<option>--parent-dir</option>选项,可以在装载的时候指定根目录。也就是说,如果有三个不同版本库的转储文件,比如<filename>calc-dumpfile</filename>,<filename>cal-dumpfile</filename>,和<filename>ss-dumpfile</filename>,可以在一个新的版本库中保存所有三个转储文件中的数据:"
11204 #. (screen)
11205 #: ../source/book.xml:11033
11206 #, fuzzy, no-wrap
11207 msgid ""
11208 "\n"
11209 "$ svnadmin create /var/svn/projects\n"
11210 "$\n"
11211 msgstr ""
11212 "\n"
11213 "$ svnadmin create /path/to/projects\n"
11214 "$\n"
11216 #. (para)
11217 #: ../source/book.xml:11037
11218 msgid "Then, make new directories in the repository which will encapsulate the contents of each of the three previous repositories:"
11219 msgstr "然后在版本库中创建三个目录分别保存来自三个不同版本库的数据:"
11221 #. (screen)
11222 #: ../source/book.xml:11040
11223 #, fuzzy, no-wrap
11224 msgid ""
11225 "\n"
11226 "$ svn mkdir -m \"Initial project roots\" \\\n"
11227 "      file:///var/svn/projects/calc \\\n"
11228 "      file:///var/svn/projects/calendar \\\n"
11229 "      file:///var/svn/projects/spreadsheet\n"
11230 "Committed revision 1.\n"
11231 "$ \n"
11232 msgstr ""
11233 "\n"
11234 "$ svn mkdir -m \"Initial project roots\" \\\n"
11235 "      file:///path/to/projects/calc \\\n"
11236 "      file:///path/to/projects/calendar \\\n"
11237 "      file:///path/to/projects/spreadsheet\n"
11238 "Committed revision 1.\n"
11239 "$ \n"
11241 #. (para)
11242 #: ../source/book.xml:11048
11243 msgid "Lastly, load the individual dump files into their respective locations in the new repository:"
11244 msgstr "最后,将转储文件分别装载到各自的目录中:"
11246 #. (screen)
11247 #: ../source/book.xml:11050
11248 #, fuzzy, no-wrap
11249 msgid ""
11250 "\n"
11251 "$ svnadmin load /var/svn/projects --parent-dir calc &lt; calc-dumpfile\n"
11252 "…\n"
11253 "$ svnadmin load /var/svn/projects --parent-dir calendar &lt; cal-dumpfile\n"
11254 "…\n"
11255 "$ svnadmin load /var/svn/projects --parent-dir spreadsheet &lt; ss-dumpfile\n"
11256 "…\n"
11257 "$\n"
11258 msgstr ""
11259 "\n"
11260 "$ svnadmin load /path/to/projects --parent-dir calc &lt; calc-dumpfile\n"
11261 "…\n"
11262 "$ svnadmin load /path/to/projects --parent-dir calendar &lt; cal-dumpfile\n"
11263 "…\n"
11264 "$ svnadmin load /path/to/projects --parent-dir spreadsheet &lt; ss-dumpfile\n"
11265 "…\n"
11266 "$\n"
11268 #. (para)
11269 #: ../source/book.xml:11059
11270 msgid "We'll mention one final way to use the Subversion repository dump format—conversion from a different storage mechanism or version control system altogether. Because the dump file format is, for the most part, human-readable, it should be relatively easy to describe generic sets of changes—each of which should be treated as a new revision—using this file format. In fact, the <command>cvs2svn</command> utility (see <xref linkend=\"svn.forcvs.convert\"/>) uses the dump format to represent the contents of a CVS repository so that those contents can be copied into a Subversion repository."
11271 msgstr "我们再介绍一下Subversion版本库转储数据的最后一种用途——在不同的存储机制或版本控制系统之间转换。因为转储数据的格式的大部分是可以阅读的,所以使用这种格式描述变更集(每个变更集对应一个新的修订版本)会相对容易一些。事实上,<command>cvs2svn</command>工具(参见 <xref linkend=\"svn.forcvs.convert\"/>)正是将CVS版本库的内容转换为转储数据格式,如此才能将CVS版本库的数据导入Subversion版本库之中。"
11273 #. (title)
11274 #: ../source/book.xml:11073
11275 msgid "Filtering Repository History"
11276 msgstr "过滤版本库历史"
11278 #. (para)
11279 #: ../source/book.xml:11082
11280 msgid "That's rather the reason you use version control at all, right?"
11281 msgstr "那就是你是用版本控制的原因,对吗?"
11283 #. (para)
11284 #: ../source/book.xml:11089
11285 msgid "Conscious, cautious removal of certain bits of versioned data is actually supported by real use-cases. That's why an <quote>obliterate</quote> feature has been one of the most highly requested Subversion features, and one which the Subversion developers hope to soon provide."
11286 msgstr "故意小心的删除部分版本化数据确实是真实的需求,这就是为什么永久删除特性是Subversion要求最多的一个特性,也是Subversion开发者希望立刻提供的。"
11288 #. (para)
11289 #: ../source/book.xml:11075
11290 msgid "Since Subversion stores your versioned history using, at the very least, binary differencing algorithms and data compression (optionally in a completely opaque database system), attempting manual tweaks is unwise, if not quite difficult, and at any rate strongly discouraged. And once data has been stored in your repository, Subversion generally doesn't provide an easy way to remove that data. <placeholder-1/> But inevitably, there will be times when you would like to manipulate the history of your repository. You might need to strip out all instances of a file that was accidentally added to the repository (and shouldn't be there for whatever reason). <placeholder-2/> Or, perhaps you have multiple projects sharing a single repository, and you decide to split them up into their own repositories. To accomplish tasks like this, administrators need a more manageable and malleable representation of the data in their repositories—the Subversion repository dump format."
11291 msgstr "因为Subversion使用底层的二进制区别和压缩算法(也可以选择完全非透明数据库系统)储存各类数据,手工调整是不明智的,即使这样做并不困难,我们也不鼓励这样做。何况,一旦你的数据存进了版本库,Subversion没有提供删除数据的简单办法。<placeholder-1/>但是不可避免的,总会有些时候你需要处理版本库的历史数据。你也许想把一个不应该出现的文件从版本库中彻底清除(无论任何原因不应该在那个位置出现)。或者,你曾经用一个版本库管理多个工程,现在又想把它们分开。要完成这样的工作,管理员们需要更易于管理和扩展的方法表示版本库中的数据,Subversion版本库转储文件格式就是一个很好的选择。"
11293 #. (para)
11294 #: ../source/book.xml:11101
11295 msgid "As we described in <xref linkend=\"svn.reposadmin.maint.migrate\"/>, the Subversion repository dump format is a human-readable representation of the changes that you've made to your versioned data over time. You use the <command>svnadmin dump</command> command to generate the dump data, and <command>svnadmin load</command> to populate a new repository with it (see <xref linkend=\"svn.reposadmin.maint.migrate\"/>). The great thing about the human-readability aspect of the dump format is that, if you aren't careless about it, you can manually inspect and modify it. Of course, the downside is that if you have three years' worth of repository activity encapsulated in what is likely to be a very large dump file, it could take you a long, long time to manually inspect and modify it."
11296 msgstr "就像我们在<xref linkend=\"svn.reposadmin.maint.migrate\"/>中说的,Subversion版本库转储文件记录了所有版本数据的变更信息,而且以易于阅读的格式保存。可以使用<command>svnadmin dump</command>命令生成转储文件,然后用<command>svnadmin load</command>命令生成一个新的版本库。(参见 <xref linkend=\"svn.reposadmin.maint.migrate\"/>)。转储文件易于阅读意味着你可以查看和修改它。当然,问题是如果你有一个运行了三年的版本库,那么生成的转储文件会很庞大,阅读和手工修改起来都会花费很多时间。"
11298 #. (para)
11299 #: ../source/book.xml:11115
11300 msgid "That's where <command>svndumpfilter</command> becomes useful. This program acts as path-based filter for repository dump streams. Simply give it either a list of paths you wish to keep, or a list of paths you wish to not keep, then pipe your repository dump data through this filter. The result will be a modified stream of dump data that contains only the versioned paths you (explicitly or implicitly) requested."
11301 msgstr "这正是<command>svndumpfilter</command>发挥作用的地方,这个程序可以对版本库转储流进行特定路径的过滤。这是一个独特而很有意义的用法,可以帮助你快速方便的修改转储的数据。使用时,只需提供一个你想要保留的(或者不想保留的)路径列表,然后把你的版本库转储文件送进这个过滤器。最后你就可以得到一个仅包含你想保留路径(明确的或含蓄的)的转储数据流。"
11303 #. (para)
11304 #: ../source/book.xml:11123
11305 msgid "Let's look a realistic example of how you might use this program. We discuss elsewhere (see <xref linkend=\"svn.reposadmin.projects.chooselayout\"/>) the process of deciding how to choose a layout for the data in your repositories—using one repository per project or combining them, arranging stuff within your repository, and so on. But sometimes after new revisions start flying in, you rethink your layout and would like to make some changes. A common change is the decision to move multiple projects which are sharing a single repository into separate repositories for each project."
11306 msgstr "现在我来演示如何使用这个命令。我们会在其它章节(参见 <xref linkend=\"svn.reposadmin.projects.chooselayout\"/>)讨论关于如何选择设定版本库布局的问题,比如应该使用一个版本库管理多个项目还是使用一个版本库管理一个项目,或者如何在版本库中安排数据等等。不过,有些时候,即使在项目已经展开以后,你还是希望对版本库的布局做一些调整。最常见的情况是,把原来存放在同一个版本库中的几个项目分开,各自成家。"
11308 #. (para)
11309 #: ../source/book.xml:11133
11310 msgid "Our imaginary repository contains three projects: <literal>calc</literal>, <literal>calendar</literal>, and <literal>spreadsheet</literal>. They have been living side-by-side in a layout like this:"
11311 msgstr "假设有一个包含三个项目的版本库: <literal>calc</literal>,<literal>calendar</literal>,和 <literal>spreadsheet</literal>。它们在版本库中的布局如下:"
11313 #. (screen)
11314 #: ../source/book.xml:11137
11315 #, no-wrap
11316 msgid ""
11317 "\n"
11318 "/\n"
11319 "   calc/\n"
11320 "      trunk/\n"
11321 "      branches/\n"
11322 "      tags/\n"
11323 "   calendar/\n"
11324 "      trunk/\n"
11325 "      branches/\n"
11326 "      tags/\n"
11327 "   spreadsheet/\n"
11328 "      trunk/\n"
11329 "      branches/\n"
11330 "      tags/\n"
11331 msgstr ""
11332 "\n"
11333 "/\n"
11334 "   calc/\n"
11335 "      trunk/\n"
11336 "      branches/\n"
11337 "      tags/\n"
11338 "   calendar/\n"
11339 "      trunk/\n"
11340 "      branches/\n"
11341 "      tags/\n"
11342 "   spreadsheet/\n"
11343 "      trunk/\n"
11344 "      branches/\n"
11345 "      tags/\n"
11347 #. (para)
11348 #: ../source/book.xml:11152
11349 msgid "To get these three projects into their own repositories, we first dump the whole repository:"
11350 msgstr "现在要把这三个项目转移到三个独立的版本库中。首先,转储整个版本库:"
11352 #. (screen)
11353 #: ../source/book.xml:11154
11354 #, fuzzy, no-wrap
11355 msgid ""
11356 "\n"
11357 "$ svnadmin dump /var/svn/repos &gt; repos-dumpfile\n"
11358 "* Dumped revision 0.\n"
11359 "* Dumped revision 1.\n"
11360 "* Dumped revision 2.\n"
11361 "* Dumped revision 3.\n"
11362 "…\n"
11363 "$\n"
11364 msgstr ""
11365 "\n"
11366 "$ svnadmin dump /path/to/repos &gt; repos-dumpfile\n"
11367 "* Dumped revision 0.\n"
11368 "* Dumped revision 1.\n"
11369 "* Dumped revision 2.\n"
11370 "* Dumped revision 3.\n"
11371 "…\n"
11372 "$\n"
11374 #. (para)
11375 #: ../source/book.xml:11163
11376 msgid "Next, run that dump file through the filter, each time including only one of our top-level directories, and resulting in three new dump files:"
11377 msgstr "然后,将转储文件三次送入过滤器,每次仅保留一个顶级目录,就可以得到三个转储文件:"
11379 #. (screen)
11380 #: ../source/book.xml:11166
11381 #, no-wrap
11382 msgid ""
11383 "\n"
11384 "$ svndumpfilter include calc &lt; repos-dumpfile &gt; calc-dumpfile\n"
11385 "…\n"
11386 "$ svndumpfilter include calendar &lt; repos-dumpfile &gt; cal-dumpfile\n"
11387 "…\n"
11388 "$ svndumpfilter include spreadsheet &lt; repos-dumpfile &gt; ss-dumpfile\n"
11389 "…\n"
11390 "$\n"
11391 msgstr ""
11392 "\n"
11393 "$ svndumpfilter include calc &lt; repos-dumpfile &gt; calc-dumpfile\n"
11394 "…\n"
11395 "$ svndumpfilter include calendar &lt; repos-dumpfile &gt; cal-dumpfile\n"
11396 "…\n"
11397 "$ svndumpfilter include spreadsheet &lt; repos-dumpfile &gt; ss-dumpfile\n"
11398 "…\n"
11399 "$\n"
11401 #. (para)
11402 #: ../source/book.xml:11175
11403 msgid "At this point, you have to make a decision. Each of your dump files will create a valid repository, but will preserve the paths exactly as they were in the original repository. This means that even though you would have a repository solely for your <literal>calc</literal> project, that repository would still have a top-level directory named <filename>calc</filename>. If you want your <filename>trunk</filename>, <filename>tags</filename>, and <filename>branches</filename> directories to live in the root of your repository, you might wish to edit your dump files, tweaking the <literal>Node-path</literal> and <literal>Node-copyfrom-path</literal> headers to no longer have that first <filename>calc/</filename> path component. Also, you'll want to remove the section of dump data that creates the <filename>calc</filename> directory. It will look something like:"
11404 msgstr "现在你必须要作出一个决定了。这三个转储文件中,每个都可以用来创建一个可用的版本库,不过它们保留了原版本库的精确路径结构。也就是说,虽然项目<literal>calc</literal>现在独占了一个版本库,但版本库中还保留着名为<filename>calc</filename>的顶级目录。如果希望<filename>trunk</filename>、<filename>tags</filename>和<filename>branches</filename>这三个目录直接位于版本库的根路径下,你可能需要编辑转储文件,调整<literal>Node-path</literal>和<literal>Copyfrom-path</literal>头参数,将路径<filename>calc/</filename>删除。同时,你还要删除转储数据中创建<filename>calc</filename>目录的部分。一般来说,就是如下的一些内容:"
11406 #. (screen)
11407 #: ../source/book.xml:11191
11408 #, no-wrap
11409 msgid ""
11410 "\n"
11411 "Node-path: calc\n"
11412 "Node-action: add\n"
11413 "Node-kind: dir\n"
11414 "Content-length: 0\n"
11415 "  \n"
11416 msgstr ""
11417 "\n"
11418 "Node-path: calc\n"
11419 "Node-action: add\n"
11420 "Node-kind: dir\n"
11421 "Content-length: 0\n"
11422 "  \n"
11424 #. (para)
11425 #: ../source/book.xml:11199
11426 #, fuzzy
11427 msgid "If you do plan on manually editing the dump file to remove a top-level directory, make sure that your editor is not set to automatically convert end-of-line characters to the native format (e.g. \\r\\n to \\n), as the content will then not agree with the metadata. This will render the dump file useless."
11428 msgstr "如果你打算通过手工编辑转储文件来移除一个顶级目录,注意不要让你的编辑器将换行符转换为本地格式(比如将\\r\\n转换为\\n)。否则文件的内容就与所需的格式不相符,这个转储文件也就失效了。"
11430 #. (para)
11431 #: ../source/book.xml:11206
11432 msgid "All that remains now is to create your three new repositories, and load each dump file into the right repository:"
11433 msgstr "剩下的工作就是创建三个新的版本库,然后将三个转储文件分别导入:"
11435 #. (screen)
11436 #: ../source/book.xml:11209
11437 #, no-wrap
11438 msgid ""
11439 "\n"
11440 "$ svnadmin create calc; svnadmin load calc &lt; calc-dumpfile\n"
11441 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11442 "     * adding path : Makefile ... done.\n"
11443 "     * adding path : button.c ... done.\n"
11444 "…\n"
11445 "$ svnadmin create calendar; svnadmin load calendar &lt; cal-dumpfile\n"
11446 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11447 "     * adding path : Makefile ... done.\n"
11448 "     * adding path : cal.c ... done.\n"
11449 "…\n"
11450 "$ svnadmin create spreadsheet; svnadmin load spreadsheet &lt; ss-dumpfile\n"
11451 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11452 "     * adding path : Makefile ... done.\n"
11453 "     * adding path : ss.c ... done.\n"
11454 "…\n"
11455 "$\n"
11456 msgstr ""
11457 "\n"
11458 "$ svnadmin create calc; svnadmin load calc &lt; calc-dumpfile\n"
11459 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11460 "     * adding path : Makefile ... done.\n"
11461 "     * adding path : button.c ... done.\n"
11462 "…\n"
11463 "$ svnadmin create calendar; svnadmin load calendar &lt; cal-dumpfile\n"
11464 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11465 "     * adding path : Makefile ... done.\n"
11466 "     * adding path : cal.c ... done.\n"
11467 "…\n"
11468 "$ svnadmin create spreadsheet; svnadmin load spreadsheet &lt; ss-dumpfile\n"
11469 "&lt;&lt;&lt; Started new transaction, based on original revision 1\n"
11470 "     * adding path : Makefile ... done.\n"
11471 "     * adding path : ss.c ... done.\n"
11472 "…\n"
11473 "$\n"
11475 #. (para)
11476 #: ../source/book.xml:11227
11477 msgid "Both of <command>svndumpfilter</command>'s subcommands accept options for deciding how to deal with <quote>empty</quote> revisions. If a given revision contained only changes to paths that were filtered out, that now-empty revision could be considered uninteresting or even unwanted. So to give the user control over what to do with those revisions, <command>svndumpfilter</command> provides the following command-line options:"
11478 msgstr "<command>svndumpfilter</command>的两个子命令都可以通过选项设定如何处理<quote>空</quote>修订版本。如果某个指定的修订版本仅包含路径的更改,过滤器就会将它删除,因为当前为空的修订版本通常是无用的甚至是让人讨厌的。为了让用户有选择的处理这些修订版本,<command>svndumpfilter</command>提供了以下命令行选项:"
11480 #. (option)
11481 #: ../source/book.xml:11238
11482 msgid "--drop-empty-revs"
11483 msgstr "--drop-empty-revs"
11485 #. (para)
11486 #: ../source/book.xml:11241
11487 msgid "Do not generate empty revisions at all—just omit them."
11488 msgstr "不生成任何空修订版本,忽略它们。"
11490 #. (option)
11491 #: ../source/book.xml:11247
11492 msgid "--renumber-revs"
11493 msgstr "--renumber-revs"
11495 #. (para)
11496 #: ../source/book.xml:11250
11497 msgid "If empty revisions are dropped (using the <option>--drop-empty-revs</option> option), change the revision numbers of the remaining revisions so that there are no gaps in the numeric sequence."
11498 msgstr "如果空修订版本被剔除(通过使用<option>--drop-empty-revs</option>选项),依次修改其它修订版本的编号,确保编号序列是连续的。"
11500 #. (option)
11501 #: ../source/book.xml:11258
11502 msgid "--preserve-revprops"
11503 msgstr "--preserve-revprops"
11505 #. (para)
11506 #: ../source/book.xml:11261
11507 msgid "If empty revisions are not dropped, preserve the revision properties (log message, author, date, custom properties, etc.) for those empty revisions. Otherwise, empty revisions will only contain the original datestamp, and a generated log message that indicates that this revision was emptied by <command>svndumpfilter</command>."
11508 msgstr "如果空修订版本被保留,保持这些空修订版本的属性(日志信息,作者,日期,自定义属性,等等)。如果不设定这个选项,空修订版本将仅保留初始时间戳,以及一个自动生成的日志信息,表明此修订版本由<command>svndumpfilter</command>处理过。"
11510 #. (para)
11511 #: ../source/book.xml:11271
11512 msgid "While <command>svndumpfilter</command> can be very useful, and a huge timesaver, there are unfortunately a couple of gotchas. First, this utility is overly sensitive to path semantics. Pay attention to whether paths in your dump file are specified with or without leading slashes. You'll want to look at the <literal>Node-path</literal> and <literal>Node-copyfrom-path</literal> headers."
11513 msgstr "尽管<command>svndumpfilter</command>十分有用,能节省大量的时间,但它却是把不折不扣的双刃剑。首先,这个工具对路径语义极为敏感。仔细检查转储文件中的路径是不是以斜线开头。也许<literal>Node-path</literal>和<literal>Copyfrom-path</literal>这两个头参数对你有些帮助。"
11515 #. (screen)
11516 #: ../source/book.xml:11278
11517 #, no-wrap
11518 msgid ""
11519 "\n"
11520 "…\n"
11521 "Node-path: spreadsheet/Makefile\n"
11522 "…\n"
11523 msgstr ""
11524 "\n"
11525 "…\n"
11526 "Node-path: spreadsheet/Makefile\n"
11527 "…\n"
11529 #. (para)
11530 #: ../source/book.xml:11289
11531 msgid "While <command>svnadmin dump</command> has a consistent leading slash policy—to not include them—other programs which generate dump data might not be so consistent."
11532 msgstr "尽管<command>svnadmin dump</command>对是否以斜线作为路径的开头有统一的规定——这个规定就是不以斜线作为路径的开头——其它生成转储文件的程序不一定会遵守这个规定。"
11534 #. (para)
11535 #: ../source/book.xml:11283
11536 msgid "If the paths have leading slashes, you should include leading slashes in the paths you pass to <command>svndumpfilter include</command> and <command>svndumpfilter exclude</command> (and if they don't, you shouldn't). Further, if your dump file has an inconsistent usage of leading slashes for some reason, <placeholder-1/> you should probably normalize those paths so they all have, or lack, leading slashes."
11537 msgstr "如果这些路径以斜线开头,那么你传递给<command>svndumpfilter include</command>和<command>svndumpfilter exclude</command>的路径也必须以斜线开头(反之亦然)。如果因为某些原因转储文件中的路径没有统一使用或不使用斜线开头,<placeholder-1/>也许需要修正这些路径,统一使用斜线开头或不使用斜线开头。"
11539 #. (para)
11540 #: ../source/book.xml:11295
11541 msgid "Also, copied paths can give you some trouble. Subversion supports copy operations in the repository, where a new path is created by copying some already existing path. It is possible that at some point in the lifetime of your repository, you might have copied a file or directory from some location that <command>svndumpfilter</command> is excluding, to a location that it is including. In order to make the dump data self-sufficient, <command>svndumpfilter</command> needs to still show the addition of the new path—including the contents of any files created by the copy—and not represent that addition as a copy from a source that won't exist in your filtered dump data stream. But because the Subversion repository dump format only shows what was changed in each revision, the contents of the copy source might not be readily available. If you suspect that you have any copies of this sort in your repository, you might want to rethink your set of included/excluded paths, perhaps including the paths that served as sources of your troublesome copy operations, too."
11542 msgstr "此外,复制操作生成的路径也会带来麻烦。Subversion支持在版本库中进行复制操作,也就是复制一个存在的路径,生成一个新的路径。问题是,<command>svndumpfilter</command>保留的某个文件或目录可能是由某个<command>svndumpfilter</command>排除的文件或目录复制而来的。也就是说,为了确保转储数据的完整性,<command>svndumpfilter</command>需要切断这些复制自被排除路径的文件与源文件的关系,还要将这些文件的内容以新建的方式添加到转储数据中。但是由于Subversion版本库转储文件格式中仅包含了修订版本的更改信息,因此源文件的内容基本上无法获得。如果你不能确定版本库中是否存在类似的情况,最好重新考虑一下到底保留/排除哪些路径。"
11544 #. (para)
11545 #: ../source/book.xml:11315
11546 msgid "Finally, <command>svndumpfilter</command> takes path filtering quite literally. If you are trying to copy the history of a project rooted at <filename>trunk/my-project</filename> and move it into a repository of its own, you would, of course, use the <command>svndumpfilter include</command> command to keep all the changes in and under <filename>trunk/my-project</filename>. But the resulting dump file makes no assumptions about the repository into which you plan to load this data. Specifically, the dump data might begin with the revision which added the <filename>trunk/my-project</filename> directory, but it will <emphasis>not</emphasis> contain directives which would create the <filename>trunk</filename> directory itself (because <filename>trunk</filename> doesn't match the include filter). You'll need to make sure that any directories which the new dump stream expect to exist actually do exist in the target repository before trying to load the stream into that repository."
11547 msgstr "最后,<command>svndumpfilter</command>就是字面上的意思,如果你尝试将目录<filename>trunk/my-project</filename>中的内容迁移到其自己版本库,你可以使用<command>svndumpfilter include</command>命令保持<filename>trunk/my-project</filename>目录下的所有修改。但是结果转储文件对于将要被加载入的版本库没有任何假定,特别的,目录<filename>trunk/my-project</filename>可能从创建这个目录的修订版本开始,而它不会包含以自己创建<filename>trunk</filename>目录的指示(因为<filename>trunk</filename>没有匹配include过滤)。在尝试将转储流存放到版本库之前,你需要确定任何转储流将要存在的目录必须存在于目标版本库。"
11549 #. (title)
11550 #: ../source/book.xml:11338
11551 msgid "Repository Replication"
11552 msgstr "版本库复制"
11554 #. (para)
11555 #: ../source/book.xml:11340
11556 msgid "There are several scenarios in which it is quite handy to have a Subversion repository whose version history is exactly the same as some other repository's. Perhaps the most obvious one is the maintenance of a simple backup repository, used when the primary repository has become inaccessible due to a hardware failure, network outage, or other such annoyance. Other scenarios include deploying mirror repositories to distribute heavy Subversion load across multiple servers, use as a soft-upgrade mechanism, and so on."
11557 msgstr "有许多场景下会存在一个Subversion版本库的版本历史与另一个完全相同。或许最明显的就是在主版本库因为硬件故障或网络已出或其他原因而不可用时,维护一个简单的备份版本库。其他的场景包括,部署一个镜像版本库来分流压力,作为软升级机制等等。"
11559 #. (para)
11560 #: ../source/book.xml:11349
11561 msgid "As of version 1.4, Subversion provides a program for managing scenarios like these—<command>svnsync</command>. <command>svnsync</command> works by essentially asking the Subversion server to <quote>replay</quote> revisions, one at a time. It then uses that revision information to mimic a commit of the same to another repository. Neither repository needs to be locally accessible to machine on which <command>svnsync</command> is running—its parameters are repository URLs, and it does all its work through Subversion's repository access (RA) interfaces. All it requires is read access to the source repository and read/write access to the destination repository."
11562 msgstr "Subversion 1.4提供了管理这种场景的工具—<command>svnsync</command>。<command>svnsync</command>实质上就是通知版本库<quote>重放</quote>修订版本,一次一个,然后将修订版本信息模拟提交到另一个版本库。<command>svnsync</command>运行不需要能够本地访问版本库—它的参数是版本库URL,所有的工作是通过Subversion版本库访问层(RA)接口实现的,所有要做的就是读源版本库,然后读写访问目标版本库。"
11564 #. (para)
11565 #: ../source/book.xml:11363
11566 msgid "When using <command>svnsync</command> against a remote source repository, the Subversion server for that repository must be running Subversion version 1.4 or better."
11567 msgstr "当对远程源版本库使用<command>svnsync</command>时,Subversion版本库的服务器必须是Subversion1.4或更高的版本。"
11569 #. (para)
11570 #: ../source/book.xml:11379
11571 msgid "In fact, it can't truly be read-only, or <command>svnsync</command> itself would have a tough time copying revision history into it."
11572 msgstr "实际上,它不是真的完全只读,或者<command>svnsync</command>本身有时间将版本库历史拷入。"
11574 #. (para)
11575 #: ../source/book.xml:11367
11576 msgid "Assuming you already have a source repository that you'd like to mirror, the next thing you need is an empty target repository which will actually serve as that mirror. This target repository can use either of the available filesystem data-store back-ends (see <xref linkend=\"svn.reposadmin.basics.backends\"/>), but it must not yet have any version history in it. The protocol via which <command>svnsync</command> communicates revision information is highly sensitive to mismatches between the versioned histories contained in the source and target repositories. For this reason, while <command>svnsync</command> cannot <emphasis>demand</emphasis> that the target repository be read-only, <placeholder-1/> allowing the revision history in the target repository to change by any mechanism other than the mirroring process is a recipe for disaster."
11577 msgstr "假定你已经有了一个希望镜像的源版本库,下一步就是你要有一个作为镜像的目标版本库。目标版本库可以使用任意文件系统数据存储后端(见<xref linkend=\"svn.reposadmin.basics.backends\"/>),但是其中一定不能有历史版本。<command>svnsync</command>的通讯议对于源和目标版本库版本历史的不一致非常敏感,因此,虽然<command>svnsync</command>无法要求目标版本库是只读的,<placeholder-1/>最好的办法就是只允许镜像进程修改目标版本库内容。"
11579 #. (para)
11580 #: ../source/book.xml:11386
11581 msgid "Do <emphasis>not</emphasis> modify a mirror repository in such a way as to cause its version history to deviate from that of the repository it mirrors. The only commits and revision property modifications that ever occur on that mirror repository should be those performed by the <command>svnsync</command> tool."
11582 msgstr "<emphasis>不要</emphasis>做出会对镜像版本库产生版本库历史偏移的修改,所有提交和版本库的属性修改必须是由<command>svnsync</command>执行的。"
11584 #. (para)
11585 #: ../source/book.xml:11393
11586 msgid "Another requirement of the target repository is that the <command>svnsync</command> process be allowed to modify certain revision properties. <command>svnsync</command> stores its bookkeeping information in special revision properties on revision 0 of the destination repository. Because <command>svnsync</command> works within the framework of that repository's hook system, the default state of the repository (which is to disallow revision property changes; see <xref linkend=\"svn.ref.reposhooks.pre-revprop-change\"/>) is insufficient. You'll need to explicitly implement the pre-revprop-change hook, and your script must allow <command>svnsync</command> to set and change its special properties. With those provisions in place, you are ready to start mirroring repository revisions."
11587 msgstr "对于目标版本库的另一种需求是<command>svnsync</command>可以修改特定版本化属性。<command>svnsync</command>在目标版本库的修订版本0的特别属性上记录了簿记信息,因为<command>svnsync</command>在版本库的钩子系统的框架下工作的,版本库缺省的状态(关闭了版本库属性修改;见<xref linkend=\"svn.ref.reposhooks.pre-revprop-change\"/>)是不够的。你会需要明确的实现pre-revprop-change钩子,而且你的脚本必须允许<command>svnsync</command>设置它的特别属性,有了这些准备工作,你就可以开始镜像版本库修订版本了。"
11589 #. (para)
11590 #: ../source/book.xml:11408
11591 msgid "It's a good idea to implement authorization measures which allow your repository replication process to perform its tasks while preventing other users from modifying the contents of your mirror repository at all."
11592 msgstr "实现授权措施允许复制进程的操作,同时防止其他用户修改镜像版本库内容是一个好主意。"
11594 #. (para)
11595 #: ../source/book.xml:11413
11596 msgid "Let's walk through the use of <command>svnsync</command> in a somewhat typical mirroring scenario. We'll pepper this discourse with practical recommendations which you are free to disregard if they aren't required by or suitable for your environment."
11597 msgstr "让我们在一个典型的镜像场景中浏览一下<command>svnsync</command>的使用,我们急着讨论实践推荐,但是如果你们不需要或者感到不适合你们的环境,你可以不必去关注。"
11599 #. (para)
11600 #: ../source/book.xml:11418
11601 msgid "As a service to the fine developers of our favorite version control system, we will be mirroring the public Subversion source code repository and exposing that mirror publicly on the Internet, hosted on a different machine than the one on which the original Subversion source code repository lives. This remote host has a global configuration which permits anonymous users to read the contents of repositories on the host, but requires users to authenticate in order to modify those repositories. (Please forgive us for glossing over the details of Subversion server configuration for the moment—those are covered thoroughly in <xref linkend=\"svn.serverconfig\"/>.) And for no other reason than that it makes for a more interesting example, we'll be driving the replication process from a third machine, the one which we currently find ourselves using."
11602 msgstr "作为开发者喜欢的版本控制系统的一个服务,我们会Subversion的源代码版本库镜像到Internet,存放在不同的主机上,而不仅仅只有最初的Subversion版本库。远程主机的全局设置允许匿名用户读取版本库的信息,但是需要认证的用户才能修改版本库。(请原谅我们在此刻这里曲解Subversion服务器配置的细节—这些内容在<xref linkend=\"svn.serverconfig\"/>。)因为没有更多的理由来建立更有趣的例子,我们会在第三个机器上创建复制进程,我们正在使用的一个例子。"
11604 #. (para)
11605 #: ../source/book.xml:11432
11606 msgid "First, we'll create the repository which will be our mirror. This and the next couple of steps do require shell access to the machine on which the mirror repository will live. Once the repository is all configured, though, we shouldn't need to touch it directly again."
11607 msgstr "首先,我们会创建一个作为镜像的版本库,下面两步需要我们能够通过shell访问镜像版本库的机器。一旦版本库配置完成,我们不必再直接碰它了。"
11609 #. (screen)
11610 #: ../source/book.xml:11437
11611 #, fuzzy, no-wrap
11612 msgid ""
11613 "\n"
11614 "$ ssh admin@svn.example.com \\\n"
11615 "      \"svnadmin create /var/svn/svn-mirror\"\n"
11616 "admin@svn.example.com's password: ********\n"
11617 "$\n"
11618 msgstr ""
11619 "\n"
11620 "$ ssh admin@svn.example.com \\\n"
11621 "      \"svnadmin create /path/to/repositories/svn-mirror\"\n"
11622 "admin@svn.example.com's password: ********\n"
11623 "$\n"
11625 #. (para)
11626 #: ../source/book.xml:11443
11627 msgid "At this point, we have our repository, and due to our server's configuration, that repository is now <quote>live</quote> on the Internet. Now, because we don't want anything modifying the repository except our replication process, we need a way to distinguish that process from other would-be committers. To do so, we use a dedicated username for our process. Only commits and revision property modifications performed by the special username <literal>syncuser</literal> will be allowed."
11628 msgstr "此刻,我们有了我们的版本库,因为我们服务器的配置,这个版本库现在<quote>存在于</quote>Internet。现在,因为除了复制进程我们不希望任何其他修改,我们需要将这个进程同其他可能的提交者区分开来。为此,我们的进程使用专用的用户,只有特定用户<literal>syncuser</literal>的提交和属性修改可以被执行。"
11630 #. (para)
11631 #: ../source/book.xml:11452
11632 msgid "We'll use the repository's hook system both to allow the replication process to do what it needs to do, and to enforce that only it is doing those things. We accomplish this by implementing two of the repository event hooks—pre-revprop-change and start-commit. Our <filename>pre-revprop-change</filename> hook script is found in <xref linkend=\"svn.reposadmin.maint.replication.pre-revprop-change\"/>, and basically verifies that the user attempting the property changes is our <literal>syncuser</literal> user. If so, the change is allowed; otherwise, it is denied."
11633 msgstr "我们会使用版本库的钩子系统来允许复制进程完成我们的任务,我们通过实现两个版本库事件钩子pre-revprop-change和start-commit来强制这个过程。我们的<filename>pre-revprop-change</filename>钩子脚本可以在<xref linkend=\"svn.reposadmin.maint.replication.pre-revprop-change\"/>找到,只是验证尝试修改属性的用户是<literal>syncuser</literal>,如果是,则允许修改;否则,拒绝修改。"
11635 #. (title)
11636 #: ../source/book.xml:11463
11637 msgid "Mirror repository's pre-revprop-change hook script"
11638 msgstr "镜像版本库的 pre-revprop-change 钩子"
11640 #. (programlisting)
11641 #: ../source/book.xml:11465
11642 #, no-wrap
11643 msgid ""
11644 "\n"
11645 "#!/bin/sh \n"
11646 "\n"
11647 "USER=\"$3\"\n"
11648 "\n"
11649 "if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n"
11650 "\n"
11651 "echo \"Only the syncuser user may change revision properties\" &gt;&amp;2\n"
11652 "exit 1\n"
11653 msgstr ""
11654 "\n"
11655 "#!/bin/sh \n"
11656 "\n"
11657 "USER=\"$3\"\n"
11658 "\n"
11659 "if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n"
11660 "\n"
11661 "echo \"Only the syncuser user may change revision properties\" &gt;&amp;2\n"
11662 "exit 1\n"
11664 #. (para)
11665 #: ../source/book.xml:11476
11666 msgid "That covers revision property changes. Now we need to ensure that only the <literal>syncuser</literal> user is permitted to commit new revisions to the repository. We do this using a <filename>start-commit</filename> hook scripts like the one in <xref linkend=\"svn.reposadmin.maint.replication.start-commit\"/>."
11667 msgstr "这里覆盖了修订版本属性修改,我们现在需要来确认只有用户<literal>syncuser</literal>允许提交新版本到版本库,我们使用了一个像<xref linkend=\"svn.reposadmin.maint.replication.start-commit\"/>的<filename>start-commit</filename>钩子。"
11669 #. (title)
11670 #: ../source/book.xml:11483
11671 msgid "Mirror repository's start-commit hook script"
11672 msgstr "镜像版本库的 start-commit 钩子"
11674 #. (programlisting)
11675 #: ../source/book.xml:11485
11676 #, no-wrap
11677 msgid ""
11678 "\n"
11679 "#!/bin/sh \n"
11680 "\n"
11681 "USER=\"$2\"\n"
11682 "\n"
11683 "if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n"
11684 "\n"
11685 "echo \"Only the syncuser user may commit new revisions\" &gt;&amp;2\n"
11686 "exit 1\n"
11687 msgstr ""
11688 "\n"
11689 "#!/bin/sh \n"
11690 "\n"
11691 "USER=\"$2\"\n"
11692 "\n"
11693 "if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n"
11694 "\n"
11695 "echo \"Only the syncuser user may commit new revisions\" &gt;&amp;2\n"
11696 "exit 1\n"
11698 #. (para)
11699 #: ../source/book.xml:11496
11700 msgid "After installing our hook scripts and ensuring that they are executable by the Subversion server, we're finished with the setup of the mirror repository. Now, we get to actually do the mirroring."
11701 msgstr "在安装了我们的钩子脚本和确定它们可以被Subversion服务器执行后,我们完成了镜像版本库的配置,现在我们开始实际的镜像。"
11703 #. (para)
11704 #: ../source/book.xml:11500
11705 msgid "The first thing we need to do with <command>svnsync</command> is to register in our target repository the fact that it will be a mirror of the source repository. We do this using the <command>svnsync initialize</command> subcommand. Note that the various <command>svnsync</command> subcommands provide several of the same authentication-related options that <command>svn</command> does: <option>--username</option>, <option>--password</option>, <option>--non-interactive</option>, <option>--config-dir</option>, and <option>--no-auth-cache</option>."
11706 msgstr "对于<command>svnsync</command>,我们首先需要在目标版本库上注册源版本库,我们通过<command>svnsync initialize</command>实现这一步。注意,<command>svnsync</command>子命令提供了许多类似<command>svn</command>认证相关的选项,包括:<option>--username</option>、<option>--password</option>、<option>--non-interactive</option>、<option>--config-dir</option>和<option>--no-auth-cache</option>。"
11708 #. (screen)
11709 #: ../source/book.xml:11512
11710 #, no-wrap
11711 msgid ""
11712 "\n"
11713 "$ svnsync help init\n"
11714 "initialize (init): usage: svnsync initialize DEST_URL SOURCE_URL\n"
11715 "\n"
11716 "Initialize a destination repository for synchronization from\n"
11717 "another repository.\n"
11718 "\n"
11719 "The destination URL must point to the root of a repository with\n"
11720 "no committed revisions.  The destination repository must allow\n"
11721 "revision property changes.\n"
11722 "\n"
11723 "You should not commit to, or make revision property changes in,\n"
11724 "the destination repository by any method other than 'svnsync'.\n"
11725 "In other words, the destination repository should be a read-only\n"
11726 "mirror of the source repository.\n"
11727 "\n"
11728 "Valid options:\n"
11729 "  --non-interactive        : do no interactive prompting\n"
11730 "  --no-auth-cache          : do not cache authentication tokens\n"
11731 "  --username arg           : specify a username ARG\n"
11732 "  --password arg           : specify a password ARG\n"
11733 "  --config-dir arg         : read user configuration files from directory ARG\n"
11734 "\n"
11735 "$ svnsync initialize http://svn.example.com/svn-mirror \\\n"
11736 "                     http://svn.collab.net/repos/svn \\\n"
11737 "                     --username syncuser --password syncpass\n"
11738 "Copied properties for revision 0.\n"
11739 "$\n"
11740 msgstr ""
11741 "\n"
11742 "$ svnsync help init\n"
11743 "initialize (init): usage: svnsync initialize DEST_URL SOURCE_URL\n"
11744 "\n"
11745 "Initialize a destination repository for synchronization from\n"
11746 "another repository.\n"
11747 "\n"
11748 "The destination URL must point to the root of a repository with\n"
11749 "no committed revisions.  The destination repository must allow\n"
11750 "revision property changes.\n"
11751 "\n"
11752 "You should not commit to, or make revision property changes in,\n"
11753 "the destination repository by any method other than 'svnsync'.\n"
11754 "In other words, the destination repository should be a read-only\n"
11755 "mirror of the source repository.\n"
11756 "\n"
11757 "Valid options:\n"
11758 "  --non-interactive        : do no interactive prompting\n"
11759 "  --no-auth-cache          : do not cache authentication tokens\n"
11760 "  --username arg           : specify a username ARG\n"
11761 "  --password arg           : specify a password ARG\n"
11762 "  --config-dir arg         : read user configuration files from directory ARG\n"
11763 "\n"
11764 "$ svnsync initialize http://svn.example.com/svn-mirror \\\n"
11765 "                     http://svn.collab.net/repos/svn \\\n"
11766 "                     --username syncuser --password syncpass\n"
11767 "Copied properties for revision 0.\n"
11768 "$\n"
11770 #. (para)
11771 #: ../source/book.xml:11541
11772 #, fuzzy
11773 msgid "Our target repository will now remember that it is a mirror of the public Subversion source code repository. Notice that we provided a username and password as arguments to <command>svnsync</command>—that was required by the pre-revprop-change hook on our mirror repository."
11774 msgstr "我们的目标版本库现在记住了它是Subversion公共源代码版本库的镜像,注意我们在<command>svnsync</command>提供了一个用户名和密码—这是我们的镜像版本库pre-revprop-change钩子的要求。"
11776 #. (para)
11777 #: ../source/book.xml:11547
11778 #, fuzzy
11779 msgid "The URLs provided to <command>svnsync</command> must point to the root directories of the target and source repositories, respectively. The tool does not handle mirroring of repository subtrees."
11780 msgstr "提供给<command>svnsync</command>的URL必须是指向目标和源版本库的根目录,这个工具不支持对版本库子树的处理。"
11782 #. (para)
11783 #: ../source/book.xml:11553
11784 #, fuzzy
11785 msgid "The initial release of <command>svnsync</command> (in Subversion 1.4) has a small shortcoming—the values given to the <option>--username</option> and <option>--password</option> command-line options get used for authentication against both the source and destination repositories. Obviously, there's no guarantee that the synchronizing user's credentials are the same in both places. In the event that they are not the same, users trying to run <command>svnsync</command> in non-interactive mode (with the <option>--non-interactive</option> option) might experience problems."
11786 msgstr "<command>svnsync</command>的最初版本(在Subversion 1.4)有一些缺陷—用来认证的<option>--username</option>和<option>--password</option>命令行参数同时作用于源和目标版本库。显然,我们无法保证同步的用户认证信息是相同的,如果不一样,用户使用非交互模式(<option>--non-interactive</option>选项)来运行<command>svnsync</command>时会遇到这个问题。"
11788 #. (para)
11789 #: ../source/book.xml:11569
11790 msgid "Be forewarned that while it will take only a few seconds for the average reader to parse this paragraph and the sample output which follows it, the actual time required to complete such a mirroring operation is, shall we say, quite a bit longer."
11791 msgstr "要预先警告一下,尽管对于普通读者只需要几秒钟就可以理解下面的输出,而对于整个镜像过程花费的时间可能会非常长。"
11793 #. (para)
11794 #: ../source/book.xml:11565
11795 #, fuzzy
11796 msgid "And now comes the fun part. With a single subcommand, we can tell <command>svnsync</command> to copy all the as-yet-unmirrored revisions from the source repository to the target. <placeholder-1/> The <command>svnsync synchronize</command> subcommand will peek into the special revision properties previously stored on the target repository, and determine what repository it is mirroring and that the most recently mirrored revision was revision 0. Then it will query the source repository and determine what the latest revision in that repository is. Finally, it asks the source repository's server to start replaying all the revisions between 0 and that latest revision. As <command>svnsync</command> get the resulting response from the source repository's server, it begins forwarding those revisions to the target repository's server as new commits."
11797 msgstr "现在有趣的部分开始了,通过一个单独的子命令,我们可以告诉<command>svnsync</command>将所有未镜像的修订版本从源版本库拷贝到目标版本库。<placeholder-1/><command>svnsync synchronize</command>子命令会查看目标版本库特定修订版本的属性,并且检测同步的版本库是哪一个,以及最新镜像的修订版本是0。然后它会查询源版本库,检测其最新的修订版本。最后,它会询问源版本库服务器来开始重演从修订版本0到最新修订版本。<command>svnsync</command>从源版本库服务器得到返回的结果,然后将其作为新的提交转发到目标版本库服务器。"
11799 #. (screen)
11800 #: ../source/book.xml:11586
11801 #, no-wrap
11802 msgid ""
11803 "\n"
11804 "$ svnsync help synchronize\n"
11805 "synchronize (sync): usage: svnsync synchronize DEST_URL\n"
11806 "\n"
11807 "Transfer all pending revisions from source to destination.\n"
11808 "…\n"
11809 "$ svnsync synchronize http://svn.example.com/svn-mirror \\\n"
11810 "                      --username syncuser --password syncpass\n"
11811 "Committed revision 1.\n"
11812 "Copied properties for revision 1.\n"
11813 "Committed revision 2.\n"
11814 "Copied properties for revision 2.\n"
11815 "Committed revision 3.\n"
11816 "Copied properties for revision 3.\n"
11817 "…\n"
11818 "Committed revision 23406.\n"
11819 "Copied properties for revision 23406.\n"
11820 "Committed revision 23407.\n"
11821 "Copied properties for revision 23407.\n"
11822 "Committed revision 23408.\n"
11823 "Copied properties for revision 23408.\n"
11824 msgstr ""
11825 "\n"
11826 "$ svnsync help synchronize\n"
11827 "synchronize (sync): usage: svnsync synchronize DEST_URL\n"
11828 "\n"
11829 "Transfer all pending revisions from source to destination.\n"
11830 "…\n"
11831 "$ svnsync synchronize http://svn.example.com/svn-mirror \\\n"
11832 "                      --username syncuser --password syncpass\n"
11833 "Committed revision 1.\n"
11834 "Copied properties for revision 1.\n"
11835 "Committed revision 2.\n"
11836 "Copied properties for revision 2.\n"
11837 "Committed revision 3.\n"
11838 "Copied properties for revision 3.\n"
11839 "…\n"
11840 "Committed revision 23406.\n"
11841 "Copied properties for revision 23406.\n"
11842 "Committed revision 23407.\n"
11843 "Copied properties for revision 23407.\n"
11844 "Committed revision 23408.\n"
11845 "Copied properties for revision 23408.\n"
11847 #. (para)
11848 #: ../source/book.xml:11608
11849 #, fuzzy
11850 msgid "Of particular interest here is that for each mirrored revision, there is first a commit of that revision to the target repository, and then property changes follow. This is because the initial commit is performed by (and attributed to) the user <literal>syncuser</literal>, and datestamped with the time as of that revision's creation. Also, Subversion's underlying repository access interfaces don't provide a mechanism for setting arbitrary revision properties as part of a commit. So <command>svnsync</command> follows up with an immediate series of property modifications which copy all the revision properties found for that revision in the source repository into the target repository. This also has the effect of fixing the author and datestamp of the revision to match that of the source repository."
11851 msgstr "镜像修订版本有一点特别有趣,首先是到目标版本库的修订版本提交,然后跟着属性修改。这是因为最初的提交是通过用户<literal>syncuser</literal>执行的,而时间戳是提交的时间,而且Subversion底层的版本库访问接口不允许在提交时任意修改修订版本属性,所以<command>svnsync</command>会立即使用属性修改,将源版本库发现的所有修订版本属性拷贝到目标版本库,这其中就包括了修改作者和时间戳使之与源版本库一致的效果。"
11853 #. (para)
11854 #: ../source/book.xml:11622
11855 #, fuzzy
11856 msgid "Also noteworthy is that <command>svnsync</command> performs careful bookkeeping that allows it to be safely interrupted and restarted without ruining the integrity of the mirrored data. If a network glitch occurs while mirroring a repository, simply repeat the <command>svnsync synchronize</command> command and it will happily pick up right where it left off. In fact, as new revisions appear in the source repository, this is exactly what you to do in order to keep your mirror up-to-date."
11857 msgstr "值得注意的是<command>svnsync</command>会小心簿记所有的操作,可以安全的中断并重新开始,而不必破坏镜像数据的完整性。如果在<command>svnsync synchronize</command>时出现网络故障,只需要重新运行<command>svnsync synchronize</command>,她会从中断处开始。实际上,随着新的修订版本在源版本库出现,这样就可以保证你的镜像不会过时。"
11859 #. (para)
11860 #: ../source/book.xml:11631
11861 #, fuzzy
11862 msgid "There is, however, one bit of inelegance in the process. Because Subversion revision properties can be changed at any time throughout the lifetime of the repository, and don't leave an audit trail that indicates when they were changed, replication processes have to pay special attention to them. If you've already mirrored the first 15 revisions of a repository and someone then changes a revision property on revision 12, <command>svnsync</command> won't know to go back and patch up its copy of revision 12. You'll need to tell it to do so manually by using (or with some additionally tooling around) the <command>svnsync copy-revprops</command> subcommand, which simply re-replicates all the revision properties for a particular revision."
11863 msgstr "然而,这个进程还有一点不雅的地方,因为Subversion属性修改可以发生在整个生命周期的任何时候,不会留下任何审计痕迹来说明所作的修改,扶植进程需要对此额外关注。如果你已经镜像了某个版本库的15个修订版本,而某个人修改了修订版本12的属性,你需要告诉它手工使用(或一些额外的工具)<command>svnsync copy-revprops</command>子命令,只是简单的重新复制某个特定修订版本的属性。"
11865 #. (screen)
11866 #: ../source/book.xml:11644
11867 #, no-wrap
11868 msgid ""
11869 "\n"
11870 "$ svnsync help copy-revprops\n"
11871 "copy-revprops: usage: svnsync copy-revprops DEST_URL REV\n"
11872 "\n"
11873 "Copy all revision properties for revision REV from source to\n"
11874 "destination.\n"
11875 "…\n"
11876 "$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \\\n"
11877 "                        --username syncuser --password syncpass\n"
11878 "Copied properties for revision 12.\n"
11879 "$\n"
11880 msgstr ""
11881 "\n"
11882 "$ svnsync help copy-revprops\n"
11883 "copy-revprops: usage: svnsync copy-revprops DEST_URL REV\n"
11884 "\n"
11885 "Copy all revision properties for revision REV from source to\n"
11886 "destination.\n"
11887 "…\n"
11888 "$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \\\n"
11889 "                        --username syncuser --password syncpass\n"
11890 "Copied properties for revision 12.\n"
11891 "$\n"
11893 #. (para)
11894 #: ../source/book.xml:11656
11895 msgid "That's repository replication in a nutshell. You'll likely want some automation around such a process. For example, while our example was a pull-and-push setup, you might wish to have your primary repository push changes to one or more blessed mirrors as part of its post-commit and post-revprop-change hook implementations. This would enable the mirror to be up-to-date in as near to realtime as is likely possible."
11896 msgstr "版本库复制只是一个壳,你一定会希望利用这个进程的自动化。例如,如果我们的例子是一个“拖和推”设置,你或许希望在post-commit和post-revprop-change钩子实现中从你的主版本库将修改推倒一个或多个镜像,这样就可以近乎实时的保持镜像的时效性。"
11898 #. (para)
11899 #: ../source/book.xml:11664
11900 #, fuzzy
11901 msgid "Also, while it isn't very commonplace to do so, <command>svnsync</command> does gracefully mirror repositories in which the user as whom it authenticates only has partial read access. It simply copies only the bits of the repository that it is permitted to see. Obviously such a mirror is not useful as a backup solution."
11902 msgstr "而且,这样做并不平凡,在人证用户只有部分读权限时<command>svnsync</command>也会优雅的镜像,它只会拷贝允许查看的版本库内容,显然这种镜像不适合备份方案。"
11904 #. (para)
11905 #: ../source/book.xml:11670
11906 msgid "As far as user interaction with repositories and mirrors goes, it <emphasis>is</emphasis> possible to have a single working copy that interacts with both, but you'll have to jump through some hoops to make it happen. First, you need to ensure that both the primary and mirror repositories have the same repository UUID (which is not the case by default). You can set the mirror repository's UUID by loading a dump file stub into it which contains the UUID of the primary repository, like so:"
11907 msgstr "只要用户与版本库和镜像的交互继续,是可以有一个工作拷贝直接与这两个版本库交互。但是你需要跳出几个圈子才能做到这样。第一,你需要保证主和镜像版本库有相同的UUID(通常缺省不是相同),你可以加载一个包含住版本库的UUID转储文件来设置镜像版本库的UUID。"
11909 #. (screen)
11910 #: ../source/book.xml:11679
11911 #, no-wrap
11912 msgid ""
11913 "\n"
11914 "$ cat - &lt;&lt;EOF | svnadmin load --force-uuid dest\n"
11915 "SVN-fs-dump-format-version: 2\n"
11916 "\n"
11917 "UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e\n"
11918 "EOF\n"
11919 "$\n"
11920 msgstr ""
11921 "\n"
11922 "$ cat - &lt;&lt;EOF | svnadmin load --force-uuid dest\n"
11923 "SVN-fs-dump-format-version: 2\n"
11924 "\n"
11925 "UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e\n"
11926 "EOF\n"
11927 "$\n"
11929 #. (para)
11930 #: ../source/book.xml:11687
11931 #, fuzzy
11932 msgid "Now that the two repositories have the same UUID, you can use <command>svn switch --relocate</command> to point your working copy to whichever of the repositories you wish to operate against, a process which is described in <xref linkend=\"svn.ref.svn.c.switch\"/>. There is a possible danger here, though, in that if the primary and mirror repositories aren't in close synchronization, a working copy up-to-date with, and pointing to, the primary repository will, if relocated to point to an out-of-date mirror, become confused about the apparent sudden loss of revisions it fully expects to be present, and throws errors to that effect. If this occurs, you can relocate your working copy back to the primary repository and then either wait until the mirror repository is up-to-date, or backdate your working copy to a revision you know is present in the sync repository and then retry the relocation."
11933 msgstr "现在两个版本库有了相同的UUID,你可以使用<command>svn switch --relocate</command>指向任何你希望操作的版本库,详细方法见<xref linkend=\"svn.ref.svn.c.switch\"/>。这里也可能有危险,尽管如果主和镜像版本库没有同步的关闭,一个工作拷贝对于主版本库没有过时,而重定位的镜像却是过时的,显然期望存在的修订版本缺失会造成困惑。"
11935 #. (para)
11936 #: ../source/book.xml:11702
11937 #, fuzzy
11938 msgid "Finally, be aware that the revision-based replication provided by <command>svnsync</command> is only that—replication of revisions. It does not include such things as the hook implementations, repository or server configuration data, uncommitted transactions, or information about user locks on repository paths. Only information carried by the Subversion repository dump file format is available for replication."
11939 msgstr "最后我们需要意识到,<command>svnsync</command>只支持修订版本为基础的复制,它没有包括诸如钩子实现,版本库或服务器配置数据,未提交事务或关于用户锁定版本库路径的信息,只有Subversion版本库转储文件格式在复制时包含这些信息。"
11941 #. (title)
11942 #: ../source/book.xml:11714
11943 msgid "Repository Backup"
11944 msgstr "版本库备份"
11946 #. (para)
11947 #: ../source/book.xml:11716
11948 msgid "Despite numerous advances in technology since the birth of the modern computer, one thing unfortunately rings true with crystalline clarity—sometimes, things go very, very awry. Power outages, network connectivity dropouts, corrupt RAM and crashed hard drives are but a taste of the evil that Fate is poised to unleash on even the most conscientious administrator. And so we arrive at a very important topic—how to make backup copies of your repository data."
11949 msgstr "尽管现代计算机的诞生带来了许多便利,但有一件事听起来是完全正确的—有时候,事情变的糟糕,很糟糕,动力损耗、网络中断、坏掉的内存和损坏的硬盘都是对魔鬼的一种体验,即使对于最尽职的管理员,命运也早已注定。所以我们来到了这个最重要的主题—怎样备份你的版本库数据。"
11951 #. (para)
11952 #: ../source/book.xml:11725
11953 #, fuzzy
11954 msgid "There are two types of backup methods available for Subversion repository administrators—full and incremental. A full backup of the repository involves squirreling away in one sweeping action all the information required to fully reconstruct that repository in the event of a catastrophe. Usually, it means, quite literally, the duplication of the entire repository directory (which includes either a Berkeley DB or FSFS environment). Incremental backups are lesser things, backups of only the portion of the repository data that has changed since the previous backup."
11955 msgstr "Subversion版本库管理有两种备份方法—完全和增量。一个完全的版本库备份包含了在重大灾难后重建版本库所需的所有信息,通常,这意味着对版本库目录(包括Berkeley DB或FSFS环境)的完全复制,增量备份的内容要少一些,只包含在上次备份后改变的部分。"
11957 #. (para)
11958 #: ../source/book.xml:11736
11959 #, fuzzy
11960 msgid "As far as full backups go, the naive approach might seem like a sane one, but unless you temporarily disable all other access to your repository, simply doing a recursive directory copy runs the risk of generating a faulty backup. In the case of Berkeley DB, the documentation describes a certain order in which database files can be copied that will guarantee a valid backup copy. A similar ordering exists for FSFS data. But you don't have to implement these algorithms yourself, because the Subversion development team has already done so. The <command>svnadmin hotcopy</command> command takes care of the minutia involved in making a hot backup of your repository. And its invocation is as trivial as Unix's <command>cp</command> or Windows' <command>copy</command> operations:"
11961 msgstr "随着完全备份的使用,这种幼稚的方法或许看起来有点不够健全,但是除非你临时关闭所有访问版本库的进程,否则这种递归的拷贝目录会有产生错误拷贝的风险。Berkeley DB的情况下,其文档中记述了按照什么顺序拷贝可以保证正确的备份拷贝,FSFS也有类似的顺序。但是你不必自己实现这种算法,因为Subversion的开发团队已经这样做了。<command>svnadmin hotcopy</command>关注了在热拷贝版本库时的所有细节,它的调用就像Unix的<command>cp</command>或Windows的<command>copy</command>一样琐碎:"
11963 #. (screen)
11964 #: ../source/book.xml:11750
11965 #, fuzzy, no-wrap
11966 msgid ""
11967 "\n"
11968 "$ svnadmin hotcopy /var/svn/repos /var/svn/repos-backup\n"
11969 msgstr ""
11970 "\n"
11971 "$ svnadmin hotcopy /path/to/repos /path/to/repos-backup\n"
11973 #. (para)
11974 #: ../source/book.xml:11753
11975 msgid "The resulting backup is a fully functional Subversion repository, able to be dropped in as a replacement for your live repository should something go horribly wrong."
11976 msgstr "作为结果的备份是一个完全功能的版本库,当发生严重错误时可以作为你的活动版本库的替换。"
11978 #. (para)
11979 #: ../source/book.xml:11756
11980 #, fuzzy
11981 msgid "When making copies of a Berkeley DB repository, you can even instruct <command>svnadmin hotcopy</command> to purge any unused Berkeley DB logfiles (see <xref linkend=\"svn.reposadmin.maint.diskspace.bdblogs\"/>) from the original repository upon completion of the copy. Simply provide the <option>--clean-logs</option> option on the command-line."
11982 msgstr "当进行Berkeley DB版本库的备份时,你可以指导<command>svnadmin hotcopy</command>清理源版本库中无用的Berkeley DB日志文件(见<xref linkend=\"svn.reposadmin.maint.diskspace.bdblogs\"/>),只需要简单的在命令行里提供<option>--clean-logs</option>。"
11984 #. (screen)
11985 #: ../source/book.xml:11762
11986 #, fuzzy, no-wrap
11987 msgid ""
11988 "\n"
11989 "$ svnadmin hotcopy --clean-logs /var/svn/bdb-repos /var/svn/bdb-repos-backup\n"
11990 msgstr ""
11991 "\n"
11992 "$ svnadmin hotcopy --clean-logs /path/to/bdb-repos /path/to/bdb-repos-backup\n"
11994 #. (para)
11995 #: ../source/book.xml:11765
11996 #, fuzzy
11997 msgid "Additional tooling around this command is available, too. The <filename>tools/backup/</filename> directory of the Subversion source distribution holds the <command>hot-backup.py</command> script. This script adds a bit of backup management atop <command>svnadmin hotcopy</command>, allowing you to keep only the most recent configured number of backups of each repository. It will automatically manage the names of the backed-up repository directories to avoid collisions with previous backups, and will <quote>rotate off</quote> older backups, deleting them so only the most recent ones remain. Even if you also have an incremental backup, you might want to run this program on a regular basis. For example, you might consider using <command>hot-backup.py</command> from a program scheduler (such as <command>cron</command> on Unix systems) which will cause it to run nightly (or at whatever granularity of Time you deem safe)."
11998 msgstr "还有一些附加的加工命令,Subversion源程序中的<filename>tools/backup/</filename>目录包含了<command>hot-backup.py</command>脚本,这个脚本在<command>hot-backup.py</command>之上增加了备份管理功能,你可以保存每个版本库最近的配置号码。为了防止与以前的备份冲突,它会自动管理备份版本库目录名字,<quote>循环</quote>利用备份名,删除掉旧的,保存新的。即使你也有一个增量的备份,你还是会希望有规律的运行这个程序。例如,你会在一个调度程序(例如Unix系统的<command>cron</command>)中调用<command>hot-backup.py</command>会导致它在半夜执行(或者是任何你认为安全的时间间隔)。"
12000 #. (para)
12001 #: ../source/book.xml:11782
12002 #, fuzzy
12003 msgid "Some administrators use a different backup mechanism built around generating and storing repository dump data. We described in <xref linkend=\"svn.reposadmin.maint.migrate\"/> how to use <command>svnadmin dump --incremental</command> to perform an incremental backup of a given revision or range of revisions. And of course, there is a full backup variation of this achieved by omitting the <option>--incremental</option> option to that command. There is some value in these methods, in that the format of your backed-up information is flexible—it's not tied to a particular platform, versioned filesystem type, or release of Subversion or Berkeley DB. But that flexibility comes at a cost, namely that restoring that data can take a long time—longer with each new revision committed to your repository. Also, as is the case with so many of the various backup methods, revision property changes made to already-backed-up revisions won't get picked up by a non-overlapping, incremental dump generation. For these reasons, we recommend against relying solely on dump-based backup approaches."
12004 msgstr "一些管理员使用不同的备份机制,通过生成和保存版本库转储数据。我们在<xref linkend=\"svn.reposadmin.maint.migrate\"/>中描述如何使用<command>svnadmin dump --incremental</command>来对一个修订版本或一个修订版本范围执行增量备份。当然,通过取消<option>--incremental</option>选项可以得到完整的备份。在备份信息中方法的值非常灵活—不会与特定平台,版本化的文件系统类型或Subversion和Berkeley DB的版本绑定。但是灵活带来了代价,数据恢复会占用更长的时间—比每个新版本提交更长。此外,在非完全的量转储生成时,对已经备份修订版本的修订版本属性的修改不会被采纳,因为这些原因,我们不建议你单独依赖转储为基础的备份方法。"
12006 #. (para)
12007 #: ../source/book.xml:11801
12008 msgid "As you can see, each of the various backup types and methods has its advantages and disadvantages. The easiest is by far the full hot backup, which will always result in a perfect working replica of your repository. Should something bad happen to your live repository, you can restore from the backup with a simple recursive directory copy. Unfortunately, if you are maintaining multiple backups of your repository, these full copies will each eat up just as much disk space as your live repository. Incremental backups, by contrast, tend to be quicker to generate and smaller to store. But the restoration process can be a pain, often involving applying multiple incremental backups. And other methods have their own peculiarities. Administrators need to find the balance between the cost of making the backup and the cost of restoring it."
12009 msgstr "如你所见,几种备份方式都有各自的优点,最简单的方式是完全热备份,将会每次建立版本库的完美复制品,这意味着如果当你的活动版本库发生了什么事情,你可以用备份恢复。但不幸的是,如果你维护多个备份,每个完全的备份会吞噬掉和你的活动版本库同样的空间。与之相对照的是增量备份,能够快速生成小的备份,但是恢复过程将会很痛苦,通常要包括多个增量拷贝的应用。其他方法都有自己的特点,管理员需要在创建拷贝和恢复的代价之间寻求平衡。"
12011 #. (para)
12012 #: ../source/book.xml:11816
12013 #, fuzzy
12014 msgid "The <command>svnsync</command> program (see <xref linkend=\"svn.reposadmin.maint.replication\"/>) actually provides a rather handy middle-ground approach. If you are regularly synchronizing a read-only mirror with your main repository, then in a pinch, your read-only mirror is probably a good candidate for replacing that main repository if it falls over. The primary disadvantage of this method is that only the versioned repository data gets synchronized—repository configuration files, user-specified repository path locks, and other items which might live in the physical repository directory but not <emphasis>inside</emphasis> the repository's virtual versioned filesystem are not handled by svnsync."
12015 msgstr "<command>svnsync</command>实际上提供了一种更易实施的妥协方法,如果你有规律的同步镜像版本库,则在必要时,镜像版本库就成了主版本库发生问题时的一个合适替代者。这个方法最大的缺点是只有版本化的数据得到了同步—版本库的配置信息,用户指定的路径锁定和其它以物理形式存在于版本库路径而不存在于版本库虚拟文件系统的项目不会被svnsync处理。"
12017 #. (para)
12018 #: ../source/book.xml:11834
12019 #, fuzzy
12020 msgid "<command>svnadmin setlog</command> can be called in a way that bypasses the hook interface altogether."
12021 msgstr "<command>svnadmin setlog</command>可以被绕过钩子程序被调用。"
12023 #. (para)
12024 #: ../source/book.xml:11828
12025 msgid "In any backup scenario, repository administrators need to be aware of how modifications to unversioned revision properties affect their backups. Since these changes do not themselves generate new revisions, they will not trigger post-commit hooks, and may not even trigger the pre-revprop-change and post-revprop-change hooks. <placeholder-1/> And since you can change revision properties without respect to chronological order—you can change any revision's properties at any time—an incremental backup of the latest few revisions might not catch a property modification to a revision that was included as part of a previous backup."
12026 msgstr "在每一种备份情境下,版本库管理员需要意识到对未版本化的修订版本属性的修改对备份的影响,因为这些修改本身不会产生新的修订版本,所以不会触发post-commit的钩子程序,也不会触发pre-revprop-change和post-revprop-change的钩子。 <placeholder-1/>而且因为你可以改变修订版本的属性,而不需要遵照时间顺序—你可在任何时刻修改任何修订版本的属性—因此最新版本的增量备份不会捕捉到以前特定修订版本的属性修改。"
12028 #. (para)
12029 #: ../source/book.xml:11842
12030 msgid "Generally speaking, only the truly paranoid would need to backup their entire repository, say, every time a commit occurred. However, assuming that a given repository has some other redundancy mechanism in place with relatively fine granularity (like per-commit emails or incremental dumps), a hot backup of the database might be something that a repository administrator would want to include as part of a system-wide nightly backup. It's your data—protect it as much as you'd like."
12031 msgstr "通常说来,在每次提交时,只有妄想狂才会备份整个版本库,然而,假设一个给定的版本库拥有一些恰当粒度的冗余机制(如每次提交的邮件)。版本库管理员也许会希望将版本库的热备份引入到系统级的每夜备份,对大多数版本库,归档的提交邮件为保存资源提供了足够的冗余措施,至少对于最近的提交。但是它是你的数据—你喜欢怎样保护都可以。"
12033 #. (para)
12034 #: ../source/book.xml:11865
12035 msgid "You know—the collective term for all of her <quote>fickle fingers</quote>."
12036 msgstr "你知道的—只是对各种变化莫测的问题的统称。"
12038 #. (para)
12039 #: ../source/book.xml:11851
12040 #, fuzzy
12041 msgid "Often, the best approach to repository backups is a diversified one which leverages combinations of the methods described here. The Subversion developers, for example, back up the Subversion source code repository nightly using <command>hot-backup.py</command> and an offsite <command>rsync</command> of those full backups; keep multiple archives of all the commit and property change notification emails; and have repository mirrors maintained by various volunteers using <command>svnsync</command>. Your solution might be similar, but should be catered to your needs and that delicate balance of convenience with paranoia. And whatever you do, validate your backups from time to time—what good is a spare tire that has a hole in it? While all of this might not save your hardware from the iron fist of Fate, <placeholder-1/> it should certainly help you recover from those trying times."
12042 msgstr "通常情况下,最好的版本库备份方式是混合的,你可以平衡完全和增量备份,另外配合提交邮件的归档。Subversion开发者,举个例子,使用<command>hot-backup.py</command>对Subversion版本库进行完全备份并使用<command>rsync</command>同步这些备份;同时保存所有的提交日至和修改通知邮件;并且使用许多志愿者维护的<command>svnsync</command>镜像版本库。你们的解决方案可能非常类似,但是要实现满足需要和便利性的平衡。无论你做了什么,你需要一次次的验证你的备份—就像要检查备用轮胎是否有个窟窿?当然,所有做的事情都无法回避我们的硬件来自钢铁的命运,<placeholder-1/>它将帮助你从艰难的时光恢复过来。"
12044 #. (para)
12045 #: ../source/book.xml:11878
12046 msgid "By now you should have a basic understanding of how to create, configure, and maintain Subversion repositories. We've introduced you to the various tools that will assist you with this task. Throughout the chapter, we've noted common administration pitfalls, and suggestions for avoiding them."
12047 msgstr "现在,你应该已经对如何创建、配置以及维护Subversion版本库有了个基本的认识。我们向您介绍了几个可以帮助您工作的工具。通过这一章,我们说明了一些常见的管理误区,并提出了避免陷入误区的建议。"
12049 #. (para)
12050 #: ../source/book.xml:11884
12051 msgid "All that remains is for you to decide what exciting data to store in your repository, and finally, how to make it available over a network. The next chapter is all about networking."
12052 msgstr "剩下的,就是由你决定在你的版本库中存放一些什么有趣的资料,并最终通过网络获得这些资料。下一章是关于网络的内容。"
12054 #. (title)
12055 #: ../source/book.xml:11896
12056 msgid "Server Configuration"
12057 msgstr "服务配置"
12059 #. (para)
12060 #: ../source/book.xml:11898
12061 #, fuzzy
12062 msgid "A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides using the <literal>file://</literal> method. But the typical Subversion setup involves a single server machine being accessed from clients on computers all over the office—or, perhaps, all over the world."
12063 msgstr "一个Subversion的版本库可以和客户端同时运行在同一个机器上,使用<literal>file:///</literal>访问,但是一个典型的Subversion设置应该包括一个单独的服务器,可以被办公室的所有客户端访问—或者有可能是整个世界。"
12065 #. (para)
12066 #: ../source/book.xml:11904
12067 msgid "This chapter describes how to get your Subversion repository exposed outside its host machine for use by remote clients. We will cover Subversion's currently available server mechanisms, discussing the configuration and use of each. After reading this section, you should be able to decide which networking setup is right for your needs, and understand how to enable such a setup on your host computer."
12068 msgstr "本小节描述了怎样将一个Subversion的版本库暴露给远程客户端,我们会覆盖Subversion已存在的服务器机制,讨论各种方式的配置和使用。经过阅读本小节,你可以决定你需要哪种网络设置,并且明白怎样在你的主机上进行配置。"
12070 #. (title)
12071 #: ../source/book.xml:11916
12072 msgid "Overview"
12073 msgstr "概述"
12075 #. (para)
12076 #: ../source/book.xml:11918
12077 msgid "Subversion was designed with an abstract network layer. This means that a repository can be programmatically accessed by any sort of server process, and the client <quote>repository access</quote> API allows programmers to write plugins that speak relevant network protocols. In theory, Subversion can use an infinite number of network implementations. In practice, there are only two servers at the time of this writing."
12078 msgstr "Subversion的设计包括一个抽象的网络层,这意味着版本库可以通过各种服务器进程访问,而且客户端<quote>版本库访问</quote>的API允许程序员写出相关协议的插件,理论上讲,Subversion可以使用无限数量的网络协议实现,目前实践中只有两种服务器。"
12080 #. (para)
12081 #: ../source/book.xml:11925
12082 #, fuzzy
12083 msgid "Apache is an extremely popular webserver; using the <command>mod_dav_svn</command> module, Apache can access a repository and make it available to clients via the WebDAV/DeltaV protocol, which is an extension of HTTP. Because Apache is an extremely extensible web server, it provides a number of features <quote>for free</quote>, such as encrypted SSL communication, logging, integration with a number of third-party authentication systems, and limited built-in web browsing of repositories."
12084 msgstr "Apache是最流行的web服务器,通过使用<command>mod_dav_svn</command>模块,Apache可以访问版本库,并且可以使客户端使用HTTP的扩展协议WebDAV/DeltaV进行访问,因为Apache是一个非常易于扩展的web服务器,它提供了许多<quote>易于获取的</quote>特性,例如加密的SSL通讯,日志和与第三方工具的集成,以及内置的版本库web浏览功能。"
12086 #. (para)
12087 #: ../source/book.xml:11934
12088 #, fuzzy
12089 msgid "In the other corner is <command>svnserve</command>: a small, lightweight server program that speaks a custom protocol with clients. Because its protocol is explicitly designed for Subversion and is stateful (unlike HTTP), it provides significantly faster network operations—but at the cost of some features as well. While it can use SASL to provide a variety of authentication and encryption options, it has no logging or built-in web-browsing. It is, however, extremely easy to set up and is often the best option for small teams just starting out with Subversion."
12090 msgstr "在另一个角落是<command>svnserve</command>:一个更小,轻型的服务器程序,同客户端使用自定义的协议。因为协议是为Subversion专门设计的,并且是有状态的(不像HTTP),它提供了更快的网络操作—但也有一些代价。它只理解CRAM-MD5的认证,然而它非常易于配置,是开始使用Subversion的小团队的最佳选择。"
12092 #. (para)
12093 #: ../source/book.xml:11944
12094 #, fuzzy
12095 msgid "A third option is to use <command>svnserve</command> tunneled over an SSH connection. Even though this scenario still uses <command>svnserve</command>, it differs quite a bit in features from a traditional <command>svnserve</command> deployment. SSH is used to encrypt all communication. SSH is also used exclusively to authenticate, so real system accounts are required on the server host (unlike vanilla <command>svnserve</command>, which has its own private user accounts.) Finally, because this setup requires that each user spawn a private, temporary <command>svnserve</command> process, it's equivalent (from a permissions point of view) to allowing a group of local users to all access the repository via <literal>file://</literal> URLs. Path-based access control has no meaning, since each user is accessing the repository database files directly."
12096 msgstr "第三个选择是使用SSH连接包裹的<command>svnserve</command>,尽管这个场景依然使用<command>svnserve</command>,它与传统的<command>svnserve</command>部署非常不同,SSH在多所有的通讯中使用加密方式,SSH也使用排他的认证,所以在服务器主机(<command>svnserve</command>与之不同,它包含了自己的私有用户帐号)上必须要有真实的系统帐户。最后,因为这些配置需要每个用户发起一个私有的临时<command>svnserve</command>进程,这与允许一组本地用户通过<literal>file://</literal>协议访问等同(从访问许可的视点)。因此路径为基础的访问控制变得没有意义,因为每个用户都可以直接访问版本库。"
12098 #. (para)
12099 #: ../source/book.xml:11959
12100 msgid "Here's a quick summary of the three typical server deployments."
12101 msgstr "下面是三种典型服务器部署的总结。"
12103 #. (title)
12104 #: ../source/book.xml:11963
12105 msgid "Comparison of Subversion Server Options"
12106 msgstr "Subversion 服务器选项比较"
12108 #. (entry)
12109 #: ../source/book.xml:11969
12110 msgid "Apache + mod_dav_svn"
12111 msgstr "Apache + mod_dav_svn"
12113 #. (entry)
12114 #: ../source/book.xml:11971
12115 msgid "svnserve over SSH"
12116 msgstr "svnserve over SSH"
12118 #. (entry)
12119 #: ../source/book.xml:11976
12120 msgid "Authentication options"
12121 msgstr "认证选项"
12123 #. (entry)
12124 #: ../source/book.xml:11977
12125 msgid "HTTP(S) basic auth, X.509 certificates, LDAP, NTLM, or any other mechanism available to Apache httpd"
12126 msgstr "HTTP(S) basic auth、X.509 certificates、LDAP、NTLM或任何Apache httpd已经具备的方式"
12128 #. (entry)
12129 #: ../source/book.xml:11979
12130 #, fuzzy
12131 msgid "CRAM-MD5 by default; LDAP, NTLM, or any other mechanism available to SASL"
12132 msgstr "HTTP(S) basic auth、X.509 certificates、LDAP、NTLM或任何Apache httpd已经具备的方式"
12134 #. (entry)
12135 #: ../source/book.xml:11981
12136 msgid "SSH"
12137 msgstr "SSH"
12139 #. (entry)
12140 #: ../source/book.xml:11984
12141 msgid "User account options"
12142 msgstr "用户帐号选项"
12144 #. (entry)
12145 #: ../source/book.xml:11985
12146 msgid "private 'users' file, or other mechanisms available to Apache httpd (LDAP, SQL, etc.)"
12147 msgstr ""
12149 #. (entry)
12150 #: ../source/book.xml:11987
12151 msgid "private 'users' file, or other mechanisms available to SASL (LDAP, SQL, etc.)"
12152 msgstr ""
12154 #. (entry)
12155 #: ../source/book.xml:11989
12156 msgid "system accounts"
12157 msgstr "系统帐号"
12159 #. (entry)
12160 #: ../source/book.xml:11992
12161 msgid "Authorization options"
12162 msgstr "授权选项"
12164 #. (entry)
12165 #: ../source/book.xml:11993 ../source/book.xml:11995
12166 msgid "read/write access can be granted over whole repository, or specified per-path."
12167 msgstr "可以授予整个版本库的读/写权限,也可以指定目录的。"
12169 #. (entry)
12170 #: ../source/book.xml:11997
12171 msgid "read/write access only grantable over whole repository"
12172 msgstr "只能对版本库整体赋予读/写权限"
12174 #. (entry)
12175 #: ../source/book.xml:12001
12176 msgid "Encryption"
12177 msgstr "加密"
12179 #. (entry)
12180 #: ../source/book.xml:12002
12181 msgid "via optional SSL"
12182 msgstr "通过可选的 SSL"
12184 #. (entry)
12185 #: ../source/book.xml:12003
12186 #, fuzzy
12187 msgid "via optional SASL features"
12188 msgstr "通过可选的 SSL"
12190 #. (entry)
12191 #: ../source/book.xml:12004
12192 msgid "SSH tunneled"
12193 msgstr "SSH通道的"
12195 #. (entry)
12196 #: ../source/book.xml:12007
12197 msgid "Logging"
12198 msgstr "Logging"
12200 #. (quote)
12201 #: ../source/book.xml:12009
12202 msgid "high-level"
12203 msgstr "高级"
12205 #. (entry)
12206 #: ../source/book.xml:12008
12207 msgid "full Apache logs of each HTTP request, with optional <placeholder-1/> logging of general client operations"
12208 msgstr "对每个HTTP请求记录完全的Apache日志,通过选项<placeholder-1/>记录普通的客户端操作。"
12210 #. (entry)
12211 #: ../source/book.xml:12011 ../source/book.xml:12012
12212 msgid "no logging"
12213 msgstr "no logging"
12215 #. (entry)
12216 #: ../source/book.xml:12015
12217 msgid "Interoperability"
12218 msgstr "交互性"
12220 #. (entry)
12221 #: ../source/book.xml:12016
12222 msgid "partially usable by other WebDAV clients"
12223 msgstr "可以部分的被其他WebDAV客户端使用"
12225 #. (entry)
12226 #: ../source/book.xml:12017 ../source/book.xml:12018
12227 msgid "only talks to svn clients"
12228 msgstr "只同svn客户端通讯"
12230 #. (entry)
12231 #: ../source/book.xml:12021
12232 msgid "Web viewing"
12233 msgstr "Web浏览能力"
12235 #. (entry)
12236 #: ../source/book.xml:12022
12237 msgid "limited built-in support, or via 3rd-party tools such as ViewVC"
12238 msgstr "有限的内置支持,或者通过第三方工具,如ViewVC"
12240 #. (entry)
12241 #: ../source/book.xml:12024 ../source/book.xml:12025
12242 msgid "only via 3rd-party tools such as ViewVC"
12243 msgstr "只有通过第三方工具,如 ViewVC"
12245 #. (entry)
12246 #: ../source/book.xml:12028
12247 msgid "Speed"
12248 msgstr "速度"
12250 #. (entry)
12251 #: ../source/book.xml:12029
12252 msgid "somewhat slower"
12253 msgstr "有些慢"
12255 #. (entry)
12256 #: ../source/book.xml:12030 ../source/book.xml:12031
12257 msgid "somewhat faster"
12258 msgstr "快一点"
12260 #. (entry), (title)
12261 #: ../source/book.xml:12034 ../source/book.xml:13044
12262 msgid "Initial setup"
12263 msgstr "初始设置"
12265 #. (entry)
12266 #: ../source/book.xml:12035
12267 msgid "somewhat complex"
12268 msgstr "有些复杂"
12270 #. (entry)
12271 #: ../source/book.xml:12036
12272 msgid "extremely simple"
12273 msgstr "极为简单"
12275 #. (entry)
12276 #: ../source/book.xml:12037
12277 msgid "moderately simple"
12278 msgstr "相当简单"
12280 #. (title)
12281 #: ../source/book.xml:12045
12282 msgid "Choosing a Server Configuration"
12283 msgstr "选择一个服务器配置"
12285 #. (para)
12286 #: ../source/book.xml:12047
12287 msgid "So, which server should you use? Which is best?"
12288 msgstr "那你应该用什么服务器?什么最好?"
12290 #. (para)
12291 #: ../source/book.xml:12048
12292 msgid "Obviously, there's no right answer to that question. Every team has different needs, and the different servers all represent different sets of tradeoffs. The Subversion project itself doesn't endorse one server or another, or consider either server more <quote>official</quote> than another."
12293 msgstr "显然,对这个问题没有正确的答案,每个团队都有不同的需要,不同的服务器都有各自的代价。Subversion项目没有更加认可哪种服务,或认为哪个服务更加<quote>正式</quote>一点。"
12295 #. (para)
12296 #: ../source/book.xml:12053
12297 msgid "Here are some reasons why you might choose one deployment over another, as well as reasons you might <emphasis>not</emphasis> choose one."
12298 msgstr "下面是你选择或者不选择某一个部署方式的原因。"
12300 #. (title)
12301 #: ../source/book.xml:12058
12302 #, fuzzy
12303 msgid "The <command>svnserve</command> Server"
12304 msgstr "<command>svnserve</command> 服务器"
12306 #. (term)
12307 #: ../source/book.xml:12062 ../source/book.xml:12115 ../source/book.xml:12164
12308 msgid "Why you might want to use it:"
12309 msgstr "为什么你会希望使用它:"
12311 #. (para)
12312 #: ../source/book.xml:12066
12313 msgid "Quick and easy to set up."
12314 msgstr "设置快速简单。"
12316 #. (para)
12317 #: ../source/book.xml:12070 ../source/book.xml:12119
12318 msgid "Network protocol is stateful and noticeably faster than WebDAV."
12319 msgstr "网络协议是有状态的,比WebDAV快很多。"
12321 #. (para)
12322 #: ../source/book.xml:12074 ../source/book.xml:12173
12323 msgid "No need to create system accounts on server."
12324 msgstr "不需要在服务器创建系统帐号。"
12326 #. (para)
12327 #: ../source/book.xml:12078
12328 msgid "Password is not passed over the network."
12329 msgstr "不会在网络传输密码。"
12331 #. (term)
12332 #: ../source/book.xml:12085 ../source/book.xml:12134 ../source/book.xml:12200
12333 msgid "Why you might want to avoid it:"
12334 msgstr "为什么你会希望避免它:"
12336 #. (para)
12337 #: ../source/book.xml:12089
12338 msgid "By default, only one authentication method is available, the network protocol is not encrypted, and the server stores cleartext passwords. (All these things can be changed by configuring SASL, but it's a bit more work to do.)"
12339 msgstr ""
12341 #. (para)
12342 #: ../source/book.xml:12096 ../source/book.xml:12142
12343 msgid "No logging of any kind, not even errors."
12344 msgstr "没有任何类型的日志,甚至是错误。"
12346 #. (para)
12347 #: ../source/book.xml:12100
12348 msgid "No built-in web browsing. (You'd have to install a separate web server and some CGI software to add this.)"
12349 msgstr ""
12351 #. (title)
12352 #: ../source/book.xml:12111
12353 #, fuzzy
12354 msgid "<command>svnserve</command> over SSH"
12355 msgstr "<command>svnserve</command> 使用 SSH 隧道"
12357 #. (para)
12358 #: ../source/book.xml:12123
12359 msgid "You can take advantage of existing ssh accounts and user infrastructure."
12360 msgstr "你可以利用现有的ssh帐号和用户基础。"
12362 #. (para)
12363 #: ../source/book.xml:12127
12364 msgid "All network traffic is encrypted."
12365 msgstr "所有网络传输是加密的。"
12367 #. (para)
12368 #: ../source/book.xml:12138
12369 msgid "Only one choice of authentication method."
12370 msgstr "只有一个认证方法选择。"
12372 #. (para)
12373 #: ../source/book.xml:12146
12374 msgid "Requires users to be in same system group, or use a shared ssh key."
12375 msgstr "需要用户在同一个系统组,使用共享ssh密钥。"
12377 #. (para)
12378 #: ../source/book.xml:12150
12379 #, fuzzy
12380 msgid "If used improperly, can lead to file permissions problems."
12381 msgstr "会导致文件许可问题。"
12383 #. (title)
12384 #: ../source/book.xml:12160
12385 msgid "The Apache HTTP Server"
12386 msgstr "Apache 的 HTTP 服务器"
12388 #. (para)
12389 #: ../source/book.xml:12168
12390 msgid "Allows Subversion to use any of the numerous authentication systems already integrated with Apache."
12391 msgstr "允许Subversion使用大量已经集成到Apache的用户认证系统。"
12393 #. (para)
12394 #: ../source/book.xml:12177
12395 msgid "Full Apache logging."
12396 msgstr "完全的Apache日志。"
12398 #. (para)
12399 #: ../source/book.xml:12180
12400 msgid "Network traffic can be encrypted via SSL."
12401 msgstr "网络传输可以通过SSL加密。"
12403 #. (para)
12404 #: ../source/book.xml:12184
12405 msgid "HTTP(S) can usually go through corporate firewalls."
12406 msgstr "HTTP(S) 通常可以穿越公司防火墙。"
12408 #. (para)
12409 #: ../source/book.xml:12188
12410 msgid "Built-in repository browsing via web browser."
12411 msgstr "通过web浏览器访问内置的版本库浏览。"
12413 #. (para)
12414 #: ../source/book.xml:12192
12415 msgid "Repository can be mounted as a network drive for transparent version control. (See <xref linkend=\"svn.webdav.autoversioning\"/>.)"
12416 msgstr "版本库可以作为网络驱动器加载,实现透明的版本控制,见<xref linkend=\"svn.webdav.autoversioning\"/>。"
12418 #. (para)
12419 #: ../source/book.xml:12204
12420 msgid "Noticeably slower than svnserve, because HTTP is a stateless protocol and requires more turnarounds."
12421 msgstr "比svnserve慢很多,因为HTTP是无状态的协议,需要更多的传递。"
12423 #. (para)
12424 #: ../source/book.xml:12209
12425 msgid "Initial setup can be complex."
12426 msgstr "初始设置可能复杂"
12428 #. (title)
12429 #: ../source/book.xml:12218
12430 msgid "Recommendations"
12431 msgstr "推荐"
12433 #. (para)
12434 #: ../source/book.xml:12220
12435 #, fuzzy
12436 msgid "In general, the authors of this book recommend a vanilla <command>svnserve</command> installation for small teams just trying to get started with a Subversion server; it's the simplest to set up, and has the fewest maintenance issues. You can always switch to a more complex server deployment as your needs change."
12437 msgstr "通常,本书的作者推荐希望尝试开始使用Subversion的小团队使用<command>svnserve</command>;这是设置最简单,维护最少的方法,而当你的需求改变时,你可以转换到复杂的部署方式。"
12439 #. (para)
12440 #: ../source/book.xml:12226
12441 msgid "Here are some general recommendations and tips, based on years of supporting users:"
12442 msgstr "下面是一些常见的建议和小技巧,基于多年对用户的支持:"
12444 #. (para)
12445 #: ../source/book.xml:12230
12446 #, fuzzy
12447 msgid "If you're trying to set up the simplest possible server for your group, then a vanilla <command>svnserve</command> installation is the easiest, fastest route. Note, however, that your repository data will be transmitted in the clear over the network. If your deployment is entirely within your company's LAN or VPN, this isn't an issue. If the repository is exposed to the wide-open internet, then you might want to make sure that either the repository's contents aren't sensitive (e.g. it contains only open-source code), or that you go the extra mile in configuring SASL to encrypt network communications."
12448 msgstr "如果你尝试为你的团队建立最简单的服务器,安装<command>svnserve</command>是最简单的,最快速的方法。注意,无论如何,如果你的整个部署都是在局域网或者VPN中,版本库数据可以在网络上没有限制的传递。如果版本库部署在internet,你会希望确定版本库的内容不是敏感的(例如只包含开源代码。)。"
12450 #. (para)
12451 #: ../source/book.xml:12244
12452 #, fuzzy
12453 msgid "If you need to integrate with existing legacy identity systems (LDAP, Active Directory, NTLM, X.509, etc.), then you must use either the Apache-based server or <command>svnserve</command> configured with SASL. If you absolutely need server-side logs of either server errors or client activities, then an Apache-based server is your only option."
12454 msgstr "如果你希望与现有的认证系统(LDAP、Active Directory、NTLM、X.509等)集成,你你只能选择Apache服务器,同样的,如果你绝对需要服务器端的日志(服务日志或客户端活动),也需要Apache服务器。"
12456 #. (para)
12457 #: ../source/book.xml:12253
12458 #, fuzzy
12459 msgid "If you've decided to use either Apache or stock <command>svnserve</command>, create a single <literal>svn</literal> user on your system and run the server process as that user. Be sure to make the repository directory wholly owned by the <literal>svn</literal> user as well. From a security point of view, this keeps the repository data nicely siloed and protected by operating system filesystem permissions, changeable by only the Subversion server process itself."
12460 msgstr "如果你已经决定使用Apache或<command>svnserve</command>,应该单独创建一个运行服务器进程的<literal>svn</literal>用户,也需要确定版本库目录属于<literal>svn</literal>用户。从安全的角度,这样很好的利用了操作系统的文件系统许可保护了版本库数据,只有Subversion服务进程可以修改其内容。"
12462 #. (para)
12463 #: ../source/book.xml:12265
12464 #, fuzzy
12465 msgid "If you have an existing infrastructure heavily based on SSH accounts, and if your users already have system accounts on your server machine, then it makes sense to deploy an svnserve-over-ssh solution. Otherwise, we don't widely recommend this option to the public. It's generally considered safer to have your users access the repository via (imaginary) accounts managed by <command>svnserve</command> or Apache, rather than by full-blown system accounts. If your deep desire for encrypted communication still draws you to this option, we recommend using Apache with SSL or <command>svnserve</command> with SASL encryption instead."
12466 msgstr "如果你有一个严重依赖于SSH帐号的基础,而且你的用户已经在服务器上有了帐号,那建立一个通过ssh的svnserve方案就非常有意义,否则,我们不会建议这种方案。通常还是通过<command>svnserve</command>或Apache管理的用户访问版本库比较安全,而不是使用完全的系统帐户。如果你很希望加密的通讯,那可能还是需要选择这个方案,但我们更加推荐SSL的Apache方案。"
12468 #. (para)
12469 #: ../source/book.xml:12280
12470 #, fuzzy
12471 msgid "Do <emphasis>not</emphasis> be seduced by the simple idea of having all of your users access a repository directly via <literal>file://</literal> URLs. Even if the repository is readily available to everyone via network share, this is a bad idea. It removes any layers of protection between the users and the repository: users can accidentally (or intentionally) corrupt the repository database, it becomes hard to take the repository offline for inspection or upgrade, and it can lead to a mess of file-permissions problems (see <xref linkend=\"svn.serverconfig.multimethod\"/>.) Note that this is also one of the reasons we warn against accessing repositories via <literal>svn+ssh://</literal> URLs—from a security standpoint, it's effectively the same as local users accessing via <literal>file://</literal>, and can entail all the same problems if the administrator isn't careful."
12472 msgstr "不要被简单的让所有用户使用<literal>file://</literal>的URL访问版本库的方案诱惑,即使,版本库版本库已经对网络共享的所有用户可见,这也不是一个好方案。这样删除了用户和版本库之间的所有保护层:用户可能会偶然(或有意的)毁坏版本库数据库,这样也很难在检查或升级时将版本库脱机,而且这样会造成曾混乱的文件许可问题(见<xref linkend=\"svn.serverconfig.multimethod\"/>。),注意那就是我们警告使用<literal>svn+ssh://</literal>的原因—从安全角度讲,这样与作为本地用户访问<literal>file://</literal>是一样的,如果管理员不小心,会造成同样的问题。"
12474 #. (title)
12475 #: ../source/book.xml:12306
12476 msgid "svnserve, a custom server"
12477 msgstr "svnserve,一个定制的服务器"
12479 #. (para)
12480 #: ../source/book.xml:12308
12481 #, fuzzy
12482 msgid "The <command>svnserve</command> program is a lightweight server, capable of speaking to clients over TCP/IP using a custom, stateful protocol. Clients contact an <command>svnserve</command> server by using URLs that begin with the <literal>svn://</literal> or <literal>svn+ssh://</literal> scheme. This section will explain the different ways of running <command>svnserve</command>, how clients authenticate themselves to the server, and how to configure appropriate access control to your repositories."
12483 msgstr "<command>svnserve</command>是一个轻型的服务器,可以同客户端通过在TCP/IP基础上的自定义有状态协议通讯,客户端通过使用开头为<literal>svn://</literal>或者<literal>svn+ssh://</literal><command>svnserve</command>的URL来访问一个<command>svnserve</command>服务器。这一小节将会解释运行<command>svnserve</command>的不同方式,客户端怎样实现服务器的认证,怎样配置版本库恰当的访问控制。"
12485 #. (title)
12486 #: ../source/book.xml:12320
12487 msgid "Invoking the Server"
12488 msgstr "调用服务器"
12490 #. (para)
12491 #: ../source/book.xml:12322
12492 #, fuzzy
12493 msgid "There are a few different ways to run the <command>svnserve</command> program:"
12494 msgstr "有许多不同方法运行<command>svnserve</command>:"
12496 #. (para)
12497 #: ../source/book.xml:12326
12498 #, fuzzy
12499 msgid "Run <command>svnserve</command> as a standalone daemon, listening for requests."
12500 msgstr "作为一个独立守护进程启动<command>svnserve</command>,监听请求。"
12502 #. (para)
12503 #: ../source/book.xml:12331
12504 #, fuzzy
12505 msgid "Have the Unix <command>inetd</command> daemon temporarily spawn <command>svnserve</command> whenever a request comes in on a certain port."
12506 msgstr "当特定端口收到一个请求,就会使UNIX的<command>inetd</command>守护进程临时调用<command>svnserve</command>处理。"
12508 #. (para)
12509 #: ../source/book.xml:12336
12510 #, fuzzy
12511 msgid "Have SSH invoke a temporary <command>svnserve</command> over an encrypted tunnel."
12512 msgstr "使用SSH在加密通道发起临时<command>svnserve</command>服务。"
12514 #. (para)
12515 #: ../source/book.xml:12341
12516 #, fuzzy
12517 msgid "Run <command>svnserve</command> as a Microsoft Windows service."
12518 msgstr "以Windows service服务方式运行<command>svnserve</command>。"
12520 #. (title)
12521 #: ../source/book.xml:12348
12522 #, fuzzy
12523 msgid "<command>svnserve</command> as Daemon"
12524 msgstr "<command>svnserve</command> 作为后台程序"
12526 #. (para)
12527 #: ../source/book.xml:12350
12528 #, fuzzy
12529 msgid "The easiest option is to run <command>svnserve</command> as a standalone <quote>daemon</quote> process. Use the <option>-d</option> option for this:"
12530 msgstr "执行<command>svnserve</command>最简单的选项是作为独立<quote>守护</quote>进程,使用<option>-d</option>选项:"
12532 #. (screen)
12533 #: ../source/book.xml:12353
12534 #, no-wrap
12535 msgid ""
12536 "\n"
12537 "$ svnserve -d\n"
12538 "$               # svnserve is now running, listening on port 3690\n"
12539 msgstr ""
12540 "\n"
12541 "$ svnserve -d\n"
12542 "$               # svnserve is now running, listening on port 3690\n"
12544 #. (para)
12545 #: ../source/book.xml:12357
12546 #, fuzzy
12547 msgid "When running <command>svnserve</command> in daemon mode, you can use the <option>--listen-port=</option> and <option>--listen-host=</option> options to customize the exact port and hostname to <quote>bind</quote> to."
12548 msgstr "当以守护模式运行<command>svnserve</command>时,你可以使用<option>--listen-port=</option>和<option>--listen-host=</option>选项来自定义<quote>绑定</quote>的端口和主机名。"
12550 #. (para)
12551 #: ../source/book.xml:12361
12552 #, fuzzy
12553 msgid "Once we successfully start <command>svnserve</command> as above, it makes every repository on your system available to the network. A client needs to specify an <emphasis>absolute</emphasis> path in the repository URL. For example, if a repository is located at <filename>/var/svn/project1</filename>, then a client would reach it via <uri>svn://host.example.com/var/svn/project1</uri>. To increase security, you can pass the <option>-r</option> option to <command>svnserve</command>, which restricts it to exporting only repositories below that path. For example:"
12554 msgstr "一旦<command>svnserve</command>已经运行,它会将你系统中所有版本库发布到网络,一个客户端需要指定版本库在URL中的<emphasis>绝对</emphasis>路径,举个例子,如果一个版本库是位于<filename>/usr/local/repositories/project1</filename>,则一个客户端可以使用<systemitem class=\"url\" moreinfo=\"none\">svn://host.example.com/usr/local/repositories/project1 </systemitem>来进行访问,为了提高安全性,你可以使用<command>svnserve</command>的<option>-r</option>选项,这样会限制只输出指定路径下的版本库,例如:"
12556 #. (screen)
12557 #: ../source/book.xml:12373
12558 #, fuzzy, no-wrap
12559 msgid ""
12560 "\n"
12561 "$ svnserve -d -r /var/svn\n"
12562 "…\n"
12563 msgstr ""
12564 "\n"
12565 "$ svnserve -d -r /usr/local/repositories\n"
12566 "…\n"
12568 #. (para)
12569 #: ../source/book.xml:12377
12570 msgid "Using the <option>-r</option> option effectively modifies the location that the program treats as the root of the remote filesystem space. Clients then use URLs that have that path portion removed from them, leaving much shorter (and much less revealing) URLs:"
12571 msgstr "使用<option>-r</option>可以有效地改变文件系统的根位置,客户端可以使用去掉前半部分的路径,留下的要短一些的(更加有提示性)URL:"
12573 #. (screen)
12574 #: ../source/book.xml:12382
12575 #, no-wrap
12576 msgid ""
12577 "\n"
12578 "$ svn checkout svn://host.example.com/project1\n"
12579 "…\n"
12580 msgstr ""
12581 "\n"
12582 "$ svn checkout svn://host.example.com/project1\n"
12583 "…\n"
12585 #. (title)
12586 #: ../source/book.xml:12390
12587 #, fuzzy
12588 msgid "<command>svnserve</command> via <command>inetd</command>"
12589 msgstr "使用 <command>svnserve</command> 通过 <command>inetd</command>"
12591 #. (para)
12592 #: ../source/book.xml:12392
12593 msgid "If you want <command>inetd</command> to launch the process, then you need to pass the <option>-i</option> (<option>--inetd</option>) option. In the example, we've shown the output from running <literal>svnserve -i</literal> at the command line, but note that isn't how you actually start the daemon; see the paragraphs following the example for how to configure <command>inetd</command> to start <command>svnserve</command>."
12594 msgstr "如果你希望<command>inetd</command>启动进程,你需要使用<option>-i</option>(<option>--inetd</option>)选项,在这个例子里,我们显示了在命令行中运行<literal>svnserve -i</literal>的输出,但是请注意这不是如何实际启动daemon; 请继续阅读例子后的文章,学习如何配置<command>inetd</command>启动<command>svnserve</command>。"
12596 #. (screen)
12597 #: ../source/book.xml:12400
12598 #, no-wrap
12599 msgid ""
12600 "\n"
12601 "$ svnserve -i\n"
12602 "( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )\n"
12603 msgstr ""
12604 "\n"
12605 "$ svnserve -i\n"
12606 "( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )\n"
12608 #. (para)
12609 #: ../source/book.xml:12404
12610 #, fuzzy
12611 msgid "When invoked with the <option>--inetd</option> option, <command>svnserve</command> attempts to speak with a Subversion client via <emphasis>stdin</emphasis> and <emphasis>stdout</emphasis> using a custom protocol. This is the standard behavior for a program being run via <command>inetd</command>. The IANA has reserved port 3690 for the Subversion protocol, so on a Unix-like system you can add lines to <filename>/etc/services</filename> like these (if they don't already exist):"
12612 msgstr "当用参数<option>--inetd</option>调用时,<command>svnserve</command>会尝试使用自定义协议通过<emphasis>stdin</emphasis>和<emphasis>stdout</emphasis>来与Subversion客户端通话,这是使用<command>inetd</command>工作的标准方式,IANA为Subversion协议保留3690端口,所以在类Unix系统你可以在<filename>/etc/services</filename>添加如下的几行(如果他们还不存在):"
12614 #. (screen)
12615 #: ../source/book.xml:12413
12616 #, no-wrap
12617 msgid ""
12618 "\n"
12619 "svn           3690/tcp   # Subversion\n"
12620 "svn           3690/udp   # Subversion\n"
12621 msgstr ""
12622 "\n"
12623 "svn           3690/tcp   # Subversion\n"
12624 "svn           3690/udp   # Subversion\n"
12626 #. (para)
12627 #: ../source/book.xml:12417
12628 #, fuzzy
12629 msgid "And if your system is using a classic Unix-like <command>inetd</command> daemon, you can add this line to <filename>/etc/inetd.conf</filename>:"
12630 msgstr "如果系统是使用经典的类Unix的<command>inetd</command>守护进程,你可以在<filename>/etc/inetd.conf</filename>添加这几行:"
12632 #. (screen)
12633 #: ../source/book.xml:12420
12634 #, no-wrap
12635 msgid ""
12636 "\n"
12637 "svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i\n"
12638 msgstr ""
12639 "\n"
12640 "svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i\n"
12642 #. (para)
12643 #: ../source/book.xml:12423
12644 #, fuzzy
12645 msgid "Make sure <quote>svnowner</quote> is a user which has appropriate permissions to access your repositories. Now, when a client connection comes into your server on port 3690, <command>inetd</command> will spawn an <command>svnserve</command> process to service it. Of course, you may also want to add <option>-r</option> to the configuration line as well, to restrict which repositories are exported."
12646 msgstr "确定<quote>svnowner</quote>用户拥有访问版本库的适当权限,现在如果一个客户连接来到你的服务器的端口3690,<command>inetd</command>会产生一个<command>svnserve</command>进程来做服务。当然,你也可以添加<option>-r</option>到命令行,限制暴露出的版本库。"
12648 #. (title)
12649 #: ../source/book.xml:12435
12650 #, fuzzy
12651 msgid "<command>svnserve</command> over a Tunnel"
12652 msgstr "通过隧道 <command>svnserve</command>"
12654 #. (para)
12655 #: ../source/book.xml:12437
12656 #, fuzzy
12657 msgid "A third way to invoke <command>svnserve</command> is in <quote>tunnel mode</quote>, with the <option>-t</option> option. This mode assumes that a remote-service program such as <command>RSH</command> or <command>SSH</command> has successfully authenticated a user and is now invoking a private <command>svnserve</command> process <emphasis>as that user</emphasis>. (Note that you, the user, will rarely, if ever, have reason to invoke <command>svnserve</command> with the <option>-t</option> at the command line; instead, the <command>SSH</command> daemon does so for you.) The <command>svnserve</command> program behaves normally (communicating via <emphasis>stdin</emphasis> and <emphasis>stdout</emphasis>), and assumes that the traffic is being automatically redirected over some sort of tunnel back to the client. When <command>svnserve</command> is invoked by a tunnel agent like this, be sure that the authenticated user has full read and write access to the repository database files. It's essentially the same as a local user accessing the repository via <literal>file://</literal> URLs."
12658 msgstr "也一直有第三种方式,使用<option>-t</option>选项的<quote>管道模式</quote>,这个模式假定一个分布式服务程序如<command>RSH</command>或<command>SSH</command>已经验证了一个用户,并且<emphasis>以这个用户</emphasis>调用了一个私有<command>svnserve</command>进程,<command>svnserve</command>运作如常(通过<emphasis>stdin</emphasis>和<emphasis>stdout</emphasis>通讯),并且可以设想通讯是自动转向到一种通道传递回客户端,当<command>svnserve</command>被这样的通道代理调用,确定认证用户对版本数据库有完全的读写权限,这与本地用户通过<literal>file:///</literal>URl访问版本库同样重要。"
12660 #. (para)
12661 #: ../source/book.xml:12457
12662 msgid "This option is described in much more detail in <xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>."
12663 msgstr "这个选项将在<xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>详细讨论。"
12665 #. (title)
12666 #: ../source/book.xml:12463
12667 #, fuzzy
12668 msgid "<command>svnserve</command> as Windows Service"
12669 msgstr "<command>svnserve</command> 作为 Windows 服务"
12671 #. (para)
12672 #: ../source/book.xml:12465
12673 #, fuzzy
12674 msgid "If your Windows system is a descendant of Windows NT (2000, 2003, XP, Vista), then you can run <command>svnserve</command> as a standard Windows service. This is typically a much nicer experience than running it as a standalone daemon with the <option>--daemon (-d)</option> option. Using daemon-mode requires launching a console, typing a command, and then leaving the console window running indefinitely. A Windows service, however, runs in the background, can start at boot time automatically, and can be started and stopped using the same consistent administration interface as other Windows services."
12675 msgstr "如果你的Windows系统是Windows NT (2000, 2003, XP, Vista)的后代,你可以将<command>svnserve</command>作为Windows服务运行,这是比使用<option>--daemon (-d)</option>选项直接运行守护进程感觉更好。使用守护进程模式,需要打开命令行窗口,输入命令,然后保持命令行窗口不关闭,而作为Windows服务时,在后台运行,可以在启动时自动执行,并且可以使用同其他Windows服务一致的管理界面启动和停止服务。"
12677 #. (para)
12678 #: ../source/book.xml:12477
12679 #, fuzzy
12680 msgid "You'll need to define the new service using the command-line tool <command>SC.EXE</command>. Much like the <command>inetd</command> configuration line, you must specify an exact invocation of <command>svnserve</command> for Windows to run at start-up time:"
12681 msgstr "你需要使用命令行工具<command>SC.EXE</command>定义新的服务,就像<command>inetd</command>的配置行,你必须在Windows启动时指明<command>svnserve</command>的调用。"
12683 #. (screen)
12684 #: ../source/book.xml:12482
12685 #, no-wrap
12686 msgid ""
12687 "\n"
12688 "C:\\&gt; sc create svn\n"
12689 "        binpath= \"C:\\svn\\bin\\svnserve.exe --service -r C:\\repos\"\n"
12690 "        displayname= \"Subversion Server\"\n"
12691 "        depend= Tcpip\n"
12692 "        start= auto\n"
12693 msgstr ""
12694 "\n"
12695 "C:\\&gt; sc create svn\n"
12696 "        binpath= \"C:\\svn\\bin\\svnserve.exe --service -r C:\\repos\"\n"
12697 "        displayname= \"Subversion Server\"\n"
12698 "        depend= Tcpip\n"
12699 "        start= auto\n"
12701 #. (para)
12702 #: ../source/book.xml:12489
12703 #, fuzzy
12704 msgid "This defines a new Windows service named <quote>svn</quote>, and which executes a particular <command>svnserve.exe</command> command when started (in this case, rooted at <filename>C:\\repos</filename>.) There are a number of caveats in the prior example, however."
12705 msgstr "这样定义了一个新的Windows服务,叫做<quote>svn</quote>,会在启动时(在这个例子里,根目录是<filename>C:\\repos</filename>。)执行特定的<command>svnserve.exe</command>,可是前面这个例子产生了一些错误。"
12707 #. (para)
12708 #: ../source/book.xml:12495
12709 #, fuzzy
12710 msgid "First, notice that the <command>svnserve.exe</command> program must always be invoked with the <option>--service</option> option. Any other options to <command>svnserve</command> must then be specified on the same line, but you cannot add conflicting options such as <option>--daemon (-d)</option>, <option>--tunnel</option>, or <option>--inetd (-i)</option>. Options such as <option>-r</option> or <option>--listen-port</option> are fine, though. Second, be careful about spaces when invoking the <command>SC.EXE</command> command: the <literal>key= value</literal> patterns must have no spaces between <literal>key=</literal> and exactly one space before the <literal>value</literal>. Lastly, be careful about spaces in your command-line to be invoked. If a directory name contains spaces (or other characters that need escaping), place the entire inner value of <literal>binpath</literal> in double-quotes, by escaping them:"
12711 msgstr "首先,必须注意<command>svnserve.exe</command>使用<option>--service</option>选项启动。<command>svnserve</command>的其它选项必须在同一行上指定,但你不能使用冲突的选项,例如<option>--daemon (-d)</option>、<option>--tunnel</option>或<option>--inetd (-i)</option>,而选项<option>-r</option>或<option>--listen-port</option>都没有问题。第二,调用<command>SC.EXE</command>时必须注意空格:<literal>key= value</literal>的模式中<literal>key=</literal>之间必须没有空格,而且在与<literal>value</literal>之间只能有一个空格。最后,必须注意执行的命令行中的空格,如果目录名中包含了空格(或其它需要回避的字符),为了回避这些字符,请将整个<literal>binpath</literal>值放在双引号中:"
12713 #. (screen)
12714 #: ../source/book.xml:12514
12715 #, no-wrap
12716 msgid ""
12717 "\n"
12718 "C:\\&gt; sc create svn\n"
12719 "        binpath= \"\\\"C:\\program files\\svn\\bin\\svnserve.exe\\\" --service -r C:\\repos\"\n"
12720 "        displayname= \"Subversion Server\"\n"
12721 "        depend= Tcpip\n"
12722 "        start= auto\n"
12723 msgstr ""
12724 "\n"
12725 "C:\\&gt; sc create svn\n"
12726 "        binpath= \"\\\"C:\\program files\\svn\\bin\\svnserve.exe\\\" --service -r C:\\repos\"\n"
12727 "        displayname= \"Subversion Server\"\n"
12728 "        depend= Tcpip\n"
12729 "        start= auto\n"
12731 #. (para)
12732 #: ../source/book.xml:12521
12733 msgid "Also note that the word <literal>binpath</literal> is misleading—its value is a <emphasis>command line</emphasis>, not the path to an executable. That's why you need to surround it with quote marks if it contains embedded spaces."
12734 msgstr "也需要注意单词<literal>binpath</literal>会造成误解—它的值是一个<emphasis>命令行</emphasis>,而不是可执行的路径,所以我们为了防止有嵌入的空格而使用了引号围绕。"
12736 #. (para)
12737 #: ../source/book.xml:12526
12738 #, fuzzy
12739 msgid "Once the service is defined, it can stopped, started, or queried using standard GUI tools (the Services administrative control panel), or at the command line as well:"
12740 msgstr "一旦定义了服务,就可以使用标准GUI工具(服务管理控制面板)进行停止、启动和查询,或者是通过命令行:"
12742 #. (screen)
12743 #: ../source/book.xml:12530
12744 #, no-wrap
12745 msgid ""
12746 "\n"
12747 "C:\\&gt; net stop svn\n"
12748 "C:\\&gt; net start svn\n"
12749 msgstr ""
12750 "\n"
12751 "C:\\&gt; net stop svn\n"
12752 "C:\\&gt; net start svn\n"
12754 #. (para)
12755 #: ../source/book.xml:12534
12756 #, fuzzy
12757 msgid "The service can also be uninstalled (i.e. undefined) by deleting its definition: <literal>sc delete svn</literal>. Just be sure to stop the service first! The <command>SC.EXE</command> program has many other subcommands and options; run <literal>sc /?</literal> to learn more about it."
12758 msgstr "也可以通过删除其定义删除服务:<literal>sc delete svn</literal>,只需要确定首先停止服务,<command>SC.EXE</command>有许多子命令和选项,更多信息可以运行<literal>sc /?</literal>查看。"
12760 #. (title)
12761 #: ../source/book.xml:12545
12762 msgid "Built-in authentication and authorization"
12763 msgstr "内置的认证和授权"
12765 #. (para)
12766 #: ../source/book.xml:12547
12767 #, fuzzy
12768 msgid "When a client connects to an <command>svnserve</command> process, the following things happen:"
12769 msgstr "如果一个客户端连接到<command>svnserve</command>进程,如下事情会发生:"
12771 #. (para)
12772 #: ../source/book.xml:12551
12773 msgid "The client selects a specific repository."
12774 msgstr "客户端选择特定的版本库。"
12776 #. (para)
12777 #: ../source/book.xml:12555
12778 #, fuzzy
12779 msgid "The server processes the repository's <filename>conf/svnserve.conf</filename> file, and begins to enforce any authentication and authorization policies it describes."
12780 msgstr "服务器处理版本库的<filename>conf/svnserve.conf</filename>文件,并且执行里面定义的所有认证和授权政策。"
12782 #. (para)
12783 #: ../source/book.xml:12561
12784 #, fuzzy
12785 msgid "Depending on the defined policies,"
12786 msgstr "依赖于位置和授权政策,"
12788 #. (para)
12789 #: ../source/book.xml:12564
12790 msgid "the client may be allowed to make requests anonymously, without ever receiving an authentication challenge, OR"
12791 msgstr "如果没有收到认证请求,客户端可能被允许匿名访问,或者"
12793 #. (para)
12794 #: ../source/book.xml:12569
12795 msgid "the client may be challenged for authentication at any time, OR"
12796 msgstr "客户端收到认证请求,或者"
12798 #. (para)
12799 #: ../source/book.xml:12573
12800 #, fuzzy
12801 msgid "if operating in <quote>tunnel mode</quote>, the client will declare itself to be already externally authenticated (typically by SSH)."
12802 msgstr "如果操作在<quote>通道模式</quote>,客户端会宣布自己已经在外部得到认证。"
12804 #. (para)
12805 #: ../source/book.xml:12582
12806 msgid "See RFC 2195."
12807 msgstr "见RFC 2195。"
12809 #. (para)
12810 #: ../source/book.xml:12581
12811 #, fuzzy
12812 msgid "The <command>svnserve</command> server, by default, only knows how to send a CRAM-MD5 <placeholder-1/> authentication challenge. In essence, the server sends a small amount of data to the client. The client uses the MD5 hash algorithm to create a fingerprint of the data and password combined, then sends the fingerprint as a response. The server performs the same computation with the stored password to verify that the result is identical. <emphasis>At no point does the actual password travel over the network.</emphasis>"
12813 msgstr "在撰写本文时,服务器还只知道怎样发送CRAM-MD5<placeholder-1/>认证请求,本质上讲,就是服务器发送一些数据到客户端,客户端使用MD5哈希算法创建这些数据组合密码的指纹,然后返回指纹,服务器执行同样的计算并且来计算结果的一致性,<emphasis>真正的密码并没有在互联网上传递。</emphasis>"
12815 #. (para)
12816 #: ../source/book.xml:12591
12817 msgid "If your <command>svnserve</command> server was built with SASL, then it not only knows how to send CRAM-MD5 challenges, but likely knows a whole host of other authentication mechanisms. See <xref linkend=\"svn.serverconfig.svnserve.sasl\"/> to configure SASL authentication and encryption."
12818 msgstr ""
12820 #. (para)
12821 #: ../source/book.xml:12597
12822 #, fuzzy
12823 msgid "It's also possible, of course, for the client to be externally authenticated via a tunnel agent, such as <command>SSH</command>. In that case, the server simply examines the user it's running as, and uses it as the authenticated username. For more on this, see <xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>."
12824 msgstr "当然也有可能,如果客户端在外部通过通道代理认证,如<command>SSH</command>,在那种情况下,服务器简单的检验作为那个用户的运行,然后使用它作为认证用户名,更多信息请看<xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>。"
12826 #. (para)
12827 #: ../source/book.xml:12602
12828 #, fuzzy
12829 msgid "As you've already guessed, a repository's <filename>svnserve.conf</filename> file is the central mechanism for controlling authentication and authorization policies. The file has the same format as other configuration files (see <xref linkend=\"svn.advanced.confarea\"/>): section names are marked by square brackets (<literal>[</literal> and <literal>]</literal>), comments begin with hashes (<literal>#</literal>), and each section contains specific variables that can be set (<literal>variable = value</literal>). Let's walk through these files and learn how to use them."
12830 msgstr "像你已经猜测到的,版本库的<filename>svnserve.conf</filename>文件是控制认证和授权政策的中央机构,这文件与其它配置文件格式相同(见<xref linkend=\"svn.advanced.confarea\"/>):小节名称使用方括号标记(<literal>[</literal>和<literal>]</literal>),注释以井号(<literal>#</literal>)开始,每一小节都有一些参数可以设置(<literal>variable = value</literal>),让我们浏览这个文件并且学习怎样使用它们。"
12832 #. (title)
12833 #: ../source/book.xml:12616
12834 msgid "Create a 'users' file and realm"
12835 msgstr "创建一个用户文件和认证域"
12837 #. (para)
12838 #: ../source/book.xml:12618
12839 #, fuzzy
12840 msgid "For now, the <literal>[general]</literal> section of the <filename>svnserve.conf</filename> has all the variables you need. Begin by changing the values of those variables: choose a name for a file which will contain your usernames and passwords, and choose an authentication realm:"
12841 msgstr "此时,<filename>svnserve.conf</filename>文件的<literal>[general]</literal>部分包括所有你需要的变量,开始先定义一个保存用户名和密码的文件和一个认证域:"
12843 #. (screen)
12844 #: ../source/book.xml:12623
12845 #, no-wrap
12846 msgid ""
12847 "\n"
12848 "[general]\n"
12849 "password-db = userfile\n"
12850 "realm = example realm\n"
12851 msgstr ""
12852 "\n"
12853 "[general]\n"
12854 "password-db = userfile\n"
12855 "realm = example realm\n"
12857 #. (para)
12858 #: ../source/book.xml:12628
12859 #, fuzzy
12860 msgid "The <literal>realm</literal> is a name that you define. It tells clients which sort of <quote>authentication namespace</quote> they're connecting to; the Subversion client displays it in the authentication prompt, and uses it as a key (along with the server's hostname and port) for caching credentials on disk (see <xref linkend=\"svn.serverconfig.netmodel.credcache\"/>). The <literal>password-db</literal> variable points to a separate file that contains a list of usernames and passwords, using the same familiar format. For example:"
12861 msgstr "<literal>realm</literal>是你定义的名称,这告诉客户端连接的<quote>认证命名空间</quote>,Subversion会在认证提示里显示,并且作为凭证缓存(见<xref linkend=\"svn.serverconfig.netmodel.credcache\"/>。)的关键字(还有服务器的主机名和端口),<literal>password-db</literal>参数指出了保存用户和密码列表文件,这个文件使用同样熟悉的格式,举个例子:"
12863 #. (screen)
12864 #: ../source/book.xml:12637
12865 #, no-wrap
12866 msgid ""
12867 "\n"
12868 "[users]\n"
12869 "harry = foopassword\n"
12870 "sally = barpassword\n"
12871 msgstr ""
12872 "\n"
12873 "[users]\n"
12874 "harry = foopassword\n"
12875 "sally = barpassword\n"
12877 #. (para)
12878 #: ../source/book.xml:12642
12879 #, fuzzy
12880 msgid "The value of <literal>password-db</literal> can be an absolute or relative path to the users file. For many admins, it's easy to keep the file right in the <filename>conf/</filename> area of the repository, alongside <filename>svnserve.conf</filename>. On the other hand, it's possible you may want to have two or more repositories share the same users file; in that case, the file should probably live in a more public place. The repositories sharing the users file should also be configured to have the same realm, since the list of users essentially defines an authentication realm. Wherever the file lives, be sure to set the file's read and write permissions appropriately. If you know which user(s) <command>svnserve</command> will run as, restrict read access to the user file as necessary."
12881 msgstr "<literal>password-db</literal>的值可以是用户文件的绝对或相对路径,对许多管理员来说,把文件保存在版本库<filename>conf/</filename>下的<filename>svnserve.conf</filename>旁边是一个简单的方法。另一方面,可能你的多个版本库使用同一个用户文件,此时,这个文件应该在更公开的地方,版本库分享用户文件时必须配置为相同的域,因为用户列表本质上定义了一个认证域,无论这个文件在哪里,必须设置好文件的读写权限,如果你知道运行<command>svnserve</command>的用户,限定这个用户对这个文件有读权限是必须的。"
12883 #. (title)
12884 #: ../source/book.xml:12660
12885 msgid "Set access controls"
12886 msgstr "设置访问控制"
12888 #. (para)
12889 #: ../source/book.xml:12662
12890 #, fuzzy
12891 msgid "There are two more variables to set in the <filename>svnserve.conf</filename> file: they determine what unauthenticated (anonymous) and authenticated users are allowed to do. The variables <literal>anon-access</literal> and <literal>auth-access</literal> can be set to the values <literal>none</literal>, <literal>read</literal>, or <literal>write</literal>. Setting the value to <literal>none</literal> prohibits both reading and writing; <literal>read</literal> allows read-only access to the repository, and <literal>write</literal> allows complete read/write access to the repository. For example:"
12892 msgstr "<filename>svnserve.conf</filename>有两个或多个参数需要设置:它们确定未认证(匿名)和认证用户可以做的事情,参数<literal>anon-access</literal>和<literal>auth-access</literal>可以设置为<literal>none</literal>、<literal>read</literal>或者<literal>write</literal>,设置为<literal>none</literal>会限制所有方式的访问,<literal>read</literal>允许只读访问,而<literal>write</literal>允许对版本库完全的读/写权限:"
12894 #. (screen)
12895 #: ../source/book.xml:12673
12896 #, no-wrap
12897 msgid ""
12898 "\n"
12899 "[general]\n"
12900 "password-db = userfile\n"
12901 "realm = example realm\n"
12902 "\n"
12903 "# anonymous users can only read the repository\n"
12904 "anon-access = read\n"
12905 "\n"
12906 "# authenticated users can both read and write\n"
12907 "auth-access = write\n"
12908 msgstr ""
12909 "\n"
12910 "[general]\n"
12911 "password-db = userfile\n"
12912 "realm = example realm\n"
12913 "\n"
12914 "# anonymous users can only read the repository\n"
12915 "anon-access = read\n"
12916 "\n"
12917 "# authenticated users can both read and write\n"
12918 "auth-access = write\n"
12920 #. (para)
12921 #: ../source/book.xml:12684
12922 msgid "The example settings are, in fact, the default values of the variables, should you forget to define them. If you want to be even more conservative, you can block anonymous access completely:"
12923 msgstr "实例中的设置实际上是参数的缺省值,你一定不要忘了设置它们,如果你希望更保守一点,你可以完全封锁匿名访问:"
12925 #. (screen)
12926 #: ../source/book.xml:12688
12927 #, no-wrap
12928 msgid ""
12929 "\n"
12930 "[general]\n"
12931 "password-db = userfile\n"
12932 "realm = example realm\n"
12933 "\n"
12934 "# anonymous users aren't allowed\n"
12935 "anon-access = none\n"
12936 "\n"
12937 "# authenticated users can both read and write\n"
12938 "auth-access = write\n"
12939 msgstr ""
12940 "\n"
12941 "[general]\n"
12942 "password-db = userfile\n"
12943 "realm = example realm\n"
12944 "\n"
12945 "# anonymous users aren't allowed\n"
12946 "anon-access = none\n"
12947 "\n"
12948 "# authenticated users can both read and write\n"
12949 "auth-access = write\n"
12951 #. (para)
12952 #: ../source/book.xml:12699
12953 #, fuzzy
12954 msgid "The server process not only understands these <quote>blanket</quote> access controls to the repository, but also finer-grained access restrictions placed on specific files and directories within the repository. To make use of this feature, you need to define a file containing more detailed rules, and then set the <literal>authz-db</literal> variable to point to it:"
12955 msgstr "服务进程不仅仅理解对版本库的整体访问控制,也可以细粒度的控制版本库某个文件或目录的访问,为了使用这个特性,你需要定一个包含详细规则的文件,并将变量<literal>authz-db</literal>指向到这个文件。"
12957 #. (screen)
12958 #: ../source/book.xml:12706
12959 #, no-wrap
12960 msgid ""
12961 "\n"
12962 "[general]\n"
12963 "password-db = userfile\n"
12964 "realm = example realm\n"
12965 "\n"
12966 "# Specific access rules for specific locations\n"
12967 "authz-db = authzfile\n"
12968 msgstr ""
12969 "\n"
12970 "[general]\n"
12971 "password-db = userfile\n"
12972 "realm = example realm\n"
12973 "\n"
12974 "# Specific access rules for specific locations\n"
12975 "authz-db = authzfile\n"
12977 #. (para)
12978 #: ../source/book.xml:12714
12979 #, fuzzy
12980 msgid "The syntax of the <filename>authzfile</filename> file is discussed in detail in <xref linkend=\"svn.serverconfig.pathbasedauthz\"/>. Note that the <literal>authz-db</literal> variable isn't mutually exclusive with the <literal>anon-access</literal> and <literal>auth-access</literal> variables; if all the variables are defined at once, then <emphasis>all</emphasis> of the rules must be satisfied before access is allowed."
12981 msgstr "<filename>authzfile</filename>得语法会在<xref linkend=\"svn.serverconfig.pathbasedauthz\"/>讨论,注意变量<literal>authz-db</literal>并不比<literal>anon-access</literal>和<literal>auth-access</literal>更高级,如果定义了所有的变量,要想被允许访问必须满足所有的规则。"
12983 #. (title)
12984 #: ../source/book.xml:12727
12985 #, fuzzy
12986 msgid "Using <command>svnserve</command> with SASL"
12987 msgstr "<command>svnserve</command> 使用 SSH 隧道"
12989 #. (para)
12990 #: ../source/book.xml:12729
12991 msgid "For many teams, the built-in CRAM-MD5 authentication is all they need from <command>svnserve</command>. However, if your server (and your Subversion clients) were built with the Cyrus Simple Authentication and Security Layer (SASL) library, then you have a number of authentication and encryption options available to you."
12992 msgstr ""
12994 #. (title)
12995 #: ../source/book.xml:12737
12996 #, fuzzy
12997 msgid "What is SASL?"
12998 msgstr "什么是 WebDAV ?"
13000 #. (para)
13001 #: ../source/book.xml:12739
13002 msgid "The Cyrus Simple Authentication and Security Layer is open-source software written by Carnegie Mellon University. It adds generic authentication and encryption capabilities to any network protocol, and as of Subversion 1.5 and later, both the <command>svnserve</command> server and <command>svn</command> client know how to make use of this library. It may or may not be available to you: if you're building Subversion yourself, you'll need to have at least version 2.1 of SASL installed on your system and you'll need to make sure that it's detected during Subversion's build process. If you're using a pre-built Subversion binary package, you'll have to check with the package maintainer as to whether SASL support was compiled in. SASL comes with a number of pluggable modules that represent different authentication systems: Kerberos (GSSAPI), NTLM, One-Time-Passwords (OTP), DIGEST-MD5, LDAP, Secure-Remote-Password (SRP), and others. Certain mechanisms may or may not be available to you; be sure to check which modules are provided."
13003 msgstr ""
13005 #. (para)
13006 #: ../source/book.xml:12758
13007 msgid "You can download Cyrus SASL (both code and documentation) from <uri href=\"http://asg.web.cmu.edu/sasl/sasl-library.html\">http://asg.web.cmu.edu/sasl/sasl-library.html</uri>."
13008 msgstr ""
13010 #. (para)
13011 #: ../source/book.xml:12762
13012 msgid "Normally, when a subversion client connects to <command>svnserve</command>, the server sends a greeting which advertises a list of capabilities it supports, and the client responds with a similar list of capabilities. If the server is configured to require authentication, it then sends a challenge which lists the authentication mechanisms available; the client responds by choosing one of the mechanisms, and then authentication is carried out in some number of roundtrip messages. Even when SASL capabilities aren't present, the client and server inherently know how to use the CRAM-MD5 and ANONYMOUS mechanisms (see <xref linkend=\"svn.serverconfig.svnserve.auth\"/>). If server and client were linked against SASL, then a number of other authentication mechanisms may also be available. However, you'll need to explicitly configure SASL on the server-side to advertise them."
13013 msgstr ""
13015 #. (title)
13016 #: ../source/book.xml:12780
13017 #, fuzzy
13018 msgid "Authenticating with SASL"
13019 msgstr "认证"
13021 #. (para)
13022 #: ../source/book.xml:12782
13023 msgid "To activate specific SASL mechanisms on the server, you'll need to do two things. First, create a <literal>[sasl]</literal> section in your repository's <filename>svnserve.conf</filename> file, with this key-value pair:"
13024 msgstr ""
13026 #. (screen)
13027 #: ../source/book.xml:12787
13028 #, no-wrap
13029 msgid ""
13030 "\n"
13031 "          use-sasl = true\n"
13032 msgstr ""
13034 #. (para)
13035 #: ../source/book.xml:12790
13036 msgid "Second, create a file called <filename>subversion.conf</filename> in a place where the SASL library can find it—typically in the directory where SASL plugins are located. You'll have to locate the plugin directory on your particular system, such as <filename>/usr/lib/sasl2/</filename> or <filename>/etc/sasl2/</filename>. (Note that this is <emphasis>not</emphasis> the <filename>svnserve.conf</filename> file that lives within a repository!)"
13037 msgstr ""
13039 #. (para)
13040 #: ../source/book.xml:12800
13041 msgid "On a Windows server, you'll have to also edit the registry (using a tool like <command>regedit</command>) to tell SASL where to find things. Create a registry key named <literal>[HKEY_LOCAL_MACHINE\\SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library]</literal>, and place two keys inside it: a key called <literal>SearchPath</literal> (whose value is a path containing the SASL <filename>.dll</filename> plugins), and a key called <literal>ConfFile</literal> (whose value is a path containing the <filename>subversion.conf</filename> file.)"
13042 msgstr ""
13044 #. (para)
13045 #: ../source/book.xml:12811
13046 msgid "Because SASL provides so many different kinds of authentication mechanisms, it would be foolish (and far beyond the scope of this book) to try and describe every possible server-side configuration. Instead, we recommend that you read the documentation supplied in the <filename>doc/</filename> subdirectory of the SASL source code. It goes into great detail about each mechanism and how to configure the server appropriately for each. For the purposes of this discussion, we'll just demonstrate a simple example of configuring the DIGEST-MD5 mechanism. For example, if your <filename>subversion.conf</filename> contains:"
13047 msgstr ""
13049 #. (screen)
13050 #: ../source/book.xml:12823
13051 #, no-wrap
13052 msgid ""
13053 "\n"
13054 "pwcheck_method: auxprop\n"
13055 "auxprop_plugin: sasldb\n"
13056 "mech_list: DIGEST-MD5\n"
13057 msgstr ""
13059 #. (para)
13060 #: ../source/book.xml:12828
13061 msgid "...then you've told SASL to advertise the DIGEST-MD5 mechanism to clients, and to check user passwords against a private password database (typically stored in <filename>/etc/sasldb2</filename>). A system administrator can then use the <command>saslpasswd2</command> program to add or modify usernames and passwords in the database:"
13062 msgstr ""
13064 #. (screen)
13065 #: ../source/book.xml:12835
13066 #, no-wrap
13067 msgid ""
13068 "\n"
13069 "$ saslpasswd2 -c -u realm username\n"
13070 msgstr ""
13072 #. (para)
13073 #: ../source/book.xml:12838
13074 msgid "A few words of warning: first, make sure that the \"realm\" argument to <command>saslpasswd2</command> matches the same \"realm\" you've defined in your repository's <filename>svnserve.conf</filename> file; if they don't match, authentication will fail. Also, due to a shortcoming in SASL, the common realm must be a string with no space characters. Finally, if you decide to go with the standard SASL password database, make sure that the <command>svnserve</command> program has read access to the file (and possibly write access as well, if you're using a mechanism such as OTP.)"
13075 msgstr ""
13077 #. (para)
13078 #: ../source/book.xml:12849
13079 msgid "This is just one simple way of configuring SASL. Many other authentication mechanisms available, and passwords can be stored in other places such as in LDAP or a SQL database. Consult the full SASL documentation for details."
13080 msgstr ""
13082 #. (para)
13083 #: ../source/book.xml:12853
13084 msgid "Remember that if you configure your server to only allow certain SASL authentication mechanisms, this can also have the effect of forcing all of connecting clients to have SASL support as well. Any Subversion client built without SASL support (which includes all pre-1.5 clients) will be unable to authenticate. On the one hand, this sort of restriction may be exactly what you want (<quote>my clients must all use Kerberos!</quote>). However, if you still want non-SASL clients to be able to authenticate, be sure to advertise the CRAM-MD5 mechanism as an option. All clients are able to use CRAM-MD5, whether they have SASL support or not."
13085 msgstr ""
13087 #. (title)
13088 #: ../source/book.xml:12867
13089 #, fuzzy
13090 msgid "SASL Encryption"
13091 msgstr "加密"
13093 #. (para)
13094 #: ../source/book.xml:12869
13095 msgid "SASL is also able to perform data-encryption if a particular mechanism supports it. The built-in CRAM-MD5 mechanism doesn't support encryption, but DIGEST-MD5 does, and mechanisms like SRP actually require use of the OpenSSL library . To enable or disable different levels of encryption, you can set two values in your repository's <filename>svnserve.conf</filename> file:"
13096 msgstr ""
13098 #. (screen)
13099 #: ../source/book.xml:12876
13100 #, no-wrap
13101 msgid ""
13102 "\n"
13103 "[sasl]\n"
13104 "use-sasl = true\n"
13105 "min-encryption = 128\n"
13106 "max-encryption = 256\n"
13107 msgstr ""
13109 #. (para)
13110 #: ../source/book.xml:12882
13111 msgid "The <literal>min-encryption</literal> and <literal>max-encryption</literal> variables control the level of encryption demanded by the server. To disable encryption completely, set both values to 0. To enable simple checksumming of data (i.e. prevent tampering and guarantee data integrity without encryption), set both values to 1. If you wish to allow—but not require—encryption, set the minimum value to 0, and the maximum value to some bit-length. To require encryption unconditionally, set both values to numbers greater than 1. In our example above, we require clients to do at least 128-bit encryption, but no more than 256-bit encryption."
13112 msgstr ""
13114 #. (title)
13115 #: ../source/book.xml:12900
13116 msgid "Tunneling over SSH"
13117 msgstr "SSH 隧道"
13119 #. (para)
13120 #: ../source/book.xml:12902
13121 #, fuzzy
13122 msgid "<command>svnserve</command>'s built-in authentication (and SASL support) can be very handy, because it avoids the need to create real system accounts. On the other hand, some administrators already have well-established SSH authentication frameworks in place. In these situations, all of the project's users already have system accounts and the ability to <quote>SSH into</quote> the server machine."
13123 msgstr "<command>svnserve</command>的内置认证会非常容易得到,因为它避免了创建真实的系统帐号,另一方面,一些管理员已经创建好了SSH认证框架,在这种情况下,所有的项目用户已经拥有了系统帐号和有能力<quote>SSH到</quote>服务器。"
13125 #. (para)
13126 #: ../source/book.xml:12909
13127 #, fuzzy
13128 msgid "It's easy to use SSH in conjunction with <command>svnserve</command>. The client simply uses the <literal>svn+ssh://</literal> URL scheme to connect:"
13129 msgstr "SSH与<command>svnserve</command>结合很简单,客户端只需要使用<literal>svn+ssh://</literal>的URL模式来连接:"
13131 #. (screen)
13132 #: ../source/book.xml:12912
13133 #, no-wrap
13134 msgid ""
13135 "\n"
13136 "$ whoami\n"
13137 "harry\n"
13138 "\n"
13139 "$ svn list svn+ssh://host.example.com/repos/project\n"
13140 "harry@host.example.com's password:  *****\n"
13141 "\n"
13142 "foo\n"
13143 "bar\n"
13144 "baz\n"
13145 "…\n"
13146 msgstr ""
13147 "\n"
13148 "$ whoami\n"
13149 "harry\n"
13150 "\n"
13151 "$ svn list svn+ssh://host.example.com/repos/project\n"
13152 "harry@host.example.com's password:  *****\n"
13153 "\n"
13154 "foo\n"
13155 "bar\n"
13156 "baz\n"
13157 "…\n"
13159 #. (para)
13160 #: ../source/book.xml:12924
13161 #, fuzzy
13162 msgid "In this example, the Subversion client is invoking a local <command>ssh</command> process, connecting to <literal>host.example.com</literal>, authenticating as the user <literal>harry</literal>, then spawning a private <command>svnserve</command> process on the remote machine running as the user <literal>harry</literal>. The <command>svnserve</command> command is being invoked in tunnel mode (<option>-t</option>) and its network protocol is being <quote>tunneled</quote> over the encrypted connection by <command>ssh</command>, the tunnel-agent. <command>svnserve</command> is aware that it's running as the user <literal>harry</literal>, and if the client performs a commit, the authenticated username will be used as the author of the new revision."
13163 msgstr "在这个例子里,Subversion客户端会调用一个<command>ssh</command>进程,连接到<literal>host.example.com</literal>,使用用户<literal>harry</literal>认证,然后会有一个<command>svnserve</command>私有进程以用户<literal>harry</literal>运行。<command>svnserve</command>是以管道模式调用的(<option>-t</option>),它的网络协议是通过<command>ssh</command><quote>封装的</quote>,被管道代理的<command>svnserve</command>会知道程序是以用户<literal>harry</literal>运行的,如果客户执行一个提交,认证的用户名会作为版本的参数保存到新的修订本。"
13165 #. (para)
13166 #: ../source/book.xml:12938
13167 #, fuzzy
13168 msgid "The important thing to understand here is that the Subversion client is <emphasis>not</emphasis> connecting to a running <command>svnserve</command> daemon. This method of access doesn't require a daemon, nor does it notice one if present. It relies wholly on the ability of <command>ssh</command> to spawn a temporary <command>svnserve</command> process, which then terminates when the network connection is closed."
13169 msgstr "这里要理解的最重要的事情是Subversion客户端<emphasis>不</emphasis>是连接到运行中的<command>svnserve</command>守护进程,这种访问方法不需要一个运行的守护进程,也不需要在必要时唤醒一个,它依赖于<command>ssh</command>来发起一个<command>svnserve</command>进程,然后网络断开后终止进程。"
13171 #. (para)
13172 #: ../source/book.xml:12946
13173 #, fuzzy
13174 msgid "When using <literal>svn+ssh://</literal> URLs to access a repository, remember that it's the <command>ssh</command> program prompting for authentication, and <emphasis>not</emphasis> the <command>svn</command> client program. That means there's no automatic password caching going on (see <xref linkend=\"svn.serverconfig.netmodel.credcache\"/>). The Subversion client often makes multiple connections to the repository, though users don't normally notice this due to the password caching feature. When using <literal>svn+ssh://</literal> URLs, however, users may be annoyed by <command>ssh</command> repeatedly asking for a password for every outbound connection. The solution is to use a separate SSH password-caching tool like <command>ssh-agent</command> on a Unix-like system, or <command>pageant</command> on Windows."
13175 msgstr "当使用<literal>svn+ssh://</literal>的URL访问版本库时,记住是<command>ssh</command>提示请求认证,而<emphasis>不</emphasis>是<command>svn</command>客户端程序。这意味着密码不会有自动缓存(见<xref linkend=\"svn.serverconfig.netmodel.credcache\"/>),Subversion客户端通常会建立多个版本库的连接,但用户通常会因为密码缓存特性而没有注意到这一点,当使用<literal>svn+ssh://</literal>的URL时,用户会为<command>ssh</command>在每次建立连接时重复的询问密码感到讨厌,解决方案是用一个独立的SSH密码缓存工具,像类Unix系统的<command>ssh-agent</command>或者是Windows下的<command>pageant</command>。"
13177 #. (para)
13178 #: ../source/book.xml:12973
13179 #, fuzzy
13180 msgid "Note that using any sort of <command>svnserve</command>-enforced access control at all is a bit pointless; the user already has direct access to the repository database."
13181 msgstr "请注意,使用<command>svnserve</command>的访问控制进行权限控制将会失去意义,因为用户已经直接访问到了版本库数据。"
13183 #. (para)
13184 #: ../source/book.xml:12961
13185 #, fuzzy
13186 msgid "When running over a tunnel, authorization is primarily controlled by operating system permissions to the repository's database files; it's very much the same as if Harry were accessing the repository directly via a <literal>file://</literal> URL. If multiple system users are going to be accessing the repository directly, you may want to place them into a common group, and you'll need to be careful about umasks. (Be sure to read <xref linkend=\"svn.serverconfig.multimethod\"/>.) But even in the case of tunneling, the <filename>svnserve.conf</filename> file can still be used to block access, by simply setting <literal>auth-access = read</literal> or <literal>auth-access = none</literal>. <placeholder-1/>"
13187 msgstr "当在一个管道上运行时,认证通常是基于操作系统对版本库数据库文件的访问控制,这同Harry直接通过<literal>file:///</literal>的URL直接访问版本库非常类似,如果有多个系统用户要直接访问版本库,你会希望将他们放到一个常见的组里,你应该小心的使用umasks。(确定要阅读<xref linkend=\"svn.serverconfig.multimethod\"/>)但是即使是在管道模式时,文件<filename>svnserve.conf</filename>还是可以阻止用户访问,如设置<literal>auth-access = read</literal>或<literal>auth-access = none</literal>。<placeholder-1/>"
13189 #. (para)
13190 #: ../source/book.xml:12982
13191 msgid "We don't actually recommend this, since RSH is notably less secure than SSH."
13192 msgstr "我们实际上不支持这个,因为RSH在安全性上显著不如SSH。"
13194 #. (para)
13195 #: ../source/book.xml:12978
13196 #, fuzzy
13197 msgid "You'd think that the story of SSH tunneling would end here, but it doesn't. Subversion allows you to create custom tunnel behaviors in your run-time <filename>config</filename> file (see <xref linkend=\"svn.advanced.confarea\"/>). For example, suppose you want to use RSH instead of SSH<placeholder-1/>. In the <literal>[tunnels]</literal> section of your <filename>config</filename> file, simply define it like this:"
13198 msgstr "你会认为SSH管道的故事该结束了,但还不是,Subversion允许你在运行配置文件<filename>config</filename>(见<xref linkend=\"svn.advanced.confarea\"/>)创建一个自定义的管道行为方式,举个例子,假定你希望使用RSH而不是SSH,在<filename>config</filename>文件的<literal>[tunnels]</literal>部分作如下定义:"
13200 #. (screen)
13201 #: ../source/book.xml:12988
13202 #, no-wrap
13203 msgid ""
13204 "\n"
13205 "[tunnels]\n"
13206 "rsh = rsh\n"
13207 msgstr ""
13208 "\n"
13209 "[tunnels]\n"
13210 "rsh = rsh\n"
13212 #. (para)
13213 #: ../source/book.xml:12992
13214 #, fuzzy
13215 msgid "And now, you can use this new tunnel definition by using a URL scheme that matches the name of your new variable: <literal>svn+rsh://host/path</literal>. When using the new URL scheme, the Subversion client will actually be running the command <command>rsh host svnserve -t</command> behind the scenes. If you include a username in the URL (for example, <literal>svn+rsh://username@host/path</literal>) the client will also include that in its command (<command>rsh username@host svnserve -t</command>). But you can define new tunneling schemes to be much more clever than that:"
13216 msgstr "现在你可以通过指定与定义匹配的URL模式来使用新的管道定义:<literal>svn+rsh://host/path</literal>。当使用新的URL模式时,Subversion客户端实际上会在后台运行<command>rsh host svnserve -t</command>这个命令,如果你在URL中包括一个用户名(例如,<literal>svn+rsh://username@host/path</literal>),客户端也会在自己的命令中包含这部分(<command>rsh username@host svnserve -t</command>),但是你可以定义比这个更加智能的新的管道模式:"
13218 #. (screen)
13219 #: ../source/book.xml:13002
13220 #, no-wrap
13221 msgid ""
13222 "\n"
13223 "[tunnels]\n"
13224 "joessh = $JOESSH /opt/alternate/ssh -p 29934\n"
13225 msgstr ""
13226 "\n"
13227 "[tunnels]\n"
13228 "joessh = $JOESSH /opt/alternate/ssh -p 29934\n"
13230 #. (para)
13231 #: ../source/book.xml:13006
13232 #, fuzzy
13233 msgid "This example demonstrates a couple of things. First, it shows how to make the Subversion client launch a very specific tunneling binary (the one located at <filename>/opt/alternate/ssh</filename>) with specific options. In this case, accessing a <literal>svn+joessh://</literal> URL would invoke the particular SSH binary with <option>-p 29934</option> as arguments—useful if you want the tunnel program to connect to a non-standard port."
13234 msgstr "这个例子里论证了一些事情,首先,它展现了如何让Subversion客户端启动一个特定的管道程序(这个在<filename>/opt/alternate/ssh</filename>),在这个例子里,使用<literal>svn+joessh://</literal>的URL会以<option>-p 29934</option>参数调用特定的SSH程序—对连接到非标准端口的程序非常有用。"
13236 #. (para)
13237 #: ../source/book.xml:13015
13238 #, fuzzy
13239 msgid "Second, it shows how to define a custom environment variable that can override the name of the tunneling program. Setting the <literal>SVN_SSH</literal> environment variable is a convenient way to override the default SSH tunnel agent. But if you need to have several different overrides for different servers, each perhaps contacting a different port or passing a different set of options to SSH, you can use the mechanism demonstrated in this example. Now if we were to set the <literal>JOESSH</literal> environment variable, its value would override the entire value of the tunnel variable—<command>$JOESSH</command> would be executed instead of <command>/opt/alternate/ssh -p 29934</command>."
13240 msgstr "第二点,它展示了怎样定义一个自定义的环境变量来覆盖管道程序中的名字,设置<literal>SVN_SSH</literal>环境变量是覆盖缺省的SSH管道的一种简便方法,但是如果你需要为多个服务器做出多个不同的覆盖,或许每一个都联系不同的端口或传递不同的SSH选项,你可以使用本例论述的机制。现在如果我们设置<literal>JOESSH</literal>环境变量,它的值会覆盖管道中的变量值—会执行<command>$JOESSH</command>而不是<command>/opt/alternate/ssh -p 29934</command>。"
13242 #. (title)
13243 #: ../source/book.xml:13032
13244 msgid "SSH configuration tricks"
13245 msgstr "SSH 配置技巧"
13247 #. (para)
13248 #: ../source/book.xml:13034
13249 #, fuzzy
13250 msgid "It's not only possible to control the way in which the client invokes <command>ssh</command>, but also to control the behavior of <command>sshd</command> on your server machine. In this section, we'll show how to control the exact <command>svnserve</command> command executed by <command>sshd</command>, as well as how to have multiple users share a single system account."
13251 msgstr "不仅仅是可以控制客户端调用<command>ssh</command>方式,也可以控制服务器中的<command>sshd</command>的行为方式,在本小节,我们会展示怎样控制<command>sshd</command>执行<command>svnserve</command>,包括如何让多个用户分享同一个系统帐户。"
13253 #. (para)
13254 #: ../source/book.xml:13046
13255 #, fuzzy
13256 msgid "To begin, locate the home directory of the account you'll be using to launch <command>svnserve</command>. Make sure the account has an SSH public/private keypair installed, and that the user can log in via public-key authentication. Password authentication will not work, since all of the following SSH tricks revolve around using the SSH <filename>authorized_keys</filename> file."
13257 msgstr "作为开始,定位到你启动<command>svnserve</command>的帐号的主目录,确定这个账户已经安装了一套SSH公开/私有密钥对,用户可以通过公开密钥认证,因为所有如下的技巧围绕着使用SSH<filename>authorized_keys</filename>文件,密码认证在这里不会工作。"
13259 #. (para)
13260 #: ../source/book.xml:13053
13261 #, fuzzy
13262 msgid "If it doesn't already exist, create the <filename>authorized_keys</filename> file (on Unix, typically <filename>~/.ssh/authorized_keys</filename>). Each line in this file describes a public key that is allowed to connect. The lines are typically of the form:"
13263 msgstr "如果这个文件还不存在,创建一个<filename>authorized_keys</filename>文件(在UNIX下通常是<filename>~/.ssh/authorized_keys</filename>),这个文件的每一行描述了一个允许连接的公钥,这些行通常是下面的形式:"
13265 #. (screen)
13266 #: ../source/book.xml:13059
13267 #, no-wrap
13268 msgid ""
13269 "\n"
13270 "  ssh-dsa AAAABtce9euch… user@example.com\n"
13271 msgstr ""
13272 "\n"
13273 "  ssh-dsa AAAABtce9euch.... user@example.com\n"
13275 #. (para)
13276 #: ../source/book.xml:13062
13277 #, fuzzy
13278 msgid "The first field describes the type of key, the second field is the base64-encoded key itself, and the third field is a comment. However, it's a lesser known fact that the entire line can be preceded by a <literal>command</literal> field:"
13279 msgstr "第一个字段描述了密钥的类型,第二个字段是未加密的密钥本身,第三个字段是注释。然而,这是一个很少人知道的事实,可以使用一个<literal>command</literal>来处理整行:"
13281 #. (screen)
13282 #: ../source/book.xml:13067
13283 #, no-wrap
13284 msgid ""
13285 "\n"
13286 "  command=\"program\" ssh-dsa AAAABtce9euch… user@example.com\n"
13287 msgstr ""
13288 "\n"
13289 "  command=\"program\" ssh-dsa AAAABtce9euch.... user@example.com\n"
13291 #. (para)
13292 #: ../source/book.xml:13070
13293 #, fuzzy
13294 msgid "When the <literal>command</literal> field is set, the SSH daemon will run the named program instead of the typical <command>svnserve -t</command> invocation that the Subversion client asks for. This opens the door to a number of server-side tricks. In the following examples, we abbreviate the lines of the file as:"
13295 msgstr "当<literal>command</literal>字段设置后,SSH守护进程运行命名的程序而不是通常Subversion客户端询问的<command>svnserve -t</command>。这为实施许多服务器端技巧开启了大门,在下面的例子里,我们简写了文件的这些行:"
13297 #. (screen)
13298 #: ../source/book.xml:13076
13299 #, no-wrap
13300 msgid ""
13301 "\n"
13302 "  command=\"program\" TYPE KEY COMMENT\n"
13303 msgstr ""
13304 "\n"
13305 "  command=\"program\" TYPE KEY COMMENT\n"
13307 #. (title)
13308 #: ../source/book.xml:13083
13309 msgid "Controlling the invoked command"
13310 msgstr "控制调用的命令"
13312 #. (para)
13313 #: ../source/book.xml:13085
13314 #, fuzzy
13315 msgid "Because we can specify the executed server-side command, it's easy to name a specific <command>svnserve</command> binary to run and to pass it extra arguments:"
13316 msgstr "因为我们可以指定服务器端执行的命令,我们很容易来选择运行一个特定的<command>svnserve</command>程序来并且传递给它额外的参数:"
13318 #. (screen)
13319 #: ../source/book.xml:13088
13320 #, no-wrap
13321 msgid ""
13322 "\n"
13323 "  command=\"/path/to/svnserve -t -r /virtual/root\" TYPE KEY COMMENT\n"
13324 msgstr ""
13325 "\n"
13326 "  command=\"/path/to/svnserve -t -r /virtual/root\" TYPE KEY COMMENT\n"
13328 #. (para)
13329 #: ../source/book.xml:13091
13330 #, fuzzy
13331 msgid "In this example, <filename>/path/to/svnserve</filename> might be a custom wrapper script around <command>svnserve</command> which sets the umask (see <xref linkend=\"svn.serverconfig.multimethod\"/>). It also shows how to anchor <command>svnserve</command> in a virtual root directory, just as one often does when running <command>svnserve</command> as a daemon process. This might be done either to restrict access to parts of the system, or simply to relieve the user of having to type an absolute path in the <literal>svn+ssh://</literal> URL."
13332 msgstr "在这个例子里,<filename>/path/to/svnserve</filename>也许会是一个<command>svnserve</command>程序的包裹脚本,会来设置umask(见<xref linkend=\"svn.serverconfig.multimethod\"/>)。它也展示了怎样在虚拟根目录定位一个<command>svnserve</command>,就像我们经常在使用守护进程模式下运行<command>svnserve</command>一样。这样做不仅可以把访问限制在系统的一部分,也可以使用户不需要在<literal>svn+ssh://</literal>URL里输入绝对路径。"
13334 #. (para)
13335 #: ../source/book.xml:13102
13336 #, fuzzy
13337 msgid "It's also possible to have multiple users share a single account. Instead of creating a separate system account for each user, generate a public/private keypair for each person. Then place each public key into the <filename>authorized_users</filename> file, one per line, and use the <option>--tunnel-user</option> option:"
13338 msgstr "多个用户也可以共享同一个帐号,作为为每个用户创建系统帐户的替代,我们创建一个公开/私有密钥对,然后在<filename>authorized_users</filename>文件里放置各自的公钥,一个用户一行,使用<option>--tunnel-user</option>选项:"
13340 #. (screen)
13341 #: ../source/book.xml:13109
13342 #, no-wrap
13343 msgid ""
13344 "\n"
13345 "  command=\"svnserve -t --tunnel-user=harry\" TYPE1 KEY1 harry@example.com\n"
13346 "  command=\"svnserve -t --tunnel-user=sally\" TYPE2 KEY2 sally@example.com\n"
13347 msgstr ""
13348 "\n"
13349 "  command=\"svnserve -t --tunnel-user=harry\" TYPE1 KEY1 harry@example.com\n"
13350 "  command=\"svnserve -t --tunnel-user=sally\" TYPE2 KEY2 sally@example.com\n"
13352 #. (para)
13353 #: ../source/book.xml:13113
13354 #, fuzzy
13355 msgid "This example allows both Harry and Sally to connect to the same account via public-key authentication. Each of them has a custom command that will be executed; the <option>--tunnel-user</option> option tells <command>svnserve -t</command> to assume that the named argument is the authenticated user. Without <option>--tunnel-user</option>, it would appear as though all commits were coming from the one shared system account."
13356 msgstr "这个例子允许Harry和Sally通过公钥认证连接同一个的账户,每个人自定义的命令将会执行。<option>--tunnel-user</option>选项告诉<command>svnserve -t</command>命令采用命名的参数作为经过认证的用户,如果没有<option>--tunnel-user</option>,所有的提交会作为共享的系统帐户提交。"
13358 #. (para)
13359 #: ../source/book.xml:13122
13360 #, fuzzy
13361 msgid "A final word of caution: giving a user access to the server via public-key in a shared account might still allow other forms of SSH access, even if you've set the <literal>command</literal> value in <filename>authorized_keys</filename>. For example, the user may still get shell access through SSH, or be able to perform X11 or general port-forwarding through your server. To give the user as little permission as possible, you may want to specify a number of restrictive options immediately after the <literal>command</literal>:"
13362 msgstr "最后要小心:设定通过公钥共享账户进行用户访问时还会允许其它形式的SSH访问,即使你设置了<filename>authorized_keys</filename>的<literal>command</literal>值,举个例子,用户仍然可以通过SSH得到shell访问,或者是通过服务器执行X11或者是端口转发。为了给用户尽可能少的访问权限,你或许希望在<literal>command</literal>命令之后指定一些限制选项:"
13364 #. (screen)
13365 #: ../source/book.xml:13132
13366 #, no-wrap
13367 msgid ""
13368 "\n"
13369 "  command=\"svnserve -t --tunnel-user=harry\",no-port-forwarding,\\\n"
13370 "           no-agent-forwarding,no-X11-forwarding,no-pty \\\n"
13371 "           TYPE1 KEY1 harry@example.com\n"
13372 msgstr ""
13373 "\n"
13374 "  command=\"svnserve -t --tunnel-user=harry\",no-port-forwarding,\\\n"
13375 "           no-agent-forwarding,no-X11-forwarding,no-pty \\\n"
13376 "           TYPE1 KEY1 harry@example.com\n"
13378 #. (title)
13379 #: ../source/book.xml:13145
13380 msgid "httpd, the Apache HTTP server"
13381 msgstr "httpd,Apache 的 HTTP 服务器"
13383 #. (para)
13384 #: ../source/book.xml:13160
13385 msgid "They really hate doing that."
13386 msgstr "他们讨厌这样做。"
13388 #. (para)
13389 #: ../source/book.xml:13147
13390 #, fuzzy
13391 msgid "The Apache HTTP Server is a <quote>heavy duty</quote> network server that Subversion can leverage. Via a custom module, <command>httpd</command> makes Subversion repositories available to clients via the WebDAV/DeltaV protocol, which is an extension to HTTP 1.1 (see <uri href=\"http://www.webdav.org/\">http://www.webdav.org/</uri> for more information). This protocol takes the ubiquitous HTTP protocol that is the core of the World Wide Web, and adds writing—specifically, versioned writing—capabilities. The result is a standardized, robust system that is conveniently packaged as part of the Apache 2.0 software, is supported by numerous operating systems and third-party products, and doesn't require network administrators to open up yet another custom port. <placeholder-1/> While an Apache-Subversion server has more features than <command>svnserve</command>, it's also a bit more difficult to set up. With flexibility often comes more complexity."
13392 msgstr "Apache的HTTP服务器是一个Subversion可以利用的<quote>重型</quote>网络服务器,通过一个自定义模块,<command>httpd</command>可以让Subversion版本库通过WebDAV/DeltaV协议在客户端前可见,WebDAV/DeltaV协议是HTTP 1.1的扩展(见<ulink url=\"http://www.webdav.org/\"/>来查看详细信息)。这个协议利用了无处不在的HTTP协议是广域网的核心这一点,添加了写能力—更明确一点,版本化的写—能力。结果就是这样一个标准化的健壮的系统,作为Apache 2.0软件的一部分打包,被许多操作系统和第三方产品支持,网络管理员也不需要打开另一个自定义端口。 <placeholder-1/>这样一个Apache-Subversion服务器具备了许多<command>svnserve</command>没有的特性,但是也有一点难于配置,灵活通常会带来复杂性。"
13394 #. (para)
13395 #: ../source/book.xml:13164
13396 #, fuzzy
13397 msgid "Much of the following discussion includes references to Apache configuration directives. While some examples are given of the use of these directives, describing them in full is outside the scope of this chapter. The Apache team maintains excellent documentation, publicly available on their website at <uri href=\"http://httpd.apache.org\">http://httpd.apache.org</uri>. For example, a general reference for the configuration directives is located at <uri href=\"       http://httpd.apache.org/docs-2.0/mod/directives.html\"> http://httpd.apache.org/docs-2.0/mod/directives.html</uri>."
13398 msgstr "下面的讨论包括了对Apache配置指示的引用,给了一些使用这些指示的例子,详细地描述不在本章的范围之内,Apache小组维护了完美的文档,公开存放在他们的站点<ulink url=\"http://httpd.apache.org\"/>。例如,一个一般的配置参考位于<ulink url=\"       http://httpd.apache.org/docs-2.0/mod/directives.html\"/>。"
13400 #. (para)
13401 #: ../source/book.xml:13171
13402 #, fuzzy
13403 msgid "Also, as you make changes to your Apache setup, it is likely that somewhere along the way a mistake will be made. If you are not already familiar with Apache's logging subsystem, you should become aware of it. In your <filename>httpd.conf</filename> file are directives that specify the on-disk locations of the access and error logs generated by Apache (the <literal>CustomLog</literal> and <literal>ErrorLog</literal> directives, respectively). Subversion's mod_dav_svn uses Apache's error logging interface as well. You can always browse the contents of those files for information that might reveal the source of a problem that is not clearly noticeable otherwise."
13404 msgstr "同样,当你修改你的Apache设置,很有可能会出现一些错误,如果你还不熟悉Apache的日志子系统,你一定需要认识到这一点。在你的文件<filename>httpd.conf</filename>里会指定Apache生成的访问和错误日志(<literal>CustomLog</literal>和<literal>ErrorLog</literal>指示)的磁盘位置。Subversion的mod_dav_svn使用Apache的错误日志接口,你可以浏览这个文件的内容查看信息来查找难于发现的问题根源。"
13406 #. (title)
13407 #: ../source/book.xml:13185
13408 msgid "Why Apache 2?"
13409 msgstr "为什么是 Apache 2?"
13411 #. (para)
13412 #: ../source/book.xml:13187
13413 msgid "If you're a system administrator, it's very likely that you're already running the Apache web server and have some prior experience with it. At the time of writing, Apache 1.3 is by far the most popular version of Apache. The world has been somewhat slow to upgrade to the Apache 2.X series for various reasons: some people fear change, especially changing something as critical as a web server. Other people depend on plug-in modules that only work against the Apache 1.3 API, and are waiting for a 2.X port. Whatever the reason, many people begin to worry when they first discover that Subversion's Apache module is written specifically for the Apache 2 API."
13414 msgstr "如果你系统管理员,很有可能是你已经运行了Apache服务器,并且有一些高级经验。写本文的时候,Apache 1.3是Apache最流行的版本,这个世界因为许多原因而放缓升级到2.X系列:如人们害怕改变,特别是像web服务器这种重要的变化,有些人需要一些在Apache 1.3 API下工作的插件模块,在等待2.X的版本。无论什么原因,许多人会在首次发现Subversion的Apache模块只是为Apache 2 API写的后开始担心。"
13416 #. (para)
13417 #: ../source/book.xml:13198
13418 msgid "The proper response to this problem is: don't worry about it. It's easy to run Apache 1.3 and Apache 2 side-by-side; simply install them to separate places, and use Apache 2 as a dedicated Subversion server that runs on a port other than 80. Clients can access the repository by placing the port number into the URL:"
13419 msgstr "对此问题的适当反应是:不需要担心,同时运行Apache 1.3和Apache 2非常简单,只需要安装到不同的位置,用Apache 2作为Subversion的专用服务器,并且不使用80端口,客户端可以访问版本库时在URL里指定端口:"
13421 #. (screen)
13422 #: ../source/book.xml:13204
13423 #, no-wrap
13424 msgid ""
13425 "\n"
13426 "$ svn checkout http://host.example.com:7382/repos/project\n"
13427 "…\n"
13428 msgstr ""
13429 "\n"
13430 "$ svn checkout http://host.example.com:7382/repos/project\n"
13431 "…\n"
13433 #. (title)
13434 #: ../source/book.xml:13212
13435 msgid "Prerequisites"
13436 msgstr "先决条件"
13438 #. (para)
13439 #: ../source/book.xml:13214
13440 #, fuzzy
13441 msgid "To network your repository over HTTP, you basically need four components, available in two packages. You'll need Apache <command>httpd</command> 2.0, the <command>mod_dav</command> DAV module that comes with it, Subversion, and the <command>mod_dav_svn</command> filesystem provider module distributed with Subversion. Once you have all of those components, the process of networking your repository is as simple as:"
13442 msgstr "为了让你的版本库使用HTTP网络,你基本上需要两个包里的四个部分。你需要Apache <command>httpd</command> 2.0和包括的<command>mod_dav</command> DAV模块,Subversion和与之一同分发的<command>mod_dav_svn</command>文件系统提供者模块,如果你有了这些组件,网络化你的版本库将非常简单,如:"
13444 #. (para)
13445 #: ../source/book.xml:13224
13446 msgid "getting httpd 2.0 up and running with the mod_dav module,"
13447 msgstr "配置好httpd 2.0,并且使用mod_dav启动,"
13449 #. (para)
13450 #: ../source/book.xml:13228
13451 msgid "installing the mod_dav_svn plugin to mod_dav, which uses Subversion's libraries to access the repository, and"
13452 msgstr "为mod_dav安装mod_dav_svn插件,它会使用Subversion的库访问版本库,并且"
13454 #. (para)
13455 #: ../source/book.xml:13233
13456 #, fuzzy
13457 msgid "configuring your <filename>httpd.conf</filename> file to export (or expose) the repository."
13458 msgstr "配置你的<filename>httpd.conf</filename>来输出(或者说暴露)版本库。"
13460 #. (para)
13461 #: ../source/book.xml:13237
13462 #, fuzzy
13463 msgid "You can accomplish the first two items either by compiling <command>httpd</command> and Subversion from source code, or by installing pre-built binary packages of them on your system. For the most up-to-date information on how to compile Subversion for use with the Apache HTTP Server, as well as how to compile and configure Apache itself for this purpose, see the <filename>INSTALL</filename> file in the top level of the Subversion source code tree."
13464 msgstr "你可以通过从源代码编译<command>httpd</command>和Subversion来完成前两个项目,也可以通过你的系统上的已经编译好的二进制包来安装。最新的使用Apache HTTP的Subversion的编译方法和Apache的配置方式可以看Subversion源代码树根目录的<filename>INSTALL</filename>文件。"
13466 #. (title)
13467 #: ../source/book.xml:13249
13468 msgid "Basic Apache Configuration"
13469 msgstr "基本的 Apache 配置"
13471 #. (para)
13472 #: ../source/book.xml:13251
13473 #, fuzzy
13474 msgid "Once you have all the necessary components installed on your system, all that remains is the configuration of Apache via its <filename>httpd.conf</filename> file. Instruct Apache to load the mod_dav_svn module using the <literal>LoadModule</literal> directive. This directive must precede any other Subversion-related configuration items. If your Apache was installed using the default layout, your <command>mod_dav_svn</command> module should have been installed in the <filename>modules</filename> subdirectory of the Apache install location (often <filename>/usr/local/apache2</filename>). The <literal>LoadModule</literal> directive has a simple syntax, mapping a named module to the location of a shared library on disk:"
13475 msgstr "一旦你安装了必须的组件,剩下的工作就是在<filename>httpd.conf</filename>里配置Apache,使用<literal>LoadModule</literal>来加载mod_dav_svn模块,这个指示必须先与其它Subversion相关的其它配置出现,如果你的Apache使用缺省布局安装,你的<command>mod_dav_svn</command>模块一定在Apache安装目录(通常是在<filename>/usr/local/apache2</filename>)的<filename>modules</filename>子目录,<literal>LoadModule</literal>指示的语法很简单,影射一个名字到它的共享库的物理位置:"
13477 #. (screen)
13478 #: ../source/book.xml:13265
13479 #, no-wrap
13480 msgid ""
13481 "\n"
13482 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
13483 msgstr ""
13484 "\n"
13485 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
13487 #. (para)
13488 #: ../source/book.xml:13268
13489 #, fuzzy
13490 msgid "Note that if <command>mod_dav</command> was compiled as a shared object (instead of statically linked directly to the <command>httpd</command> binary), you'll need a similar <literal>LoadModule</literal> statement for it, too. Be sure that it comes before the <command>mod_dav_svn</command> line:"
13491 msgstr "注意,如果<command>mod_dav</command>是作为共享对象编译(而不是静态链接到<command>httpd</command>程序),你需要为它使用使用<literal>LoadModule</literal>语句,一定确定它在<command>mod_dav_svn</command>之前:"
13493 #. (screen)
13494 #: ../source/book.xml:13273
13495 #, no-wrap
13496 msgid ""
13497 "\n"
13498 "LoadModule dav_module         modules/mod_dav.so\n"
13499 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
13500 msgstr ""
13501 "\n"
13502 "LoadModule dav_module         modules/mod_dav.so\n"
13503 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
13505 #. (para)
13506 #: ../source/book.xml:13277
13507 #, fuzzy
13508 msgid "At a later location in your configuration file, you now need to tell Apache where you keep your Subversion repository (or repositories). The <literal>Location</literal> directive has an XML-like notation, starting with an opening tag, and ending with a closing tag, with various other configuration directives in the middle. The purpose of the <literal>Location</literal> directive is to instruct Apache to do something special when handling requests that are directed at a given URL or one of its children. In the case of Subversion, you want Apache to simply hand off support for URLs that point at versioned resources to the DAV layer. You can instruct Apache to delegate the handling of all URLs whose path portions (the part of the URL that follows the server's name and the optional port number) begin with <filename>/repos/</filename> to a DAV provider whose repository is located at <filename>/var/svn/repository</filename> using the following <filename>httpd.conf</filename> syntax:"
13509 msgstr "在你的配置文件后面的位置,你需要告诉Apache你在什么地方保存Subversion版本库(也许是多个),<literal>位置</literal>指示有一个很像XML的符号,开始于一个开始标签,以一个结束标签结束,配合中间许多的其它配置。<literal>Location</literal>指示的目的是告诉Apache在特定的URL以及子URL下需要特殊的处理,如果是为Subversion准备的,你希望可以通过告诉Apache特定URL是指向版本化的资源,从而把支持转交给DAV层,你可以告诉Apache将所有路径部分(URL中服务器名称和端口之后的部分)以<filename>/repos/</filename>开头的URL交由DAV服务提供者处理。一个DAV服务提供者的版本库位于<filename>/absolute/path/to/repository</filename>,可以使用如下的<filename>httpd.conf</filename>语法:"
13511 #. (screen)
13512 #: ../source/book.xml:13295
13513 #, fuzzy, no-wrap
13514 msgid ""
13515 "\n"
13516 "&lt;Location /repos&gt;\n"
13517 "  DAV svn\n"
13518 "  SVNPath /var/svn/repository\n"
13519 "&lt;/Location&gt;\n"
13520 msgstr ""
13521 "\n"
13522 "&lt;Location /repos&gt;\n"
13523 "  DAV svn\n"
13524 "  SVNPath /absolute/path/to/repository\n"
13525 "&lt;/Location&gt;\n"
13527 #. (para)
13528 #: ../source/book.xml:13301
13529 #, fuzzy
13530 msgid "If you plan to support multiple Subversion repositories that will reside in the same parent directory on your local disk, you can use an alternative directive, the <literal>SVNParentPath</literal> directive, to indicate that common parent directory. For example, if you know you will be creating multiple Subversion repositories in a directory <filename>/var/svn</filename> that would be accessed via URLs like <uri>http://my.server.com/svn/repos1</uri>, <uri>http://my.server.com/svn/repos2</uri>, and so on, you could use the <filename>httpd.conf</filename> configuration syntax in the following example:"
13531 msgstr "如果你计划支持多个具备相同父目录的Subversion版本库,你有另外的选择,<literal>SVNParentPath</literal>指示,来表示共同的父目录。举个例子,如果你知道会在<filename>/usr/local/svn</filename>下创建多个Subversion版本库,并且通过类似<systemitem class=\"url\" moreinfo=\"none\">http://my.server.com/svn/repos1</systemitem>,<systemitem class=\"url\" moreinfo=\"none\">http://my.server.com/svn/repos2</systemitem>的URL访问,你可以用后面例子中的<filename>httpd.conf</filename>配置语法:"
13533 #. (screen)
13534 #: ../source/book.xml:13312
13535 #, fuzzy, no-wrap
13536 msgid ""
13537 "\n"
13538 "&lt;Location /svn&gt;\n"
13539 "  DAV svn\n"
13540 "\n"
13541 "  # any \"/svn/foo\" URL will map to a repository /var/svn/foo\n"
13542 "  SVNParentPath /var/svn\n"
13543 "&lt;/Location&gt;\n"
13544 msgstr ""
13545 "\n"
13546 "&lt;Location /svn&gt;\n"
13547 "  DAV svn\n"
13548 "\n"
13549 "  # any \"/svn/foo\" URL will map to a repository /usr/local/svn/foo\n"
13550 "  SVNParentPath /usr/local/svn\n"
13551 "&lt;/Location&gt;\n"
13553 #. (para)
13554 #: ../source/book.xml:13320
13555 #, fuzzy
13556 msgid "Using the previous syntax, Apache will delegate the handling of all URLs whose path portions begin with <filename>/svn/</filename> to the Subversion DAV provider, which will then assume that any items in the directory specified by the <literal>SVNParentPath</literal> directive are actually Subversion repositories. This is a particularly convenient syntax in that, unlike the use of the <literal>SVNPath</literal> directive, you don't have to restart Apache in order to create and network new repositories."
13557 msgstr "使用上面的语法,Apache会代理所有URL路径部分为<filename>/svn/</filename>的请求到Subversion的DAV提供者,Subversion会认为<literal>SVNParentPath</literal>指定的目录下的所有项目是真实的Subversion版本库,这通常是一个便利的语法,不像是用<literal>SVNPath</literal>指示,我们在此不必为创建新的版本库而重启Apache。"
13559 #. (para)
13560 #: ../source/book.xml:13330
13561 #, fuzzy
13562 msgid "Be sure that when you define your new <literal>Location</literal>, it doesn't overlap with other exported Locations. For example, if your main <literal>DocumentRoot</literal> is exported to <filename>/www</filename>, do not export a Subversion repository in <literal>&lt;Location /www/repos&gt;</literal>. If a request comes in for the URI <filename>/www/repos/foo.c</filename>, Apache won't know whether to look for a file <filename>repos/foo.c</filename> in the <literal>DocumentRoot</literal>, or whether to delegate <command>mod_dav_svn</command> to return <filename>foo.c</filename> from the Subversion repository. The result is often an error from the server of the form <literal>301 Moved Permanently</literal>."
13563 msgstr "请确定当你定义新的<literal>Location</literal>,不会与其它输出的位置重叠。例如你的主要<literal>DocumentRoot</literal>是<filename>/www</filename>,不要把Subversion版本库输出到<literal>&lt;Location /www/repos&gt;</literal>,如果一个请求的URI是<filename>/www/repos/foo.c</filename>,Apache不知道是直接到<filename>repos/foo.c</filename>访问这个文件还是让<command>mod_dav_svn</command>代理从Subversion版本库返回<filename>foo.c</filename>。"
13565 #. (title)
13566 #: ../source/book.xml:13346
13567 msgid "Server Names and the COPY Request"
13568 msgstr "服务器名称和复制请求"
13570 #. (para)
13571 #: ../source/book.xml:13348
13572 #, fuzzy
13573 msgid "Subversion makes use of the <literal>COPY</literal> request type to perform server-side copies of files and directories. As part of the sanity checking done by the Apache modules, the source of the copy is expected to be located on the same machine as the destination of the copy. To satisfy this requirement, you might need to tell mod_dav the name you use as the hostname of your server. Generally, you can use the <literal>ServerName</literal> directive in <filename>httpd.conf</filename> to accomplish this."
13574 msgstr "Subversion利用<literal>COPY</literal>请求类型来执行服务器端的文件和目录拷贝,作为一个健全的Apache模块的一部分,拷贝源和拷贝的目标通常坐落在同一个机器上,为了满足这个需求,你或许需要告诉mod_dav服务器主机的名称,通常你可以使用<filename>httpd.conf</filename>的<literal>ServerName</literal>指示来完成此目的。"
13576 #. (screen)
13577 #: ../source/book.xml:13357
13578 #, no-wrap
13579 msgid ""
13580 "\n"
13581 "ServerName svn.example.com\n"
13582 msgstr ""
13583 "\n"
13584 "ServerName svn.example.com\n"
13586 #. (para)
13587 #: ../source/book.xml:13360
13588 #, fuzzy
13589 msgid "If you are using Apache's virtual hosting support via the <literal>NameVirtualHost</literal> directive, you may need to use the <literal>ServerAlias</literal> directive to specify additional names that your server is known by. Again, refer to the Apache documentation for full details."
13590 msgstr "如果你通过<literal>NameVirtualHost</literal>指示使用Apache的虚拟主机,你或许需要<literal>ServerAlias</literal>指示来指定额外的名称,再说一次,可以查看Apache文档的来得到更多细节。"
13592 #. (para)
13593 #: ../source/book.xml:13367
13594 msgid "At this stage, you should strongly consider the question of permissions. If you've been running Apache for some time now as your regular web server, you probably already have a collection of content—web pages, scripts and such. These items have already been configured with a set of permissions that allows them to work with Apache, or more appropriately, that allows Apache to work with those files. Apache, when used as a Subversion server, will also need the correct permissions to read and write to your Subversion repository."
13595 msgstr "在本阶段,你一定要考虑访问权限问题,如果你已经作为普通的web服务器运行过Apache,你一定有了一些内容—网页、脚本和其他。这些项目已经配置了许多在Apache下可以工作的访问许可,或者更准确一点,允许Apache与这些文件一起工作。Apache当作为Subversion服务器运行时,同样需要正确的访问许可来读写你的Subversion版本库。"
13597 #. (para)
13598 #: ../source/book.xml:13377
13599 #, fuzzy
13600 msgid "You will need to determine a permission system setup that satisfies Subversion's requirements without messing up any previously existing web page or script installations. This might mean changing the permissions on your Subversion repository to match those in use by other things that Apache serves for you, or it could mean using the <literal>User</literal> and <literal>Group</literal> directives in <filename>httpd.conf</filename> to specify that Apache should run as the user and group that owns your Subversion repository. There is no single correct way to set up your permissions, and each administrator will have different reasons for doing things a certain way. Just be aware that permission-related problems are perhaps the most common oversight when configuring a Subversion repository for use with Apache."
13601 msgstr "你会需要检验权限系统的设置满足Subversion的需求,同时不会把以前的页面和脚本搞乱。这或许意味着修改Subversion的访问许可来配合Apache服务器已经使用的工具,或者可能意味着需要使用<filename>httpd.conf</filename>的<literal>User</literal>和<literal>Group</literal>指示来指定Apache作为运行的用户和Subversion版本库的组。并不是只有一条正确的方式来设置许可,每个管理员都有不同的原因来以特定的方式操作,只需要意识到许可关联的问题经常在为Apache配置Subversion版本库的过程中被疏忽。"
13603 #. (title)
13604 #: ../source/book.xml:13396
13605 msgid "Authentication Options"
13606 msgstr "认证选项"
13608 #. (para)
13609 #: ../source/book.xml:13398
13610 #, fuzzy
13611 msgid "At this point, if you configured <filename>httpd.conf</filename> to contain something like"
13612 msgstr "此时,如果你配置的<filename>httpd.conf</filename>保存如下的内容"
13614 #. (screen)
13615 #: ../source/book.xml:13400
13616 #, fuzzy, no-wrap
13617 msgid ""
13618 "\n"
13619 "&lt;Location /svn&gt;\n"
13620 "  DAV svn\n"
13621 "  SVNParentPath /var/svn\n"
13622 "&lt;/Location&gt;\n"
13623 msgstr ""
13624 "\n"
13625 "&lt;Location /svn&gt;\n"
13626 "  DAV svn\n"
13627 "  SVNParentPath /usr/local/svn\n"
13628 "&lt;/Location&gt;\n"
13630 #. (para)
13631 #: ../source/book.xml:13406
13632 #, fuzzy
13633 msgid "…then your repository is <quote>anonymously</quote> accessible to the world. Until you configure some authentication and authorization policies, the Subversion repositories you make available via the <literal>Location</literal> directive will be generally accessible to everyone. In other words,"
13634 msgstr "这样你的版本库对全世界是可以<quote>匿名</quote>访问的,直到你配置了一些认证授权政策,你通过<literal>Location</literal>指示来使Subversion版本库可以被任何人访问,换句话说,"
13636 #. (para)
13637 #: ../source/book.xml:13414
13638 #, fuzzy
13639 msgid "anyone can use their Subversion client to check out a working copy of a repository URL (or any of its subdirectories),"
13640 msgstr "任何人可以使用Subversion客户端来从版本库URL取出一个工作拷贝(或者是它的子目录),"
13642 #. (para)
13643 #: ../source/book.xml:13419
13644 msgid "anyone can interactively browse the repository's latest revision simply by pointing their web browser to the repository URL, and"
13645 msgstr "任何人可以在浏览器输入版本库URL交互浏览的方式来查看版本库的最新修订版本,并且"
13647 #. (para)
13648 #: ../source/book.xml:13424
13649 msgid "anyone can commit to the repository."
13650 msgstr "任何人可以提交到版本库。"
13652 #. (para)
13653 #: ../source/book.xml:13427
13654 #, fuzzy
13655 msgid "Of course, you might have already set up a <filename>pre-commit</filename> hook script to prevent commits (see <xref linkend=\"svn.reposadmin.create.hooks\"/>). But as you read on, you'll see that it's also possible use Apache's built-in methods to restrict access in specific ways."
13656 msgstr "当然,你也许已经设置了<filename>pre-commit</filename>钩子来防止提交(见<xref linkend=\"svn.reposadmin.create.hooks\"/>),但是就像你读到的,也可以使用Apache内置的方法来限制访问。"
13658 #. (title)
13659 #: ../source/book.xml:13436
13660 msgid "Basic HTTP Authentication"
13661 msgstr "基本 HTTP 认证"
13663 #. (para)
13664 #: ../source/book.xml:13438
13665 #, fuzzy
13666 msgid "The easiest way to authenticate a client is via the HTTP Basic authentication mechanism, which simply uses a username and password to verify that a user is who she says she is. Apache provides an <command>htpasswd</command> utility for managing the list of acceptable usernames and passwords. Let's grant commit access to Sally and Harry. First, we need to add them to the password file."
13667 msgstr "最简单的客户端认证方式是通过HTTP基本认证机制,简单的使用用户名和密码来验证一个用户所自称的身份,Apache提供了一个<command>htpasswd</command>工具来管理可接受的用户名和密码,这些就是你希望赋予Subversion特别权限的用户,让我们给Sally和Harry赋予提交权限,首先,我们需要添加他们到密码文件。"
13669 #. (screen)
13670 #: ../source/book.xml:13446
13671 #, no-wrap
13672 msgid ""
13673 "\n"
13674 "$ ### First time: use -c to create the file\n"
13675 "$ ### Use -m to use MD5 encryption of the password, which is more secure\n"
13676 "$ htpasswd -cm /etc/svn-auth-file harry\n"
13677 "New password: *****\n"
13678 "Re-type new password: *****\n"
13679 "Adding password for user harry\n"
13680 "$ htpasswd -m /etc/svn-auth-file sally\n"
13681 "New password: *******\n"
13682 "Re-type new password: *******\n"
13683 "Adding password for user sally\n"
13684 "$\n"
13685 msgstr ""
13686 "\n"
13687 "$ ### First time: use -c to create the file\n"
13688 "$ ### Use -m to use MD5 encryption of the password, which is more secure\n"
13689 "$ htpasswd -cm /etc/svn-auth-file harry\n"
13690 "New password: *****\n"
13691 "Re-type new password: *****\n"
13692 "Adding password for user harry\n"
13693 "$ htpasswd -m /etc/svn-auth-file sally\n"
13694 "New password: *******\n"
13695 "Re-type new password: *******\n"
13696 "Adding password for user sally\n"
13697 "$\n"
13699 #. (para)
13700 #: ../source/book.xml:13459
13701 #, fuzzy
13702 msgid "Next, you need to add some more <filename>httpd.conf</filename> directives inside your <literal>Location</literal> block to tell Apache what to do with your new password file. The <literal>AuthType</literal> directive specifies the type of authentication system to use. In this case, we want to specify the <literal>Basic</literal> authentication system. <literal>AuthName</literal> is an arbitrary name that you give for the authentication domain. Most browsers will display this name in the pop-up dialog box when the browser is querying the user for his name and password. Finally, use the <literal>AuthUserFile</literal> directive to specify the location of the password file you created using <command>htpasswd</command>."
13703 msgstr "下一步,你需要在<filename>httpd.conf</filename>的<literal>Location</literal>区里添加一些指示来告诉Apache如何来使用这些密码文件,<literal>AuthType</literal>指示指定系统使用的认证类型,这种情况下,我们需要指定<literal>Basic</literal>认证系统,<literal>AuthName</literal>是你提供给认证域一个任意名称,大多数浏览器会在向用户询问名称和密码的弹出窗口里显示这个名称,最终,使用<literal>AuthUserFile</literal>指示来指定使用<command>htpasswd</command>创建的密码文件的位置。"
13705 #. (para)
13706 #: ../source/book.xml:13473
13707 #, fuzzy
13708 msgid "After adding these three directives, your <literal>&lt;Location&gt;</literal> block should look something like this:"
13709 msgstr "添加完这三个指示,你的<literal>&lt;Location&gt;</literal>区块一定像这个样子:"
13711 #. (screen)
13712 #: ../source/book.xml:13476
13713 #, fuzzy, no-wrap
13714 msgid ""
13715 "\n"
13716 "&lt;Location /svn&gt;\n"
13717 "  DAV svn\n"
13718 "  SVNParentPath /var/svn\n"
13719 "  AuthType Basic\n"
13720 "  AuthName \"Subversion repository\"\n"
13721 "  AuthUserFile /etc/svn-auth-file\n"
13722 "&lt;/Location&gt;\n"
13723 msgstr ""
13724 "\n"
13725 "&lt;Location /svn&gt;\n"
13726 "  DAV svn\n"
13727 "  SVNParentPath /usr/local/svn\n"
13728 "  AuthType Basic\n"
13729 "  AuthName \"Subversion repository\"\n"
13730 "  AuthUserFile /etc/svn-auth-file\n"
13731 "&lt;/Location&gt;\n"
13733 #. (para)
13734 #: ../source/book.xml:13485
13735 #, fuzzy
13736 msgid "This <literal>&lt;Location&gt;</literal> block is not yet complete, and will not do anything useful. It's merely telling Apache that whenever authorization is required, Apache should harvest a username and password from the Subversion client. What's missing here, however, are directives that tell Apache <emphasis>which</emphasis> sorts of client requests require authorization. Wherever authorization is required, Apache will demand authentication as well. The simplest thing to do is protect all requests. Adding <literal>Require valid-user</literal> tells Apache that all requests require an authenticated user:"
13737 msgstr "这个<literal>&lt;Location&gt;</literal>区块还没有结束,还不能做任何有用的事情,它只是告诉Apache当需要授权时,要去向Subversion客户端索要用户名和密码。我们这里遗漏的,是一些告诉Apache<emphasis>什么样</emphasis>客户端需要授权的指示。哪里需要授权,Apache就会在哪里要求认证,最简单的方式是保护所有的请求,添加<literal>Require valid-user</literal>来告诉Apache任何请求需要认证的用户:"
13739 #. (screen)
13740 #: ../source/book.xml:13497
13741 #, fuzzy, no-wrap
13742 msgid ""
13743 "\n"
13744 "&lt;Location /svn&gt;\n"
13745 "  DAV svn\n"
13746 "  SVNParentPath /var/svn\n"
13747 "  AuthType Basic\n"
13748 "  AuthName \"Subversion repository\"\n"
13749 "  AuthUserFile /etc/svn-auth-file\n"
13750 "  Require valid-user\n"
13751 "&lt;/Location&gt;\n"
13752 msgstr ""
13753 "\n"
13754 "&lt;Location /svn&gt;\n"
13755 "  DAV svn\n"
13756 "  SVNParentPath /usr/local/svn\n"
13757 "  AuthType Basic\n"
13758 "  AuthName \"Subversion repository\"\n"
13759 "  AuthUserFile /etc/svn-auth-file\n"
13760 "  Require valid-user\n"
13761 "&lt;/Location&gt;\n"
13763 #. (para)
13764 #: ../source/book.xml:13507
13765 #, fuzzy
13766 msgid "Be sure to read the next section (<xref linkend=\"svn.serverconfig.httpd.authz\"/>) for more detail on the <literal>Require</literal> directive and other ways to set authorization policies."
13767 msgstr "一定要阅读后面的部分(<xref linkend=\"svn.serverconfig.httpd.authz\"/>)来得到<literal>Require</literal>的细节,和授权政策的其他设置方法。"
13769 #. (para)
13770 #: ../source/book.xml:13518
13771 #, fuzzy
13772 msgid "While self-signed server certificates are still vulnerable to a <quote>man in the middle</quote> attack, such an attack is much more difficult for a casual observer to pull off, compared to sniffing unprotected passwords."
13773 msgstr "当使用自签名的服务器时仍会遭受<quote>中间人</quote>攻击,但是与偷取未保护的密码相比,这样的攻击比一个偶然的获取要艰难许多。"
13775 #. (para)
13776 #: ../source/book.xml:13510
13777 #, fuzzy
13778 msgid "One word of warning: HTTP Basic Auth passwords pass in very nearly plain-text over the network, and thus are extremely insecure. If you're worried about password snooping, it may be best to use some sort of SSL encryption, so that clients authenticate via <literal>https://</literal> instead of <literal>http://</literal>; at a bare minimum, you can configure Apache to use a self-signed server certificate. <placeholder-1/> Consult Apache's documentation (and OpenSSL documentation) about how to do that."
13779 msgstr "需要警惕:HTTP基本认证的密码是用明文传输,因此非常不可靠的,如果你担心密码偷窥,最好是使用某种SSL加密,所以客户端认证使用<literal>https://</literal>而不是<literal>http://</literal>,为了方便,你可以配置Apache为自签名认证。 <placeholder-1/>参考Apache的文档(和OpenSSL文档)来查看怎样做。"
13781 #. (title)
13782 #: ../source/book.xml:13529
13783 msgid "SSL Certificate Management"
13784 msgstr "SSL 证书管理"
13786 #. (para)
13787 #: ../source/book.xml:13531
13788 msgid "Businesses that need to expose their repositories for access outside the company firewall should be conscious of the possibility that unauthorized parties could be <quote>sniffing</quote> their network traffic. SSL makes that kind of unwanted attention less likely to result in sensitive data leaks."
13789 msgstr "商业应用需要越过公司防火墙的版本库访问,防火墙需要小心的考虑非认证用户<quote>吸取</quote>他们的网络流量的情况,SSL让那种形式的关注更不容易导致敏感数据泄露。"
13791 #. (para)
13792 #: ../source/book.xml:13537
13793 #, fuzzy
13794 msgid "If a Subversion client is compiled to use OpenSSL, then it gains the ability to speak to an Apache server via <literal>https://</literal> URLs. The Neon library used by the Subversion client is not only able to verify server certificates, but can also supply client certificates when challenged. When the client and server have exchanged SSL certificates and successfully authenticated one another, all further communication is encrypted via a session key."
13795 msgstr "如果Subversion使用OpenSSL编译,它就会具备与Subversion服务器使用<literal>https://</literal>的URL通讯的能力,Subversion客户端使用的Neon库不仅仅可以用来验证服务器证书,也可以必要时提供客户端证书,如果客户端和服务器交换了SSL证书并且成功地互相认证,所有剩下的交流都会通过一个会话关键字加密。"
13797 #. (para)
13798 #: ../source/book.xml:13545
13799 msgid "It's beyond the scope of this book to describe how to generate client and server certificates, and how to configure Apache to use them. Many other books, including Apache's own documentation, describe this task. But what <emphasis>can</emphasis> be covered here is how to manage server and client certificates from an ordinary Subversion client."
13800 msgstr "怎样产生客户端和服务器端证书以及怎样使用它们已经超出了本书的范围,许多书籍,包括Apache自己的文档,描述这个任务,现在我们<emphasis>可以</emphasis>覆盖的是普通的客户端怎样来管理服务器与客户端证书。"
13802 #. (para)
13803 #: ../source/book.xml:13552
13804 #, fuzzy
13805 msgid "When speaking to Apache via <literal>https://</literal>, a Subversion client can receive two different types of information:"
13806 msgstr "当通过<literal>https://</literal>与Apache通讯时,一个Subversion客户端可以接收两种类型的信息:"
13808 #. (para)
13809 #: ../source/book.xml:13557
13810 msgid "a server certificate"
13811 msgstr "一个服务器证书"
13813 #. (para)
13814 #: ../source/book.xml:13560
13815 msgid "a demand for a client certificate"
13816 msgstr "一个客户端证书的要求"
13818 #. (para)
13819 #: ../source/book.xml:13563
13820 msgid "If the client receives a server certificate, it needs to verify that it trusts the certificate: is the server really who it claims to be? The OpenSSL library does this by examining the signer of the server certificate, or <firstterm>certifying authority</firstterm> (CA). If OpenSSL is unable to automatically trust the CA, or if some other problem occurs (such as an expired certificate or hostname mismatch), the Subversion command-line client will ask you whether you want to trust the server certificate anyway:"
13821 msgstr "如果客户端接收了一个服务器证书,它需要去验证它是可以相信的:这个服务器是它自称的那一个吗?OpenSSL库会去检验服务器证书的签名人或者是<firstterm>核证机构</firstterm>(CA)。如果OpenSSL不可以自动信任这个CA,或者是一些其他的问题(如证书过期或者是主机名不匹配),Subversion命令行客户端会询问你是否愿意仍然信任这个证书:"
13823 #. (screen)
13824 #: ../source/book.xml:13573
13825 #, no-wrap
13826 msgid ""
13827 "\n"
13828 "$ svn list https://host.example.com/repos/project\n"
13829 "\n"
13830 "Error validating server certificate for 'https://host.example.com:443':\n"
13831 " - The certificate is not issued by a trusted authority. Use the\n"
13832 "   fingerprint to validate the certificate manually!\n"
13833 "Certificate information:\n"
13834 " - Hostname: host.example.com\n"
13835 " - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT\n"
13836 " - Issuer: CA, example.com, Sometown, California, US\n"
13837 " - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b\n"
13838 "\n"
13839 "(R)eject, accept (t)emporarily or accept (p)ermanently?\n"
13840 msgstr ""
13841 "\n"
13842 "$ svn list https://host.example.com/repos/project\n"
13843 "\n"
13844 "Error validating server certificate for 'https://host.example.com:443':\n"
13845 " - The certificate is not issued by a trusted authority. Use the\n"
13846 "   fingerprint to validate the certificate manually!\n"
13847 "Certificate information:\n"
13848 " - Hostname: host.example.com\n"
13849 " - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT\n"
13850 " - Issuer: CA, example.com, Sometown, California, US\n"
13851 " - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b\n"
13852 "\n"
13853 "(R)eject, accept (t)emporarily or accept (p)ermanently?\n"
13855 #. (para)
13856 #: ../source/book.xml:13587
13857 #, fuzzy
13858 msgid "This dialogue should look familiar; it's essentially the same question you've probably seen coming from your web browser (which is just another HTTP client like Subversion). If you choose the (p)ermanent option, the server certificate will be cached in your private run-time <filename>auth/</filename> area in just the same way your username and password are cached (see <xref linkend=\"svn.serverconfig.netmodel.credcache\"/>). If cached, Subversion will automatically trust this certificate in future negotiations."
13859 msgstr "这个对话看起来很熟悉,这是你会在web浏览器(另一种HTTP客户端,就像Subversion)经常看到的问题,如果你选择(p)ermanent选项,服务器证书会存放在你存放那个用户名和密码缓存(见<xref linkend=\"svn.serverconfig.netmodel.credcache\"/>。)的私有运行区<filename>auth/</filename>中,缓存后,Subversion会自动记住在以后的交流中信任这个证书。"
13861 #. (para)
13862 #: ../source/book.xml:13596
13863 #, fuzzy
13864 msgid "Your run-time <filename>servers</filename> file also gives you the ability to make your Subversion client automatically trust specific CAs, either globally or on a per-host basis. Simply set the <literal>ssl-authority-files</literal> variable to a semicolon-separated list of PEM-encoded CA certificates:"
13865 msgstr "你的运行中<filename>servers</filename>文件也会给你能力可以让Subversion客户端自动信任特定的CA,包括全局的或是每主机为基础的,只需要设置<literal>ssl-authority-files</literal>为一组逗号隔开的PEM加密的CA证书列表:"
13867 #. (screen)
13868 #: ../source/book.xml:13602
13869 #, no-wrap
13870 msgid ""
13871 "\n"
13872 "[global]\n"
13873 "ssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem\n"
13874 msgstr ""
13875 "\n"
13876 "[global]\n"
13877 "ssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem\n"
13879 #. (para)
13880 #: ../source/book.xml:13606
13881 #, fuzzy
13882 msgid "Many OpenSSL installations also have a pre-defined set of <quote>default</quote> CAs that are nearly universally trusted. To make the Subversion client automatically trust these standard authorities, set the <literal>ssl-trust-default-ca</literal> variable to <literal>true</literal>."
13883 msgstr "许多OpenSSL安装包括一些预先定义好的可以普遍信任的<quote>缺省的</quote>CA,为了让Subversion客户端自动信任这些标准权威,设置<literal>ssl-trust-default-ca</literal>为<literal>true</literal>。"
13885 #. (para)
13886 #: ../source/book.xml:13612
13887 msgid "When talking to Apache, a Subversion client might also receive a challenge for a client certificate. Apache is asking the client to identify itself: is the client really who it says it is? If all goes correctly, the Subversion client sends back a private certificate signed by a CA that Apache trusts. A client certificate is usually stored on disk in encrypted format, protected by a local password. When Subversion receives this challenge, it will ask you for both a path to the certificate and the password which protects it:"
13888 msgstr "当与Apache通话时,Subversion客户端也会收到一个证书的要求,Apache是询问客户端来证明自己的身份:这个客户端是否是他所说的那一个?如果一切正常,Subversion客户端会发送回一个通过Apache信任的CA签名的私有证书,一个客户端证书通常会以加密方式存放在磁盘,使用本地密码保护,当Subversion收到这个要求,它会询问你证书的路径和保护用的密码:"
13890 #. (screen)
13891 #: ../source/book.xml:13622
13892 #, no-wrap
13893 msgid ""
13894 "\n"
13895 "$ svn list https://host.example.com/repos/project\n"
13896 "\n"
13897 "Authentication realm: https://host.example.com:443\n"
13898 "Client certificate filename: /path/to/my/cert.p12\n"
13899 "Passphrase for '/path/to/my/cert.p12':  ********\n"
13900 "…\n"
13901 msgstr ""
13902 "\n"
13903 "$ svn list https://host.example.com/repos/project\n"
13904 "\n"
13905 "Authentication realm: https://host.example.com:443\n"
13906 "Client certificate filename: /path/to/my/cert.p12\n"
13907 "Passphrase for '/path/to/my/cert.p12':  ********\n"
13908 "…\n"
13910 #. (para)
13911 #: ../source/book.xml:13630
13912 msgid "Notice that the client certificate is a <quote>p12</quote> file. To use a client certificate with Subversion, it must be in PKCS#12 format, which is a portable standard. Most web browsers are already able to import and export certificates in that format. Another option is to use the OpenSSL command-line tools to convert existing certificates into PKCS#12."
13913 msgstr "注意这个客户端证书是一个<quote>p12</quote>文件,为了让Subversion使用客户端证书,它必须是运输标准的PKCS#12格式,大多数浏览器可以导入和导出这种格式的证书,另一个选择是用OpenSSL命令行工具来转化存在的证书为PKCS#12格式。"
13915 #. (para)
13916 #: ../source/book.xml:13637
13917 #, fuzzy
13918 msgid "Again, the runtime <filename>servers</filename> file allows you to automate this challenge on a per-host basis. Either or both pieces of information can be described in runtime variables:"
13919 msgstr "再次,运行中<filename>servers</filename>文件允许你为每个主机自动响应这种要求,单个或两条信息可以用运行参数来描述:"
13921 #. (screen)
13922 #: ../source/book.xml:13641
13923 #, no-wrap
13924 msgid ""
13925 "\n"
13926 "[groups]\n"
13927 "examplehost = host.example.com\n"
13928 "\n"
13929 "[examplehost]\n"
13930 "ssl-client-cert-file = /path/to/my/cert.p12\n"
13931 "ssl-client-cert-password = somepassword\n"
13932 msgstr ""
13933 "\n"
13934 "[groups]\n"
13935 "examplehost = host.example.com\n"
13936 "\n"
13937 "[examplehost]\n"
13938 "ssl-client-cert-file = /path/to/my/cert.p12\n"
13939 "ssl-client-cert-password = somepassword\n"
13941 #. (para)
13942 #: ../source/book.xml:13654
13943 #, fuzzy
13944 msgid "More security-conscious folk might not want to store the client certificate password in the runtime <filename>servers</filename> file."
13945 msgstr "更多有安全意识的人不会希望在运行中<filename>servers</filename>文件保存客户端证书密码。"
13947 #. (para)
13948 #: ../source/book.xml:13649
13949 #, fuzzy
13950 msgid "Once you've set the <literal>ssl-client-cert-file</literal> and <literal>ssl-client-cert-password</literal> variables, the Subversion client can automatically respond to a client certificate challenge without prompting you. <placeholder-1/>"
13951 msgstr "一旦你设置了<literal>ssl-client-cert-file</literal>和 <literal>ssl-client-cert-password</literal>参数,Subversion客户端可以自动响应客户端证书请求而不会打扰你。<placeholder-1/>"
13953 #. (title)
13954 #: ../source/book.xml:13663
13955 msgid "Authorization Options"
13956 msgstr "授权选项"
13958 #. (para)
13959 #: ../source/book.xml:13665
13960 msgid "At this point, you've configured authentication, but not authorization. Apache is able to challenge clients and confirm identities, but it has not been told how to allow or restrict access to the clients bearing those identities. This section describes two strategies for controlling access to your repositories."
13961 msgstr "此刻,你已经配置了认证,但是没有配置授权,Apache可以要求用户认证并且确定身份,但是并没有说明这个身份的怎样允许和限制,这个部分描述了两种控制访问版本库的策略。"
13963 #. (title)
13964 #: ../source/book.xml:13674
13965 msgid "Blanket Access Control"
13966 msgstr "整体访问控制"
13968 #. (para)
13969 #: ../source/book.xml:13676
13970 msgid "The simplest form of access control is to authorize certain users for either read-only access to a repository, or read/write access to a repository."
13971 msgstr "最简单的访问控制形式是授权特定用户为只读版本库访问或者是读/写访问版本库。"
13973 #. (para)
13974 #: ../source/book.xml:13679
13975 #, fuzzy
13976 msgid "You can restrict access on all repository operations by adding the <literal>Require valid-user</literal> directive to your <literal>&lt;Location&gt;</literal> block. Using our previous example, this would mean that only clients that claimed to be either <literal>harry</literal> or <literal>sally</literal>, and provided the correct password for their respective username, would be allowed to do anything with the Subversion repository:"
13977 msgstr "你可以通过在<literal>&lt;Location&gt;</literal>区块添加<literal>Require valid-user</literal>指示来限制所有的版本库操作,使用我们前面的例子,这意味着只有客户端只可以是<literal>harry</literal>或者<literal>sally</literal>,而且他们必须提供正确的用户名及对应密码,这样允许对Subversion版本库做任何事:"
13979 #. (screen)
13980 #: ../source/book.xml:13687
13981 #, fuzzy, no-wrap
13982 msgid ""
13983 "\n"
13984 "&lt;Location /svn&gt;\n"
13985 "  DAV svn\n"
13986 "  SVNParentPath /var/svn\n"
13987 "\n"
13988 "  # how to authenticate a user\n"
13989 "  AuthType Basic\n"
13990 "  AuthName \"Subversion repository\"\n"
13991 "  AuthUserFile /path/to/users/file\n"
13992 "\n"
13993 "  # only authenticated users may access the repository\n"
13994 "  Require valid-user\n"
13995 "&lt;/Location&gt;\n"
13996 msgstr ""
13997 "\n"
13998 "&lt;Location /svn&gt;\n"
13999 "  DAV svn\n"
14000 "  SVNParentPath /usr/local/svn\n"
14001 "\n"
14002 "  # how to authenticate a user\n"
14003 "  AuthType Basic\n"
14004 "  AuthName \"Subversion repository\"\n"
14005 "  AuthUserFile /path/to/users/file\n"
14006 "\n"
14007 "  # only authenticated users may access the repository\n"
14008 "  Require valid-user\n"
14009 "&lt;/Location&gt;\n"
14011 #. (para)
14012 #: ../source/book.xml:13701
14013 #, fuzzy
14014 msgid "Sometimes you don't need to run such a tight ship. For example, Subversion's own source code repository at <uri href=\"http://svn.collab.net/repos/svn\">http://svn.collab.net/repos/svn</uri> allows anyone in the world to perform read-only repository tasks (like checking out working copies and browsing the repository with a web browser), but restricts all write operations to authenticated users. To do this type of selective restriction, you can use the <literal>Limit</literal> and <literal>LimitExcept</literal> configuration directives. Like the <literal>Location</literal> directive, these blocks have starting and ending tags, and you would nest them inside your <literal>&lt;Location&gt;</literal> block."
14015 msgstr "有时候,你不需要这样严密,举个例子,Subversion自己在<ulink url=\"http://svn.collab.net/repos/svn\"/>的源代码允许全世界的人执行版本库的只读操作(例如检出我们的工作拷贝和使用浏览器浏览版本库),但是限定只有认证用户可以执行写操作。为了执行特定的限制,你可以使用<literal>Limit</literal>和<literal>LimitExcept</literal>配置指示,就像<literal>Location</literal>指示,这个区块有开始和结束标签,你需要在<literal>&lt;Location&gt;</literal>中添加这个指示。"
14017 #. (para)
14018 #: ../source/book.xml:13714
14019 #, fuzzy
14020 msgid "The parameters present on the <literal>Limit</literal> and <literal>LimitExcept</literal> directives are HTTP request types that are affected by that block. For example, if you wanted to disallow all access to your repository except the currently supported read-only operations, you would use the <literal>LimitExcept</literal> directive, passing the <literal>GET</literal>, <literal>PROPFIND</literal>, <literal>OPTIONS</literal>, and <literal>REPORT</literal> request type parameters. Then the previously mentioned <literal>Require valid-user</literal> directive would be placed inside the <literal>&lt;LimitExcept&gt;</literal> block instead of just inside the <literal>&lt;Location&gt;</literal> block."
14021 msgstr "在<literal>Limit</literal>和<literal>LimitExcept</literal>中使用的参数是可以被这个区块影响的HTTP请求类型,举个例子,如果你希望禁止所有的版本库访问,只是保留当前支持的只读操作,你可以使用<literal>LimitExcept</literal>指示,并且使用<literal>GET</literal>,<literal>PROPFIND</literal>,<literal>OPTIONS</literal>和<literal>REPORT</literal>请求类型参数,然后前面提到过的<literal>Require valid-user</literal>指示将会在<literal>&lt;LimitExcept&gt;</literal>区块中而不是在<literal>&lt;Location&gt;</literal>区块。"
14023 #. (screen)
14024 #: ../source/book.xml:13727
14025 #, fuzzy, no-wrap
14026 msgid ""
14027 "\n"
14028 "&lt;Location /svn&gt;\n"
14029 "  DAV svn\n"
14030 "  SVNParentPath /var/svn\n"
14031 "\n"
14032 "  # how to authenticate a user\n"
14033 "  AuthType Basic\n"
14034 "  AuthName \"Subversion repository\"\n"
14035 "  AuthUserFile /path/to/users/file\n"
14036 "\n"
14037 "  # For any operations other than these, require an authenticated user.\n"
14038 "  &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;\n"
14039 "    Require valid-user\n"
14040 "  &lt;/LimitExcept&gt;\n"
14041 "&lt;/Location&gt;\n"
14042 msgstr ""
14043 "\n"
14044 "&lt;Location /svn&gt;\n"
14045 "  DAV svn\n"
14046 "  SVNParentPath /usr/local/svn\n"
14047 "\n"
14048 "  # how to authenticate a user\n"
14049 "  AuthType Basic\n"
14050 "  AuthName \"Subversion repository\"\n"
14051 "  AuthUserFile /path/to/users/file\n"
14052 "\n"
14053 "  # For any operations other than these, require an authenticated user.\n"
14054 "  &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;\n"
14055 "    Require valid-user\n"
14056 "  &lt;/LimitExcept&gt;\n"
14057 "&lt;/Location&gt;\n"
14059 #. (para)
14060 #: ../source/book.xml:13743
14061 #, fuzzy
14062 msgid "These are only a few simple examples. For more in-depth information about Apache access control and the <literal>Require</literal> directive, take a look at the <literal>Security</literal> section of the Apache documentation's tutorials collection at <uri href=\"http://httpd.apache.org/docs-2.0/misc/tutorials.html\">http://httpd.apache.org/docs-2.0/misc/tutorials.html</uri>."
14063 msgstr "这里只是一些简单的例子,想看关于Apache访问控制<literal>Require</literal>指示的更深入信息,可以查看Apache文档中的教程集<ulink url=\"http://httpd.apache.org/docs-2.0/misc/tutorials.html\"/>中的<literal>Security</literal>部分。"
14065 #. (title)
14066 #: ../source/book.xml:13752
14067 msgid "Per-Directory Access Control"
14068 msgstr "每目录访问控制"
14070 #. (para)
14071 #: ../source/book.xml:13754
14072 #, fuzzy
14073 msgid "It's possible to set up finer-grained permissions using a second Apache httpd module, <command>mod_authz_svn</command>. This module grabs the various opaque URLs passing from client to server, asks <command>mod_dav_svn</command> to decode them, and then possibly vetoes requests based on access policies defined in a configuration file."
14074 msgstr "也可以使用Apache的httpd模块<command>mod_authz_svn</command>更加细致的设置访问权限,这个模块收集客户端传递过来的不同的晦涩的URL信息,询问<command>mod_dav_svn</command>来解码,然后根据在配置文件定义的访问政策来裁决请求。"
14076 #. (para)
14077 #: ../source/book.xml:13761
14078 #, fuzzy
14079 msgid "If you've built Subversion from source code, <command>mod_authz_svn</command> is automatically built and installed alongside <command>mod_dav_svn</command>. Many binary distributions install it automatically as well. To verify that it's installed correctly, make sure it comes right after <command>mod_dav_svn</command>'s <literal>LoadModule</literal> directive in <filename>httpd.conf</filename>:"
14080 msgstr "如果你从源代码创建Subversion,<command>mod_authz_svn</command>会自动附加到<command>mod_dav_svn</command>,许多二进制分发版本也会自动安装,为了验证它是安装正确,确定它是在<filename>httpd.conf</filename>的<literal>LoadModule</literal>指示中的<command>mod_dav_svn</command>后面:"
14082 #. (screen)
14083 #: ../source/book.xml:13769
14084 #, no-wrap
14085 msgid ""
14086 "\n"
14087 "LoadModule dav_module         modules/mod_dav.so\n"
14088 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
14089 "LoadModule authz_svn_module   modules/mod_authz_svn.so\n"
14090 msgstr ""
14091 "\n"
14092 "LoadModule dav_module         modules/mod_dav.so\n"
14093 "LoadModule dav_svn_module     modules/mod_dav_svn.so\n"
14094 "LoadModule authz_svn_module   modules/mod_authz_svn.so\n"
14096 #. (para)
14097 #: ../source/book.xml:13774
14098 #, fuzzy
14099 msgid "To activate this module, you need to configure your <literal>Location</literal> block to use the <literal>AuthzSVNAccessFile</literal> directive, which specifies a file containing the permissions policy for paths within your repositories. (In a moment, we'll discuss the format of that file.)"
14100 msgstr "为了激活这个模块,你需要配置你的<literal>Location</literal>区块的<literal>AuthzSVNAccessFile</literal>指示,指定保存路径中的版本库访问政策的文件。(一会儿我们将会讨论这个文件的格式。)"
14102 #. (para)
14103 #: ../source/book.xml:13780
14104 msgid "Apache is flexible, so you have the option to configure your block in one of three general patterns. To begin, choose one of these basic configuration patterns. (The examples below are very simple; look at Apache's own documentation for much more detail on Apache authentication and authorization options.)"
14105 msgstr "Apache非常的灵活,你可以从三种模式里选择一种来配置你的区块,作为开始,你选择一种基本的配置模式。(下面的例子非常简单;见Apache自己的文档中的认证和授权选项来查看更多的细节。)"
14107 #. (para)
14108 #: ../source/book.xml:13786
14109 msgid "The simplest block is to allow open access to everyone. In this scenario, Apache never sends authentication challenges, so all users are treated as <quote>anonymous</quote>."
14110 msgstr "最简单的区块是允许任何人可以访问,在这个场景里,Apache决不会发送认证请求,所有的用户作为<quote>匿名</quote>对待。"
14112 #. (title)
14113 #: ../source/book.xml:13792
14114 msgid "A sample configuration for anonymous access."
14115 msgstr "匿名访问的配置实例。"
14117 #. (programlisting)
14118 #: ../source/book.xml:13794
14119 #, fuzzy, no-wrap
14120 msgid ""
14121 "\n"
14122 "&lt;Location /repos&gt;\n"
14123 "  DAV svn\n"
14124 "  SVNParentPath /var/svn\n"
14125 "\n"
14126 "  # our access control policy\n"
14127 "  AuthzSVNAccessFile /path/to/access/file\n"
14128 "&lt;/Location&gt;\n"
14129 "          "
14130 msgstr ""
14131 "\n"
14132 "&lt;Location /repos&gt;\n"
14133 "  DAV svn\n"
14134 "  SVNParentPath /usr/local/svn\n"
14135 "\n"
14136 "  # our access control policy\n"
14137 "  AuthzSVNAccessFile /path/to/access/file\n"
14138 "&lt;/Location&gt;\n"
14139 "          "
14141 #. (para)
14142 #: ../source/book.xml:13804
14143 #, fuzzy
14144 msgid "On the opposite end of the paranoia scale, you can configure your block to demand authentication from everyone. All clients must supply credentials to identify themselves. Your block unconditionally requires authentication via the <literal>Require valid-user</literal> directive, and defines a means to authenticate."
14145 msgstr "在另一个极端,你可以配置为拒绝所有人的认证,所有客户端必须提供证明自己身份的证书,你通过<literal>Require valid-user</literal>指示来阻止无条件的认证,并且定义一种认证的手段。"
14147 #. (title)
14148 #: ../source/book.xml:13812
14149 msgid "A sample configuration for authenticated access."
14150 msgstr "一个认证访问的配置实例。"
14152 #. (programlisting)
14153 #: ../source/book.xml:13814
14154 #, fuzzy, no-wrap
14155 msgid ""
14156 "\n"
14157 "&lt;Location /repos&gt;\n"
14158 "  DAV svn\n"
14159 "  SVNParentPath /var/svn\n"
14160 "\n"
14161 "  # our access control policy\n"
14162 "  AuthzSVNAccessFile /path/to/access/file\n"
14163 "\n"
14164 "  # only authenticated users may access the repository\n"
14165 "  Require valid-user\n"
14166 "\n"
14167 "  # how to authenticate a user\n"
14168 "  AuthType Basic\n"
14169 "  AuthName \"Subversion repository\"\n"
14170 "  AuthUserFile /path/to/users/file\n"
14171 "&lt;/Location&gt;\n"
14172 "          "
14173 msgstr ""
14174 "\n"
14175 "&lt;Location /repos&gt;\n"
14176 "  DAV svn\n"
14177 "  SVNParentPath /usr/local/svn\n"
14178 "\n"
14179 "  # our access control policy\n"
14180 "  AuthzSVNAccessFile /path/to/access/file\n"
14181 "\n"
14182 "  # only authenticated users may access the repository\n"
14183 "  Require valid-user\n"
14184 "\n"
14185 "  # how to authenticate a user\n"
14186 "  AuthType Basic\n"
14187 "  AuthName \"Subversion repository\"\n"
14188 "  AuthUserFile /path/to/users/file\n"
14189 "&lt;/Location&gt;\n"
14190 "          "
14192 #. (para)
14193 #: ../source/book.xml:13832
14194 #, fuzzy
14195 msgid "A third very popular pattern is to allow a combination of authenticated and anonymous access. For example, many administrators want to allow anonymous users to read certain repository directories, but want only authenticated users to read (or write) more sensitive areas. In this setup, all users start out accessing the repository anonymously. If your access control policy demands a real username at any point, Apache will demand authentication from the client. To do this, you use both the <literal>Satisfy Any</literal> and <literal>Require valid-user</literal> directives together."
14196 msgstr "第三种流行的模式是允许认证和匿名用户的组合,举个例子,许多管理员希望允许匿名用户读取特定的版本库路径,但希望只有认证用户可以读(或者写)更多敏感的区域,在这个设置里,所有的用户开始时用匿名用户访问版本库,如果你的访问控制策略在任何时候要求一个真实的用户名,Apache将会要求认证客户端,为­¤,你可以同时使用<literal>Satisfy Any</literal>和<literal>Require valid-user</literal>指示。"
14198 #. (title)
14199 #: ../source/book.xml:13845
14200 msgid "A sample configuration for mixed authenticated/anonymous access."
14201 msgstr "一个混合认证/匿名访问的配置实例。"
14203 #. (programlisting)
14204 #: ../source/book.xml:13848
14205 #, fuzzy, no-wrap
14206 msgid ""
14207 "\n"
14208 "&lt;Location /repos&gt;\n"
14209 "  DAV svn\n"
14210 "  SVNParentPath /var/svn\n"
14211 "\n"
14212 "  # our access control policy\n"
14213 "  AuthzSVNAccessFile /path/to/access/file\n"
14214 "\n"
14215 "  # try anonymous access first, resort to real\n"
14216 "  # authentication if necessary.\n"
14217 "  Satisfy Any\n"
14218 "  Require valid-user\n"
14219 "\n"
14220 "  # how to authenticate a user\n"
14221 "  AuthType Basic\n"
14222 "  AuthName \"Subversion repository\"\n"
14223 "  AuthUserFile /path/to/users/file\n"
14224 "&lt;/Location&gt;\n"
14225 "          "
14226 msgstr ""
14227 "\n"
14228 "&lt;Location /repos&gt;\n"
14229 "  DAV svn\n"
14230 "  SVNParentPath /usr/local/svn\n"
14231 "\n"
14232 "  # our access control policy\n"
14233 "  AuthzSVNAccessFile /path/to/access/file\n"
14234 "\n"
14235 "  # try anonymous access first, resort to real\n"
14236 "  # authentication if necessary.\n"
14237 "  Satisfy Any\n"
14238 "  Require valid-user\n"
14239 "\n"
14240 "  # how to authenticate a user\n"
14241 "  AuthType Basic\n"
14242 "  AuthName \"Subversion repository\"\n"
14243 "  AuthUserFile /path/to/users/file\n"
14244 "&lt;/Location&gt;\n"
14245 "          "
14247 #. (para)
14248 #: ../source/book.xml:13868
14249 #, fuzzy
14250 msgid "Once you've settled on one of these three basic <filename>httpd.conf</filename> templates, you need to create your file containing access rules for particular paths within the repository. This is described in <xref linkend=\"svn.serverconfig.pathbasedauthz\"/>."
14251 msgstr "一旦你已经设置了<filename>httpd.conf</filename>模版之一,你需要在对应的路径创建包含访问规则的文件,在<xref linkend=\"svn.serverconfig.pathbasedauthz\"/>中有描述。"
14253 #. (title)
14254 #: ../source/book.xml:13877
14255 msgid "Disabling Path-based Checks"
14256 msgstr "禁用基于路径的检查"
14258 #. (para)
14259 #: ../source/book.xml:13879
14260 #, fuzzy
14261 msgid "The <command>mod_dav_svn</command> module goes through a lot of work to make sure that data you've marked <quote>unreadable</quote> doesn't get accidentally leaked. This means that it needs to closely monitor all of the paths and file-contents returned by commands like <command>svn checkout</command> or <command>svn update</command> commands. If these commands encounter a path that isn't readable according to some authorization policy, then the path is typically omitted altogether. In the case of history or rename tracing—e.g. running a command like <command>svn cat -r OLD foo.c</command> on a file that was renamed long ago—the rename tracking will simply halt if one of the object's former names is determined to be read-restricted."
14262 msgstr "<command>mod_dav_svn</command>模块做了许多工作来确定你标记为<quote>不可读</quote>的数据不会因意外而泄露,这意味着需要紧密监控通过<command>svn checkout</command>或是<command>svn update</command>返回的路径和文件内容,如果这些命令遇到一些根据认证策略不是可读的路径,这个路径通常会被一起忽略,在历史或者重命名操作时—例如运行一个类似<command>svn cat -r OLD foo.c</command>的命令来操作一个很久以前改过名字的文件 — 如果一个对象的以前的名字检测到是只读的,重命令追踪就会终止。"
14264 #. (para)
14265 #: ../source/book.xml:13893
14266 #, fuzzy
14267 msgid "All of this path-checking can sometimes be quite expensive, especially in the case of <command>svn log</command>. When retrieving a list of revisions, the server looks at every changed path in each revision and checks it for readability. If an unreadable path is discovered, then it's omitted from the list of the revision's changed paths (normally seen with the <option>--verbose</option> option), and the whole log message is suppressed. Needless to say, this can be time-consuming on revisions that affect a large number of files. This is the cost of security: even if you haven't configured a module like <command>mod_authz_svn</command> at all, the <command>mod_dav_svn</command> module is still asking Apache <command>httpd</command> to run authorization checks on every path. The <command>mod_dav_svn</command> module has no idea what authorization modules have been installed, so all it can do is ask Apache to invoke whatever might be present."
14268 msgstr "所有的路径检查在有时会非常昂贵,特别是<command>svn log</command>的情况。当检索一列修订版本时,服务器会查看所有修订版本修改的路径,并且检查可读性,如果发现了一个不可读路径,它会从修订版本的修改路径中忽略(通常可以使用<option>--verbose</option>选项查看),并且整个的日志信息会被禁止,不必多说,这种影响大量文件修订版本的操作会非常耗时。这是安全的代价:即使你并没有配置<command>mod_authz_svn</command>模块,<command>mod_dav_svn</command>还是会询问<command>httpd</command>来对所有路径运行认证检查,<command>mod_dav_svn</command>模块没有办法知道那个认证模块被安装,所以只能要求Apache调用时提供的内容。"
14270 #. (para)
14271 #: ../source/book.xml:13911
14272 #, fuzzy
14273 msgid "On the other hand, there's also an escape-hatch of sorts, one which allows you to trade security features for speed. If you're not enforcing any sort of per-directory authorization (i.e. not using <command>mod_authz_svn</command> or similar module), then you can disable all of this path-checking. In your <filename>httpd.conf</filename> file, use the <literal>SVNPathAuthz</literal> directive:"
14274 msgstr "在另一方面,也有一个安全舱门允许你用安全特性来交换速度,如果你不是坚持要求有每目录授权(如不使用 <command>mod_authz_svn</command>和类似的模块),你就可以关闭所有的路径检查,在你的<filename>httpd.conf</filename>文件,使用<literal>SVNPathAuthz</literal>指示:"
14276 #. (title)
14277 #: ../source/book.xml:13921
14278 msgid "Disabling path checks altogether"
14279 msgstr "禁用所有的路径检查"
14281 #. (programlisting)
14282 #: ../source/book.xml:13923
14283 #, fuzzy, no-wrap
14284 msgid ""
14285 "\n"
14286 "&lt;Location /repos&gt;\n"
14287 "  DAV svn\n"
14288 "  SVNParentPath /var/svn\n"
14289 "\n"
14290 "  SVNPathAuthz off\n"
14291 "&lt;/Location&gt;\n"
14292 "          "
14293 msgstr ""
14294 "\n"
14295 "&lt;Location /repos&gt;\n"
14296 "  DAV svn\n"
14297 "  SVNParentPath /usr/local/svn\n"
14298 "\n"
14299 "  SVNPathAuthz off\n"
14300 "&lt;/Location&gt;\n"
14301 "          "
14303 #. (para)
14304 #: ../source/book.xml:13932
14305 #, fuzzy
14306 msgid "The <literal>SVNPathAuthz</literal> directive is <quote>on</quote> by default. When set <quote>off</quote>, all path-based authorization checking is disabled; <command>mod_dav_svn</command> stops invoking authorization checks on every path it discovers."
14307 msgstr "<literal>SVNPathAuthz</literal>指示缺省是<quote>on</quote>,当设置为<quote>off</quote>时,所有的路径为基础的授权都会关闭;<command>mod_dav_svn</command>停止对每个目录调用授权检查。"
14309 #. (title)
14310 #: ../source/book.xml:13942
14311 msgid "Extra Goodies"
14312 msgstr "额外的糖果"
14314 #. (para)
14315 #: ../source/book.xml:13944
14316 msgid "We've covered most of the authentication and authorization options for Apache and mod_dav_svn. But there are a few other nice features that Apache provides."
14317 msgstr "我们已经覆盖了关于认证和授权的Apache和mod_dav_svn的大多数选项,但是Apache还提供了许多很好的特性。"
14319 #. (title)
14320 #: ../source/book.xml:13950
14321 msgid "Repository Browsing"
14322 msgstr "版本库浏览"
14324 #. (para)
14325 #: ../source/book.xml:13952
14326 #, fuzzy
14327 msgid "One of the most useful benefits of an Apache/WebDAV configuration for your Subversion repository is that the youngest revisions of your versioned files and directories are immediately available for viewing via a regular web browser. Since Subversion uses URLs to identify versioned resources, those URLs used for HTTP-based repository access can be typed directly into a Web browser. Your browser will issue an HTTP <literal>GET</literal> request for that URL, and based on whether that URL represents a versioned directory or file, mod_dav_svn will respond with a directory listing or with file contents."
14328 msgstr "使用Apache/WebDAV配置Subversion版本库时一个非常有用的好处是可以用普通的浏览器察看最新的版本库文件,因为Subversion使用URL来鉴别版本库版本化的资源,版本库使用的HTTP为基础的URL也可以直接输入到Web浏览器中,你的浏览器会发送一个<literal>GET</literal>请求到URL,根据访问的URL是指向一个版本化的目录还是文件,mod_dav_svn会负责列出目录列表或者是文件内容。"
14330 #. (para)
14331 #: ../source/book.xml:13963
14332 msgid "Since the URLs do not contain any information about which version of the resource you wish to see, mod_dav_svn will always answer with the youngest version. This functionality has the wonderful side-effect that you can pass around Subversion URLs to your peers as references to documents, and those URLs will always point at the latest manifestation of that document. Of course, you can even use the URLs as hyperlinks from other web sites, too."
14333 msgstr "因为URL不能确定你所希望看到的资源的版本,mod_dav_svn会一直返回最新的版本,这样会有一些美妙的副作用,你可以直接把Subversion的URL传递给文档作为引用,这些URL会一直指向文档最新的材料,当然,你也可以在别的网站作为超链使用这些URL。"
14335 #. (title)
14336 #: ../source/book.xml:13973
14337 msgid "Can I view older revisions?"
14338 msgstr "我可以看到老的修订版本吗?"
14340 #. (para)
14341 #: ../source/book.xml:13975
14342 #, fuzzy
14343 msgid "With an ordinary web browser? In one word: nope. At least, not with <command>mod_dav_svn</command> as your only tool."
14344 msgstr "通过一个普通的浏览器?一句话:不可以,至少是当你只使用<command>mod_dav_svn</command>作为唯一的工具时。"
14346 #. (para)
14347 #: ../source/book.xml:13978
14348 msgid "Your web browser only speaks ordinary HTTP. That means it only knows how to GET public URLs, which represent the latest versions of files and directories. According to the WebDAV/DeltaV specification, each server defines a private URL syntax for older versions of resources, and that syntax is opaque to clients. To find an older version of a file, a client must follow a specific procedure to <quote>discover</quote> the proper URL; the procedure involves issuing a series of WebDAV PROPFIND requests and understanding DeltaV concepts. This is something your web browser simply can't do."
14349 msgstr "你的Web浏览器只会说普通的HTTP,也就是说它只会GET公共的URL,这个URL代表了最新版本的文件和目录,根据WebDAV/DeltaV规范,每种服务器定义了一种私有的URL语法来代表老的资源的版本,这个语法对客户端是不透明的,为了得到老的版本,一个客户端必须通过一种规范过程来<quote>发现</quote>正确的URL;这个过程包括执行一系列WebDAV PROPFIND请求和理解DeltaV概念,这些事情一般是你的web浏览器做不了的。"
14351 #. (para)
14352 #: ../source/book.xml:13999
14353 msgid "Back then, it was called <quote>ViewCVS</quote>."
14354 msgstr "之前叫做<quote>ViewCVS</quote>。"
14356 #. (para)
14357 #: ../source/book.xml:13989
14358 #, fuzzy
14359 msgid "So to answer the question, one obvious way to see older revisions of files and directories is by passing the <option>--revision (-r)</option> argument to the <command>svn list</command> and <command>svn cat</command> commands. To browse old revisions with your web browser, however, you can use third-party software. A good example of this is ViewVC (<uri href=\"http://viewvc.tigris.org/\">http://viewvc.tigris.org/</uri>). ViewVC was originally written to display CVS repositories through the web, <placeholder-1/> and the latest releases are able to understand Subversion repositories as well."
14360 msgstr "为了回答这些问题,一个明显的看老版本文件和目录的方式是带<option>--revision (-r)</option>参数的<command>svn list</command>和<command>svn cat</command>命令,为了在浏览器里察看老版本,你可以使用第三方的软件,一个好的例子是ViewVC(<ulink url=\"http://viewvc.tigris.org/\"/>),ViewVC最初写出来是为了在web显示CVS版本库,<placeholder-1/>最新的版本也已经可以理解Subversion版本库了。"
14362 #. (title)
14363 #: ../source/book.xml:14005
14364 msgid "Proper MIME Type"
14365 msgstr "正确的文件类型"
14367 #. (para)
14368 #: ../source/book.xml:14007
14369 #, fuzzy
14370 msgid "When browsing a Subversion repository, the web browser gets a clue about how to render a file's contents by looking at the <literal>Content-Type:</literal> header returned in Apache's response to the HTTP <literal>GET</literal> request. The value of this header is some sort of MIME type. By default, Apache will tell the web browsers that all repository files are of the <quote>default</quote> MIME type, typically <literal>text/plain</literal>. This can be frustrating, however, if a user wishes repository files to render as something more meaningful—for example, it might be nice to have a <filename>foo.html</filename> file in the repository actually render as HTML when browsing."
14371 msgstr "当浏览Subversion版本库时,web浏览器通过从Apache的HTTP GET返回内容中查看<literal>Content-Type:</literal>头可以知道如何渲染文件的线索,这个值是一种MIME类型。默认情况下,Apache告诉浏览器所有的版本库文件都是缺省的MIME类型,通常是<literal>text/plain</literal>,这样有时候会让人沮丧,如果一个用户希望版本库文件能够更有意义的渲染—例如一个<filename>foo.html</filename>,在浏览时最好能够按照HTML方式渲染。"
14373 #. (para)
14374 #: ../source/book.xml:14021
14375 #, fuzzy
14376 msgid "To make this happen, you only need to make sure that your files have the proper <literal>svn:mime-type</literal> set. This is discussed in more detail in <xref linkend=\"svn.advanced.props.special.mime-type\"/>, and you can even configure your client to automatically attach proper <literal>svn:mime-type</literal> properties to files entering the repository for the first time; see <xref linkend=\"svn.advanced.props.auto\"/>."
14377 msgstr "为了生效,我们只需要确认你的文件有正确的<literal>svn:mime-type</literal>设置,这将在<xref linkend=\"svn.advanced.props.special.mime-type\"/>详细讨论,你可以设置的你的客户端在文件首次添加到版本库时自动附加<literal>svn:mime-type</literal>属性;见<xref linkend=\"svn.advanced.props.auto\"/>。"
14379 #. (para)
14380 #: ../source/book.xml:14030
14381 #, fuzzy
14382 msgid "So in our example, if one were to set the <literal>svn:mime-type</literal> property to <literal>text/html</literal> on file <filename>foo.html</filename>, then Apache would properly tell your web browser to render the file as HTML. One could also attach proper <literal>image/*</literal> mime-type properties to images, and by doing this, ultimately get an entire web site to be viewable directly from a repository! There's generally no problem with doing this, as long as the website doesn't contain any dynamically-generated content."
14383 msgstr "所以在我们的例子中,如果一个人对<filename>foo.html</filename>将<literal>svn:mime-type</literal>设置为<literal>text/html</literal>,Apache就会告知浏览器使用HTML方式渲染文件,也可以给图片文件设置合适的<literal>image/*</literal>类型,这样最终可以使整个web站点直接从版本库浏览,这样做通常没有问题,只要你的站点不包含动态生成的内容。"
14385 #. (title)
14386 #: ../source/book.xml:14045
14387 msgid "Customizing the Look"
14388 msgstr "定制外观"
14390 #. (para)
14391 #: ../source/book.xml:14047
14392 #, fuzzy
14393 msgid "You generally will get more use out of URLs to versioned files—after all, that's where the interesting content tends to lie. But you might have occasion to browse a Subversion directory listing, where you'll quickly note that the generated HTML used to display that listing is very basic, and certainly not intended to be aesthetically pleasing (or even interesting). To enable customization of these directory displays, Subversion provides an XML index feature. A single <literal>SVNIndexXSLT</literal> directive in your repository's <literal>Location</literal> block of <filename>httpd.conf</filename> will instruct mod_dav_svn to generate XML output when displaying a directory listing, and to reference the XSLT stylesheet of your choice:"
14394 msgstr "你通常会在版本化的文件的URL之外得到更多地用处—毕竟那里是有趣的内容存在的地方,但是你会偶尔浏览一个Subversion的目录列表,你会很快发现展示列表生成的HTML非常基本,并且一定没有在外观上(或者是有趣上)下功夫,为了自定义这些目录显示,Subversion提供了一个XML目录特性,一个单独的<literal>SVNIndexXSLT</literal>指示在你的<filename>httpd.conf</filename>文件版本库的<literal>Location</literal>块里,它将会指导mod_dav_svn在显示目录列表的时候生成XML输出,并且引用你选择的XSLT样式表文件:"
14396 #. (screen)
14397 #: ../source/book.xml:14062
14398 #, fuzzy, no-wrap
14399 msgid ""
14400 "\n"
14401 "&lt;Location /svn&gt;\n"
14402 "  DAV svn\n"
14403 "  SVNParentPath /var/svn\n"
14404 "  SVNIndexXSLT \"/svnindex.xsl\"\n"
14405 "  …\n"
14406 "&lt;/Location&gt;\n"
14407 msgstr ""
14408 "\n"
14409 "&lt;Location /svn&gt;\n"
14410 "  DAV svn\n"
14411 "  SVNParentPath /usr/local/svn\n"
14412 "  SVNIndexXSLT \"/svnindex.xsl\"\n"
14413 "  …\n"
14414 "&lt;/Location&gt;\n"
14416 #. (para)
14417 #: ../source/book.xml:14070
14418 #, fuzzy
14419 msgid "Using the <literal>SVNIndexXSLT</literal> directive and a creative XSLT stylesheet, you can make your directory listings match the color schemes and imagery used in other parts of your website. Or, if you'd prefer, you can use the sample stylesheets provided in the Subversion source distribution's <filename>tools/xslt/</filename> directory. Keep in mind that the path provided to the <literal>SVNIndexXSLT</literal> directory is actually a URL path—browsers need to be able to read your stylesheets in order to make use of them!"
14420 msgstr "使用<literal>SVNIndexXSLT</literal>指示和创建一个XSLT样式表,你可以让你的目录列表的颜色模式与你的网站的其它部分匹配,否则,如果你愿意,你可以使用Subversion源分发版本中的<filename>tools/xslt/</filename>目录下的样例样式表。记住提供给<literal>SVNIndexXSLT</literal> 指示的路径是一个URL路径—浏览器需要阅读你的样式表来利用它们!"
14422 #. (title)
14423 #: ../source/book.xml:14083
14424 msgid "Listing Repositories"
14425 msgstr "版本库列表"
14427 #. (para)
14428 #: ../source/book.xml:14085
14429 #, fuzzy
14430 msgid "If you're serving a collection of repositories from a single URL via the <literal>SVNParentPath</literal> directive, then it's also possible to have Apache display all available repositories to a web browser. Just activate the <literal>SVNListParentPath</literal> directive:"
14431 msgstr "如果你通过 <literal>SVNParentPath</literal>指示从一个URL维护一组版本库,也可以让Apache在浏览器显示所有存在的版本库,只需要通过<literal>SVNListParentPath</literal>指示激活:"
14433 #. (screen)
14434 #: ../source/book.xml:14091
14435 #, fuzzy, no-wrap
14436 msgid ""
14437 "\n"
14438 "&lt;Location /svn&gt;\n"
14439 "  DAV svn\n"
14440 "  SVNParentPath /var/svn\n"
14441 "  SVNListParentPath on\n"
14442 "  …\n"
14443 "&lt;/Location&gt;\n"
14444 msgstr ""
14445 "\n"
14446 "&lt;Location /svn&gt;\n"
14447 "  DAV svn\n"
14448 "  SVNParentPath /usr/local/svn\n"
14449 "  SVNListParentPath on\n"
14450 "  …\n"
14451 "&lt;/Location&gt;\n"
14453 #. (para)
14454 #: ../source/book.xml:14099
14455 #, fuzzy
14456 msgid "If a user now points her web browser to the URL <literal>http://host.example.com/svn/</literal>, she'll see list of all Subversion repositories sitting in <filename>/var/svn</filename>. Obviously, this can be a security problem, so this feature is turned off by default."
14457 msgstr "如果一个用户将浏览器指向<literal>http://host.example.com/svn/</literal>,她一定会看到<filename>/usr/local/svn</filename>下所有的Subversion版本库,很明显这是一件安全问题,所以这个特性默认是关闭的。"
14459 #. (title)
14460 #: ../source/book.xml:14110
14461 msgid "Apache Logging"
14462 msgstr "Apache 日志"
14464 #. (para)
14465 #: ../source/book.xml:14112
14466 #, fuzzy
14467 msgid "Because Apache is an HTTP server at heart, it contains fantastically flexible logging features. It's beyond the scope of this book to discuss all ways logging can be configured, but we should point out that even the most generic <filename>httpd.conf</filename> file will cause Apache to produce two logs: <filename>error_log</filename> and <filename>access_log</filename>. These logs may appear in different places, but are typically created in the logging area of your Apache installation. (On Unix, they often live in <filename>/usr/local/apache2/logs/</filename>.)"
14468 msgstr "因为Apache的核心是一个HTTP服务器,它包含了梦幻般灵活的日志特性。各种配置日志的方式可以超出了本书的范围,但是我们必须指出,即使是最原始的文件<filename>httpd.conf</filename>也可以让Apache产生两个日志:<filename>error_log</filename>和<filename>access_log</filename>。这些日志会出现在不同的地方,但通常是创建在Apache安装的日志区。(在Unix下,这个目录是<filename>/usr/local/apache2/logs/</filename>。)"
14470 #. (para)
14471 #: ../source/book.xml:14124
14472 #, fuzzy
14473 msgid "The <filename>error_log</filename> describes any internal errors that Apache runs into as it works. The <filename>access_log</filename> file records every incoming HTTP request received by Apache. This makes it easy to see, for example, which IP addresses Subversion clients are coming from, how often particular clients use the server, which users are authenticating properly, and which requests succeed or fail."
14474 msgstr "<filename>error_log</filename>描述了所有Apache运行中的内部错误,<filename>access_log</filename>记录了Apache接收到的所有HTTP请求,这个日志很容易查看,例如包括Subversion客户端的IP地址,哪些用户正确认证和请求成功还是失败。"
14476 #. (para)
14477 #: ../source/book.xml:14132
14478 #, fuzzy
14479 msgid "Unfortunately, because HTTP is a stateless protocol, even the simplest Subversion client operation generates multiple network requests. It's very difficult to look at the <filename>access_log</filename> and deduce what the client was doing—most operations look like a series of cryptic <literal>PROPPATCH</literal>, <literal>GET</literal>, <literal>PUT</literal>, and <literal>REPORT</literal> requests. To make things worse, many client operations send nearly-identical series of requests, so it's even harder to tell them apart."
14480 msgstr "不幸的是,因为HTTP是无状态协议,即使最简单的Subversion客户端操作会产生多个网络请求,很难通过查看<filename>access_log</filename>来确定用户的操作—大多数操作看起来像是一系列神秘的<literal>PROPPATCH</literal>、<literal>GET</literal>、<literal>PUT</literal>和<literal>REPORT</literal>请求。更糟糕的是,许多客户段操作会发送几乎完全相同的一系列请求,所以更加难以解析。"
14482 #. (para)
14483 #: ../source/book.xml:14142
14484 #, fuzzy
14485 msgid "<literal>mod_dav_svn</literal>, however, can come to your aid. By activating an <quote>operational logging</quote> feature, you can ask <literal>mod_dav_svn</literal> to create a separate log file describing what sort of high-level operations your clients are performing."
14486 msgstr "<literal>mod_dav_svn</literal>会成为一个辅助,通过激活<quote>operational logging</quote>属性,你可以告诉<literal>mod_dav_svn</literal>创建另外的日志文件,来描述你的客户度uan做了哪些高级操作。"
14488 #. (para)
14489 #: ../source/book.xml:14148
14490 #, fuzzy
14491 msgid "To do this, you need to make use of Apache's <literal>CustomLog</literal> directive (which is explained in more detail in Apache's own documentation). Be sure to invoke this directive <emphasis>outside</emphasis> of your Subversion <literal>Location</literal> block:"
14492 msgstr "为此,你需要利用Apache的<literal>CustomLog</literal>指示(在Apache自己的文档里有详细解释)指示,请确定在Subversion的<literal>Location</literal>指示之外配置这个指示。"
14494 #. (screen)
14495 #: ../source/book.xml:14154
14496 #, no-wrap
14497 msgid ""
14498 "\n"
14499 "&lt;Location /svn&gt;\n"
14500 "  DAV svn\n"
14501 "  …\n"
14502 "&lt;/Location&gt;\n"
14503 "\n"
14504 "CustomLog logs/svn_logfile \"%t %u %{SVN-ACTION}e\" env=SVN-ACTION\n"
14505 msgstr ""
14506 "\n"
14507 "&lt;Location /svn&gt;\n"
14508 "  DAV svn\n"
14509 "  …\n"
14510 "&lt;/Location&gt;\n"
14511 "\n"
14512 "CustomLog logs/svn_logfile \"%t %u %{SVN-ACTION}e\" env=SVN-ACTION\n"
14514 #. (para)
14515 #: ../source/book.xml:14162
14516 #, fuzzy
14517 msgid "In this example, we're asking Apache to create a special logfile <filename>svn_logfile</filename> in the standard Apache <filename>logs</filename> directory. The <literal>%t</literal> and <literal>%u</literal> variables are replaced by the time and username of the request, respectively. The really important part are the two instances of <literal>SVN-ACTION</literal>. When Apache sees that variable, it substitutes the value of the <literal>SVN-ACTION</literal> environment variable, which is automatically set by <literal>mod_dav_svn</literal> whenever it detects a high-level client action."
14518 msgstr "在这个例子里,我们告诉Apache在标准的Apache<filename>logs</filename>目录创建一个<filename>svn_logfile</filename>日志文件,<literal>%t</literal>和<literal>%u</literal>变量会被请求的时间和用户名代替,关键的部分是<literal>SVN-ACTION</literal>的两个实例,当Apache看到变量,会将变量的值替代为环境变量<literal>SVN-ACTION</literal>,这个环境变量的值是<literal>mod_dav_svn</literal>在检测到高级客户段操作时自动设置的。"
14520 #. (para)
14521 #: ../source/book.xml:14173
14522 #, fuzzy
14523 msgid "So instead of having to interpret a traditional <filename>access_log</filename> like this:"
14524 msgstr "所以我们不选择下面的传统<filename>access_log</filename>文件:"
14526 #. (screen)
14527 #: ../source/book.xml:14176
14528 #, no-wrap
14529 msgid ""
14530 "\n"
14531 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1\" 207 398\n"
14532 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1\" 207 449\n"
14533 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc HTTP/1.1\" 207 647\n"
14534 "[26/Jan/2007:22:25:29 -0600] \"REPORT /svn/calc/!svn/vcc/default HTTP/1.1\" 200 607\n"
14535 "[26/Jan/2007:22:25:31 -0600] \"OPTIONS /svn/calc HTTP/1.1\" 200 188\n"
14536 "[26/Jan/2007:22:25:31 -0600] \"MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1\" 201 227\n"
14537 "…\n"
14538 msgstr ""
14539 "\n"
14540 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1\" 207 398\n"
14541 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1\" 207 449\n"
14542 "[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc HTTP/1.1\" 207 647\n"
14543 "[26/Jan/2007:22:25:29 -0600] \"REPORT /svn/calc/!svn/vcc/default HTTP/1.1\" 200 607\n"
14544 "[26/Jan/2007:22:25:31 -0600] \"OPTIONS /svn/calc HTTP/1.1\" 200 188\n"
14545 "[26/Jan/2007:22:25:31 -0600] \"MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1\" 201 227\n"
14546 "…\n"
14548 #. (para)
14549 #: ../source/book.xml:14185
14550 #, fuzzy
14551 msgid "… you can instead peruse a much more intelligible <filename>svn_logfile</filename> like this:"
14552 msgstr "… 你可以细读一个更加智能的<filename>svn_logfile</filename>文件:"
14554 #. (screen)
14555 #: ../source/book.xml:14187
14556 #, no-wrap
14557 msgid ""
14558 "\n"
14559 "[26/Jan/2007:22:24:20 -0600] - list-dir '/'\n"
14560 "[26/Jan/2007:22:24:27 -0600] - update '/'\n"
14561 "[26/Jan/2007:22:25:29 -0600] - remote-status '/'\n"
14562 "[26/Jan/2007:22:25:31 -0600] sally commit r60\n"
14563 msgstr ""
14564 "\n"
14565 "[26/Jan/2007:22:24:20 -0600] - list-dir '/'\n"
14566 "[26/Jan/2007:22:24:27 -0600] - update '/'\n"
14567 "[26/Jan/2007:22:25:29 -0600] - remote-status '/'\n"
14568 "[26/Jan/2007:22:25:31 -0600] sally commit r60\n"
14570 #. (title)
14571 #: ../source/book.xml:14197
14572 msgid "Other Features"
14573 msgstr "其它特性"
14575 #. (para)
14576 #: ../source/book.xml:14199
14577 #, fuzzy
14578 msgid "Several of the features already provided by Apache in its role as a robust Web server can be leveraged for increased functionality or security in Subversion as well. Subversion communicates with Apache using Neon, which is a generic HTTP/WebDAV library with support for such mechanisms as SSL (the Secure Socket Layer, discussed earlier). If your Subversion client is built to support SSL, then it can access your Apache server using <literal>https://</literal>."
14579 msgstr "Apache作为一个健壮的Web服务器的许多特性也可以用来增加Subversion的功能性和安全性,Subversion使用Neon与Apache通讯,这是一种一般的HTTP/WebDAV库,可以支持SSL(Secure Socket Layer,将在后面讨论)。如果你的Subversion是以支持SSL编译,则你可以使用<literal>https://</literal>访问Apache服务器。"
14581 #. (para)
14582 #: ../source/book.xml:14208
14583 msgid "Equally useful are other features of the Apache and Subversion relationship, such as the ability to specify a custom port (instead of the default HTTP port 80) or a virtual domain name by which the Subversion repository should be accessed, or the ability to access the repository through an HTTP proxy. These things are all supported by Neon, so Subversion gets that support for free."
14584 msgstr "同样有用的是Apache和Subversion关系的一些特性,像可以指定自定义的端口(而不是缺省的HTTP的80)或者是一个Subversion可以被访问的虚拟主机名,或者是通过HTTP代理服务器访问的能力,这些特性都是Neon所支持的,所以Subversion轻易得到这些支持。"
14586 #. (para)
14587 #: ../source/book.xml:14215
14588 #, fuzzy
14589 msgid "Finally, because <command>mod_dav_svn</command> is speaking a subset of the WebDAV/DeltaV protocol, it's possible to access the repository via third-party DAV clients. Most modern operating systems (Win32, OS X, and Linux) have the built-in ability to mount a DAV server as a standard network share. This is a complicated topic; for details, read <xref linkend=\"svn.webdav\"/>."
14590 msgstr "最后,因为<command>mod_dav_svn</command>是使用一个半完成的WebDAV/DeltaV方言,所以通过第三方的DAV客户端访问也是可能的,几乎所有的现代操作系统(Win32、OS X和Linux)都有把DAV服务器影射为普通的网络<quote>共享</quote>的内置能力,这是一个复杂的主题;察看<xref linkend=\"svn.webdav\"/>来得到更多细节。"
14592 #. (title)
14593 #: ../source/book.xml:14230
14594 msgid "Path-Based Authorization"
14595 msgstr "基于路径的授权"
14597 #. (para)
14598 #: ../source/book.xml:14232
14599 #, fuzzy
14600 msgid "Both Apache and <command>svnserve</command> are capable of granting (or denying) permissions to users. Typically this is done over the entire repository: a user can read the repository (or not), and she can write to the repository (or not). It's also possible, however, to define finer-grained access rules. One set of users may have permission to write to a certain directory in the repository, but not others; another directory might not even be readable by all but a few special people."
14601 msgstr "Apache和<command>svnserve</command>都可以给用户赋予(或拒绝)访问许可,通常是对整个版本库:一个用户可以读版本库(或不),而且他可以写版本库(或不)。如果可能,也可以定义细粒度的访问规则。一组用户可以有版本库的一个目录的读写权限,但是没有其它的;另一个目录可以是只对一少部分用户可读。"
14603 #. (para)
14604 #: ../source/book.xml:14241
14605 #, fuzzy
14606 msgid "Both servers use a common file format to describe these path-based access rules. In the case of Apache, one needs to load the <command>mod_authz_svn</command> module and then add the <literal>AuthzSVNAccessFile</literal> directive (within the <filename>httpd.conf</filename> file) pointing to your own rules-file. (For a full explanation, see <xref linkend=\"svn.serverconfig.httpd.authz.perdir\"/>.) If you're using <command>svnserve</command>, then you need to make the <literal>authz-db</literal> variable (within <filename>svnserve.conf</filename>) point to your rules-file."
14607 msgstr "两种服务器都使用同样的文件格式描述路径为基础的规则,如果是Apache,需要加载<command>mod_authz_svn</command>模块,然后添加<literal>AuthzSVNAccessFile</literal>指示(在文件<filename>httpd.conf</filename>中)指明你的规则文件。(完全解释可以看<xref linkend=\"svn.serverconfig.httpd.authz.perdir\"/>。)如果你在使用<command>svnserve</command>,你需要让你的<literal>authz-db</literal>变量(在<filename>svnserve.conf</filename>中)指向规则文件。"
14609 #. (title)
14610 #: ../source/book.xml:14254
14611 msgid "Do you really need path-based access control?"
14612 msgstr "你真的需要基于路径的访问控制吗?"
14614 #. (para)
14615 #: ../source/book.xml:14256
14616 msgid "A lot of administrators setting up Subversion for the first time tend to jump into path-based access control without giving it a lot of thought. The administrator usually knows which teams of people are working on which projects, so it's easy to jump in and grant certain teams access to certain directories and not others. It seems like a natural thing, and it appeases the administrator's desire to maintain tight control of the repository."
14617 msgstr "许多第一次设置Subversion的管理员会在未经太多的思考的情况下轻易选择使用路径为基础的访问控制,管理员通常知道团队的成员工作在哪个项目,所以很容易确定赋予哪些团队访问哪些目录,不能访问哪些目录。这看起来是很自然的事情,它满足了管理员紧密控制版本库访问的愿望。"
14619 #. (para)
14620 #: ../source/book.xml:14264
14621 msgid "Note, though, that there are often invisible (and visible!) costs associated with this feature. In the visible category, the server needs to do a lot more work to ensure that the user has the right to read or write each specific path; in certain situations, there's very noticeable performance loss. In the invisible category, consider the culture you're creating. Most of the time, while certain users <emphasis>shouldn't</emphasis> be committing changes to certain parts of the repository, that social contract doesn't need to be technologically enforced. Teams can sometimes spontaneously collaborate with each other; someone may want to help someone else out by committing to an area she doesn't normally work on. By preventing this sort of thing at the server level, you're setting up barriers to unexpected collaboration. You're also creating a bunch of rules that need to be maintained as projects develop, new users are added, and so on. It's a bunch of extra work to maintain."
14622 msgstr "注意,这个特性通常有一些看不见(和可见的)代价。可见的,需要更多的工作来确信用户对某个路径有读写权限;在一些情况下,会是非常大的性能损失。不可见的,考虑你创建的文化,大多数情况下,因为特定用户不能够在特定目录提交修改,所以社会契约不必通过技术来加强。团队有时候可以自然的互相协作;一些人会通过为他人提交不能正常工作目录的内容的方法帮助别人,你设置了一种不期望交流的障碍。你也要建立一套项目开发、新人加入等活动的规则,还有很多额外的工作。"
14624 #. (para)
14625 #: ../source/book.xml:14282
14626 msgid "Remember that this is a version control system! Even if somebody accidentally commits a change to something they shouldn't, it's easy to undo the change. And if a user commits to the wrong place with deliberate malice, then it's a social problem anyway, and that the problem needs to be dealt with outside of Subversion."
14627 msgstr "记住这是一个版本控制系统,即使一些人不小心提交了一些不该提交的东西,很容易回退修改。如果一个用户故意提交到了错误的位置,这是一个社会问题,需要在Subversion之外解决。"
14629 #. (para)
14630 #: ../source/book.xml:14294
14631 msgid "A common theme in this book!"
14632 msgstr "本书的共同主题!"
14634 #. (para)
14635 #: ../source/book.xml:14288
14636 msgid "So before you begin restricting users' access rights, ask yourself if there's a real, honest need for this, or if it's just something that <quote>sounds good</quote> to an administrator. Decide whether it's worth sacrificing some server speed for, and remember that there's very little risk involved; it's bad to become dependent on technology as a crutch for social problems.<placeholder-1/>."
14637 msgstr "所以在开始限制用户的访问权限之前,你要问你自己是否有一个真正的、正直的需要,或仅仅是为了对一个管理员来说这样<quote>听起来不错</quote>。决定是否值得影响服务器的速度,必须记住只有很小的风险;依靠技术手段解决社会问题并不好。<placeholder-1/>。"
14639 #. (para)
14640 #: ../source/book.xml:14296
14641 msgid "As an example to ponder, consider that the Subversion project itself has always had a notion of who is allowed to commit where, but it's always been enforced socially. This is a good model of community trust, especially for open-source projects. Of course, sometimes there <emphasis>are</emphasis> truly legitimate needs for path-based access control; within corporations, for example, certain types of data really can be sensitive, and access needs to be genuinely restricted to small groups of people."
14642 msgstr "作为一个思考的例子,考虑Subversion项目本身有允许某个用户可以在那个目录提交的设置,而只是通过社交方式规定。这是一个社区信任的好模型,特别是对开源项目。当然,有时候需要正统的路径为基础的访问控制;在公司中,例如,只有部分数据是敏感的,只允许以小组人可以访问。"
14644 #. (para)
14645 #: ../source/book.xml:14306
14646 msgid "Once your server knows where to find your rules-file, it's time to define the rules."
14647 msgstr "当你的服务器知道去查找规则文件时,就是需要定义规则的时候了。"
14649 #. (para)
14650 #: ../source/book.xml:14308
14651 #, fuzzy
14652 msgid "The syntax of the file is the same familiar one used by <command>svnserve.conf</command> and the runtime configuration files. Lines that start with a hash (<literal>#</literal>) are ignored. In its simplest form, each section names a repository and path within it, and the authenticated usernames are the option names within each section. The value of each option describes the user's level of access to the repository path: either <literal>r</literal> (read-only) or <literal>rw</literal> (read-write). If the user is not mentioned at all, no access is allowed."
14653 msgstr "访问文件的语法与<command>svnserve.conf</command>和运行中配置文件非常相似,以(<literal>#</literal>)开头的行会被忽略,在它的简单形式里,每一小节命名一个版本库和一个里面的路径,认证用户名是在每个小节中的选项名,每个选项的值描述了用户访问版本库的级别:<literal>r</literal>(只读)或者<literal>rw</literal>(读写),如果用户没有提到,访问是不允许的。"
14655 #. (para)
14656 #: ../source/book.xml:14319
14657 #, fuzzy
14658 msgid "To be more specific: the value of the section-names are either of the form <literal>[repos-name:path]</literal> or the form <literal>[path]</literal>. If you're using the <literal>SVNParentPath</literal> directive, then it's important to specify the repository names in your sections. If you omit them, then a section like <literal>[/some/dir]</literal> will match the path <filename>/some/dir</filename> in <emphasis>every</emphasis> repository. If you're using the <literal>SVNPath</literal> directive, however, then it's fine to only define paths in your sections—after all, there's only one repository."
14659 msgstr "具体一点:这个小节的名称是<literal>[repos-name:path]</literal>或者<literal>[path]</literal>的形式,如果你使用<literal>SVNParentPath</literal>指示,指定版本库的名字是很重要的,如果你漏掉了他们,<literal>[/some/dir]</literal>部分就会与<filename>/some/dir</filename>的所有版本库匹配,如果你使用<literal>SVNPath</literal>指示,因此在你的小节中只是定义路径也很好—毕竟只有一个版本库。"
14661 #. (screen)
14662 #: ../source/book.xml:14330
14663 #, no-wrap
14664 msgid ""
14665 "\n"
14666 "[calc:/branches/calc/bug-142]\n"
14667 "harry = rw\n"
14668 "sally = r\n"
14669 msgstr ""
14670 "\n"
14671 "[calc:/branches/calc/bug-142]\n"
14672 "harry = rw\n"
14673 "sally = r\n"
14675 #. (para)
14676 #: ../source/book.xml:14335
14677 #, fuzzy
14678 msgid "In this first example, the user <literal>harry</literal> has full read and write access on the <filename>/branches/calc/bug-142</filename> directory in the <literal>calc</literal> repository, but the user <literal>sally</literal> has read-only access. Any other users are blocked from accessing this directory."
14679 msgstr "在第一个例子里,用户<literal>harry</literal>对<literal>calc</literal>版本库中<filename>/branches/calc/bug-142</filename>具备完全的读写权利,但是用户<literal>sally</literal>只有读权利,任何其他用户禁止访问这个目录。"
14681 #. (para)
14682 #: ../source/book.xml:14341
14683 msgid "Of course, permissions are inherited from parent to child directory. That means that we can specify a subdirectory with a different access policy for Sally:"
14684 msgstr "当然,访问控制是父目录传递给子目录的,这意味着我们可以为Sally指定一个子目录的不同访问策略:"
14686 #. (screen)
14687 #: ../source/book.xml:14344
14688 #, no-wrap
14689 msgid ""
14690 "\n"
14691 "[calc:/branches/calc/bug-142]\n"
14692 "harry = rw\n"
14693 "sally = r\n"
14694 "\n"
14695 "# give sally write access only to the 'testing' subdir\n"
14696 "[calc:/branches/calc/bug-142/testing]\n"
14697 "sally = rw\n"
14698 msgstr ""
14699 "\n"
14700 "[calc:/branches/calc/bug-142]\n"
14701 "harry = rw\n"
14702 "sally = r\n"
14703 "\n"
14704 "# give sally write access only to the 'testing' subdir\n"
14705 "[calc:/branches/calc/bug-142/testing]\n"
14706 "sally = rw\n"
14708 #. (para)
14709 #: ../source/book.xml:14353
14710 #, fuzzy
14711 msgid "Now Sally can write to the <filename>testing</filename> subdirectory of the branch, but can still only read other parts. Harry, meanwhile, continues to have complete read-write access to the whole branch."
14712 msgstr "现在Sally可以读取分支的<filename>testing</filename>子目录,但对其他部分还是只可以读,同时,Harry对整个分支还继续有完全的读写权限。"
14714 #. (para)
14715 #: ../source/book.xml:14357
14716 msgid "It's also possible to explicitly deny permission to someone via inheritance rules, by setting the username variable to nothing:"
14717 msgstr "也可以通过继承规则明确的的拒绝某人的访问,只需要设置用户名参数为空:"
14719 #. (screen)
14720 #: ../source/book.xml:14360
14721 #, no-wrap
14722 msgid ""
14723 "\n"
14724 "[calc:/branches/calc/bug-142]\n"
14725 "harry = rw\n"
14726 "sally = r\n"
14727 "\n"
14728 "[calc:/branches/calc/bug-142/secret]\n"
14729 "harry =\n"
14730 msgstr ""
14731 "\n"
14732 "[calc:/branches/calc/bug-142]\n"
14733 "harry = rw\n"
14734 "sally = r\n"
14735 "\n"
14736 "[calc:/branches/calc/bug-142/secret]\n"
14737 "harry =\n"
14739 #. (para)
14740 #: ../source/book.xml:14368
14741 #, fuzzy
14742 msgid "In this example, Harry has read-write access to the entire <filename>bug-142</filename> tree, but has absolutely no access at all to the <filename>secret</filename> subdirectory within it."
14743 msgstr "在这个例子里,Harry对<filename>bug-142</filename>目录树有完全的读写权限,但是对<filename>secret</filename>子目录没有任何访问权利。"
14745 #. (para)
14746 #: ../source/book.xml:14372
14747 msgid "The thing to remember is that the most specific path always matches first. The server tries to match the path itself, and then the parent of the path, then the parent of that, and so on. The net effect is that mentioning a specific path in the accessfile will always override any permissions inherited from parent directories."
14748 msgstr "需要记住的是最详细的的路径会被匹配,服务器首先找到匹配自己的目录,然后父目录,然后父目录的父目录,就这样继续下去,更具体的路径控制会覆盖所有继承下来的访问控制。"
14750 #. (para)
14751 #: ../source/book.xml:14378
14752 #, fuzzy
14753 msgid "By default, nobody has any access to the repository at all. That means that if you're starting with an empty file, you'll probably want to give at least read permission to all users at the root of the repository. You can do this by using the asterisk variable (<literal>*</literal>), which means <quote>all users</quote>:"
14754 msgstr "缺省情况下,没有人对版本库有任何访问,这意味着如果你已经从一个空文件开始,你会希望给所有用户对版本库根目录具备读权限,你可以使用<literal>*</literal>实现,用来代表<quote>所有用户</quote>:"
14756 #. (screen)
14757 #: ../source/book.xml:14384
14758 #, no-wrap
14759 msgid ""
14760 "\n"
14761 "[/]\n"
14762 "* = r\n"
14763 msgstr ""
14764 "\n"
14765 "[/]\n"
14766 "* = r\n"
14768 #. (para)
14769 #: ../source/book.xml:14388
14770 #, fuzzy
14771 msgid "This is a common setup; notice that there's no repository name mentioned in the section name. This makes all repositories world readable to all users. Once all users have read-access to the repositories, you can give explicit <literal>rw</literal> permission to certain users on specific subdirectories within specific repositories."
14772 msgstr "这是一个普通的设置;注意在小节名中没有提到版本库名称,这让所有版本库对所有的用户可读。当所有用户对版本库有了读权利,你可以赋予特定用户对特定子目录的<literal>rw</literal>权限。"
14774 #. (para)
14775 #: ../source/book.xml:14394
14776 #, fuzzy
14777 msgid "The asterisk variable (<literal>*</literal>) is also worth special mention here: it's the <emphasis>only</emphasis> pattern which matches an anonymous user. If you've configured your server block to allow a mixture of anonymous and authenticated access, all users start out accessing anonymously. The server looks for a <literal>*</literal> value defined for the path being accessed; if it can't find one, then it demands real authentication from the client."
14778 msgstr "星号(<literal>*</literal>)参数需要在这里详细强调:这是匹配匿名用户的<emphasis>唯一</emphasis>模式,如果你已经配置了你的<literal>Location</literal>区块允许匿名和认证用户的混合访问,所有用户作为Apache匿名用户开始访问,<command>mod_authz_svn</command>会在要访问路径的定义中查找<literal>*</literal>值;如果找不到,Apache就会要求真实的客户端认证。"
14780 #. (para)
14781 #: ../source/book.xml:14403
14782 #, fuzzy
14783 msgid "The access file also allows you to define whole groups of users, much like the Unix <filename>/etc/group</filename> file:"
14784 msgstr "访问文件也允许你定义一组的用户,很像Unix的<filename>/etc/group</filename>文件:"
14786 #. (screen)
14787 #: ../source/book.xml:14406
14788 #, no-wrap
14789 msgid ""
14790 "\n"
14791 "[groups]\n"
14792 "calc-developers = harry, sally, joe\n"
14793 "paint-developers = frank, sally, jane\n"
14794 "everyone = harry, sally, joe, frank, sally, jane\n"
14795 msgstr ""
14796 "\n"
14797 "[groups]\n"
14798 "calc-developers = harry, sally, joe\n"
14799 "paint-developers = frank, sally, jane\n"
14800 "everyone = harry, sally, joe, frank, sally, jane\n"
14802 #. (para)
14803 #: ../source/book.xml:14412
14804 #, fuzzy
14805 msgid "Groups can be granted access control just like users. Distinguish them with an <quote>at</quote> (<literal>@</literal>) prefix:"
14806 msgstr "组可以被赋予通用户一样的访问权限,使用<quote>at</quote>(<literal>@</literal>)前缀来加以区别:"
14808 #. (screen)
14809 #: ../source/book.xml:14415
14810 #, no-wrap
14811 msgid ""
14812 "\n"
14813 "[calc:/projects/calc]\n"
14814 "@calc-developers = rw\n"
14815 "\n"
14816 "[paint:/projects/paint]\n"
14817 "@paint-developers = rw\n"
14818 "jane = r\n"
14819 msgstr ""
14820 "\n"
14821 "[calc:/projects/calc]\n"
14822 "@calc-developers = rw\n"
14823 "\n"
14824 "[paint:/projects/paint]\n"
14825 "@paint-developers = rw\n"
14826 "jane = r\n"
14828 #. (para)
14829 #: ../source/book.xml:14423
14830 msgid "Groups can also be defined to contain other groups:"
14831 msgstr "组中也可以定义为包含其它的组:"
14833 #. (screen)
14834 #: ../source/book.xml:14424
14835 #, no-wrap
14836 msgid ""
14837 "\n"
14838 "[groups]\n"
14839 "calc-developers = harry, sally, joe\n"
14840 "paint-developers = frank, sally, jane\n"
14841 "everyone = @calc-developers, @paint-developers\n"
14842 msgstr ""
14843 "\n"
14844 "[groups]\n"
14845 "calc-developers = harry, sally, joe\n"
14846 "paint-developers = frank, sally, jane\n"
14847 "everyone = @calc-developers, @paint-developers\n"
14849 #. (title)
14850 #: ../source/book.xml:14435
14851 msgid "Partial Readability and Checkouts"
14852 msgstr "部分可读性和检出"
14854 #. (para)
14855 #: ../source/book.xml:14437
14856 msgid "If you're using Apache as your Subversion server and have made certain subdirectories of your repository unreadable to certain users, then you need to be aware of a possible non-optimal behavior with <command>svn checkout</command>."
14857 msgstr "如果你使用Apache作为Subversion服务器,并让版本库的某些子目录对特定用户不可读,然后你需要知道<command>svn checkout</command>会有一个不理想的执行方式。"
14859 #. (para)
14860 #: ../source/book.xml:14442
14861 msgid "When the client requests a checkout or update over HTTP, it makes a single server request, and receives a single (often large) server response. When the server receives the request, that is the <emphasis>only</emphasis> opportunity Apache has to demand user authentication. This has some odd side-effects. For example, if a certain subdirectory of the repository is only readable by user Sally, and user Harry checks out a parent directory, his client will respond to the initial authentication challenge as Harry. As the server generates the large response, there's no way it can re-send an authentication challenge when it reaches the special subdirectory; thus the subdirectory is skipped altogether, rather than asking the user to re-authenticate as Sally at the right moment. In a similar way, if the root of the repository is anonymously world-readable, then the entire checkout will be done without authentication—again, skipping the unreadable directory, rather than asking for authentication partway through."
14862 msgstr "当客户端通过HTTP请求检出或更新时,它会做出一个单独的服务器请求,并接收一个单独的(通常很大)服务器响应,当服务器接收到请求,这是Apache服务器要求用户认证的<emphasis>唯一</emphasis>机会,这有一些副作用。例如,如果版本库的一个特定子目录只对用户Sally可读,用户Harry检出父目录,他的客户端会在收到认证要求时返回用户名Harry,因为服务器生成的响应很大,无法在达到特别子目录时重新发送认证请求;因此子目录会被一起略过,而不会询问用户是否使用Sally重新认证。如果版本库是匿名可访问的,则整个检出将不需要认证—再一次,略过不可读的目录,而不会中途要求认证。"
14864 #. (title)
14865 #: ../source/book.xml:14466
14866 msgid "Supporting Multiple Repository Access Methods"
14867 msgstr "支持多种版本库访问方法"
14869 #. (para)
14870 #: ../source/book.xml:14468
14871 msgid "You've seen how a repository can be accessed in many different ways. But is it possible—or safe—for your repository to be accessed by multiple methods simultaneously? The answer is yes, provided you use a bit of foresight."
14872 msgstr "你已经看到了一个版本库可以用多种方式访问,但是可以—或者说安全的—用几种方式同时并行的访问你的版本库吗?回答是可以,倘若你有一些深谋远虑的使用。"
14874 #. (para)
14875 #: ../source/book.xml:14472
14876 msgid "At any given time, these processes may require read and write access to your repository:"
14877 msgstr "在任何给定的时间,这些进程会要求读或者写访问你的版本库:"
14879 #. (para)
14880 #: ../source/book.xml:14476
14881 #, fuzzy
14882 msgid "regular system users using a Subversion client (as themselves) to access the repository directly via <literal>file://</literal> URLs;"
14883 msgstr "常规的系统用户使用Subversion客户端(客户端程序本身)通过<literal>file:///</literal>URL直接访问版本库;"
14885 #. (para)
14886 #: ../source/book.xml:14481
14887 #, fuzzy
14888 msgid "regular system users connecting to SSH-spawned private <command>svnserve</command> processes (running as themselves) which access the repository;"
14889 msgstr "常规的系统用户连接使用SSH调用的访问版本库的<command>svnserve</command>进程(以它们自己运行);"
14891 #. (para)
14892 #: ../source/book.xml:14486
14893 #, fuzzy
14894 msgid "an <command>svnserve</command> process—either a daemon or one launched by <command>inetd</command>—running as a particular fixed user;"
14895 msgstr "一个<command>svnserve</command>进程—是一个守护进程或是通过<command>inetd</command>启动的—作为一个固定的用户运行;"
14897 #. (para)
14898 #: ../source/book.xml:14492
14899 #, fuzzy
14900 msgid "an Apache <command>httpd</command> process, running as a particular fixed user."
14901 msgstr "一个Apache <command>httpd</command>进程,以一个固定用户运行。"
14903 #. (para)
14904 #: ../source/book.xml:14496
14905 #, fuzzy
14906 msgid "The most common problem administrators run into is repository ownership and permissions. Does every process (or user) in the previous list have the rights to read and write the Berkeley DB files? Assuming you have a Unix-like operating system, a straightforward approach might be to place every potential repository user into a new <literal>svn</literal> group, and make the repository wholly owned by that group. But even that's not enough, because a process may write to the database files using an unfriendly umask—one that prevents access by other users."
14907 msgstr "最通常的一个问题是管理进入到版本库的所有权和访问许可,是前面例子的所有进程 (或者说是用户)都有读写Berkeley DB的权限?假定你有一个类Unix的操作系统,一个直接的办法是在新的<literal>svn</literal>组添加所有潜在的用户,然后让这个组完全拥有版本库,但这样还不足够,因为一个进程会使用不友好的umask来写数据库文件—用来防止别的用户的访问。"
14909 #. (para)
14910 #: ../source/book.xml:14506
14911 #, fuzzy
14912 msgid "So the next step beyond setting up a common group for repository users is to force every repository-accessing process to use a sane umask. For users accessing the repository directly, you can make the <command>svn</command> program into a wrapper script that first sets <command>umask 002</command> and then runs the real <command>svn</command> client program. You can write a similar wrapper script for the <command>svnserve</command> program, and add a <command>umask 002</command> command to Apache's own startup script, <filename>apachectl</filename>. For example:"
14913 msgstr "所以下一步我们不选择为每个版本库用户设置一个共同的组的方法,而是强制每个版本库访问进程使用一个健全的umask。对直接访问版本库的用户,你可以使用<command>svn</command>的包裹脚本来首先设置<command>umask 002</command>,然后运行真实的<command>svn</command>客户端程序,你可以为<command>svnserve</command>写相同的脚本,并且增加<command>umask 002</command>命令到Apache自己的启动脚本<filename>apachectl</filename>中。例如:"
14915 #. (screen)
14916 #: ../source/book.xml:14516
14917 #, no-wrap
14918 msgid ""
14919 "\n"
14920 "$ cat /usr/bin/svn\n"
14921 "\n"
14922 "#!/bin/sh\n"
14923 "\n"
14924 "umask 002\n"
14925 "/usr/bin/svn-real \"$@\"\n"
14926 "\n"
14927 msgstr ""
14928 "\n"
14929 "$ cat /usr/bin/svn\n"
14930 "\n"
14931 "#!/bin/sh\n"
14932 "\n"
14933 "umask 002\n"
14934 "/usr/bin/svn-real \"$@\"\n"
14935 "\n"
14937 #. (para)
14938 #: ../source/book.xml:14525
14939 #, fuzzy
14940 msgid "Another common problem is often encountered on Unix-like systems. As a repository is used, Berkeley DB occasionally creates new log files to journal its actions. Even if the repository is wholly owned by the <command>svn</command> group, these newly created files won't necessarily be owned by that same group, which then creates more permissions problems for your users. A good workaround is to set the group SUID bit on the repository's <filename>db</filename> directory. This causes all newly-created log files to have the same group owner as the parent directory."
14941 msgstr "另一个在类Unix系统下常见的问题是,当版本库在使用时,BerkeleyDB有时候创建一个新的日志文件来记录它的东西,即使这个版本库是完全由<command>svn</command>组拥有,这个新创建的文件不是必须被同一个组拥有,这给你的用户造成了更多地许可问题。一个好的工作区应该设置组的SUID字节到版本库的<filename>db</filename>目录,这会导致所有新创建的日志文件拥有同父目录相同的组拥有者。"
14943 #. (para)
14944 #: ../source/book.xml:14535
14945 msgid "Once you've jumped through these hoops, your repository should be accessible by all the necessary processes. It may seem a bit messy and complicated, but the problems of having multiple users sharing write-access to common files are classic ones that are not often elegantly solved."
14946 msgstr "一旦你跳过了这些障碍,你的版本库一定是可以通过各种可能的手段访问了,这看起来有点凌乱和复杂,但是这个让多个用户分享对一个文件的写权限的问题是一个经典问题,并且经常是没有优雅的解决。"
14948 #. (para)
14949 #: ../source/book.xml:14540
14950 #, fuzzy
14951 msgid "Fortunately, most repository administrators will never <emphasis>need</emphasis> to have such a complex configuration. Users who wish to access repositories that live on the same machine are not limited to using <literal>file://</literal> access URLs—they can typically contact the Apache HTTP server or <command>svnserve</command> using <literal>localhost</literal> for the server name in their <literal>http://</literal> or <literal>svn://</literal> URLs. And to maintain multiple server processes for your Subversion repositories is likely to be more of a headache than necessary. We recommend you choose the server that best meets your needs and stick with it!"
14952 msgstr "幸运的是,大多数版本库管理员不<emphasis>需要</emphasis>这样复杂的配置,用户如果希望访问本机的版本库,并不是一定要通过<literal>file://</literal>的URL—他们可以用<literal>localhost</literal>机器名联系Apache的HTTP服务器或者是<command>svnserve</command>,协议分别是<literal>http://</literal>或<literal>svn://</literal>。为你的Subversion版本库维护多个服务器进程,版本库会变得超出需要的头痛,我们建议你选择最符合你的需要的版本库,并且坚持使用!"
14954 #. (title)
14955 #: ../source/book.xml:14554
14956 msgid "The svn+ssh:// server checklist"
14957 msgstr "svn+ssh 服务器检查列表"
14959 #. (para)
14960 #: ../source/book.xml:14556
14961 msgid "It can be quite tricky to get a bunch of users with existing SSH accounts to share a repository without permissions problems. If you're confused about all the things that you (as an administrator) need to do on a Unix-like system, here's a quick checklist that resummarizes some of things discussed in this section:"
14962 msgstr "让一些用户通过存在的SSH帐户来共享版本库而没有访问许可问题是一件很有技巧的事情,如果你为自己需要在(作为一个管理员)类Unix系统上做的事情感到迷惑,这里是一些快速的检查列表,总结了本小节讨论的事情:"
14964 #. (para)
14965 #: ../source/book.xml:14564
14966 #, fuzzy
14967 msgid "All of your SSH users need to be able to read and write to the repository, so: put all the SSH users into a single group."
14968 msgstr "所有的SSH用户需要能够读写版本库,把所有的SSH用户放到同一个组里,让版本库完全属于这个组,设置组的权限是读/写。"
14970 #. (para)
14971 #: ../source/book.xml:14569
14972 msgid "Make the repository wholly owned by that group."
14973 msgstr "让那个组拥有整个版本库。"
14975 #. (para)
14976 #: ../source/book.xml:14574
14977 #, fuzzy
14978 msgid "Set the group permissions to read/write."
14979 msgstr "组访问权处理"
14981 #. (para)
14982 #: ../source/book.xml:14577
14983 #, fuzzy
14984 msgid "Your users need to use a sane umask when accessing the repository, so: make sure that <command>svnserve</command> (<filename>/usr/bin/svnserve</filename>, or wherever it lives in <literal>$PATH</literal>) is actually a wrapper script which sets <command>umask 002</command> and executes the real <command>svnserve</command> binary."
14985 msgstr "你的用户在访问版本库时需要使用一个健全的umask,确定<command>svnserve</command>(<filename>/usr/bin/svnserve</filename>或者是任何一个<literal>$PATH</literal>说明的位置)是一个设置了<command>umask 002</command>和执行真正的<command>svnserve</command>程序的包裹脚本,对<command>svnlook</command>和<command>svnadmin</command>使用相同的措施,或者是使用一个健全的umask运行或者是使用上面说明的包裹。"
14987 #. (para)
14988 #: ../source/book.xml:14586
14989 #, fuzzy
14990 msgid "Take similar measures when using <command>svnlook</command> and <command>svnadmin</command>. Either run them with a sane umask, or wrap them as described above."
14991 msgstr "像<command>svnserve</command>,<command>svnversion</command>没有子命令,只有选项。"
14993 #. (title)
14994 #: ../source/book.xml:14602
14995 msgid "Customizing Your Subversion Experience"
14996 msgstr "定制你的 Subversion 用法"
14998 #. (para)
14999 #: ../source/book.xml:14604
15000 msgid "Version control can be a complex subject, as much art as science, and offering myriad ways of getting stuff done. Throughout this book you've read of the various Subversion command-line client subcommands and the options which modify their behavior. In this chapter, we'll look into still more ways to customize the way Subversion works for you—setting up the Subversion runtime configuration, using external helper applications, Subversion's interaction with the operating system's configured locale, and so on."
15001 msgstr "版本控制可以成为复杂的主题,和科学一样充满艺术性,为解决事情能提供了无数的方法。贯穿这本书,你已经阅读许多Subversion命令行子命令,以及可以改变运行方式的选项,在本章我们要查看一些自定义Subversion工作的方法—设置Subversion运行配置,使用外置帮助程序,Subversion与操作系统配置的地区交互等等。"
15003 #. (title)
15004 #: ../source/book.xml:14623
15005 msgid "Runtime Configuration Area"
15006 msgstr "运行配置区"
15008 #. (para)
15009 #: ../source/book.xml:14625
15010 #, fuzzy
15011 msgid "Subversion provides many optional behaviors that can be controlled by the user. Many of these options are of the kind that a user would wish to apply to all Subversion operations. So, rather than forcing users to remember command-line arguments for specifying these options, and to use them for every operation they perform, Subversion uses configuration files, segregated into a Subversion configuration area."
15012 msgstr "Subversion提供了许多用户可以控制的可选行为方式,许多是用户希望添加到所有的Subversion操作中的选项,为了避免强制用户记住命令行参数并且在每个命令中使用,Subversion使用配置文件,并且将配置文件保存在独立的Subversion配置区。"
15014 #. (para)
15015 #: ../source/book.xml:14632
15016 msgid "The Subversion <firstterm>configuration area</firstterm> is a two-tiered hierarchy of option names and their values. Usually, this boils down to a special directory that contains <firstterm>configuration files</firstterm> (the first tier), which are just text files in standard INI format (with <quote>sections</quote> providing the second tier). These files can be easily edited using your favorite text editor (such as Emacs or vi), and contain directives read by the client to determine which of several optional behaviors the user prefers."
15017 msgstr "Subversion<firstterm>配置区</firstterm>是一个双层结构,保存了可选项的名称和值。通常,Subversion配置区是一个保存<firstterm>配置文件</firstterm>的特殊目录(第一层结构),目录中保存了一些标准INI格式的文本文件(文件中的<quote>section</quote>形成第二层结构)。这些文件可以简单用你喜欢的文本编辑器编辑(如Emacs或vi),而且保存了客户端可以读取的指示,用来指导用户的一些行为选项。"
15019 #. (title)
15020 #: ../source/book.xml:14645
15021 msgid "Configuration Area Layout"
15022 msgstr "配置区布局"
15024 #. (para)
15025 #: ../source/book.xml:14658
15026 #, fuzzy
15027 msgid "The <literal>APPDATA</literal> environment variable points to the <filename>Application Data</filename> area, so you can always refer to this folder as <filename>%APPDATA%\\Subversion</filename>."
15028 msgstr "<literal>APPDATA</literal>环境变量指向<filename>Application Data</filename>目录,所以你可以通过<filename>%APPDATA%\\Subversion</filename>引用用户配置区目录。"
15030 #. (para)
15031 #: ../source/book.xml:14647
15032 #, fuzzy
15033 msgid "The first time that the <command>svn</command> command-line client is executed, it creates a per-user configuration area. On Unix-like systems, this area appears as a directory named <filename>.subversion</filename> in the user's home directory. On Win32 systems, Subversion creates a folder named <filename>Subversion</filename>, typically inside the <filename>Application Data</filename> area of the user's profile directory (which, by the way, is usually a hidden directory). However, on this platform the exact location differs from system to system, and is dictated by the Windows registry. <placeholder-1/> We will refer to the per-user configuration area using its Unix name, <filename>.subversion</filename>."
15034 msgstr "<command>svn</command>命令行客户端第一次执行时,会创建一个用户配置区,在类Unix系统中,配置区位于用户主目录中,名为<filename>.subversion</filename>。在Win32系统,Subversion创建一个名为<filename>Subversion</filename>的目录,这个目录通常位于用户配置目录(顺便说一句,通常是一个隐藏目录)的<filename>Application Data</filename>子目录下。然而,在Win32平台上,此目录的具体位置在不同的系统上是不一样的,由Windows注册表决定。 <placeholder-1/>我们以Unix下的名字<filename>.subversion</filename>来表示用户配置区。"
15036 #. (para)
15037 #: ../source/book.xml:14664
15038 #, fuzzy
15039 msgid "In addition to the per-user configuration area, Subversion also recognizes the existence of a system-wide configuration area. This gives system administrators the ability to establish defaults for all users on a given machine. Note that the system-wide configuration area does not alone dictate mandatory policy—the settings in the per-user configuration area override those in the system-wide one, and command-line arguments supplied to the <command>svn</command> program have the final word on behavior. On Unix-like platforms, the system-wide configuration area is expected to be the <filename>/etc/subversion</filename> directory; on Windows machines, it looks for a <filename>Subversion</filename> directory inside the common <filename>Application Data</filename> location (again, as specified by the Windows Registry). Unlike the per-user case, the <command>svn</command> program does not attempt to create the system-wide configuration area."
15040 msgstr "除了用户配置区,Subversion也提供了系统配置区,通过系统配置区,系统管理员可以为某个机器的所有用户建立缺省配置值。注意系统配置区不会规定强制性的策略—每个用户配置区都可以覆盖系统配置区中的配置项,而<command>svn</command>的命令行参数决定了最后的行为。在类Unix的平台上,系统配置区位于<filename>/etc/subversion</filename>目录下,在Windows平台上,系统配置区位于<filename>Application Data</filename>(再说一次,是由Windows注册表决定的)的<filename>Subversion</filename>目录中。与用户配置区不同,<command>svn</command>不会试图创建系统配置区。"
15042 #. (para)
15043 #: ../source/book.xml:14681
15044 #, fuzzy
15045 msgid "The per-user configuration area currently contains three files—two configuration files (<filename>config</filename> and <filename>servers</filename>), and a <filename>README.txt</filename> file which describes the INI format. At the time of their creation, the files contain default values for each of the supported Subversion options, mostly commented out and grouped with textual descriptions about how the values for the key affect Subversion's behavior. To change a certain behavior, you need only to load the appropriate configuration file into a text editor, and modify the desired option's value. If at any time you wish to have the default configuration settings restored, you can simply remove (or rename) your configuration directory and then run some innocuous <command>svn</command> command, such as <command>svn --version</command>. A new configuration directory with the default contents will be created."
15046 msgstr "目前,Subversion的配置区包含三个文件—两个配置文件(<filename>config</filename>和<filename>servers</filename>),和一个INI文件格式的<filename>README.txt</filename>描述文件。配置文件创建的时候,Subversion的选项都设置为默认值。配置文件中的选项都按功能划分成组,大多数选项还有详细的文字描述注释,说明这些选项的值对Subversion的主要影响。要修改选项,只需用文本编辑器打开并编辑配置文件。如果想要恢复缺省的配置,可以直接删除(或者重命名)配置目录,并且运行一些如<command>svn --version</command>之类的无关紧要的<command>svn</command>命令,一个包含缺省值的新配置目录就会创建起来。"
15048 #. (para)
15049 #: ../source/book.xml:14697
15050 #, fuzzy
15051 msgid "The per-user configuration area also contains a cache of authentication data. The <filename>auth</filename> directory holds a set of subdirectories that contain pieces of cached information used by Subversion's various supported authentication methods. This directory is created in such a way that only the user herself has permission to read its contents."
15052 msgstr "用户配置区也缓存了认证信息,<filename>auth</filename>目录下的子目录中缓存了一些Subversion支持的各种认证方法的信息,这个目录需要相应的用户权限才可以访问。"
15054 #. (title)
15055 #: ../source/book.xml:14708
15056 msgid "Configuration and the Windows Registry"
15057 msgstr "配置和 Windows 注册表"
15059 #. (para)
15060 #: ../source/book.xml:14710
15061 msgid "In addition to the usual INI-based configuration area, Subversion clients running on Windows platforms may also use the Windows registry to hold the configuration data. The option names and their values are the same as in the INI files. The <quote>file/section</quote> hierarchy is preserved as well, though addressed in a slightly different fashion—in this schema, files and sections are just levels in the registry key tree."
15062 msgstr "除了基于INI文件的配置区,运行在Windows平台的Subversion客户端也可以使用Windows注册表来保存配置数据。注册表中保存的选项名称和值的含义与INI文件中相同,<quote>file/section</quote>在注册表中表现为注册表键树的层级,使得双层结构得以保留下来。"
15064 #. (para)
15065 #: ../source/book.xml:14718
15066 #, fuzzy
15067 msgid "Subversion looks for system-wide configuration values under the <literal>HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion</literal> key. For example, the <literal>global-ignores</literal> option, which is in the <literal>miscellany</literal> section of the <filename>config</filename> file, would be found at <literal>HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Config\\Miscellany\\global-ignores</literal>. Per-user configuration values should be stored under <literal>HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion</literal>."
15068 msgstr "Subversion的系统配置值保存在键<literal>HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion</literal>下。举个例子,<literal>global-ignores</literal>选项位于<filename>config</filename>文件的<literal>miscellany</literal>小节,在Windows注册表中,则位于<literal>HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Config\\Miscellany\\global-ignores</literal>。用户配置值存放在<literal>HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion</literal>下。"
15070 #. (para)
15071 #: ../source/book.xml:14728
15072 #, fuzzy
15073 msgid "Registry-based configuration options are parsed <emphasis>before</emphasis> their file-based counterparts, so are overridden by values found in the configuration files. In other words, Subversion looks for configuration information in the following locations on a Windows system; lower-numbered locations take precedence over higher-numbered locations:"
15074 msgstr "基于注册表的配置项在基于文件的配置项<emphasis>之前</emphasis>解析,所以其配置项的值会被配置文件中相同配置项的值覆盖,换句话说,在Windows系统下配置项的优先级是:"
15076 #. (para)
15077 #: ../source/book.xml:14736
15078 msgid "Command-line options"
15079 msgstr "命令行选项"
15081 #. (para)
15082 #: ../source/book.xml:14739
15083 msgid "The per-user INI files"
15084 msgstr "用户INI配置文件"
15086 #. (para)
15087 #: ../source/book.xml:14742
15088 msgid "The per-user Registry values"
15089 msgstr "用户注册表值"
15091 #. (para)
15092 #: ../source/book.xml:14745
15093 msgid "The system-wide INI files"
15094 msgstr "系统INI配置文件"
15096 #. (para)
15097 #: ../source/book.xml:14748
15098 msgid "The system-wide Registry values"
15099 msgstr "系统注册表值"
15101 #. (para)
15102 #: ../source/book.xml:14751
15103 #, fuzzy
15104 msgid "Also, the Windows Registry doesn't really support the notion of something being <quote>commented out</quote>. However, Subversion will ignore any option key whose name begins with a hash (<literal>#</literal>) character. This allows you to effectively comment out a Subversion option without deleting the entire key from the Registry, obviously simplifying the process of restoring that option."
15105 msgstr "此外,虽然Windows注册表不支持<quote>注释掉</quote>这种概念,但是Subversion会忽略所有以井号(<literal>#</literal>)开始的字符,这允许你快速的取消一个选项而不需要删除整个注册表键,明显简化了恢复选项的过程。"
15107 #. (para)
15108 #: ../source/book.xml:14758
15109 #, fuzzy
15110 msgid "The <command>svn</command> command-line client never attempts to write to the Windows Registry, and will not attempt to create a default configuration area there. You can create the keys you need using the <command>REGEDIT</command> program. Alternatively, you can create a <filename>.reg</filename> file, and then double-click on that file from the Explorer shell, which will cause the data to be merged into your registry."
15111 msgstr "<command>svn</command>命令行客户端不会尝试写Windows注册表,也不会在注册表中创建默认配置区。不过可以使用<command>REGEDIT</command>创建所需的键。此外,还可以创建一个<filename>.reg</filename>文件,并在文件浏览器中双击这个文件,文件中的数据就会合并到注册表中。"
15113 #. (title)
15114 #: ../source/book.xml:14768
15115 msgid "Sample Registration Entries (.reg) File."
15116 msgstr "注册表条目(.reg)样本文件。"
15118 #. (programlisting)
15119 #: ../source/book.xml:14770
15120 #, no-wrap
15121 msgid ""
15122 "\n"
15123 "REGEDIT4\n"
15124 "\n"
15125 "[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\groups]\n"
15126 "\n"
15127 "[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\global]\n"
15128 "\"#http-proxy-host\"=\"\"\n"
15129 "\"#http-proxy-port\"=\"\"\n"
15130 "\"#http-proxy-username\"=\"\"\n"
15131 "\"#http-proxy-password\"=\"\"\n"
15132 "\"#http-proxy-exceptions\"=\"\"\n"
15133 "\"#http-timeout\"=\"0\"\n"
15134 "\"#http-compression\"=\"yes\"\n"
15135 "\"#neon-debug-mask\"=\"\"\n"
15136 "\"#ssl-authority-files\"=\"\"\n"
15137 "\"#ssl-trust-default-ca\"=\"\"\n"
15138 "\"#ssl-client-cert-file\"=\"\"\n"
15139 "\"#ssl-client-cert-password\"=\"\"\n"
15140 "\n"
15141 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auth]\n"
15142 "\"#store-passwords\"=\"yes\"\n"
15143 "\"#store-auth-creds\"=\"yes\"\n"
15144 "\n"
15145 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\helpers]\n"
15146 "\"#editor-cmd\"=\"notepad\"\n"
15147 "\"#diff-cmd\"=\"\"\n"
15148 "\"#diff3-cmd\"=\"\"\n"
15149 "\"#diff3-has-program-arg\"=\"\"\n"
15150 "\n"
15151 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\tunnels]\n"
15152 "\n"
15153 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\miscellany]\n"
15154 "\"#global-ignores\"=\"*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store\"\n"
15155 "\"#log-encoding\"=\"\"\n"
15156 "\"#use-commit-times\"=\"\"\n"
15157 "\"#no-unlock\"=\"\"\n"
15158 "\"#enable-auto-props\"=\"\"\n"
15159 "\n"
15160 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auto-props]\n"
15161 "\n"
15162 msgstr ""
15163 "\n"
15164 "REGEDIT4\n"
15165 "\n"
15166 "[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\groups]\n"
15167 "\n"
15168 "[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\global]\n"
15169 "\"#http-proxy-host\"=\"\"\n"
15170 "\"#http-proxy-port\"=\"\"\n"
15171 "\"#http-proxy-username\"=\"\"\n"
15172 "\"#http-proxy-password\"=\"\"\n"
15173 "\"#http-proxy-exceptions\"=\"\"\n"
15174 "\"#http-timeout\"=\"0\"\n"
15175 "\"#http-compression\"=\"yes\"\n"
15176 "\"#neon-debug-mask\"=\"\"\n"
15177 "\"#ssl-authority-files\"=\"\"\n"
15178 "\"#ssl-trust-default-ca\"=\"\"\n"
15179 "\"#ssl-client-cert-file\"=\"\"\n"
15180 "\"#ssl-client-cert-password\"=\"\"\n"
15181 "\n"
15182 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auth]\n"
15183 "\"#store-passwords\"=\"yes\"\n"
15184 "\"#store-auth-creds\"=\"yes\"\n"
15185 "\n"
15186 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\helpers]\n"
15187 "\"#editor-cmd\"=\"notepad\"\n"
15188 "\"#diff-cmd\"=\"\"\n"
15189 "\"#diff3-cmd\"=\"\"\n"
15190 "\"#diff3-has-program-arg\"=\"\"\n"
15191 "\n"
15192 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\tunnels]\n"
15193 "\n"
15194 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\miscellany]\n"
15195 "\"#global-ignores\"=\"*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store\"\n"
15196 "\"#log-encoding\"=\"\"\n"
15197 "\"#use-commit-times\"=\"\"\n"
15198 "\"#no-unlock\"=\"\"\n"
15199 "\"#enable-auto-props\"=\"\"\n"
15200 "\n"
15201 "[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auto-props]\n"
15202 "\n"
15204 #. (para)
15205 #: ../source/book.xml:14812
15206 #, fuzzy
15207 msgid "The previous example shows the contents of a <filename>.reg</filename> file which contains some of the most commonly used configuration options and their default values. Note the presence of both system-wide (for network proxy-related options) and per-user settings (editor programs and password storage, among others). Also note that all the options are effectively commented out. You need only to remove the hash (<literal>#</literal>) character from the beginning of the option names, and set the values as you desire."
15208 msgstr "上面例子里显示的<filename>.reg</filename>文件中,包含了一些最常用的配置选项和它们的缺省值。注意,上面的例子中不仅包含了系统设置(关于网络代理相关的选项),也包含了用户设置(指定的编辑器程序,是否保存密码,以及其它选项)。同时要注意的是,所有选项都注释掉了,要启用其中的选项,只需删除该选项名称前面的井号(<literal>#</literal>),然后设置相应的值就可以了。"
15210 #. (title)
15211 #: ../source/book.xml:14826
15212 msgid "Configuration Options"
15213 msgstr "配置选项"
15215 #. TODO(cmpilato): Rework and move this section to the Reference
15216 #. (para)
15217 #: ../source/book.xml:14829
15218 msgid "In this section, we will discuss the specific run-time configuration options that are currently supported by Subversion."
15219 msgstr "本节我们会详细讨论Subversion目前支持的运行配置选项。"
15221 #. (title)
15222 #: ../source/book.xml:14835
15223 msgid "Servers"
15224 msgstr "服务器"
15226 #. (para)
15227 #: ../source/book.xml:14837
15228 #, fuzzy
15229 msgid "The <filename>servers</filename> file contains Subversion configuration options related to the network layers. There are two special section names in this file—<literal>groups</literal> and <literal>global</literal>. The <literal>groups</literal> section is essentially a cross-reference table. The keys in this section are the names of other sections in the file; their values are <firstterm>globs</firstterm>—textual tokens which possibly contain wildcard characters—that are compared against the hostnames of the machine to which Subversion requests are sent."
15230 msgstr "<filename>servers</filename>文件保存了Subversion关于网络层的配置选项,这个文件有两个特别的小节:<literal>groups</literal> 和<literal>global</literal>。<literal>groups</literal>小节是一个交叉引用表,其中的关键字是<filename>servers</filename>文件中其它小节的名字,值则是一个可以包含通配符的字符序列,对应于接收Subversion请求的主机名,称为glob。"
15232 #. (programlisting)
15233 #: ../source/book.xml:14848
15234 #, no-wrap
15235 msgid ""
15236 "\n"
15237 "[groups]\n"
15238 "beanie-babies = *.red-bean.com\n"
15239 "collabnet = svn.collab.net\n"
15240 "\n"
15241 "[beanie-babies]\n"
15242 "…\n"
15243 "\n"
15244 "[collabnet]\n"
15245 "…\n"
15246 msgstr ""
15247 "\n"
15248 "[groups]\n"
15249 "beanie-babies = *.red-bean.com\n"
15250 "collabnet = svn.collab.net\n"
15251 "\n"
15252 "[beanie-babies]\n"
15253 "…\n"
15254 "\n"
15255 "[collabnet]\n"
15256 "…\n"
15258 #. (para)
15259 #: ../source/book.xml:14859
15260 #, fuzzy
15261 msgid "When Subversion is used over a network, it attempts to match the name of the server it is trying to reach with a group name under the <literal>groups</literal> section. If a match is made, Subversion then looks for a section in the <filename>servers</filename> file whose name is the matched group's name. From that section it reads the actual network configuration settings."
15262 msgstr "当通过网络访问Subversion服务器时,客户端会设法匹配正在尝试连接的服务器名字和<literal>groups</literal>小节中的glob名称,如果发现匹配,Subversion会在<filename>servers</filename>文件中查找对应于这个glob名称的小节,并从该小节中去读取真实的网络配置设置。"
15264 #. (para)
15265 #: ../source/book.xml:14866
15266 #, fuzzy
15267 msgid "The <literal>global</literal> section contains the settings that are meant for all of the servers not matched by one of the globs under the <literal>groups</literal> section. The options available in this section are exactly the same as those valid for the other server sections in the file (except, of course, the special <literal>groups</literal> section), and are as follows:"
15268 msgstr "如果没有能够匹配到<literal>groups</literal>中的glob名称,<literal>global</literal>小节中的选项就会发生作用。<literal>global</literal>小节中的选项与其他小节一样(当然是除了<literal>groups</literal>小节),这些选项是:"
15270 #. (literal)
15271 #: ../source/book.xml:14877
15272 #, fuzzy
15273 msgid "http-proxy-exceptions"
15274 msgstr "http-proxy-host"
15276 #. (para)
15277 #: ../source/book.xml:14880
15278 msgid "This specifies a comma-separated list of patterns for repository hostnames that should accessed directly, without using the proxy machine. The pattern syntax is the same as is used in the Unix shell for filenames. A repository hostname matching any of these patterns will not be proxied."
15279 msgstr "这里指定了一组逗号分割的列表,其内容是无须代理服务器可以直接访问的版本库主机名模式,模式语法与Unix的shell中的文件名相同,其中任何匹配的版本库主机不会通过代理访问。"
15281 #. (literal)
15282 #: ../source/book.xml:14890
15283 msgid "http-proxy-host"
15284 msgstr "http-proxy-host"
15286 #. (para)
15287 #: ../source/book.xml:14893
15288 msgid "This specifies the hostname of the proxy computer through which your HTTP-based Subversion requests must pass. It defaults to an empty value, which means that Subversion will not attempt to route HTTP requests through a proxy computer, and will instead attempt to contact the destination machine directly."
15289 msgstr "代理服务器的详细主机名,是HTTP为基础的Subversion请求必须通过的,缺省值为空,意味着Subversion不会尝试通过代理服务器进行HTTP请求,而会尝试直接连接目标机器。"
15291 #. (literal)
15292 #: ../source/book.xml:14903
15293 msgid "http-proxy-port"
15294 msgstr "http-proxy-port"
15296 #. (para)
15297 #: ../source/book.xml:14906
15298 msgid "This specifies the port number on the proxy host to use. It defaults to an empty value."
15299 msgstr "代理服务器的详细端口,缺省值为空。"
15301 #. (literal)
15302 #: ../source/book.xml:14912
15303 msgid "http-proxy-username"
15304 msgstr "http-proxy-username"
15306 #. (para)
15307 #: ../source/book.xml:14915
15308 msgid "This specifies the username to supply to the proxy machine. It defaults to an empty value."
15309 msgstr "代理服务器的用户名,缺省值为空。"
15311 #. (literal)
15312 #: ../source/book.xml:14921
15313 msgid "http-proxy-password"
15314 msgstr "http-proxy-password"
15316 #. (para)
15317 #: ../source/book.xml:14924
15318 msgid "This specifies the password to supply to the proxy machine. It defaults to an empty value."
15319 msgstr "代理服务器的密码,缺省为空。"
15321 #. (literal)
15322 #: ../source/book.xml:14930
15323 msgid "http-timeout"
15324 msgstr "http-timeout"
15326 #. (para)
15327 #: ../source/book.xml:14933
15328 #, fuzzy
15329 msgid "This specifies the amount of time, in seconds, to wait for a server response. If you experience problems with a slow network connection causing Subversion operations to time out, you should increase the value of this option. The default value is <literal>0</literal>, which instructs the underlying HTTP library, Neon, to use its default timeout setting."
15330 msgstr "等待服务器响应的时间,以秒为单位,如果你的网络速度较慢,导致Subversion的操作超时,你可以加大这个数值,缺省值是<literal>0</literal>,意思是让HTTP库Neon使用自己的缺省值。"
15332 #. (literal)
15333 #: ../source/book.xml:14945
15334 msgid "http-compression"
15335 msgstr "http-compression"
15337 #. (para)
15338 #: ../source/book.xml:14948
15339 #, fuzzy
15340 msgid "This specifies whether or not Subversion should attempt to compress network requests made to DAV-ready servers. The default value is <literal>yes</literal> (though compression will only occur if that capability is compiled into the network layer). Set this to <literal>no</literal> to disable compression, such as when debugging network transmissions."
15341 msgstr "这说明是否在与设置好DAV的服务器通讯时使用网络压缩请求,缺省值是<literal>yes</literal>(尽管只有在这个功能编译到网络层时压缩才会有效),设置<literal>no</literal>来关闭压缩,如调试网络传输时。"
15343 #. (literal)
15344 #: ../source/book.xml:14959
15345 msgid "neon-debug-mask"
15346 msgstr "neon-debug-mask"
15348 #. (para)
15349 #: ../source/book.xml:14962
15350 #, fuzzy
15351 msgid "This is an integer mask that the underlying HTTP library, Neon, uses for choosing what type of debugging output to yield. The default value is <literal>0</literal>, which will silence all debugging output. For more information about how Subversion makes use of Neon, see <xref linkend=\"svn.developer\"/>."
15352 msgstr "只是一个整形的掩码,底层的HTTP库Neon用来选择产生调试的输出,缺省值是<literal>0</literal>,意思是关闭所有的调试输出,关于Subversion使用Neon的详细信息,见<xref linkend=\"svn.developer\"/>。"
15354 #. (literal)
15355 #: ../source/book.xml:14972
15356 msgid "ssl-authority-files"
15357 msgstr "ssl-authority-files"
15359 #. (para)
15360 #: ../source/book.xml:14975
15361 msgid "This is a semicolon-delimited list of paths to files containing certificates of the certificate authorities (or CAs) that are accepted by the Subversion client when accessing the repository over HTTPS."
15362 msgstr "这是一个分号分割的路径和文件列表,这些文件包含了Subversion客户端在用HTTPS访问时可以接受的认证授权(或者CA)证书。"
15364 #. (literal)
15365 #: ../source/book.xml:14984
15366 msgid "ssl-trust-default-ca"
15367 msgstr "ssl-trust-default-ca"
15369 #. (para)
15370 #: ../source/book.xml:14987
15371 #, fuzzy
15372 msgid "Set this variable to <literal>yes</literal> if you want Subversion to automatically trust the set of default CAs that ship with OpenSSL."
15373 msgstr "如果你希望Subversion可以自动相信OpenSSL携带的缺省的CA,可以设置为<literal>yes</literal>。"
15375 #. (literal)
15376 #: ../source/book.xml:14994
15377 msgid "ssl-client-cert-file"
15378 msgstr "ssl-client-cert-file"
15380 #. (para)
15381 #: ../source/book.xml:14997
15382 msgid "If a host (or set of hosts) requires an SSL client certificate, you'll normally be prompted for a path to your certificate. By setting this variable to that same path, Subversion will be able to find your client certificate automatically without prompting you. There's no standard place to store your certificate on disk; Subversion will grab it from any path you specify."
15383 msgstr "如果一个主机(或是一些主机)需要一个SSL客户端证书,你会收到一个提示说需要证书的路径。通过设置这个路径你的Subversion客户端可以自动找到你的证书而不会打扰你。没有标准的存放位置;Subversion会从任何你指定的路径得到这个文件。"
15385 #. (literal)
15386 #: ../source/book.xml:15009
15387 msgid "ssl-client-cert-password"
15388 msgstr "ssl-client-cert-password"
15390 #. (para)
15391 #: ../source/book.xml:15012
15392 #, fuzzy
15393 msgid "If your SSL client certificate file is encrypted by a passphrase, Subversion will prompt you for the passphrase whenever the certificate is used. If you find this annoying (and don't mind storing the password in the <filename>servers</filename> file), then you can set this variable to the certificate's passphrase. You won't be prompted anymore."
15394 msgstr "如果你的SSL客户端证书文件是用密码加密的,Subversion会在每次使用证书时请你输入密码,如果你发现这很讨厌(并且不介意把密码存放在<filename>servers</filename>文件中),你可以设置这个参数为证书的密码,这样就不会再收到密码输入提示了。"
15396 #. (title)
15397 #: ../source/book.xml:15026
15398 msgid "Config"
15399 msgstr "配置"
15401 #. (para)
15402 #: ../source/book.xml:15028
15403 #, fuzzy
15404 msgid "The <filename>config</filename> file contains the rest of the currently available Subversion run-time options, those not related to networking. There are only a few options in use as of this writing, but they are again grouped into sections in expectation of future additions."
15405 msgstr "其它的Subversion运行选项保存在<filename>config</filename>文件中,这些运行选项与网络连接无关,只是一些正在使用的选项,但是为了应对未来的扩展,也按小节划分成组。"
15407 #. (para)
15408 #: ../source/book.xml:15033
15409 #, fuzzy
15410 msgid "The <literal>auth</literal> section contains settings related to Subversion's authentication and authorization against the repository. It contains:"
15411 msgstr "<literal>auth</literal>小节保存了Subversion相关的认证和授权的设置,它包括:"
15413 #. (literal)
15414 #: ../source/book.xml:15039
15415 msgid "store-passwords"
15416 msgstr "store-passwords"
15418 #. (para)
15419 #: ../source/book.xml:15042
15420 #, fuzzy
15421 msgid "This instructs Subversion to cache, or not to cache, passwords that are supplied by the user in response to server authentication challenges. The default value is <literal>yes</literal>. Set this to <literal>no</literal> to disable this on-disk password caching. You can override this option for a single instance of the <command>svn</command> command using the <option>--no-auth-cache</option> command-line parameter (for those subcommands that support it). For more information, see <xref linkend=\"svn.serverconfig.netmodel.credcache\"/>."
15422 msgstr "这告诉Subversion是否缓存服务器认证要求时用户提供的密码,缺省值是<literal>yes</literal>。设置为<literal>no</literal>可以关闭在存盘的密码缓存,你可以通过<command>svn</command>的<option>--no-auth-cache</option>命令行参数(那些支持这个参数的子命令)来覆盖这个设置,详细信息请见<xref linkend=\"svn.serverconfig.netmodel.credcache\"/>。"
15424 #. (literal)
15425 #: ../source/book.xml:15056
15426 msgid "store-auth-creds"
15427 msgstr "store-auth-creds"
15429 #. (para)
15430 #: ../source/book.xml:15059
15431 #, fuzzy
15432 msgid "This setting is the same as <literal>store-passwords</literal>, except that it enables or disables disk-caching of <emphasis>all</emphasis> authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials."
15433 msgstr "这个设置与<literal>store-passwords</literal>相似,不过设置了这个选项将会保存<emphasis>所有</emphasis>认证信息,如用户名、密码、服务器证书,以及其他任何类型的可以缓存的凭证。"
15435 #. (para)
15436 #: ../source/book.xml:15068
15437 #, fuzzy
15438 msgid "The <literal>helpers</literal> section controls which external applications Subversion uses to accomplish its tasks. Valid options in this section are:"
15439 msgstr "<literal>helpers</literal>小节控制完成Subversion任务的外部程序,正确的选项包括:"
15441 #. (literal)
15442 #: ../source/book.xml:15074
15443 msgid "editor-cmd"
15444 msgstr "editor-cmd"
15446 #. (para)
15447 #: ../source/book.xml:15077
15448 #, fuzzy
15449 msgid "This specifies the program Subversion will use to query the user for a log message during a commit operation, such as when using <command>svn commit</command> without either the <option>--message</option> (<option>-m</option>) or <option>--file</option> (<option>-F</option>) options. This program is also used with the <command>svn propedit</command> command—a temporary file is populated with the current value of the property the user wishes to edit, and the edits take place right in the editor program (see <xref linkend=\"svn.advanced.props\"/>). This option's default value is empty. The order of priority for determining the editor command (where lower-numbered locations take precedence over higher-numbered locations) is:"
15450 msgstr "Subversion在提交操作时用来询问用户日志信息的程序,例如使用<command>svn commit</command>而没有指定<option>--message</option>(<option>-m</option>)或者<option>--file</option>(<option>-F</option>)选项。这个程序也会与<command>svn propedit</command>一起使用—一个临时文件跳出来包含已经存在的用户希望编辑的属性,然后用户可以对这个属性进行编辑(见<xref linkend=\"svn.advanced.props\"/>),这个选项的缺省值为空,检测编辑器的顺序如下:"
15452 #. (para)
15453 #: ../source/book.xml:15093
15454 #, fuzzy
15455 msgid "Command-line option <literal>--editor-cmd</literal>"
15456 msgstr "命令行选项<literal>--editor-cmd</literal>"
15458 #. (para)
15459 #: ../source/book.xml:15096
15460 #, fuzzy
15461 msgid "Environment variable <literal>SVN_EDITOR</literal>"
15462 msgstr "环境变量<literal>SVN_EDITOR</literal>"
15464 #. (para)
15465 #: ../source/book.xml:15099
15466 #, fuzzy
15467 msgid "Configuration option <literal>editor-cmd</literal>"
15468 msgstr "配置选项<literal>editor-cmd</literal>"
15470 #. (para)
15471 #: ../source/book.xml:15102
15472 #, fuzzy
15473 msgid "Environment variable <literal>VISUAL</literal>"
15474 msgstr "环境变量<literal>VISUAL</literal>"
15476 #. (para)
15477 #: ../source/book.xml:15105
15478 #, fuzzy
15479 msgid "Environment variable <literal>EDITOR</literal>"
15480 msgstr "环境变量<literal>EDITOR</literal>"
15482 #. (para)
15483 #: ../source/book.xml:15108
15484 msgid "Possibly, a default value built in to Subversion (not present in the official builds)"
15485 msgstr "也有可能Subversion会有一个内置的缺省值(官方编译版本不是如此)"
15487 #. (para)
15488 #: ../source/book.xml:15112
15489 #, fuzzy
15490 msgid "The value of any of these options or variables is (unlike <literal>diff-cmd</literal>) the beginning of a command line to be executed by the shell. Subversion appends a space and the pathname of the temporary file to be edited. The editor should modify the temporary file and return a zero exit code to indicate success."
15491 msgstr "所有这些选项和变量(不像<literal>diff-cmd</literal>)的值的开头都是shell中要执行的命令行,Subversion会追加一个空格和一个需要编辑的临时文件,编辑器必须修改临时文件,并且返回一个0来表明成功。"
15493 #. (literal)
15494 #: ../source/book.xml:15122
15495 msgid "diff-cmd"
15496 msgstr "diff-cmd"
15498 #. (para)
15499 #: ../source/book.xml:15125
15500 #, fuzzy
15501 msgid "This specifies the absolute path of a differencing program, used when Subversion generates <quote>diff</quote> output (such as when using the <command>svn diff</command> command). By default Subversion uses an internal differencing library—setting this option will cause it to perform this task using an external program. See <xref linkend=\"svn.advanced.externaldifftools\"/> for more details on using such programs."
15502 msgstr "这个命令是比较程序的绝对路径,当Subversion生成了<quote>diff</quote>输出时(例如当使用<command>svn diff</command>命令)就会使用,缺省Subversion会使用一个内置的比较库—设置这个参数会强制它使用外部程序执行这个任务,此类程序的更多信息见<xref linkend=\"svn.advanced.externaldifftools\"/>。"
15504 #. (literal)
15505 #: ../source/book.xml:15138
15506 msgid "diff3-cmd"
15507 msgstr "diff3-cmd"
15509 #. (para)
15510 #: ../source/book.xml:15141
15511 msgid "This specifies the absolute path of a three-way differencing program. Subversion uses this program to merge changes made by the user with those received from the repository. By default Subversion uses an internal differencing library—setting this option will cause it to perform this task using an external program. See <xref linkend=\"svn.advanced.externaldifftools\"/> for more details on using such programs."
15512 msgstr "这指定了一个三向的比较程序,Subversion使用这个程序来合并用户和从版本库接受的修改,缺省Subversion会使用一个内置的比较库—设置这个参数会导致它会使用外部程序执行这个任务,此类程序的更多信息见<xref linkend=\"svn.advanced.externaldifftools\"/>。"
15514 #. (literal)
15515 #: ../source/book.xml:15153
15516 msgid "diff3-has-program-arg"
15517 msgstr "diff3-has-program-arg"
15519 #. (para)
15520 #: ../source/book.xml:15156
15521 #, fuzzy
15522 msgid "This flag should be set to <literal>true</literal> if the program specified by the <literal>diff3-cmd</literal> option accepts a <option>--diff-program</option> command-line parameter."
15523 msgstr "如果<literal>diff3-cmd</literal>选项设置的程序接受一个<option>--diff-program</option>命令行参数,这个标记必须设置为<literal>true</literal>。"
15525 #. (para)
15526 #: ../source/book.xml:15164
15527 #, fuzzy
15528 msgid "The <literal>tunnels</literal> section allows you to define new tunnel schemes for use with <command>svnserve</command> and <literal>svn://</literal> client connections. For more details, see <xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>."
15529 msgstr "<literal>tunnels</literal>小节允许你定义一个<command>svnserve</command>和<literal>svn://</literal>客户端连接使用的管道模式,更多细节见<xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>。"
15531 #. (para)
15532 #: ../source/book.xml:15170
15533 msgid "Anyone for potluck dinner?"
15534 msgstr "就是一个大杂烩?"
15536 #. (para)
15537 #: ../source/book.xml:15168
15538 #, fuzzy
15539 msgid "The <literal>miscellany</literal> section is where everything that doesn't belong elsewhere winds up. <placeholder-1/> In this section, you can find:"
15540 msgstr "<literal>miscellany</literal>小节是一些没法归到别处的选项。 <placeholder-1/>在本小节,你会找到:"
15542 #. (literal)
15543 #: ../source/book.xml:15175
15544 msgid "global-ignores"
15545 msgstr "global-ignores"
15547 #. (para)
15548 #: ../source/book.xml:15178
15549 #, fuzzy
15550 msgid "When running the <command>svn status</command> command, Subversion lists unversioned files and directories along with the versioned ones, annotating them with a <literal>?</literal> character (see <xref linkend=\"svn.tour.cycle.examine.status\"/>). Sometimes, it can be annoying to see uninteresting, unversioned items—for example, object files that result from a program's compilation—in this display. The <literal>global-ignores</literal> option is a list of whitespace-delimited globs which describe the names of files and directories that Subversion should not display unless they are versioned. The default value is <literal>*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store</literal>."
15551 msgstr "当运行<command>svn status</command>命令时,Subversion会和版本化的文件一样列出未版本化的文件和目录,并使用<literal>?</literal>字符(见see <xref linkend=\"svn.tour.cycle.examine.status\"/>)标记,有时候察看无关的未版本化文件会很讨厌—比如程序编译产生的对象文件—的显示出来。<literal>global-ignores</literal>选项是一个空格分隔的列表,用来描述Subversion在它们版本化之前不想显示的文件和目录,缺省值是<literal>*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store</literal>。"
15553 #. (para)
15554 #: ../source/book.xml:15191
15555 #, fuzzy
15556 msgid "As well as <command>svn status</command>, the <command>svn add</command> and <command>svn import</command> commands also ignore files that match the list when they are scanning a directory. You can override this behaviour for a single instance of any of these commands by explicitly specifying the file name, or by using the <option>--no-ignore</option> command-line flag."
15557 msgstr "就像<command>svn status</command>,<command>svn add</command>和<command>svn import</command>命令也会忽略匹配这个列表的文件,你可以用单个的<option>--no-ignore</option>命令行参数来覆盖这个选项,关于更加细致的控制忽略的项目,见<xref linkend=\"svn.advanced.props.special.ignore\"/>。"
15559 #. (para)
15560 #: ../source/book.xml:15198
15561 msgid "For information on more fine-grained control of ignored items, see <xref linkend=\"svn.advanced.props.special.ignore\"/>."
15562 msgstr "For information on more fine-grained control of ignored items, see <xref linkend=\"svn.advanced.props.special.ignore\"/>."
15564 #. (literal)
15565 #: ../source/book.xml:15204
15566 msgid "enable-auto-props"
15567 msgstr "enable-auto-props"
15569 #. (para)
15570 #: ../source/book.xml:15207
15571 #, fuzzy
15572 msgid "This instructs Subversion to automatically set properties on newly added or imported files. The default value is <literal>no</literal>, so set this to <literal>yes</literal> to enable Auto-props. The <literal>auto-props</literal> section of this file specifies which properties are to be set on which files."
15573 msgstr "这里指示Subversion自动对新加的或者导入的文件设置属性,缺省值是<literal>no</literal>,可以设置为<literal>yes</literal>来开启自动添加属性,这个文件的<literal>auto-props</literal>小节会说明哪些属性会被设置到哪些文件。"
15575 #. (literal)
15576 #: ../source/book.xml:15217
15577 msgid "log-encoding"
15578 msgstr "log-encoding"
15580 #. (para)
15581 #: ../source/book.xml:15220
15582 msgid "This variable sets the default character set encoding for commit log messages. It's a permanent form of the <option>--encoding</option> option (see <xref linkend=\"svn.ref.svn.sw\"/>). The Subversion repository stores log messages in UTF-8, and assumes that your log message is written using your operating system's native locale. You should specify a different encoding if your commit messages are written in any other encoding."
15583 msgstr "这个变量设置提交日志缺省的字符集,是<option>--encoding</option>选项(见<xref linkend=\"svn.ref.svn.sw\"/>)的永久形式,Subversion版本库保存了一些UTF-8的日志信息,并且假定你的日志信息是用操作系统的本地编码,如果你提交的信息使用别的编码方式,你一定要指定不同的编码。"
15585 #. (literal)
15586 #: ../source/book.xml:15233
15587 msgid "use-commit-times"
15588 msgstr "use-commit-times"
15590 #. (para)
15591 #: ../source/book.xml:15236
15592 #, fuzzy
15593 msgid "Normally your working copy files have timestamps that reflect the last time they were touched by any process, whether that be your own editor or by some <command>svn</command> subcommand. This is generally convenient for people developing software, because build systems often look at timestamps as a way of deciding which files need to be recompiled."
15594 msgstr "通常你的工作拷贝文件会有最后一次被进程访问的时间戳,不管是你自己的编辑器还是用<command>svn</command>子命令。这通常对人们开发软件提供了便利,因为编译系统通常会通过查看时间戳来决定那些文件需要重新编译。"
15596 #. (para)
15597 #: ../source/book.xml:15243
15598 #, fuzzy
15599 msgid "In other situations, however, it's sometimes nice for the working copy files to have timestamps that reflect the last time they were changed in the repository. The <command>svn export</command> command always places these <quote>last-commit timestamps</quote> on trees that it produces. By setting this config variable to <literal>yes</literal>, the <command>svn checkout</command>, <command>svn update</command>, <command>svn switch</command>, and <command>svn revert</command> commands will also set last-commit timestamps on files that they touch."
15600 msgstr "在其他情形,有时候如果工作拷贝的文件时间戳反映了上一次在版本库中更改的时间会非常好,<command>svn export</command>命令会一直放置这些<quote>上次提交的时间戳</quote>放到它创建的目录树。通过设置这个config参数为<literal>yes</literal>,<command>svn checkout</command>、<command>svn update</command>、 <command>svn switch</command>和<command>svn revert</command>命令也会为它们操作的文件设置上次提交的时间戳。"
15602 #. (para)
15603 #: ../source/book.xml:15260
15604 #, fuzzy
15605 msgid "The <literal>auto-props</literal> section controls the Subversion client's ability to automatically set properties on files when they are added or imported. It contains any number of key-value pairs in the format <literal>PATTERN = PROPNAME=PROPVALUE</literal> where <literal>PATTERN</literal> is a file pattern that matches a set of filenames and the rest of the line is the property and its value. Multiple matches on a file will result in multiple propsets for that file; however, there is no guarantee that auto-props will be applied in the order in which they are listed in the config file, so you can't have one rule <quote>override</quote> another. You can find several examples of auto-props usage in the <filename>config</filename> file. Lastly, don't forget to set <literal>enable-auto-props</literal> to <literal>yes</literal> in the <literal>miscellany</literal> section if you want to enable auto-props."
15606 msgstr "<literal>auto-props</literal>小节控制Subversion客户端自动设置提交和导入的文件的属性的能力,它可以包含任意数量的键-值对,格式是<literal>PATTERN = PROPNAME=PROPVALUE</literal>,其中<literal>PATTERN</literal>是一个文件模式,匹配一系列文件名,此行其它两项为属性和值。如果一个文件匹配多次,会导致有多个属性集;然而,没有手段保障自动属性不会按照配置文件中的顺序应用,所以你可以一个规则<quote>覆盖</quote>另一个。你可以在<filename>config</filename>文件找到许多自动属性的用法实例。最后,如果你希望开启自动属性,不要忘了设置<literal>miscellany</literal>小节的<literal>enable-auto-props</literal>为<literal>yes</literal>。"
15608 #. (title)
15609 #: ../source/book.xml:15286
15610 msgid "Localization"
15611 msgstr "本地化"
15613 #. (para)
15614 #: ../source/book.xml:15288
15615 msgid "<firstterm>Localization</firstterm> is the act of making programs behave in a region-specific way. When a program formats numbers or dates in a way specific to your part of the world, or prints messages (or accepts input) in your native language, the program is said to be <firstterm>localized</firstterm>. This section describes steps Subversion has made towards localization."
15616 msgstr "<firstterm>本地化</firstterm>是让程序按照地区特定方式运行的行为,如果一个程序的格式、数字或者是日期是你的本地方式,或者是打印的信息(或者是接受的输入)是你本地的语言,这个程序被叫做已经<firstterm>本地化了</firstterm>,这部分描述了针对本地化的Subversion的步骤。"
15618 #. (title)
15619 #: ../source/book.xml:15298
15620 msgid "Understanding locales"
15621 msgstr "理解地区"
15623 #. (para)
15624 #: ../source/book.xml:15300
15625 msgid "Most modern operating systems have a notion of the <quote>current locale</quote>—that is, the region or country whose localization conventions are honored. These conventions—typically chosen by some runtime configuration mechanism on the computer—affect the way in which programs present data to the user, as well as the way in which they accept user input."
15626 msgstr "许多现代操作系统都有一个<quote>当前地区</quote>的概念—也就是本地化习惯服务的国家和地区。这些习惯—通常是被一些运行配置机制选择—影响程序展现数据的方式,也有接受用户输入的方式。"
15628 #. (para)
15629 #: ../source/book.xml:15307
15630 #, fuzzy
15631 msgid "On most Unix-like systems, you can check the values of the locale-related runtime configuration options by running the <command>locale</command> command:"
15632 msgstr "在类Unix的系统,你可以运行<command>locale</command>命令来检查本地关联的运行配置的选项值:"
15634 #. (screen)
15635 #: ../source/book.xml:15310
15636 #, no-wrap
15637 msgid ""
15638 "\n"
15639 "$ locale\n"
15640 "LANG=\n"
15641 "LC_COLLATE=\"C\"\n"
15642 "LC_CTYPE=\"C\"\n"
15643 "LC_MESSAGES=\"C\"\n"
15644 "LC_MONETARY=\"C\"\n"
15645 "LC_NUMERIC=\"C\"\n"
15646 "LC_TIME=\"C\"\n"
15647 "LC_ALL=\"C\"\n"
15648 msgstr ""
15649 "\n"
15650 "$ locale\n"
15651 "LANG=\n"
15652 "LC_COLLATE=\"C\"\n"
15653 "LC_CTYPE=\"C\"\n"
15654 "LC_MESSAGES=\"C\"\n"
15655 "LC_MONETARY=\"C\"\n"
15656 "LC_NUMERIC=\"C\"\n"
15657 "LC_TIME=\"C\"\n"
15658 "LC_ALL=\"C\"\n"
15660 #. (para)
15661 #: ../source/book.xml:15321
15662 #, fuzzy
15663 msgid "The output is a list of locale-related environment variables and their current values. In this example, the variables are all set to the default <literal>C</literal> locale, but users can set these variables to specific country/language code combinations. For example, if one were to set the <literal>LC_TIME</literal> variable to <literal>fr_CA</literal>, then programs would know to present time and date information formatted according a French-speaking Canadian's expectations. And if one were to set the <literal>LC_MESSAGES</literal> variable to <literal>zh_TW</literal>, then programs would know to present human-readable messages in Traditional Chinese. Setting the <literal>LC_ALL</literal> variable has the effect of changing every locale variable to the same value. The value of <literal>LANG</literal> is used as a default value for any locale variable that is unset. To see the list of available locales on a Unix system, run the command <command>locale -a</command>."
15664 msgstr "输出是一个本地相关的环境变量和它们的值,在这个例子里,所有的变量设置为缺省的<literal>C</literal>地区,但是用户可以设置这些变量为特定的国家/语言代码组合。举个例子,如果有人设置<literal>LC_TIME</literal>变量为<literal>fr_CA</literal>,然后程序会知道使用讲法语的加拿大期望的格式来显示时间和日期信息。如果一个人会设置<literal>LC_MESSAGES</literal>变量为<literal>zh_TW</literal>,程序会知道使用繁体中文显示可读信息。如果设置<literal>LC_ALL</literal>的效果同分别设置所有的位置变量为同一个值有相同的效果。<literal>LANG</literal>用来作为没有设置地区变量的缺省值,为了查看Unix系统所有的地区列表,运行<command>locale -a</command>命令。"
15666 #. (para)
15667 #: ../source/book.xml:15339
15668 msgid "On Windows, locale configuration is done via the <quote>Regional and Language Options</quote> control panel item. There you can view and select the values of individual settings from the available locales, and even customize (at a sickening level of detail) several of the display formatting conventions."
15669 msgstr "在Windows,地区配置是通过<quote>地区和语言选项</quote>控制面板管理的,可以从已存在的地区查看选择,甚至可以自定义(会是个很讨厌的复杂事情)许多显示格式习惯。"
15671 #. (title)
15672 #: ../source/book.xml:15349
15673 msgid "Subversion's use of locales"
15674 msgstr "Subversion 对地区的支持"
15676 #. (para)
15677 #: ../source/book.xml:15351
15678 #, fuzzy
15679 msgid "The Subversion client, <command>svn</command>, honors the current locale configuration in two ways. First, it notices the value of the <literal>LC_MESSAGES</literal> variable and attempts to print all messages in the specified language. For example:"
15680 msgstr "Subversion客户端,<command>svn</command>通过两种方式支持当前的地区配置。首先,它会注意<literal>LC_MESSAGES</literal>的值,然后尝试使用特定的语言打印所有的信息,例如:"
15682 #. (screen)
15683 #: ../source/book.xml:15356
15684 #, no-wrap
15685 msgid ""
15686 "\n"
15687 "$ export LC_MESSAGES=de_DE\n"
15688 "$ svn help cat\n"
15689 "cat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.\n"
15690 "Aufruf: cat ZIEL[@REV]...\n"
15691 "…\n"
15692 msgstr ""
15693 "\n"
15694 "$ export LC_MESSAGES=de_DE\n"
15695 "$ svn help cat\n"
15696 "cat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.\n"
15697 "Aufruf: cat ZIEL[@REV]...\n"
15698 "…\n"
15700 #. (para)
15701 #: ../source/book.xml:15363
15702 #, fuzzy
15703 msgid "This behavior works identically on both Unix and Windows systems. Note, though, that while your operating system might have support for a certain locale, the Subversion client still may not be able to speak the particular language. In order to produce localized messages, human volunteers must provide translations for each language. The translations are written using the GNU gettext package, which results in translation modules that end with the <filename>.mo</filename> filename extension. For example, the German translation file is named <filename>de.mo</filename>. These translation files are installed somewhere on your system. On Unix, they typically live in <filename>/usr/share/locale/</filename>, while on Windows they're often found in the <filename>\\share\\locale\\</filename> folder in Subversion's installation area. Once installed, a module is named after the program it provides translations for. For example, the <filename>de.mo</filename> file may ultimately end up installed as <filename>/usr/share/locale/de/LC_MESSAGES/subversion.mo</filename>. By browsing the installed <filename>.mo</filename> files, you can see which languages the Subversion client is able to speak."
15704 msgstr "这个行为在Unix和Windows上同样工作,注意,尽管有时你的操作系统支持某个地区,Subversion客户端可能不能讲特定的语言。为了制作本地化信息,志愿者可以提供各种语言的翻译。翻译使用GNU gettext包编写,相关的翻译模块使用<filename>.mo</filename>作为后缀名。举个例子,德国翻译文件为<filename>de.mo</filename>。翻译文件安装到你的系统的某个位置,在Unix它们会在<filename>/usr/share/locale/</filename>,而在Windows它们通常会在Subversion安装的<filename>\\share\\locale\\</filename>目录。一旦安装,一个命名在程序后面的模块会为此提供翻译。举个例子,<filename>de.mo</filename>会最终安装到<filename>/usr/share/locale/de/LC_MESSAGES/subversion.mo</filename>,通过查看安装的<filename>.mo</filename>文件,我们可以看到Subversion支持的语言。"
15706 #. (para)
15707 #: ../source/book.xml:15385
15708 #, fuzzy
15709 msgid "The second way in which the locale is honored involves how <command>svn</command> interprets your input. The repository stores all paths, filenames, and log messages in Unicode, encoded as UTF-8. In that sense, the repository is <firstterm>internationalized</firstterm>—that is, the repository is ready to accept input in any human language. This means, however, that the Subversion client is responsible for sending only UTF-8 filenames and log messages into the repository. In order to do this, it must convert the data from the native locale into UTF-8."
15710 msgstr "第二种支持地区设置的方式包括<command>svn</command>怎样解释你的输入,版本库使用UTF-8保存了所有的路径,文件名和日志信息。在这种情况下,版本库是<firstterm>国际化的</firstterm>—也就是版本库准备接受任何人类的语言。这意味着,无论如何Subversion客户端要负责发送UTF-8的文件名和日志信息到版本库,为此,必须将数据从本地位置转化为UTF-8。"
15712 #. (para)
15713 #: ../source/book.xml:15395
15714 #, fuzzy
15715 msgid "For example, suppose you create a file named <filename>caffè.txt</filename>, and then when committing the file, you write the log message as <quote>Adesso il caffè è più forte</quote>. Both the filename and log message contain non-ASCII characters, but because your locale is set to <literal>it_IT</literal>, the Subversion client knows to interpret them as Italian. It uses an Italian character set to convert the data to UTF-8 before sending them off to the repository."
15716 msgstr "举个例子,你创建了一个文件叫做<filename>caffè.txt</filename>,然后提交了这个文件,你写的日志信息是<quote>Adesso il caffè è più forte</quote>,文件名和日志信息都包含非ASCII字符,但是因为你的位置设置为<literal>it_IT</literal>,Subversion知道把它们作为意大利语解释,在发送到版本库之前,它用意大利字符集转化数据为UTF-8。"
15718 #. (para)
15719 #: ../source/book.xml:15404
15720 msgid "Note that while the repository demands UTF-8 filenames and log messages, it <emphasis>does not</emphasis> pay attention to file contents. Subversion treats file contents as opaque strings of bytes, and neither client nor server makes an attempt to understand the character set or encoding of the contents."
15721 msgstr "注意当版本库要求UTF-8文件名和日志信息时,它<emphasis>不会</emphasis>注意到文件的内容,Subversion会把文件内容看作字节串,没有任何客户端和服务器会尝试理解或是编码这些内容。"
15723 #. (title)
15724 #: ../source/book.xml:15412
15725 msgid "Character set conversion errors"
15726 msgstr "字符集转换错误"
15728 #. (para)
15729 #: ../source/book.xml:15414
15730 msgid "While using Subversion, you might get hit with an error related to character set conversions:"
15731 msgstr "当使用Subversion,你或许会碰到一个字符集转化关联的错误:"
15733 #. (screen)
15734 #: ../source/book.xml:15416
15735 #, no-wrap
15736 msgid ""
15737 "\n"
15738 "svn: Can't convert string from native encoding to 'UTF-8':\n"
15739 "…\n"
15740 "svn: Can't convert string from 'UTF-8' to native encoding:\n"
15741 "…\n"
15742 msgstr ""
15743 "\n"
15744 "svn: Can't convert string from native encoding to 'UTF-8':\n"
15745 "…\n"
15746 "svn: Can't convert string from 'UTF-8' to native encoding:\n"
15747 "…\n"
15749 #. (para)
15750 #: ../source/book.xml:15422
15751 #, fuzzy
15752 msgid "Errors like this typically occur when the Subversion client has received a UTF-8 string from the repository, but not all of the characters in that string can be represented using the encoding of the current locale. For example, if your locale is <literal>en_US</literal> but a collaborator has committed a Japanese filename, you're likely to see this error when you receive the file during an <command>svn update</command>."
15753 msgstr "这个错误信息通常会发生在Subversion客户端从版本库接收到一个UTF-8串,但字符不能转化为当前的地区文字时,举个例子,如果你的地区设置是<literal>en_US</literal>,但是一个写作者使用日本文件名提交,你会在<command>svn update</command>接受文件时会看到这个错误。"
15755 #. (para)
15756 #: ../source/book.xml:15430
15757 msgid "The solution is either to set your locale to something which <emphasis>can</emphasis> represent the incoming UTF-8 data, or to change the filename or log message in the repository. (And don't forget to slap your collaborator's hand—projects should decide on common languages ahead of time, so that all participants are using the same locale.)"
15758 msgstr "解决方案或者是设置你的地区为<emphasis>可以</emphasis>表示即将到来的UTF-8数据,或者是修改版本库的文件名或信息。(不要忘记和你的合作者拍拍手—项目必须首先决定通用的语言,这样所有的参与者会使用相同的地区设置。)"
15760 #. (title)
15761 #: ../source/book.xml:15445
15762 msgid "Using External Differencing Tools"
15763 msgstr "使用外置比较工具"
15765 #. (para)
15766 #: ../source/book.xml:15447
15767 msgid "The presence of <option>--diff-cmd</option> and <option>--diff3-cmd</option> options, and similarly named runtime configuration parameters (see <xref linkend=\"svn.advanced.confarea.opts.config\"/>), can lead to a false notion of how easy it is to use external differencing (or <quote>diff</quote>) and merge tools with Subversion. While Subversion can use most of popular such tools available, the effort invested in setting this up often turns out to be non-trivial."
15768 msgstr "选项<option>--diff-cmd</option>和<option>--diff3-cmd</option>的形式相似,也有类似名称的运行配置参数(见<xref linkend=\"svn.advanced.confarea.opts.config\"/>),这会导致一个错误的观念,也就是在Subversion中使用外置的比较(或<quote>diff</quote>)和合并工具会非常的容易,虽然Subversion可以使用大多数类似的工具,但是设置这些工具绝非易事。"
15770 #. (para)
15771 #: ../source/book.xml:15465
15772 msgid "Subversion developers are good, but even the best make mistakes."
15773 msgstr "Subversion的开发者很好,但最好的也会发生错误。"
15775 #. (para)
15776 #: ../source/book.xml:15455
15777 #, fuzzy
15778 msgid "The interface between Subversion and external diff and merge tools harkens back to a time when Subversion's only contextual differencing capabilities were built around invocations of the GNU diffutils toolchain, specifically the <command>diff</command> and <command>diff3</command> utilities. To get the kind of behavior Subversion needed, it called these utilities with more than a handful of options and parameters, most of which were quite specific to the utilities. Some time later, Subversion grew its own internal differencing library, and as a failover mechanism, <placeholder-1/> the <option>--diff-cmd</option> and <option>--diff3-cmd</option> options were added to the Subversion command-line client so users could more easily indicate that they preferred to use the GNU diff and diff3 utilities instead of the newfangled internal diff library. If those options were used, Subversion would simply ignore the internal diff library, and fall back to running those external programs, lengthy argument lists and all. And that's where things remain today."
15779 msgstr "Subversion和外置比较和合并工具的接口可以追溯到很久以前,当时Subversion的唯一文本比较能力是建立在GNU的工具链之上,特别是<command>diff</command>和<command>diff3</command>工具,为了得到Subversion需要的方式,它使用非常复杂的选项和参数调用这些工具,而这些选项和参数都是工具特定的,渐渐的,Subversion发展了自己的比较区别库作为备份机制。<placeholder-1/><option>--diff-cmd</option>和<option>--diff3-cmd</option>选项是添加到Subversion的命令行客户端,所以用户可以更加容易的指明他们最喜欢的使用的GNU diff和diff3工具,而不是新奇的内置比较库,如果使用了这些选项,Subversion会忽略内置的比较库,转而使用外置程序,使用冗长的参数列表,目前还是这种情况。"
15781 #. (para)
15782 #: ../source/book.xml:15475
15783 msgid "It didn't take long for folks to realize that having such easy configuration mechanisms for specifying that Subversion should use the external GNU diff and diff3 utilities located at a particular place on the system could be applied toward the use of other diff and merge tools, too. After all, Subversion didn't actually verify that the things it was being told to run were members of the GNU diffutils toolchain. But the only configurable aspect of using those external tools is their location on the system—not the option set, parameter order, etc. Subversion continues throwing all those GNU utility options at your external diff tool regardless of whether or not that program can understand those options. And that's where things get unintuitive for most users."
15784 msgstr "人们很快意识到使用简单的配置机制必须使Subversion使用位于特定位置的GNU diff和diff3工具,毕竟,Subversion并不验证其被告之要执行的程序是否是GNU的工具链的比较工具。唯一可以配置的方面是外置工具在系统的位置—而不是选项集,参数顺序等等。Subversion一直将这些GNU工具选项发给你的外置比较工具,而不管程序是否可以理解那些选项,那不是所有用户直觉的方式。"
15786 #. (para)
15787 #: ../source/book.xml:15488
15788 msgid "The key to using external diff and merge tools (other than GNU diff and diff3, of course) with Subversion is to use wrapper scripts which convert the input from Subversion into something that your differencing tool can understand, and then to convert the output of your tool back into a format which Subversion expects—the format that the GNU tools would have used. The following sections cover the specifics of those expectations."
15789 msgstr "使用外置比较和合并工具的关键是使用包裹脚本将Subversion的输出转化为你的脚本程序可以理解的形式,然后将这些比较工具的输出转化为你的Subversion期望的格式—GNU工具可能使用的格式,下面的小节覆盖了那些期望格式的细节。"
15791 #. (para)
15792 #: ../source/book.xml:15497
15793 #, fuzzy
15794 msgid "The decision on when to fire off a contextual diff or merge as part of a larger Subversion operation is made entirely by Subversion, and is affected by, among other things, whether or not the files being operated on are human-readable as determined by their <literal>svn:mime-type</literal> property. This means, for example, that even if you had the niftiest Microsoft Word-aware differencing or merging tool in the Universe, it would never be invoked by Subversion so long as your versioned Word documents had a configured MIME type that denoted that they were not human-readable (such as <literal>application/msword</literal>). For more about MIME type settings, see <xref linkend=\"svn.advanced.props.special.mime-type\"/>"
15795 msgstr "何时启动文本比较或合并的决定完全是Subversion的决定,而这个决定是根据文件的<literal>svn:mime-type</literal>属性作出的,这意味着,例如,即使你有一个可以识别Microsoft Word格式的比较或合并工具,当你对一个Word文件设置为非人工可读(例如<literal>application/msword</literal>)时,依然不会调用这个识别Word的工具。关于MIME type的设定,可以见<xref linkend=\"svn.advanced.props.special.mime-type\"/>。"
15797 #. (title)
15798 #: ../source/book.xml:15514
15799 msgid "External diff"
15800 msgstr "外置 diff"
15802 #. (para)
15803 #: ../source/book.xml:15530
15804 msgid "The GNU diff manual page puts it this way: <quote>An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble.</quote>"
15805 msgstr "GNU的diff手册这样说的:<quote>返回0意味着没有区别,1是有有区别,其它值意味着出现问题。</quote>"
15807 #. (para)
15808 #: ../source/book.xml:15516
15809 #, fuzzy
15810 msgid "Subversion calls external diff programs with parameters suitable for the GNU diff utility, and expects only that the external program return with a successful error code. For most alternative diff programs, only the sixth and seventh arguments—the paths of the files which represent the left and right sides of the diff, respectively—are of interest. Note that Subversion runs the diff program once per modified file covered by the Subversion operation, so if your program runs in an asynchronous fashion (or <quote>backgrounded</quote>), you might have several instances of it all running simultaneously. Finally, Subversion expects that your program return an error code of 1 if your program detected differences, or 0 if it did not—any other error code is considered a fatal error. <placeholder-1/>"
15811 msgstr "Subversion可以调用适合GNU参数的diff工具,并期望外置程序能够返回成功的错误代码。对于大多数可用的diff程序,只有第6、7参数,diff两边文件的路径。需要注意Subversion对于每个修改的文件都要以异步方式(或<quote>后台</quote>)运行diff程序,你会得到许多并行的实例。最后,Subversion期望你的程序在发现区别时返回错误代码1,没有区别则返回0—任何其他的返回值都被认为是严重错误。 <placeholder-1/>"
15813 #. (para)
15814 #: ../source/book.xml:15534
15815 msgid "<xref linkend=\"svn.advanced.externaldifftools.diff.ex-1\"/> and <xref linkend=\"svn.advanced.externaldifftools.diff.ex-2\"/> are templates for external diff tool wrappers in the Bourne shell and Windows batch scripting languages, respectively."
15816 msgstr "<xref linkend=\"svn.advanced.externaldifftools.diff.ex-1\"/>和<xref linkend=\"svn.advanced.externaldifftools.diff.ex-2\"/>分别是Bourne shell和Windows批处理外置diff工具的包裹器模版。"
15818 #. (title)
15819 #: ../source/book.xml:15541
15820 msgid "diffwrap.sh"
15821 msgstr "diffwrap.sh"
15823 #. (programlisting)
15824 #: ../source/book.xml:15543
15825 #, no-wrap
15826 msgid ""
15827 "\n"
15828 "#!/bin/sh\n"
15829 "\n"
15830 "# Configure your favorite diff program here.\n"
15831 "DIFF=\"/usr/local/bin/my-diff-tool\"\n"
15832 "\n"
15833 "# Subversion provides the paths we need as the sixth and seventh \n"
15834 "# parameters.\n"
15835 "LEFT=${6}\n"
15836 "RIGHT=${7}\n"
15837 "\n"
15838 "# Call the diff command (change the following line to make sense for\n"
15839 "# your merge program).\n"
15840 "$DIFF --left $LEFT --right $RIGHT\n"
15841 "\n"
15842 "# Return an errorcode of 0 if no differences were detected, 1 if some were.\n"
15843 "# Any other errorcode will be treated as fatal.\n"
15844 msgstr ""
15845 "\n"
15846 "#!/bin/sh\n"
15847 "\n"
15848 "# Configure your favorite diff program here.\n"
15849 "DIFF=\"/usr/local/bin/my-diff-tool\"\n"
15850 "\n"
15851 "# Subversion provides the paths we need as the sixth and seventh \n"
15852 "# parameters.\n"
15853 "LEFT=${6}\n"
15854 "RIGHT=${7}\n"
15855 "\n"
15856 "# Call the diff command (change the following line to make sense for\n"
15857 "# your merge program).\n"
15858 "$DIFF --left $LEFT --right $RIGHT\n"
15859 "\n"
15860 "# Return an errorcode of 0 if no differences were detected, 1 if some were.\n"
15861 "# Any other errorcode will be treated as fatal.\n"
15863 #. (title)
15864 #: ../source/book.xml:15564
15865 msgid "diffwrap.bat"
15866 msgstr "diffwrap.bat"
15868 #. (programlisting)
15869 #: ../source/book.xml:15566
15870 #, no-wrap
15871 msgid ""
15872 "\n"
15873 "@ECHO OFF\n"
15874 "\n"
15875 "REM Configure your favorite diff program here.\n"
15876 "SET DIFF=\"C:\\Program Files\\Funky Stuff\\My Diff Tool.exe\"\n"
15877 "\n"
15878 "REM Subversion provides the paths we need as the sixth and seventh \n"
15879 "REM parameters.\n"
15880 "SET LEFT=%6\n"
15881 "SET RIGHT=%7\n"
15882 "\n"
15883 "REM Call the diff command (change the following line to make sense for\n"
15884 "REM your merge program).\n"
15885 "%DIFF% --left %LEFT% --right %RIGHT%\n"
15886 "\n"
15887 "REM Return an errorcode of 0 if no differences were detected, 1 if some were.\n"
15888 "REM Any other errorcode will be treated as fatal.\n"
15889 msgstr ""
15890 "\n"
15891 "@ECHO OFF\n"
15892 "\n"
15893 "REM Configure your favorite diff program here.\n"
15894 "SET DIFF=\"C:\\Program Files\\Funky Stuff\\My Diff Tool.exe\"\n"
15895 "\n"
15896 "REM Subversion provides the paths we need as the sixth and seventh \n"
15897 "REM parameters.\n"
15898 "SET LEFT=%6\n"
15899 "SET RIGHT=%7\n"
15900 "\n"
15901 "REM Call the diff command (change the following line to make sense for\n"
15902 "REM your merge program).\n"
15903 "%DIFF% --left %LEFT% --right %RIGHT%\n"
15904 "\n"
15905 "REM Return an errorcode of 0 if no differences were detected, 1 if some were.\n"
15906 "REM Any other errorcode will be treated as fatal.\n"
15908 #. (title)
15909 #: ../source/book.xml:15589
15910 msgid "External diff3"
15911 msgstr "外置 diff3"
15913 #. (para)
15914 #: ../source/book.xml:15591
15915 #, fuzzy
15916 msgid "Subversion calls external merge programs with parameters suitable for the GNU diff3 utility, expecting that the external program return with a successful error code and that the full file contents which result from the completed merge operation are printed on the standard output stream (so that Subversion can redirect them into the appropriate version controlled file). For most alternative merge programs, only the ninth, tenth, and eleventh arguments, the paths of the files which represent the <quote>mine</quote>, <quote>older</quote>, and <quote>yours</quote> inputs, respectively, are of interest. Note that because Subversion depends on the output of your merge program, you wrapper script must not exit before that output has been delivered to Subversion. When it finally does exit, it should return an error code of 0 if the merge was successful, or 1 if unresolved conflicts remain in the output—any other error code is considered a fatal error."
15917 msgstr "Subversion按照符合GNU的diff3的参数调用合并程序,期望外置程序会返回成功的错误代码,并且完整合并的文件结果打印到标准输出(这样Subversion可以重定向这些东西到适当的版本控制下的文件)。对于大多数可选的合并程序,只有第9、10和11参数,分别代表<quote>mine</quote>、<quote>older</quote>和<quote>yours</quote>的路径。需要注意,因为Subversion依赖于你的合并程序的输出,你的包裹脚本在输出发送到Subversion之前不要退出。当最终退出,如果合并成功返回0,如果有为解决的冲突则返回1—其它返回值都是严重错误。"
15919 #. (para)
15920 #: ../source/book.xml:15608
15921 msgid "<xref linkend=\"svn.advanced.externaldifftools.diff3.ex-1\"/> and <xref linkend=\"svn.advanced.externaldifftools.diff3.ex-2\"/> are templates for external merge tool wrappers in the Bourne shell and Windows batch scripting languages, respectively."
15922 msgstr "<xref linkend=\"svn.advanced.externaldifftools.diff3.ex-1\"/>和<xref linkend=\"svn.advanced.externaldifftools.diff3.ex-2\"/>分别是Bourne shell和Windows批处理外置diff工具的包裹器模版。"
15924 #. (title)
15925 #: ../source/book.xml:15614
15926 msgid "diff3wrap.sh"
15927 msgstr "diff3wrap.sh"
15929 #. (programlisting)
15930 #: ../source/book.xml:15616
15931 #, no-wrap
15932 msgid ""
15933 "\n"
15934 "#!/bin/sh\n"
15935 "\n"
15936 "# Configure your favorite diff3/merge program here.\n"
15937 "DIFF3=\"/usr/local/bin/my-merge-tool\"\n"
15938 "\n"
15939 "# Subversion provides the paths we need as the ninth, tenth, and eleventh \n"
15940 "# parameters.\n"
15941 "MINE=${9}\n"
15942 "OLDER=${10}\n"
15943 "YOURS=${11}\n"
15944 "\n"
15945 "# Call the merge command (change the following line to make sense for\n"
15946 "# your merge program).\n"
15947 "$DIFF3 --older $OLDER --mine $MINE --yours $YOURS\n"
15948 "\n"
15949 "# After performing the merge, this script needs to print the contents\n"
15950 "# of the merged file to stdout.  Do that in whatever way you see fit.\n"
15951 "# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n"
15952 "# remain in the result.  Any other errorcode will be treated as fatal.\n"
15953 msgstr ""
15954 "\n"
15955 "#!/bin/sh\n"
15956 "\n"
15957 "# Configure your favorite diff3/merge program here.\n"
15958 "DIFF3=\"/usr/local/bin/my-merge-tool\"\n"
15959 "\n"
15960 "# Subversion provides the paths we need as the ninth, tenth, and eleventh \n"
15961 "# parameters.\n"
15962 "MINE=${9}\n"
15963 "OLDER=${10}\n"
15964 "YOURS=${11}\n"
15965 "\n"
15966 "# Call the merge command (change the following line to make sense for\n"
15967 "# your merge program).\n"
15968 "$DIFF3 --older $OLDER --mine $MINE --yours $YOURS\n"
15969 "\n"
15970 "# After performing the merge, this script needs to print the contents\n"
15971 "# of the merged file to stdout.  Do that in whatever way you see fit.\n"
15972 "# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n"
15973 "# remain in the result.  Any other errorcode will be treated as fatal.\n"
15975 #. (title)
15976 #: ../source/book.xml:15640
15977 msgid "diff3wrap.bat"
15978 msgstr "diff3wrap.bat"
15980 #. (programlisting)
15981 #: ../source/book.xml:15642
15982 #, no-wrap
15983 msgid ""
15984 "\n"
15985 "@ECHO OFF\n"
15986 "\n"
15987 "REM Configure your favorite diff3/merge program here.\n"
15988 "SET DIFF3=\"C:\\Program Files\\Funky Stuff\\My Merge Tool.exe\"\n"
15989 "\n"
15990 "REM Subversion provides the paths we need as the ninth, tenth, and eleventh \n"
15991 "REM parameters.  But we only have access to nine parameters at a time, so we\n"
15992 "REM shift our nine-parameter window twice to let us get to what we need.\n"
15993 "SHIFT\n"
15994 "SHIFT\n"
15995 "SET MINE=%7\n"
15996 "SET OLDER=%8\n"
15997 "SET YOURS=%9\n"
15998 "\n"
15999 "REM Call the merge command (change the following line to make sense for\n"
16000 "REM your merge program).\n"
16001 "%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%\n"
16002 "\n"
16003 "REM After performing the merge, this script needs to print the contents\n"
16004 "REM of the merged file to stdout.  Do that in whatever way you see fit.\n"
16005 "REM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n"
16006 "REM remain in the result.  Any other errorcode will be treated as fatal.\n"
16007 msgstr ""
16008 "\n"
16009 "@ECHO OFF\n"
16010 "\n"
16011 "REM Configure your favorite diff3/merge program here.\n"
16012 "SET DIFF3=\"C:\\Program Files\\Funky Stuff\\My Merge Tool.exe\"\n"
16013 "\n"
16014 "REM Subversion provides the paths we need as the ninth, tenth, and eleventh \n"
16015 "REM parameters.  But we only have access to nine parameters at a time, so we\n"
16016 "REM shift our nine-parameter window twice to let us get to what we need.\n"
16017 "SHIFT\n"
16018 "SHIFT\n"
16019 "SET MINE=%7\n"
16020 "SET OLDER=%8\n"
16021 "SET YOURS=%9\n"
16022 "\n"
16023 "REM Call the merge command (change the following line to make sense for\n"
16024 "REM your merge program).\n"
16025 "%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%\n"
16026 "\n"
16027 "REM After performing the merge, this script needs to print the contents\n"
16028 "REM of the merged file to stdout.  Do that in whatever way you see fit.\n"
16029 "REM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n"
16030 "REM remain in the result.  Any other errorcode will be treated as fatal.\n"
16032 #. (title)
16033 #: ../source/book.xml:15677
16034 msgid "Embedding Subversion"
16035 msgstr "嵌入 Subversion"
16037 #. (para)
16038 #: ../source/book.xml:15679
16039 #, fuzzy
16040 msgid "Subversion has a modular design: it's implemented as a collection of libraries written in C. Each library has a well-defined purpose and Application Programming Interface (API), and that interface is available not only for Subversion itself to use, but for any software that wishes to embed or otherwise programmatically control Subversion. Additionally, Subversion's API is available not only to other C programs, but also to programs written in higher-level languages such as Python, Perl, Java, or Ruby."
16041 msgstr "Subversion有一个模块化的设计,以库的形式由C编写和实现。每个库都有一个定义良好的目的和API,而且这些接口不仅仅为了Subversion本身使用,也可以为任何希望嵌入编程方式控制Subversion的软件。此外,Subversion的API不仅仅可以为C程序使用,也可以使用如Ptyhon、Perl、Java或Ruby等高级语言调用。"
16043 #. (para)
16044 #: ../source/book.xml:15688
16045 msgid "This chapter is for those who wish to interact with Subversion through its public API or its various language bindings. If you wish to write robust wrapper scripts around Subversion functionality to simplify your own life, are trying to develop more complex integrations between Subversion and other pieces of software, or just have an interest in Subversion's various library modules and what they offer, this chapter is for you. If, however, you don't foresee yourself participating with Subversion at such a level, feel free to skip this chapter with the confidence that your experience as a Subversion user will not be affected."
16046 msgstr "本章是为那些希望编写代码或其他语言绑定与Subversion交互的人准备的。如果"
16048 #. (title)
16049 #: ../source/book.xml:15704
16050 msgid "Layered Library Design"
16051 msgstr "分层的库设计"
16053 #. (para)
16054 #: ../source/book.xml:15706
16055 #, fuzzy
16056 msgid "Each of Subversion's core libraries can be said to exist in one of three main layers—the Repository Layer, the Repository Access (RA) Layer, or the Client Layer (see <xref linkend=\"svn.intro.architecture.dia-1\"/>). We will examine these layers shortly, but first, let's briefly summarize Subversion's various libraries. For the sake of consistency, we will refer to the libraries by their extensionless Unix library names (libsvn_fs, libsvn_wc, mod_dav_svn, etc.)."
16057 msgstr "每个Subversion核心模块都属于三层中的某一层—版本库层、版本库访问(RA)层或是客户端层。我们很快就会考察这些层,但首先让我们看一下Subversion库的摘要目录,为了一致性,我们将通过它们的无扩展Unix库名(例如libsvn_fs、libsvn_wc和mod_dav_svn)来引用它们。"
16059 #. (term)
16060 #: ../source/book.xml:15715
16061 msgid "libsvn_client"
16062 msgstr "libsvn_client"
16064 #. (para)
16065 #: ../source/book.xml:15717
16066 msgid "Primary interface for client programs"
16067 msgstr "客户端程序的主要接口"
16069 #. (term)
16070 #: ../source/book.xml:15722
16071 msgid "libsvn_delta"
16072 msgstr "libsvn_delta"
16074 #. (para)
16075 #: ../source/book.xml:15724
16076 msgid "Tree and byte-stream differencing routines"
16077 msgstr "目录树和文本区别程序"
16079 #. (term)
16080 #: ../source/book.xml:15729
16081 msgid "libsvn_diff"
16082 msgstr "libsvn_diff"
16084 #. (para)
16085 #: ../source/book.xml:15731
16086 msgid "Contextual differencing and merging routines"
16087 msgstr "上下文区别和合并例程"
16089 #. (term)
16090 #: ../source/book.xml:15736
16091 msgid "libsvn_fs"
16092 msgstr "libsvn_fs"
16094 #. (para)
16095 #: ../source/book.xml:15738
16096 msgid "Filesystem commons and module loader"
16097 msgstr "Subversion文件系统库和模块加载器"
16099 #. (term)
16100 #: ../source/book.xml:15743
16101 msgid "libsvn_fs_base"
16102 msgstr "libsvn_fs_base"
16104 #. (para)
16105 #: ../source/book.xml:15745
16106 msgid "The Berkeley DB filesystem back-end"
16107 msgstr "Berkeley DB文件系统后端"
16109 #. (term)
16110 #: ../source/book.xml:15750
16111 msgid "libsvn_fs_fs"
16112 msgstr "libsvn_fs_fs"
16114 #. (para)
16115 #: ../source/book.xml:15752
16116 msgid "The native filesystem (FSFS) back-end"
16117 msgstr "本地文件系统(FSFS)后端"
16119 #. (term)
16120 #: ../source/book.xml:15757
16121 msgid "libsvn_ra"
16122 msgstr "libsvn_ra"
16124 #. (para)
16125 #: ../source/book.xml:15759
16126 msgid "Repository Access commons and module loader"
16127 msgstr "版本库访问通用组件和模块装载器"
16129 #. (term)
16130 #: ../source/book.xml:15764
16131 msgid "libsvn_ra_dav"
16132 msgstr "libsvn_ra_dav"
16134 #. (para)
16135 #: ../source/book.xml:15766
16136 msgid "The WebDAV Repository Access module"
16137 msgstr "WebDAV版本库访问模块"
16139 #. (term)
16140 #: ../source/book.xml:15771
16141 msgid "libsvn_ra_local"
16142 msgstr "libsvn_ra_local"
16144 #. (para)
16145 #: ../source/book.xml:15773
16146 msgid "The local Repository Access module"
16147 msgstr "本地版本库访问模块"
16149 #. (term)
16150 #: ../source/book.xml:15778
16151 msgid "libsvn_ra_serf"
16152 msgstr "libsvn_ra_serf"
16154 #. (para)
16155 #: ../source/book.xml:15780
16156 msgid "Another (experimental) WebDAV Repository Access module"
16157 msgstr "另一个(实验性的) WebDAV 版本库访问模块"
16159 #. (term)
16160 #: ../source/book.xml:15785
16161 msgid "libsvn_ra_svn"
16162 msgstr "libsvn_ra_svn"
16164 #. (para)
16165 #: ../source/book.xml:15787
16166 msgid "The custom protocol Repository Access module"
16167 msgstr "一个自定义版本库访问模块"
16169 #. (term)
16170 #: ../source/book.xml:15792
16171 msgid "libsvn_repos"
16172 msgstr "libsvn_repos"
16174 #. (para)
16175 #: ../source/book.xml:15794
16176 msgid "Repository interface"
16177 msgstr "版本库接口"
16179 #. (term)
16180 #: ../source/book.xml:15798
16181 msgid "libsvn_subr"
16182 msgstr "libsvn_subr"
16184 #. (para)
16185 #: ../source/book.xml:15800
16186 msgid "Miscellaneous helpful subroutines"
16187 msgstr "各色各样的有用的子程序"
16189 #. (term)
16190 #: ../source/book.xml:15805
16191 msgid "libsvn_wc"
16192 msgstr "libsvn_wc"
16194 #. (para)
16195 #: ../source/book.xml:15807
16196 msgid "The working copy management library"
16197 msgstr "工作拷贝管理库"
16199 #. (term)
16200 #: ../source/book.xml:15812
16201 msgid "mod_authz_svn"
16202 msgstr "mod_authz_svn"
16204 #. (para)
16205 #: ../source/book.xml:15814
16206 msgid "Apache authorization module for Subversion repositories access via WebDAV"
16207 msgstr "使用WebDAV访问Subversion版本库的Apache授权模块"
16209 #. (para)
16210 #: ../source/book.xml:15821
16211 msgid "Apache module for mapping WebDAV operations to Subversion ones"
16212 msgstr "影射WebDAV操作为Subversion操作的Apache模块"
16214 #. (para)
16215 #: ../source/book.xml:15826
16216 #, fuzzy
16217 msgid "The fact that the word <quote>miscellaneous</quote> only appears once in the previous list is a good sign. The Subversion development team is serious about making sure that functionality lives in the right layer and libraries. Perhaps the greatest advantage of the modular design is its lack of complexity from a developer's point of view. As a developer, you can quickly formulate that kind of <quote>big picture</quote> that allows you to pinpoint the location of certain pieces of functionality with relative ease."
16218 msgstr "单词<quote>各色各样的</quote>只在列表中出现过一次是一个好的迹象。Subversion开发团队非常注意将功能归入合适的层和库,或许模块化设计最大的好处就是从开发者的角度看减少了复杂性。作为一个开发者,你可以很快就描画出一副<quote>大图像</quote>,以便于你更精确地,也相对容易地找出某一功能所在的位置。"
16220 #. (para)
16221 #: ../source/book.xml:15835
16222 msgid "Another benefit of modularity is the ability to replace a given module with a whole new library that implements the same API without affecting the rest of the code base. In some sense, this happens within Subversion already. The libsvn_ra_dav, libsvn_ra_local, libsvn_ra_serf, and libsvn_ra_svn libraries each implement the same interface, all working as plugins to libsvn_ra. And all four communicate with the Repository Layer—libsvn_ra_local connects to the repository directly; the other three do so over a network. The libsvn_fs_base and libsvn_fs_fs libraries are another pair of libraries that implement the same functionality in different ways—both are plugins to the common libsvn_fs library."
16223 msgstr "模块化的另一个好处是我们有能力去构造一个全新的,能够完全实现相同API功能的库,以替换整个给定的模块,而又不会影响基础代码。在某种意义上,Subversion已经这样做了。libsvn_ra_dav、libsvn_ra_local、libsvn_ra_serf和libsvn_ra_svn all都实现了相同的接口,均与版本库层进行通讯—libsvn_ra_loca与版本库直接连接其他几个则通过网络。 libsvn_fs_base和libsvn_fs_fs库是另外一对以不同方式实现相同功能的库—都是可以与libsvn_fs库连接。"
16225 #. (para)
16226 #: ../source/book.xml:15847
16227 #, fuzzy
16228 msgid "The client itself also highlights the benefits of modularity in the Subversion design. Subversion's libsvn_client library is a one-stop shop for most of the functionality necessary for designing a working Subversion client (see <xref linkend=\"svn.developer.layerlib.client\"/>). So while the Subversion distribution provides only the <command>svn</command> command-line client program, there are several third-party programs which provide various forms of graphical client UI. These GUIs use the same APIs that the stock command-line client does. This type of modularity has played a large role in the proliferation of available Subversion clients and IDE integrations and, by extension, to the tremendous adoption rate of Subversion itself."
16229 msgstr "客户端本身也得益于Subversion设计的模块化,Subversion的libsvn_client库提供了设计一个Subversion工作客户端(见<xref linkend=\"svn.developer.layerlib.client\"/>)的绝大多数功能。所以尽管Subversion的发布版只有<command>svn</command>命令行客户端程序,依然有许多第三方的程序提供了各种形式的图形化客户端UI。这些GUI使用的API与命令行客户端完全相同。模块化类型的API的促使了大量Subversion客户端和IDE集成插件使用Subversion本身。"
16231 #. (title)
16232 #: ../source/book.xml:15862
16233 msgid "Repository Layer"
16234 msgstr "版本库层"
16236 #. (para)
16237 #: ../source/book.xml:15864
16238 msgid "When referring to Subversion's Repository Layer, we're generally talking about two basic concepts—the versioned filesystem implementation (accessed via libsvn_fs, and supported by its libsvn_fs_base and libsvn_fs_fs plugins), and the repository logic that wraps it (as implemented in libsvn_repos). These libraries provide the storage and reporting mechanisms for the various revisions of your version-controlled data. This layer is connected to the Client Layer via the Repository Access Layer, and is, from the perspective of the Subversion user, the stuff at the <quote>other end of the line.</quote>"
16239 msgstr "当提到Subversion版本库层时,我们通常会讨论两个基本概念—版本化文件系统实现(通过libsvn_fs访问,libsvn_fs_base和libsvn_fs_fs支持),和包装在外的(以libsvn_repos实现)版本库逻辑。这些库提供了版本控制数据的存储和报告机制,这些层通过版本库访问层连接客户端层,从Subversion用户的角度,这些事情在整个过程的另一端。"
16241 #. (para)
16242 #: ../source/book.xml:15875
16243 #, fuzzy
16244 msgid "The Subversion Filesystem is not a kernel-level filesystem that one would install in an operating system (like the Linux ext2 or NTFS), but a virtual filesystem. Rather than storing <quote>files</quote> and <quote>directories</quote> as real files and directories (as in, the kind you can navigate through using your favorite shell program), it uses one of two available abstract storage backends—either a Berkeley DB database environment, or a flat-file representation. (To learn more about the two repository back-ends, see <xref linkend=\"svn.reposadmin.basics.backends\"/>.) There has even been considerable interest by the development community in giving future releases of Subversion the ability to use other back-end database systems, perhaps through a mechanism such as Open Database Connectivity (ODBC). In fact, Google did something similar to this before launching the Google Code Project Hosting service: they announced in mid-2006 that members of its Open Source team had written a new proprietary Subversion filesystem plugin which used their ultra-scalable Bigtable database for its storage."
16245 msgstr "Subversion文件系统通过libsvn_fs API来访问,它并不是一个安装在操作系统之上的内核级的文件系统(例如Linux ext2或NTFS),而是一个虚拟文件系统。它并未将<quote>文件</quote>和<quote>目录</quote>保存为真实的文件和目录(也就是用你熟知的shell程序可以浏览的那种),而是采用了一种抽象的后端存储方式,这个后端存储方式有两种—一个是Berkeley DB数据库环境,另一个是普通文件表示。(要了解更多关于版本库后端的信息,请看<xref linkend=\"svn.reposadmin.basics.backends\"/>)。除此之外,开发社区也非常有兴趣考虑在Subversion的未来版本 中提供某种使用其它后端数据库系统的能力,也许是开放式数据库连接(ODBC)的机制。实际上,Google在2006中期启动Google Code主机服务项目之前做了一些类似的事情,它的部分开源项目组成员编写了新的Subversion文件系统,使用了他们的扩展性极好的Bigtable数据存储。"
16247 #. (para)
16248 #: ../source/book.xml:15893
16249 msgid "The filesystem API exported by libsvn_fs contains the kinds of functionality you would expect from any other filesystem API—you can create and remove files and directories, copy and move them around, modify file contents, and so on. It also has features that are not quite as common, such as the ability to add, modify, and remove metadata (<quote>properties</quote>) on each file or directory. Furthermore, the Subversion Filesystem is a versioning filesystem, which means that as you make changes to your directory tree, Subversion remembers what your tree looked like before those changes. And before the previous changes. And the previous ones. And so on, all the way back through versioning time to (and just beyond) the moment you first started adding things to the filesystem."
16250 msgstr "libsvn_fs支持的文件系统API包含了所有其他文件系统的功能:你可以创建和删除文件和目录、拷贝和移动、修改文件内容等等。它也包含了一些不太常用的特性,如对任意文件和目录添加、修改和删除元数据(<quote>properties</quote>)的能力。此外,Subversion文件系统是一个版本化的文件系统,意味着你修改你的目录树时,Subversion会记住修改以前的样子。也可以回到所有初始化版本库之后(且仅仅之后)的版本。"
16252 #. (para)
16253 #: ../source/book.xml:15907
16254 msgid "All the modifications you make to your tree are done within the context of a Subversion commit transaction. The following is a simplified general routine for modifying your filesystem:"
16255 msgstr "所有你对目录树的修改包含在Subversion事务的上下文中,下面描述了修改文件系统的例程:"
16257 #. (para)
16258 #: ../source/book.xml:15913
16259 msgid "Begin a Subversion commit transaction."
16260 msgstr "开始 Subversion 的提交事务。"
16262 #. (para)
16263 #: ../source/book.xml:15916
16264 msgid "Make your changes (adds, deletes, property modifications, etc.)."
16265 msgstr "作出修改(添加、删除、属性修改等等。)。"
16267 #. (para)
16268 #: ../source/book.xml:15920
16269 msgid "Commit your transaction."
16270 msgstr "提交事务。"
16272 #. (para)
16273 #: ../source/book.xml:15923
16274 msgid "Once you have committed your transaction, your filesystem modifications are permanently stored as historical artifacts. Each of these cycles generates a single new revision of your tree, and each revision is forever accessible as an immutable snapshot of <quote>the way things were.</quote>"
16275 msgstr "一旦你提交了你的事务,你的文件系统修改就会永久的作为历史保存起来,每个这样的周期会产生一个新的树,所有的修订版本都是永远可以访问的一个不变的快照。"
16277 #. (title)
16278 #: ../source/book.xml:15930
16279 msgid "The Transaction Distraction"
16280 msgstr "事务的其它信息"
16282 #. (para)
16283 #: ../source/book.xml:15932
16284 msgid "The notion of a Subversion transaction can become easily confused with the transaction support provided by the underlying database itself, especially given the former's close proximity to the Berkeley DB database code in libsvn_fs_base. Both types of transaction exist to provide atomicity and isolation. In other words, transactions give you the ability to perform a set of actions in an all-or-nothing fashion—either all the actions in the set complete with success, or they all get treated as if <emphasis>none</emphasis> of them ever happened—and in a way that does not interfere with other processes acting on the data."
16285 msgstr "Subversion的事务概念,特别是在libsvn_fs中的数据库附近的代码,很容易与低层提供支持的数据库事务混淆。两种类型事务都提供了原子和隔离操作,换句话说,事务给你能力可以用<quote>全部或者没有</quote>样式执行一系列的动作—所有的动作都完全成功,或者是所有的<emphasis>没有</emphasis>发生—而且不会干扰别人操作数据。"
16287 #. (para)
16288 #: ../source/book.xml:15944
16289 msgid "Database transactions generally encompass small operations related specifically to the modification of data in the database itself (such as changing the contents of a table row). Subversion transactions are larger in scope, encompassing higher-level operations like making modifications to a set of files and directories which are intended to be stored as the next revision of the filesystem tree. If that isn't confusing enough, consider the fact that Subversion uses a database transaction during the creation of a Subversion transaction (so that if the creation of Subversion transaction fails, the database will look as if we had never attempted that creation in the first place)!"
16290 msgstr "数据库事务通常围绕着一些对数据库本身的数据修改相关的小操作(如修改表行的内容),Subversion是更大范围的事务,围绕着一些高一级的操作,如下一个修订版本文件系统的一组文件和目录的修改。如果这还不是很混乱,考虑这个:Subversion在创建Subversion事务(所以如果Subversion创建事务失败,数据库会看起来我们从来没有尝试创建)时会使用一个数据库事务!"
16292 #. (para)
16293 #: ../source/book.xml:15957
16294 msgid "Fortunately for users of the filesystem API, the transaction support provided by the database system itself is hidden almost entirely from view (as should be expected from a properly modularized library scheme). It is only when you start digging into the implementation of the filesystem itself that such things become visible (or interesting)."
16295 msgstr "很幸运的是用户的文件系统API,数据库提供的事务支持本身几乎完全从外表隐藏(也是一个完全模块化的模式所应该的)。只有当你开始研究文件系统本身的实现时,这些事情才可见(或者是开始感兴趣)。"
16297 #. (para)
16298 #: ../source/book.xml:15965
16299 #, fuzzy
16300 msgid "Most of the functionality provided by the filesystem interface deals with actions that occur on individual filesystem paths. That is, from outside of the filesystem, the primary mechanism for describing and accessing the individual revisions of files and directories comes through the use of path strings like <filename>/foo/bar</filename>, just as if you were addressing files and directories through your favorite shell program. You add new files and directories by passing their paths-to-be to the right API functions. You query for information about them by the same mechanism."
16301 msgstr "大多数文件系统接口提供的功能作为一个动作发生在一个文件系统路径上,也就是,从文件系统的外部,描述和访问文件和目录独立版本的主要机制是经过如<filename>/foo/bar</filename>的路径,就像你在喜欢的shell程序中定位文件和目录。你通过传递它们的路径到相应的API功能来添加新的文件和目录,查询这些信息也是同样的机制。"
16303 #. (para)
16304 #: ../source/book.xml:15975
16305 msgid "Unlike most filesystems, though, a path alone is not enough information to identify a file or directory in Subversion. Think of a directory tree as a two-dimensional system, where a node's siblings represent a sort of left-and-right motion, and descending into subdirectories a downward motion. <xref linkend=\"svn.developer.layerlib.repos.dia-1\"/> shows a typical representation of a tree as exactly that."
16306 msgstr "然而,不像大多数文件系统,一个单独的路径不足以在Subversion定位一个文件或目录,可以把目录树看作一个二维的系统,一个节点的兄弟代表了一种从左到右的动作,并且递减到子目录是一个向下的动作,<xref linkend=\"svn.developer.layerlib.repos.dia-1\"/>展示了一个典型的树的形式。"
16308 #. (title)
16309 #: ../source/book.xml:15984
16310 msgid "Files and directories in two dimensions"
16311 msgstr "二维的文件和目录"
16313 #. (para)
16314 #: ../source/book.xml:15995
16315 msgid "We understand that this may come as a shock to sci-fi fans who have long been under the impression that Time was actually the <emphasis>fourth</emphasis> dimension, and we apologize for any emotional trauma induced by our assertion of a different theory."
16316 msgstr "我们理解这一定会给科幻小说迷带来一个震撼,他们认为时间是<emphasis>第四</emphasis>维的,我们要为提出这样一个不同理论的断言而伤害了他们的作出道歉。"
16318 #. (para)
16319 #: ../source/book.xml:15992
16320 #, fuzzy
16321 msgid "The difference here is that the Subversion filesystem has a nifty third dimension that most filesystems do not have—Time! <placeholder-1/> In the filesystem interface, nearly every function that has a <parameter>path</parameter> argument also expects a <parameter>root</parameter> argument. This svn_fs_root_t argument describes either a revision or a Subversion transaction (which is simply a revision-in-the-making), and provides that third-dimensional context needed to understand the difference between <filename>/foo/bar</filename> in revision 32, and the same path as it exists in revision 98. <xref linkend=\"svn.developer.layerlib.repos.dia-2\"/> shows revision history as an added dimension to the Subversion filesystem universe."
16322 msgstr "当然,Subversion文件系统有一个其它文件系统所没有的第三维—时间!<placeholder-1/>在一个文件系统接口,几乎所有的功能都有个<parameter moreinfo=\"none\">路径</parameter>参数,也期望一个<parameter moreinfo=\"none\">root</parameter>参数。<structname>svn_fs_root_t</structname>参数不仅描述了一个修订版本或一个Subversion事务(通常正好是一个修订版本),而且提供了用来区分修订版本32的<filename>/foo/bar</filename>和修订版本98在同样路径的三维上下文环境。<xref linkend=\"svn.developer.layerlib.repos.dia-2\"/>展示了修订版本历史作为添加的纬度进入到Subversion文件系统领域。"
16324 #. (title)
16325 #: ../source/book.xml:16013
16326 msgid "Versioning time—the third dimension!"
16327 msgstr "版本时间—第三维!"
16329 #. (para)
16330 #: ../source/book.xml:16021
16331 msgid "As we mentioned earlier, the libsvn_fs API looks and feels like any other filesystem, except that it has this wonderful versioning capability. It was designed to be usable by any program interested in a versioning filesystem. Not coincidentally, Subversion itself is interested in that functionality. But while the filesystem API should be sufficient for basic file and directory versioning support, Subversion wants more—and that is where libsvn_repos comes in."
16332 msgstr "像之前我们提到的,libsvn_fs的API感觉像是其它文件系统,只是有一个美妙的版本化能力。它设计为为所有对版本化的文件系统有兴趣的程序使用,不是巧合,Subversion本身也对这个功能很有兴趣。但是虽然文件系统API一定必须对基本的文件和目录版本化提供足够的支持,Subversion需要的更多—这是libsvn_repos到来的地方。"
16334 #. (para)
16335 #: ../source/book.xml:16030
16336 msgid "The Subversion repository library (libsvn_repos) sits (logically speaking) atop the libsvn_fs API, providing additional functionality beyond that of the underlying versioned filesystem logic. It does not completely wrap each and every filesystem function—only certain major steps in the general cycle of filesystem activity are wrapped by the repository interface. Some of these include the creation and commit of Subversion transactions, and the modification of revision properties. These particular events are wrapped by the repository layer because they have hooks associated with them. A repository hook system is not strictly related to implementing a versioning filesystem, so it lives in the repository wrapper library."
16337 msgstr "Subversion版本库库(libsvn_repos)建立在(逻辑上讲)libsvn_fs的API之上,不仅仅提供了版本化文件系统的功能,它没有包裹所有的文件系统功能—只有文件系统常规周期中的主要事件使用版本库接口包裹,如包括Subversion事务的创建和提交,修订版本属性的修改。这些特别的事件使用版本库库包裹是因为它们有一些关联的钩子。版本库钩子系统并没有与与版本化文件系统的紧密关联,所以它们存在于版本库的包裹库。"
16339 #. (para)
16340 #: ../source/book.xml:16043
16341 msgid "The hooks mechanism is but one of the reasons for the abstraction of a separate repository library from the rest of the filesystem code. The libsvn_repos API provides several other important utilities to Subversion. These include the abilities to:"
16342 msgstr "钩子机制需求是从文件系统代码的其它部分中抽象出单独的版本库库的一个原因,libsvn_repos的API提供了许多其他有用的工具,它们可以做到:"
16344 #. (para)
16345 #: ../source/book.xml:16050
16346 msgid "create, open, destroy, and perform recovery steps on a Subversion repository and the filesystem included in that repository."
16347 msgstr "在Subversion版本库和版本库包括的文件系统的上创建、打开、销毁和执行恢复步骤。"
16349 #. (para)
16350 #: ../source/book.xml:16055
16351 msgid "describe the differences between two filesystem trees."
16352 msgstr "描述两个文件系统树的区别。"
16354 #. (para)
16355 #: ../source/book.xml:16059
16356 msgid "query for the commit log messages associated with all (or some) of the revisions in which a set of files was modified in the filesystem."
16357 msgstr "关于所有(或者部分)修订版本中的文件系统中的一组文件的提交日志信息的查询"
16359 #. (para)
16360 #: ../source/book.xml:16064
16361 msgid "generate a human-readable <quote>dump</quote> of the filesystem, a complete representation of the revisions in the filesystem."
16362 msgstr "产生可读的文件系统<quote>导出</quote>,一个文件系统修订版本的完整展现。"
16364 #. (para)
16365 #: ../source/book.xml:16069
16366 msgid "parse that dump format, loading the dumped revisions into a different Subversion repository."
16367 msgstr "解析导出格式,加载导出的版本到一个不同的Subversion版本库。"
16369 #. (para)
16370 #: ../source/book.xml:16073
16371 msgid "As Subversion continues to evolve, the repository library will grow with the filesystem library to offer increased functionality and configurable option support."
16372 msgstr "伴随着Subversion的发展,版本库库会随着文件系统提供更多的功能和配置选项而不断成长。"
16374 #. (title)
16375 #: ../source/book.xml:16080
16376 msgid "Repository Access Layer"
16377 msgstr "版本库访问层"
16379 #. (para)
16380 #: ../source/book.xml:16082
16381 #, fuzzy
16382 msgid "If the Subversion Repository Layer is at <quote>the other end of the line</quote>, the Repository Access (RA) Layer is the line itself. Charged with marshaling data between the client libraries and the repository, this layer includes the libsvn_ra module loader library, the RA modules themselves (which currently includes libsvn_ra_dav, libsvn_ra_local, libsvn_ra_serf, and libsvn_ra_svn), and any additional libraries needed by one or more of those RA modules (such as the mod_dav_svn Apache module or libsvn_ra_svn's server, <command>svnserve</command>)."
16383 msgstr "如果说Subversion版本库层是在<quote>这条线的另一端</quote>,那版本库访问层就是这条线。负责在客户端库和版本库之间编码数据,这一层包括libsvn_ra模块加载模块,RA模块本身(现在包括了libsvn_ra_dav、libsvn_ra_local、libsvn_ra_serf和libsvn_ra_svn),和所有一个或多个RA模块需要的附加库,例如与Apache模块mod_dav_svn通讯的libsvn_ra_dav或者是libsvn_ra_svn的服务器,<command>svnserve</command>。"
16385 #. (para)
16386 #: ../source/book.xml:16092
16387 #, fuzzy
16388 msgid "Since Subversion uses URLs to identify its repository resources, the protocol portion of the URL scheme (usually <literal>file://</literal>, <literal>http://</literal>, <literal>https://</literal>, <literal>svn://</literal>, or <literal>svn+ssh://</literal>) is used to determine which RA module will handle the communications. Each module registers a list of the protocols it knows how to <quote>speak</quote> so that the RA loader can, at runtime, determine which module to use for the task at hand. You can determine which RA modules are available to the Subversion command-line client, and what protocols they claim to support, by running <command>svn --version</command>:"
16389 msgstr "因为Subversion使用URL来识别版本库资源,URL模式的协议部分(通常是<literal>file:</literal>、<literal>http:</literal>、<literal>https:</literal>或<literal>svn:</literal>)用来监测那个RA模块用来处理通讯。每个模块注册一组它们知道如何<quote>说话</quote>的协议,所以RA加载器可以在运行中监测在手边的任务中使用哪个模块。通过运行<command>svn --version</command>,你可以监测Subversion命令行客户端所支持的RA模块和它们声明支持的协议:"
16391 #. (screen)
16392 #: ../source/book.xml:16104
16393 #, no-wrap
16394 msgid ""
16395 "\n"
16396 "$ svn --version\n"
16397 "svn, version 1.4.3 (r23084)\n"
16398 "   compiled Jan 18 2007, 07:47:40\n"
16399 "\n"
16400 "Copyright (C) 2000-2006 CollabNet.\n"
16401 "Subversion is open source software, see http://subversion.tigris.org/\n"
16402 "This product includes software developed by CollabNet (http://www.Collab.Net/).\n"
16403 "\n"
16404 "The following repository access (RA) modules are available:\n"
16405 "\n"
16406 "* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.\n"
16407 "  - handles 'http' scheme\n"
16408 "  - handles 'https' scheme\n"
16409 "* ra_svn : Module for accessing a repository using the svn network protocol.\n"
16410 "  - handles 'svn' scheme\n"
16411 "* ra_local : Module for accessing a repository on local disk.\n"
16412 "  - handles 'file' scheme\n"
16413 "\n"
16414 "$\n"
16415 msgstr ""
16416 "\n"
16417 "$ svn --version\n"
16418 "svn, version 1.4.3 (r23084)\n"
16419 "   compiled Jan 18 2007, 07:47:40\n"
16420 "\n"
16421 "Copyright (C) 2000-2006 CollabNet.\n"
16422 "Subversion is open source software, see http://subversion.tigris.org/\n"
16423 "This product includes software developed by CollabNet (http://www.Collab.Net/).\n"
16424 "\n"
16425 "The following repository access (RA) modules are available:\n"
16426 "\n"
16427 "* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.\n"
16428 "  - handles 'http' scheme\n"
16429 "  - handles 'https' scheme\n"
16430 "* ra_svn : Module for accessing a repository using the svn network protocol.\n"
16431 "  - handles 'svn' scheme\n"
16432 "* ra_local : Module for accessing a repository on local disk.\n"
16433 "  - handles 'file' scheme\n"
16434 "\n"
16435 "$\n"
16437 #. (para)
16438 #: ../source/book.xml:16125
16439 #, fuzzy
16440 msgid "The public API exported by the RA Layer contains functionality necessary for sending and receiving versioned data to and from the repository. And each of the available RA plugins is able to perform that task using a specific protocol—libsvn_ra_dav speaks HTTP/WebDAV (optionally using SSL encryption) with an Apache HTTP Server that is running the mod_dav_svn Subversion server module; libsvn_ra_svn speaks a custom network protocol with the <command>svnserve</command> program; and so on."
16441 msgstr "RA层导出的API包含了发送和接收版本化数据的必要功能,并且每一个存在的RA插件可以使用特定协议执行任务—libsvn_ra_dav同配置了mod_dav_svn模块的Apache HTTP服务器使用HTTP/WebDAV(可选SSL加密)通讯,libsvn_ra_svn同<command>svnserve</command>使用自定义网络协议通讯。"
16443 #. (para)
16444 #: ../source/book.xml:16134
16445 msgid "And for those who wish to access a Subversion repository using still another protocol, that is precisely why the Repository Access Layer is modularized! Developers can simply write a new library that implements the RA interface on one side and communicates with the repository on the other. Your new library can use existing network protocols, or you can invent your own. You could use inter-process communication (IPC) calls, or—let's get crazy, shall we?—you could even implement an email-based protocol. Subversion supplies the APIs; you supply the creativity."
16446 msgstr "对那些一直希望使用另一个协议来访问Subversion版本库的人,正好是为什么版本库访问层是模块化的!开发者可以简单的编写一个新的库来在一侧实现RA接口并且与另一侧的版本库通讯。你的新库可以使用存在的网络协议,或者发明你自己的。你可以使用进程间的通讯调用,或者—让我们发狂,我们会吗?—你甚至可以实现一个电子邮件为基础的协议,Subversion提供了API,你提供创造性。"
16448 #. (title)
16449 #: ../source/book.xml:16148
16450 msgid "Client Layer"
16451 msgstr "客户端层"
16453 #. (para)
16454 #: ../source/book.xml:16150
16455 msgid "On the client side, the Subversion working copy is where all the action takes place. The bulk of functionality implemented by the client-side libraries exists for the sole purpose of managing working copies—directories full of files and other subdirectories which serve as a sort of local, editable <quote>reflection</quote> of one or more repository locations—and propagating changes to and from the Repository Access layer."
16456 msgstr "在客户端这一面,Subversion工作拷贝是所有动作发生的地方。大多数客户端库实现的功能是为了管理工作拷贝的目的实现的—满是文件子目录的目录是一个或多个版本库位置的可编辑的本地<quote>影射</quote>—从版本库访问层来回传递修改。"
16458 #. (para)
16459 #: ../source/book.xml:16158
16460 #, fuzzy
16461 msgid "Subversion's working copy library, libsvn_wc, is directly responsible for managing the data in the working copies. To accomplish this, the library stores administrative information about each working copy directory within a special subdirectory. This subdirectory, named <filename>.svn</filename>, is present in each working copy directory and contains various other files and directories which record state and provide a private workspace for administrative action. For those familiar with CVS, this <filename>.svn</filename> subdirectory is similar in purpose to the <filename>CVS</filename> administrative directories found in CVS working copies. For more information about the <filename>.svn</filename> administrative area, see <xref linkend=\"svn.developer.insidewc\"/>in this chapter."
16462 msgstr "Subversion的工作拷贝库,libsvn_wc直接负责管理工作拷贝的数据,为了完成这一点,库会在工作拷贝的每个目录的特殊子目录中保存关于工作拷贝的管理性信息。这个子目录叫做<filename>.svn</filename>,出现在所有工作拷贝目录里,保存了各种记录了状态和用来在私有工作区工作的文件和目录。对那些熟悉CVS的用户,<filename>.svn</filename>子目录与<filename>CVS</filename>工作拷贝管理目录的作用类似,关于<filename>.svn</filename>管理区域的更多信息,见本章的<xref linkend=\"svn.developer.insidewc\"/>。"
16464 #. (para)
16465 #: ../source/book.xml:16171
16466 #, fuzzy
16467 msgid "The Subversion client library, libsvn_client, has the broadest responsibility; its job is to mingle the functionality of the working copy library with that of the Repository Access Layer, and then to provide the highest-level API to any application that wishes to perform general revision control actions. For example, the function <function>svn_client_checkout()</function> takes a URL as an argument. It passes this URL to the RA layer and opens an authenticated session with a particular repository. It then asks the repository for a certain tree, and sends this tree into the working copy library, which then writes a full working copy to disk (<filename>.svn</filename> directories and all)."
16468 msgstr "Subversion客户端库libsvn_client具备最广泛的职责;它的工作是结合工作拷贝库和版本库访问库的功能,然后为希望普通版本控制的应用提供最高级的API。举个例子,<function moreinfo=\"none\">svn_client_checkout()</function>方法是用一个URL作为参数,传递这个URL到RA层然后在特定版本库打开一个会话。然后向版本库要求一个特定的目录树,然后把目录树发送给工作拷贝库,然后把完全的工作拷贝写到磁盘(<filename>.svn</filename>目录和一切)。"
16470 #. (para)
16471 #: ../source/book.xml:16184
16472 #, fuzzy
16473 msgid "The client library is designed to be used by any application. While the Subversion source code includes a standard command-line client, it should be very easy to write any number of GUI clients on top of the client library. New GUIs (or any new client, really) for Subversion need not be clunky wrappers around the included command-line client—they have full access via the libsvn_client API to same functionality, data, and callback mechanisms that the command-line client uses. In fact, the Subversion source code tree contains a small C program (which can be found at <filename>tools/examples/minimal_client.c</filename> that exemplifies how to wield the Subversion API to create a simple client program"
16474 msgstr "客户端库是为任何程序使用设计的,尽管Subversion的源代码包括了一个标准的命令行客户端,用客户端库编写GUI客户端也是很简单,Subversion新的GUI(或者任何新的客户端,真的)不需要紧密围绕包含的命令行客户端—他们对具有相同功能、数据和回调机制的libsvn_client的API有完全的访问权利。事实上,Subversion源代码中包含了一段C程序(可以在<filename>tools/examples/minimal_client.c</filename>)例子,演示了如何利用Subversion客户端创建简单的客户端程序。"
16476 #. (title)
16477 #: ../source/book.xml:16199
16478 msgid "Binding Directly—A Word About Correctness"
16479 msgstr "直接绑定—关于正确性"
16481 #. (para)
16482 #: ../source/book.xml:16201
16483 #, fuzzy
16484 msgid "Why should your GUI program bind directly with a libsvn_client instead of acting as a wrapper around a command-line program? Besides simply being more efficient, it can be more correct as well. A command-line program (like the one supplied with Subversion) that binds to the client library needs to effectively translate feedback and requested data bits from C types to some form of human-readable output. This type of translation can be lossy. That is, the program may not display all of the information harvested from the API, or may combine bits of information for compact representation."
16485 msgstr "为什么GUI程序要直接访问libsvn_client而不以命令行客户端的包裹运行?除了效率以外,这也关系到潜在的正确性问题。一个命令行客户端程序(如Subversion提供的)如果绑定了客户端库,需要将反馈和请求数据字节从C翻译为可读的输出,这种翻译是有损耗的,程序不能得到API所提供的所有信息,或者是得到紧凑的信息。"
16487 #. (para)
16488 #: ../source/book.xml:16212
16489 msgid "If you wrap such a command-line program with yet another program, the second program has access only to already-interpreted (and as we mentioned, likely incomplete) information, which it must <emphasis>again</emphasis> translate into <emphasis>its</emphasis> representation format. With each layer of wrapping, the integrity of the original data is potentially tainted more and more, much like the result of making a copy of a copy (of a copy …) of a favorite audio or video cassette."
16490 msgstr "如果你已经包裹了这样一个命令行程序,第二个程序只能访问已经经过解释的(如我们提到的,不完全)信息,需要<emphasis>再次</emphasis>转化为<emphasis>它本身的</emphasis>展示格式。由于各层的包裹,原始数据的完整性越来越难以保证,结果很像对喜欢的录音带或录像带反复的拷贝(一个拷贝…)。"
16492 #. (para)
16493 #: ../source/book.xml:16221
16494 msgid "But the most compelling argument for binding directly to the APIs instead of wrapping other programs is that the Subversion project makes compatibility promises regarding its APIs. Across minor versions of those APIs (such as between 1.3 and 1.4), no function's prototype will change. In other words, you aren't forced to update your program's source code simply because you've upgraded to a new version of Subversion. Certain functions might be deprecated, but they still work, and this gives you a buffer of time to eventually embrace the newer APIs. These kinds of compatibility promises do not exist for Subversion command-line program output, which is subject to change from release to release."
16495 msgstr "但是关于直接绑定API使用,而不是包裹程序,这是Subversion项目对其API兼容性的承诺。在小版本的变化(如从1.3到1.4)中API的不会有函数原形的改变,简单来说就是你不需要将你程序源代码升级,因为你只是升级到了一个新版本的Subversion。某些方法可能会被废弃,但依然工作,这给你了缓冲时间来最终适应新API。Subversion的命令行输出没有这种兼容性承诺,可能会在每个版本更改。"
16497 #. (title)
16498 #: ../source/book.xml:16242
16499 msgid "Inside the Working Copy Administration Area"
16500 msgstr "进入工作拷贝的管理区"
16502 #. (para)
16503 #: ../source/book.xml:16244
16504 #, fuzzy
16505 msgid "As we mentioned earlier, each directory of a Subversion working copy contains a special subdirectory called <filename>.svn</filename> which houses administrative data about that working copy directory. Subversion uses the information in <filename>.svn</filename> to keep track of things like:"
16506 msgstr "像我们前面提到的,每个Subversion工作拷贝包含了一个特别的子目录叫做<filename>.svn</filename>,这个目录包含了关于工作拷贝目录的管理数据,Subversion使用<filename>.svn</filename>中的信息来追踪如下的数据:"
16508 #. (para)
16509 #: ../source/book.xml:16251
16510 msgid "Which repository location(s) are represented by the files and subdirectories in the working copy directory."
16511 msgstr "工作拷贝中展示的目录和文件在版本库中的位置。"
16513 #. (para)
16514 #: ../source/book.xml:16256
16515 msgid "What revision of each of those files and directories are currently present in the working copy."
16516 msgstr "工作拷贝中当前展示的文件和目录的修订版本。"
16518 #. (para)
16519 #: ../source/book.xml:16260
16520 msgid "Any user-defined properties that might be attached to those files and directories."
16521 msgstr "所有附加在文件和目录上的用户定义属性。"
16523 #. (para)
16524 #: ../source/book.xml:16264
16525 msgid "Pristine (un-edited) copies of the working copy files."
16526 msgstr "初始(未编辑)的工作拷贝文件的拷贝。"
16528 #. (para)
16529 #: ../source/book.xml:16268
16530 #, fuzzy
16531 msgid "The Subversion working copy administration area's layout and contents are considered implementation details not really intended for human consumption. Developers are encouraged to use Subversion's public APIs, or the tools that Subversion provides, to access and manipulate the working copy data, instead of directly reading or modifying those files. The file formats employed by the working copy library for its administrative data do change from time to time—a fact that the public APIs do a great job of hiding from the average user. In this section, we expose some of these implementation details sheerly to appease your overwhelming curiosity."
16532 msgstr "Subversion工作拷贝管理区域的布局和内容主要是考虑的实现细节,不是被人来使用的。开发者被鼓励使用Subversion的API或工具来访问和处理工作拷贝数据,反对直接读写操作组成工作拷贝管理区域的文件。工作拷贝中管理数据采用的文件格式会不断改变—只是公共API成功的隐藏了这种改变。在本小节,我们将会探讨一些实现细节来安抚你们的焦虑。"
16534 #. (title)
16535 #: ../source/book.xml:16282
16536 msgid "The Entries File"
16537 msgstr "条目文件"
16539 #. (para)
16540 #: ../source/book.xml:16284
16541 #, fuzzy
16542 msgid "Perhaps the single most important file in the <filename>.svn</filename> directory is the <filename>entries</filename> file. It contains the bulk of the administrative information about the versioned items in a working copy directory. It is this one file which tracks the repository URLs, pristine revision, file checksums, pristine text and property timestamps, scheduling and conflict state information, last-known commit information (author, revision, timestamp), local copy history—practically everything that a Subversion client is interested in knowing about a versioned (or to-be-versioned) resource!"
16543 msgstr "或许<filename>.svn</filename>目录中最重要的单个文件就是<filename>entries</filename>了,这个条目文件是一个XML文档,包含了关于工作拷贝中的版本化的资源的大多数管理性信息,这个文件保留了版本库URL、原始修订版本、文件校验数据、可知的最后提交信息(作者、修订版本和时间戳)和本地拷贝历史—实际上是Subversion客户端关于一个版本化(或者是将要版本化的)资源的所有感兴趣的信息!"
16545 #. (para)
16546 #: ../source/book.xml:16296
16547 #, fuzzy
16548 msgid "Folks familiar with CVS's administrative directories will have recognized at this point that Subversion's <filename>.svn/entries</filename> file serves the purposes of, among other things, CVS's <filename>CVS/Entries</filename>, <filename>CVS/Root</filename>, and <filename>CVS/Repository</filename> files combined."
16549 msgstr "熟悉CVS管理目录的人可能会发现,Subversion的<filename>.svn/entries</filename>实现了CVS的<filename>CVS/Entries</filename>、<filename>CVS/Root</filename>和<filename>CVS/Repository</filename>的功能。"
16551 #. (para)
16552 #: ../source/book.xml:16302
16553 #, fuzzy
16554 msgid "The format of the <filename>.svn/entries</filename> file has changed over time. Originally an XML file, it now uses a custom—though still human-readable—file format. While XML was a great choice for early developers of Subversion who were frequently debugging the file's contents (and Subversion's behavior in light of them), the need for easy developer debugging has diminished as Subversion has matured, and has been replaced by the user's need for snappier performance. Be aware that Subversion's working copy library automatically upgrades working copies from one format to another—it reads the old formats, and writes the new—which saves you the hassle of checking out a new working copy, but can also complicate situations where different versions of Subversion might be trying to use the same working copy."
16555 msgstr "<filename>.svn/entries</filename>的格式曾经多次修改,最初是XML文件,现在使用自定义的—尽管依然是可读的文件格式。早期的Subversion需要频繁调试文件内容,所以选择了XML这种格式,随着Subversion的成熟,频繁调试的需求消失了,而产生了用户对性能的要求。当然,Subversion的工作拷贝库可以从一种格式升级到另一种格式—按照老格式读取,然后按照新格式写。"
16557 #. (title)
16558 #: ../source/book.xml:16321
16559 msgid "Pristine Copies and Property Files"
16560 msgstr "原始拷贝和属性文件"
16562 #. (para)
16563 #: ../source/book.xml:16323
16564 #, fuzzy
16565 msgid "As mentioned before, the <filename>.svn</filename> directory also holds the pristine <quote>text-base</quote> versions of files. Those can be found in <filename>.svn/text-base</filename>. The benefits of these pristine copies are multiple—network-free checks for local modifications and difference reporting, network-free reversion of modified or missing files, more efficient transmission of changes to the server—but comes at the cost of having each versioned file stored at least twice on disk. These days, this seems to be a negligible penalty for most files. However, the situation gets uglier as the size of your versioned files grows. Some attention is being given to making the presence of the <quote>text-base</quote> an option. Ironically though, it is as your versioned files' sizes get larger that the existence of the <quote>text-base</quote> becomes more crucial—who wants to transmit a huge file across a network just because they want to commit a tiny change to it?"
16566 msgstr "如我们前面提到的,<filename>.svn</filename>也包含了一些原始的<quote>text-base</quote>文件版本,可以在<filename>.svn/text-base</filename>看到。这些原始文件的好处是多方面的—察看本地修改和区别不需要经过网络访问,减少传递修改时的数据—但是随之而来的代价是每个版本化的文件都在磁盘至少保存两次,现在看来这是对大多数文件可以忽略不计的一个惩罚。但是,当你版本控制的文件增多之后形势会变得很严峻,我们已经注意到了应该可以选择使用<quote>text-base</quote>,但是具有讽刺意味的是,当版本化文件增大时,<quote>text-base</quote>文件的存在会更加重要—谁会希望在提交一个小修改时在网络上传递一个大文件?"
16568 #. (para)
16569 #: ../source/book.xml:16341
16570 #, fuzzy
16571 msgid "Similar in purpose to the <quote>text-base</quote> files are the property files and their pristine <quote>prop-base</quote> copies, located in <filename>.svn/props</filename> and <filename>.svn/prop-base</filename> respectively. Since directories can have properties, too, there are also <filename>.svn/dir-props</filename> and <filename>.svn/dir-prop-base</filename> files."
16572 msgstr "同<quote>text-base</quote>文件的用途一样的还有属性文件和它们的<quote>prop-base</quote>拷贝,分别位于<filename>.svn/props</filename>和<filename>.svn/prop-base</filename>。因为目录也有属性,所以也有<filename>.svn/dir-props</filename>和<filename>.svn/dir-prop-base</filename>文件。所有的属性文件(<quote>working</quote>和<quote>base</quote>版本)都使用同样的<quote>hash-on-disk</quote>文件格式来排序属性名称和值。"
16574 #. (title)
16575 #: ../source/book.xml:16356
16576 msgid "Using the APIs"
16577 msgstr "使用 API"
16579 #. (para)
16580 #: ../source/book.xml:16358
16581 #, fuzzy
16582 msgid "Developing applications against the Subversion library APIs is fairly straightforward. Subversion is primarily a set of C libraries, with header (.h) files that live in the <filename>subversion/include</filename> directory of the source tree. These headers are copied into your system locations (for example, <filename>/usr/local/include</filename>) when you build and install Subversion itself from source. These headers represent the entirety of the functions and types meant to be accessible by users of the Subversion libraries. The Subversion developer community is meticulous about ensuring that the public API is well-documented—refer directly to the header files for that documentation."
16583 msgstr "使用Subversion库API开发应用看起来相当的直接,所有的公共头文件放在源文件的<filename>subversion/include</filename>目录,从源代码编译和安装Subversion本身,需要这些头文件拷贝到系统位置。这些头文件包括了所有用户和Subversion库可以访问的功能和类型。Subversion开发者社区仔细的确保所有的公共API有完好的文档—直接引用头文件的文档。"
16585 #. (para)
16586 #: ../source/book.xml:16370
16587 #, fuzzy
16588 msgid "When examining the public header files, the first thing you might notice is that Subversion's datatypes and functions are namespace protected. That is, every public Subversion symbol name begins with <literal>svn_</literal>, followed by a short code for the library in which the symbol is defined (such as <literal>wc</literal>, <literal>client</literal>, <literal>fs</literal>, etc.), followed by a single underscore (<literal>_</literal>) and then the rest of the symbol name. Semi-public functions (used among source files of a given library but not by code outside that library, and found inside the library directories themselves) differ from this naming scheme in that instead of a single underscore after the library code, they use a double underscore (<literal>__</literal>). Functions that are private to a given source file have no special prefixing, and are declared <literal>static</literal>. Of course, a compiler isn't interested in these naming conventions, but they help to clarify the scope of a given function or datatype."
16589 msgstr "你首先应该注意Subversion的数据类型和方法是命名空间保护的,每一个公共Subversion对象名以<literal>svn_</literal>开头,然后紧跟一个这个对象定义(如<literal>wc</literal>、<literal>client</literal>和<literal>fs</literal>等等)所在的库的简短编码,然后是一个下划线(<literal>_</literal>)和后面的对象名称。半公开的方法(库使用,但是但库之外代码不可以使用并且只可以在库自己的目录看到)与这个命名模式不同,并不是库代码之后紧跟一个下划线,他们是用两个下划线(<literal>__</literal>)。给定源文件的私有方法没有特殊前缀,使用<literal>static</literal>声明。当然,一个编译器不会关心命名习惯,只是用来区分给定方法或数据类型的应用范围。"
16591 #. (para)
16592 #: ../source/book.xml:16395
16593 msgid "After all, Subversion uses Subversion's APIs, too."
16594 msgstr "当然,Subversion使用Subversion的API。"
16596 #. (para)
16597 #: ../source/book.xml:16388
16598 #, fuzzy
16599 msgid "Another good source of information about programming against the Subversion APIs is the project's own hacking guidelines, which can be found at <uri href=\"http://subversion.tigris.org/hacking.html\">http://subversion.tigris.org/hacking.html</uri>. This document contains useful information which, while aimed at developers and would-be developers of Subversion itself, is equally applicable to folks developing against Subversion as a set of third-party libraries. <placeholder-1/>"
16600 msgstr "关于Subversion的API编程的另一个好的资源是hacking指南,可以在<ulink url=\"http://subversion.tigris.org/hacking.html\"/>找到,这个文档包含了有用的信息,同时满足Subversion本身的开发者和将Subversion作为第三方库的开发者。<placeholder-1/>"
16602 #. (title)
16603 #: ../source/book.xml:16401
16604 msgid "The Apache Portable Runtime Library"
16605 msgstr "Apache 可移植运行库"
16607 #. (para)
16608 #: ../source/book.xml:16403
16609 #, fuzzy
16610 msgid "Along with Subversion's own datatypes, you will see many references to datatypes that begin with <literal>apr_</literal>—symbols from the Apache Portable Runtime (APR) library. APR is Apache's portability library, originally carved out of its server code as an attempt to separate the OS-specific bits from the OS-independent portions of the code. The result was a library that provides a generic API for performing operations that differ mildly—or wildly—from OS to OS. While the Apache HTTP Server was obviously the first user of the APR library, the Subversion developers immediately recognized the value of using APR as well. This means that there is practically no OS-specific code in Subversion itself. Also, it means that the Subversion client compiles and runs anywhere that Apache HTTP Server itself does. Currently this list includes all flavors of Unix, Win32, BeOS, OS/2, and Mac OS X."
16611 msgstr "伴随Subversion自己的数据类型,你会看到许多<literal>apr</literal>开头的数据类型引用—来自Apache可移植运行库(APR)的对象。APR是Apache可移植运行库,源自为了服务器代码的多平台性,尝试将不同的操作系统特定字节与操作系统无关代码隔离。结果就提供了一个基础API的库,只有一些适度区别—或者是广泛的—来自各个操作系统。Apache HTTP服务器很明显是APR库的第一个用户,Subversion开发者立刻发现了使用APR库的价值。意味着Subversion没有操作系统特定的代码,也意味着Subversion客户端可以在Server存在的平台编译和运行。当前这个列表包括,各种类型的Unix、Win32、OS/2和Mac OS X。"
16613 #. (para)
16614 #: ../source/book.xml:16421
16615 msgid "Subversion uses ANSI system calls and datatypes as much as possible."
16616 msgstr "Subversion使用尽可能多ANSI系统调用和数据类型。"
16618 #. (para)
16619 #: ../source/book.xml:16432
16620 msgid "Neon and Berkeley DB are examples of such libraries."
16621 msgstr "Neon和Berkeley DB就是这种库的例子。"
16623 #. (para)
16624 #: ../source/book.xml:16419
16625 #, fuzzy
16626 msgid "In addition to providing consistent implementations of system calls that differ across operating systems, <placeholder-1/> APR gives Subversion immediate access to many custom datatypes, such as dynamic arrays and hash tables. Subversion uses these types extensively. But perhaps the most pervasive APR datatype, found in nearly every Subversion API prototype, is the apr_pool_t — the APR memory pool. Subversion uses pools internally for all its memory allocation needs (unless an external library requires a different memory management mechanism for data passed through its API), <placeholder-2/> and while a person coding against the Subversion APIs is not required to do the same, they <emphasis>are</emphasis> required to provide pools to the API functions that need them. This means that users of the Subversion API must also link against APR, must call <function>apr_initialize()</function> to initialize the APR subsystem, and then must create and manage pools for use with Subversion API calls, typically by using <function>svn_pool_create()</function>, <function>svn_pool_clear()</function>, and <function>svn_pool_destroy()</function>."
16627 msgstr "除了提供了跨平台一致的系统调用, <placeholder-1/>APR给Subversion对多种数据类型有快速的访问,如动态数组和哈希表。Subversion在代码中广泛使用这些类型,但是Subversion的API原型中最常见的APR类型是<structname>apr_pool_t</structname>—APR内存池,Subversion使用内部缓冲池用来进行内存分配(除非外部库在API传递参数时需要一个不同的内存管理模式), <placeholder-2/>而且一个人如果针对Subversion的API编码不需要做同样的事情,他们可以在需要时给API提供缓冲池,这意味着Subversion的API使用者也必须链接到APR,必须调用<function moreinfo=\"none\">apr_initialize()</function>来初始化APR子系统,而且在使用Subversion API时必须创建和管理池,通常是使用<function moreinfo=\"none\">svn_pool_create()</function>、<function moreinfo=\"none\">svn_pool_clear()</function>和<function moreinfo=\"none\">svn_pool_destroy()</function>。"
16629 #. (title)
16630 #: ../source/book.xml:16445
16631 msgid "Programming with Memory Pools"
16632 msgstr "使用内存池编程"
16634 #. (para)
16635 #: ../source/book.xml:16447
16636 msgid "Almost every developer who has used the C programming language has at some point sighed at the daunting task of managing memory usage. Allocating enough memory to use, keeping track of those allocations, freeing the memory when you no longer need it—these tasks can be quite complex. And of course, failure to do those things properly can result in a program that crashes itself, or worse, crashes the computer."
16637 msgstr "几乎每一个使用过C语言的开发者曾经感叹令人畏缩的内存管理,分配足够的内存,并且追踪内存的分配,在不需要时释放内存—这个任务会非常复杂。当然,如果没有正确地做到这一点会导致程序毁掉自己,或者更加严重一点,把电脑搞瘫。"
16639 #. (para)
16640 #: ../source/book.xml:16457
16641 msgid "Or at least make it something you only toy with when doing extremely tight program optimization."
16642 msgstr "或仅仅是在紧密地程序优化中玩弄什么东西。"
16644 #. (para)
16645 #: ../source/book.xml:16455
16646 #, fuzzy
16647 msgid "Higher-level languages, on the other hand, take the job of memory management away from the developer completely. <placeholder-1/> Languages like Java and Python use <firstterm>garbage collection</firstterm>, allocating memory for objects when needed, and automatically freeing that memory when the object is no longer in use."
16648 msgstr "另一方面高级语言使开发者完全摆脱了内存管理,<placeholder-1/>Java和Python之类的语言使用<firstterm>垃圾收集</firstterm>原理,在需要的时候分配对象内存,在不使用时进行清理。"
16650 #. (para)
16651 #: ../source/book.xml:16463
16652 #, fuzzy
16653 msgid "APR provides a middle-ground approach called pool-based memory management. It allows the developer to control memory usage at a lower resolution—per chunk (or <quote>pool</quote>) of memory, instead of per allocated object. Rather than using <function>malloc()</function> and friends to allocate enough memory for a given object, you ask APR to allocate the memory from a memory pool. When you're finished using the objects you've created in the pool, you destroy the entire pool, effectively de-allocating the memory consumed by <emphasis>all</emphasis> the objects you allocated from it. Thus, rather than keeping track of individual objects which need to be de-allocated, your program simply considers the general lifetimes of those objects, and allocates the objects in a pool whose lifetime (the time between the pool's creation and its deletion) matches the object's needs."
16654 msgstr "APR提供了一种叫做池基础的中等的内存管理方法,允许开发者以一种低分辨率的方式控制内存—每块(或池)的内存,而不是每个对象。不是使用<function moreinfo=\"none\">malloc()</function>和其他按照对象分配内存的方式,你要求APR从内存创建一段内存池,当你结束使用在池中创建的对象,你销毁池,可以有效地取消其中的对象消耗的内存。通过池,你不需要跟踪每个对象的内存释放,你的程序只需要跟踪这些对象,将对象分配到池中,而池的生命周期(池的创建和删除)满足所有对象的需要。"
16656 #. (title)
16657 #: ../source/book.xml:16484
16658 msgid "URL and Path Requirements"
16659 msgstr "URL 和路径需求"
16661 #. (para)
16662 #: ../source/book.xml:16486
16663 #, fuzzy
16664 msgid "With remote version control operation as the whole point of Subversion's existence, it makes sense that some attention has been paid to internationalization (i18n) support. After all, while <quote>remote</quote> might mean <quote>across the office</quote>, it could just as well mean <quote>across the globe.</quote> To facilitate this, all of Subversion's public interfaces that accept path arguments expect those paths to be canonicalized, and encoded in UTF-8. This means, for example, that any new client binary that drives the libsvn_client interface needs to first convert paths from the locale-specific encoding to UTF-8 before passing those paths to the Subversion libraries, and then re-convert any resultant output paths from Subversion back into the locale's encoding before using those paths for non-Subversion purposes. Fortunately, Subversion provides a suite of functions (see <filename>subversion/include/svn_utf.h</filename>) that can be used by any program to do these conversions."
16665 msgstr "因为分布式版本控制操作是Subversion存在的重点,有意义来关注一下国际化(i18n)支持。毕竟,当<quote>分布式</quote>或许意味着<quote>横跨办公室</quote>,它也意味着<quote>横跨全球</quote>。为了更容易一点,Subversion的所有公共接口只接受路径参数,这些参数是传统的,使用UTF-8编码。这意味着,举个例子,任何新的使用libsvn_client接口客户端库,在把这些参数传递给Subversion库前,需要首先将路径从本地代码转化为UTF-8代码,然后将Subversion传递回来的路径转换为本地代码,很幸运,Subversion提供了一组任何程序可以使用的转化方法(见<filename>subversion/include/svn_utf.h</filename>)。"
16667 #. (para)
16668 #: ../source/book.xml:16503
16669 #, fuzzy
16670 msgid "Also, Subversion APIs require all URL parameters to be properly URI-encoded. So, instead of passing <uri>file:///home/username/My File.txt</uri> as the URL of a file named <literal>My File.txt</literal>, you need to pass <uri>file:///home/username/My%20File.txt</uri>. Again, Subversion supplies helper functions that your application can use—<function>svn_path_uri_encode()</function> and <function>svn_path_uri_decode()</function>, for URI encoding and decoding, respectively."
16671 msgstr "同样,Subversion的API需要所有的URL参数是正确的URI编码,所以,我们不会传递<systemitem class=\"url\" moreinfo=\"none\">file:///home/username/My File.txt</systemitem>作为<literal>My File.txt</literal>的URL,而会传递<systemitem class=\"url\" moreinfo=\"none\">file:///home/username/My%20File.txt</systemitem>。再次,Subversion提供了一些你可以使用的助手方法—<function moreinfo=\"none\">svn_path_uri_encode()</function>和<function moreinfo=\"none\">svn_path_uri_decode()</function>,分别用来URI的编码和解码。"
16673 #. (title)
16674 #: ../source/book.xml:16516
16675 msgid "Using Languages Other than C and C++"
16676 msgstr "使用 C 和 C++ 以外的语言"
16678 #. (para)
16679 #: ../source/book.xml:16518
16680 #, fuzzy
16681 msgid "If you are interested in using the Subversion libraries in conjunction with something other than a C program—say a Python or Perl script—Subversion has some support for this via the Simplified Wrapper and Interface Generator (SWIG). The SWIG bindings for Subversion are located in <filename>subversion/bindings/swig</filename>. They are still maturing, but they are usable. These bindings allow you to call Subversion API functions indirectly, using wrappers that translate the datatypes native to your scripting language into the datatypes needed by Subversion's C libraries."
16682 msgstr "除C语言以外,如果你对使用其他语言结合Subversion库感兴趣—如Python脚本或是Java应用—Subversion通过简单包裹生成器(SWIG)提供了最初的支持。Subversion的SWIG绑定位于<filename>subversion/bindings/swig</filename>,并且慢慢的走向成熟进入可用状态。这个绑定允许你直接调用Subversion的API方法,使用包裹器会把脚本数据类型转化为Subversion需要的C语言库类型。"
16684 #. (para)
16685 #: ../source/book.xml:16528
16686 #, fuzzy
16687 msgid "Significant efforts have been made towards creating functional SWIG-generated bindings for Python, Perl, and Ruby. To some extent, the work done preparing the SWIG interface files for these languages is reusable in efforts to generate bindings for other languages supported by SWIG (which include versions of C#, Guile, Java, MzScheme, OCaml, PHP, and Tcl, among others). However, some extra programming is required to compensate for complex APIs that SWIG needs some help translating between languages. For more information on SWIG itself, see the project's website at <uri href=\"http://www.swig.org/\">http://www.swig.org/</uri>."
16688 msgstr "非常不幸,Subversion的语言绑定缺乏对核心Subversion模块的关注,但是,花了很多力气处理创建针对Python、Perl和Ruby的功能绑定,在一定程度上,在这些接口上的工作量可以在其他语言的SWIG(包括C#、Guile、Java、MzScheme、OCaml、PHP、Tcl等等)接口上得到重用。然而,一些接口仍然需要额外的编程工作,关于SWIG本身的更多信息可以看项目的网站<ulink url=\"http://www.swig.org/\"/>。"
16690 #. (para)
16691 #: ../source/book.xml:16538
16692 msgid "Subversion also has language bindings for Java. The JavaJL bindings (located in <filename>subversion/bindings/java</filename> in the Subversion source tree) aren't SWIG-based, but are instead a mixture of javah and hand-coded JNI. JavaHL most covers Subversion client-side APIs, and is specifically targeted at implementors of Java-based Subversion clients and IDE integrations."
16693 msgstr "Subversion也有Java的语言绑定,JavaJL绑定(位于Subversion源目录树的<filename>subversion/bindings/java</filename>)不是基于SWIG的,而是javah和手写JNI的混合,JavaHL几乎覆盖Subversion客户端的API,目标是作为Java基础的Subversion客户端和集成IDE的实现。"
16695 #. (para)
16696 #: ../source/book.xml:16546
16697 msgid "Subversion's language bindings tend to lack the level of developer attention given to the core Subversion modules, but can generally be trusted as production-ready. A number of scripts and applications, alternative Subversion GUI clients and other third-party tools are successfully using Subversion's language bindings today to accomplish their Subversion integrations."
16698 msgstr "Subversion的语言绑定缺乏Subversion核心模块的关注,但是通常可以作为一个产品信赖。大量脚本、应用、Subversion的GUI客户端和其他第三方工具现在已经成功地运用了Subversion语言绑定来完成Subversion的集成。"
16700 #. (para)
16701 #: ../source/book.xml:16553
16702 msgid "It's worth noting here that there are other options for interfacing with Subversion using other languages: alternative bindings for Subversion which aren't provided by the Subversion development community at all. You can find links to these alternative bindings on the Subversion project's links page (at <uri href=\"http://subversion.tigris.org/links.html\">http://subversion.tigris.org/links.html</uri>), but there are a couple of popular ones we feel are especially noteworthy. First, Barry Scott's PySVN bindings (<uri href=\"http://pysvn.tigris.org/\">http://pysvn.tigris.org/</uri>) are a popular option for binding with Python. PySVN boasts of a more Pythonic interface than the more C-like APIs provided by Subversion's own Python bindings. For folks looking for a pure Java implementation of Subversion, check out SVNKit (<uri href=\"http://svnkit.com/\">http://svnkit.com/</uri>), which is Subversion re-written from the ground up in Java. You should exercise caution here, though—because SVNKit doesn't use the core Subversion libraries, it's behavior is not guaranteed to match that of Subversion itself."
16703 msgstr "这里使用其它语言的方法来与Subversion交互没有任何意义:Subversion开发社区没有提供其他的绑定,你可以在Subversion项目链接页里(<uri href=\"http://subversion.tigris.org/links.html\">http://subversion.tigris.org/links.html</uri>)找到其他绑定的链接,但是有一些流行的绑定我觉得应该特别留意。首先是Python的流行绑定,Barry Scott的PySVN(<uri href=\"http://pysvn.tigris.org/\">http://pysvn.tigris.org/</uri>)。PySVN鼓吹它们提供了更多Python样式的接口,而不像Subversion自己的Python绑定的C样式接口。对于希望寻求Subversion纯Java实现的人,可以看看SVNKit(<uri href=\"http://svnkit.com/\">http://svnkit.com/</uri>),也就是从头使用Java编写的Subversion。你必须要小心,SVNKit没有采用Subversion的核心库,其行为方式没有确保与Subversion匹配。"
16705 #. (title)
16706 #: ../source/book.xml:16573
16707 msgid "Code Samples"
16708 msgstr "代码样例"
16710 #. (para)
16711 #: ../source/book.xml:16575
16712 #, fuzzy
16713 msgid "<xref linkend=\"svn.developer.layerlib.repos.ex-1\"/> contains a code segment (written in C) that illustrates some of the concepts we've been discussing. It uses both the repository and filesystem interfaces (as can be determined by the prefixes <literal>svn_repos_</literal> and <literal>svn_fs_</literal> of the function names, respectively) to create a new revision in which a directory is added. You can see the use of an APR pool, which is passed around for memory allocation purposes. Also, the code reveals a somewhat obscure fact about Subversion error handling—all Subversion errors must be explicitly handled to avoid memory leakage (and in some cases, application failure)."
16714 msgstr "<xref linkend=\"svn.developer.layerlib.repos.ex-1\"/>包含了一段C代码(C编写)描述了我们讨论的概念,它使用了版本库和文件系统接口(可以通过方法名<literal>svn_repos_</literal>和<literal>svn_fs_</literal>分辨)创建了一个添加目录的修订版本。你可以看到APR库的使用,为了内存分配而传递,这些代码也揭开了一些关于Subversion错误处理的晦涩事实—所有的Subversion错误必须需要明确的处理以防止内存泄露(在某些情况下,应用失败)。"
16716 #. (title)
16717 #: ../source/book.xml:16590
16718 msgid "Using the Repository Layer"
16719 msgstr "使用版本库层"
16721 #. (programlisting)
16722 #: ../source/book.xml:16592
16723 #, fuzzy, no-wrap
16724 msgid ""
16725 "\n"
16726 "/* Convert a Subversion error into a simple boolean error code.\n"
16727 " *\n"
16728 " * NOTE:  Subversion errors must be cleared (using svn_error_clear())\n"
16729 " *        because they are allocated from the global pool, else memory\n"
16730 " *        leaking occurs.\n"
16731 " */\n"
16732 "#define INT_ERR(expr)                           \\\n"
16733 "  do {                                          \\\n"
16734 "    svn_error_t *__temperr = (expr);            \\\n"
16735 "    if (__temperr)                              \\\n"
16736 "      {                                         \\\n"
16737 "        svn_error_clear(__temperr);             \\\n"
16738 "        return 1;                               \\\n"
16739 "      }                                         \\\n"
16740 "    return 0;                                   \\\n"
16741 "  } while (0)\n"
16742 "\n"
16743 "/* Create a new directory at the path NEW_DIRECTORY in the Subversion\n"
16744 " * repository located at REPOS_PATH.  Perform all memory allocation in\n"
16745 " * POOL.  This function will create a new revision for the addition of\n"
16746 " * NEW_DIRECTORY.  Return zero if the operation completes\n"
16747 " * successfully, non-zero otherwise.\n"
16748 " */\n"
16749 "static int\n"
16750 "make_new_directory(const char *repos_path,\n"
16751 "                   const char *new_directory,\n"
16752 "                   apr_pool_t *pool)\n"
16753 "{\n"
16754 "  svn_error_t *err;\n"
16755 "  svn_repos_t *repos;\n"
16756 "  svn_fs_t *fs;\n"
16757 "  svn_revnum_t youngest_rev;\n"
16758 "  svn_fs_txn_t *txn;\n"
16759 "  svn_fs_root_t *txn_root;\n"
16760 "  const char *conflict_str;\n"
16761 "\n"
16762 "  /* Open the repository located at REPOS_PATH. \n"
16763 "   */\n"
16764 "  INT_ERR(svn_repos_open(&amp;repos, repos_path, pool));\n"
16765 "\n"
16766 "  /* Get a pointer to the filesystem object that is stored in REPOS. \n"
16767 "   */\n"
16768 "  fs = svn_repos_fs(repos);\n"
16769 "\n"
16770 "  /* Ask the filesystem to tell us the youngest revision that\n"
16771 "   * currently exists. \n"
16772 "   */\n"
16773 "  INT_ERR(svn_fs_youngest_rev(&amp;youngest_rev, fs, pool));\n"
16774 "\n"
16775 "  /* Begin a new transaction that is based on YOUNGEST_REV.  We are\n"
16776 "   * less likely to have our later commit rejected as conflicting if we\n"
16777 "   * always try to make our changes against a copy of the latest snapshot\n"
16778 "   * of the filesystem tree. \n"
16779 "   */\n"
16780 "  INT_ERR(svn_fs_begin_txn(&amp;txn, fs, youngest_rev, pool));\n"
16781 "\n"
16782 "  /* Now that we have started a new Subversion transaction, get a root\n"
16783 "   * object that represents that transaction. \n"
16784 "   */\n"
16785 "  INT_ERR(svn_fs_txn_root(&amp;txn_root, txn, pool));\n"
16786 "  \n"
16787 "  /* Create our new directory under the transaction root, at the path\n"
16788 "   * NEW_DIRECTORY. \n"
16789 "   */\n"
16790 "  INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool));\n"
16791 "\n"
16792 "  /* Commit the transaction, creating a new revision of the filesystem\n"
16793 "   * which includes our added directory path.\n"
16794 "   */\n"
16795 "  err = svn_repos_fs_commit_txn(&amp;conflict_str, repos, \n"
16796 "                                &amp;youngest_rev, txn, pool);\n"
16797 "  if (! err)\n"
16798 "    {\n"
16799 "      /* No error?  Excellent!  Print a brief report of our success.\n"
16800 "       */\n"
16801 "      printf(\"Directory '%s' was successfully added as new revision \"\n"
16802 "             \"'%ld'.\\n\", new_directory, youngest_rev);\n"
16803 "    }\n"
16804 "  else if (err-&gt;apr_err == SVN_ERR_FS_CONFLICT)\n"
16805 "    {\n"
16806 "      /* Uh-oh.  Our commit failed as the result of a conflict\n"
16807 "       * (someone else seems to have made changes to the same area \n"
16808 "       * of the filesystem that we tried to modify).  Print an error\n"
16809 "       * message.\n"
16810 "       */\n"
16811 "      printf(\"A conflict occurred at path '%s' while attempting \"\n"
16812 "             \"to add directory '%s' to the repository at '%s'.\\n\", \n"
16813 "             conflict_str, new_directory, repos_path);\n"
16814 "    }\n"
16815 "  else\n"
16816 "    {\n"
16817 "      /* Some other error has occurred.  Print an error message.\n"
16818 "       */\n"
16819 "      printf(\"An error occurred while attempting to add directory '%s' \"\n"
16820 "             \"to the repository at '%s'.\\n\", \n"
16821 "             new_directory, repos_path);\n"
16822 "    }\n"
16823 "\n"
16824 "  INT_ERR(err);\n"
16825 "} \n"
16826 msgstr ""
16827 "\n"
16828 "/* Convert a Subversion error into a simple boolean error code.\n"
16829 " *\n"
16830 " * NOTE:  Subversion errors must be consumed because they are allocated\n"
16831 " *        from the global pool, else memory leaking occurs.\n"
16832 " */\n"
16833 "#define INT_ERR(expr)                           \\\n"
16834 "  do {                                          \\\n"
16835 "    svn_error_t *__temperr = (expr);            \\\n"
16836 "    if (__temperr)                              \\\n"
16837 "      {                                         \\\n"
16838 "        svn_error_clear(__temperr);             \\\n"
16839 "        return 1;                               \\\n"
16840 "      }                                         \\\n"
16841 "    return 0;                                   \\\n"
16842 "  } while (0)\n"
16843 "\n"
16844 "/* Create a new directory at the path NEW_DIRECTORY in the Subversion\n"
16845 " * repository located at REPOS_PATH.  Perform all memory allocation in\n"
16846 " * POOL.  This function will create a new revision for the addition of\n"
16847 " * NEW_DIRECTORY.  Return zero if the operation completes\n"
16848 " * successfully, non-zero otherwise.\n"
16849 " */\n"
16850 "static int\n"
16851 "make_new_directory(const char *repos_path,\n"
16852 "                   const char *new_directory,\n"
16853 "                   apr_pool_t *pool)\n"
16854 "{\n"
16855 "  svn_error_t *err;\n"
16856 "  svn_repos_t *repos;\n"
16857 "  svn_fs_t *fs;\n"
16858 "  svn_revnum_t youngest_rev;\n"
16859 "  svn_fs_txn_t *txn;\n"
16860 "  svn_fs_root_t *txn_root;\n"
16861 "  const char *conflict_str;\n"
16862 "\n"
16863 "  /* Open the repository located at REPOS_PATH. \n"
16864 "   */\n"
16865 "  INT_ERR(svn_repos_open(&amp;repos, repos_path, pool));\n"
16866 "\n"
16867 "  /* Get a pointer to the filesystem object that is stored in REPOS. \n"
16868 "   */\n"
16869 "  fs = svn_repos_fs(repos);\n"
16870 "\n"
16871 "  /* Ask the filesystem to tell us the youngest revision that\n"
16872 "   * currently exists. \n"
16873 "   */\n"
16874 "  INT_ERR(svn_fs_youngest_rev(&amp;youngest_rev, fs, pool));\n"
16875 "\n"
16876 "  /* Begin a new transaction that is based on YOUNGEST_REV.  We are\n"
16877 "   * less likely to have our later commit rejected as conflicting if we\n"
16878 "   * always try to make our changes against a copy of the latest snapshot\n"
16879 "   * of the filesystem tree. \n"
16880 "   */\n"
16881 "  INT_ERR(svn_fs_begin_txn(&amp;txn, fs, youngest_rev, pool));\n"
16882 "\n"
16883 "  /* Now that we have started a new Subversion transaction, get a root\n"
16884 "   * object that represents that transaction. \n"
16885 "   */\n"
16886 "  INT_ERR(svn_fs_txn_root(&amp;txn_root, txn, pool));\n"
16887 "  \n"
16888 "  /* Create our new directory under the transaction root, at the path\n"
16889 "   * NEW_DIRECTORY. \n"
16890 "   */\n"
16891 "  INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool));\n"
16892 "\n"
16893 "  /* Commit the transaction, creating a new revision of the filesystem\n"
16894 "   * which includes our added directory path.\n"
16895 "   */\n"
16896 "  err = svn_repos_fs_commit_txn(&amp;conflict_str, repos, \n"
16897 "                                &amp;youngest_rev, txn, pool);\n"
16898 "  if (! err)\n"
16899 "    {\n"
16900 "      /* No error?  Excellent!  Print a brief report of our success.\n"
16901 "       */\n"
16902 "      printf(\"Directory '%s' was successfully added as new revision \"\n"
16903 "             \"'%ld'.\\n\", new_directory, youngest_rev);\n"
16904 "    }\n"
16905 "  else if (err-&gt;apr_err == SVN_ERR_FS_CONFLICT)\n"
16906 "    {\n"
16907 "      /* Uh-oh.  Our commit failed as the result of a conflict\n"
16908 "       * (someone else seems to have made changes to the same area \n"
16909 "       * of the filesystem that we tried to modify).  Print an error\n"
16910 "       * message.\n"
16911 "       */\n"
16912 "      printf(\"A conflict occurred at path '%s' while attempting \"\n"
16913 "             \"to add directory '%s' to the repository at '%s'.\\n\", \n"
16914 "             conflict_str, new_directory, repos_path);\n"
16915 "    }\n"
16916 "  else\n"
16917 "    {\n"
16918 "      /* Some other error has occurred.  Print an error message.\n"
16919 "       */\n"
16920 "      printf(\"An error occurred while attempting to add directory '%s' \"\n"
16921 "             \"to the repository at '%s'.\\n\", \n"
16922 "             new_directory, repos_path);\n"
16923 "    }\n"
16924 "\n"
16925 "  INT_ERR(err);\n"
16926 "} \n"
16928 #. (para)
16929 #: ../source/book.xml:16695
16930 #, fuzzy
16931 msgid "Note that in <xref linkend=\"svn.developer.layerlib.repos.ex-1\"/>, the code could just as easily have committed the transaction using <function>svn_fs_commit_txn()</function>. But the filesystem API knows nothing about the repository library's hook mechanism. If you want your Subversion repository to automatically perform some set of non-Subversion tasks every time you commit a transaction (like, for example, sending an email that describes all the changes made in that transaction to your developer mailing list), you need to use the libsvn_repos-wrapped version of that function, which adds the hook triggering functionality—in this case, <function>svn_repos_fs_commit_txn()</function>. (For more information regarding Subversion's repository hooks, see <xref linkend=\"svn.reposadmin.create.hooks\"/>.)"
16932 msgstr "请注意在<xref linkend=\"svn.developer.layerlib.repos.ex-1\"/>中,代码可以非常容易使用<function moreinfo=\"none\">svn_fs_commit_txn()</function>提交事务。但是文件系统的API对版本库库的钩子一无所知,如果你希望你的Subversion版本库在每次提交一个事务时自动执行一些非Subversion的任务(例如,给开发者邮件组发送一个描述事务修改的邮件),你需要使用libsvn_repos包裹的功能版本—这个功能会实际上首先运行一个如果存在的<literal>pre-commit</literal>钩子脚本,然后提交事务,最后会运行一个<literal>post-commit</literal>钩子脚本。钩子提供了一种特别的报告机制,不是真的属于核心文件系统库本身。(关于Subversion版本库钩子的更多信息,见<xref linkend=\"svn.reposadmin.create.hooks\"/>。)"
16934 #. (para)
16935 #: ../source/book.xml:16708
16936 msgid "Now let's switch languages. <xref linkend=\"svn.developer.usingapi.otherlangs.ex-1\"/> is a sample program that uses Subversion's SWIG Python bindings to recursively crawl the youngest repository revision, and print the various paths reached during the crawl."
16937 msgstr "现在我们转换一下语言,<xref linkend=\"svn.developer.usingapi.otherlangs.ex-1\"/>使用Subversion SWIG的Python绑定实现了从版本库取得最新的版本,并且打印了取出时访问的目录。"
16939 #. (title)
16940 #: ../source/book.xml:16714
16941 msgid "Using the Repository Layer with Python"
16942 msgstr "使用 Python 处理版本库层"
16944 #. (programlisting)
16945 #: ../source/book.xml:16716
16946 #, no-wrap
16947 msgid ""
16948 "\n"
16949 "#!/usr/bin/python\n"
16950 "\n"
16951 "\"\"\"Crawl a repository, printing versioned object path names.\"\"\"\n"
16952 "\n"
16953 "import sys\n"
16954 "import os.path\n"
16955 "import svn.fs, svn.core, svn.repos\n"
16956 "\n"
16957 "def crawl_filesystem_dir(root, directory):\n"
16958 "    \"\"\"Recursively crawl DIRECTORY under ROOT in the filesystem, and return\n"
16959 "    a list of all the paths at or below DIRECTORY.\"\"\"\n"
16960 "\n"
16961 "    # Print the name of this path.\n"
16962 "    print directory + \"/\"\n"
16963 "    \n"
16964 "    # Get the directory entries for DIRECTORY.\n"
16965 "    entries = svn.fs.svn_fs_dir_entries(root, directory)\n"
16966 "\n"
16967 "    # Loop over the entries.\n"
16968 "    names = entries.keys()\n"
16969 "    for name in names:\n"
16970 "        # Calculate the entry's full path.\n"
16971 "        full_path = directory + '/' + name\n"
16972 "\n"
16973 "        # If the entry is a directory, recurse.  The recursion will return\n"
16974 "        # a list with the entry and all its children, which we will add to\n"
16975 "        # our running list of paths.\n"
16976 "        if svn.fs.svn_fs_is_dir(root, full_path):\n"
16977 "            crawl_filesystem_dir(root, full_path)\n"
16978 "        else:\n"
16979 "            # Else it's a file, so print its path here.\n"
16980 "            print full_path\n"
16981 "\n"
16982 "def crawl_youngest(repos_path):\n"
16983 "    \"\"\"Open the repository at REPOS_PATH, and recursively crawl its\n"
16984 "    youngest revision.\"\"\"\n"
16985 "    \n"
16986 "    # Open the repository at REPOS_PATH, and get a reference to its\n"
16987 "    # versioning filesystem.\n"
16988 "    repos_obj = svn.repos.svn_repos_open(repos_path)\n"
16989 "    fs_obj = svn.repos.svn_repos_fs(repos_obj)\n"
16990 "\n"
16991 "    # Query the current youngest revision.\n"
16992 "    youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj)\n"
16993 "    \n"
16994 "    # Open a root object representing the youngest (HEAD) revision.\n"
16995 "    root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev)\n"
16996 "\n"
16997 "    # Do the recursive crawl.\n"
16998 "    crawl_filesystem_dir(root_obj, \"\")\n"
16999 "    \n"
17000 "if __name__ == \"__main__\":\n"
17001 "    # Check for sane usage.\n"
17002 "    if len(sys.argv) != 2:\n"
17003 "        sys.stderr.write(\"Usage: %s REPOS_PATH\\n\"\n"
17004 "                         % (os.path.basename(sys.argv[0])))\n"
17005 "        sys.exit(1)\n"
17006 "\n"
17007 "    # Canonicalize the repository path.\n"
17008 "    repos_path = svn.core.svn_path_canonicalize(sys.argv[1])\n"
17009 "\n"
17010 "    # Do the real work.\n"
17011 "    crawl_youngest(repos_path)\n"
17012 msgstr ""
17013 "\n"
17014 "#!/usr/bin/python\n"
17015 "\n"
17016 "\"\"\"Crawl a repository, printing versioned object path names.\"\"\"\n"
17017 "\n"
17018 "import sys\n"
17019 "import os.path\n"
17020 "import svn.fs, svn.core, svn.repos\n"
17021 "\n"
17022 "def crawl_filesystem_dir(root, directory):\n"
17023 "    \"\"\"Recursively crawl DIRECTORY under ROOT in the filesystem, and return\n"
17024 "    a list of all the paths at or below DIRECTORY.\"\"\"\n"
17025 "\n"
17026 "    # Print the name of this path.\n"
17027 "    print directory + \"/\"\n"
17028 "    \n"
17029 "    # Get the directory entries for DIRECTORY.\n"
17030 "    entries = svn.fs.svn_fs_dir_entries(root, directory)\n"
17031 "\n"
17032 "    # Loop over the entries.\n"
17033 "    names = entries.keys()\n"
17034 "    for name in names:\n"
17035 "        # Calculate the entry's full path.\n"
17036 "        full_path = directory + '/' + name\n"
17037 "\n"
17038 "        # If the entry is a directory, recurse.  The recursion will return\n"
17039 "        # a list with the entry and all its children, which we will add to\n"
17040 "        # our running list of paths.\n"
17041 "        if svn.fs.svn_fs_is_dir(root, full_path):\n"
17042 "            crawl_filesystem_dir(root, full_path)\n"
17043 "        else:\n"
17044 "            # Else it's a file, so print its path here.\n"
17045 "            print full_path\n"
17046 "\n"
17047 "def crawl_youngest(repos_path):\n"
17048 "    \"\"\"Open the repository at REPOS_PATH, and recursively crawl its\n"
17049 "    youngest revision.\"\"\"\n"
17050 "    \n"
17051 "    # Open the repository at REPOS_PATH, and get a reference to its\n"
17052 "    # versioning filesystem.\n"
17053 "    repos_obj = svn.repos.svn_repos_open(repos_path)\n"
17054 "    fs_obj = svn.repos.svn_repos_fs(repos_obj)\n"
17055 "\n"
17056 "    # Query the current youngest revision.\n"
17057 "    youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj)\n"
17058 "    \n"
17059 "    # Open a root object representing the youngest (HEAD) revision.\n"
17060 "    root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev)\n"
17061 "\n"
17062 "    # Do the recursive crawl.\n"
17063 "    crawl_filesystem_dir(root_obj, \"\")\n"
17064 "    \n"
17065 "if __name__ == \"__main__\":\n"
17066 "    # Check for sane usage.\n"
17067 "    if len(sys.argv) != 2:\n"
17068 "        sys.stderr.write(\"Usage: %s REPOS_PATH\\n\"\n"
17069 "                         % (os.path.basename(sys.argv[0])))\n"
17070 "        sys.exit(1)\n"
17071 "\n"
17072 "    # Canonicalize the repository path.\n"
17073 "    repos_path = svn.core.svn_path_canonicalize(sys.argv[1])\n"
17074 "\n"
17075 "    # Do the real work.\n"
17076 "    crawl_youngest(repos_path)\n"
17078 #. (para)
17079 #: ../source/book.xml:16782
17080 msgid "This same program in C would need to deal with APR's memory pool system. But Python handles memory usage automatically, and Subversion's Python bindings adhere to that convention. In C, you'd be working with custom datatypes (such as those provided by the APR library) for representing the hash of entries and the list of paths, but Python has hashes (called <quote>dictionaries</quote>) and lists as built-in datatypes, and provides a rich collection of functions for operating on those types. So SWIG (with the help of some customizations in Subversion's language bindings layer) takes care of mapping those custom datatypes into the native datatypes of the target language. This provides a more intuitive interface for users of that language."
17081 msgstr "同样的C程序需要处理APR内存池系统,但是Python自己处理内存,Subversion的Python绑定也遵循这种习惯。在C语言中,为表示路径和条目的hash需要处理自定义的数据类型(例如APR提供的库),但是Python有hash(叫做<quote>dictionaries</quote>),并且是内置数据类型,而且还提供了一系列操作这些类型的函数,所以SWIG(通过Subversion的语言绑定层的自定义帮助)要小心的将这些自定义数据类型映射到目标语言的数据类型,这为目标语言的用户提供了一个更加直观的接口。"
17083 #. (para)
17084 #: ../source/book.xml:16795
17085 #, fuzzy
17086 msgid "The Subversion Python bindings can be used for working copy operations, too. In the previous section of this chapter, we mentioned the <filename>libsvn_client</filename> interface, and how it exists for the sole purpose of simplifying the process of writing a Subversion client. <xref linkend=\"svn.developer.usingapi.otherlangs.ex-2\"/> is a brief example of how that library can be accessed via the SWIG Python bindings to recreate a scaled-down version of the <command>svn status</command> command."
17087 msgstr "Subversion的Python绑定也可以用来进行工作拷贝的操作,在本章前面的小节中,我们提到过<filename>libsvn_client</filename>接口,它存在的目的就是简化编写Subversion客户端的难度,<xref linkend=\"svn.developer.usingapi.otherlangs.ex-2\"/>是一个例子,讲的是如何使用SWIG绑定创建一个扩展版本的<command>svn status</command>命令。"
17089 #. (title)
17090 #: ../source/book.xml:16805
17091 msgid "A Python Status Crawler"
17092 msgstr "A Python Status Crawler"
17094 #. (programlisting)
17095 #: ../source/book.xml:16807
17096 #, no-wrap
17097 msgid ""
17098 "\n"
17099 "#!/usr/bin/env python\n"
17100 "\n"
17101 "\"\"\"Crawl a working copy directory, printing status information.\"\"\"\n"
17102 "\n"
17103 "import sys\n"
17104 "import os.path\n"
17105 "import getopt\n"
17106 "import svn.core, svn.client, svn.wc\n"
17107 "\n"
17108 "def generate_status_code(status):\n"
17109 "    \"\"\"Translate a status value into a single-character status code,\n"
17110 "    using the same logic as the Subversion command-line client.\"\"\"\n"
17111 "    code_map = { svn.wc.svn_wc_status_none        : ' ',\n"
17112 "                 svn.wc.svn_wc_status_normal      : ' ',\n"
17113 "                 svn.wc.svn_wc_status_added       : 'A',\n"
17114 "                 svn.wc.svn_wc_status_missing     : '!',\n"
17115 "                 svn.wc.svn_wc_status_incomplete  : '!',\n"
17116 "                 svn.wc.svn_wc_status_deleted     : 'D',\n"
17117 "                 svn.wc.svn_wc_status_replaced    : 'R',\n"
17118 "                 svn.wc.svn_wc_status_modified    : 'M',\n"
17119 "                 svn.wc.svn_wc_status_merged      : 'G',\n"
17120 "                 svn.wc.svn_wc_status_conflicted  : 'C',\n"
17121 "                 svn.wc.svn_wc_status_obstructed  : '~',\n"
17122 "                 svn.wc.svn_wc_status_ignored     : 'I',\n"
17123 "                 svn.wc.svn_wc_status_external    : 'X',\n"
17124 "                 svn.wc.svn_wc_status_unversioned : '?',\n"
17125 "               }\n"
17126 "    return code_map.get(status, '?')\n"
17127 "\n"
17128 "def do_status(wc_path, verbose):\n"
17129 "    # Calculate the length of the input working copy path.\n"
17130 "    wc_path_len = len(wc_path)\n"
17131 "\n"
17132 "    # Build a client context baton.\n"
17133 "    ctx = svn.client.svn_client_ctx_t()\n"
17134 "\n"
17135 "    def _status_callback(path, status, root_path_len=wc_path_len):\n"
17136 "        \"\"\"A callback function for svn_client_status.\"\"\"\n"
17137 "\n"
17138 "        # Print the path, minus the bit that overlaps with the root of\n"
17139 "        # the status crawl\n"
17140 "        text_status = generate_status_code(status.text_status)\n"
17141 "        prop_status = generate_status_code(status.prop_status)\n"
17142 "        print '%s%s  %s' % (text_status, prop_status, path[wc_path_len + 1:])\n"
17143 "        \n"
17144 "    # Do the status crawl, using _status_callback() as our callback function.\n"
17145 "    svn.client.svn_client_status(wc_path, None, _status_callback,\n"
17146 "                                 1, verbose, 0, 0, ctx)\n"
17147 "\n"
17148 "def usage_and_exit(errorcode):\n"
17149 "    \"\"\"Print usage message, and exit with ERRORCODE.\"\"\"\n"
17150 "    stream = errorcode and sys.stderr or sys.stdout\n"
17151 "    stream.write(\"\"\"Usage: %s OPTIONS WC-PATH\n"
17152 "Options:\n"
17153 "  --help, -h    : Show this usage message\n"
17154 "  --verbose, -v : Show all statuses, even uninteresting ones\n"
17155 "\"\"\" % (os.path.basename(sys.argv[0])))\n"
17156 "    sys.exit(errorcode)\n"
17157 "    \n"
17158 "if __name__ == '__main__':\n"
17159 "    # Parse command-line options.\n"
17160 "    try:\n"
17161 "        opts, args = getopt.getopt(sys.argv[1:], \"hv\", [\"help\", \"verbose\"])\n"
17162 "    except getopt.GetoptError:\n"
17163 "        usage_and_exit(1)\n"
17164 "    verbose = 0\n"
17165 "    for opt, arg in opts:\n"
17166 "        if opt in (\"-h\", \"--help\"):\n"
17167 "            usage_and_exit(0)\n"
17168 "        if opt in (\"-v\", \"--verbose\"):\n"
17169 "            verbose = 1\n"
17170 "    if len(args) != 1:\n"
17171 "        usage_and_exit(2)\n"
17172 "            \n"
17173 "    # Canonicalize the repository path.\n"
17174 "    wc_path = svn.core.svn_path_canonicalize(args[0])\n"
17175 "\n"
17176 "    # Do the real work.\n"
17177 "    try:\n"
17178 "        do_status(wc_path, verbose)\n"
17179 "    except svn.core.SubversionException, e:\n"
17180 "        sys.stderr.write(\"Error (%d): %s\\n\" % (e[1], e[0]))\n"
17181 "        sys.exit(1)\n"
17182 msgstr ""
17183 "\n"
17184 "#!/usr/bin/env python\n"
17185 "\n"
17186 "\"\"\"Crawl a working copy directory, printing status information.\"\"\"\n"
17187 "\n"
17188 "import sys\n"
17189 "import os.path\n"
17190 "import getopt\n"
17191 "import svn.core, svn.client, svn.wc\n"
17192 "\n"
17193 "def generate_status_code(status):\n"
17194 "    \"\"\"Translate a status value into a single-character status code,\n"
17195 "    using the same logic as the Subversion command-line client.\"\"\"\n"
17196 "    code_map = { svn.wc.svn_wc_status_none        : ' ',\n"
17197 "                 svn.wc.svn_wc_status_normal      : ' ',\n"
17198 "                 svn.wc.svn_wc_status_added       : 'A',\n"
17199 "                 svn.wc.svn_wc_status_missing     : '!',\n"
17200 "                 svn.wc.svn_wc_status_incomplete  : '!',\n"
17201 "                 svn.wc.svn_wc_status_deleted     : 'D',\n"
17202 "                 svn.wc.svn_wc_status_replaced    : 'R',\n"
17203 "                 svn.wc.svn_wc_status_modified    : 'M',\n"
17204 "                 svn.wc.svn_wc_status_merged      : 'G',\n"
17205 "                 svn.wc.svn_wc_status_conflicted  : 'C',\n"
17206 "                 svn.wc.svn_wc_status_obstructed  : '~',\n"
17207 "                 svn.wc.svn_wc_status_ignored     : 'I',\n"
17208 "                 svn.wc.svn_wc_status_external    : 'X',\n"
17209 "                 svn.wc.svn_wc_status_unversioned : '?',\n"
17210 "               }\n"
17211 "    return code_map.get(status, '?')\n"
17212 "\n"
17213 "def do_status(wc_path, verbose):\n"
17214 "    # Calculate the length of the input working copy path.\n"
17215 "    wc_path_len = len(wc_path)\n"
17216 "\n"
17217 "    # Build a client context baton.\n"
17218 "    ctx = svn.client.svn_client_ctx_t()\n"
17219 "\n"
17220 "    def _status_callback(path, status, root_path_len=wc_path_len):\n"
17221 "        \"\"\"A callback function for svn_client_status.\"\"\"\n"
17222 "\n"
17223 "        # Print the path, minus the bit that overlaps with the root of\n"
17224 "        # the status crawl\n"
17225 "        text_status = generate_status_code(status.text_status)\n"
17226 "        prop_status = generate_status_code(status.prop_status)\n"
17227 "        print '%s%s  %s' % (text_status, prop_status, path[wc_path_len + 1:])\n"
17228 "        \n"
17229 "    # Do the status crawl, using _status_callback() as our callback function.\n"
17230 "    svn.client.svn_client_status(wc_path, None, _status_callback,\n"
17231 "                                 1, verbose, 0, 0, ctx)\n"
17232 "\n"
17233 "def usage_and_exit(errorcode):\n"
17234 "    \"\"\"Print usage message, and exit with ERRORCODE.\"\"\"\n"
17235 "    stream = errorcode and sys.stderr or sys.stdout\n"
17236 "    stream.write(\"\"\"Usage: %s OPTIONS WC-PATH\n"
17237 "Options:\n"
17238 "  --help, -h    : Show this usage message\n"
17239 "  --verbose, -v : Show all statuses, even uninteresting ones\n"
17240 "\"\"\" % (os.path.basename(sys.argv[0])))\n"
17241 "    sys.exit(errorcode)\n"
17242 "    \n"
17243 "if __name__ == '__main__':\n"
17244 "    # Parse command-line options.\n"
17245 "    try:\n"
17246 "        opts, args = getopt.getopt(sys.argv[1:], \"hv\", [\"help\", \"verbose\"])\n"
17247 "    except getopt.GetoptError:\n"
17248 "        usage_and_exit(1)\n"
17249 "    verbose = 0\n"
17250 "    for opt, arg in opts:\n"
17251 "        if opt in (\"-h\", \"--help\"):\n"
17252 "            usage_and_exit(0)\n"
17253 "        if opt in (\"-v\", \"--verbose\"):\n"
17254 "            verbose = 1\n"
17255 "    if len(args) != 1:\n"
17256 "        usage_and_exit(2)\n"
17257 "            \n"
17258 "    # Canonicalize the repository path.\n"
17259 "    wc_path = svn.core.svn_path_canonicalize(args[0])\n"
17260 "\n"
17261 "    # Do the real work.\n"
17262 "    try:\n"
17263 "        do_status(wc_path, verbose)\n"
17264 "    except svn.core.SubversionException, e:\n"
17265 "        sys.stderr.write(\"Error (%d): %s\\n\" % (e[1], e[0]))\n"
17266 "        sys.exit(1)\n"
17268 #. (para)
17269 #: ../source/book.xml:16893
17270 #, fuzzy
17271 msgid "As was the case in <xref linkend=\"svn.developer.usingapi.otherlangs.ex-1\"/>, this program is pool-free and uses, for the most part, normal Python data types. The call to <function>svn_client_ctx_t()</function> is deceiving because the public Subversion API has no such function—this just happens to be a case where SWIG's automatic language generation bleeds through a little bit (the function is a sort of factory function for Python's version of the corresponding complex C structure). Also note that the path passed to this program (like the last one) gets run through <function>svn_path_canonicalize()</function>, because to <emphasis>not</emphasis> do so runs the risk of triggering the underlying Subversion C library's assertions about such things, which translate into rather immediate and unceremonious program abortion."
17272 msgstr "就像<xref linkend=\"svn.developer.usingapi.otherlangs.ex-1\"/>中的例子,这个程序是池自由的,而且最重要的是使用Python的数据类型。<function moreinfo=\"none\">svn_client_ctx_t()</function>是欺骗,因为Subversion的API没有这个方法—这仅仅是SWIG自动语言生成中的一点问题(这是对应复杂C结构的一种工厂方法)。也需要注意传递给程序的路径(象最后一个)是通过 <function moreinfo=\"none\">svn_path_canonicalize()</function>执行的,因为要防止触发Subversion底层C库的断言,也就是防止导致程序立刻随意退出。"
17274 #. (title)
17275 #: ../source/book.xml:16918
17276 msgid "Subversion Complete Reference"
17277 msgstr "Subversion 完全参考"
17279 #. (para)
17280 #: ../source/book.xml:16920
17281 #, fuzzy
17282 msgid "This chapter is intended to be a complete reference to using Subversion. This includes the command line client (<command>svn</command>) and all its subcommands, as well as the repository administration programs (<command>svnadmin</command> and <command>svnlook</command>) and their respective subcommands."
17283 msgstr "本章是使用Subversion的一个完全手册,包括了命令行客户端(<command>svn</command>)和它的所有子命令,也有版本库管理程序(<command>svnadmin</command>和<command>svnlook</command>)和它们各自的子命令。"
17285 #. (title)
17286 #: ../source/book.xml:16931
17287 #, fuzzy
17288 msgid "The Subversion Command Line Client: <command>svn</command>"
17289 msgstr "Subversion 命令行客户端:<command>svn</command>"
17291 #. (para)
17292 #: ../source/book.xml:16935
17293 #, fuzzy
17294 msgid "Yes, yes, you don't need a subcommand to use the <option>--version</option> option, but we'll get to that in just a minute."
17295 msgstr "是的,使用<option>--version</option>选项不需要子命令,几分钟后我们会到达那个部分。"
17297 #. (para)
17298 #: ../source/book.xml:16933
17299 #, fuzzy
17300 msgid "To use the command line client, you type <command>svn</command>, the subcommand you wish to use <placeholder-1/>, and any options or targets that you wish to operate on—there is no specific order that the subcommand and the options must appear in. For example, all of the following are valid ways to use <command>svn status</command>:"
17301 msgstr "为了使用命令行客户端,只需要输入<command>svn</command>和它的子命令<footnote><placeholder-1/></footnote>以及相关的选项或操作的对象—输入的子命令和选项没有特定的顺序,下面使用<command>svn status</command>的方式都是合法的:"
17303 #. (screen)
17304 #: ../source/book.xml:16942
17305 #, no-wrap
17306 msgid ""
17307 "\n"
17308 "$ svn -v status\n"
17309 "$ svn status -v \n"
17310 "$ svn status -v myfile\n"
17311 msgstr ""
17312 "\n"
17313 "$ svn -v status\n"
17314 "$ svn status -v \n"
17315 "$ svn status -v myfile\n"
17317 #. (para)
17318 #: ../source/book.xml:16947
17319 msgid "You can find many more examples of how to use most client commands in <xref linkend=\"svn.tour\"/> and commands for managing properties in <xref linkend=\"svn.advanced.props\"/>."
17320 msgstr "你可以在<xref linkend=\"svn.tour\"/>发现更多使用客户端命令的例子,以及<xref linkend=\"svn.advanced.props\"/>中的管理属性的命令。"
17322 #. (title)
17323 #: ../source/book.xml:16953
17324 #, fuzzy
17325 msgid "<command>svn</command> Options"
17326 msgstr "<command>svn</command> 选项"
17328 #. (para)
17329 #: ../source/book.xml:16955
17330 #, fuzzy
17331 msgid "While Subversion has different options for its subcommands, all options are global—that is, each option is guaranteed to mean the same thing regardless of the subcommand you use it with. For example, <option>--verbose</option> (<option>-v</option>) always means <quote>verbose output</quote>, regardless of the subcommand you use it with."
17332 msgstr "虽然Subversion的子命令有一些不同的选项,但有的选项是全局的—也就是说,每个选项保证是表示同样的事情,而不管是哪个子命令使用的。举个例子,<option>--verbose</option>(<option>-v</option>)一直意味着<quote>冗长输出</quote>,而不管使用它的命令是什么。"
17334 #. (option)
17335 #: ../source/book.xml:16965
17336 msgid "--auto-props"
17337 msgstr "--auto-props"
17339 #. (para)
17340 #: ../source/book.xml:16968
17341 #, fuzzy
17342 msgid "Enables auto-props, overriding the <literal>enable-auto-props</literal> directive in the <filename>config</filename> file."
17343 msgstr "开启auto-props,覆盖<filename>config</filename>文件中的<literal>enable-auto-props</literal>指示。"
17345 #. (term)
17346 #: ../source/book.xml:16974
17347 #, fuzzy
17348 msgid "<option>--change</option> (<option>-c</option>) <replaceable>ARG</replaceable>"
17349 msgstr "<option>--revision</option> (<option>-r</option>) <replaceable>ARG</replaceable>"
17351 #. (para)
17352 #: ../source/book.xml:16977
17353 msgid "Used as a means to refer to a specific <quote>change</quote> (aka a revision), this option is syntactic sugar for <quote>-r ARG-1:ARG</quote>."
17354 msgstr "作为引用特定<quote>修改</quote>(也叫做修订版本)的方法,这个选项是<quote>-r ARG-1:ARG</quote>语法上的甜头。"
17356 #. (option)
17357 #: ../source/book.xml:16984 ../source/book.xml:23152
17358 msgid "--config-dir"
17359 msgstr "--config-dir"
17361 #. (replaceable)
17362 #: ../source/book.xml:16985 ../source/book.xml:21349 ../source/book.xml:23153
17363 msgid "DIR"
17364 msgstr "DIR"
17366 #. (para)
17367 #: ../source/book.xml:16988 ../source/book.xml:23156
17368 #, fuzzy
17369 msgid "Instructs Subversion to read configuration information from the specified directory instead of the default location (<filename>.subversion</filename> in the user's home directory)."
17370 msgstr "指导Subversion从指定目录而不是默认位置(用户主目录的<filename>.subversion</filename>)读取配置信息。"
17372 #. (option)
17373 #: ../source/book.xml:16996
17374 msgid "--diff-cmd"
17375 msgstr "--diff-cmd"
17377 #. (replaceable)
17378 #: ../source/book.xml:16997 ../source/book.xml:17015 ../source/book.xml:17034
17379 msgid "CMD"
17380 msgstr "CMD"
17382 #. (para)
17383 #: ../source/book.xml:17000
17384 #, fuzzy
17385 msgid "Specifies an external program to use to show differences between files. When <command>svn diff</command> is invoked without this option, it uses Subversion's internal diff engine, which provides unified diffs by default. If you want to use an external diff program, use <option>--diff-cmd</option>. You can pass options to the diff program with the <option>--extensions</option> option (more on that later in this section)."
17386 msgstr "指定用来表示文件区别的外部程序,当<command>svn diff</command>调用时,会使用Subversion的内置区别引擎,默认会提供统一区别输出,如果你希望使用一个外置区别程序,使用<option>--diff-cmd</option>。你可以通过<option>--extensions</option>(本小节后面有更多介绍)把选项传递到区别程序。"
17388 #. (option)
17389 #: ../source/book.xml:17014
17390 msgid "--diff3-cmd"
17391 msgstr "--diff3-cmd"
17393 #. (para)
17394 #: ../source/book.xml:17018
17395 msgid "Specifies an external program to use to merge files."
17396 msgstr "指定一个外置程序用来合并文件。"
17398 #. (option)
17399 #: ../source/book.xml:17023
17400 msgid "--dry-run"
17401 msgstr "--dry-run"
17403 #. (para)
17404 #: ../source/book.xml:17026
17405 msgid "Goes through all the motions of running a command, but makes no actual changes—either on disk or in the repository."
17406 msgstr "检验运行一个命令的效果,但没有实际的修改—可以用在磁盘和版本库。"
17408 #. (option)
17409 #: ../source/book.xml:17033
17410 msgid "--editor-cmd"
17411 msgstr "--editor-cmd"
17413 #. (para)
17414 #: ../source/book.xml:17037
17415 #, fuzzy
17416 msgid "Specifies an external program to use to edit a log message or a property value. See the <literal>editor-cmd</literal> section in <xref linkend=\"svn.advanced.confarea.opts.config\"/> for ways to specify a default editor."
17417 msgstr "指定一个外部程序来编辑日志信息或是属性值。如何设定缺省编辑器见<xref linkend=\"svn.advanced.confarea.opts.config\"/>的<literal>editor-cmd</literal>小节。"
17419 #. (option)
17420 #: ../source/book.xml:17045
17421 msgid "--encoding"
17422 msgstr "--encoding"
17424 #. (replaceable)
17425 #: ../source/book.xml:17046
17426 msgid "ENC"
17427 msgstr "ENC"
17429 #. (para)
17430 #: ../source/book.xml:17049
17431 msgid "Tells Subversion that your commit message is encoded in the charset provided. The default is your operating system's native locale, and you should specify the encoding if your commit message is in any other encoding."
17432 msgstr "告诉Subversion你的提交日志信息是通过提供的字符集编码的,缺省时是你的操作系统的本地编码,如果你的提交信息使用其它编码,你一定要指定这个值。"
17434 #. (term)
17435 #: ../source/book.xml:17057
17436 msgid "<option>--extensions</option> (<option>-x</option>) <replaceable>ARGS</replaceable>"
17437 msgstr "<option>--extensions</option> (<option>-x</option>) <replaceable>ARGS</replaceable>"
17439 #. (para)
17440 #: ../source/book.xml:17060
17441 #, fuzzy
17442 msgid "Specifies an argument or arguments that Subversion should pass to an external diff command. This option is valid only when used with the <command>svn diff</command> or <command>svn merge</command> commands, with the <option>--diff-cmd</option> option. If you wish to pass multiple arguments, you must enclose all of them in quotes (for example, <command>svn diff --diff-cmd /usr/bin/diff -x \"-b -E\"</command>)."
17443 msgstr "指定一个或多个Subversion传递给提供文件区别的外部区别程序的参数,如果你要传递多个参数,你一定能够要用引号(例如,<command>svn diff --diff-cmd /usr/bin/diff -x \"-b -E\"</command>)括起所有的参数。这个选项<emphasis>只有</emphasis>在使用<option>--diff-cmd</option>选项时使用。"
17445 #. (term)
17446 #: ../source/book.xml:17073
17447 msgid "<option>--file</option> (<option>-F</option>) <replaceable>FILENAME</replaceable>"
17448 msgstr "<option>--file</option> (<option>-F</option>) <replaceable>FILENAME</replaceable>"
17450 #. (para)
17451 #: ../source/book.xml:17077
17452 msgid "Uses the contents of the named file for the specified subcommand, though different subcommands do different things with this content. For example, <command>svn commit</command> uses the content as a commit log, whereas <command>svn propset</command> uses it as a property value."
17453 msgstr "为特定子命令使用命名文件的的内容,尽管不同的子命令对这些内容做不同的事情。例如,<command>svn commit</command>使用内容作为提交日志,而<command>svn propset</command>使用它作为属性值。"
17455 #. (option)
17456 #: ../source/book.xml:17087
17457 msgid "--force"
17458 msgstr "--force"
17460 #. (para)
17461 #: ../source/book.xml:17090
17462 #, fuzzy
17463 msgid "Forces a particular command or operation to run. There are some operations that Subversion will prevent you from doing in normal usage, but you can pass the force option to tell Subversion <quote>I know what I'm doing as well as the possible repercussions of doing it, so let me at 'em</quote>. This option is the programmatic equivalent of doing your own electrical work with the power on—if you don't know what you're doing, you're likely to get a nasty shock."
17464 msgstr "强制一个特定的命令或操作运行。Subversion有一些操作防止你做普通的使用,但是你可以传递force选项告诉Subversion<quote>我知道我做的事情,也知道这样的结果,所以让我做吧</quote>。这个选项在程序上等同于在打开电源的情况下做你自己的电子工作—如果你不知道你在做什么,你很有可能会得到一个威胁的警告。"
17466 #. (option)
17467 #: ../source/book.xml:17103
17468 msgid "--force-log"
17469 msgstr "--force-log"
17471 #. (para)
17472 #: ../source/book.xml:17106
17473 msgid "Forces a suspicious parameter passed to the <option>--message</option> (<option>-m</option>) or <option>--file</option> (<option>-F</option>) options to be accepted as valid. By default, Subversion will produce an error if parameters to these options look like they might instead be targets of the subcommand. For example, if you pass a versioned file's path to the <option>--file</option> (<option>-F</option>) option, Subversion will assume you've made a mistake, that the path was instead intended as the target of the operation, and that you simply failed to provide some other—unversioned—file as the source of your log message. To assert your intent and override these types of errors, pass the <option>--force-log</option> option to subcommands that accept log messages."
17474 msgstr "将传递给<option>--message</option>(<option>-m</option>)或者<option>--file</option>(<option>-F</option>)的可疑参数指定为有效可接受。缺省情况下,如果选项的参数看起来会成为子命令的目标,Subversion会提出一个错误,例如,你传递一个版本化的文件路径给<option>--file</option>(<option>-F</option>)选项,Subversion会认为出了点错误,认为你将目标对象当成了参数,而你并没有提供其它的—未版本化的文件作为日志信息的文件。为了确认你的意图并且不考虑这类错误,传递<option>--force-log</option>选项给命令来接受它作为日志信息。"
17476 #. (term)
17477 #: ../source/book.xml:17124
17478 msgid "<option>--help</option> (<option>-h</option> or <option>-?</option>)"
17479 msgstr "<option>--help</option> (<option>-h</option>或<option>-?</option>)"
17481 #. (para)
17482 #: ../source/book.xml:17128
17483 msgid "If used with one or more subcommands, shows the built-in help text for each subcommand. If used alone, it displays the general client help text."
17484 msgstr "如果同一个或多个子命令一起使用,会显示每个子命令内置的帮助文本,如果单独使用,它会显示常规的客户端帮助文本。"
17486 #. (option)
17487 #: ../source/book.xml:17135
17488 msgid "--ignore-ancestry"
17489 msgstr "--ignore-ancestry"
17491 #. (para)
17492 #: ../source/book.xml:17138
17493 msgid "Tells Subversion to ignore ancestry when calculating differences (rely on path contents alone)."
17494 msgstr "告诉Subversion在计算区别(只依赖于路径内容)时忽略祖先。"
17496 #. (option)
17497 #: ../source/book.xml:17144
17498 msgid "--ignore-externals"
17499 msgstr "--ignore-externals"
17501 #. (para)
17502 #: ../source/book.xml:17147
17503 msgid "Tells Subversion to ignore external definitions and the external working copies managed by them."
17504 msgstr "告诉Subversion忽略外部定义和外部定义管理的工作拷贝。"
17506 #. (option)
17507 #: ../source/book.xml:17153 ../source/book.xml:21338
17508 msgid "--incremental"
17509 msgstr "--incremental"
17511 #. (para)
17512 #: ../source/book.xml:17156
17513 msgid "Prints output in a format suitable for concatenation."
17514 msgstr "打印适合串联的输出格式。"
17516 #. (option)
17517 #: ../source/book.xml:17162
17518 msgid "--limit"
17519 msgstr "--limit"
17521 #. (replaceable)
17522 #: ../source/book.xml:17163
17523 msgid "NUM"
17524 msgstr "NUM"
17526 #. (para)
17527 #: ../source/book.xml:17166
17528 msgid "Show only the first <replaceable>NUM</replaceable> log messages."
17529 msgstr "只显示第一个<replaceable>NUM</replaceable>日志信息。"
17531 #. (term)
17532 #: ../source/book.xml:17171
17533 msgid "<option>--message</option> (<option>-m</option>) <replaceable>MESSAGE</replaceable>"
17534 msgstr "<option>--message</option> (<option>-m</option>) <replaceable>MESSAGE</replaceable>"
17536 #. (para)
17537 #: ../source/book.xml:17175
17538 #, fuzzy
17539 msgid "Indicates that you will specify a either a log message or a lock comment on the command line, following this option. For example:"
17540 msgstr "表示你会在命令行中指定日志信息,紧跟这个开关,例如:"
17542 #. (screen)
17543 #: ../source/book.xml:17178
17544 #, no-wrap
17545 msgid ""
17546 "\n"
17547 "$ svn commit -m \"They don't make Sunday.\"\n"
17548 msgstr ""
17549 "\n"
17550 "$ svn commit -m \"They don't make Sunday.\"\n"
17552 #. (option)
17553 #: ../source/book.xml:17185
17554 msgid "--new"
17555 msgstr "--new"
17557 #. (replaceable)
17558 #: ../source/book.xml:17186 ../source/book.xml:17283
17559 msgid "ARG"
17560 msgstr "ARG"
17562 #. (para)
17563 #: ../source/book.xml:17189
17564 #, fuzzy
17565 msgid "Uses <replaceable>ARG</replaceable> as the newer target (for use with <command>svn diff</command>)."
17566 msgstr "使用<replaceable>ARG</replaceable>作为新的目标。"
17568 #. (option)
17569 #: ../source/book.xml:17195 ../source/book.xml:23164
17570 msgid "--no-auth-cache"
17571 msgstr "--no-auth-cache"
17573 #. (para)
17574 #: ../source/book.xml:17198 ../source/book.xml:23167
17575 msgid "Prevents caching of authentication information (e.g. username and password) in the Subversion administrative directories."
17576 msgstr "阻止在Subversion管理区缓存认证信息(如用户名密码)。"
17578 #. (option)
17579 #: ../source/book.xml:17205
17580 msgid "--no-auto-props"
17581 msgstr "--no-auto-props"
17583 #. (para)
17584 #: ../source/book.xml:17208
17585 #, fuzzy
17586 msgid "Disables auto-props, overriding the <literal>enable-auto-props</literal> directive in the <filename>config</filename> file."
17587 msgstr "关闭auto-props,覆盖<filename>config</filename>文件中的<literal>enable-auto-props</literal>指示。"
17589 #. (option)
17590 #: ../source/book.xml:17215 ../source/book.xml:22223
17591 msgid "--no-diff-deleted"
17592 msgstr "--no-diff-deleted"
17594 #. (para)
17595 #: ../source/book.xml:17218
17596 #, fuzzy
17597 msgid "Prevents Subversion from printing differences for deleted files. The default behavior when you remove a file is for <command>svn diff</command> to print the same differences that you would see if you had left the file but removed all the content."
17598 msgstr "防止Subversion打印删除文件的区别信息,缺省的行为方式是当你删除了一个文件后运行<command>svn diff</command>打印的区别与删除文件所有的内容得到的结果一样。"
17600 #. (option)
17601 #: ../source/book.xml:17227
17602 msgid "--no-ignore"
17603 msgstr "--no-ignore"
17605 #. (para)
17606 #: ../source/book.xml:17230
17607 #, fuzzy
17608 msgid "Shows files in the status listing that would normally be omitted since they match a pattern in the <literal>global-ignores</literal> configuration option or the <literal>svn:ignore</literal> property. See <xref linkend=\"svn.advanced.confarea.opts.config\"/> and <xref linkend=\"svn.advanced.props.special.ignore\"/> for more information."
17609 msgstr "在状态列表中显示<literal>global-ignores</literal>配置选项或者是<literal>svn:ignore</literal>属性忽略的文件。见<xref linkend=\"svn.advanced.confarea.opts.config\"/>和<xref linkend=\"svn.advanced.props.special.ignore\"/>查看详情。"
17611 #. (option)
17612 #: ../source/book.xml:17239
17613 msgid "--no-unlock"
17614 msgstr "--no-unlock"
17616 #. (para)
17617 #: ../source/book.xml:17242
17618 msgid "Don't automatically unlock files (the default commit behavior is to unlock all files listed as part of the commit). See <xref linkend=\"svn.advanced.locking\"/> for more information."
17619 msgstr "不自动解锁文件(缺省的提交行为是解锁提交列出的所有文件),更多信息见<xref linkend=\"svn.advanced.locking\"/>。"
17621 #. (option)
17622 #: ../source/book.xml:17250 ../source/book.xml:23174
17623 msgid "--non-interactive"
17624 msgstr "--non-interactive"
17626 #. (para)
17627 #: ../source/book.xml:17253 ../source/book.xml:23177
17628 msgid "In the case of an authentication failure, or insufficient credentials, prevents prompting for credentials (e.g. username or password). This is useful if you're running Subversion inside of an automated script and it's more appropriate to have Subversion fail than to prompt for more information."
17629 msgstr "如果认证失败,或者是不充分的凭证时,防止出现要求凭证的提示(例如用户名和密码)。这在运行自动脚本时非常有用,只是让Subversion失败而不是提示更多的信息。"
17631 #. (term)
17632 #: ../source/book.xml:17262
17633 msgid "<option>--non-recursive</option> (<option>-N</option>)"
17634 msgstr "<option>--non-recursive</option> (<option>-N</option>)"
17636 #. (para)
17637 #: ../source/book.xml:17264
17638 msgid "Stops a subcommand from recursing into subdirectories. Most subcommands recurse by default, but some subcommands—usually those that have the potential to remove or undo your local modifications—do not."
17639 msgstr "防止子命令迭代到子目录,大多数子命令缺省是迭代的,但是一些子命令—通常是那些潜在的删除或者是取消本地修改的命令—不是。"
17641 #. (option)
17642 #: ../source/book.xml:17273
17643 msgid "--notice-ancestry"
17644 msgstr "--notice-ancestry"
17646 #. (para)
17647 #: ../source/book.xml:17276
17648 msgid "Pay attention to ancestry when calculating differences."
17649 msgstr "在计算区别时关注祖先。"
17651 #. (option)
17652 #: ../source/book.xml:17282
17653 msgid "--old"
17654 msgstr "--old"
17656 #. (para)
17657 #: ../source/book.xml:17286
17658 #, fuzzy
17659 msgid "Uses <replaceable>ARG</replaceable> as the older target (for use with <command>svn diff</command>)."
17660 msgstr "使用<replaceable>ARG</replaceable>作为旧的目标。"
17662 #. (option)
17663 #: ../source/book.xml:17292 ../source/book.xml:23187
17664 msgid "--password"
17665 msgstr "--password"
17667 #. (replaceable)
17668 #: ../source/book.xml:17293 ../source/book.xml:23188
17669 msgid "PASS"
17670 msgstr "PASS"
17672 #. (para)
17673 #: ../source/book.xml:17296 ../source/book.xml:23191
17674 msgid "Indicates that you are providing your password for authentication on the command line—otherwise, if it is needed, Subversion will prompt you for it."
17675 msgstr "指出在命令行中提供你的密码—另外,如果它是需要的,Subversion会提示你输入。"
17677 #. (term)
17678 #: ../source/book.xml:17303
17679 msgid "<option>--quiet</option> (<option>-q</option>)"
17680 msgstr "<option>--quiet</option> (<option>-q</option>)"
17682 #. (para)
17683 #: ../source/book.xml:17305
17684 msgid "Requests that the client print only essential information while performing an operation."
17685 msgstr "请求客户端在执行操作时只显示重要信息。"
17687 #. (term)
17688 #: ../source/book.xml:17310
17689 msgid "<option>--recursive</option> (<option>-R</option>)"
17690 msgstr "<option>--recursive</option> (<option>-R</option>)"
17692 #. (para)
17693 #: ../source/book.xml:17312
17694 msgid "Makes a subcommand recurse into subdirectories. Most subcommands recurse by default."
17695 msgstr "让子命令迭代到子目录,大多数子命令缺省是迭代的。"
17697 #. (option)
17698 #: ../source/book.xml:17318
17699 msgid "--relocate"
17700 msgstr "--relocate"
17702 #. (replaceable)
17703 #: ../source/book.xml:17319
17704 msgid "FROM TO [PATH...]"
17705 msgstr "目的路径[PATH...]"
17707 #. (para)
17708 #: ../source/book.xml:17323
17709 #, fuzzy
17710 msgid "Used with the <command>svn switch</command> subcommand, changes the location of the repository that your working copy references. This is useful if the location of your repository changes and you have an existing working copy that you'd like to continue to use. See <command>svn switch</command> for an example."
17711 msgstr "<command>svn switch</command>子命令中使用,用来修改你的工作拷贝所引用的版本库位置。当版本库的位置修改了,而你有一个工作拷贝,希望继续使用时非常有用。见<command>svn switch</command>的例子。"
17713 #. (term)
17714 #: ../source/book.xml:17333
17715 msgid "<option>--revision</option> (<option>-r</option>) <replaceable>REV</replaceable>"
17716 msgstr "<option>--revision</option> (<option>-r</option>) <replaceable>REV</replaceable>"
17718 #. (para)
17719 #: ../source/book.xml:17337
17720 #, fuzzy
17721 msgid "Indicates that you're going to supply a revision (or range of revisions) for a particular operation. You can provide revision numbers, revision keywords or dates (in curly braces), as arguments to the revision option. If you wish to provide a range of revisions, you can provide two revisions separated by a colon. For example:"
17722 msgstr "指出你将为特定操作提供一个修订版本(或修订版本的范围),你可以提供修订版本号,修订版本关键字或日期(在华括号中)作为修订版本开关的参数。如果你希望提供一个修订版本范围,你可以提供用冒号隔开的两个修订版本,举个例子:"
17724 #. (screen)
17725 #: ../source/book.xml:17344
17726 #, no-wrap
17727 msgid ""
17728 "\n"
17729 "$ svn log -r 1729\n"
17730 "$ svn log -r 1729:HEAD\n"
17731 "$ svn log -r 1729:1744\n"
17732 "$ svn log -r {2001-12-04}:{2002-02-17}\n"
17733 "$ svn log -r 1729:{2002-02-17}\n"
17734 msgstr ""
17735 "\n"
17736 "$ svn log -r 1729\n"
17737 "$ svn log -r 1729:HEAD\n"
17738 "$ svn log -r 1729:1744\n"
17739 "$ svn log -r {2001-12-04}:{2002-02-17}\n"
17740 "$ svn log -r 1729:{2002-02-17}\n"
17742 #. (para)
17743 #: ../source/book.xml:17351
17744 msgid "See <xref linkend=\"svn.tour.revs.keywords\"/> for more information."
17745 msgstr "见<xref linkend=\"svn.tour.revs.keywords\"/>查看更多信息。"
17747 #. (option)
17748 #: ../source/book.xml:17357 ../source/book.xml:22255
17749 msgid "--revprop"
17750 msgstr "--revprop"
17752 #. (para)
17753 #: ../source/book.xml:17360 ../source/book.xml:22258
17754 #, fuzzy
17755 msgid "Operates on a revision property instead of a property specific to a file or directory. This option requires that you also pass a revision with the <option>--revision</option> (<option>-r</option>) option."
17756 msgstr "操作针对修订版本属性,而不是Subversion文件或目录的属性。这个选项需要你传递<option>--revision</option> (<option>-r</option>)参数。"
17758 #. (term)
17759 #: ../source/book.xml:17368
17760 msgid "<option>--show-updates</option> (<option>-u</option>)"
17761 msgstr "<option>--show-updates</option> (<option>-u</option>)"
17763 #. (para)
17764 #: ../source/book.xml:17370
17765 #, fuzzy
17766 msgid "Causes the client to display information about which files in your working copy are out-of-date. This doesn't actually update any of your files—it just shows you which files will be updated if you run <command>svn update</command>."
17767 msgstr "导致客户端显示本地拷贝哪些文件已经过期,这不会实际更新你的任何文件—只是显示了如果你运行<command>svn update</command>时更新的文件。"
17769 #. (option)
17770 #: ../source/book.xml:17380
17771 msgid "--stop-on-copy"
17772 msgstr "--stop-on-copy"
17774 #. (para)
17775 #: ../source/book.xml:17383
17776 msgid "Causes a Subversion subcommand which is traversing the history of a versioned resource to stop harvesting that historical information when a copy—that is, a location in history where that resource was copied from another location in the repository—is encountered."
17777 msgstr "导致Subversion子命令在传递历史时会在版本化资源拷贝时停止收集历史信息—也就是历史中资源从另一个位置拷贝过来时。"
17779 #. (option)
17780 #: ../source/book.xml:17393
17781 msgid "--strict"
17782 msgstr "--strict"
17784 #. (para)
17785 #: ../source/book.xml:17396
17786 #, fuzzy
17787 msgid "Causes Subversion to use strict semantics, a notion which is rather vague unless talking about specific subcommands (namely, <command>svn propget</command>)."
17788 msgstr "导致Subversion使用严格的语法,也就是选择含糊,除非谈论特定的子命令。"
17790 #. (option)
17791 #: ../source/book.xml:17403
17792 msgid "--targets"
17793 msgstr "--targets"
17795 #. (replaceable)
17796 #: ../source/book.xml:17404
17797 msgid "FILENAME"
17798 msgstr "FILENAME"
17800 #. (para)
17801 #: ../source/book.xml:17407
17802 msgid "Tells Subversion to get the list of files that you wish to operate on from the filename you provide instead of listing all the files on the command line."
17803 msgstr "告诉Subversion从你提供的文件中得到希望操作的文件列表,而不是在命令行列出所有的文件。"
17805 #. (option)
17806 #: ../source/book.xml:17415 ../source/book.xml:23199
17807 msgid "--username"
17808 msgstr "--username"
17810 #. (replaceable)
17811 #: ../source/book.xml:17416 ../source/book.xml:23200
17812 msgid "NAME"
17813 msgstr "NAME"
17815 #. (para)
17816 #: ../source/book.xml:17419 ../source/book.xml:23203
17817 msgid "Indicates that you are providing your username for authentication on the command line—otherwise, if it is needed, Subversion will prompt you for it."
17818 msgstr "表示你要在命令行提供认证的用户名—否则如果需要,Subversion会提示你这一点。"
17820 #. (term)
17821 #: ../source/book.xml:17426
17822 msgid "<option>--verbose</option> (<option>-v</option>)"
17823 msgstr "<option>--verbose</option> (<option>-v</option>)"
17825 #. (para)
17826 #: ../source/book.xml:17428
17827 msgid "Requests that the client print out as much information as it can while running any subcommand. This may result in Subversion printing out additional fields, detailed information about every file, or additional information regarding its actions."
17828 msgstr "请求客户端在运行子命令打印尽量多的信息,会导致Subversion打印额外的字段,每个文件的细节信息或者是关于动作的附加信息。"
17830 #. (option)
17831 #: ../source/book.xml:17437 ../source/book.xml:23519 ../source/book.xml:23666
17832 msgid "--version"
17833 msgstr "--version"
17835 #. (para)
17836 #: ../source/book.xml:17440
17837 msgid "Prints the client version info. This information not only includes the version number of the client, but also a listing of all repository access modules that the client can use to access a Subversion repository. With <option>--quiet</option> (<option>-q</option>) it prints only the version number in a compact form."
17838 msgstr "打印客户端版本信息,这个信息不仅仅包括客户端的版本号,也有所有客户端可以用来访问Subversion版本库的版本库访问模块列表。"
17840 #. (option)
17841 #: ../source/book.xml:17451
17842 msgid "--xml"
17843 msgstr "--xml"
17845 #. (para)
17846 #: ../source/book.xml:17454
17847 msgid "Prints output in XML format."
17848 msgstr "使用XML格式打印输出。"
17850 #. (title)
17851 #: ../source/book.xml:17462
17852 #, fuzzy
17853 msgid "<command>svn</command> Subcommands"
17854 msgstr "<command>svn</command> 子命令"
17856 #. (para)
17857 #: ../source/book.xml:17464 ../source/book.xml:23216
17858 msgid "Here are the various subcommands:"
17859 msgstr "下面是一些子命令:"
17861 #. (secondary)
17862 #: ../source/book.xml:17468 ../source/book.xml:17571 ../source/book.xml:17675
17863 #: ../source/book.xml:17760 ../source/book.xml:17891 ../source/book.xml:17967
17864 #: ../source/book.xml:18095 ../source/book.xml:18274 ../source/book.xml:18384
17865 #: ../source/book.xml:18637 ../source/book.xml:18749 ../source/book.xml:18802
17866 #: ../source/book.xml:18906 ../source/book.xml:19107 ../source/book.xml:19225
17867 #: ../source/book.xml:19319 ../source/book.xml:19543 ../source/book.xml:19665
17868 #: ../source/book.xml:19750 ../source/book.xml:19870 ../source/book.xml:19949
17869 #: ../source/book.xml:20028 ../source/book.xml:20109 ../source/book.xml:20197
17870 #: ../source/book.xml:20322 ../source/book.xml:20411 ../source/book.xml:20517
17871 #: ../source/book.xml:20862 ../source/book.xml:21024 ../source/book.xml:21111
17872 #: ../source/book.xml:21405 ../source/book.xml:21473 ../source/book.xml:21512
17873 #: ../source/book.xml:21615 ../source/book.xml:21648 ../source/book.xml:21694
17874 #: ../source/book.xml:21726 ../source/book.xml:21772 ../source/book.xml:21835
17875 #: ../source/book.xml:21881 ../source/book.xml:21919 ../source/book.xml:21996
17876 #: ../source/book.xml:22040 ../source/book.xml:22088 ../source/book.xml:22145
17877 #: ../source/book.xml:22292 ../source/book.xml:22336 ../source/book.xml:22391
17878 #: ../source/book.xml:22481 ../source/book.xml:22525 ../source/book.xml:22594
17879 #: ../source/book.xml:22639 ../source/book.xml:22671 ../source/book.xml:22734
17880 #: ../source/book.xml:22782 ../source/book.xml:22831 ../source/book.xml:22875
17881 #: ../source/book.xml:22928 ../source/book.xml:22990 ../source/book.xml:23043
17882 #: ../source/book.xml:23081 ../source/book.xml:23220 ../source/book.xml:23286
17883 #: ../source/book.xml:23357
17884 msgid "subcommands"
17885 msgstr "子命令"
17887 #. (tertiary)
17888 #: ../source/book.xml:17469
17889 msgid "add"
17890 msgstr "add"
17892 #. (refpurpose)
17893 #: ../source/book.xml:17473
17894 msgid "Add files, directories, or symbolic links."
17895 msgstr "添加文件、目录或符号链。"
17897 #. (title)
17898 #: ../source/book.xml:17477 ../source/book.xml:17581 ../source/book.xml:17685
17899 #: ../source/book.xml:17769 ../source/book.xml:17900 ../source/book.xml:17976
17900 #: ../source/book.xml:18105 ../source/book.xml:18284 ../source/book.xml:18393
17901 #: ../source/book.xml:18646 ../source/book.xml:18758 ../source/book.xml:18812
17902 #: ../source/book.xml:18916 ../source/book.xml:19116 ../source/book.xml:19236
17903 #: ../source/book.xml:19328 ../source/book.xml:19553 ../source/book.xml:19674
17904 #: ../source/book.xml:19759 ../source/book.xml:19879 ../source/book.xml:19959
17905 #: ../source/book.xml:20037 ../source/book.xml:20118 ../source/book.xml:20206
17906 #: ../source/book.xml:20332 ../source/book.xml:20420 ../source/book.xml:20526
17907 #: ../source/book.xml:20871 ../source/book.xml:21033 ../source/book.xml:21120
17908 #: ../source/book.xml:21414 ../source/book.xml:21482 ../source/book.xml:21521
17909 #: ../source/book.xml:21624 ../source/book.xml:21657 ../source/book.xml:21706
17910 #: ../source/book.xml:21737 ../source/book.xml:21783 ../source/book.xml:21844
17911 #: ../source/book.xml:21890 ../source/book.xml:21932 ../source/book.xml:22006
17912 #: ../source/book.xml:22049 ../source/book.xml:22097 ../source/book.xml:22154
17913 #: ../source/book.xml:22301 ../source/book.xml:22345 ../source/book.xml:22400
17914 #: ../source/book.xml:22490 ../source/book.xml:22534 ../source/book.xml:22603
17915 #: ../source/book.xml:22648 ../source/book.xml:22682 ../source/book.xml:22744
17916 #: ../source/book.xml:22792 ../source/book.xml:22841 ../source/book.xml:22885
17917 #: ../source/book.xml:22938 ../source/book.xml:22999 ../source/book.xml:23053
17918 #: ../source/book.xml:23090 ../source/book.xml:23231 ../source/book.xml:23296
17919 #: ../source/book.xml:23367 ../source/book.xml:23611
17920 msgid "Synopsis"
17921 msgstr "概要"
17923 #. (programlisting)
17924 #: ../source/book.xml:17479
17925 #, no-wrap
17926 msgid "svn add PATH..."
17927 msgstr "svn add PATH..."
17929 #. (title), (entry)
17930 #: ../source/book.xml:17483 ../source/book.xml:17587 ../source/book.xml:17691
17931 #: ../source/book.xml:17775 ../source/book.xml:17906 ../source/book.xml:17982
17932 #: ../source/book.xml:18111 ../source/book.xml:18291 ../source/book.xml:18401
17933 #: ../source/book.xml:18653 ../source/book.xml:18764 ../source/book.xml:18818
17934 #: ../source/book.xml:18922 ../source/book.xml:19122 ../source/book.xml:19242
17935 #: ../source/book.xml:19336 ../source/book.xml:19561 ../source/book.xml:19681
17936 #: ../source/book.xml:19765 ../source/book.xml:19886 ../source/book.xml:19966
17937 #: ../source/book.xml:20044 ../source/book.xml:20125 ../source/book.xml:20213
17938 #: ../source/book.xml:20338 ../source/book.xml:20426 ../source/book.xml:20532
17939 #: ../source/book.xml:20878 ../source/book.xml:21039 ../source/book.xml:21126
17940 #: ../source/book.xml:21420 ../source/book.xml:21488 ../source/book.xml:21527
17941 #: ../source/book.xml:21630 ../source/book.xml:21663 ../source/book.xml:21712
17942 #: ../source/book.xml:21743 ../source/book.xml:21789 ../source/book.xml:21850
17943 #: ../source/book.xml:21896 ../source/book.xml:21938 ../source/book.xml:22012
17944 #: ../source/book.xml:22055 ../source/book.xml:22103 ../source/book.xml:22160
17945 #: ../source/book.xml:22307 ../source/book.xml:22351 ../source/book.xml:22406
17946 #: ../source/book.xml:22496 ../source/book.xml:22540 ../source/book.xml:22609
17947 #: ../source/book.xml:22654 ../source/book.xml:22688 ../source/book.xml:22750
17948 #: ../source/book.xml:22798 ../source/book.xml:22847 ../source/book.xml:22891
17949 #: ../source/book.xml:22944 ../source/book.xml:23005 ../source/book.xml:23059
17950 #: ../source/book.xml:23096 ../source/book.xml:23237 ../source/book.xml:23302
17951 #: ../source/book.xml:23373 ../source/book.xml:23617 ../source/book.xml:23747
17952 #: ../source/book.xml:24046 ../source/book.xml:24093 ../source/book.xml:24142
17953 #: ../source/book.xml:24189 ../source/book.xml:24252 ../source/book.xml:24313
17954 #: ../source/book.xml:24364 ../source/book.xml:24410 ../source/book.xml:24463
17955 #: ../source/book.xml:25476
17956 msgid "Description"
17957 msgstr "描述"
17959 #. (para)
17960 #: ../source/book.xml:17485
17961 #, fuzzy
17962 msgid "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. If you add something and change your mind before committing, you can unschedule the addition using <command>svn revert</command>."
17963 msgstr "添加文件、目录或符号链到你的工作拷贝并且预定添加到版本库。它们会在下次提交上传并添加到版本库,如果你在提交之前改变了主意,你可以使用<command>svn revert</command>取消预定。"
17965 #. (title)
17966 #: ../source/book.xml:17495 ../source/book.xml:17596 ../source/book.xml:17699
17967 #: ../source/book.xml:17787 ../source/book.xml:17924 ../source/book.xml:18007
17968 #: ../source/book.xml:18162 ../source/book.xml:18306 ../source/book.xml:18507
17969 #: ../source/book.xml:18672 ../source/book.xml:18771 ../source/book.xml:18830
17970 #: ../source/book.xml:19008 ../source/book.xml:19163 ../source/book.xml:19253
17971 #: ../source/book.xml:19365 ../source/book.xml:19595 ../source/book.xml:19695
17972 #: ../source/book.xml:19801 ../source/book.xml:19897 ../source/book.xml:19977
17973 #: ../source/book.xml:20055 ../source/book.xml:20136 ../source/book.xml:20231
17974 #: ../source/book.xml:20351 ../source/book.xml:20439 ../source/book.xml:20775
17975 #: ../source/book.xml:20898 ../source/book.xml:21051 ../source/book.xml:21178
17976 #: ../source/book.xml:21640 ../source/book.xml:22663 ../source/book.xml:22898
17977 #: ../source/book.xml:22951 ../source/book.xml:23255 ../source/book.xml:23316
17978 #: ../source/book.xml:23386
17979 msgid "Alternate Names"
17980 msgstr "别名"
17982 #. (para)
17983 #: ../source/book.xml:17497 ../source/book.xml:17701 ../source/book.xml:17926
17984 #: ../source/book.xml:18674 ../source/book.xml:18832 ../source/book.xml:19010
17985 #: ../source/book.xml:19255 ../source/book.xml:19367 ../source/book.xml:19597
17986 #: ../source/book.xml:19697 ../source/book.xml:20353 ../source/book.xml:20441
17987 #: ../source/book.xml:21053 ../source/book.xml:21858 ../source/book.xml:22020
17988 #: ../source/book.xml:22809 ../source/book.xml:23257
17989 msgid "None"
17990 msgstr "无"
17992 #. (title)
17993 #: ../source/book.xml:17501 ../source/book.xml:17602 ../source/book.xml:17705
17994 #: ../source/book.xml:17793 ../source/book.xml:17930 ../source/book.xml:18015
17995 #: ../source/book.xml:18168 ../source/book.xml:18312 ../source/book.xml:18513
17996 #: ../source/book.xml:18678 ../source/book.xml:18780 ../source/book.xml:18836
17997 #: ../source/book.xml:19014 ../source/book.xml:19169 ../source/book.xml:19259
17998 #: ../source/book.xml:19371 ../source/book.xml:19601 ../source/book.xml:19701
17999 #: ../source/book.xml:19807 ../source/book.xml:19903 ../source/book.xml:19983
18000 #: ../source/book.xml:20061 ../source/book.xml:20142 ../source/book.xml:20237
18001 #: ../source/book.xml:20357 ../source/book.xml:20445 ../source/book.xml:20781
18002 #: ../source/book.xml:20904 ../source/book.xml:21057 ../source/book.xml:21184
18003 msgid "Changes"
18004 msgstr "改变"
18006 #. (para)
18007 #: ../source/book.xml:17503
18008 msgid "Working Copy"
18009 msgstr "工作拷贝"
18011 #. (title)
18012 #: ../source/book.xml:17507 ../source/book.xml:17608 ../source/book.xml:17711
18013 #: ../source/book.xml:17799 ../source/book.xml:17936 ../source/book.xml:18021
18014 #: ../source/book.xml:18175 ../source/book.xml:18319 ../source/book.xml:18519
18015 #: ../source/book.xml:18684 ../source/book.xml:18786 ../source/book.xml:18842
18016 #: ../source/book.xml:19020 ../source/book.xml:19175 ../source/book.xml:19265
18017 #: ../source/book.xml:19377 ../source/book.xml:19607 ../source/book.xml:19707
18018 #: ../source/book.xml:19813 ../source/book.xml:19909 ../source/book.xml:19989
18019 #: ../source/book.xml:20067 ../source/book.xml:20148 ../source/book.xml:20243
18020 #: ../source/book.xml:20363 ../source/book.xml:20451 ../source/book.xml:20787
18021 #: ../source/book.xml:20910 ../source/book.xml:21063 ../source/book.xml:21190
18022 msgid "Accesses Repository"
18023 msgstr "是否访问版本库"
18025 #. (para)
18026 #: ../source/book.xml:17509 ../source/book.xml:17938 ../source/book.xml:18788
18027 #: ../source/book.xml:20365 ../source/book.xml:20453
18028 msgid "No"
18029 msgstr "否"
18031 #. (title)
18032 #: ../source/book.xml:17513 ../source/book.xml:17614 ../source/book.xml:17717
18033 #: ../source/book.xml:17805 ../source/book.xml:17942 ../source/book.xml:18027
18034 #: ../source/book.xml:18182 ../source/book.xml:18325 ../source/book.xml:18526
18035 #: ../source/book.xml:18690 ../source/book.xml:18792 ../source/book.xml:18848
18036 #: ../source/book.xml:19026 ../source/book.xml:19181 ../source/book.xml:19271
18037 #: ../source/book.xml:19383 ../source/book.xml:19613 ../source/book.xml:19713
18038 #: ../source/book.xml:19819 ../source/book.xml:19915 ../source/book.xml:19995
18039 #: ../source/book.xml:20073 ../source/book.xml:20154 ../source/book.xml:20249
18040 #: ../source/book.xml:20369 ../source/book.xml:20457 ../source/book.xml:20793
18041 #: ../source/book.xml:20916 ../source/book.xml:21069 ../source/book.xml:21196
18042 #: ../source/book.xml:21443 ../source/book.xml:21501 ../source/book.xml:21576
18043 #: ../source/book.xml:21677 ../source/book.xml:21797 ../source/book.xml:21856
18044 #: ../source/book.xml:21945 ../source/book.xml:22018 ../source/book.xml:22062
18045 #: ../source/book.xml:22122 ../source/book.xml:22314 ../source/book.xml:22357
18046 #: ../source/book.xml:22450 ../source/book.xml:22503 ../source/book.xml:22547
18047 #: ../source/book.xml:22617 ../source/book.xml:22696 ../source/book.xml:22757
18048 #: ../source/book.xml:22807 ../source/book.xml:22853 ../source/book.xml:22904
18049 #: ../source/book.xml:22957 ../source/book.xml:23014 ../source/book.xml:23261
18050 #: ../source/book.xml:23322 ../source/book.xml:23392 ../source/book.xml:23639
18051 msgid "Options"
18052 msgstr "选项"
18054 #. (screen)
18055 #: ../source/book.xml:17515
18056 #, fuzzy, no-wrap
18057 msgid ""
18058 "\n"
18059 "--targets FILENAME\n"
18060 "--non-recursive (-N)\n"
18061 "--quiet (-q)\n"
18062 "--config-dir DIR\n"
18063 "--no-ignore\n"
18064 "--auto-props\n"
18065 "--no-auto-props\n"
18066 "--force\n"
18067 msgstr ""
18068 "\n"
18069 "--targets FILENAME\n"
18070 "--non-recursive (-N)\n"
18071 "--quiet (-q)\n"
18072 "--config-dir DIR\n"
18073 "--auto-props\n"
18074 "--no-auto-props\n"
18075 "--force\n"
18077 #. (title)
18078 #: ../source/book.xml:17528 ../source/book.xml:17654 ../source/book.xml:17730
18079 #: ../source/book.xml:17821 ../source/book.xml:17951 ../source/book.xml:18047
18080 #: ../source/book.xml:18201 ../source/book.xml:18345 ../source/book.xml:18550
18081 #: ../source/book.xml:18708 ../source/book.xml:18870 ../source/book.xml:19043
18082 #: ../source/book.xml:19198 ../source/book.xml:19289 ../source/book.xml:19403
18083 #: ../source/book.xml:19634 ../source/book.xml:19731 ../source/book.xml:19839
18084 #: ../source/book.xml:19931 ../source/book.xml:20011 ../source/book.xml:20089
18085 #: ../source/book.xml:20171 ../source/book.xml:20269 ../source/book.xml:20380
18086 #: ../source/book.xml:20468 ../source/book.xml:20811 ../source/book.xml:20933
18087 #: ../source/book.xml:21083 ../source/book.xml:21215 ../source/book.xml:21454
18088 #: ../source/book.xml:21587 ../source/book.xml:21755 ../source/book.xml:21905
18089 #: ../source/book.xml:21953 ../source/book.xml:22070 ../source/book.xml:22131
18090 #: ../source/book.xml:22176 ../source/book.xml:22323 ../source/book.xml:22366
18091 #: ../source/book.xml:22459 ../source/book.xml:22512 ../source/book.xml:22558
18092 #: ../source/book.xml:22626 ../source/book.xml:22705 ../source/book.xml:22766
18093 #: ../source/book.xml:22813 ../source/book.xml:22862 ../source/book.xml:22914
18094 #: ../source/book.xml:22968 ../source/book.xml:23024 ../source/book.xml:23070
18095 #: ../source/book.xml:23102 ../source/book.xml:23273 ../source/book.xml:23334
18096 #: ../source/book.xml:23404 ../source/book.xml:23677
18097 msgid "Examples"
18098 msgstr "例子"
18100 #. (para)
18101 #: ../source/book.xml:17530
18102 msgid "To add a file to your working copy:"
18103 msgstr "添加一个文件到工作拷贝:"
18105 #. (screen)
18106 #: ../source/book.xml:17531
18107 #, no-wrap
18108 msgid ""
18109 "\n"
18110 "$ svn add foo.c \n"
18111 "A         foo.c\n"
18112 msgstr ""
18113 "\n"
18114 "$ svn add foo.c \n"
18115 "A         foo.c\n"
18117 #. (para)
18118 #: ../source/book.xml:17535
18119 #, fuzzy
18120 msgid "When adding a directory, the default behavior of <command>svn add</command> is to recurse:"
18121 msgstr "当添加一个目录,<command>svn add</command>缺省的行为方式是递归的:"
18123 #. (screen)
18124 #: ../source/book.xml:17537
18125 #, no-wrap
18126 msgid ""
18127 "\n"
18128 "$ svn add testdir\n"
18129 "A         testdir\n"
18130 "A         testdir/a\n"
18131 "A         testdir/b\n"
18132 "A         testdir/c\n"
18133 "A         testdir/d\n"
18134 msgstr ""
18135 "\n"
18136 "$ svn add testdir\n"
18137 "A         testdir\n"
18138 "A         testdir/a\n"
18139 "A         testdir/b\n"
18140 "A         testdir/c\n"
18141 "A         testdir/d\n"
18143 #. (para)
18144 #: ../source/book.xml:17545
18145 msgid "You can add a directory without adding its contents:"
18146 msgstr "你可以只添加一个目录而不包括其内容:"
18148 #. (screen)
18149 #: ../source/book.xml:17547
18150 #, no-wrap
18151 msgid ""
18152 "\n"
18153 "$ svn add --non-recursive otherdir\n"
18154 "A         otherdir\n"
18155 msgstr ""
18156 "\n"
18157 "$ svn add --non-recursive otherdir\n"
18158 "A         otherdir\n"
18160 #. (para)
18161 #: ../source/book.xml:17551
18162 #, fuzzy
18163 msgid "Normally, the command <command>svn add *</command> will skip over any directories that are already under version control. Sometimes, however, you may want to add every unversioned object in your working copy, including those hiding deeper down. Passing the <option>--force</option> option makes <command>svn add</command> recurse into versioned directories:"
18164 msgstr "通常情况下,命令<command>svn add *</command>会忽略所有已经在版本控制之下的目录,有时候,你会希望添加所有工作拷贝的未版本化文件,包括那些隐藏在深处的文件,可以使用<command>svn add</command>的<option>--force</option>递归到版本化的目录下:"
18166 #. (screen)
18167 #: ../source/book.xml:17559
18168 #, no-wrap
18169 msgid ""
18170 "\n"
18171 "$ svn add * --force\n"
18172 "A         foo.c\n"
18173 "A         somedir/bar.c\n"
18174 "A         otherdir/docs/baz.doc\n"
18175 "…\n"
18176 msgstr ""
18177 "\n"
18178 "$ svn add * --force\n"
18179 "A         foo.c\n"
18180 "A         somedir/bar.c\n"
18181 "A         otherdir/docs/baz.doc\n"
18182 "…\n"
18184 #. (tertiary)
18185 #: ../source/book.xml:17572
18186 msgid "blame"
18187 msgstr "blame"
18189 #. (refname)
18190 #: ../source/book.xml:17575
18191 msgid "svn blame"
18192 msgstr "svn blame"
18194 #. (refpurpose)
18195 #: ../source/book.xml:17576
18196 msgid "Show author and revision information in-line for the specified files or URLs."
18197 msgstr "显示特定文件和URL内嵌的作者和修订版本信息。"
18199 #. (programlisting)
18200 #: ../source/book.xml:17583
18201 #, no-wrap
18202 msgid "svn blame TARGET[@REV]..."
18203 msgstr "svn blame TARGET[@REV]..."
18205 #. (para)
18206 #: ../source/book.xml:17589
18207 msgid "Show author and revision information in-line 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."
18208 msgstr "显示特定文件和URL内嵌的作者和修订版本信息。每一行文本在开头都放了最后修改的作者(用户名)和修订版本号。"
18210 #. (para)
18211 #: ../source/book.xml:17598
18212 msgid "praise, annotate, ann"
18213 msgstr "praise、annotate、ann"
18215 #. (para)
18216 #: ../source/book.xml:17604 ../source/book.xml:17707 ../source/book.xml:18515
18217 #: ../source/book.xml:18782 ../source/book.xml:19016 ../source/book.xml:19171
18218 #: ../source/book.xml:19373 ../source/book.xml:20783
18219 msgid "Nothing"
18220 msgstr "无2"
18222 #. (para)
18223 #: ../source/book.xml:17610 ../source/book.xml:17713 ../source/book.xml:17801
18224 #: ../source/book.xml:18023 ../source/book.xml:18844 ../source/book.xml:19177
18225 #: ../source/book.xml:19267 ../source/book.xml:19379 ../source/book.xml:20912
18226 #: ../source/book.xml:21065 ../source/book.xml:21192
18227 msgid "Yes"
18228 msgstr "是"
18230 #. (screen)
18231 #: ../source/book.xml:17616
18232 #, fuzzy, no-wrap
18233 msgid ""
18234 "\n"
18235 "--revision (-r) ARG\n"
18236 "--verbose (-v)\n"
18237 "--incremental\n"
18238 "--xml\n"
18239 "--extensions (-x) ARG\n"
18240 "--force\n"
18241 "--username ARG\n"
18242 "--password ARG\n"
18243 "--no-auth-cache\n"
18244 "--non-interactive\n"
18245 "--config-dir ARG\n"
18246 msgstr ""
18247 "\n"
18248 "--revision (-r) REV\n"
18249 "--verbose (-v)\n"
18250 "--recursive (-R)\n"
18251 "--incremental\n"
18252 "--xml\n"
18253 "--username USER\n"
18254 "--password PASS\n"
18255 "--no-auth-cache\n"
18256 "--non-interactive\n"
18257 "--config-dir DIR\n"
18259 #. (para)
18260 #: ../source/book.xml:17656
18261 #, fuzzy
18262 msgid "If you want to see blame annotated source for <filename>readme.txt</filename> in your test repository:"
18263 msgstr "如果你希望在测试版本库看到blame标记的<filename>readme.txt</filename>源代码:"
18265 #. (screen)
18266 #: ../source/book.xml:17659
18267 #, no-wrap
18268 msgid ""
18269 "\n"
18270 "$ svn blame http://svn.red-bean.com/repos/test/readme.txt\n"
18271 "     3      sally This is a README file.\n"
18272 "     5      harry You should read this.\n"
18273 msgstr ""
18274 "\n"
18275 "$ svn blame http://svn.red-bean.com/repos/test/readme.txt\n"
18276 "     3      sally This is a README file.\n"
18277 "     5      harry You should read this.\n"
18279 #. (para)
18280 #: ../source/book.xml:17664
18281 msgid "Even if <command>svn blame</command> says that Harry last modified readme.txt in revision 5, you'll have to examine exactly what the revision changed to be sure that Harry changed the <emphasis>context</emphasis> of the line—he may have just adjusted the whitespace."
18282 msgstr "即使<command>svn blame</command>说明Harry最后在修订版本5被修改,你也需要验证Harry在修订版本修改行的<emphasis>上下文</emphasis>—也许他只是调整了空格。"
18284 #. (tertiary)
18285 #: ../source/book.xml:17676 ../source/book.xml:22337
18286 msgid "cat"
18287 msgstr "cat"
18289 #. (refpurpose)
18290 #: ../source/book.xml:17680
18291 msgid "Output the contents of the specified files or URLs."
18292 msgstr "输出特定文件或URL的内容。"
18294 #. (programlisting)
18295 #: ../source/book.xml:17687
18296 #, no-wrap
18297 msgid "svn cat TARGET[@REV]..."
18298 msgstr "svn cat TARGET[@REV]..."
18300 #. (para)
18301 #: ../source/book.xml:17693
18302 #, fuzzy
18303 msgid "Output the contents of the specified files or URLs. For listing the contents of directories, see <command>svn list</command>."
18304 msgstr "输出特定文件或URL的内容。列出目录的内容可以使用<command>svn list</command>。"
18306 #. (screen)
18307 #: ../source/book.xml:17719
18308 #, no-wrap
18309 msgid ""
18310 "\n"
18311 "--revision (-r) REV\n"
18312 "--username USER\n"
18313 "--password PASS\n"
18314 "--no-auth-cache\n"
18315 "--non-interactive\n"
18316 "--config-dir DIR\n"
18317 msgstr ""
18318 "\n"
18319 "--revision (-r) REV\n"
18320 "--username USER\n"
18321 "--password PASS\n"
18322 "--no-auth-cache\n"
18323 "--non-interactive\n"
18324 "--config-dir DIR\n"
18326 #. (para)
18327 #: ../source/book.xml:17732
18328 msgid "If you want to view readme.txt in your repository without checking it out:"
18329 msgstr "如果你希望不检出而察看版本库的readme.txt的内容:"
18331 #. (screen)
18332 #: ../source/book.xml:17734
18333 #, no-wrap
18334 msgid ""
18335 "\n"
18336 "$ svn cat http://svn.red-bean.com/repos/test/readme.txt\n"
18337 "This is a README file.\n"
18338 "You should read this.\n"
18339 msgstr ""
18340 "\n"
18341 "$ svn cat http://svn.red-bean.com/repos/test/readme.txt\n"
18342 "This is a README file.\n"
18343 "You should read this.\n"
18345 #. (para)
18346 #: ../source/book.xml:17740
18347 #, fuzzy
18348 msgid "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, <command>svn cat -r HEAD</command> will automatically fetch the <literal>HEAD</literal> revision when you give it a path:"
18349 msgstr "如果你的工作拷贝已经过期(或者你有本地修改),并且希望察看工作拷贝的<literal moreinfo=\"none\">HEAD</literal>修订版本的一个文件,如果你给定一个路径,<command moreinfo=\"none\">svn cat</command>会自动取得<literal moreinfo=\"none\">HEAD</literal>的修订版本:"
18351 #. (screen)
18352 #: ../source/book.xml:17747
18353 #, no-wrap
18354 msgid ""
18355 "\n"
18356 "$ cat foo.c\n"
18357 "This file is in my local working copy \n"
18358 "and has changes that I've made.\n"
18359 "\n"
18360 "$ svn cat -r HEAD foo.c\n"
18361 "Latest revision fresh from the repository!\n"
18362 msgstr ""
18363 "\n"
18364 "$ cat foo.c\n"
18365 "This file is in my local working copy \n"
18366 "and has changes that I've made.\n"
18367 "\n"
18368 "$ svn cat -r HEAD foo.c\n"
18369 "Latest revision fresh from the repository!\n"
18371 #. (tertiary)
18372 #: ../source/book.xml:17761
18373 msgid "checkout"
18374 msgstr "checkout"
18376 #. (refname)
18377 #: ../source/book.xml:17764
18378 msgid "svn checkout"
18379 msgstr "svn checkout"
18381 #. (refpurpose)
18382 #: ../source/book.xml:17765
18383 msgid "Check out a working copy from a repository."
18384 msgstr "从版本库取出一个工作拷贝。"
18386 #. (programlisting)
18387 #: ../source/book.xml:17771
18388 #, no-wrap
18389 msgid "svn checkout URL[@REV]... [PATH]"
18390 msgstr "svn checkout URL[@REV]... [PATH]"
18392 #. (para)
18393 #: ../source/book.xml:17777
18394 msgid "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. If multiple URLs are given each will be checked out into a subdirectory of <replaceable>PATH</replaceable>, with the name of the subdirectory being the basename of the URL."
18395 msgstr "从版本库取出一个工作拷贝,如果省略<replaceable>PATH</replaceable>,URL的基名称会作为目标,如果给定多个URL,每一个都会检出到<replaceable>PATH</replaceable>的子目录,使用URL基名称的子目录名称。"
18397 #. (para)
18398 #: ../source/book.xml:17789
18399 msgid "co"
18400 msgstr "co"
18402 #. (para)
18403 #: ../source/book.xml:17795
18404 msgid "Creates a working copy."
18405 msgstr "创建一个工作拷贝。"
18407 #. (screen)
18408 #: ../source/book.xml:17807
18409 #, no-wrap
18410 msgid ""
18411 "\n"
18412 "--revision (-r) REV\n"
18413 "--quiet (-q)\n"
18414 "--non-recursive (-N)\n"
18415 "--username USER\n"
18416 "--password PASS\n"
18417 "--no-auth-cache\n"
18418 "--non-interactive\n"
18419 "--ignore-externals\n"
18420 "--config-dir DIR\n"
18421 msgstr ""
18422 "\n"
18423 "--revision (-r) REV\n"
18424 "--quiet (-q)\n"
18425 "--non-recursive (-N)\n"
18426 "--username USER\n"
18427 "--password PASS\n"
18428 "--no-auth-cache\n"
18429 "--non-interactive\n"
18430 "--ignore-externals\n"
18431 "--config-dir DIR\n"
18433 #. (para)
18434 #: ../source/book.xml:17823
18435 #, fuzzy
18436 msgid "Check out a working copy into a directory called <filename>mine</filename>:"
18437 msgstr "取出一个工作拷贝到<filename>mine</filename>:"
18439 #. (screen)
18440 #: ../source/book.xml:17825
18441 #, fuzzy, no-wrap
18442 msgid ""
18443 "\n"
18444 "$ svn checkout file:///var/svn/repos/test mine\n"
18445 "A  mine/a\n"
18446 "A  mine/b\n"
18447 "Checked out revision 2.\n"
18448 "$ ls\n"
18449 "mine\n"
18450 msgstr ""
18451 "\n"
18452 "$ svn checkout file:///tmp/repos/test mine\n"
18453 "A  mine/a\n"
18454 "A  mine/b\n"
18455 "Checked out revision 2.\n"
18456 "$ ls\n"
18457 "mine\n"
18459 #. (para)
18460 #: ../source/book.xml:17833
18461 #, fuzzy
18462 msgid "Check out two different directories into two separate working copies:"
18463 msgstr "检出两个目录到两个单独的工作拷贝:"
18465 #. (screen)
18466 #: ../source/book.xml:17835
18467 #, fuzzy, no-wrap
18468 msgid ""
18469 "\n"
18470 "$ svn checkout file:///var/svn/repos/test  file:///var/svn/repos/quiz\n"
18471 "A  test/a\n"
18472 "A  test/b\n"
18473 "Checked out revision 2.\n"
18474 "A  quiz/l\n"
18475 "A  quiz/m\n"
18476 "Checked out revision 2.\n"
18477 "$ ls\n"
18478 "quiz  test\n"
18479 msgstr ""
18480 "\n"
18481 "$ svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz\n"
18482 "A  test/a\n"
18483 "A  test/b\n"
18484 "Checked out revision 2.\n"
18485 "A  quiz/l\n"
18486 "A  quiz/m\n"
18487 "Checked out revision 2.\n"
18488 "$ ls\n"
18489 "quiz  test\n"
18491 #. (para)
18492 #: ../source/book.xml:17846
18493 #, fuzzy
18494 msgid "Check out two different directories into two separate working copies, but place both into a directory called <filename>working-copies</filename>:"
18495 msgstr "检出两个目录到两个单独的工作拷贝,但是将两个目录都放到<filename>working-copies</filename>:"
18497 #. (screen)
18498 #: ../source/book.xml:17849
18499 #, fuzzy, no-wrap
18500 msgid ""
18501 "\n"
18502 "$ svn checkout file:///var/svn/repos/test  file:///var/svn/repos/quiz working-copies\n"
18503 "A  working-copies/test/a\n"
18504 "A  working-copies/test/b\n"
18505 "Checked out revision 2.\n"
18506 "A  working-copies/quiz/l\n"
18507 "A  working-copies/quiz/m\n"
18508 "Checked out revision 2.\n"
18509 "$ ls\n"
18510 "working-copies\n"
18511 msgstr ""
18512 "\n"
18513 "$ svn checkout file:///tmp/repos/test  file:///tmp/repos/quiz working-copies\n"
18514 "A  working-copies/test/a\n"
18515 "A  working-copies/test/b\n"
18516 "Checked out revision 2.\n"
18517 "A  working-copies/quiz/l\n"
18518 "A  working-copies/quiz/m\n"
18519 "Checked out revision 2.\n"
18520 "$ ls\n"
18521 "working-copies\n"
18523 #. (para)
18524 #: ../source/book.xml:17860
18525 #, fuzzy
18526 msgid "If you interrupt a checkout (or something else interrupts your checkout, like loss of connectivity, etc.), you can restart it either by issuing the identical checkout command again, or by updating the incomplete working copy:"
18527 msgstr "如果你打断一个检出(或其它打断检出的事情,如连接失败。),你可以使用同样的命令重新开始或者是更新不完整的工作拷贝:"
18529 #. (screen)
18530 #: ../source/book.xml:17865
18531 #, fuzzy, no-wrap
18532 msgid ""
18533 "\n"
18534 "$ svn checkout file:///var/svn/repos/test test\n"
18535 "A  test/a\n"
18536 "A  test/b\n"
18537 "^C\n"
18538 "svn: The operation was interrupted\n"
18539 "svn: caught SIGINT\n"
18540 "\n"
18541 "$ svn checkout file:///var/svn/repos/test test\n"
18542 "A  test/c\n"
18543 "A  test/d\n"
18544 "^C\n"
18545 "svn: The operation was interrupted\n"
18546 "svn: caught SIGINT\n"
18547 "\n"
18548 "$ cd test\n"
18549 "$ svn update\n"
18550 "A  test/e\n"
18551 "A  test/f\n"
18552 "Updated to revision 3.\n"
18553 msgstr ""
18554 "\n"
18555 "$ svn checkout file:///tmp/repos/test test\n"
18556 "A  test/a\n"
18557 "A  test/b\n"
18558 "^C\n"
18559 "svn: The operation was interrupted\n"
18560 "svn: caught SIGINT\n"
18561 "\n"
18562 "$ svn checkout file:///tmp/repos/test test\n"
18563 "A  test/c\n"
18564 "A  test/d\n"
18565 "^C\n"
18566 "svn: The operation was interrupted\n"
18567 "svn: caught SIGINT\n"
18568 "\n"
18569 "$ cd test\n"
18570 "$ svn update\n"
18571 "A  test/e\n"
18572 "A  test/f\n"
18573 "Updated to revision 3.\n"
18575 #. (tertiary)
18576 #: ../source/book.xml:17892
18577 msgid "cleanup"
18578 msgstr "cleanup"
18580 #. (refname)
18581 #: ../source/book.xml:17895
18582 msgid "svn cleanup"
18583 msgstr "svn cleanup"
18585 #. (refpurpose)
18586 #: ../source/book.xml:17896
18587 msgid "Recursively clean up the working copy."
18588 msgstr "递归清理工作拷贝。"
18590 #. (programlisting)
18591 #: ../source/book.xml:17902
18592 #, no-wrap
18593 msgid "svn cleanup [PATH...]"
18594 msgstr "svn cleanup [PATH...]"
18596 #. (para)
18597 #: ../source/book.xml:17908
18598 msgid "Recursively clean up the working copy, removing working copy locks and resuming unfinished operations. If you ever get a <quote>working copy locked</quote> error, run this command to remove stale locks and get your working copy into a usable state again."
18599 msgstr "递归清理工作拷贝,删除未完成的工作拷贝锁定,并恢复未完成的操作。如果你得到一个<quote>工作拷贝已锁定</quote>的错误,运行这个命令可以删除无效的锁定,让你的工作拷贝再次回到可用的状态。"
18601 #. (para)
18602 #: ../source/book.xml:17913
18603 #, fuzzy
18604 msgid "If, for some reason, an <command>svn update</command> fails due to a problem running an external diff program (e.g. user input or network failure), pass the <option>--diff3-cmd</option> to allow cleanup to complete any merging with your external diff program. You can also specify any configuration directory with the <option>--config-dir</option> option, but you should need these options extremely infrequently."
18605 msgstr "如果,因为一些原因,运行外置的区别程序(例如,用户输入或是网络错误)有时候会导致一个<command>svn update</command>失败,使用<option>--diff3-cmd</option>选项可以完全清除你的外置区别程序所作的合并,你也可以使用<option>--config-dir</option>指定任何配置目录,但是你应该不会经常使用这些选项。"
18607 #. (para)
18608 #: ../source/book.xml:17932 ../source/book.xml:19603 ../source/book.xml:20359
18609 #: ../source/book.xml:20447 ../source/book.xml:20906 ../source/book.xml:21186
18610 msgid "Working copy"
18611 msgstr "工作拷贝2"
18613 #. (screen)
18614 #: ../source/book.xml:17944
18615 #, no-wrap
18616 msgid ""
18617 "\n"
18618 "--diff3-cmd CMD\n"
18619 "--config-dir DIR\n"
18620 msgstr ""
18621 "\n"
18622 "--diff3-cmd CMD\n"
18623 "--config-dir DIR\n"
18625 #. (para)
18626 #: ../source/book.xml:17953
18627 #, fuzzy
18628 msgid "Well, there's not much to the examples here as <command>svn cleanup</command> generates no output. If you pass no <replaceable>PATH</replaceable>, <quote><filename>.</filename></quote> is used."
18629 msgstr "<command>svn cleanup</command>没有输出,没有太多的例子,如果你没有传递<replaceable>PATH</replaceable>,会使用<quote><filename>.</filename></quote>。"
18631 #. (screen)
18632 #: ../source/book.xml:17957
18633 #, fuzzy, no-wrap
18634 msgid ""
18635 "\n"
18636 "$ svn cleanup\n"
18637 "\n"
18638 "$ svn cleanup /var/svn/working-copy\n"
18639 msgstr ""
18640 "\n"
18641 "$ svn cleanup\n"
18642 "\n"
18643 "$ svn cleanup /path/to/working-copy\n"
18645 #. (tertiary)
18646 #: ../source/book.xml:17968
18647 msgid "commit"
18648 msgstr "commit"
18650 #. (refpurpose)
18651 #: ../source/book.xml:17972
18652 msgid "Send changes from your working copy to the repository."
18653 msgstr "将修改从工作拷贝发送到版本库。"
18655 #. (programlisting)
18656 #: ../source/book.xml:17978
18657 #, no-wrap
18658 msgid "svn commit [PATH...]"
18659 msgstr "svn commit [PATH...]"
18661 #. (para)
18662 #: ../source/book.xml:17984
18663 #, fuzzy
18664 msgid "Send changes from your working copy to the repository. If you do not supply a log message with your commit by using either the <option>--file</option> or <option>--message</option> option, <command>svn</command> will launch your editor for you to compose a commit message. See the <literal>editor-cmd</literal> section in <xref linkend=\"svn.advanced.confarea.opts.config\"/>."
18665 msgstr "将修改从工作拷贝发送到版本库。如果你没有使用<option>--file</option>或<option>--message</option>提供一个提交日志信息,<command>svn</command>会启动你的编辑器来编写一个提交信息,见<xref linkend=\"svn.advanced.confarea.opts.config\"/>的<literal>editor-cmd</literal>小节。"
18667 #. (para)
18668 #: ../source/book.xml:17991
18669 #, fuzzy
18670 msgid "<command>svn commit</command> will send any lock tokens that it finds and will release locks on all <replaceable>PATHS</replaceable> committed (recursively), unless <option>--no-unlock</option> is passed."
18671 msgstr "<command>svn commit</command> will send found lock tokens and release locks on all <replaceable>PATHS</replaceable> committed (recursively) unless <option>--no-unlock</option> is passed."
18673 #. (para)
18674 #: ../source/book.xml:17996
18675 msgid "If you begin a commit and Subversion launches your editor to compose the commit message, you can still abort without committing your changes. If you want to cancel your commit, just quit your editor without saving your commit message and Subversion will prompt you to either abort the commit, continue with no message, or edit the message again."
18676 msgstr "如果你开始一个提交并且Subversion启动了你的编辑器来编辑提交信息,你仍可以退出而不会提交你的修改,如果你希望取消你的提交,只需要退出编辑器而不保存你的提交信息,Subversion会提示你是选择取消提交、空信息继续还是重新编辑信息。"
18678 #. (para)
18679 #: ../source/book.xml:18009
18680 msgid "ci (short for <quote>check in</quote>; not <quote>co</quote>, which is short for <quote>checkout</quote>)"
18681 msgstr "ci(<quote>check in</quote>的缩写;不是<quote>checkout</quote>的缩写<quote>co</quote>。)"
18683 #. (para)
18684 #: ../source/book.xml:18017
18685 msgid "Working copy, repository"
18686 msgstr "工作拷贝,版本库"
18688 #. (screen)
18689 #: ../source/book.xml:18029
18690 #, no-wrap
18691 msgid ""
18692 "\n"
18693 "--message (-m) TEXT\n"
18694 "--file (-F) FILE\n"
18695 "--quiet (-q)\n"
18696 "--no-unlock\n"
18697 "--non-recursive (-N)\n"
18698 "--targets FILENAME\n"
18699 "--force-log\n"
18700 "--username USER\n"
18701 "--password PASS\n"
18702 "--no-auth-cache\n"
18703 "--non-interactive\n"
18704 "--encoding ENC\n"
18705 "--config-dir DIR\n"
18706 msgstr ""
18707 "\n"
18708 "--message (-m) TEXT\n"
18709 "--file (-F) FILE\n"
18710 "--quiet (-q)\n"
18711 "--no-unlock\n"
18712 "--non-recursive (-N)\n"
18713 "--targets FILENAME\n"
18714 "--force-log\n"
18715 "--username USER\n"
18716 "--password PASS\n"
18717 "--no-auth-cache\n"
18718 "--non-interactive\n"
18719 "--encoding ENC\n"
18720 "--config-dir DIR\n"
18722 #. (para)
18723 #: ../source/book.xml:18049
18724 #, fuzzy
18725 msgid "Commit a simple modification to a file with the commit message on the command line and an implicit target of your current directory (<quote><filename>.</filename></quote>):"
18726 msgstr "使用命令行提交一个包含日志信息的文件修改,当前目录(<quote><filename>.</filename></quote>)是没有说明的目标路径:"
18728 #. (screen)
18729 #: ../source/book.xml:18053
18730 #, no-wrap
18731 msgid ""
18732 "\n"
18733 "$ svn commit -m \"added howto section.\"\n"
18734 "Sending        a\n"
18735 "Transmitting file data .\n"
18736 "Committed revision 3.\n"
18737 msgstr ""
18738 "\n"
18739 "$ svn commit -m \"added howto section.\"\n"
18740 "Sending        a\n"
18741 "Transmitting file data .\n"
18742 "Committed revision 3.\n"
18744 #. (para)
18745 #: ../source/book.xml:18059
18746 #, fuzzy
18747 msgid "Commit a modification to the file <filename>foo.c</filename> (explicitly specified on the command line) with the commit message in a file named <literal>msg</literal>:"
18748 msgstr "提交一个修改到<filename>foo.c</filename>(在命令行明确指明),并且<literal>msg</literal>文件中保存了提交信息:"
18750 #. (screen)
18751 #: ../source/book.xml:18063
18752 #, no-wrap
18753 msgid ""
18754 "\n"
18755 "$ svn commit -F msg foo.c\n"
18756 "Sending        foo.c\n"
18757 "Transmitting file data .\n"
18758 "Committed revision 5.\n"
18759 msgstr ""
18760 "\n"
18761 "$ svn commit -F msg foo.c\n"
18762 "Sending        foo.c\n"
18763 "Transmitting file data .\n"
18764 "Committed revision 5.\n"
18766 #. (para)
18767 #: ../source/book.xml:18069
18768 #, fuzzy
18769 msgid "If you want to use a file that's under version control for your commit message with <option>--file</option>, you need to pass the <option>--force-log</option> option:"
18770 msgstr "如果你希望使用在<option>--file</option>选项中使用在版本控制之下的文件作为参数,你需要使用<option>--force-log</option>选项:"
18772 #. (screen)
18773 #: ../source/book.xml:18073
18774 #, no-wrap
18775 msgid ""
18776 "\n"
18777 "$ svn commit --file file_under_vc.txt foo.c\n"
18778 "svn: The log message file is under version control\n"
18779 "svn: Log message file is a versioned file; use '--force-log' to override\n"
18780 "\n"
18781 "$ svn commit --force-log --file file_under_vc.txt foo.c\n"
18782 "Sending        foo.c\n"
18783 "Transmitting file data .\n"
18784 "Committed revision 6.\n"
18785 msgstr ""
18786 "\n"
18787 "$ svn commit --file file_under_vc.txt foo.c\n"
18788 "svn: The log message file is under version control\n"
18789 "svn: Log message file is a versioned file; use '--force-log' to override\n"
18790 "\n"
18791 "$ svn commit --force-log --file file_under_vc.txt foo.c\n"
18792 "Sending        foo.c\n"
18793 "Transmitting file data .\n"
18794 "Committed revision 6.\n"
18796 #. (para)
18797 #: ../source/book.xml:18083
18798 msgid "To commit a file scheduled for deletion:"
18799 msgstr "提交一个已经预定要删除的文件:"
18801 #. (screen)
18802 #: ../source/book.xml:18084
18803 #, no-wrap
18804 msgid ""
18805 "\n"
18806 "$ svn commit -m \"removed file 'c'.\"\n"
18807 "Deleting       c\n"
18808 "\n"
18809 "Committed revision 7.\n"
18810 msgstr ""
18811 "\n"
18812 "$ svn commit -m \"removed file 'c'.\"\n"
18813 "Deleting       c\n"
18814 "\n"
18815 "Committed revision 7.\n"
18817 #. (tertiary)
18818 #: ../source/book.xml:18096
18819 msgid "copy"
18820 msgstr "copy"
18822 #. (refpurpose)
18823 #: ../source/book.xml:18100
18824 msgid "Copy a file or directory in a working copy or in the repository."
18825 msgstr "拷贝工作拷贝的一个文件或目录到版本库。"
18827 #. (programlisting)
18828 #: ../source/book.xml:18107
18829 #, fuzzy, no-wrap
18830 msgid "svn copy SRC[@REV]... DST"
18831 msgstr "svn copy SRC DST"
18833 #. (para)
18834 #: ../source/book.xml:18113
18835 #, fuzzy
18836 msgid "Copy one or more files in a working copy or in the repository. <replaceable>SRC</replaceable> and <replaceable>DST</replaceable> can each be either a working copy (WC) path or URL:"
18837 msgstr "拷贝工作拷贝的一个文件或目录到版本库。<replaceable>SRC</replaceable>和<replaceable>DST</replaceable>既可以是工作拷贝(WC)路径也可以是URL:"
18839 #. (term)
18840 #: ../source/book.xml:18119 ../source/book.xml:19785
18841 msgid "WC -&gt; WC"
18842 msgstr "WC -&gt; WC"
18844 #. (para)
18845 #: ../source/book.xml:18121
18846 msgid "Copy and schedule an item for addition (with history)."
18847 msgstr "拷贝并且预定一个添加的项目(包含历史)。"
18849 #. (term)
18850 #: ../source/book.xml:18126
18851 msgid "WC -&gt; URL"
18852 msgstr "WC -&gt; URL"
18854 #. (para)
18855 #: ../source/book.xml:18128
18856 msgid "Immediately commit a copy of WC to URL."
18857 msgstr "将WC或URL的拷贝立即提交。"
18859 #. (term)
18860 #: ../source/book.xml:18132
18861 msgid "URL -&gt; WC"
18862 msgstr "URL -&gt; WC"
18864 #. (para)
18865 #: ../source/book.xml:18134
18866 msgid "Check out URL into WC, and schedule it for addition."
18867 msgstr "检出URL到WC,并且加入到添加计划。"
18869 #. (term)
18870 #: ../source/book.xml:18139 ../source/book.xml:19792
18871 msgid "URL -&gt; URL"
18872 msgstr "URL -&gt; URL"
18874 #. (para)
18875 #: ../source/book.xml:18141
18876 msgid "Complete server-side copy. This is usually used to branch and tag."
18877 msgstr "完全的服务器端拷贝,通常用在分支和标签。"
18879 #. (para)
18880 #: ../source/book.xml:18146
18881 msgid "When copying multiple sources, they will be added as children of <replaceable>DST</replaceable>, which must be a directory."
18882 msgstr ""
18884 #. (para)
18885 #: ../source/book.xml:18149
18886 msgid "If no peg revision (ie <replaceable>@REV</replaceable>) is supplied, by default the <literal>BASE</literal> revision will be used for files copied from the working copy, while the <literal>HEAD</literal> revision will be used for files copied from a URL."
18887 msgstr ""
18889 #. (para)
18890 #: ../source/book.xml:18156
18891 msgid "You can only copy files within a single repository. Subversion does not support cross-repository copying."
18892 msgstr "你只可以在单个版本库中拷贝文件,Subversion还不支持跨版本库的拷贝。"
18894 #. (para)
18895 #: ../source/book.xml:18164
18896 msgid "cp"
18897 msgstr "cp"
18899 #. (para)
18900 #: ../source/book.xml:18170
18901 msgid "Repository if destination is a URL."
18902 msgstr "如果目标是URL则包括版本库。"
18904 #. (para)
18905 #: ../source/book.xml:18171
18906 msgid "Working copy if destination is a WC path."
18907 msgstr "如果目标是WC路径,则是工作拷贝。"
18909 #. (para)
18910 #: ../source/book.xml:18177
18911 msgid "If source or destination is in the repository, or if needed to look up the source revision number."
18912 msgstr "如果目标是版本库,或者需要查看修订版本号,则会访问版本库。"
18914 #. (screen)
18915 #: ../source/book.xml:18184
18916 #, no-wrap
18917 msgid ""
18918 "\n"
18919 "--message (-m) TEXT\n"
18920 "--file (-F) FILE\n"
18921 "--revision (-r) REV\n"
18922 "--quiet (-q)\n"
18923 "--username USER\n"
18924 "--password PASS\n"
18925 "--no-auth-cache\n"
18926 "--non-interactive\n"
18927 "--force-log\n"
18928 "--editor-cmd EDITOR\n"
18929 "--encoding ENC\n"
18930 "--config-dir DIR\n"
18931 msgstr ""
18932 "\n"
18933 "--message (-m) TEXT\n"
18934 "--file (-F) FILE\n"
18935 "--revision (-r) REV\n"
18936 "--quiet (-q)\n"
18937 "--username USER\n"
18938 "--password PASS\n"
18939 "--no-auth-cache\n"
18940 "--non-interactive\n"
18941 "--force-log\n"
18942 "--editor-cmd EDITOR\n"
18943 "--encoding ENC\n"
18944 "--config-dir DIR\n"
18946 #. (para)
18947 #: ../source/book.xml:18203
18948 msgid "Copy an item within your working copy (just schedules the copy—nothing goes into the repository until you commit):"
18949 msgstr "拷贝工作拷贝的一个项目(只是预定要拷贝—在提交之前不会影响版本库):"
18951 #. (screen)
18952 #: ../source/book.xml:18206
18953 #, no-wrap
18954 msgid ""
18955 "\n"
18956 "$ svn copy foo.txt bar.txt\n"
18957 "A         bar.txt\n"
18958 "$ svn status\n"
18959 "A  +   bar.txt\n"
18960 msgstr ""
18961 "\n"
18962 "$ svn copy foo.txt bar.txt\n"
18963 "A         bar.txt\n"
18964 "$ svn status\n"
18965 "A  +   bar.txt\n"
18967 #. (para)
18968 #: ../source/book.xml:18212
18969 #, fuzzy
18970 msgid "Copy several files in a working copy into a subdirectory:"
18971 msgstr "拷贝工作拷贝的一个文件或目录到版本库。"
18973 #. (screen)
18974 #: ../source/book.xml:18214
18975 #, fuzzy, no-wrap
18976 msgid ""
18977 "\n"
18978 "$ svn cp bat.c baz.c qux.c src\n"
18979 "A         src/bat.c\n"
18980 "A         src/baz.c\n"
18981 "A         src/qux.c\n"
18982 msgstr ""
18983 "\n"
18984 "$ svn add * --force\n"
18985 "A         foo.c\n"
18986 "A         somedir/bar.c\n"
18987 "A         otherdir/docs/baz.doc\n"
18988 "…\n"
18990 #. (para)
18991 #: ../source/book.xml:18220
18992 msgid "Copy revision 8 of <literal>bat.c</literal> into your working copy under a different name:"
18993 msgstr ""
18995 #. (screen)
18996 #: ../source/book.xml:18222
18997 #, fuzzy, no-wrap
18998 msgid ""
18999 "\n"
19000 "$ svn cp bat.c ya-old-bat.c\n"
19001 "A         ya-old-bat.c\n"
19002 msgstr ""
19003 "\n"
19004 "$ svn add foo.c \n"
19005 "A         foo.c\n"
19007 #. (para)
19008 #: ../source/book.xml:18226
19009 msgid "Copy an item in your working copy to a URL in the repository (an immediate commit, so you must supply a commit message):"
19010 msgstr "拷贝你的工作拷贝的一个项目到版本库的URL(直接的提交,所以需要提供一个提交信息):"
19012 #. (screen)
19013 #: ../source/book.xml:18229
19014 #, fuzzy, no-wrap
19015 msgid ""
19016 "\n"
19017 "$ svn copy near.txt file:///var/svn/repos/test/far-away.txt -m \"Remote copy.\"\n"
19018 "\n"
19019 "Committed revision 8.\n"
19020 msgstr ""
19021 "\n"
19022 "$ svn copy near.txt file:///tmp/repos/test/far-away.txt -m \"Remote copy.\"\n"
19023 "\n"
19024 "Committed revision 8.\n"
19026 #. (para)
19027 #: ../source/book.xml:18234
19028 msgid "Copy an item from the repository to your working copy (just schedules the copy—nothing goes into the repository until you commit):"
19029 msgstr "拷贝版本库的一个项目到你的工作拷贝(只是预定要拷贝—在提交之前不会影响版本库):"
19031 #. (para)
19032 #: ../source/book.xml:18238
19033 msgid "This is the recommended way to resurrect a dead file in your repository!"
19034 msgstr "这是恢复死掉文件的推荐方式!"
19036 #. (screen)
19037 #: ../source/book.xml:18241
19038 #, fuzzy, no-wrap
19039 msgid ""
19040 "\n"
19041 "$ svn copy file:///var/svn/repos/test/far-away near-here\n"
19042 "A         near-here\n"
19043 msgstr ""
19044 "\n"
19045 "$ svn copy file:///tmp/repos/test/far-away near-here\n"
19046 "A         near-here\n"
19048 #. (para)
19049 #: ../source/book.xml:18245
19050 msgid "And finally, copying between two URLs:"
19051 msgstr "最后,是在URL之间拷贝:"
19053 #. (screen)
19054 #: ../source/book.xml:18246
19055 #, fuzzy, no-wrap
19056 msgid ""
19057 "\n"
19058 "$ svn copy file:///var/svn/repos/test/far-away file:///var/svn/repos/test/over-there -m \"remote copy.\"\n"
19059 "\n"
19060 "Committed revision 9.\n"
19061 msgstr ""
19062 "\n"
19063 "$ svn copy file:///tmp/repos/test/far-away file:///tmp/repos/test/over-there -m \"remote copy.\"\n"
19064 "\n"
19065 "Committed revision 9.\n"
19067 #. (para)
19068 #: ../source/book.xml:18252
19069 #, fuzzy
19070 msgid "This is the easiest way to <quote>tag</quote> a revision in your repository—just <command>svn copy</command> that revision (usually <literal>HEAD</literal>) into your tags directory."
19071 msgstr "这是在版本库里作<quote>标签</quote>最简单的方法—<command>svn copy</command>那个修订版本(通常是<literal>HEAD</literal>)到你的tags目录。"
19073 #. (screen)
19074 #: ../source/book.xml:18257
19075 #, fuzzy, no-wrap
19076 msgid ""
19077 "\n"
19078 "$ svn copy file:///var/svn/repos/test/trunk file:///var/svn/repos/test/tags/0.6.32-prerelease -m \"tag tree\"\n"
19079 "\n"
19080 "Committed revision 12.\n"
19081 msgstr ""
19082 "\n"
19083 "$ svn copy file:///tmp/repos/test/trunk file:///tmp/repos/test/tags/0.6.32-prerelease -m \"tag tree\"\n"
19084 "\n"
19085 "Committed revision 12.\n"
19087 #. (para)
19088 #: ../source/book.xml:18262
19089 msgid "And don't worry if you forgot to tag—you can always specify an older revision and tag anytime:"
19090 msgstr "不要担心忘记作标签—你可以在以后任何时候给一个旧版本作标签:"
19092 #. (screen)
19093 #: ../source/book.xml:18264
19094 #, fuzzy, no-wrap
19095 msgid ""
19096 "\n"
19097 "$ svn copy -r 11 file:///var/svn/repos/test/trunk file:///var/svn/repos/test/tags/0.6.32-prerelease -m \"Forgot to tag at rev 11\"\n"
19098 "\n"
19099 "Committed revision 13.\n"
19100 msgstr ""
19101 "\n"
19102 "$ svn copy -r 11 file:///tmp/repos/test/trunk file:///tmp/repos/test/tags/0.6.32-prerelease -m \"Forgot to tag at rev 11\"\n"
19103 "\n"
19104 "Committed revision 13.\n"
19106 #. (tertiary)
19107 #: ../source/book.xml:18275
19108 msgid "delete"
19109 msgstr "delete"
19111 #. (refpurpose)
19112 #: ../source/book.xml:18279
19113 msgid "Delete an item from a working copy or the repository."
19114 msgstr "从工作拷贝或版本库删除一个项目。"
19116 #. (programlisting)
19117 #: ../source/book.xml:18286
19118 #, no-wrap
19119 msgid "svn delete PATH..."
19120 msgstr "svn delete PATH..."
19122 #. (programlisting)
19123 #: ../source/book.xml:18287
19124 #, no-wrap
19125 msgid "svn delete URL..."
19126 msgstr "svn delete URL..."
19128 #. (para)
19129 #: ../source/book.xml:18293
19130 #, fuzzy
19131 msgid "Items specified by <replaceable>PATH</replaceable> are scheduled for deletion upon the next commit. Files (and directories that have not been committed) are immediately removed from the working copy. The command will not remove any unversioned or modified items; use the <option>--force</option> option to override this behavior."
19132 msgstr "<replaceable>PATH</replaceable>指定的项目会在下次提交删除,文件(和没有提交的目录)会立即从版本库删除,这个命令不会删除任何未版本化或已经修改的项目;使用<option>--force</option>选项可以覆盖这种行为方式。"
19134 #. (para)
19135 #: ../source/book.xml:18300
19136 msgid "Items specified by URL are deleted from the repository via an immediate commit. Multiple URLs are committed atomically."
19137 msgstr "URL指定的项目会在直接提交中从版本库删除,多个URL的提交是原子操作。"
19139 #. (para)
19140 #: ../source/book.xml:18308
19141 msgid "del, remove, rm"
19142 msgstr "del, remove, rm"
19144 #. (para)
19145 #: ../source/book.xml:18314
19146 #, fuzzy
19147 msgid "Working copy if operating on files, repository if operating on URLs"
19148 msgstr "如果操作对象是文件则是工作拷贝变化,对象是URL则会影响版本库。"
19150 #. (para)
19151 #: ../source/book.xml:18321 ../source/book.xml:19022
19152 msgid "Only if operating on URLs"
19153 msgstr "对URL操作时访问"
19155 #. (screen)
19156 #: ../source/book.xml:18327
19157 #, no-wrap
19158 msgid ""
19159 "\n"
19160 "--force\n"
19161 "--force-log\n"
19162 "--message (-m) TEXT\n"
19163 "--file (-F) FILE\n"
19164 "--quiet (-q)\n"
19165 "--targets FILENAME\n"
19166 "--username USER\n"
19167 "--password PASS\n"
19168 "--no-auth-cache\n"
19169 "--non-interactive\n"
19170 "--editor-cmd EDITOR\n"
19171 "--encoding ENC\n"
19172 "--config-dir DIR\n"
19173 msgstr ""
19174 "\n"
19175 "--force\n"
19176 "--force-log\n"
19177 "--message (-m) TEXT\n"
19178 "--file (-F) FILE\n"
19179 "--quiet (-q)\n"
19180 "--targets FILENAME\n"
19181 "--username USER\n"
19182 "--password PASS\n"
19183 "--no-auth-cache\n"
19184 "--non-interactive\n"
19185 "--editor-cmd EDITOR\n"
19186 "--encoding ENC\n"
19187 "--config-dir DIR\n"
19189 #. (para)
19190 #: ../source/book.xml:18347
19191 #, fuzzy
19192 msgid "Using <command>svn</command> to delete a file from your working copy deletes your local copy of the file, but merely schedules it to be deleted from the repository. When you commit, the file is deleted in the repository."
19193 msgstr "使用<command>svn</command>从工作拷贝删除文件只是预定要删除,当你提交,文件才会从版本库删除。"
19195 #. (screen)
19196 #: ../source/book.xml:18352
19197 #, no-wrap
19198 msgid ""
19199 "\n"
19200 "$ svn delete myfile\n"
19201 "D         myfile\n"
19202 "\n"
19203 "$ svn commit -m \"Deleted file 'myfile'.\"\n"
19204 "Deleting       myfile\n"
19205 "Transmitting file data .\n"
19206 "Committed revision 14.\n"
19207 msgstr ""
19208 "\n"
19209 "$ svn delete myfile\n"
19210 "D         myfile\n"
19211 "\n"
19212 "$ svn commit -m \"Deleted file 'myfile'.\"\n"
19213 "Deleting       myfile\n"
19214 "Transmitting file data .\n"
19215 "Committed revision 14.\n"
19217 #. (para)
19218 #: ../source/book.xml:18361
19219 msgid "Deleting a URL, however, is immediate, so you have to supply a log message:"
19220 msgstr "然而直接删除一个URL,你需要提供一个日志信息:"
19222 #. (screen)
19223 #: ../source/book.xml:18363
19224 #, fuzzy, no-wrap
19225 msgid ""
19226 "\n"
19227 "$ svn delete -m \"Deleting file 'yourfile'\" file:///var/svn/repos/test/yourfile\n"
19228 "\n"
19229 "Committed revision 15.\n"
19230 msgstr ""
19231 "\n"
19232 "$ svn delete -m \"Deleting file 'yourfile'\" file:///tmp/repos/test/yourfile\n"
19233 "\n"
19234 "Committed revision 15.\n"
19236 #. (para)
19237 #: ../source/book.xml:18368
19238 msgid "Here's an example of how to force deletion of a file that has local mods:"
19239 msgstr "如下是强制删除本地已修改文件的例子:"
19241 #. (screen)
19242 #: ../source/book.xml:18370
19243 #, no-wrap
19244 msgid ""
19245 "\n"
19246 "$ svn delete over-there \n"
19247 "svn: Attempting restricted operation for modified resource\n"
19248 "svn: Use --force to override this restriction\n"
19249 "svn: 'over-there' has local modifications\n"
19250 "\n"
19251 "$ svn delete --force over-there \n"
19252 "D         over-there\n"
19253 msgstr ""
19254 "\n"
19255 "$ svn delete over-there \n"
19256 "svn: Attempting restricted operation for modified resource\n"
19257 "svn: Use --force to override this restriction\n"
19258 "svn: 'over-there' has local modifications\n"
19259 "\n"
19260 "$ svn delete --force over-there \n"
19261 "D         over-there\n"
19263 #. (tertiary)
19264 #: ../source/book.xml:18385 ../source/book.xml:22526
19265 msgid "diff"
19266 msgstr "diff"
19268 #. (refpurpose)
19269 #: ../source/book.xml:18389
19270 #, fuzzy
19271 msgid "Display the differences between two revisions or paths."
19272 msgstr "比较两条路径的区别。"
19274 #. (programlisting)
19275 #: ../source/book.xml:18395
19276 #, fuzzy, no-wrap
19277 msgid "diff [-c M | -r N[:M]] [TARGET[@REV]...]"
19278 msgstr "diff [-r N[:M]] [TARGET[@REV]...]"
19280 #. (programlisting)
19281 #: ../source/book.xml:18396
19282 #, fuzzy, no-wrap
19283 msgid "diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]"
19284 msgstr "diff [-r N[:M]] --old OLD-TGT[@OLDREV] [--new NEW-TGT[@NEWREV]] [PATH...]"
19286 #. (programlisting)
19287 #: ../source/book.xml:18397
19288 #, no-wrap
19289 msgid "diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]"
19290 msgstr "diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]"
19292 #. (para)
19293 #: ../source/book.xml:18403
19294 #, fuzzy
19295 msgid "Display the differences between two paths. The ways you can use <command>svn diff</command> are:"
19296 msgstr "显示两条路径的区别,<command>svn diff</command>有三种使用方式:"
19298 #. (para)
19299 #: ../source/book.xml:18405
19300 #, fuzzy
19301 msgid "Use just <command>svn diff'</command>to display local modifications in a working copy."
19302 msgstr "运行<command>svn diff</command>以标准差别格式查看修改的内容。"
19304 #. (para)
19305 #: ../source/book.xml:18407
19306 msgid "Display the changes made to <replaceable>TARGET</replaceable>s as they are seen in <replaceable>REV</replaceable> between two revisions. <replaceable>TARGET</replaceable>s may be all working copy paths or all <replaceable>URL</replaceable>s. If <replaceable>TARGET</replaceable>s are working copy paths, <replaceable>N</replaceable> defaults to <literal>BASE</literal> and <replaceable>M</replaceable> to the working copy; if <replaceable>URL</replaceable>s, <replaceable>N</replaceable> must be specified and <replaceable>M</replaceable> defaults to <literal>HEAD</literal>. The <quote>-c M</quote> option is equivalent to <quote>-r N:M</quote> where <literal>N = M-1</literal>. Using <quote>-c -M</quote> does the reverse: <quote>-r M:N</quote> where <literal>N = M-1</literal>."
19307 msgstr "显示<replaceable>TARGET</replaceable>在<replaceable>REV</replaceable>的样子时两个修订版本之间所作的修改,<replaceable>TARGET</replaceable>可以是任何工作拷贝路径或任何<replaceable>URL</replaceable>,如果<replaceable>TARGET</replaceable>是工作拷贝路径,则<replaceable>N</replaceable>缺省是<literal>BASE</literal>,而<replaceable>M</replaceable>是工作拷贝;如果是<replaceable>URL</replaceable>,则必须指定<replaceable>N</replaceable>,而<replaceable>M</replaceable>缺省是<literal>HEAD</literal>。<quote>-c M</quote>选项与<quote>-r N:M</quote>等价,其中<literal>N = M-1</literal>。使用<quote>-c -M</quote>则相反:<quote>-r M:N</quote>的意思是<literal>N = M-1</literal>。"
19309 #. (para)
19310 #: ../source/book.xml:18423
19311 msgid "Display the differences between <replaceable>OLD-TGT</replaceable> as it was seen in <replaceable>OLDREV</replaceable> and <replaceable>NEW-TGT</replaceable> as it was seen ain <replaceable>NEWREV</replaceable>. <replaceable>PATH</replaceable>s, if given, are relative to <replaceable>OLD-TGT</replaceable> and <replaceable>NEW-TGT</replaceable> and restrict the output to differences for those paths. <replaceable>OLD-TGT</replaceable> and <replaceable>NEW-TGT</replaceable> may be working copy paths or <replaceable>URL[@REV]</replaceable>. <replaceable>NEW-TGT</replaceable> defaults to <replaceable>OLD-TGT</replaceable> if not specified. <quote>-r N</quote> makes OLDREV default to N, -r N:M makes <replaceable>OLDREV</replaceable> default to <replaceable>N</replaceable> and <replaceable>NEWREV</replaceable> default to <replaceable>M</replaceable>."
19312 msgstr "显示在<replaceable>OLDREV</replaceable>的<replaceable>OLD-TGT</replaceable>和<replaceable>NEWREV</replaceable>的<replaceable>NEW-TGT</replaceable>之间的区别。如果提供<replaceable>PATH</replaceable>,则与<replaceable>OLD-TGT</replaceable>和<replaceable>NEW-TGT</replaceable>关联,将输出限制在那些路径。<replaceable>OLD-TGT</replaceable>和<replaceable>NEW-TGT</replaceable>可能是工作拷贝路经或<replaceable>URL[@REV]</replaceable>。如果没有指定,<replaceable>NEW-TGT</replaceable>缺省是<replaceable>OLD-TGT</replaceable>。<quote>-r N</quote>设置OLDREV缺省为N,而-r N:M设置<replaceable>OLDREV</replaceable>缺省为<replaceable>N</replaceable>,而<replaceable>NEWREV</replaceable>缺省为<replaceable>M</replaceable>。"
19314 #. (para)
19315 #: ../source/book.xml:18442
19316 #, fuzzy
19317 msgid "Shorthand for <command>svn diff --old=OLD-URL[@OLDREV] --new=NEW-URL[@NEWREV]</command>"
19318 msgstr "<command>svn diff -r N:M URL</command> is shorthand for <command>svn diff -r N:M --old=URL --new=URL</command>."
19320 #. (para)
19321 #: ../source/book.xml:18444
19322 #, fuzzy
19323 msgid "<command>svn diff -r N:M URL</command> is shorthand for <command>svn diff -r N:M --old=URL --new=URL</command>."
19324 msgstr "<command>svn diff -r N:M URL</command> is shorthand for <command>svn diff -r N:M --old=URL --new=URL</command>."
19326 #. (para)
19327 #: ../source/book.xml:18447
19328 #, fuzzy
19329 msgid "<command>svn diff [-r N[:M]] URL1[@N] URL2[@M]</command> is shorthand for <command>svn diff [-r N[:M]] --old=URL1 --new=URL2</command>."
19330 msgstr "<command>svn diff [-r N[:M]] URL1[@N] URL2[@M]</command>是<command>svn diff [-r N[:M]] --old=URL1 --new=URL2</command>的缩写。"
19332 #. (para)
19333 #: ../source/book.xml:18450
19334 msgid "If <replaceable>TARGET</replaceable> is a URL, then revs N and M can be given either via the <option>--revision</option> or by using <quote>@</quote> notation as described earlier."
19335 msgstr "<replaceable>TARGET</replaceable>是一个URL,然后可以使用前面提到的<option>--revision</option>或<quote>@</quote>符号来指定N和M。"
19337 #. (para)
19338 #: ../source/book.xml:18454
19339 #, fuzzy
19340 msgid "If <replaceable>TARGET</replaceable> is a working copy path, then the <option>--revision</option> option means:"
19341 msgstr "如果<replaceable>TARGET</replaceable>是工作拷贝路径,则<option>--revision</option>选项的含义是:"
19343 #. (option)
19344 #: ../source/book.xml:18460
19345 msgid "--revision N:M"
19346 msgstr "--revision N:M"
19348 #. (para)
19349 #: ../source/book.xml:18463
19350 msgid "The server compares <replaceable>TARGET</replaceable>@<replaceable>N</replaceable> and <replaceable>TARGET</replaceable>@<replaceable>M</replaceable>."
19351 msgstr "服务器比较 <replaceable>TARGET</replaceable>@<replaceable>N</replaceable>和<replaceable>TARGET</replaceable>@<replaceable>M</replaceable>。"
19353 #. (option)
19354 #: ../source/book.xml:18471
19355 msgid "--revision N"
19356 msgstr "--revision N"
19358 #. (para)
19359 #: ../source/book.xml:18474
19360 msgid "The client compares <replaceable>TARGET</replaceable>@<replaceable>N</replaceable> against working copy."
19361 msgstr "客户端比较<replaceable>TARGET</replaceable>@<replaceable>N</replaceable>和工作拷贝。"
19363 #. (term)
19364 #: ../source/book.xml:18480
19365 msgid "(no <option>--revision</option>)"
19366 msgstr "(无<option>--revision</option>)"
19368 #. (para)
19369 #: ../source/book.xml:18482
19370 msgid "The client compares base and working copies of <replaceable>TARGET</replaceable>."
19371 msgstr "客户端比较base和 <replaceable>TARGET</replaceable>的<replaceable>TARGET</replaceable>。"
19373 #. (para)
19374 #: ../source/book.xml:18487
19375 #, fuzzy
19376 msgid "If the alternate syntax is used, the server compares <replaceable>URL1</replaceable> and <replaceable>URL2</replaceable> at revisions <replaceable>N</replaceable> and <replaceable>M</replaceable> respectively. If either <replaceable>N</replaceable> or <replaceable>M</replaceable> are omitted, a value of <literal>HEAD</literal> is assumed."
19377 msgstr "如果使用其他语法,服务器会比较<replaceable>URL1</replaceable>和<replaceable>URL2</replaceable>各自的<replaceable>N</replaceable>和<replaceable>M</replaceable>。如果省掉<replaceable>N</replaceable>或<replaceable>M</replaceable>,会假定为<literal>HEAD</literal>。"
19379 #. (para)
19380 #: ../source/book.xml:18495
19381 #, fuzzy
19382 msgid "By default, <command>svn diff</command> ignores the ancestry of files and merely compares the contents of the two files being compared. If you use <option>--notice-ancestry</option>, the ancestry of the paths in question will be taken into consideration when comparing revisions (that is, if you run <command>svn diff</command> on two files with identical contents but different ancestry you will see the entire contents of the file as having been removed and added again)."
19383 msgstr "缺省情况下,<command>svn diff</command>忽略文件的祖先,只会比较两个文件的内容。如果你使用<option>--notice-ancestry</option>,比较修订版本(也就是,当你运行<command>svn diff</command>比较两个内容相同,但祖先历史不同的对象会看到所有的内容被删除又再次添加)时就会考虑路径的祖先。"
19385 #. (para)
19386 #: ../source/book.xml:18509
19387 msgid "di"
19388 msgstr "di"
19390 #. (para)
19391 #: ../source/book.xml:18521
19392 #, fuzzy
19393 msgid "For obtaining differences against anything but <literal>BASE</literal> revision in your working copy"
19394 msgstr "获得工作拷贝非<literal>BASE</literal>修订版本的区别时会"
19396 #. (screen)
19397 #: ../source/book.xml:18528
19398 #, fuzzy, no-wrap
19399 msgid ""
19400 "\n"
19401 "--revision (-r) ARG\n"
19402 "--change (-c) ARG\n"
19403 "--old ARG\n"
19404 "--new ARG\n"
19405 "--non-recursive (-N)\n"
19406 "--diff-cmd CMD\n"
19407 "--extensions (-x) \"ARGS\"\n"
19408 "--no-diff-deleted\n"
19409 "--notice-ancestry\n"
19410 "--summarize\n"
19411 "--force\n"
19412 "--username USER\n"
19413 "--password PASS\n"
19414 "--no-auth-cache\n"
19415 "--non-interactive\n"
19416 "--config-dir DIR\n"
19417 "\n"
19418 msgstr ""
19419 "\n"
19420 "--revision (-r) REV\n"
19421 "--old OLD-TARGET\n"
19422 "--new NEW-TARGET\n"
19423 "--extensions (-x) \"ARGS\"\n"
19424 "--non-recursive (-N)\n"
19425 "--diff-cmd CMD\n"
19426 "--notice-ancestry\n"
19427 "--username USER\n"
19428 "--password PASS\n"
19429 "--no-auth-cache\n"
19430 "--non-interactive\n"
19431 "--no-diff-deleted\n"
19432 "--config-dir DIR\n"
19434 #. (para)
19435 #: ../source/book.xml:18552
19436 #, fuzzy
19437 msgid "Compare <literal>BASE</literal> and your working copy (one of the most popular uses of <command>svn diff</command>):"
19438 msgstr "比较<literal>BASE</literal>和你的工作拷贝(<command>svn diff</command>最经常的用法):"
19440 #. (screen)
19441 #: ../source/book.xml:18555
19442 #, no-wrap
19443 msgid ""
19444 "\n"
19445 "$ svn diff COMMITTERS \n"
19446 "Index: COMMITTERS\n"
19447 "===================================================================\n"
19448 "--- COMMITTERS\t(revision 4404)\n"
19449 "+++ COMMITTERS\t(working copy)\n"
19450 msgstr ""
19451 "\n"
19452 "$ svn diff COMMITTERS \n"
19453 "Index: COMMITTERS\n"
19454 "===================================================================\n"
19455 "--- COMMITTERS\t(revision 4404)\n"
19456 "+++ COMMITTERS\t(working copy)\n"
19458 #. (para)
19459 #: ../source/book.xml:18562
19460 #, fuzzy
19461 msgid "See what changed in the file <literal>COMMITTERS</literal> revision 9115:"
19462 msgstr "环境变量<literal>EDITOR</literal>"
19464 #. (screen)
19465 #: ../source/book.xml:18564
19466 #, fuzzy, no-wrap
19467 msgid ""
19468 "\n"
19469 "$ svn diff -c 9115 COMMITTERS \n"
19470 "Index: COMMITTERS\n"
19471 "===================================================================\n"
19472 "--- COMMITTERS\t(revision 3900)\n"
19473 "+++ COMMITTERS\t(working copy)\n"
19474 msgstr ""
19475 "\n"
19476 "$ svn diff -r 3900 COMMITTERS \n"
19477 "Index: COMMITTERS\n"
19478 "===================================================================\n"
19479 "--- COMMITTERS\t(revision 3900)\n"
19480 "+++ COMMITTERS\t(working copy)\n"
19482 #. (para)
19483 #: ../source/book.xml:18571
19484 msgid "See how your working copy's modifications compare against an older revision:"
19485 msgstr "察看你的工作拷贝对旧的修订版本的修改:"
19487 #. (screen)
19488 #: ../source/book.xml:18573
19489 #, no-wrap
19490 msgid ""
19491 "\n"
19492 "$ svn diff -r 3900 COMMITTERS \n"
19493 "Index: COMMITTERS\n"
19494 "===================================================================\n"
19495 "--- COMMITTERS\t(revision 3900)\n"
19496 "+++ COMMITTERS\t(working copy)\n"
19497 msgstr ""
19498 "\n"
19499 "$ svn diff -r 3900 COMMITTERS \n"
19500 "Index: COMMITTERS\n"
19501 "===================================================================\n"
19502 "--- COMMITTERS\t(revision 3900)\n"
19503 "+++ COMMITTERS\t(working copy)\n"
19505 #. (para)
19506 #: ../source/book.xml:18580
19507 msgid "Compare revision 3000 to revision 3500 using <quote>@</quote> syntax:"
19508 msgstr "使用<quote>@</quote>语法与修订版本3000和35000比较:"
19510 #. (screen)
19511 #: ../source/book.xml:18582
19512 #, no-wrap
19513 msgid ""
19514 "\n"
19515 "$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500\n"
19516 "Index: COMMITTERS\n"
19517 "===================================================================\n"
19518 "--- COMMITTERS\t(revision 3000)\n"
19519 "+++ COMMITTERS\t(revision 3500)\n"
19520 "…\n"
19521 msgstr ""
19522 "\n"
19523 "$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500\n"
19524 "Index: COMMITTERS\n"
19525 "===================================================================\n"
19526 "--- COMMITTERS\t(revision 3000)\n"
19527 "+++ COMMITTERS\t(revision 3500)\n"
19528 "…\n"
19530 #. (para)
19531 #: ../source/book.xml:18590
19532 msgid "Compare revision 3000 to revision 3500 using range notation (you only pass the one URL in this case):"
19533 msgstr "使用范围符号来比较修订版本3000和3500(在这种情况下只能传递一个URL):"
19535 #. (screen)
19536 #: ../source/book.xml:18593
19537 #, no-wrap
19538 msgid ""
19539 "\n"
19540 "$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS\n"
19541 "Index: COMMITTERS\n"
19542 "===================================================================\n"
19543 "--- COMMITTERS\t(revision 3000)\n"
19544 "+++ COMMITTERS\t(revision 3500)\n"
19545 msgstr ""
19546 "\n"
19547 "$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS\n"
19548 "Index: COMMITTERS\n"
19549 "===================================================================\n"
19550 "--- COMMITTERS\t(revision 3000)\n"
19551 "+++ COMMITTERS\t(revision 3500)\n"
19553 #. (para)
19554 #: ../source/book.xml:18600
19555 #, fuzzy
19556 msgid "Compare revision 3000 to revision 3500 of all files in <filename>trunk</filename> using range notation:"
19557 msgstr "使用范围符号比较修订版本3000和3500<filename>trunk</filename>中的所有文件:"
19559 #. (screen)
19560 #: ../source/book.xml:18602
19561 #, no-wrap
19562 msgid ""
19563 "\n"
19564 "$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk\n"
19565 "          "
19566 msgstr ""
19567 "\n"
19568 "$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk\n"
19569 "          "
19571 #. (para)
19572 #: ../source/book.xml:18605
19573 #, fuzzy
19574 msgid "Compare revision 3000 to revision 3500 of only three files in <filename>trunk</filename> using range notation:"
19575 msgstr "使用范围符号比较修订版本3000和3500<filename>trunk</filename>中的三个文件:"
19577 #. (screen)
19578 #: ../source/book.xml:18608
19579 #, no-wrap
19580 msgid ""
19581 "\n"
19582 "$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING\n"
19583 "          "
19584 msgstr ""
19585 "\n"
19586 "$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING\n"
19587 "          "
19589 #. (para)
19590 #: ../source/book.xml:18611
19591 msgid "If you have a working copy, you can obtain the differences without typing in the long URLs:"
19592 msgstr "如果你有工作拷贝,你不必输入这么长的URL:"
19594 #. (screen)
19595 #: ../source/book.xml:18613
19596 #, no-wrap
19597 msgid ""
19598 "\n"
19599 "$ svn diff -r 3000:3500 COMMITTERS \n"
19600 "Index: COMMITTERS\n"
19601 "===================================================================\n"
19602 "--- COMMITTERS\t(revision 3000)\n"
19603 "+++ COMMITTERS\t(revision 3500)\n"
19604 msgstr ""
19605 "\n"
19606 "$ svn diff -r 3000:3500 COMMITTERS \n"
19607 "Index: COMMITTERS\n"
19608 "===================================================================\n"
19609 "--- COMMITTERS\t(revision 3000)\n"
19610 "+++ COMMITTERS\t(revision 3500)\n"
19612 #. (para)
19613 #: ../source/book.xml:18620
19614 msgid "Use <option>--diff-cmd</option><replaceable>CMD</replaceable><option>-x</option> to pass arguments directly to the external diff program"
19615 msgstr "使用<option>--diff-cmd</option><replaceable>CMD</replaceable><option>-x</option>来指定外部区别程序"
19617 #. (screen)
19618 #: ../source/book.xml:18624
19619 #, no-wrap
19620 msgid ""
19621 "\n"
19622 "$ svn diff --diff-cmd /usr/bin/diff -x \"-i -b\" COMMITTERS \n"
19623 "Index: COMMITTERS\n"
19624 "===================================================================\n"
19625 "0a1,2\n"
19626 "&gt; This is a test\n"
19627 "&gt; \n"
19628 msgstr ""
19629 "\n"
19630 "$ svn diff --diff-cmd /usr/bin/diff -x \"-i -b\" COMMITTERS \n"
19631 "Index: COMMITTERS\n"
19632 "===================================================================\n"
19633 "0a1,2\n"
19634 "&gt; This is a test\n"
19635 "&gt; \n"
19637 #. (tertiary)
19638 #: ../source/book.xml:18638
19639 msgid "export"
19640 msgstr "export"
19642 #. (refname)
19643 #: ../source/book.xml:18641
19644 msgid "svn export"
19645 msgstr "svn export"
19647 #. (refpurpose)
19648 #: ../source/book.xml:18642
19649 msgid "Export a clean directory tree."
19650 msgstr "导出一个干净的目录树。"
19652 #. (programlisting)
19653 #: ../source/book.xml:18648
19654 #, no-wrap
19655 msgid "svn export [-r REV] URL[@PEGREV] [PATH]"
19656 msgstr "svn export [-r REV] URL[@PEGREV] [PATH]"
19658 #. (programlisting)
19659 #: ../source/book.xml:18649
19660 #, no-wrap
19661 msgid "svn export [-r REV] PATH1[@PEGREV] [PATH2]"
19662 msgstr "svn export [-r REV] PATH1[@PEGREV] [PATH2]"
19664 #. (para)
19665 #: ../source/book.xml:18655
19666 #, fuzzy
19667 msgid "The first form exports a clean directory tree from the repository specified by URL, at revision <replaceable>REV</replaceable> if it is given, otherwise at <literal>HEAD</literal>, into <replaceable>PATH</replaceable>. If <replaceable>PATH</replaceable> is omitted, the last component of the <replaceable>URL</replaceable> is used for the local directory name."
19668 msgstr "第一种从版本库导出干净工作目录树的形式是指定URL,如果指定了修订版本<replaceable>REV</replaceable>,会导出相应的版本,如果没有指定修订版本,则会导出<literal>HEAD</literal>,导出到<replaceable>PATH</replaceable>。如果省略<replaceable>PATH</replaceable>,<replaceable>URL</replaceable>的最后一部分会作为本地目录的名字。"
19670 #. (para)
19671 #: ../source/book.xml:18663
19672 msgid "The second form exports a clean directory tree from the working copy specified by <replaceable>PATH1</replaceable> into <replaceable>PATH2</replaceable>. All local changes will be preserved, but files not under version control will not be copied."
19673 msgstr "从工作拷贝导出干净目录树的第二种形式是指定<replaceable>PATH1</replaceable>到<replaceable>PATH2</replaceable>,所有的本地修改将会保留,但是不再版本控制下的文件不会拷贝。"
19675 #. (para)
19676 #: ../source/book.xml:18680
19677 msgid "Local disk"
19678 msgstr "本地磁盘"
19680 #. (para)
19681 #: ../source/book.xml:18686
19682 msgid "Only if exporting from a URL"
19683 msgstr "只有当从URL导出时会访问"
19685 #. (screen)
19686 #: ../source/book.xml:18692
19687 #, no-wrap
19688 msgid ""
19689 "\n"
19690 "--revision (-r) REV\n"
19691 "--quiet (-q)\n"
19692 "--force\n"
19693 "--username USER\n"
19694 "--password PASS\n"
19695 "--no-auth-cache\n"
19696 "--non-interactive\n"
19697 "--non-recursive (-N)\n"
19698 "--config-dir DIR\n"
19699 "--native-eol EOL\n"
19700 "--ignore-externals\n"
19701 msgstr ""
19702 "\n"
19703 "--revision (-r) REV\n"
19704 "--quiet (-q)\n"
19705 "--force\n"
19706 "--username USER\n"
19707 "--password PASS\n"
19708 "--no-auth-cache\n"
19709 "--non-interactive\n"
19710 "--non-recursive (-N)\n"
19711 "--config-dir DIR\n"
19712 "--native-eol EOL\n"
19713 "--ignore-externals\n"
19715 #. (para)
19716 #: ../source/book.xml:18710
19717 msgid "Export from your working copy (doesn't print every file and directory):"
19718 msgstr "从你的工作拷贝导出(不会打印每一个文件和目录):"
19720 #. (screen)
19721 #: ../source/book.xml:18712
19722 #, no-wrap
19723 msgid ""
19724 "\n"
19725 "$ svn export a-wc my-export\n"
19726 "Export complete.\n"
19727 msgstr ""
19728 "\n"
19729 "$ svn export a-wc my-export\n"
19730 "Export complete.\n"
19732 #. (para)
19733 #: ../source/book.xml:18716
19734 msgid "Export directly from the repository (prints every file and directory):"
19735 msgstr "从版本库导出目录(打印所有的文件和目录):"
19737 #. (screen)
19738 #: ../source/book.xml:18718
19739 #, fuzzy, no-wrap
19740 msgid ""
19741 "\n"
19742 "$ svn export file:///var/svn/repos my-export\n"
19743 "A  my-export/test\n"
19744 "A  my-export/quiz\n"
19745 "…\n"
19746 "Exported revision 15.\n"
19747 msgstr ""
19748 "\n"
19749 "$ svn export file:///tmp/repos my-export\n"
19750 "A  my-export/test\n"
19751 "A  my-export/quiz\n"
19752 "…\n"
19753 "Exported revision 15.\n"
19755 #. (para)
19756 #: ../source/book.xml:18725
19757 #, fuzzy
19758 msgid "When rolling operating-system-specific release packages, it can be useful to export a tree which uses a specific EOL character for line endings. The <option>--native-eol</option> option will do this, but it only affects files that have <literal>svn:eol-style = native</literal> properties attached to them. For example, to export a tree with all CRLF line endings (possibly for a Windows .zip file distribution):"
19759 msgstr "当使用操作系统特定的分发版本,使用特定的EOL字符作为行结束符号导出一棵树会非常有用。<option>--native-eol</option>选项会这样做,但是如果影响的文件拥有<literal>svn:eol-style = native</literal>属性,举个例子,导出一棵使用CRLF作为行结束的树(可能是为了做一个Windows的.zip文件分发版本):"
19761 #. (screen)
19762 #: ../source/book.xml:18733
19763 #, fuzzy, no-wrap
19764 msgid ""
19765 "\n"
19766 "$ svn export file:///var/svn/repos my-export --native-eol CRLF\n"
19767 "A  my-export/test\n"
19768 "A  my-export/quiz\n"
19769 "…\n"
19770 "Exported revision 15.\n"
19771 msgstr ""
19772 "\n"
19773 "$ svn export file:///tmp/repos my-export --native-eol CRLF\n"
19774 "A  my-export/test\n"
19775 "A  my-export/quiz\n"
19776 "…\n"
19777 "Exported revision 15.\n"
19779 #. (para)
19780 #: ../source/book.xml:18740
19781 #, fuzzy
19782 msgid "You can specify <literal>LR</literal>, <literal>CR</literal>, or <literal>CRLF</literal> as a line ending type with the <option>--native-eol</option> option."
19783 msgstr "变更描述:<literal>A</literal> (添加的),<literal>D</literal> (删除的)或<literal>M</literal> (修改的)"
19785 #. (tertiary)
19786 #: ../source/book.xml:18750 ../source/book.xml:21616 ../source/book.xml:22640
19787 msgid "help"
19788 msgstr "help"
19790 #. (refname)
19791 #: ../source/book.xml:18753
19792 msgid "svn help"
19793 msgstr "svn help"
19795 #. (programlisting)
19796 #: ../source/book.xml:18760
19797 #, no-wrap
19798 msgid "svn help [SUBCOMMAND...]"
19799 msgstr "svn help [SUBCOMMAND...]"
19801 #. (para)
19802 #: ../source/book.xml:18766
19803 msgid "This is your best friend when you're using Subversion and this book isn't within reach!"
19804 msgstr "当手边没有这本书时,这是你使用Subversion最好的朋友!"
19806 #. (para)
19807 #: ../source/book.xml:18773 ../source/book.xml:21642 ../source/book.xml:22665
19808 msgid "?, h"
19809 msgstr "?, h"
19811 #. (para)
19812 #: ../source/book.xml:18774
19813 #, fuzzy
19814 msgid "The options <option>-?</option>, <option>-h</option> and <option>--help</option> have the same effect as using the <command>help</command> subcommand."
19815 msgstr "不访问"
19817 #. (screen)
19818 #: ../source/book.xml:18794
19819 #, fuzzy, no-wrap
19820 msgid ""
19821 "\n"
19822 "--config-dir DIR\n"
19823 msgstr "--config-dir"
19825 #. (tertiary)
19826 #: ../source/book.xml:18803
19827 msgid "import"
19828 msgstr "import"
19830 #. (refpurpose)
19831 #: ../source/book.xml:18807
19832 msgid "Commit an unversioned file or tree into the repository."
19833 msgstr "递归提交一个路径的拷贝到版本库。"
19835 #. (programlisting)
19836 #: ../source/book.xml:18814
19837 #, no-wrap
19838 msgid "svn import [PATH] URL"
19839 msgstr "svn import [PATH] URL"
19841 #. (para)
19842 #: ../source/book.xml:18820
19843 #, fuzzy
19844 msgid "Recursively commit a copy of <replaceable>PATH</replaceable> to <replaceable>URL</replaceable>. If <replaceable>PATH</replaceable> is omitted <quote><filename>.</filename></quote> is assumed. Parent directories are created in the repository as necessary."
19845 msgstr "递归提交一个路径的拷贝到URL。如果省略<replaceable>PATH</replaceable>,默认是<quote><filename>.</filename></quote>。版本库中对应的父目录必须已经创建。"
19847 #. (para)
19848 #: ../source/book.xml:18838
19849 msgid "Repository"
19850 msgstr "版本库"
19852 #. (screen)
19853 #: ../source/book.xml:18850
19854 #, no-wrap
19855 msgid ""
19856 "\n"
19857 "--message (-m) TEXT\n"
19858 "--file (-F) FILE\n"
19859 "--quiet (-q)\n"
19860 "--non-recursive (-N)\n"
19861 "--username USER\n"
19862 "--password PASS\n"
19863 "--no-auth-cache\n"
19864 "--non-interactive\n"
19865 "--force-log\n"
19866 "--editor-cmd EDITOR\n"
19867 "--encoding ENC\n"
19868 "--config-dir DIR\n"
19869 "--auto-props\n"
19870 "--no-auto-props\n"
19871 "--ignore-externals\n"
19872 msgstr ""
19873 "\n"
19874 "--message (-m) TEXT\n"
19875 "--file (-F) FILE\n"
19876 "--quiet (-q)\n"
19877 "--non-recursive (-N)\n"
19878 "--username USER\n"
19879 "--password PASS\n"
19880 "--no-auth-cache\n"
19881 "--non-interactive\n"
19882 "--force-log\n"
19883 "--editor-cmd EDITOR\n"
19884 "--encoding ENC\n"
19885 "--config-dir DIR\n"
19886 "--auto-props\n"
19887 "--no-auto-props\n"
19888 "--ignore-externals\n"
19890 #. (para)
19891 #: ../source/book.xml:18872
19892 #, fuzzy
19893 msgid "This imports the local directory <filename>myproj</filename> into <filename>trunk/misc</filename> in your repository. The directory <filename>trunk/misc</filename> need not exist before you import into it—<command>svn import</command> will recursively create directories for you."
19894 msgstr "这将本地目录<filename>myproj</filename>导入到版本库的<filename>trunk/misc</filename>,<filename>trunk/misc</filename>在导入之前不需要存在—<command>svn import</command>会递归的为你创建目录:"
19896 #. (screen)
19897 #: ../source/book.xml:18879
19898 #, fuzzy, no-wrap
19899 msgid ""
19900 "\n"
19901 "$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc\n"
19902 "Adding         myproj/sample.txt\n"
19903 "…\n"
19904 "Transmitting file data .........\n"
19905 "Committed revision 16.\n"
19906 msgstr ""
19907 "\n"
19908 "$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/test\n"
19909 "Adding         myproj/sample.txt\n"
19910 "…\n"
19911 "Transmitting file data .........\n"
19912 "Committed revision 16.\n"
19914 #. (para)
19915 #: ../source/book.xml:18886
19916 #, fuzzy
19917 msgid "Be aware that this will <emphasis>not</emphasis> create a directory named <filename>myproj</filename> in the repository. If that's what you want, simply add <filename>myproj</filename> to the end of the URL:"
19918 msgstr "在上一个例子里,将会拷贝目录<filename>mytree</filename>到版本库的<filename>some/project</filename>下:"
19920 #. (screen)
19921 #: ../source/book.xml:18890
19922 #, fuzzy, no-wrap
19923 msgid ""
19924 "\n"
19925 "$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc/myproj\n"
19926 "Adding         myproj/sample.txt\n"
19927 "…\n"
19928 "Transmitting file data .........\n"
19929 "Committed revision 16.\n"
19930 msgstr ""
19931 "\n"
19932 "$ svn import -m \"New import\" myproj \\\n"
19933 "    http://svn.red-bean.com/repos/test/trunk/misc/myproj\n"
19934 "Adding         myproj/sample.txt\n"
19935 "…\n"
19936 "Transmitting file data .........\n"
19937 "Committed revision 19.\n"
19939 #. (para)
19940 #: ../source/book.xml:18897
19941 #, fuzzy
19942 msgid "After importing data, note that the original tree is <emphasis>not</emphasis> under version control. To start working, you still need to <command>svn checkout</command> a fresh working copy of the tree."
19943 msgstr "在导入数据之后,你会发现原先的目录树<emphasis>并没有</emphasis>纳入版本控制,为了开始工作,你还是要运行<command>svn checkout</command>得到一个干净的目录树工作拷贝。"
19945 #. (tertiary)
19946 #: ../source/book.xml:18907 ../source/book.xml:22735
19947 msgid "info"
19948 msgstr "info"
19950 #. (refname)
19951 #: ../source/book.xml:18910
19952 msgid "svn info"
19953 msgstr "svn info"
19955 #. (refpurpose)
19956 #: ../source/book.xml:18911
19957 msgid "Display information about a local or remote item."
19958 msgstr "显示本地或远程条目的信息。"
19960 #. (programlisting)
19961 #: ../source/book.xml:18918
19962 #, fuzzy, no-wrap
19963 msgid "svn info [TARGET[@REV]...]"
19964 msgstr "svn list [TARGET[@REV]...]"
19966 #. (para)
19967 #: ../source/book.xml:18924
19968 msgid "Print information about the working copy paths or URLs specified. The information shown for both may include:"
19969 msgstr "打印你的工作拷贝路径和URL的信息,包括:"
19971 #. (para)
19972 #: ../source/book.xml:18929
19973 msgid "Path"
19974 msgstr "路经"
19976 #. (para)
19977 #: ../source/book.xml:18932
19978 msgid "Name"
19979 msgstr "名称"
19981 #. (para)
19982 #: ../source/book.xml:18935
19983 msgid "URL"
19984 msgstr "URL"
19986 #. (para)
19987 #: ../source/book.xml:18938
19988 msgid "Repository Root"
19989 msgstr "版本库的根"
19991 #. (para)
19992 #: ../source/book.xml:18941
19993 msgid "Repository UUID"
19994 msgstr "版本库的UUID"
19996 #. (para)
19997 #: ../source/book.xml:18947
19998 msgid "Node Kind"
19999 msgstr "节点类型"
20001 #. (para)
20002 #: ../source/book.xml:18950
20003 msgid "Last Changed Author"
20004 msgstr "最后修改的作者"
20006 #. (para)
20007 #: ../source/book.xml:18953
20008 msgid "Last Changed Revision"
20009 msgstr "最后修改的修订版本"
20011 #. (para)
20012 #: ../source/book.xml:18956
20013 msgid "Last Changed Date"
20014 msgstr "最后修改的日期"
20016 #. (para)
20017 #: ../source/book.xml:18959
20018 msgid "Lock Token"
20019 msgstr "锁定令牌"
20021 #. (para)
20022 #: ../source/book.xml:18962
20023 msgid "Lock Owner"
20024 msgstr "锁定拥有者"
20026 #. (para)
20027 #: ../source/book.xml:18965
20028 msgid "Lock Created (date)"
20029 msgstr "锁定创建时间"
20031 #. (para)
20032 #: ../source/book.xml:18968
20033 msgid "Lock Expires (date)"
20034 msgstr "Lock Expires (date)"
20036 #. (para)
20037 #: ../source/book.xml:18971
20038 msgid "Additional kinds of information available only for working copy paths are:"
20039 msgstr "Additional kinds of information available only for working copy paths are:"
20041 #. (para)
20042 #: ../source/book.xml:18975
20043 msgid "Schedule"
20044 msgstr "Schedule"
20046 #. (para)
20047 #: ../source/book.xml:18978
20048 msgid "Copied From URL"
20049 msgstr "Copied From URL"
20051 #. (para)
20052 #: ../source/book.xml:18981
20053 msgid "Copied From Rev"
20054 msgstr "Copied From Rev"
20056 #. (para)
20057 #: ../source/book.xml:18984
20058 msgid "Text Last Updated"
20059 msgstr "Text Last Updated"
20061 #. (para)
20062 #: ../source/book.xml:18987
20063 msgid "Properties Last Updated"
20064 msgstr "Properties Last Updated"
20066 #. (para)
20067 #: ../source/book.xml:18990
20068 msgid "Checksum"
20069 msgstr "Checksum"
20071 #. (para)
20072 #: ../source/book.xml:18993
20073 msgid "Conflict Previous Base File"
20074 msgstr "Conflict Previous Base File"
20076 #. (para)
20077 #: ../source/book.xml:18996
20078 msgid "Conflict Previous Working File"
20079 msgstr "Conflict Previous Working File"
20081 #. (para)
20082 #: ../source/book.xml:18999
20083 msgid "Conflict Current Base File"
20084 msgstr "Conflict Current Base File"
20086 #. (para)
20087 #: ../source/book.xml:19002
20088 msgid "Conflict Properties File"
20089 msgstr "Conflict Properties File"
20091 #. (screen)
20092 #: ../source/book.xml:19028
20093 #, no-wrap
20094 msgid ""
20095 "\n"
20096 "--revision (-r) REV\n"
20097 "--recursive (-R)\n"
20098 "--targets FILENAME\n"
20099 "--incremental\n"
20100 "--xml\n"
20101 "--username USER\n"
20102 "--password PASS\n"
20103 "--no-auth-cache\n"
20104 "--non-interactive\n"
20105 "--config-dir DIR\n"
20106 msgstr ""
20107 "\n"
20108 "--revision (-r) REV\n"
20109 "--recursive (-R)\n"
20110 "--targets FILENAME\n"
20111 "--incremental\n"
20112 "--xml\n"
20113 "--username USER\n"
20114 "--password PASS\n"
20115 "--no-auth-cache\n"
20116 "--non-interactive\n"
20117 "--config-dir DIR\n"
20119 #. (para)
20120 #: ../source/book.xml:19045
20121 #, fuzzy
20122 msgid "<command>svn info</command> will show you all the useful information that it has for items in your working copy. It will show information for files:"
20123 msgstr "<command>svn info</command>会展示所有项目的所有有用信息,它会显示文件的信息:"
20125 #. (screen)
20126 #: ../source/book.xml:19048
20127 #, no-wrap
20128 msgid ""
20129 "\n"
20130 "$ svn info foo.c\n"
20131 "Path: foo.c\n"
20132 "Name: foo.c\n"
20133 "URL: http://svn.red-bean.com/repos/test/foo.c\n"
20134 "Repository Root: http://svn.red-bean.com/repos/test\n"
20135 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20136 "Revision: 4417\n"
20137 "Node Kind: file\n"
20138 "Schedule: normal\n"
20139 "Last Changed Author: sally\n"
20140 "Last Changed Rev: 20\n"
20141 "Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)\n"
20142 "Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)\n"
20143 "Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)\n"
20144 "Checksum: d6aeb60b0662ccceb6bce4bac344cb66\n"
20145 msgstr ""
20146 "\n"
20147 "$ svn info foo.c\n"
20148 "Path: foo.c\n"
20149 "Name: foo.c\n"
20150 "URL: http://svn.red-bean.com/repos/test/foo.c\n"
20151 "Repository Root: http://svn.red-bean.com/repos/test\n"
20152 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20153 "Revision: 4417\n"
20154 "Node Kind: file\n"
20155 "Schedule: normal\n"
20156 "Last Changed Author: sally\n"
20157 "Last Changed Rev: 20\n"
20158 "Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)\n"
20159 "Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)\n"
20160 "Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)\n"
20161 "Checksum: /3L38YwzhT93BWvgpdF6Zw==\n"
20163 #. (para)
20164 #: ../source/book.xml:19065
20165 msgid "It will also show information for directories:"
20166 msgstr "它也会展示目录的信息:"
20168 #. (screen)
20169 #: ../source/book.xml:19066
20170 #, no-wrap
20171 msgid ""
20172 "\n"
20173 "$ svn info vendors\n"
20174 "Path: vendors\n"
20175 "URL: http://svn.red-bean.com/repos/test/vendors\n"
20176 "Repository Root: http://svn.red-bean.com/repos/test\n"
20177 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20178 "Revision: 19\n"
20179 "Node Kind: directory\n"
20180 "Schedule: normal\n"
20181 "Last Changed Author: harry\n"
20182 "Last Changed Rev: 19\n"
20183 "Last Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003)\n"
20184 "Properties Last Updated: 2003-01-16 23:39:02 -0600 (Thu, 16 Jan 2003)\n"
20185 msgstr ""
20186 "\n"
20187 "$ svn info vendors\n"
20188 "Path: vendors\n"
20189 "URL: http://svn.red-bean.com/repos/test/vendors\n"
20190 "Repository Root: http://svn.red-bean.com/repos/test\n"
20191 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20192 "Revision: 19\n"
20193 "Node Kind: directory\n"
20194 "Schedule: normal\n"
20195 "Last Changed Author: harry\n"
20196 "Last Changed Rev: 19\n"
20197 "Last Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003)\n"
20199 #. (para)
20200 #: ../source/book.xml:19080
20201 #, fuzzy
20202 msgid "<command>svn info</command> also acts on URLs (also note that the file readme.doc in this example is locked, so lock information is also provided):"
20203 msgstr "<command>svn info</command>也可以针对URL操作(另外,可以注意一下例子中的readme.doc文件已经被锁定,所以也会显示锁定信息):"
20205 #. (screen)
20206 #: ../source/book.xml:19083
20207 #, no-wrap
20208 msgid ""
20209 "\n"
20210 "$ svn info http://svn.red-bean.com/repos/test/readme.doc\n"
20211 "Path: readme.doc\n"
20212 "Name: readme.doc\n"
20213 "URL: http://svn.red-bean.com/repos/test/readme.doc\n"
20214 "Repository Root: http://svn.red-bean.com/repos/test\n"
20215 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20216 "Revision: 1\n"
20217 "Node Kind: file\n"
20218 "Schedule: normal\n"
20219 "Last Changed Author: sally\n"
20220 "Last Changed Rev: 42\n"
20221 "Last Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n"
20222 "Lock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2\n"
20223 "Lock Owner: harry\n"
20224 "Lock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003)\n"
20225 "Lock Comment (1 line):\n"
20226 "My test lock comment\n"
20227 msgstr ""
20228 "\n"
20229 "$ svn info http://svn.red-bean.com/repos/test/readme.doc\n"
20230 "Path: readme.doc\n"
20231 "Name: readme.doc\n"
20232 "URL: http://svn.red-bean.com/repos/test/readme.doc\n"
20233 "Repository Root: http://svn.red-bean.com/repos/test\n"
20234 "Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n"
20235 "Revision: 1\n"
20236 "Node Kind: file\n"
20237 "Schedule: normal\n"
20238 "Last Changed Author: sally\n"
20239 "Last Changed Rev: 42\n"
20240 "Last Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n"
20241 "Text Last Updated: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n"
20242 "Checksum: d41d8cd98f00b204e9800998ecf8427e\n"
20243 "Lock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2\n"
20244 "Lock Owner: harry\n"
20245 "Lock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003)\n"
20247 #. (tertiary)
20248 #: ../source/book.xml:19108
20249 msgid "list"
20250 msgstr "list"
20252 #. (refpurpose)
20253 #: ../source/book.xml:19112
20254 msgid "List directory entries in the repository."
20255 msgstr "列出版本库目录的条目。"
20257 #. (programlisting)
20258 #: ../source/book.xml:19118
20259 #, no-wrap
20260 msgid "svn list [TARGET[@REV]...]"
20261 msgstr "svn list [TARGET[@REV]...]"
20263 #. (para)
20264 #: ../source/book.xml:19124
20265 msgid "List each <replaceable>TARGET</replaceable> file and the contents of each <replaceable>TARGET</replaceable> directory as they exist in the repository. If <replaceable>TARGET</replaceable> is a working copy path, the corresponding repository URL will be used."
20266 msgstr "列出每一个<replaceable>TARGET</replaceable>文件和<replaceable>TARGET</replaceable>目录的内容,如果<replaceable>TARGET</replaceable>是工作拷贝路径,会使用对应的版本库URL。"
20268 #. (para)
20269 #: ../source/book.xml:19129
20270 #, fuzzy
20271 msgid "The default <replaceable>TARGET</replaceable> is <quote><filename>.</filename></quote>, meaning the repository URL of the current working copy directory."
20272 msgstr "缺省的<replaceable>TARGET</replaceable>是<quote><filename>.</filename></quote>,意味着当前工作拷贝的版本库URL。"
20274 #. (para)
20275 #: ../source/book.xml:19133
20276 #, fuzzy
20277 msgid "With <option>--verbose</option>, <command>svn list</command> shows the following fields for each item:"
20278 msgstr "如果一个客户端连接到<command>svnserve</command>进程,如下事情会发生:"
20280 #. (para)
20281 #: ../source/book.xml:19138
20282 msgid "Revision number of the last commit"
20283 msgstr "最后一次提交的修订版本号"
20285 #. (para)
20286 #: ../source/book.xml:19142
20287 msgid "Author of the last commit"
20288 msgstr "最后一次提交的作者"
20290 #. (para)
20291 #: ../source/book.xml:19145
20292 msgid "If locked, the letter <quote>O</quote> (See <xref linkend=\"svn.ref.svn.c.info\"/> for details)."
20293 msgstr "如果锁定,字符为<quote>O</quote>(更多细节见<xref linkend=\"svn.ref.svn.c.info\"/>)"
20295 #. (para)
20296 #: ../source/book.xml:19148
20297 msgid "Size (in bytes)"
20298 msgstr "大小(单位字节)"
20300 #. (para)
20301 #: ../source/book.xml:19151
20302 msgid "Date and time of the last commit"
20303 msgstr "最后提交的日期时间"
20305 #. (para)
20306 #: ../source/book.xml:19155
20307 msgid "With <option>--xml</option>, output is in XML format (with a header and an enclosing document element unless <option>--incremental</option> is also specified). All of the information is present; the <option>--verbose</option> option is not accepted."
20308 msgstr "使用选项<option>--xml</option>,输出是XML格式(如果没有指定<option>--incremental</option>,会包括一个头和一个围绕的元素)。会展示所有的信息;不接受<option>--verbose</option>选项。"
20310 #. (para)
20311 #: ../source/book.xml:19165
20312 msgid "ls"
20313 msgstr "ls"
20315 #. (screen)
20316 #: ../source/book.xml:19183
20317 #, no-wrap
20318 msgid ""
20319 "\n"
20320 "--revision (-r) REV\n"
20321 "--verbose (-v)\n"
20322 "--recursive (-R)\n"
20323 "--incremental\n"
20324 "--xml\n"
20325 "--username USER\n"
20326 "--password PASS\n"
20327 "--no-auth-cache\n"
20328 "--non-interactive\n"
20329 "--config-dir DIR\n"
20330 msgstr ""
20331 "\n"
20332 "--revision (-r) REV\n"
20333 "--verbose (-v)\n"
20334 "--recursive (-R)\n"
20335 "--incremental\n"
20336 "--xml\n"
20337 "--username USER\n"
20338 "--password PASS\n"
20339 "--no-auth-cache\n"
20340 "--non-interactive\n"
20341 "--config-dir DIR\n"
20343 #. (para)
20344 #: ../source/book.xml:19200
20345 #, fuzzy
20346 msgid "<command>svn list</command> is most useful if you want to see what files a repository has without downloading a working copy:"
20347 msgstr "如果你希望在没有下载工作拷贝时察看版本库有哪些文件,<command>svn list</command>会非常有用:"
20349 #. (screen)
20350 #: ../source/book.xml:19203
20351 #, no-wrap
20352 msgid ""
20353 "\n"
20354 "$ svn list http://svn.red-bean.com/repos/test/support\n"
20355 "README.txt\n"
20356 "INSTALL\n"
20357 "examples/\n"
20358 "…\n"
20359 msgstr ""
20360 "\n"
20361 "$ svn list http://svn.red-bean.com/repos/test/support\n"
20362 "README.txt\n"
20363 "INSTALL\n"
20364 "examples/\n"
20365 "…\n"
20367 #. (para)
20368 #: ../source/book.xml:19210
20369 #, fuzzy
20370 msgid "You can pass the <option>--verbose</option> option for additional information, rather like the UNIX command <command>ls -l</command>:"
20371 msgstr "你也可以传递<option>--verbose</option>选项来得到额外信息,非常类似UNIX的<command>ls -l</command>命令:"
20373 #. (screen)
20374 #: ../source/book.xml:19213
20375 #, fuzzy, no-wrap
20376 msgid ""
20377 "\n"
20378 "$ svn list --verbose file:///var/svn/repos\n"
20379 "     16 sally         28361 Jan 16 23:18 README.txt\n"
20380 "     27 sally             0 Jan 18 15:27 INSTALL\n"
20381 "     24 harry               Jan 18 11:27 examples/\n"
20382 msgstr ""
20383 "\n"
20384 "$ svn list --verbose file:///tmp/repos\n"
20385 "     16 sally         28361 Jan 16 23:18 README.txt\n"
20386 "     27 sally             0 Jan 18 15:27 INSTALL\n"
20387 "     24 harry               Jan 18 11:27 examples/\n"
20389 #. (para)
20390 #: ../source/book.xml:19219
20391 msgid "For further details, see <xref linkend=\"svn.tour.history.browsing.list\"/>."
20392 msgstr "更多细节见<xref linkend=\"svn.tour.history.browsing.list\"/>。"
20394 #. (tertiary)
20395 #: ../source/book.xml:19226 ../source/book.xml:22783
20396 msgid "lock"
20397 msgstr "lock"
20399 #. (refname)
20400 #: ../source/book.xml:19229
20401 msgid "svn lock"
20402 msgstr "svn lock"
20404 #. (refpurpose)
20405 #: ../source/book.xml:19230
20406 msgid "Lock working copy paths or URLs in the repository, so that no other user can commit changes to them."
20407 msgstr "锁定版本库的工作拷贝路径或URL,所以没有其他用户可以提交这些文件的修改。"
20409 #. (programlisting)
20410 #: ../source/book.xml:19238
20411 #, no-wrap
20412 msgid "svn lock TARGET..."
20413 msgstr "Synopsis"
20415 #. (para)
20416 #: ../source/book.xml:19244
20417 msgid "Lock each <replaceable>TARGET</replaceable>. If any <replaceable>TARGET</replaceable> is already locked by another user, print a warning and continue locking the rest of the <replaceable>TARGET</replaceable>s. Use <option>--force</option> to steal a lock from another user or working copy."
20418 msgstr "svn lock TARGET..."
20420 #. (para)
20421 #: ../source/book.xml:19261 ../source/book.xml:21059
20422 msgid "Working Copy, Repository"
20423 msgstr "锁定每个<replaceable>TARGET</replaceable>。如果任何<replaceable>TARGET</replaceable>已经被另一个用户锁定,则会打印警告信息并且继续锁定剩下的<replaceable>TARGET</replaceable>。可以使用<option>--force</option>从其它用户来窃取锁定。"
20425 #. (screen)
20426 #: ../source/book.xml:19273
20427 #, no-wrap
20428 msgid ""
20429 "\n"
20430 "--targets FILENAME\n"
20431 "--message (-m) TEXT\n"
20432 "--file (-F) FILE\n"
20433 "--force-log\n"
20434 "--encoding ENC\n"
20435 "--username USER\n"
20436 "--password PASS\n"
20437 "--no-auth-cache\n"
20438 "--non-interactive\n"
20439 "--config-dir DIR\n"
20440 "--force\n"
20441 msgstr ""
20442 "\n"
20443 "--targets FILENAME\n"
20444 "--message (-m) TEXT\n"
20445 "--file (-F) FILE\n"
20446 "--force-log\n"
20447 "--encoding ENC\n"
20448 "--username USER\n"
20449 "--password PASS\n"
20450 "--no-auth-cache\n"
20451 "--non-interactive\n"
20452 "--config-dir DIR\n"
20453 "--force\n"
20455 #. (para)
20456 #: ../source/book.xml:19291
20457 msgid "Lock two files in your working copy:"
20458 msgstr "在工作拷贝锁定两个文件:"
20460 #. (screen)
20461 #: ../source/book.xml:19292
20462 #, no-wrap
20463 msgid ""
20464 "\n"
20465 "\n"
20466 "$ svn lock tree.jpg house.jpg\n"
20467 "'tree.jpg' locked by user 'harry'.\n"
20468 "'house.jpg' locked by user 'harry'.\n"
20469 msgstr ""
20470 "\n"
20471 "\n"
20472 "$ svn lock tree.jpg house.jpg\n"
20473 "'tree.jpg' locked by user 'harry'.\n"
20474 "'house.jpg' locked by user 'harry'.\n"
20476 #. (para)
20477 #: ../source/book.xml:19298
20478 msgid "Lock a file in your working copy that is currently locked by another user:"
20479 msgstr "锁定工作拷贝的一个被其它用户锁定的文件:"
20481 #. (screen)
20482 #: ../source/book.xml:19300
20483 #, fuzzy, no-wrap
20484 msgid ""
20485 "\n"
20486 "$ svn lock tree.jpg\n"
20487 "svn: warning: Path '/tree.jpg is already locked by user 'sally in \\\n"
20488 "     filesystem '/var/svn/repos/db'\n"
20489 "\n"
20490 "$ svn lock --force tree.jpg\n"
20491 "'tree.jpg' locked by user 'harry'.\n"
20492 msgstr ""
20493 "\n"
20494 "$ svn lock tree.jpg\n"
20495 "svn: warning: Path '/tree.jpg is already locked by user 'harry in \\\n"
20496 "     filesystem '/svn/repos/db'\n"
20497 "\n"
20498 "$ svn lock --force foo\n"
20499 "'tree.jpg' locked by user 'sally'.\n"
20501 #. (para)
20502 #: ../source/book.xml:19308
20503 msgid "Lock a file without a working copy:"
20504 msgstr "没有工作拷贝的情况下锁定文件:"
20506 #. (screen)
20507 #: ../source/book.xml:19309
20508 #, fuzzy, no-wrap
20509 msgid ""
20510 "\n"
20511 "$ svn lock http://svn.red-bean.com/repos/test/tree.jpg\n"
20512 "'tree.jpg' locked by user 'harry'.\n"
20513 msgstr ""
20514 "\n"
20515 "$ svn lock http://svn.red-bean.com/repos/test/tree.jpg\n"
20516 "'tree.jpg' locked by user 'sally'.\n"
20518 #. (para)
20519 #: ../source/book.xml:19313 ../source/book.xml:21105
20520 msgid "For further details, see <xref linkend=\"svn.advanced.locking\"/>."
20521 msgstr "更多细节见<xref linkend=\"svn.advanced.locking\"/>。"
20523 #. (tertiary)
20524 #: ../source/book.xml:19320 ../source/book.xml:22832
20525 msgid "log"
20526 msgstr "log"
20528 #. (refpurpose)
20529 #: ../source/book.xml:19324
20530 msgid "Display commit log messages."
20531 msgstr "显示提交日志信息。"
20533 #. (programlisting)
20534 #: ../source/book.xml:19330
20535 #, no-wrap
20536 msgid "svn log [PATH]"
20537 msgstr "svn log [PATH]"
20539 #. (programlisting)
20540 #: ../source/book.xml:19331
20541 #, no-wrap
20542 msgid "svn log URL [PATH...]"
20543 msgstr "svn log URL [PATH...]"
20545 #. (programlisting)
20546 #: ../source/book.xml:19332
20547 #, fuzzy, no-wrap
20548 msgid "svn log URL[@REV] [PATH...]"
20549 msgstr "svn log URL [PATH...]"
20551 #. (para)
20552 #: ../source/book.xml:19338
20553 #, fuzzy
20554 msgid "Shows log messages from the repository. If no arguments are supplied, <command>svn log</command> shows the log messages for all files and directories inside of (and including) the current working directory of your working copy. You can refine the results by specifying a path, one or more revisions, or any combination of the two. The default revision range for a local path is <literal>BASE:1</literal>."
20555 msgstr "缺省目标是你的当前目录的路径,如果没有提供参数,<command>svn log</command>会显示当前目录下的所有文件和目录的日志信息,你可以通过指定路径来精炼结果,一个或多个修订版本,或者是任何两个的组合。对于本地路径的缺省修订版本范围<literal>BASE:1</literal>。"
20557 #. (para)
20558 #: ../source/book.xml:19346
20559 #, fuzzy
20560 msgid "If you specify a URL alone, then it prints log messages for everything that the URL contains. If you add paths past the URL, only messages for those paths under that URL will be printed. The default revision range for a URL is <literal>HEAD:1</literal>."
20561 msgstr "如果你只是指定一个URL,就会打印这个URL上所有的日志信息,如果添加部分路径,只有这条路径下的URL信息会被打印,URL缺省的修订版本范围是<literal>HEAD:1</literal>。"
20563 #. (para)
20564 #: ../source/book.xml:19351
20565 #, fuzzy
20566 msgid "With <option>--verbose</option>, <command>svn log</command> will also print all affected paths with each log message. With <option>--quiet</option>, <command>svn log</command> will not print the log message body itself (this is compatible with <option>--verbose</option>)."
20567 msgstr "<command>svn log</command>使用<option>--verbose</option>选项也会打印所有影响路径的日志信息,使用<option>--quiet</option>选项不会打印日志信息正文本身(这与<option>--verbose</option>协调一致)。"
20569 #. (para)
20570 #: ../source/book.xml:19356
20571 msgid "Each log message is printed just once, even if more than one of the affected paths for that revision were explicitly requested. Logs follow copy history by default. Use <option>--stop-on-copy</option> to disable this behavior, which can be useful for determining branch points."
20572 msgstr "每个日志信息只会打印一次,即使是那些明确请求不止一次的路径,日志会跟随在拷贝过程中,使用<option>--stop-on-copy</option>可以关闭这个特性,可以用来监测分支点。"
20574 #. (screen)
20575 #: ../source/book.xml:19385
20576 #, no-wrap
20577 msgid ""
20578 "\n"
20579 "--revision (-r) REV\n"
20580 "--quiet (-q)\n"
20581 "--verbose (-v)\n"
20582 "--targets FILENAME\n"
20583 "--stop-on-copy\n"
20584 "--incremental\n"
20585 "--limit NUM\n"
20586 "--xml\n"
20587 "--username USER\n"
20588 "--password PASS\n"
20589 "--no-auth-cache\n"
20590 "--non-interactive\n"
20591 "--config-dir DIR\n"
20592 msgstr ""
20593 "\n"
20594 "--revision (-r) REV\n"
20595 "--quiet (-q)\n"
20596 "--verbose (-v)\n"
20597 "--targets FILENAME\n"
20598 "--stop-on-copy\n"
20599 "--incremental\n"
20600 "--limit NUM\n"
20601 "--xml\n"
20602 "--username USER\n"
20603 "--password PASS\n"
20604 "--no-auth-cache\n"
20605 "--non-interactive\n"
20606 "--config-dir DIR\n"
20608 #. (para)
20609 #: ../source/book.xml:19405
20610 #, fuzzy
20611 msgid "You can see the log messages for all the paths that changed in your working copy by running <command>svn log</command> from the top:"
20612 msgstr "你可以在顶级目录运行<command>svn log</command>看到工作拷贝中所有修改的路径的日志信息:"
20614 #. (screen)
20615 #: ../source/book.xml:19408
20616 #, no-wrap
20617 msgid ""
20618 "\n"
20619 "$ svn log\n"
20620 "------------------------------------------------------------------------\n"
20621 "r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n"
20622 "\n"
20623 "Tweak.\n"
20624 "------------------------------------------------------------------------\n"
20625 "r17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines\n"
20626 "…\n"
20627 msgstr ""
20628 "\n"
20629 "$ svn log\n"
20630 "------------------------------------------------------------------------\n"
20631 "r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n"
20632 "\n"
20633 "Tweak.\n"
20634 "------------------------------------------------------------------------\n"
20635 "r17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines\n"
20636 "…\n"
20638 #. (para)
20639 #: ../source/book.xml:19418
20640 msgid "Examine all log messages for a particular file in your working copy:"
20641 msgstr "检验一个特定文件所有的日志信息:"
20643 #. (screen)
20644 #: ../source/book.xml:19420
20645 #, no-wrap
20646 msgid ""
20647 "\n"
20648 "$ svn log foo.c\n"
20649 "------------------------------------------------------------------------\n"
20650 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20651 "\n"
20652 "Added defines.\n"
20653 "------------------------------------------------------------------------\n"
20654 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20655 "…\n"
20656 msgstr ""
20657 "\n"
20658 "$ svn log foo.c\n"
20659 "------------------------------------------------------------------------\n"
20660 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20661 "\n"
20662 "Added defines.\n"
20663 "------------------------------------------------------------------------\n"
20664 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20665 "…\n"
20667 #. (para)
20668 #: ../source/book.xml:19430
20669 msgid "If you don't have a working copy handy, you can log a URL:"
20670 msgstr "如果你手边没有工作拷贝,你可以查看一个URL的日志:"
20672 #. (screen)
20673 #: ../source/book.xml:19432
20674 #, no-wrap
20675 msgid ""
20676 "\n"
20677 "$ svn log http://svn.red-bean.com/repos/test/foo.c\n"
20678 "------------------------------------------------------------------------\n"
20679 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20680 "\n"
20681 "Added defines.\n"
20682 "------------------------------------------------------------------------\n"
20683 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20684 "…\n"
20685 msgstr ""
20686 "\n"
20687 "$ svn log http://svn.red-bean.com/repos/test/foo.c\n"
20688 "------------------------------------------------------------------------\n"
20689 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20690 "\n"
20691 "Added defines.\n"
20692 "------------------------------------------------------------------------\n"
20693 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20694 "…\n"
20696 #. (para)
20697 #: ../source/book.xml:19442
20698 #, fuzzy
20699 msgid "If you want several distinct paths underneath the same URL, you can use the <literal>URL [PATH...]</literal> syntax."
20700 msgstr "如果你希望查看某个URL下面不同的多个路径,你可以使用<literal>URL [PATH...]</literal>语法。"
20702 #. (screen)
20703 #: ../source/book.xml:19445
20704 #, no-wrap
20705 msgid ""
20706 "\n"
20707 "$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c\n"
20708 "------------------------------------------------------------------------\n"
20709 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20710 "\n"
20711 "Added defines.\n"
20712 "------------------------------------------------------------------------\n"
20713 "r31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line\n"
20714 "\n"
20715 "Added new file bar.c\n"
20716 "------------------------------------------------------------------------\n"
20717 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20718 "…\n"
20719 msgstr ""
20720 "\n"
20721 "$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c\n"
20722 "------------------------------------------------------------------------\n"
20723 "r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n"
20724 "\n"
20725 "Added defines.\n"
20726 "------------------------------------------------------------------------\n"
20727 "r31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line\n"
20728 "\n"
20729 "Added new file bar.c\n"
20730 "------------------------------------------------------------------------\n"
20731 "r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n"
20732 "…\n"
20734 #. (para)
20735 #: ../source/book.xml:19459
20736 #, fuzzy
20737 msgid "When you're concatenating the results of multiple calls to the log command, you may want to use the <option>--incremental</option> option. <command>svn log</command> normally prints out a dashed line at the beginning of a log message, after each subsequent log message, and following the final log message. If you ran <command>svn log</command> on a range of two revisions, you would get this:"
20738 msgstr "当你想¿ž接多个队日志命令的调用结果,你会希望使用<option>--incremental</option>选项。<command>svn log</command>通常会在日志信息的开头和每一小段间打印一行虚线,如果你对一段修订版本运行<command>svn log</command>,你会得到下面的结果:"
20740 #. (screen)
20741 #: ../source/book.xml:19467
20742 #, no-wrap
20743 msgid ""
20744 "\n"
20745 "$ svn log -r 14:15\n"
20746 "------------------------------------------------------------------------\n"
20747 "r14 | …\n"
20748 "\n"
20749 "------------------------------------------------------------------------\n"
20750 "r15 | …\n"
20751 "\n"
20752 "------------------------------------------------------------------------\n"
20753 msgstr ""
20754 "\n"
20755 "$ svn log -r 14:15\n"
20756 "------------------------------------------------------------------------\n"
20757 "r14 | ...\n"
20758 "\n"
20759 "------------------------------------------------------------------------\n"
20760 "r15 | ...\n"
20761 "\n"
20762 "------------------------------------------------------------------------\n"
20764 #. (para)
20765 #: ../source/book.xml:19477
20766 msgid "However, if you wanted to gather 2 non-sequential log messages into a file, you might do something like this:"
20767 msgstr "然而,如果你希望收集两个不连续的日志信息到一个文件,你会这样做:"
20769 #. (screen)
20770 #: ../source/book.xml:19480
20771 #, no-wrap
20772 msgid ""
20773 "\n"
20774 "$ svn log -r 14 &gt; mylog\n"
20775 "$ svn log -r 19 &gt;&gt; mylog\n"
20776 "$ svn log -r 27 &gt;&gt; mylog\n"
20777 "$ cat mylog\n"
20778 "------------------------------------------------------------------------\n"
20779 "r14 | …\n"
20780 "\n"
20781 "------------------------------------------------------------------------\n"
20782 "------------------------------------------------------------------------\n"
20783 "r19 | …\n"
20784 "\n"
20785 "------------------------------------------------------------------------\n"
20786 "------------------------------------------------------------------------\n"
20787 "r27 | …\n"
20788 "\n"
20789 "------------------------------------------------------------------------\n"
20790 msgstr ""
20791 "\n"
20792 "$ svn log -r 14 &gt; mylog\n"
20793 "$ svn log -r 19 &gt;&gt; mylog\n"
20794 "$ svn log -r 27 &gt;&gt; mylog\n"
20795 "$ cat mylog\n"
20796 "------------------------------------------------------------------------\n"
20797 "r14 | ...\n"
20798 "\n"
20799 "------------------------------------------------------------------------\n"
20800 "------------------------------------------------------------------------\n"
20801 "r19 | ...\n"
20802 "\n"
20803 "------------------------------------------------------------------------\n"
20804 "------------------------------------------------------------------------\n"
20805 "r27 | ...\n"
20806 "\n"
20807 "------------------------------------------------------------------------\n"
20809 #. (para)
20810 #: ../source/book.xml:19498
20811 #, fuzzy
20812 msgid "You can avoid the clutter of the double dashed lines in your output by using the incremental option:"
20813 msgstr "你可以使用incremental选项来避免两行虚线带来的混乱:"
20815 #. (screen)
20816 #: ../source/book.xml:19500
20817 #, no-wrap
20818 msgid ""
20819 "\n"
20820 "$ svn log --incremental -r 14 &gt; mylog\n"
20821 "$ svn log --incremental -r 19 &gt;&gt; mylog\n"
20822 "$ svn log --incremental -r 27 &gt;&gt; mylog\n"
20823 "$ cat mylog\n"
20824 "------------------------------------------------------------------------\n"
20825 "r14 | …\n"
20826 "\n"
20827 "------------------------------------------------------------------------\n"
20828 "r19 | …\n"
20829 "\n"
20830 "------------------------------------------------------------------------\n"
20831 "r27 | …\n"
20832 msgstr ""
20833 "\n"
20834 "$ svn log --incremental -r 14 &gt; mylog\n"
20835 "$ svn log --incremental -r 19 &gt;&gt; mylog\n"
20836 "$ svn log --incremental -r 27 &gt;&gt; mylog\n"
20837 "$ cat mylog\n"
20838 "------------------------------------------------------------------------\n"
20839 "r14 | ...\n"
20840 "\n"
20841 "------------------------------------------------------------------------\n"
20842 "r19 | ...\n"
20843 "\n"
20844 "------------------------------------------------------------------------\n"
20845 "r27 | ...\n"
20847 #. (para)
20848 #: ../source/book.xml:19514
20849 #, fuzzy
20850 msgid "The <option>--incremental</option> option provides similar output control when using the <option>--xml</option> option."
20851 msgstr "<option>--incremental</option>选项为<option>--xml</option>提供了一个相似的输出控制。"
20853 #. (para)
20854 #: ../source/book.xml:19518
20855 #, fuzzy
20856 msgid "If you run <command>svn log</command> on a specific path and provide a specific revision and get no output at all"
20857 msgstr "如果你在特定路径和修订版本运行<command>svn log</command>,输出结果为空"
20859 #. (screen)
20860 #: ../source/book.xml:19521
20861 #, no-wrap
20862 msgid ""
20863 "\n"
20864 "$ svn log -r 20 http://svn.red-bean.com/untouched.txt\n"
20865 "------------------------------------------------------------------------\n"
20866 msgstr ""
20867 "\n"
20868 "$ svn log -r 20 http://svn.red-bean.com/untouched.txt\n"
20869 "------------------------------------------------------------------------\n"
20871 #. (para)
20872 #: ../source/book.xml:19525
20873 msgid "That just means that the path was not modified in that revision. If you log from the top of the repository, or know the file that changed in that revision, you can specify it explicitly:"
20874 msgstr "这只意味着这条路径在那个修订版本没有修改,如果从版本库的顶级目录运行这个命令,或者是你知道那个修订版本修改了那个文件,你可以明确的指定它:"
20876 #. (screen)
20877 #: ../source/book.xml:19529
20878 #, no-wrap
20879 msgid ""
20880 "\n"
20881 "$ svn log -r 20 touched.txt \n"
20882 "------------------------------------------------------------------------\n"
20883 "r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n"
20884 "\n"
20885 "Made a change.\n"
20886 "------------------------------------------------------------------------\n"
20887 msgstr ""
20888 "\n"
20889 "$ svn log -r 20 touched.txt \n"
20890 "------------------------------------------------------------------------\n"
20891 "r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n"
20892 "\n"
20893 "Made a change.\n"
20894 "------------------------------------------------------------------------\n"
20896 #. (tertiary)
20897 #: ../source/book.xml:19544
20898 msgid "merge"
20899 msgstr "merge"
20901 #. (refname)
20902 #: ../source/book.xml:19547
20903 msgid "svn merge"
20904 msgstr "svn merge"
20906 #. (refpurpose)
20907 #: ../source/book.xml:19548
20908 msgid "Apply the differences between two sources to a working copy path."
20909 msgstr "应用两组源文件的差别到工作拷贝路径。"
20911 #. (programlisting)
20912 #: ../source/book.xml:19555
20913 #, fuzzy, no-wrap
20914 msgid "svn merge [-c M | -r N:M] SOURCE[@REV] [WCPATH]"
20915 msgstr "svn merge -r N:M SOURCE[@REV] [WCPATH]"
20917 #. (programlisting)
20918 #: ../source/book.xml:19556
20919 #, no-wrap
20920 msgid "svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]"
20921 msgstr "svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]"
20923 #. (programlisting)
20924 #: ../source/book.xml:19557
20925 #, no-wrap
20926 msgid "svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]"
20927 msgstr "svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]"
20929 #. (para)
20930 #: ../source/book.xml:19563
20931 #, fuzzy
20932 msgid "In the first and second forms, the source paths (URLs in the first form, working copy paths in the second) are specified at revisions <replaceable>N</replaceable> and <replaceable>M</replaceable>. These are the two sources to be compared. The revisions default to <literal>HEAD</literal> if omitted."
20933 msgstr "第一种和第二种形式里,源路径(第一种是URL,第二种是工作拷贝路径)用修订版本号<replaceable>N</replaceable>和<replaceable>M</replaceable>指定,这是要比较的两组源文件,如果省略修订版本号,缺省是<literal>HEAD</literal>。"
20935 #. (para)
20936 #: ../source/book.xml:19569
20937 #, fuzzy
20938 msgid "The <literal>-c M</literal> option is equivalent to <literal>-r N:M</literal> where <replaceable>N = M-1</replaceable>. Using <literal>-c -M</literal> does the reverse: <literal>-r M:N</literal> where <replaceable>N = M-1</replaceable>."
20939 msgstr "Subversion将CVS的<literal>P</literal>和<literal>U</literal>合并为<literal>U</literal>,当合并或冲突发生时,Subversion会简单的打印<literal>G</literal>或<literal>C</literal>,而不是大段相关内容。"
20941 #. (para)
20942 #: ../source/book.xml:19574
20943 msgid "In the third form, <replaceable>SOURCE</replaceable> can be a URL or working copy item, in which case the corresponding URL is used. This URL, at revisions <replaceable>N</replaceable> and <replaceable>M</replaceable>, defines the two sources to be compared."
20944 msgstr "第三种形式,<replaceable>SOURCE</replaceable>可以是URL或者工作拷贝项目,与之对应的URL会被使用。在修订版本号<replaceable>N</replaceable>和<replaceable>M</replaceable>的URL定义了要比较的两组源。"
20946 #. (para)
20947 #: ../source/book.xml:19580
20948 #, fuzzy
20949 msgid "<replaceable>WCPATH</replaceable> is the working copy path that will receive the changes. If <replaceable>WCPATH</replaceable> is omitted, a default value of <quote><filename>.</filename></quote> is assumed, unless the sources have identical basenames that match a file within <quote><filename>.</filename></quote>: in which case, the differences will be applied to that file."
20950 msgstr "<replaceable>WCPATH</replaceable>是接收变化的工作拷贝路径,如果省略<replaceable>WCPATH</replaceable>,会假定缺省值<quote><filename>.</filename></quote>,除非源有相同基本名称与<quote><filename>.</filename></quote>中的某一文件名字匹配:在这种情况下,区别会应用到那个文件。"
20952 #. (para)
20953 #: ../source/book.xml:19587
20954 #, fuzzy
20955 msgid "Unlike <command>svn diff</command>, the merge command takes the ancestry of a file into consideration when performing a merge operation. This is very important when you're merging changes from one branch into another and you've renamed a file on one branch but not the other."
20956 msgstr "不像<command>svn diff</command>,合并操作在执行时会考虑文件的祖先,当你从一个分支合并到另一个分支,而这两个分支有各自重命名的文件时,这一点会非常重要。"
20958 #. (para)
20959 #: ../source/book.xml:19609
20960 msgid "Only if working with URLs"
20961 msgstr "只有在对URL操作时会"
20963 #. (screen)
20964 #: ../source/book.xml:19615
20965 #, fuzzy, no-wrap
20966 msgid ""
20967 "\n"
20968 "--revision (-r) REV\n"
20969 "--change (-c) REV\n"
20970 "--non-recursive (-N)\n"
20971 "--quiet (-q)\n"
20972 "--force\n"
20973 "--dry-run\n"
20974 "--diff3-cmd CMD\n"
20975 "--extensions (-x) ARG\n"
20976 "--ignore-ancestry\n"
20977 "--username USER\n"
20978 "--password PASS\n"
20979 "--no-auth-cache\n"
20980 "--non-interactive\n"
20981 "--config-dir DIR\n"
20982 msgstr ""
20983 "\n"
20984 "--revision (-r) REV\n"
20985 "--non-recursive (-N)\n"
20986 "--quiet (-q)\n"
20987 "--force\n"
20988 "--dry-run\n"
20989 "--diff3-cmd CMD\n"
20990 "--ignore-ancestry\n"
20991 "--username USER\n"
20992 "--password PASS\n"
20993 "--no-auth-cache\n"
20994 "--non-interactive\n"
20995 "--config-dir DIR\n"
20997 #. (para)
20998 #: ../source/book.xml:19636
20999 msgid "Merge a branch back into the trunk (assuming that you have a working copy of the trunk, and that the branch was created in revision 250):"
21000 msgstr "将一个分支合并回主干(假定你有一份主干的工作拷贝,分支在修订版本250创建):"
21002 #. (screen)
21003 #: ../source/book.xml:19639
21004 #, no-wrap
21005 msgid ""
21006 "\n"
21007 "$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch\n"
21008 "U  myproj/tiny.txt\n"
21009 "U  myproj/thhgttg.txt\n"
21010 "U  myproj/win.txt\n"
21011 "U  myproj/flo.txt\n"
21012 msgstr ""
21013 "\n"
21014 "$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch\n"
21015 "U  myproj/tiny.txt\n"
21016 "U  myproj/thhgttg.txt\n"
21017 "U  myproj/win.txt\n"
21018 "U  myproj/flo.txt\n"
21020 #. (para)
21021 #: ../source/book.xml:19646
21022 msgid "If you branched at revision 23, and you want to merge changes on trunk into your branch, you could do this from inside the working copy of your branch:"
21023 msgstr "如果你的分支在修订版本23,你希望将主干的修改合并到分支,你可以在你的工作拷贝的分支上这样做:"
21025 #. (screen)
21026 #: ../source/book.xml:19649
21027 #, fuzzy, no-wrap
21028 msgid ""
21029 "\n"
21030 "$ svn merge -r 23:30 file:///var/svn/repos/trunk/vendors\n"
21031 "U  myproj/thhgttg.txt\n"
21032 "…\n"
21033 msgstr ""
21034 "\n"
21035 "$ svn merge -r 23:30 file:///tmp/repos/trunk/vendors\n"
21036 "U  myproj/thhgttg.txt\n"
21037 "…\n"
21039 #. (para)
21040 #: ../source/book.xml:19654
21041 msgid "To merge changes to a single file:"
21042 msgstr "合并一个单独文件的修改:"
21044 #. (screen)
21045 #: ../source/book.xml:19655
21046 #, no-wrap
21047 msgid ""
21048 "\n"
21049 "$ cd myproj\n"
21050 "$ svn merge -r 30:31 thhgttg.txt \n"
21051 "U  thhgttg.txt\n"
21052 msgstr ""
21053 "\n"
21054 "$ cd myproj\n"
21055 "$ svn merge -r 30:31 thhgttg.txt \n"
21056 "U  thhgttg.txt\n"
21058 #. (tertiary)
21059 #: ../source/book.xml:19666
21060 msgid "mkdir"
21061 msgstr "mkdir"
21063 #. (refname)
21064 #: ../source/book.xml:19669
21065 msgid "svn mkdir"
21066 msgstr "svn mkdir"
21068 #. (refpurpose)
21069 #: ../source/book.xml:19670
21070 msgid "Create a new directory under version control."
21071 msgstr "创建一个纳入版本控制的新目录。"
21073 #. (programlisting)
21074 #: ../source/book.xml:19676
21075 #, no-wrap
21076 msgid "svn mkdir PATH..."
21077 msgstr "svn mkdir PATH..."
21079 #. (programlisting)
21080 #: ../source/book.xml:19677
21081 #, no-wrap
21082 msgid "svn mkdir URL..."
21083 msgstr "svn mkdir URL..."
21085 #. (para)
21086 #: ../source/book.xml:19683
21087 msgid "Create a directory with a name given by the final component of the <replaceable>PATH</replaceable> or URL. A directory specified by a working copy <replaceable>PATH</replaceable> is scheduled for addition in the working copy. A directory specified by a URL is created in the repository via an immediate commit. Multiple directory URLs are committed atomically. In both cases all the intermediate directories must already exist."
21088 msgstr "创建一个目录,名字是提供的<replaceable>PATH</replaceable>或者URL的最后一部分,工作拷贝<replaceable>PATH</replaceable>指定的目录会预定要添加,而通过URL指定的目录会作为一次立即提交在版本库建立。多个目录URL的提交是原子操作,在两种情况下,中介目录必须已经存在。"
21090 #. (para)
21091 #: ../source/book.xml:19703 ../source/book.xml:19809
21092 msgid "Working copy, repository if operating on a URL"
21093 msgstr "如果是对URL操作则会影响版本库,否则是工作拷贝"
21095 #. (para)
21096 #: ../source/book.xml:19709 ../source/book.xml:19815 ../source/book.xml:19911
21097 #: ../source/book.xml:19991 ../source/book.xml:20069 ../source/book.xml:20150
21098 #: ../source/book.xml:20245
21099 msgid "Only if operating on a URL"
21100 msgstr "只有在对URl操作时会"
21102 #. (screen)
21103 #: ../source/book.xml:19715
21104 #, no-wrap
21105 msgid ""
21106 "\n"
21107 "--message (-m) TEXT\n"
21108 "--file (-F) FILE\n"
21109 "--quiet (-q)\n"
21110 "--username USER\n"
21111 "--password PASS\n"
21112 "--no-auth-cache\n"
21113 "--non-interactive\n"
21114 "--editor-cmd EDITOR\n"
21115 "--encoding ENC\n"
21116 "--force-log\n"
21117 "--config-dir DIR\n"
21118 msgstr ""
21119 "\n"
21120 "--message (-m) TEXT\n"
21121 "--file (-F) FILE\n"
21122 "--quiet (-q)\n"
21123 "--username USER\n"
21124 "--password PASS\n"
21125 "--no-auth-cache\n"
21126 "--non-interactive\n"
21127 "--editor-cmd EDITOR\n"
21128 "--encoding ENC\n"
21129 "--force-log\n"
21130 "--config-dir DIR\n"
21132 #. (para)
21133 #: ../source/book.xml:19733
21134 msgid "Create a directory in your working copy:"
21135 msgstr "在工作拷贝创建一个目录:"
21137 #. (screen)
21138 #: ../source/book.xml:19734
21139 #, no-wrap
21140 msgid ""
21141 "\n"
21142 "$ svn mkdir newdir\n"
21143 "A         newdir\n"
21144 msgstr ""
21145 "\n"
21146 "$ svn mkdir newdir\n"
21147 "A         newdir\n"
21149 #. (para)
21150 #: ../source/book.xml:19738
21151 msgid "Create one in the repository (instant commit, so a log message is required):"
21152 msgstr "在版本库创建一个目录(立即提交,所以需要日志信息):"
21154 #. (screen)
21155 #: ../source/book.xml:19740
21156 #, no-wrap
21157 msgid ""
21158 "\n"
21159 "$ svn mkdir -m \"Making a new dir.\" http://svn.red-bean.com/repos/newdir\n"
21160 "\n"
21161 "Committed revision 26.\n"
21162 msgstr ""
21163 "\n"
21164 "$ svn mkdir -m \"Making a new dir.\" http://svn.red-bean.com/repos/newdir\n"
21165 "\n"
21166 "Committed revision 26.\n"
21168 #. (tertiary)
21169 #: ../source/book.xml:19751
21170 msgid "move"
21171 msgstr "move"
21173 #. (refpurpose)
21174 #: ../source/book.xml:19755
21175 msgid "Move a file or directory."
21176 msgstr "移动一个文件或目录。"
21178 #. (programlisting)
21179 #: ../source/book.xml:19761
21180 #, fuzzy, no-wrap
21181 msgid "svn move SRC... DST"
21182 msgstr "svn move SRC DST"
21184 #. (para)
21185 #: ../source/book.xml:19767
21186 #, fuzzy
21187 msgid "This command moves files or directories in your working copy or in the repository."
21188 msgstr "这个命令移动文件或目录到你的工作拷贝或者是版本库。"
21190 #. (para)
21191 #: ../source/book.xml:19770
21192 #, fuzzy
21193 msgid "This command is equivalent to an <command>svn copy</command> followed by <command>svn delete</command>."
21194 msgstr "这个命令同<command>svn copy</command>加一个<command>svn delete</command>等同。"
21196 #. (para)
21197 #: ../source/book.xml:19774
21198 msgid "When moving multiple sources, they will be added as children of <replaceable>DST</replaceable>, which must be a directory."
21199 msgstr ""
21201 #. (para)
21202 #: ../source/book.xml:19778
21203 msgid "Subversion does not support moving between working copies and URLs. In addition, you can only move files within a single repository—Subversion does not support cross-repository moving."
21204 msgstr "Subversion不支持在工作拷贝和URL之间拷贝,此外,你只可以一个版本库内移动文件—Subversion不支持跨版本库的移动。"
21206 #. (para)
21207 #: ../source/book.xml:19787
21208 msgid "Move and schedule a file or directory for addition (with history)."
21209 msgstr "移动和预订一个文件或目录将要添加(包含历史)。"
21211 #. (para)
21212 #: ../source/book.xml:19794
21213 msgid "Complete server-side rename."
21214 msgstr "完全服务器端的重命名。"
21216 #. (para)
21217 #: ../source/book.xml:19803
21218 msgid "mv, rename, ren"
21219 msgstr "mv, rename, ren"
21221 #. (emphasis)
21222 #: ../source/book.xml:19824
21223 #, fuzzy
21224 msgid "Deprecated"
21225 msgstr "删除"
21227 #. (screen)
21228 #: ../source/book.xml:19821
21229 #, fuzzy, no-wrap
21230 msgid ""
21231 "\n"
21232 "--message (-m) TEXT\n"
21233 "--file (-F) FILE\n"
21234 "--revision (-r) REV (<placeholder-1/>)\n"
21235 "--quiet (-q)\n"
21236 "--force\n"
21237 "--username USER\n"
21238 "--password PASS\n"
21239 "--no-auth-cache\n"
21240 "--non-interactive\n"
21241 "--editor-cmd EDITOR\n"
21242 "--encoding ENC\n"
21243 "--force-log\n"
21244 "--config-dir DIR\n"
21245 msgstr ""
21246 "\n"
21247 "--message (-m) TEXT\n"
21248 "--file (-F) FILE\n"
21249 "--revision (-r) REV\n"
21250 "--quiet (-q)\n"
21251 "--force\n"
21252 "--username USER\n"
21253 "--password PASS\n"
21254 "--no-auth-cache\n"
21255 "--non-interactive\n"
21256 "--editor-cmd EDITOR\n"
21257 "--encoding ENC\n"
21258 "--force-log\n"
21259 "--config-dir DIR\n"
21261 #. (para)
21262 #: ../source/book.xml:19841
21263 msgid "Move a file in your working copy:"
21264 msgstr "移动工作拷bede一个文件:"
21266 #. (screen)
21267 #: ../source/book.xml:19842
21268 #, no-wrap
21269 msgid ""
21270 "\n"
21271 "$ svn move foo.c bar.c\n"
21272 "A         bar.c\n"
21273 "D         foo.c\n"
21274 msgstr ""
21275 "\n"
21276 "$ svn move foo.c bar.c\n"
21277 "A         bar.c\n"
21278 "D         foo.c\n"
21280 #. (para)
21281 #: ../source/book.xml:19847
21282 #, fuzzy
21283 msgid "Move several files in your working copy into a subdirectory:"
21284 msgstr "移动工作拷bede一个文件:"
21286 #. (screen)
21287 #: ../source/book.xml:19848
21288 #, fuzzy, no-wrap
21289 msgid ""
21290 "\n"
21291 "$ svn move baz.c bat.c qux.c src\n"
21292 "A         src/baz.c\n"
21293 "D         baz.c\n"
21294 "A         src/bat.c\n"
21295 "D         bat.c\n"
21296 "A         src/qux.c\n"
21297 "D         qux.c\n"
21298 msgstr ""
21299 "\n"
21300 "$ svn add testdir\n"
21301 "A         testdir\n"
21302 "A         testdir/a\n"
21303 "A         testdir/b\n"
21304 "A         testdir/c\n"
21305 "A         testdir/d\n"
21307 #. (para)
21308 #: ../source/book.xml:19857
21309 msgid "Move a file in the repository (an immediate commit, so it requires a commit message):"
21310 msgstr "移动版本库中的一个文件(一个立即提交,所以需要提交信息):"
21312 #. (screen)
21313 #: ../source/book.xml:19859
21314 #, no-wrap
21315 msgid ""
21316 "\n"
21317 "$ svn move -m \"Move a file\" http://svn.red-bean.com/repos/foo.c \\\n"
21318 "                            http://svn.red-bean.com/repos/bar.c\n"
21319 "\n"
21320 "Committed revision 27.\n"
21321 msgstr ""
21322 "\n"
21323 "$ svn move -m \"Move a file\" http://svn.red-bean.com/repos/foo.c \\\n"
21324 "                            http://svn.red-bean.com/repos/bar.c\n"
21325 "\n"
21326 "Committed revision 27.\n"
21328 #. (tertiary)
21329 #: ../source/book.xml:19871
21330 msgid "propdel"
21331 msgstr "propdel"
21333 #. (refname)
21334 #: ../source/book.xml:19874
21335 msgid "svn propdel"
21336 msgstr "svn propdel"
21338 #. (refpurpose)
21339 #: ../source/book.xml:19875
21340 msgid "Remove a property from an item."
21341 msgstr "删除一个项目的一个属性。"
21343 #. (programlisting)
21344 #: ../source/book.xml:19881
21345 #, no-wrap
21346 msgid "svn propdel PROPNAME [PATH...]"
21347 msgstr "svn propdel PROPNAME [PATH...]"
21349 #. (programlisting)
21350 #: ../source/book.xml:19882
21351 #, fuzzy, no-wrap
21352 msgid "svn propdel PROPNAME --revprop -r REV [TARGET]"
21353 msgstr "svn propdel PROPNAME --revprop -r REV [URL]"
21355 #. (para)
21356 #: ../source/book.xml:19888
21357 #, fuzzy
21358 msgid "This removes properties from files, directories, or revisions. The first form removes versioned properties in your working copy, while the second removes unversioned remote properties on a repository revision (<replaceable>TARGET</replaceable> only determines which repository to access)."
21359 msgstr "这会删除文件、目录或修订版本的属性。第一种形式是在工作拷贝删除版本化属性,第二种是在一个版本库修订版本中删除未版本化的属性。"
21361 #. (para)
21362 #: ../source/book.xml:19899
21363 msgid "pdel, pd"
21364 msgstr "pdel, pd"
21366 #. (para)
21367 #: ../source/book.xml:19905 ../source/book.xml:19985 ../source/book.xml:20063
21368 #: ../source/book.xml:20144 ../source/book.xml:20239
21369 msgid "Working copy, repository only if operating on a URL"
21370 msgstr "只有在对URL操作时会 2"
21372 #. (screen)
21373 #: ../source/book.xml:19917
21374 #, no-wrap
21375 msgid ""
21376 "\n"
21377 "--quiet (-q)\n"
21378 "--recursive (-R)\n"
21379 "--revision (-r) REV\n"
21380 "--revprop\n"
21381 "--username USER\n"
21382 "--password PASS\n"
21383 "--no-auth-cache\n"
21384 "--non-interactive\n"
21385 "--config-dir DIR\n"
21386 msgstr ""
21387 "\n"
21388 "--quiet (-q)\n"
21389 "--recursive (-R)\n"
21390 "--revision (-r) REV\n"
21391 "--revprop\n"
21392 "--username USER\n"
21393 "--password PASS\n"
21394 "--no-auth-cache\n"
21395 "--non-interactive\n"
21396 "--config-dir DIR\n"
21398 #. (para)
21399 #: ../source/book.xml:19933
21400 msgid "Delete a property from a file in your working copy"
21401 msgstr "删除你的工作拷贝中一个文件的一个属性"
21403 #. (screen)
21404 #: ../source/book.xml:19935
21405 #, no-wrap
21406 msgid ""
21407 "\n"
21408 "$ svn propdel svn:mime-type  some-script\n"
21409 "property 'svn:mime-type' deleted from 'some-script'.\n"
21410 msgstr ""
21411 "\n"
21412 "$ svn propdel svn:mime-type  some-script\n"
21413 "property 'svn:mime-type' deleted from 'some-script'.\n"
21415 #. (para)
21416 #: ../source/book.xml:19939
21417 msgid "Delete a revision property:"
21418 msgstr "删除一个修订版本的属性:"
21420 #. (screen)
21421 #: ../source/book.xml:19940
21422 #, no-wrap
21423 msgid ""
21424 "\n"
21425 "$ svn propdel --revprop -r 26 release-date \n"
21426 "property 'release-date' deleted from repository revision '26'\n"
21427 msgstr ""
21428 "\n"
21429 "$ svn propdel --revprop -r 26 release-date \n"
21430 "property 'release-date' deleted from repository revision '26'\n"
21432 #. (tertiary)
21433 #: ../source/book.xml:19950
21434 msgid "propedit"
21435 msgstr "propedit"
21437 #. (refname)
21438 #: ../source/book.xml:19953
21439 msgid "svn propedit"
21440 msgstr "svn propedit"
21442 #. (refpurpose)
21443 #: ../source/book.xml:19954
21444 msgid "Edit the property of one or more items under version control."
21445 msgstr "修改一个或多个版本控制之下文件的属性。"
21447 #. (programlisting)
21448 #: ../source/book.xml:19961
21449 #, no-wrap
21450 msgid "svn propedit PROPNAME PATH..."
21451 msgstr "svn propedit PROPNAME PATH..."
21453 #. (programlisting)
21454 #: ../source/book.xml:19962
21455 #, fuzzy, no-wrap
21456 msgid "svn propedit PROPNAME --revprop -r REV [TARGET]"
21457 msgstr "svn propedit PROPNAME --revprop -r REV [URL]"
21459 #. (para)
21460 #: ../source/book.xml:19968
21461 #, fuzzy
21462 msgid "Edit one or more properties using your favorite editor. The first form edits versioned properties in your working copy, while the second edits unversioned remote properties on a repository revision (<replaceable>TARGET</replaceable> only determines which repository to access)."
21463 msgstr "使用喜欢的编辑器编辑一个或多个属性,第一种形式是在工作拷贝编辑版本化的属性,第二种形式是远程编辑未版本化的版本库修订版本属性。"
21465 #. (para)
21466 #: ../source/book.xml:19979
21467 msgid "pedit, pe"
21468 msgstr "pedit, pe"
21470 #. (screen)
21471 #: ../source/book.xml:19997
21472 #, no-wrap
21473 msgid ""
21474 "\n"
21475 "--revision (-r) REV\n"
21476 "--revprop\n"
21477 "--username USER\n"
21478 "--password PASS\n"
21479 "--no-auth-cache\n"
21480 "--non-interactive\n"
21481 "--encoding ENC\n"
21482 "--editor-cmd EDITOR\n"
21483 "--config-dir DIR\n"
21484 msgstr ""
21485 "\n"
21486 "--revision (-r) REV\n"
21487 "--revprop\n"
21488 "--username USER\n"
21489 "--password PASS\n"
21490 "--no-auth-cache\n"
21491 "--non-interactive\n"
21492 "--encoding ENC\n"
21493 "--editor-cmd EDITOR\n"
21494 "--config-dir DIR\n"
21496 #. (para)
21497 #: ../source/book.xml:20013
21498 #, fuzzy
21499 msgid "<command>svn propedit</command> makes it easy to modify properties that have multiple values:"
21500 msgstr "<command>svn propedit</command>对修改多个值的属性非常简单:"
21502 #. (screen)
21503 #: ../source/book.xml:20015
21504 #, no-wrap
21505 msgid ""
21506 "\n"
21507 "$ svn propedit svn:keywords  foo.c \n"
21508 "    &lt;svn will launch your favorite editor here, with a buffer open\n"
21509 "    containing the current contents of the svn:keywords property.  You\n"
21510 "    can add multiple values to a property easily here by entering one\n"
21511 "    value per line.&gt;\n"
21512 "Set new value for property 'svn:keywords' on 'foo.c'\n"
21513 msgstr ""
21514 "\n"
21515 "$ svn propedit svn:keywords  foo.c \n"
21516 "    &lt;svn will launch your favorite editor here, with a buffer open\n"
21517 "    containing the current contents of the svn:keywords property.  You\n"
21518 "    can add multiple values to a property easily here by entering one\n"
21519 "    value per line.&gt;\n"
21520 "Set new value for property 'svn:keywords' on 'foo.c'\n"
21522 #. (tertiary)
21523 #: ../source/book.xml:20029 ../source/book.xml:22876
21524 msgid "propget"
21525 msgstr "propget"
21527 #. (refname)
21528 #: ../source/book.xml:20032
21529 msgid "svn propget"
21530 msgstr "svn propget"
21532 #. (refpurpose)
21533 #: ../source/book.xml:20033
21534 msgid "Print the value of a property."
21535 msgstr "打印一个属性的值。"
21537 #. (programlisting)
21538 #: ../source/book.xml:20039
21539 #, no-wrap
21540 msgid "svn propget PROPNAME [TARGET[@REV]...]"
21541 msgstr "svn propget PROPNAME [TARGET[@REV]...]"
21543 #. (programlisting)
21544 #: ../source/book.xml:20040
21545 #, no-wrap
21546 msgid "svn propget PROPNAME --revprop -r REV [URL]"
21547 msgstr "svn propget PROPNAME --revprop -r REV [URL]"
21549 #. (para)
21550 #: ../source/book.xml:20046
21551 msgid "Print the value of a property on files, directories, or revisions. The first form prints the versioned property of an item or items in your working copy, while the second prints unversioned remote property on a repository revision. See <xref linkend=\"svn.advanced.props\"/> for more information on properties."
21552 msgstr "打印一个文件、目录或修订版本的一个属性的值,第一种形式是打印工作拷贝中一个或多个项目的版本化的属性,第二种形式是远程打印版本库修订版本的未版本化的属性。属性的详情见<xref linkend=\"svn.advanced.props\"/>。"
21554 #. (para)
21555 #: ../source/book.xml:20057
21556 msgid "pget, pg"
21557 msgstr "pget, pg"
21559 #. (screen)
21560 #: ../source/book.xml:20075
21561 #, no-wrap
21562 msgid ""
21563 "\n"
21564 "--recursive (-R)\n"
21565 "--revision (-r) REV\n"
21566 "--revprop\n"
21567 "--strict\n"
21568 "--username USER\n"
21569 "--password PASS\n"
21570 "--no-auth-cache\n"
21571 "--non-interactive\n"
21572 "--config-dir DIR\n"
21573 msgstr ""
21574 "\n"
21575 "--recursive (-R)\n"
21576 "--revision (-r) REV\n"
21577 "--revprop\n"
21578 "--strict\n"
21579 "--username USER\n"
21580 "--password PASS\n"
21581 "--no-auth-cache\n"
21582 "--non-interactive\n"
21583 "--config-dir DIR\n"
21585 #. (para)
21586 #: ../source/book.xml:20091
21587 msgid "Examine a property of a file in your working copy:"
21588 msgstr "检查工作拷贝的一个文件的一个属性:"
21590 #. (screen)
21591 #: ../source/book.xml:20093
21592 #, no-wrap
21593 msgid ""
21594 "\n"
21595 "$ svn propget svn:keywords foo.c\n"
21596 "Author\n"
21597 "Date\n"
21598 "Rev\n"
21599 msgstr ""
21600 "\n"
21601 "$ svn propget svn:keywords foo.c\n"
21602 "Author\n"
21603 "Date\n"
21604 "Rev\n"
21606 #. (para)
21607 #: ../source/book.xml:20099
21608 msgid "The same goes for a revision property:"
21609 msgstr "对于修订版本属性相同:"
21611 #. (screen)
21612 #: ../source/book.xml:20100
21613 #, no-wrap
21614 msgid ""
21615 "\n"
21616 "$ svn propget svn:log --revprop -r 20 \n"
21617 "Began journal.\n"
21618 msgstr ""
21619 "\n"
21620 "$ svn propget svn:log --revprop -r 20 \n"
21621 "Began journal.\n"
21623 #. (tertiary)
21624 #: ../source/book.xml:20110 ../source/book.xml:22929
21625 msgid "proplist"
21626 msgstr "proplist"
21628 #. (refname)
21629 #: ../source/book.xml:20113
21630 msgid "svn proplist"
21631 msgstr "svn proplist"
21633 #. (refpurpose)
21634 #: ../source/book.xml:20114
21635 msgid "List all properties."
21636 msgstr "列出所有的属性。"
21638 #. (programlisting)
21639 #: ../source/book.xml:20120
21640 #, no-wrap
21641 msgid "svn proplist [TARGET[@REV]...]"
21642 msgstr "svn proplist [TARGET[@REV]...]"
21644 #. (programlisting)
21645 #: ../source/book.xml:20121
21646 #, fuzzy, no-wrap
21647 msgid "svn proplist --revprop -r REV [TARGET]"
21648 msgstr "svn proplist --revprop -r REV [URL]"
21650 #. (para)
21651 #: ../source/book.xml:20127
21652 #, fuzzy
21653 msgid "List all properties on files, directories, or revisions. The first form lists versioned properties in your working copy, while the second lists unversioned remote properties on a repository revision (<replaceable>TARGET</replaceable> only determines which repository to access)."
21654 msgstr "列出文件、目录或修订版本的属性,第一种形式是列出工作拷贝的所有版本化的属性,第二种形式是列出版本库修订版本的未版本化的属性。"
21656 #. (para)
21657 #: ../source/book.xml:20138
21658 msgid "plist, pl"
21659 msgstr "plist, pl"
21661 #. (screen)
21662 #: ../source/book.xml:20156
21663 #, no-wrap
21664 msgid ""
21665 "\n"
21666 "--verbose (-v)\n"
21667 "--recursive (-R)\n"
21668 "--revision (-r) REV\n"
21669 "--quiet (-q)\n"
21670 "--revprop\n"
21671 "--username USER\n"
21672 "--password PASS\n"
21673 "--no-auth-cache\n"
21674 "--non-interactive\n"
21675 "--config-dir DIR\n"
21676 msgstr ""
21677 "\n"
21678 "--verbose (-v)\n"
21679 "--recursive (-R)\n"
21680 "--revision (-r) REV\n"
21681 "--quiet (-q)\n"
21682 "--revprop\n"
21683 "--username USER\n"
21684 "--password PASS\n"
21685 "--no-auth-cache\n"
21686 "--non-interactive\n"
21687 "--config-dir DIR\n"
21689 #. (para)
21690 #: ../source/book.xml:20173
21691 msgid "You can use proplist to see the properties on an item in your working copy:"
21692 msgstr "你可以使用proplist察看你的工作拷贝的一个项目的属性:"
21694 #. (screen)
21695 #: ../source/book.xml:20175
21696 #, no-wrap
21697 msgid ""
21698 "\n"
21699 "$ svn proplist foo.c\n"
21700 "Properties on 'foo.c':\n"
21701 "  svn:mime-type\n"
21702 "  svn:keywords\n"
21703 "  owner\n"
21704 msgstr ""
21705 "\n"
21706 "$ svn proplist foo.c\n"
21707 "Properties on 'foo.c':\n"
21708 "  svn:mime-type\n"
21709 "  svn:keywords\n"
21710 "  owner\n"
21712 #. (para)
21713 #: ../source/book.xml:20182
21714 msgid "But with the <option>--verbose</option> flag, svn proplist is extremely handy as it also shows you the values for the properties:"
21715 msgstr "通过<option>--verbose</option>选项,svn proplist也可以非常便利的显示属性的值:"
21717 #. (screen)
21718 #: ../source/book.xml:20185
21719 #, no-wrap
21720 msgid ""
21721 "\n"
21722 "$ svn proplist --verbose foo.c\n"
21723 "Properties on 'foo.c':\n"
21724 "  svn:mime-type : text/plain\n"
21725 "  svn:keywords : Author Date Rev\n"
21726 "  owner : sally\n"
21727 msgstr ""
21728 "\n"
21729 "$ svn proplist --verbose foo.c\n"
21730 "Properties on 'foo.c':\n"
21731 "  svn:mime-type : text/plain\n"
21732 "  svn:keywords : Author Date Rev\n"
21733 "  owner : sally\n"
21735 #. (tertiary)
21736 #: ../source/book.xml:20198
21737 msgid "propset"
21738 msgstr "propset"
21740 #. (refname)
21741 #: ../source/book.xml:20201
21742 msgid "svn propset"
21743 msgstr "svn propset"
21745 #. (refpurpose)
21746 #: ../source/book.xml:20202
21747 msgid "Set PROPNAME to PROPVAL on files, directories, or revisions."
21748 msgstr "设置文件、目录或者修订版本的属性PROPNAME为PROPVAL。"
21750 #. (programlisting)
21751 #: ../source/book.xml:20208
21752 #, no-wrap
21753 msgid "svn propset PROPNAME [PROPVAL | -F VALFILE] PATH..."
21754 msgstr "svn propset PROPNAME [PROPVAL | -F VALFILE] PATH..."
21756 #. (programlisting)
21757 #: ../source/book.xml:20209
21758 #, fuzzy, no-wrap
21759 msgid "svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET]"
21760 msgstr "svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [URL]"
21762 #. (para)
21763 #: ../source/book.xml:20215
21764 #, fuzzy
21765 msgid "Set <replaceable>PROPNAME</replaceable> to <replaceable>PROPVAL</replaceable> on files, directories, or revisions. The first example creates a versioned, local property change in the working copy, and the second creates an unversioned, remote property change on a repository revision (<replaceable>TARGET</replaceable> only determines which repository to access)."
21766 msgstr "设置文件、目录或者修订版本的属性<replaceable>PROPNAME</replaceable>为<replaceable>PROPVAL</replaceable>。第一个例子在工作拷贝创建了一个版本化的本地属性修改,第二个例子创建了一个未版本化的远程的对版本库修订版本的属性修改。"
21768 #. (para)
21769 #: ../source/book.xml:20224
21770 msgid "Subversion has a number of <quote>special</quote> properties that affect its behavior. See <xref linkend=\"svn.ref.properties\"/> for more on these properties."
21771 msgstr "Subversion有一系列<quote>特殊的</quote>影响行为方式的属性,关于这些属性的详情请见<xref linkend=\"svn.ref.properties\"/>。"
21773 #. (para)
21774 #: ../source/book.xml:20233
21775 msgid "pset, ps"
21776 msgstr "pset, ps"
21778 #. (screen)
21779 #: ../source/book.xml:20251
21780 #, no-wrap
21781 msgid ""
21782 "\n"
21783 "--file (-F) FILE\n"
21784 "--quiet (-q)\n"
21785 "--revision (-r) REV\n"
21786 "--targets FILENAME\n"
21787 "--recursive (-R)\n"
21788 "--revprop\n"
21789 "--username USER\n"
21790 "--password PASS\n"
21791 "--no-auth-cache\n"
21792 "--non-interactive\n"
21793 "--encoding ENC\n"
21794 "--force\n"
21795 "--config-dir DIR\n"
21796 msgstr ""
21797 "\n"
21798 "--file (-F) FILE\n"
21799 "--quiet (-q)\n"
21800 "--revision (-r) REV\n"
21801 "--targets FILENAME\n"
21802 "--recursive (-R)\n"
21803 "--revprop\n"
21804 "--username USER\n"
21805 "--password PASS\n"
21806 "--no-auth-cache\n"
21807 "--non-interactive\n"
21808 "--encoding ENC\n"
21809 "--force\n"
21810 "--config-dir DIR\n"
21812 #. (para)
21813 #: ../source/book.xml:20271
21814 #, fuzzy
21815 msgid "Set the mime type on a file:"
21816 msgstr "设置文件的mimetype:"
21818 #. (screen)
21819 #: ../source/book.xml:20272
21820 #, no-wrap
21821 msgid ""
21822 "\n"
21823 "$ svn propset svn:mime-type image/jpeg foo.jpg \n"
21824 "property 'svn:mime-type' set on 'foo.jpg'\n"
21825 msgstr ""
21826 "\n"
21827 "$ svn propset svn:mime-type image/jpeg foo.jpg \n"
21828 "property 'svn:mime-type' set on 'foo.jpg'\n"
21830 #. (para)
21831 #: ../source/book.xml:20276
21832 msgid "On a UNIX system, if you want a file to have the executable permission set:"
21833 msgstr "在UNIX系统,如果你希望一个文件设置执行权限:"
21835 #. (screen)
21836 #: ../source/book.xml:20278
21837 #, no-wrap
21838 msgid ""
21839 "\n"
21840 "$ svn propset svn:executable ON somescript\n"
21841 "property 'svn:executable' set on 'somescript'\n"
21842 msgstr ""
21843 "\n"
21844 "$ svn propset svn:executable ON somescript\n"
21845 "property 'svn:executable' set on 'somescript'\n"
21847 #. (para)
21848 #: ../source/book.xml:20282
21849 msgid "Perhaps you have an internal policy to set certain properties for the benefit of your coworkers:"
21850 msgstr "或许为了合作者的利益你有一个内部的属性设置:"
21852 #. (screen)
21853 #: ../source/book.xml:20284
21854 #, no-wrap
21855 msgid ""
21856 "\n"
21857 "$ svn propset owner sally foo.c\n"
21858 "property 'owner' set on 'foo.c'\n"
21859 msgstr ""
21860 "\n"
21861 "$ svn propset owner sally foo.c\n"
21862 "property 'owner' set on 'foo.c'\n"
21864 #. (para)
21865 #: ../source/book.xml:20288
21866 #, fuzzy
21867 msgid "If you made a mistake in a log message for a particular revision and want to change it, use <option>--revprop</option> and set <literal>svn:log</literal> to the new log message:"
21868 msgstr "如果你在特定修订版本的日志信息里有一些错误,并且希望修改,可以使用<option>--revprop</option>设置<literal>svn:log</literal>为新的日志信息:"
21870 #. (screen)
21871 #: ../source/book.xml:20292
21872 #, no-wrap
21873 msgid ""
21874 "\n"
21875 "$ svn propset --revprop -r 25 svn:log \"Journaled about trip to New York.\"\n"
21876 "property 'svn:log' set on repository revision '25'\n"
21877 msgstr ""
21878 "\n"
21879 "$ svn propset --revprop -r 25 svn:log \"Journaled about trip to New York.\"\n"
21880 "property 'svn:log' set on repository revision '25'\n"
21882 #. (para)
21883 #: ../source/book.xml:20296
21884 msgid "Or, if you don't have a working copy, you can provide a URL."
21885 msgstr "或者,你没有工作拷贝,你可以提供一个URL。"
21887 #. (screen)
21888 #: ../source/book.xml:20298
21889 #, no-wrap
21890 msgid ""
21891 "\n"
21892 "$ svn propset --revprop -r 26 svn:log \"Document nap.\" http://svn.red-bean.com/repos\n"
21893 "property 'svn:log' set on repository revision '25'\n"
21894 msgstr ""
21895 "\n"
21896 "$ svn propset --revprop -r 26 svn:log \"Document nap.\" http://svn.red-bean.com/repos\n"
21897 "property 'svn:log' set on repository revision '25'\n"
21899 #. (para)
21900 #: ../source/book.xml:20302
21901 msgid "Lastly, you can tell propset to take its input from a file. You could even use this to set the contents of a property to something binary:"
21902 msgstr "最后,你可以告诉propset从一个文件得到输入,你甚至可以使用这个方式来设置一个属性为二进制内容:"
21904 #. (screen)
21905 #: ../source/book.xml:20305
21906 #, no-wrap
21907 msgid ""
21908 "\n"
21909 "$ svn propset owner-pic -F sally.jpg moo.c \n"
21910 "property 'owner-pic' set on 'moo.c'\n"
21911 msgstr ""
21912 "\n"
21913 "$ svn propset owner-pic -F sally.jpg moo.c \n"
21914 "property 'owner-pic' set on 'moo.c'\n"
21916 #. (para)
21917 #: ../source/book.xml:20310
21918 #, fuzzy
21919 msgid "By default, you cannot modify revision properties in a Subversion repository. Your repository administrator must explicitly enable revision property modifications by creating a hook named <literal>pre-revprop-change</literal>. See <xref linkend=\"svn.reposadmin.create.hooks\"/> for more information on hook scripts."
21920 msgstr "缺省,你不可以在Subversion版本库修改修订版本属性,你的版本库管理员必须显示的通过创建一个名字为<literal>pre-revprop-change</literal>的钩子来允许修订版本属性修改,关于钩子脚本的详情请见<xref linkend=\"svn.reposadmin.create.hooks\"/>。"
21922 #. (tertiary)
21923 #: ../source/book.xml:20323
21924 msgid "resolved"
21925 msgstr "resolved"
21927 #. (quote)
21928 #: ../source/book.xml:20327
21929 msgid "conflicted"
21930 msgstr "冲突"
21932 #. (refpurpose)
21933 #: ../source/book.xml:20327
21934 msgid "Remove <placeholder-1/> state on working copy files or directories."
21935 msgstr "删除工作拷贝文件或目录的<placeholder-1/>状态。"
21937 #. (programlisting)
21938 #: ../source/book.xml:20334
21939 #, no-wrap
21940 msgid "svn resolved PATH..."
21941 msgstr "svn resolved PATH..."
21943 #. (para)
21944 #: ../source/book.xml:20340
21945 msgid "Remove <quote>conflicted</quote> state on working copy files or directories. This routine does not semantically resolve conflict markers; it merely removes conflict-related artifact files and allows <replaceable>PATH</replaceable> to be committed again; that is, it tells Subversion that the conflicts have been <quote>resolved</quote>. See <xref linkend=\"svn.tour.cycle.resolve\"/> for an in-depth look at resolving conflicts."
21946 msgstr "删除工作拷贝文件或目录的<quote>conflicted</quote>状态。这个程序不是语义上的改变冲突标志,它只是删除冲突相关的人造文件,从而重新允许<replaceable>PATH</replaceable>提交;也就是说,它告诉Subversion冲突已经<quote>解决了</quote>。关于解决冲突更深入的考虑可以查看<xref linkend=\"svn.tour.cycle.resolve\"/>。"
21948 #. (screen)
21949 #: ../source/book.xml:20371 ../source/book.xml:20459
21950 #, no-wrap
21951 msgid ""
21952 "\n"
21953 "--targets FILENAME\n"
21954 "--recursive (-R)\n"
21955 "--quiet (-q)\n"
21956 "--config-dir DIR\n"
21957 msgstr ""
21958 "\n"
21959 "--targets FILENAME\n"
21960 "--recursive (-R)\n"
21961 "--quiet (-q)\n"
21962 "--config-dir DIR\n"
21964 #. (para)
21965 #: ../source/book.xml:20382
21966 msgid "If you get a conflict on an update, your working copy will sprout three new files:"
21967 msgstr "如果你在更新时得到冲突,你的工作拷贝会产生三个新的文件:"
21969 #. (screen)
21970 #: ../source/book.xml:20384
21971 #, no-wrap
21972 msgid ""
21973 "\n"
21974 "$ svn update\n"
21975 "C  foo.c\n"
21976 "Updated to revision 31.\n"
21977 "$ ls\n"
21978 "foo.c\n"
21979 "foo.c.mine\n"
21980 "foo.c.r30\n"
21981 "foo.c.r31\n"
21982 msgstr ""
21983 "\n"
21984 "$ svn update\n"
21985 "C  foo.c\n"
21986 "Updated to revision 31.\n"
21987 "$ ls\n"
21988 "foo.c\n"
21989 "foo.c.mine\n"
21990 "foo.c.r30\n"
21991 "foo.c.r31\n"
21993 #. (para)
21994 #: ../source/book.xml:20394
21995 #, fuzzy
21996 msgid "Once you've resolved the conflict and <filename>foo.c</filename> is ready to be committed, run <command>svn resolved</command> to let your working copy know you've taken care of everything."
21997 msgstr "当你解决了<filename>foo.c</filename>的冲突,并且准备提交,运行<command>svn resolved</command>让你的工作拷贝知道你已经完成了所有事情。"
21999 #. (para)
22000 #: ../source/book.xml:20399
22001 #, fuzzy
22002 msgid "You <emphasis>can</emphasis> just remove the conflict files and commit, but <command>svn resolved</command> fixes up some bookkeeping data in the working copy administrative area in addition to removing the conflict files, so we recommend that you use this command."
22003 msgstr "你<emphasis>可以</emphasis>仅仅删除冲突的文件并且提交,但是<command>svn resolved</command>除了删除冲突文件,还修正了一些记录在工作拷贝管理区域的记录数据,所以我们推荐你使用这个命令。"
22005 #. (tertiary)
22006 #: ../source/book.xml:20412
22007 msgid "revert"
22008 msgstr "revert"
22010 #. (refpurpose)
22011 #: ../source/book.xml:20416
22012 msgid "Undo all local edits."
22013 msgstr "取消所有的本地编辑。"
22015 #. (programlisting)
22016 #: ../source/book.xml:20422
22017 #, no-wrap
22018 msgid "svn revert PATH..."
22019 msgstr "svn revert PATH..."
22021 #. (para)
22022 #: ../source/book.xml:20428
22023 #, fuzzy
22024 msgid "Reverts any local changes to a file or directory and resolves any conflicted states. <command>svn revert</command> will not only revert the contents of an item in your working copy, but also any property changes. Finally, you can use it to undo any scheduling operations that you may have done (e.g. files scheduled for addition or deletion can be <quote>unscheduled</quote>)."
22025 msgstr "恢复所有对文件和目录的修改,并且解决所有的冲突状态。<command>svn revert</command>不会只是恢复工作拷贝中一个项目的内容,也包括了对属性修改的恢复。最终,你可以使用它来取消所有已经做过的预定操作(例如,文件预定要添加或删除可以<quote>恢复</quote>)。"
22027 #. (para)
22028 #: ../source/book.xml:20470
22029 msgid "Discard changes to a file:"
22030 msgstr "丢弃对一个文件的修改:"
22032 #. (screen)
22033 #: ../source/book.xml:20471
22034 #, no-wrap
22035 msgid ""
22036 "\n"
22037 "$ svn revert foo.c\n"
22038 "Reverted foo.c\n"
22039 msgstr ""
22040 "\n"
22041 "$ svn revert foo.c\n"
22042 "Reverted foo.c\n"
22044 #. (para)
22045 #: ../source/book.xml:20475
22046 msgid "If you want to revert a whole directory of files, use the <option>--recursive</option> flag:"
22047 msgstr "如果你希望恢复一整个目录的文件,可以使用<option>--recursive</option>选项:"
22049 #. (screen)
22050 #: ../source/book.xml:20477
22051 #, no-wrap
22052 msgid ""
22053 "\n"
22054 "$ svn revert --recursive .\n"
22055 "Reverted newdir/afile\n"
22056 "Reverted foo.c\n"
22057 "Reverted bar.txt\n"
22058 msgstr ""
22059 "\n"
22060 "$ svn revert --recursive .\n"
22061 "Reverted newdir/afile\n"
22062 "Reverted foo.c\n"
22063 "Reverted bar.txt\n"
22065 #. (para)
22066 #: ../source/book.xml:20483
22067 msgid "Lastly, you can undo any scheduling operations:"
22068 msgstr "最后,你可以取消预定的操作:"
22070 #. (screen)
22071 #: ../source/book.xml:20485
22072 #, no-wrap
22073 msgid ""
22074 "\n"
22075 "$ svn add mistake.txt whoops\n"
22076 "A         mistake.txt\n"
22077 "A         whoops\n"
22078 "A         whoops/oopsie.c\n"
22079 "\n"
22080 "$ svn revert mistake.txt whoops\n"
22081 "Reverted mistake.txt\n"
22082 "Reverted whoops\n"
22083 "\n"
22084 "$ svn status\n"
22085 "?      mistake.txt\n"
22086 "?      whoops\n"
22087 msgstr ""
22088 "\n"
22089 "$ svn add mistake.txt whoops\n"
22090 "A         mistake.txt\n"
22091 "A         whoops\n"
22092 "A         whoops/oopsie.c\n"
22093 "\n"
22094 "$ svn revert mistake.txt whoops\n"
22095 "Reverted mistake.txt\n"
22096 "Reverted whoops\n"
22097 "\n"
22098 "$ svn status\n"
22099 "?      mistake.txt\n"
22100 "?      whoops\n"
22102 #. (para)
22103 #: ../source/book.xml:20500
22104 msgid "<command>svn revert</command> is inherently dangerous, since its entire purpose is to throw away data—namely, your uncommitted changes. Once you've reverted, Subversion provides <emphasis>no way</emphasis> to get back those uncommitted changes."
22105 msgstr "<command>svn revert</command>本身有固有的危险,因为它的目的是放弃数据—未提交的修改。一旦你选择了恢复,Subversion<emphasis>没有方法</emphasis>找回未提交的修改。"
22107 #. (para)
22108 #: ../source/book.xml:20506
22109 #, fuzzy
22110 msgid "If you provide no targets to <command>svn revert</command>, it will do nothing—to protect you from accidentally losing changes in your working copy, <command>svn revert</command> requires you to provide at least one target."
22111 msgstr "如果你没有给<command>svn revert</command>提供了目标,它不会做任何事情—为了保护你不小心失去对工作拷贝的修改,<command>svn revert</command>需要你提供至少一个目标。"
22113 #. (tertiary)
22114 #: ../source/book.xml:20518
22115 msgid "status"
22116 msgstr "status"
22118 #. (refpurpose)
22119 #: ../source/book.xml:20522
22120 msgid "Print the status of working copy files and directories."
22121 msgstr "打印工作拷贝文件和目录的状态。"
22123 #. (programlisting)
22124 #: ../source/book.xml:20528
22125 #, no-wrap
22126 msgid "svn status [PATH...]"
22127 msgstr "svn status [PATH...]"
22129 #. (para)
22130 #: ../source/book.xml:20534
22131 #, fuzzy
22132 msgid "Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access). With <option>--show-updates</option>, it adds working revision and server out-of-date information. With <option>--verbose</option>, it prints full revision information on every item."
22133 msgstr "打印工作拷贝文件和目录的状态。如果没有参数,只会打印本地修改的项目(不会访问版本库),使用<option>--show-updates</option>选项,会添加工作修订版本和服务器过期信息。使用<option>--verbose</option>会打印每个项目的完全修订版本信息。"
22135 #. (para)
22136 #: ../source/book.xml:20541
22137 msgid "The first six columns in the output are each one character wide, and each column gives you information about different aspects of each working copy item."
22138 msgstr "输出的前六列都是一个字符宽,每一列给出了工作拷贝项目的每一方面的信息。"
22140 #. (para)
22141 #: ../source/book.xml:20544
22142 msgid "The first column indicates that an item was added, deleted, or otherwise changed."
22143 msgstr "第一列指出一个项目的是添加、删除还是其它的修改。"
22145 #. (term)
22146 #: ../source/book.xml:20548 ../source/book.xml:20629 ../source/book.xml:20655
22147 #: ../source/book.xml:20671 ../source/book.xml:20687 ../source/book.xml:20702
22148 #: ../source/book.xml:20750
22149 msgid "' '"
22150 msgstr "' '"
22152 #. (para)
22153 #: ../source/book.xml:20550 ../source/book.xml:20631
22154 msgid "No modifications."
22155 msgstr "没有修改。"
22157 #. (term)
22158 #: ../source/book.xml:20554
22159 msgid "'A'"
22160 msgstr "'A'"
22162 #. (para)
22163 #: ../source/book.xml:20556
22164 msgid "Item is scheduled for Addition."
22165 msgstr "预定要添加的项目。"
22167 #. (term)
22168 #: ../source/book.xml:20560
22169 msgid "'D'"
22170 msgstr "'D'"
22172 #. (para)
22173 #: ../source/book.xml:20562
22174 msgid "Item is scheduled for Deletion."
22175 msgstr "预定要删除的项目。"
22177 #. (term)
22178 #: ../source/book.xml:20566 ../source/book.xml:20635
22179 msgid "'M'"
22180 msgstr "'M'"
22182 #. (para)
22183 #: ../source/book.xml:20568
22184 msgid "Item has been modified."
22185 msgstr "项目已经修改了。"
22187 #. (term)
22188 #: ../source/book.xml:20572
22189 msgid "'R'"
22190 msgstr "'R'"
22192 #. (para)
22193 #: ../source/book.xml:20574
22194 msgid "Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place."
22195 msgstr "项目在工作拷贝中已经被替换了。这意味着文件预定要删除,然后有一个同样名称的文件要在同一个位置替换它。"
22197 #. (term)
22198 #: ../source/book.xml:20581 ../source/book.xml:20642
22199 msgid "'C'"
22200 msgstr "'C'"
22202 #. (para)
22203 #: ../source/book.xml:20583
22204 msgid "The contents (as opposed to the properties) of the item conflict with updates received from the repository."
22205 msgstr "项目的内容(相对于属性)与更新得到的数据冲突了。"
22207 #. (term)
22208 #: ../source/book.xml:20589
22209 msgid "'X'"
22210 msgstr "'X'"
22212 #. (para)
22213 #: ../source/book.xml:20591
22214 #, fuzzy
22215 msgid "Item is present because of an externals definition."
22216 msgstr "项目与外部定义相关。"
22218 #. (term)
22219 #: ../source/book.xml:20595
22220 msgid "'I'"
22221 msgstr "'I'"
22223 #. (para)
22224 #: ../source/book.xml:20597
22225 #, fuzzy
22226 msgid "Item is being ignored (e.g. with the <literal>svn:ignore</literal> property)."
22227 msgstr "项目被忽略(例如使用<literal>svn:ignore</literal>属性)。"
22229 #. (term)
22230 #: ../source/book.xml:20602
22231 msgid "'?'"
22232 msgstr "'?'"
22234 #. (para)
22235 #: ../source/book.xml:20604
22236 msgid "Item is not under version control."
22237 msgstr "项目不在版本控制之下。"
22239 #. (term)
22240 #: ../source/book.xml:20608
22241 msgid "'!'"
22242 msgstr "'!'"
22244 #. (para)
22245 #: ../source/book.xml:20610
22246 #, fuzzy
22247 msgid "Item is missing (e.g. you moved or deleted it without using <command>svn</command>). This also indicates that a directory is incomplete (a checkout or update was interrupted)."
22248 msgstr "项目已经丢失(例如,你使用<command>svn</command>移动或者删除了它)。这也说明了一个目录不是完整的(一个检出或更新中断)。"
22250 #. (term)
22251 #: ../source/book.xml:20617
22252 msgid "'~'"
22253 msgstr "'~'"
22255 #. (para)
22256 #: ../source/book.xml:20619
22257 msgid "Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object."
22258 msgstr "项目作为一种对象(文件、目录或链接)纳入版本控制,但是已经被另一种对象替代。"
22260 #. (para)
22261 #: ../source/book.xml:20625
22262 msgid "The second column tells the status of a file's or directory's properties."
22263 msgstr "第二列告诉一个文件或目录的属性的状态。"
22265 #. (para)
22266 #: ../source/book.xml:20637
22267 msgid "Properties for this item have been modified."
22268 msgstr "这个项目的属性已经修改。"
22270 #. (para)
22271 #: ../source/book.xml:20644
22272 msgid "Properties for this item are in conflict with property updates received from the repository."
22273 msgstr "这个项目的属性与从版本库得到的更新有冲突。"
22275 #. (para)
22276 #: ../source/book.xml:20650
22277 msgid "The third column is populated only if the working copy directory is locked. (See <xref linkend=\"svn.tour.cleanup\"/>.)"
22278 msgstr "第三列只在工作拷贝锁定时才会出现。(见<xref linkend=\"svn.tour.cleanup\"/>。)"
22280 #. (para)
22281 #: ../source/book.xml:20657
22282 msgid "Item is not locked."
22283 msgstr "项目没有锁定。"
22285 #. (term)
22286 #: ../source/book.xml:20661
22287 msgid "'L'"
22288 msgstr "'L'"
22290 #. (para)
22291 #: ../source/book.xml:20663
22292 msgid "Item is locked."
22293 msgstr "项目已经锁定。"
22295 #. (para)
22296 #: ../source/book.xml:20667
22297 msgid "The fourth column is populated only if the item is scheduled for addition-with-history."
22298 msgstr "第四列只在预定包含历史添加的项目出现。"
22300 #. (para)
22301 #: ../source/book.xml:20673
22302 msgid "No history scheduled with commit."
22303 msgstr "没有历史预定要提交。"
22305 #. (term)
22306 #: ../source/book.xml:20677
22307 msgid "'+'"
22308 msgstr "'+'"
22310 #. (para)
22311 #: ../source/book.xml:20679
22312 msgid "History scheduled with commit."
22313 msgstr "历史预定要伴随提交。"
22315 #. (para)
22316 #: ../source/book.xml:20683
22317 msgid "The fifth column is populated only if the item is switched relative to its parent (see <xref linkend=\"svn.branchmerge.switchwc\"/>)."
22318 msgstr "第五列只在项目跳转到相对于它的父目录时出现(见<xref linkend=\"svn.branchmerge.switchwc\"/>)。"
22320 #. (para)
22321 #: ../source/book.xml:20689
22322 msgid "Item is a child of its parent directory."
22323 msgstr "项目是它的父目录的孩子。"
22325 #. (term)
22326 #: ../source/book.xml:20693
22327 msgid "'S'"
22328 msgstr "'S'"
22330 #. (para)
22331 #: ../source/book.xml:20695
22332 msgid "Item is switched."
22333 msgstr "项目已经转换。"
22335 #. (para)
22336 #: ../source/book.xml:20699
22337 msgid "The sixth column is populated with lock information."
22338 msgstr "第六列显示锁定信息。"
22340 #. (para)
22341 #: ../source/book.xml:20704
22342 msgid "When <option>--show-updates</option> is used, the file is not locked. If <option>--show-updates</option> is <emphasis>not</emphasis> used, this merely means that the file is not locked in this working copy."
22343 msgstr "当使用<option>--show-updates</option>,文件没有锁定。如果<emphasis>不</emphasis>使用<option>--show-updates</option>,这意味着文件在工作拷贝被锁定。"
22345 #. (term)
22346 #: ../source/book.xml:20712
22347 msgid "K"
22348 msgstr "K"
22350 #. (para)
22351 #: ../source/book.xml:20714
22352 msgid "File is locked in this working copy."
22353 msgstr "文件锁定在工作拷贝。"
22355 #. (term)
22356 #: ../source/book.xml:20718
22357 msgid "O"
22358 msgstr "O"
22360 #. (para)
22361 #: ../source/book.xml:20720
22362 msgid "File is locked either by another user or in another working copy. This only appears when <option>--show-updates</option> is used."
22363 msgstr "文件被另一个工作拷贝的另一个用户锁定,只有在使用<option>--show-updates</option>时显示。"
22365 #. (term)
22366 #: ../source/book.xml:20726
22367 msgid "T"
22368 msgstr "T"
22370 #. (para)
22371 #: ../source/book.xml:20728
22372 #, fuzzy
22373 msgid "File was locked in this working copy, but the lock has been <quote>stolen</quote> and is invalid. The file is currently locked in the repository. This only appears when <option>--show-updates</option> is used."
22374 msgstr "文件锁定在工作拷贝,但是锁定被<quote>窃取</quote>而不可用。文件当前锁定在版本库,只有在使用<option>--show-updates</option>时显示。"
22376 #. (term)
22377 #: ../source/book.xml:20736
22378 msgid "B"
22379 msgstr "B"
22381 #. (para)
22382 #: ../source/book.xml:20738
22383 #, fuzzy
22384 msgid "File was locked in this working copy, but the lock has been <quote>broken</quote> and is invalid. The file is no longer locked This only appears when <option>--show-updates</option> is used."
22385 msgstr "文件锁定在工作拷贝,但是锁定被<quote>破坏</quote>而不可用。文件当前锁定在版本库,只有在使用<option>--show-updates</option>时显示。"
22387 #. (para)
22388 #: ../source/book.xml:20745
22389 #, fuzzy
22390 msgid "The out-of-date information appears in the seventh column (only if you pass the <option>--show-updates</option> option)."
22391 msgstr "过期信息出现在第七列(只在使用<option>--show-updates</option>选项时出现)。"
22393 #. (para)
22394 #: ../source/book.xml:20752
22395 msgid "The item in your working copy is up-to-date."
22396 msgstr "这个项目在工作拷贝是最新的。"
22398 #. (term)
22399 #: ../source/book.xml:20756
22400 msgid "'*'"
22401 msgstr "'*'"
22403 #. (para)
22404 #: ../source/book.xml:20758
22405 msgid "A newer revision of the item exists on the server."
22406 msgstr "在服务器这个项目有了新的修订版本。"
22408 #. (para)
22409 #: ../source/book.xml:20763
22410 #, fuzzy
22411 msgid "The remaining fields are variable width and delimited by spaces. The working revision is the next field if the <option>--show-updates</option> or <option>--verbose</option> options are passed."
22412 msgstr "余下的字段是可变得宽度且使用空格分隔,如果使用<option>--show-updates</option>或<option>--verbose</option>选项,工作修订版本是下一个字段。"
22414 #. (para)
22415 #: ../source/book.xml:20767
22416 #, fuzzy
22417 msgid "If the <option>--verbose</option> option is passed, the last committed revision and last committed author are displayed next."
22418 msgstr "如果传递<option>--verbose</option>选项,最后提交的修订版本和最后的提交作者会在后面显示。"
22420 #. (para)
22421 #: ../source/book.xml:20770
22422 msgid "The working copy path is always the final field, so it can include spaces."
22423 msgstr "工作拷贝路径永远是最后一个字段,所以它可以包括空格。"
22425 #. (para)
22426 #: ../source/book.xml:20777
22427 msgid "stat, st"
22428 msgstr "stat, st"
22430 #. (para)
22431 #: ../source/book.xml:20789
22432 msgid "Only if using <option>--show-updates</option>"
22433 msgstr "只有使用<option>--show-updates</option>时会访问"
22435 #. (screen)
22436 #: ../source/book.xml:20795
22437 #, no-wrap
22438 msgid ""
22439 "\n"
22440 "--show-updates (-u)\n"
22441 "--verbose (-v)\n"
22442 "--non-recursive (-N)\n"
22443 "--quiet (-q)\n"
22444 "--no-ignore\n"
22445 "--username USER\n"
22446 "--password PASS\n"
22447 "--no-auth-cache\n"
22448 "--non-interactive\n"
22449 "--config-dir DIR\n"
22450 "--ignore-externals\n"
22451 msgstr ""
22452 "\n"
22453 "--show-updates (-u)\n"
22454 "--verbose (-v)\n"
22455 "--non-recursive (-N)\n"
22456 "--quiet (-q)\n"
22457 "--no-ignore\n"
22458 "--username USER\n"
22459 "--password PASS\n"
22460 "--no-auth-cache\n"
22461 "--non-interactive\n"
22462 "--config-dir DIR\n"
22463 "--ignore-externals\n"
22465 #. (para)
22466 #: ../source/book.xml:20813
22467 msgid "This is the easiest way to find out what changes you have made to your working copy:"
22468 msgstr "这是查看你在工作拷贝所做的修改的最简单的方法。"
22470 #. (screen)
22471 #: ../source/book.xml:20815
22472 #, no-wrap
22473 msgid ""
22474 "\n"
22475 "$ svn status wc\n"
22476 " M     wc/bar.c\n"
22477 "A  +   wc/qax.c\n"
22478 msgstr ""
22479 "\n"
22480 "$ svn status wc\n"
22481 " M     wc/bar.c\n"
22482 "A  +   wc/qax.c\n"
22484 #. (para)
22485 #: ../source/book.xml:20820
22486 #, fuzzy
22487 msgid "If you want to find out what files in your working copy are out-of-date, pass the <option>--show-updates</option> option (this will <emphasis>not</emphasis> make any changes to your working copy). Here you can see that <filename>wc/foo.c</filename> has changed in the repository since we last updated our working copy:"
22488 msgstr "如果你希望找出工作拷贝哪些文件是最新的,使用<option>--show-updates</option>选项(这不会对工作拷贝有任何修改)。这里你会看到<filename>wc/foo.c</filename>在上次更新后有了修改:"
22490 #. (screen)
22491 #: ../source/book.xml:20828
22492 #, no-wrap
22493 msgid ""
22494 "\n"
22495 "$ svn status --show-updates wc\n"
22496 " M           965    wc/bar.c\n"
22497 "       *     965    wc/foo.c\n"
22498 "A  +         965    wc/qax.c\n"
22499 "Status against revision:    981\n"
22500 msgstr ""
22501 "\n"
22502 "$ svn status --show-updates wc\n"
22503 " M           965    wc/bar.c\n"
22504 "       *     965    wc/foo.c\n"
22505 "A  +         965    wc/qax.c\n"
22506 "Status against revision:    981\n"
22508 #. (para)
22509 #: ../source/book.xml:20836
22510 #, fuzzy
22511 msgid "<option>--show-updates</option><emphasis>only</emphasis> places an asterisk next to items that are out of date (that is, items that will be updated from the repository if you run <command>svn update</command>). <option>--show-updates</option> does <emphasis>not</emphasis> cause the status listing to reflect the repository's version of the item (although you can see the revision number in the repository by passing the <option>--verbose</option> option)."
22512 msgstr "<option>--show-updates</option><emphasis>只会</emphasis>在过期的项目(如果你运行<command>svn update</command>,就会更新的项目)旁边安置一个星号。<option>--show-updates</option>不会导致状态列表反映项目的版本库版本。"
22514 #. (para)
22515 #: ../source/book.xml:20845
22516 msgid "And finally, the most information you can get out of the status subcommand:"
22517 msgstr "最后,是你能从status子命令得到的所有信息:"
22519 #. (screen)
22520 #: ../source/book.xml:20847
22521 #, no-wrap
22522 msgid ""
22523 "\n"
22524 "$ svn status --show-updates --verbose wc\n"
22525 " M           965       938 sally        wc/bar.c\n"
22526 "       *     965       922 harry        wc/foo.c\n"
22527 "A  +         965       687 harry        wc/qax.c\n"
22528 "             965       687 harry        wc/zig.c\n"
22529 "Head revision:   981\n"
22530 msgstr ""
22531 "\n"
22532 "$ svn status --show-updates --verbose wc\n"
22533 " M           965       938 sally        wc/bar.c\n"
22534 "       *     965       922 harry        wc/foo.c\n"
22535 "A  +         965       687 harry        wc/qax.c\n"
22536 "             965       687 harry        wc/zig.c\n"
22537 "Head revision:   981\n"
22539 #. (para)
22540 #: ../source/book.xml:20855
22541 #, fuzzy
22542 msgid "For many more examples of <command>svn status</command>, see <xref linkend=\"svn.tour.cycle.examine.status\"/>."
22543 msgstr "关于<command>svn status</command>的更多例子可以见<xref linkend=\"svn.tour.cycle.examine.status\"/>。"
22545 #. (tertiary)
22546 #: ../source/book.xml:20863
22547 msgid "switch"
22548 msgstr "switch"
22550 #. (refname)
22551 #: ../source/book.xml:20866
22552 msgid "svn switch"
22553 msgstr "svn switch"
22555 #. (refpurpose)
22556 #: ../source/book.xml:20867
22557 msgid "Update working copy to a different URL."
22558 msgstr "把工作拷贝更新到别的URL。"
22560 #. (programlisting)
22561 #: ../source/book.xml:20873
22562 #, no-wrap
22563 msgid "svn switch URL [PATH]"
22564 msgstr "svn switch URL [PATH]"
22566 #. (programlisting)
22567 #: ../source/book.xml:20874
22568 #, no-wrap
22569 msgid "switch --relocate FROM TO [PATH...]"
22570 msgstr "switch --relocate FROM TO [PATH...]"
22572 #. (para)
22573 #: ../source/book.xml:20880
22574 #, fuzzy
22575 msgid "The first variant of this subcommand (without the <option>--relocate</option> option) updates your working copy to point to a new URL—usually a URL which shares a common ancestor with your working copy, although not necessarily. This is the Subversion way to move a working copy to a new branch. See <xref linkend=\"svn.branchmerge.switchwc\"/> for an in-depth look at switching."
22576 msgstr "这个子命令更新你的工作拷贝来反映新的URL—通常是一个与你的工作拷贝分享共同祖先的URL,尽管这不是必需的。这是Subversion移动工作拷贝到分支的方式。更深入的了解请见<xref linkend=\"svn.branchmerge.switchwc\"/>。"
22578 #. (para)
22579 #: ../source/book.xml:20887
22580 msgid "The <option>--relocate</option> option causes <command>svn switch</command> to do something different: it updates your working copy to point to <emphasis>the same</emphasis> repository directory, only at a different URL (typically because an administrator has moved the repository to another server, or to another URL on the same server)."
22581 msgstr "<option>--relocate</option>选项导致<command>svn switch</command>做不同的事情:它更新你的工作拷贝指向到<emphasis>同一个</emphasis>版本库目录,但是不同的URL(通常因为管理员将版本库转移了服务器,或到了同一个服务器的另一个URL)。"
22583 #. (para)
22584 #: ../source/book.xml:20900
22585 msgid "sw"
22586 msgstr "sw"
22588 #. (screen)
22589 #: ../source/book.xml:20918
22590 #, no-wrap
22591 msgid ""
22592 "\n"
22593 "--revision (-r) REV\n"
22594 "--non-recursive (-N)\n"
22595 "--quiet (-q)\n"
22596 "--diff3-cmd CMD\n"
22597 "--relocate FROM TO\n"
22598 "--username USER\n"
22599 "--password PASS\n"
22600 "--no-auth-cache\n"
22601 "--non-interactive\n"
22602 "--config-dir DIR\n"
22603 msgstr ""
22604 "\n"
22605 "--revision (-r) REV\n"
22606 "--non-recursive (-N)\n"
22607 "--quiet (-q)\n"
22608 "--diff3-cmd CMD\n"
22609 "--relocate FROM TO\n"
22610 "--username USER\n"
22611 "--password PASS\n"
22612 "--no-auth-cache\n"
22613 "--non-interactive\n"
22614 "--config-dir DIR\n"
22616 #. (para)
22617 #: ../source/book.xml:20935
22618 #, fuzzy
22619 msgid "If you're currently inside the directory <filename>vendors</filename>, which was branched to <filename>vendors-with-fix</filename>, and you'd like to switch your working copy to that branch:"
22620 msgstr "如果你目前所在目录<filename>vendors</filename>分支到<filename>vendors-with-fix</filename>,你希望转移到那个分支:"
22622 #. (screen)
22623 #: ../source/book.xml:20939
22624 #, no-wrap
22625 msgid ""
22626 "\n"
22627 "$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .\n"
22628 "U  myproj/foo.txt\n"
22629 "U  myproj/bar.txt\n"
22630 "U  myproj/baz.c\n"
22631 "U  myproj/qux.c\n"
22632 "Updated to revision 31.\n"
22633 msgstr ""
22634 "\n"
22635 "$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .\n"
22636 "U  myproj/foo.txt\n"
22637 "U  myproj/bar.txt\n"
22638 "U  myproj/baz.c\n"
22639 "U  myproj/qux.c\n"
22640 "Updated to revision 31.\n"
22642 #. (para)
22643 #: ../source/book.xml:20947
22644 msgid "And to switch back, just provide the URL to the location in the repository from which you originally checked out your working copy:"
22645 msgstr "为了跳转回来,只需要提供最初取出工作拷贝的版本库URL:"
22647 #. (screen)
22648 #: ../source/book.xml:20950
22649 #, no-wrap
22650 msgid ""
22651 "\n"
22652 "$ svn switch http://svn.red-bean.com/repos/trunk/vendors .\n"
22653 "U  myproj/foo.txt\n"
22654 "U  myproj/bar.txt\n"
22655 "U  myproj/baz.c\n"
22656 "U  myproj/qux.c\n"
22657 "Updated to revision 31.\n"
22658 msgstr ""
22659 "\n"
22660 "$ svn switch http://svn.red-bean.com/repos/trunk/vendors .\n"
22661 "U  myproj/foo.txt\n"
22662 "U  myproj/bar.txt\n"
22663 "U  myproj/baz.c\n"
22664 "U  myproj/qux.c\n"
22665 "Updated to revision 31.\n"
22667 #. (para)
22668 #: ../source/book.xml:20959
22669 msgid "You can just switch part of your working copy to a branch if you don't want to switch your entire working copy."
22670 msgstr "如果你不希望跳转所有的工作拷贝,你可以只跳转一部分。"
22672 #. (para)
22673 #: ../source/book.xml:20963
22674 #, fuzzy
22675 msgid "Sometimes an administrator might change the <quote>base location</quote> of your repository—in other words, the contents of the repository doesn't change, but the main URL used to reach the root of the repository does. For example, the hostname may change, the URL scheme may change, or any part of the URL which leads to the repository itself may change. Rather than check out a new working copy, you can have the <command>svn switch</command> command <quote>rewrite</quote> the beginnings of all the URLs in your working copy. Use the <option>--relocate</option> option to do the substitution. No file contents are changed, nor is the repository contacted. It's similar to running a Perl script over your working copy <filename>.svn/</filename> directories which runs <command>s/OldRoot/NewRoot/</command>."
22676 msgstr "有时候管理员会修改版本库的<quote>基本位置</quote>—换句话说,版本库的内容并不改变,但是访问根的主URL变了。举个例子,主机名变了、URL模式变了或者是URL中的任何一部分改变了。我们不选择重新检出一个工作拷贝,你可以使用<command>svn switch</command>来重写版本库所有URL的开头。使用<option>--relocate</option>来做这种替换,没有文件内容会改变,访问的版本库也不会改变。只是像在工作拷贝<filename>.svn/</filename>运行了一段Perl脚本<command>s/OldRoot/NewRoot/</command>。"
22678 #. (screen)
22679 #: ../source/book.xml:20978
22680 #, fuzzy, no-wrap
22681 msgid ""
22682 "\n"
22683 "$ svn checkout file:///var/svn/repos test\n"
22684 "A  test/a\n"
22685 "A  test/b\n"
22686 "…\n"
22687 "\n"
22688 "$ mv repos newlocation\n"
22689 "$ cd test/\n"
22690 "\n"
22691 "$ svn update\n"
22692 "svn: Unable to open an ra_local session to URL\n"
22693 "svn: Unable to open repository 'file:///var/svn/repos'\n"
22694 "\n"
22695 "$ svn switch --relocate file:///var/svn/repos file:///tmp/newlocation .\n"
22696 "$ svn update\n"
22697 "At revision 3.\n"
22698 msgstr ""
22699 "\n"
22700 "$ svn checkout file:///tmp/repos test\n"
22701 "A  test/a\n"
22702 "A  test/b\n"
22703 "…\n"
22704 "\n"
22705 "$ mv repos newlocation\n"
22706 "$ cd test/\n"
22707 "\n"
22708 "$ svn update\n"
22709 "svn: Unable to open an ra_local session to URL\n"
22710 "svn: Unable to open repository 'file:///tmp/repos'\n"
22711 "\n"
22712 "$ svn switch --relocate file:///tmp/repos file:///tmp/newlocation .\n"
22713 "$ svn update\n"
22714 "At revision 3.\n"
22716 #. (para)
22717 #: ../source/book.xml:20996
22718 msgid "Be careful when using the <option>--relocate</option> option. If you mistype the argument, you might end up creating nonsensical URLs within your working copy that render the whole workspace unusable and tricky to fix. It's also important to understand exactly when one should or shouldn't use <option>--relocate</option>. Here's the rule of thumb:"
22719 msgstr "小心使用<option>--relocate</option>选项,如果你输入了错误的选项,你会在工作拷贝创建无意义的URL,会导致整个工作区不可用并且难于修复。理解何时应该使用<option>--relocate</option>也是非常重要的,下面是一些规则:"
22721 #. (para)
22722 #: ../source/book.xml:21006
22723 #, fuzzy
22724 msgid "If the working copy needs to reflect a new directory <emphasis>within</emphasis> the repository, then use just <command>svn switch</command>."
22725 msgstr "如果工作拷贝需要反映一个版本库的新目录,只需要使用<command>svn switch</command>。"
22727 #. (para)
22728 #: ../source/book.xml:21012
22729 #, fuzzy
22730 msgid "If the working copy still reflects the same repository directory, but the location of the repository itself has changed, then use <command>svn switch --relocate</command>."
22731 msgstr "如果你的工作拷贝还是反映相同的版本库目录,但是版本库本身的位置改变了,使用<command>svn switch --relocate</command>。"
22733 #. (tertiary)
22734 #: ../source/book.xml:21025
22735 msgid "unlock"
22736 msgstr "unlock"
22738 #. (refname)
22739 #: ../source/book.xml:21028
22740 msgid "svn unlock"
22741 msgstr "svn unlock"
22743 #. (refpurpose)
22744 #: ../source/book.xml:21029
22745 msgid "Unlock working copy paths or URLs."
22746 msgstr "解锁工作拷贝路径或URL。"
22748 #. (programlisting)
22749 #: ../source/book.xml:21035
22750 #, no-wrap
22751 msgid "svn unlock TARGET..."
22752 msgstr "svn unlock TARGET..."
22754 #. (para)
22755 #: ../source/book.xml:21041
22756 msgid "Unlock each <replaceable>TARGET</replaceable>. If any <replaceable>TARGET</replaceable> is either locked by another user or no valid lock token exists in the working copy, print a warning and continue unlocking the rest of the <replaceable>TARGET</replaceable>s. Use <option>--force</option> to break a lock belonging to another user or working copy."
22757 msgstr "解锁每个<replaceable>TARGET</replaceable>。如果任何另一个用户锁定了<replaceable>TARGET</replaceable>,或者没有正确工作拷贝的锁定令牌,打印警告并继续解锁余下的<replaceable>TARGET</replaceable>。使用<option>--force</option>可以打破其它用户或工作拷贝的锁定。"
22759 #. (screen)
22760 #: ../source/book.xml:21071
22761 #, no-wrap
22762 msgid ""
22763 "\n"
22764 "--targets FILENAME\n"
22765 "--username USER\n"
22766 "--password PASS\n"
22767 "--no-auth-cache\n"
22768 "--non-interactive\n"
22769 "--config-dir DIR\n"
22770 "--force\n"
22771 msgstr ""
22772 "\n"
22773 "--targets FILENAME\n"
22774 "--username USER\n"
22775 "--password PASS\n"
22776 "--no-auth-cache\n"
22777 "--non-interactive\n"
22778 "--config-dir DIR\n"
22779 "--force\n"
22781 #. (para)
22782 #: ../source/book.xml:21085
22783 msgid "Unlock two files in your working copy:"
22784 msgstr "解锁工作拷贝中的两个文件:"
22786 #. (screen)
22787 #: ../source/book.xml:21086
22788 #, no-wrap
22789 msgid ""
22790 "\n"
22791 "\n"
22792 "$ svn unlock tree.jpg house.jpg\n"
22793 "'tree.jpg' unlocked.\n"
22794 "'house.jpg' unlocked.\n"
22795 msgstr ""
22796 "\n"
22797 "\n"
22798 "$ svn unlock tree.jpg house.jpg\n"
22799 "'tree.jpg' unlocked.\n"
22800 "'house.jpg' unlocked.\n"
22802 #. (para)
22803 #: ../source/book.xml:21092
22804 msgid "Unlock a file in your working copy that is currently locked by another user:"
22805 msgstr "解锁工作拷贝的一个被其他用户锁定的文件:"
22807 #. (screen)
22808 #: ../source/book.xml:21094
22809 #, no-wrap
22810 msgid ""
22811 "\n"
22812 "$ svn unlock tree.jpg\n"
22813 "svn: 'tree.jpg' is not locked in this working copy\n"
22814 "$ svn unlock --force tree.jpg\n"
22815 "'tree.jpg' unlocked.\n"
22816 msgstr ""
22817 "\n"
22818 "$ svn unlock tree.jpg\n"
22819 "svn: 'tree.jpg' is not locked in this working copy\n"
22820 "$ svn unlock --force tree.jpg\n"
22821 "'tree.jpg' unlocked.\n"
22823 #. (para)
22824 #: ../source/book.xml:21100
22825 msgid "Unlock a file without a working copy:"
22826 msgstr "没有工作拷贝时解锁一个文件:"
22828 #. (screen)
22829 #: ../source/book.xml:21101
22830 #, no-wrap
22831 msgid ""
22832 "\n"
22833 "$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg\n"
22834 "'tree.jpg unlocked.\n"
22835 msgstr ""
22836 "\n"
22837 "$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg\n"
22838 "'tree.jpg unlocked.\n"
22840 #. (tertiary)
22841 #: ../source/book.xml:21112
22842 msgid "update"
22843 msgstr "update"
22845 #. (refpurpose)
22846 #: ../source/book.xml:21116
22847 msgid "Update your working copy."
22848 msgstr "更新你的工作拷贝。"
22850 #. (programlisting)
22851 #: ../source/book.xml:21122
22852 #, no-wrap
22853 msgid "svn update [PATH...]"
22854 msgstr "svn update [PATH...]"
22856 #. (para)
22857 #: ../source/book.xml:21128
22858 #, fuzzy
22859 msgid "<command>svn update</command> brings changes from the repository into your working copy. If no revision is given, it brings your working copy up-to-date with the <literal>HEAD</literal> revision. Otherwise, it synchronizes the working copy to the revision given by the <option>--revision</option> option. As part of the synchronization, <command>svn update</command> also removes any stale locks (see <xref linkend=\"svn.tour.cleanup\"/>) found in the working copy."
22860 msgstr "<command>svn update</command>会把版本库的修改带到工作拷贝,如果没有给定修订版本,它会把你的工作拷贝更新到<literal>HEAD</literal>修订版本,否则,它会把工作拷贝更新到你用<option>--revision</option>指定的修订版本。为了保持同步,<command>svn update</command>也会删除所有在工作拷贝发现的无效锁定(见<xref linkend=\"svn.tour.cleanup\"/>)。"
22862 #. (para)
22863 #: ../source/book.xml:21137
22864 #, fuzzy
22865 msgid "For each updated item, it prints a line that starts with a character reporting the action taken. These characters have the following meaning:"
22866 msgstr "对于每一个更新的项目开头都有一个表示所做动作的字符,这些字符有下面的意思:"
22868 #. (term)
22869 #: ../source/book.xml:21142
22870 msgid "A"
22871 msgstr "A"
22873 #. (para)
22874 #: ../source/book.xml:21144
22875 msgid "Added"
22876 msgstr "添加"
22878 #. (term)
22879 #: ../source/book.xml:21148
22880 msgid "D"
22881 msgstr "D"
22883 #. (para)
22884 #: ../source/book.xml:21150
22885 msgid "Deleted"
22886 msgstr "删除"
22888 #. (term)
22889 #: ../source/book.xml:21154
22890 msgid "U"
22891 msgstr "U"
22893 #. (para)
22894 #: ../source/book.xml:21156
22895 msgid "Updated"
22896 msgstr "更新"
22898 #. (term)
22899 #: ../source/book.xml:21160
22900 msgid "C"
22901 msgstr "C"
22903 #. (para)
22904 #: ../source/book.xml:21162
22905 #, fuzzy
22906 msgid "Conflicted"
22907 msgstr "冲突"
22909 #. (term)
22910 #: ../source/book.xml:21166
22911 msgid "G"
22912 msgstr "G"
22914 #. (para)
22915 #: ../source/book.xml:21168
22916 msgid "Merged"
22917 msgstr "合并"
22919 #. (para)
22920 #: ../source/book.xml:21172
22921 msgid "A character in the first column signifies an update to the actual file, while updates to the file's properties are shown in the second column."
22922 msgstr "第一列的字符反映文件本身的更新,而第二列会反映文件属性的更新。"
22924 #. (para)
22925 #: ../source/book.xml:21180
22926 msgid "up"
22927 msgstr "up"
22929 #. (screen)
22930 #: ../source/book.xml:21198
22931 #, fuzzy, no-wrap
22932 msgid ""
22933 "\n"
22934 "--revision (-r) REV\n"
22935 "--non-recursive (-N)\n"
22936 "--quiet (-q)\n"
22937 "--no-ignore\n"
22938 "--incremental\n"
22939 "--diff3-cmd CMD\n"
22940 "--username USER\n"
22941 "--password PASS\n"
22942 "--no-auth-cache\n"
22943 "--non-interactive\n"
22944 "--config-dir DIR\n"
22945 "--ignore-externals\n"
22946 msgstr ""
22947 "\n"
22948 "--revision (-r) REV\n"
22949 "--non-recursive (-N)\n"
22950 "--quiet (-q)\n"
22951 "--diff3-cmd CMD\n"
22952 "--username USER\n"
22953 "--password PASS\n"
22954 "--no-auth-cache\n"
22955 "--non-interactive\n"
22956 "--config-dir DIR\n"
22957 "--ignore-externals\n"
22959 #. (para)
22960 #: ../source/book.xml:21217
22961 msgid "Pick up repository changes that have happened since your last update:"
22962 msgstr "获取你上次更新之后版本库的修改:"
22964 #. (screen)
22965 #: ../source/book.xml:21219
22966 #, no-wrap
22967 msgid ""
22968 "\n"
22969 "$ svn update\n"
22970 "A  newdir/toggle.c\n"
22971 "A  newdir/disclose.c\n"
22972 "A  newdir/launch.c\n"
22973 "D  newdir/README\n"
22974 "Updated to revision 32.\n"
22975 msgstr ""
22976 "\n"
22977 "$ svn update\n"
22978 "A  newdir/toggle.c\n"
22979 "A  newdir/disclose.c\n"
22980 "A  newdir/launch.c\n"
22981 "D  newdir/README\n"
22982 "Updated to revision 32.\n"
22984 #. (para)
22985 #: ../source/book.xml:21227
22986 #, fuzzy
22987 msgid "You can also <quote>update</quote> your working copy to an older revision (Subversion doesn't have the concept of <quote>sticky</quote> files like CVS does; see <xref linkend=\"svn.forcvs\"/>):"
22988 msgstr "你也可以将工作拷贝更新到旧的修订版本(Subversion没有CVS的<quote>sticky</quote>文件的概念;见<xref linkend=\"svn.forcvs\"/>):"
22990 #. (screen)
22991 #: ../source/book.xml:21230
22992 #, no-wrap
22993 msgid ""
22994 "\n"
22995 "$ svn update -r30\n"
22996 "A  newdir/README\n"
22997 "D  newdir/toggle.c\n"
22998 "D  newdir/disclose.c\n"
22999 "D  newdir/launch.c\n"
23000 "U  foo.c\n"
23001 "Updated to revision 30.\n"
23002 msgstr ""
23003 "\n"
23004 "$ svn update -r30\n"
23005 "A  newdir/README\n"
23006 "D  newdir/toggle.c\n"
23007 "D  newdir/disclose.c\n"
23008 "D  newdir/launch.c\n"
23009 "U  foo.c\n"
23010 "Updated to revision 30.\n"
23012 #. (para)
23013 #: ../source/book.xml:21240
23014 #, fuzzy
23015 msgid "If you want to examine an older revision of a single file, you may want to use <command>svn cat</command> instead—it won't change your working copy."
23016 msgstr "如果你希望检查单个文件的旧的修订版本,你会希望使用<command>svn cat</command>。"
23018 #. (para)
23019 #: ../source/book.xml:21257
23020 #, fuzzy
23021 msgid "<command>svnadmin</command> is the administrative tool for monitoring and repairing your Subversion repository. For detailed information, see <xref linkend=\"svn.reposadmin.maint.tk.svnadmin\"/>."
23022 msgstr "<command>svnadmin</command>是一个用来监控和修改Subversion版本库的管理工具,详情请见<xref linkend=\"svn.reposadmin.maint.tk.svnadmin\"/>。"
23024 #. (para)
23025 #: ../source/book.xml:21260
23026 #, fuzzy
23027 msgid "Since <command>svnadmin</command> works via direct repository access (and thus can only be used on the machine that holds the repository), it refers to the repository with a path, not a URL."
23028 msgstr "因为<command>svnadmin</command>直接访问版本库(因此只可以在存放版本库的机器上使用),它通过路径访问版本库,而不是URL。"
23030 #. (title)
23031 #: ../source/book.xml:21266
23032 #, fuzzy
23033 msgid "<command>svnadmin</command> Options"
23034 msgstr "<command>svnadmin</command> 选项"
23036 #. (option)
23037 #: ../source/book.xml:21271
23038 msgid "--bdb-log-keep"
23039 msgstr "--bdb-log-keep"
23041 #. (para)
23042 #: ../source/book.xml:21274
23043 msgid "(Berkeley DB specific) Disable automatic log removal of database log files. Having these log files around can be convenient if you need to restore from a catastrophic repository failure."
23044 msgstr "(Berkeley DB特定)关闭数据库日志文件的自动删除,保留这些文件可以帮助你在灾难性版本库故障时更加便利。"
23046 #. (option)
23047 #: ../source/book.xml:21282
23048 msgid "--bdb-txn-nosync"
23049 msgstr "--bdb-txn-nosync"
23051 #. (para)
23052 #: ../source/book.xml:21285
23053 msgid "(Berkeley DB specific) Disables fsync when committing database transactions. Used with the <command>svnadmin create</command> command to create a Berkeley DB backed repository with <literal>DB_TXN_NOSYNC</literal> enabled (which improves speed but has some risks associated with it)."
23054 msgstr "(Berkeley DB特定)在提交数据库事务时关闭fsync。可以在<command>svnadmin create</command>命令创建Berkeley DB后端时开启<literal>DB_TXN_NOSYNC</literal>(可以改进速度,但是有相关的风险)。"
23056 #. (option)
23057 #: ../source/book.xml:21295
23058 msgid "--bypass-hooks"
23059 msgstr "--bypass-hooks"
23061 #. (para)
23062 #: ../source/book.xml:21298
23063 msgid "Bypass the repository hook system."
23064 msgstr "绕过版本库钩子系统。"
23066 #. (option)
23067 #: ../source/book.xml:21303
23068 msgid "--clean-logs"
23069 msgstr "--clean-logs"
23071 #. (para)
23072 #: ../source/book.xml:21306
23073 msgid "Removes unused Berkeley DB logs."
23074 msgstr "删除不使用的Berkeley DB日志。"
23076 #. (option)
23077 #: ../source/book.xml:21312
23078 msgid "--force-uuid"
23079 msgstr "--force-uuid"
23081 #. (para)
23082 #: ../source/book.xml:21315
23083 #, fuzzy
23084 msgid "By default, when loading data into repository that already contains revisions, <command>svnadmin</command> will ignore the <literal>UUID</literal> from the dump stream. This option will cause the repository's <literal>UUID</literal> to be set to the <literal>UUID</literal> from the stream."
23085 msgstr "缺省情况下,当版本库加载已经包含修订版本的数据时<command>svnadmin</command>会忽略流中的<literal>UUID</literal>,这个选项会导致版本库的<literal>UUID</literal>设置为流的<literal>UUID</literal>。"
23087 #. (option)
23088 #: ../source/book.xml:21325
23089 msgid "--ignore-uuid"
23090 msgstr "--ignore-uuid"
23092 #. (para)
23093 #: ../source/book.xml:21328
23094 #, fuzzy
23095 msgid "By default, when loading an empty repository, <command>svnadmin</command> will ignore the <literal>UUID</literal> from the dump stream. This option will force that UUID to be ignored (useful for overriding your configuration file if it has <option>--force-uuid</option> set)."
23096 msgstr "缺省情况下,当加载空版本库时,<command>svnadmin</command>会使用来自流中的<literal>UUID</literal>,这个选项会导致忽略UUID。"
23098 #. (para)
23099 #: ../source/book.xml:21341
23100 msgid "Dump a revision only as a diff against the previous revision, instead of the usual fulltext."
23101 msgstr "导出一个修订版本针对前一个修订版本的区别,而不是通常的完全结果。"
23103 #. (option)
23104 #: ../source/book.xml:21348
23105 msgid "--parent-dir <placeholder-1/>"
23106 msgstr "--parent-dir <placeholder-1/>"
23108 #. (para)
23109 #: ../source/book.xml:21352
23110 #, fuzzy
23111 msgid "When loading a dump file, root paths at <replaceable>DIR</replaceable> instead of <filename>/</filename>."
23112 msgstr "当加载一个转储文件时,根路径为<replaceable>DIR</replaceable>而不是<filename>/</filename>。"
23114 #. (term)
23115 #: ../source/book.xml:21358
23116 msgid "<option>--revision</option> (<option>-r</option>) <replaceable>ARG</replaceable>"
23117 msgstr "<option>--revision</option> (<option>-r</option>) <replaceable>ARG</replaceable>"
23119 #. (para)
23120 #: ../source/book.xml:21361
23121 msgid "Specify a particular revision to operate on."
23122 msgstr "指定一个操作的修订版本。"
23124 #. (option)
23125 #: ../source/book.xml:21367
23126 msgid "--quiet"
23127 msgstr "--quiet"
23129 #. (para)
23130 #: ../source/book.xml:21370
23131 msgid "Do not show normal progress—show only errors."
23132 msgstr "不显示通常的过程—只显示错误。"
23134 #. (option)
23135 #: ../source/book.xml:21376
23136 msgid "--use-post-commit-hook"
23137 msgstr "--use-post-commit-hook"
23139 #. (para)
23140 #: ../source/book.xml:21379
23141 msgid "When loading a dump file, run the repository's post-commit hook after finalizing each newly loaded revision."
23142 msgstr "当导入使用一个转储文件时,在每次新的修订版本产生时运行版本库post-commit钩子。"
23144 #. (option)
23145 #: ../source/book.xml:21386
23146 msgid "--use-pre-commit-hook"
23147 msgstr "--use-pre-commit-hook"
23149 #. (para)
23150 #: ../source/book.xml:21389
23151 msgid "When loading a dump file, run the repository's pre-commit hook before finalizing each newly loaded revision. If the hook fails, abort the commit and terminate the load process."
23152 msgstr "当加载一个转储文件时,每次新加修订版本之前运行版本库的pre-commit钩子。如果钩子失败,终止提交并中断加载进程。"
23154 #. (title)
23155 #: ../source/book.xml:21400
23156 #, fuzzy
23157 msgid "<command>svnadmin</command> Subcommands"
23158 msgstr "<command>svnadmin</command> 子命令"
23160 #. (tertiary)
23161 #: ../source/book.xml:21406
23162 msgid "create"
23163 msgstr "create"
23165 #. (refname)
23166 #: ../source/book.xml:21409
23167 msgid "svnadmin create"
23168 msgstr "svnadmin create"
23170 #. (refpurpose)
23171 #: ../source/book.xml:21410
23172 msgid "Create a new, empty repository."
23173 msgstr "创建一个新的空的版本库。"
23175 #. (programlisting)
23176 #: ../source/book.xml:21416
23177 #, no-wrap
23178 msgid "svnadmin create REPOS_PATH"
23179 msgstr "svnadmin create REPOS_PATH"
23181 #. (para)
23182 #: ../source/book.xml:21424
23183 #, fuzzy
23184 msgid "Remember, <command>svnadmin</command> works only with local <emphasis>paths</emphasis>, not <emphasis>URLs</emphasis>."
23185 msgstr "记住<command>svnadmin</command>只工作在本地<emphasis>路径</emphasis>,而不是<emphasis>URL</emphasis>。"
23187 #. (para)
23188 #: ../source/book.xml:21422
23189 #, fuzzy
23190 msgid "Create a new, empty repository at the path provided. If the provided directory does not exist, it will be created for you.<placeholder-1/> As of Subversion 1.2, <command>svnadmin</command> creates new repositories with the <literal>fsfs</literal> filesystem backend by default."
23191 msgstr "在提供的路径上创建一个新的空的版本库,如果提供的目录不存在,它会为你创建。<placeholder-1/>对于Subversion 1.2,<command>svnadmin</command>缺省使用<literal>fsfs</literal>文件系统后端创建版本库。"
23193 #. (para)
23194 #: ../source/book.xml:21431
23195 msgid "While <command>svnadmin create</command> will create the base directory for a new repository, it will not create intermediate directories. For example, if you have an empty directory named <filename>/var/svn</filename>, creating <filename>/var/svn/repos</filename> will work, while attempting to create <filename>/var/svn/subdirectory/repos</filename> will fail with an error."
23196 msgstr ""
23198 #. (screen)
23199 #: ../source/book.xml:21445
23200 #, no-wrap
23201 msgid ""
23202 "\n"
23203 "--bdb-txn-nosync\n"
23204 "--bdb-log-keep\n"
23205 "--config-dir DIR\n"
23206 "--fs-type TYPE\n"
23207 msgstr ""
23208 "\n"
23209 "--bdb-txn-nosync\n"
23210 "--bdb-log-keep\n"
23211 "--config-dir DIR\n"
23212 "--fs-type TYPE\n"
23214 #. (para)
23215 #: ../source/book.xml:21456
23216 msgid "Creating a new repository is just this easy:"
23217 msgstr "创建一个版本库就是这样简单:"
23219 #. (para)
23220 #: ../source/book.xml:21460
23221 msgid "In Subversion 1.0, a Berkeley DB repository is always created. In Subversion 1.1, a Berkeley DB repository is the default repository type, but an FSFS repository can be created using the <option>--fs-type</option> option:"
23222 msgstr "在Subversion 1.0,一定会创建一个Berkeley DB版本库,在Subversion 1.1,Berkeley DB版本库是缺省类型,但是一个FSFS版本库也是可以创建,使用<option>--fs-type</option>选项:"
23224 #. (screen)
23225 #: ../source/book.xml:21465
23226 #, fuzzy, no-wrap
23227 msgid ""
23228 "\n"
23229 "$ svnadmin create /var/svn/repos --fs-type fsfs\n"
23230 msgstr ""
23231 "\n"
23232 "$ svnadmin create /usr/local/svn/repos --fs-type fsfs\n"
23234 #. (tertiary)
23235 #: ../source/book.xml:21474
23236 msgid "deltify"
23237 msgstr "deltify"
23239 #. (refname)
23240 #: ../source/book.xml:21477
23241 msgid "svnadmin deltify"
23242 msgstr "svnadmin deltify"
23244 #. (refpurpose)
23245 #: ../source/book.xml:21478
23246 msgid "Deltify changed paths in a revision range."
23247 msgstr "修订版本范围的路径的增量变化。"
23249 #. (programlisting)
23250 #: ../source/book.xml:21484
23251 #, no-wrap
23252 msgid "svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH"
23253 msgstr "svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH"
23255 #. (para)
23256 #: ../source/book.xml:21490
23257 #, fuzzy
23258 msgid "<command>svnadmin deltify</command> exists in current versions of Subversion only for historical reasons. This command is deprecated and no longer needed."
23259 msgstr "<command>svnadmin deltify</command>因为历史原因只存在于1.0.x,这个命令已经废弃,不再需要。"
23261 #. (para)
23262 #: ../source/book.xml:21493
23263 msgid "It dates from a time when Subversion offered administrators greater control over compression strategies in the repository. This turned out to be a lot of complexity for <emphasis>very</emphasis> little gain, and this <quote>feature</quote> was deprecated."
23264 msgstr "它开始于当Subversion提供了管理员控制版本库压缩策略的能力,结果是复杂工作得到了<emphasis>非常</emphasis>小的收益,所以这个<quote>特性</quote>被废弃了。"
23266 #. (screen)
23267 #: ../source/book.xml:21503
23268 #, no-wrap
23269 msgid ""
23270 "\n"
23271 "--revision (-r) REV\n"
23272 "--quiet (-q)\n"
23273 msgstr ""
23274 "\n"
23275 "--revision (-r) REV\n"
23276 "--quiet (-q)\n"
23278 #. (tertiary)
23279 #: ../source/book.xml:21513
23280 msgid "dump"
23281 msgstr "dump"
23283 #. (refname)
23284 #: ../source/book.xml:21516
23285 msgid "svnadmin dump"
23286 msgstr "svnadmin dump"
23288 #. (refpurpose)
23289 #: ../source/book.xml:21517
23290 msgid "Dump the contents of filesystem to stdout."
23291 msgstr "将文件系统的内容转储到标准输出。"
23293 #. (programlisting)
23294 #: ../source/book.xml:21523
23295 #, no-wrap
23296 msgid "svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental]"
23297 msgstr "svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental]"
23299 #. (para)
23300 #: ../source/book.xml:21529
23301 msgid "Dump the contents of filesystem to stdout in a <quote>dumpfile</quote> portable format, sending feedback to stderr. Dump revisions <replaceable>LOWER</replaceable> rev through <replaceable>UPPER</replaceable> rev. If no revisions are given, dump all revision trees. If only <replaceable>LOWER</replaceable> is given, dump that one revision tree. See <xref linkend=\"svn.reposadmin.maint.migrate\"/> for a practical use."
23302 msgstr "使用<quote>dumpfile</quote>可移植格式将文件系统的内容转储到标准输出,将反馈发送到标准错误,导出的修订版本从<replaceable>LOWER</replaceable>到<replaceable>UPPER</replaceable>。如果没有提供修订版本,会导出所有的修订版本树,如果只提供<replaceable>LOWER</replaceable>,导出一个修订版本树,通常的用法见<xref linkend=\"svn.reposadmin.maint.migrate\"/>。"
23304 #. (para)
23305 #: ../source/book.xml:21538
23306 msgid "By default, the Subversion dumpfile stream contains a single revision (the first revision in the requested revision range) in which every file and directory in the repository in that revision is presented as if that whole tree was added at once, followed by other revisions (the remainder of the revisions in the requested range) which contain only the files and directories which were modified in those revisions. For a modified file, the complete fulltext representation of its contents, as well as all of its properties, are presented in the dumpfile; for a directory, all of its properties are presented."
23307 msgstr "缺省情况下,Subversion的转储流包含了一个包括所有文件和目录的单独修订版本(请求的修订版本范围的第一个),后面是其它的只包含本修订所修改的文件和目录的修订版本(请求范围的其它版本)。对于修改的文件,转储文件包括所有的内容和属性,对于目录,包括所有的属性。"
23309 #. (para)
23310 #: ../source/book.xml:21549
23311 #, fuzzy
23312 msgid "There are two useful options which modify the dumpfile generator's behavior. The first is the <option>--incremental</option> option, which simply causes that first revision in the dumpfile stream to contain only the files and directories modified in that revision, instead of being presented as the addition of a new tree, and in exactly the same way that every other revision in the dumpfile is presented. This is useful for generating a relatively small dumpfile to be loaded into another repository which already has the files and directories that exist in the original repository."
23313 msgstr "有一对有用的选项可以改变转储文件产生的方式,第一个是<option>--incremental</option>,使得第一个修订版本只显示其修改的文件和目录,而不是整个目录树,就像转储文件中其它的修订版本。这对产生一个准备导入到已经有数据的版本库时非常有用。"
23315 #. (para)
23316 #: ../source/book.xml:21560
23317 #, fuzzy
23318 msgid "The second useful option is <option>--deltas</option>. This option causes <command>svnadmin dump</command> to, instead of emitting fulltext representations of file contents and property lists, emit only deltas of those items against their previous versions. This reduces (in some cases, drastically) the size of the dumpfile that <command>svnadmin dump</command> creates. There are, however, disadvantages to using this option—deltified dumpfiles are more CPU intensive to create, cannot be operated on by <command>svndumpfilter</command>, and tend not to compress as well as their non-deltified counterparts when using third-party tools like <command>gzip</command> and <command>bzip2</command>."
23319 msgstr "第二个有用的选项是<option>--deltas</option>,这个选项导致<command>svnadmin dump</command>不会保留修改文件的所有内容,而只是记录修改的部分。这样减少(有些情况下是非常大的)了<command>svnadmin dump</command>产生的转储文件的大小。然而,也有缺点—增量转储文件需要更多的CPU来创建,也不可以用<command>svndumpfilter</command>操作,也不如非增量文件容易被如<command>gzip</command>和<command>bzip2</command>等第三方工具压缩。"
23321 #. (screen)
23322 #: ../source/book.xml:21578
23323 #, no-wrap
23324 msgid ""
23325 "\n"
23326 "--revision (-r) REV\n"
23327 "--incremental\n"
23328 "--quiet (-q)\n"
23329 "--deltas\n"
23330 msgstr ""
23331 "\n"
23332 "--revision (-r) REV\n"
23333 "--incremental\n"
23334 "--quiet (-q)\n"
23335 "--deltas\n"
23337 #. (para)
23338 #: ../source/book.xml:21589
23339 msgid "Dump your whole repository:"
23340 msgstr "转储整个版本库:"
23342 #. (screen)
23343 #: ../source/book.xml:21590
23344 #, fuzzy, no-wrap
23345 msgid ""
23346 "\n"
23347 "$ svnadmin dump /var/svn/repos\n"
23348 "SVN-fs-dump-format-version: 1\n"
23349 "Revision-number: 0\n"
23350 "* Dumped revision 0.\n"
23351 "Prop-content-length: 56\n"
23352 "Content-length: 56\n"
23353 "…\n"
23354 msgstr ""
23355 "\n"
23356 "$ svnadmin dump /usr/local/svn/repos\n"
23357 "SVN-fs-dump-format-version: 1\n"
23358 "Revision-number: 0\n"
23359 "* Dumped revision 0.\n"
23360 "Prop-content-length: 56\n"
23361 "Content-length: 56\n"
23362 "…\n"
23364 #. (para)
23365 #: ../source/book.xml:21599
23366 msgid "Incrementally dump a single transaction from your repository:"
23367 msgstr "从版本库增量转储一个单独的事务:"
23369 #. (screen)
23370 #: ../source/book.xml:21601
23371 #, fuzzy, no-wrap
23372 msgid ""
23373 "\n"
23374 "$ svnadmin dump /var/svn/repos -r 21 --incremental \n"
23375 "* Dumped revision 21.\n"
23376 "SVN-fs-dump-format-version: 1\n"
23377 "Revision-number: 21\n"
23378 "Prop-content-length: 101\n"
23379 "Content-length: 101\n"
23380 "…\n"
23381 msgstr ""
23382 "\n"
23383 "$ svnadmin dump /usr/local/svn/repos -r 21 --incremental \n"
23384 "* Dumped revision 21.\n"
23385 "SVN-fs-dump-format-version: 1\n"
23386 "Revision-number: 21\n"
23387 "Prop-content-length: 101\n"
23388 "Content-length: 101\n"
23389 "…\n"
23391 #. (refname)
23392 #: ../source/book.xml:21619
23393 msgid "svnadmin help"
23394 msgstr "svnadmin help"
23396 #. (programlisting)
23397 #: ../source/book.xml:21626
23398 #, no-wrap
23399 msgid "svnadmin help [SUBCOMMAND...]"
23400 msgstr "svnadmin help [SUBCOMMAND...]"
23402 #. (para)
23403 #: ../source/book.xml:21632
23404 msgid "This subcommand is useful when you're trapped on a desert island with neither a net connection nor a copy of this book."
23405 msgstr "当你困于一个没有网络连接和本书的沙漠岛屿时,这个子命令非常有用。"
23407 #. (tertiary)
23408 #: ../source/book.xml:21649
23409 msgid "hotcopy"
23410 msgstr "hotcopy"
23412 #. (refname)
23413 #: ../source/book.xml:21652
23414 msgid "svnadmin hotcopy"
23415 msgstr "svnadmin hotcopy"
23417 #. (refpurpose)
23418 #: ../source/book.xml:21653
23419 msgid "Make a hot copy of a repository."
23420 msgstr "制作一个版本库的热备份。"
23422 #. (programlisting)
23423 #: ../source/book.xml:21659
23424 #, no-wrap
23425 msgid "svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH"
23426 msgstr "svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH"
23428 #. (para)
23429 #: ../source/book.xml:21665
23430 #, fuzzy
23431 msgid "This subcommand makes a full <quote>hot</quote> backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the <option>--clean-logs</option> option, <command>svnadmin</command> will perform a hotcopy of your repository, and then remove unused Berkeley DB logs from the original repository. You can run this command at any time and make a safe copy of the repository, regardless of whether other processes are using the repository."
23432 msgstr "这个子命令会制作一个版本库的完全<quote>热</quote>拷贝,包括所有的钩子,配置文件,当然还有数据库文件。如果你传递<option>--clean-logs</option>选项,<command>svnadmin</command>会执行热拷贝操作,然后删除不用的Berkeley DB日志文件。你可以在任何时候运行这个命令得到一个版本库的安全拷贝,不管其它进程是否使用这个版本库。"
23434 #. (screen)
23435 #: ../source/book.xml:21679
23436 #, no-wrap
23437 msgid ""
23438 "\n"
23439 "--clean-logs\n"
23440 msgstr ""
23441 "\n"
23442 "--clean-logs\n"
23444 #. (para)
23445 #: ../source/book.xml:21683
23446 msgid "As described in <xref linkend=\"svn.reposadmin.basics.backends.bdb\"/>, hot-copied Berkeley DB repositories are <emphasis>not</emphasis> portable across operating systems, nor will they work on machines with a different <quote>endianness</quote> than the machine where they were created."
23447 msgstr "就像<xref linkend=\"svn.reposadmin.basics.backends.bdb\"/>描述的,热拷贝的Berkeley DB版本库<emphasis>不能</emphasis>跨操作系统移植,也不能在不同<quote>字节续</quote>的主机上工作。"
23449 #. (tertiary)
23450 #: ../source/book.xml:21695
23451 msgid "list-dblogs"
23452 msgstr "list-dblogs"
23454 #. (refname)
23455 #: ../source/book.xml:21698
23456 msgid "svnadmin list-dblogs"
23457 msgstr "svnadmin list-dblogs"
23459 #. (literal)
23460 #: ../source/book.xml:21702 ../source/book.xml:21733 ../source/book.xml:21926
23461 msgid "bdb"
23462 msgstr "bdb"
23464 #. (refpurpose)
23465 #: ../source/book.xml:21699
23466 msgid "Ask Berkeley DB which log files exist for a given Subversion repository (applies only to repositories using the <placeholder-1/> backend)."
23467 msgstr "询问Berkeley DB在给定的Subversion版本库有哪些日志文件存在(只有在版本库使用<placeholder-1/>作为后端时使用)。"
23469 #. (programlisting)
23470 #: ../source/book.xml:21708
23471 #, no-wrap
23472 msgid "svnadmin list-dblogs REPOS_PATH"
23473 msgstr "svnadmin list-dblogs REPOS_PATH"
23475 #. (para)
23476 #: ../source/book.xml:21714 ../source/book.xml:21745
23477 #, fuzzy
23478 msgid "Berkeley DB creates logs of all changes to the repository, which allow it to recover in the face of catastrophe. Unless you enable <literal>DB_LOG_AUTOREMOVE</literal>, the log files accumulate, although most are no longer used and can be deleted to reclaim disk space. See <xref linkend=\"svn.reposadmin.maint.diskspace\"/> for more information."
23479 msgstr "Berkeley DB创建了记录所有版本库修改的日志,允许我们在面对大灾难时恢复。除非你开启了<literal>DB_LOG_AUTOREMOVE</literal>,否则日志文件会累积,尽管大多数是不再使用可以从磁盘删除得到空间。详情见<xref linkend=\"svn.reposadmin.maint.diskspace\"/>。"
23481 #. (tertiary)
23482 #: ../source/book.xml:21727
23483 msgid "list-unused-dblogs"
23484 msgstr "list-unused-dblogs"
23486 #. (refname)
23487 #: ../source/book.xml:21730
23488 msgid "svnadmin list-unused-dblogs"
23489 msgstr "svnadmin list-unused-dblogs"
23491 #. (refpurpose)
23492 #: ../source/book.xml:21731
23493 msgid "Ask Berkeley DB which log files can be safely deleted (applies only to repositories using the <placeholder-1/> backend)."
23494 msgstr "询问Berkeley DB哪些日志文件可以安全的删除(只有在版本库使用<placeholder-1/>作为后端时使用)。"
23496 #. (programlisting)
23497 #: ../source/book.xml:21739
23498 #, no-wrap
23499 msgid "svnadmin list-unused-dblogs REPOS_PATH"
23500 msgstr "svnadmin list-unused-dblogs REPOS_PATH"
23502 #. (para)
23503 #: ../source/book.xml:21757
23504 msgid "Remove all unused log files from a repository:"
23505 msgstr "Berkeley DB创建了记录所有版本库修改的日志,允许我们在面对大灾难时恢复。除非你开启了<literal>DB_LOG_AUTOREMOVE</literal>,否则日志文件会累积,尽管大多数是不再使用,可以从磁盘删除得到空间。详情见<xref linkend=\"svn.reposadmin.maint.diskspace\"/>。"
23507 #. (screen)
23508 #: ../source/book.xml:21758
23509 #, fuzzy, no-wrap
23510 msgid ""
23511 "\n"
23512 "$ svnadmin list-unused-dblogs /var/svn/repos\n"
23513 "/var/svn/repos/log.0000000031\n"
23514 "/var/svn/repos/log.0000000032\n"
23515 "/var/svn/repos/log.0000000033\n"
23516 "\n"
23517 "$ svnadmin list-unused-dblogs /var/svn/repos | xargs rm\n"
23518 "## disk space reclaimed!\n"
23519 msgstr ""
23520 "\n"
23521 "$ svnadmin list-unused-dblogs /path/to/repos\n"
23522 "/path/to/repos/log.0000000031\n"
23523 "/path/to/repos/log.0000000032\n"
23524 "/path/to/repos/log.0000000033\n"
23525 "\n"
23526 "$ svnadmin list-unused-dblogs /path/to/repos | xargs rm\n"
23527 "## disk space reclaimed!\n"
23529 #. (tertiary)
23530 #: ../source/book.xml:21773
23531 msgid "load"
23532 msgstr "load"
23534 #. (refname)
23535 #: ../source/book.xml:21776
23536 msgid "svnadmin load"
23537 msgstr "svnadmin load"
23539 #. (quote)
23540 #: ../source/book.xml:21778
23541 msgid "dumpfile"
23542 msgstr "svnadmin load"
23544 #. (refpurpose)
23545 #: ../source/book.xml:21777
23546 msgid "Read a <placeholder-1/>-formatted stream from stdin."
23547 msgstr "从标准输入读进一个<placeholder-1/>格式化的流。"
23549 #. (programlisting)
23550 #: ../source/book.xml:21785
23551 #, no-wrap
23552 msgid "svnadmin load REPOS_PATH"
23553 msgstr "svnadmin load REPOS_PATH"
23555 #. (para)
23556 #: ../source/book.xml:21791
23557 msgid "Read a <quote>dumpfile</quote>-formatted stream from stdin, committing new revisions into the repository's filesystem. Send progress feedback to stdout."
23558 msgstr "从标准输入读取格式化流<quote>dumpfile</quote>,提交新修订版本到版本库的文件系统,在标准输出返回进度。"
23560 #. (screen)
23561 #: ../source/book.xml:21799
23562 #, no-wrap
23563 msgid ""
23564 "\n"
23565 "--quiet (-q)\n"
23566 "--ignore-uuid\n"
23567 "--force-uuid\n"
23568 "--use-pre-commit-hook\n"
23569 "--use-post-commit-hook\n"
23570 "--parent-dir\n"
23571 msgstr ""
23572 "\n"
23573 "--quiet (-q)\n"
23574 "--ignore-uuid\n"
23575 "--force-uuid\n"
23576 "--use-pre-commit-hook\n"
23577 "--use-post-commit-hook\n"
23578 "--parent-dir\n"
23580 #. (title)
23581 #: ../source/book.xml:21810 ../source/book.xml:21862 ../source/book.xml:22024
23582 msgid "Example"
23583 msgstr "例子"
23585 #. (para)
23586 #: ../source/book.xml:21812
23587 #, fuzzy
23588 msgid "This shows the beginning of loading a repository from a backup file (made, of course, with <command>svnadmin dump</command>):"
23589 msgstr "这里显示了加载一个备份文件到版本库(当然,使用<command>svnadmin dump</command>):"
23591 #. (screen)
23592 #: ../source/book.xml:21815
23593 #, fuzzy, no-wrap
23594 msgid ""
23595 "\n"
23596 "$ svnadmin load /var/svn/restored &lt; repos-backup\n"
23597 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
23598 "     * adding path : test ... done.\n"
23599 "     * adding path : test/a ... done.\n"
23600 "…\n"
23601 msgstr ""
23602 "\n"
23603 "$ svnadmin load /usr/local/svn/restored &lt; repos-backup\n"
23604 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
23605 "     * adding path : test ... done.\n"
23606 "     * adding path : test/a ... done.\n"
23607 "…\n"
23609 #. (para)
23610 #: ../source/book.xml:21822
23611 msgid "Or if you want to load into a subdirectory:"
23612 msgstr "或者你希望加载到一个子目录:"
23614 #. (screen)
23615 #: ../source/book.xml:21823
23616 #, fuzzy, no-wrap
23617 msgid ""
23618 "\n"
23619 "$ svnadmin load --parent-dir new/subdir/for/project /var/svn/restored &lt; repos-backup\n"
23620 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
23621 "     * adding path : test ... done.\n"
23622 "     * adding path : test/a ... done.\n"
23623 "…\n"
23624 msgstr ""
23625 "\n"
23626 "$ svnadmin load --parent-dir new/subdir/for/project /usr/local/svn/restored &lt; repos-backup\n"
23627 "&lt;&lt;&lt; Started new txn, based on original revision 1\n"
23628 "     * adding path : test ... done.\n"
23629 "     * adding path : test/a ... done.\n"
23630 "…\n"
23632 #. (tertiary)
23633 #: ../source/book.xml:21836
23634 msgid "lslocks"
23635 msgstr "lslocks"
23637 #. (refname)
23638 #: ../source/book.xml:21839
23639 msgid "svnadmin lslocks"
23640 msgstr "svnadmin lslocks"
23642 #. (refpurpose)
23643 #: ../source/book.xml:21840
23644 msgid "Print descriptions of all locks."
23645 msgstr "打印所有锁定的描述。"
23647 #. (programlisting)
23648 #: ../source/book.xml:21846
23649 #, no-wrap
23650 msgid "svnadmin lslocks REPOS_PATH"
23651 msgstr "svnadmin lslocks REPOS_PATH"
23653 #. (para)
23654 #: ../source/book.xml:21852
23655 msgid "Print descriptions of all locks in a repository."
23656 msgstr "打印版本库所有锁定的描述。"
23658 #. (para)
23659 #: ../source/book.xml:21864
23660 #, fuzzy
23661 msgid "This lists the one locked file in the repository at <filename>/var/svn/repos</filename>:"
23662 msgstr "显示了版本库<filename>/svn/repos</filename>中一个锁定的文件:"
23664 #. (screen)
23665 #: ../source/book.xml:21866
23666 #, fuzzy, no-wrap
23667 msgid ""
23668 "\n"
23669 "$ svnadmin lslocks /var/svn/repos\n"
23670 "Path: /tree.jpg\n"
23671 "UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n"
23672 "Owner: harry\n"
23673 "Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n"
23674 "Expires: \n"
23675 "Comment (1 line):\n"
23676 "Rework the uppermost branches on the bald cypress in the foreground.\n"
23677 msgstr ""
23678 "\n"
23679 "$ svnadmin lslocks /svn/repos\n"
23680 "Path: /tree.jpg\n"
23681 "UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n"
23682 "Owner: harry\n"
23683 "Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n"
23684 "Expires: \n"
23685 "Comment (1 line):\n"
23686 "Rework the uppermost branches on the bald cypress in the foreground.\n"
23688 #. (tertiary)
23689 #: ../source/book.xml:21882
23690 msgid "lstxns"
23691 msgstr "lstxns"
23693 #. (refname)
23694 #: ../source/book.xml:21885
23695 msgid "svnadmin lstxns"
23696 msgstr "svnadmin lstxns"
23698 #. (refpurpose)
23699 #: ../source/book.xml:21886
23700 msgid "Print the names of all uncommitted transactions."
23701 msgstr "打印所有未提交的事物名称。"
23703 #. (programlisting)
23704 #: ../source/book.xml:21892
23705 #, no-wrap
23706 msgid "svnadmin lstxns REPOS_PATH"
23707 msgstr "svnadmin lstxns REPOS_PATH"
23709 #. (para)
23710 #: ../source/book.xml:21898
23711 msgid "Print the names of all uncommitted transactions. See <xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns\"/> for information on how uncommitted transactions are created and what you should do with them."
23712 msgstr "打印所有未提交的事物名称。关于未提交事物是怎样创建和如何使用的信息见<xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns\"/>。"
23714 #. (para)
23715 #: ../source/book.xml:21907
23716 msgid "List all outstanding transactions in a repository."
23717 msgstr "列出版本库所有突出的事物。"
23719 #. (screen)
23720 #: ../source/book.xml:21909
23721 #, fuzzy, no-wrap
23722 msgid ""
23723 "\n"
23724 "$ svnadmin lstxns /var/svn/repos/ \n"
23725 "1w\n"
23726 "1x\n"
23727 msgstr ""
23728 "\n"
23729 "$ svnadmin lstxns /usr/local/svn/repos/ \n"
23730 "1w\n"
23731 "1x\n"
23733 #. (tertiary)
23734 #: ../source/book.xml:21920
23735 msgid "recover"
23736 msgstr "recover"
23738 #. (refname)
23739 #: ../source/book.xml:21923
23740 msgid "svnadmin recover"
23741 msgstr "svnadmin recover"
23743 #. (filename)
23744 #: ../source/book.xml:21927
23745 msgid "repos/conf/passwd"
23746 msgstr "repos/conf/passwd"
23748 #. (refpurpose)
23749 #: ../source/book.xml:21924
23750 msgid "Bring a repository database back into a consistent state (applies only to repositories using the <placeholder-1/> backend). In addition, if <placeholder-2/> does not exist, it will create a default password file ."
23751 msgstr "将版本库数据库恢复到稳定状态(只有在版本库使用<placeholder-1/>作为后端时使用),此外,如果<placeholder-2/>不存在,它会创建一个默认的密码文件。"
23753 #. (programlisting)
23754 #: ../source/book.xml:21934
23755 #, no-wrap
23756 msgid "svnadmin recover REPOS_PATH"
23757 msgstr "svnadmin recover REPOS_PATH"
23759 #. (para)
23760 #: ../source/book.xml:21940
23761 msgid "Run this command if you get an error indicating that your repository needs to be recovered."
23762 msgstr "在你得到的错误说明你需要恢复版本库时运行这个命令。"
23764 #. (screen)
23765 #: ../source/book.xml:21947
23766 #, no-wrap
23767 msgid ""
23768 "\n"
23769 "--wait\n"
23770 msgstr ""
23771 "\n"
23772 "--wait\n"
23774 #. (para)
23775 #: ../source/book.xml:21955
23776 msgid "Recover a hung repository:"
23777 msgstr "恢复挂起的版本库:"
23779 #. (screen)
23780 #: ../source/book.xml:21956
23781 #, fuzzy, no-wrap
23782 msgid ""
23783 "\n"
23784 "$ svnadmin recover /var/svn/repos/ \n"
23785 "Repository lock acquired.\n"
23786 "Please wait; recovering the repository may take some time...\n"
23787 "\n"
23788 "Recovery completed.\n"
23789 "The latest repos revision is 34.\n"
23790 msgstr ""
23791 "\n"
23792 "$ svnadmin recover /usr/local/svn/repos/ \n"
23793 "Repository lock acquired.\n"
23794 "Please wait; recovering the repository may take some time...\n"
23795 "\n"
23796 "Recovery completed.\n"
23797 "The latest repos revision is 34.\n"
23799 #. (para)
23800 #: ../source/book.xml:21964
23801 #, fuzzy
23802 msgid "Recovering the database requires an exclusive lock on the repository. (This is a <quote>database lock</quote>; see <xref linkend=\"svn.advanced.locking.meanings\"/>.) If another process is accessing the repository, then <command>svnadmin recover</command> will error:"
23803 msgstr "恢复数据库需要一个版本库的独占锁(这是一个<quote>数据库锁</quote>;见<xref linkend=\"svn.advanced.locking.meanings\"/>),如果另一个进程访问版本库,<command>svnadmin recover</command>会出错:"
23805 #. (screen)
23806 #: ../source/book.xml:21969
23807 #, fuzzy, no-wrap
23808 msgid ""
23809 "\n"
23810 "$ svnadmin recover /var/svn/repos\n"
23811 "svn: Failed to get exclusive repository access; perhaps another process\n"
23812 "such as httpd, svnserve or svn has it open?\n"
23813 "\n"
23814 "$\n"
23815 msgstr ""
23816 "\n"
23817 "$ svnadmin recover /usr/local/svn/repos\n"
23818 "svn: Failed to get exclusive repository access; perhaps another process\n"
23819 "such as httpd, svnserve or svn has it open?\n"
23820 "\n"
23821 "$\n"
23823 #. (para)
23824 #: ../source/book.xml:21976
23825 #, fuzzy
23826 msgid "The <option>--wait</option> option, however, will cause <command>svnadmin recover</command> to wait indefinitely for other processes to disconnect:"
23827 msgstr "<option>--wait</option>选项可以导致<command>svnadmin recover</command>一直等待其它进程断开连接:"
23829 #. (screen)
23830 #: ../source/book.xml:21979
23831 #, fuzzy, no-wrap
23832 msgid ""
23833 "\n"
23834 "$ svnadmin recover /var/svn/repos --wait\n"
23835 "Waiting on repository lock; perhaps another process has it open?\n"
23836 "\n"
23837 "### time goes by…\n"
23838 "\n"
23839 "Repository lock acquired.\n"
23840 "Please wait; recovering the repository may take some time...\n"
23841 "\n"
23842 "Recovery completed.\n"
23843 "The latest repos revision is 34.\n"
23844 msgstr ""
23845 "\n"
23846 "$ svnadmin recover /usr/local/svn/repos --wait\n"
23847 "Waiting on repository lock; perhaps another process has it open?\n"
23848 "\n"
23849 "### time goes by...\n"
23850 "\n"
23851 "Repository lock acquired.\n"
23852 "Please wait; recovering the repository may take some time...\n"
23853 "\n"
23854 "Recovery completed.\n"
23855 "The latest repos revision is 34.\n"
23857 #. (tertiary)
23858 #: ../source/book.xml:21997
23859 msgid "rmlocks"
23860 msgstr "rmlocks"
23862 #. (refname)
23863 #: ../source/book.xml:22000
23864 msgid "svnadmin rmlocks"
23865 msgstr "svnadmin rmlocks"
23867 #. (refpurpose)
23868 #: ../source/book.xml:22001
23869 msgid "Unconditionally remove one or more locks from a repository."
23870 msgstr "无条件的删除版本库的一个或多个锁定。"
23872 #. (programlisting)
23873 #: ../source/book.xml:22008
23874 #, no-wrap
23875 msgid "svnadmin rmlocks REPOS_PATH LOCKED_PATH..."
23876 msgstr "svnadmin rmlocks REPOS_PATH LOCKED_PATH..."
23878 #. (para)
23879 #: ../source/book.xml:22014
23880 msgid "Remove lock from each <replaceable>LOCKED_PATH</replaceable>."
23881 msgstr "从<replaceable>LOCKED_PATH</replaceable>删除没个锁定。"
23883 #. (para)
23884 #: ../source/book.xml:22026
23885 #, fuzzy
23886 msgid "This deletes the locks on <filename>tree.jpg</filename> and <filename>house.jpg</filename> in the repository at <filename>/var/svn/repos</filename>"
23887 msgstr "这删除了版本库<filename>/svn/repos</filename>里<filename>tree.jpg</filename>和<filename>house.jpg</filename>文件上的锁定:"
23889 #. (screen)
23890 #: ../source/book.xml:22030
23891 #, fuzzy, no-wrap
23892 msgid ""
23893 "\n"
23894 "$ svnadmin rmlocks /var/svn/repos tree.jpg house.jpg\n"
23895 "Removed lock on '/tree.jpg.\n"
23896 "Removed lock on '/house.jpg.\n"
23897 msgstr ""
23898 "\n"
23899 "$ svnadmin rmlocks /svn/repos tree.jpg house.jpg\n"
23900 "Removed lock on '/tree.jpg.\n"
23901 "Removed lock on '/house.jpg.\n"
23903 #. (tertiary)
23904 #: ../source/book.xml:22041
23905 msgid "rmtxns"
23906 msgstr "rmtxns"
23908 #. (refname)
23909 #: ../source/book.xml:22044
23910 msgid "svnadmin rmtxns"
23911 msgstr "svnadmin rmtxns"
23913 #. (refpurpose)
23914 #: ../source/book.xml:22045
23915 msgid "Delete transactions from a repository."
23916 msgstr "从版本库删除事物。"
23918 #. (programlisting)
23919 #: ../source/book.xml:22051
23920 #, no-wrap
23921 msgid "svnadmin rmtxns REPOS_PATH TXN_NAME..."
23922 msgstr "svnadmin rmtxns REPOS_PATH TXN_NAME..."
23924 #. (para)
23925 #: ../source/book.xml:22057
23926 msgid "Delete outstanding transactions from a repository. This is covered in detail in <xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns\"/>."
23927 msgstr "删除版本库的事物,更多细节在<xref linkend=\"svn.reposadmin.maint.diskspace.deadtxns\"/>。"
23929 #. (screen)
23930 #: ../source/book.xml:22064
23931 #, no-wrap
23932 msgid ""
23933 "\n"
23934 "--quiet (-q)\n"
23935 msgstr ""
23936 "\n"
23937 "--quiet (-q)\n"
23939 #. (para)
23940 #: ../source/book.xml:22072
23941 msgid "Remove named transactions:"
23942 msgstr "删除命名的事物:"
23944 #. (screen)
23945 #: ../source/book.xml:22073
23946 #, fuzzy, no-wrap
23947 msgid ""
23948 "\n"
23949 "$ svnadmin rmtxns /var/svn/repos/ 1w 1x\n"
23950 msgstr ""
23951 "\n"
23952 "$ svnadmin rmtxns /usr/local/svn/repos/ 1w 1x\n"
23954 #. (para)
23955 #: ../source/book.xml:22076
23956 #, fuzzy
23957 msgid "Fortunately, the output of <command>lstxns</command> works great as the input for <command>rmtxns</command>:"
23958 msgstr "很幸运,<command>lstxns</command>的输出作为<command>rmtxns</command>输入工作良好:"
23960 #. (screen)
23961 #: ../source/book.xml:22078
23962 #, fuzzy, no-wrap
23963 msgid ""
23964 "\n"
23965 "$ svnadmin rmtxns /var/svn/repos/  `svnadmin lstxns /var/svn/repos/`\n"
23966 msgstr ""
23967 "\n"
23968 "$ svnadmin rmtxns /usr/local/svn/repos/  `svnadmin lstxns /usr/local/svn/repos/`\n"
23970 #. (para)
23971 #: ../source/book.xml:22081
23972 msgid "Which will remove all uncommitted transactions from your repository."
23973 msgstr "从版本库删除所有未提交的事务。"
23975 #. (tertiary)
23976 #: ../source/book.xml:22089
23977 msgid "setlog"
23978 msgstr "setlog"
23980 #. (refname)
23981 #: ../source/book.xml:22092
23982 msgid "svnadmin setlog"
23983 msgstr "svnadmin setlog"
23985 #. (refpurpose)
23986 #: ../source/book.xml:22093
23987 msgid "Set the log-message on a revision."
23988 msgstr "设置某个修订版本的日志信息。"
23990 #. (programlisting)
23991 #: ../source/book.xml:22099
23992 #, no-wrap
23993 msgid "svnadmin setlog REPOS_PATH -r REVISION FILE"
23994 msgstr "svnadmin setlog REPOS_PATH -r REVISION FILE"
23996 #. (para)
23997 #: ../source/book.xml:22105
23998 msgid "Set the log-message on revision REVISION to the contents of FILE."
23999 msgstr "设置修订版本REVISION的日志信息为FILE的内容。"
24001 #. (para)
24002 #: ../source/book.xml:22107
24003 #, fuzzy
24004 msgid "This is similar to using <command>svn propset --revprop</command> to set the <literal>svn:log</literal> property on a revision, except that you can also use the option <option>--bypass-hooks</option> to avoid running any pre- or post-commit hooks, which is useful if the modification of revision properties has not been enabled in the pre-revprop-change hook."
24005 msgstr "这与使用<command>svn propset --revprop</command>设置某一修订版本的<literal>svn:log</literal>属性效果一样,除了你也可以使用<option>--bypass-hooks</option>选项绕过的所有pre-或post-commit的钩子脚本,这在pre-revprop-change钩子脚本中禁止修改修订版本属性时非常有用。"
24007 #. (para)
24008 #: ../source/book.xml:22115
24009 msgid "Revision properties are not under version control, so this command will permanently overwrite the previous log message."
24010 msgstr "修订版本属性不在版本控制之下的,所以这个命令会永久覆盖前一个日志信息。"
24012 #. (screen)
24013 #: ../source/book.xml:22124
24014 #, no-wrap
24015 msgid ""
24016 "\n"
24017 "--revision (-r) REV\n"
24018 "--bypass-hooks\n"
24019 msgstr ""
24020 "\n"
24021 "--revision (-r) REV\n"
24022 "--bypass-hooks\n"
24024 #. (para)
24025 #: ../source/book.xml:22133
24026 #, fuzzy
24027 msgid "Set the log message for revision 19 to the contents of the file <filename>msg</filename>:"
24028 msgstr "设置修订版本19的日志信息为文件<filename>msg</filename>的内容:"
24030 #. (screen)
24031 #: ../source/book.xml:22135
24032 #, fuzzy, no-wrap
24033 msgid ""
24034 "\n"
24035 "$ svnadmin setlog /var/svn/repos/ -r 19 msg\n"
24036 msgstr ""
24037 "\n"
24038 "$ svnadmin setlog /usr/local/svn/repos/ -r 19 msg\n"
24040 #. (tertiary)
24041 #: ../source/book.xml:22146
24042 msgid "verify"
24043 msgstr "verify"
24045 #. (refname)
24046 #: ../source/book.xml:22149
24047 msgid "svnadmin verify"
24048 msgstr "svnadmin verify"
24050 #. (refpurpose)
24051 #: ../source/book.xml:22150
24052 msgid "Verify the data stored in the repository."
24053 msgstr "验证版本库保存的数据。"
24055 #. (programlisting)
24056 #: ../source/book.xml:22156
24057 #, no-wrap
24058 msgid "svnadmin verify REPOS_PATH"
24059 msgstr "svnadmin verify REPOS_PATH"
24061 #. (para)
24062 #: ../source/book.xml:22162
24063 msgid "Run this command if you wish to verify the integrity of your repository. This basically iterates through all revisions in the repository by internally dumping all revisions and discarding the output—it's a good idea to run this on a regular basis to guard against latent hard disk failures and <quote>bitrot</quote>. If this command fails—which it will do at the first sign of a problem—that means that your repository has at least one corrupted revision and you should restore the corrupted revision from a backup (you did make a backup, didn't you?)."
24064 msgstr "如果你希望验证版本库的完整性可以运行这个命令,这样会遍历版本库的所有的修订版本,导出修订版本并丢弃输出—有规律的执行这个命令来防止磁盘失败会是一个好方法,如果这个命令失败了—这是发生问题的第一个征兆—这表明你的版本库至少有一个损坏的修订版本,你必须从备份恢复损坏的修订版本(你需要备份,你没有吗?)。"
24066 #. (para)
24067 #: ../source/book.xml:22178
24068 msgid "Verify a hung repository:"
24069 msgstr "检验挂起的版本库:"
24071 #. (screen)
24072 #: ../source/book.xml:22179
24073 #, fuzzy, no-wrap
24074 msgid ""
24075 "\n"
24076 "$ svnadmin verify /var/svn/repos/ \n"
24077 "* Verified revision 1729.\n"
24078 msgstr ""
24079 "\n"
24080 "$ svnadmin verify /usr/local/svn/repos/ \n"
24081 "* Verified revision 1729.\n"
24083 #. (para)
24084 #: ../source/book.xml:22196
24085 #, fuzzy
24086 msgid "<command>svnlook</command> is a command-line utility for examining different aspects of a Subversion repository. It does not make any changes to the repository—it's just used for <quote>peeking</quote>. <command>svnlook</command> is typically used by the repository hooks, but a repository administrator might find it useful for diagnostic purposes."
24087 msgstr "<command>svnlook</command>是检验Subversion版本库不同方面的命令行工具,它不会对版本库有任何修改—它只是用来<quote>看</quote>。<command>svnlook</command>通常被版本库钩子使用,但是版本库管理也会发现它在诊断目的上也非常有用。"
24089 #. (para)
24090 #: ../source/book.xml:22203
24091 #, fuzzy
24092 msgid "Since <command>svnlook</command> works via direct repository access (and thus can only be used on the machine that holds the repository), it refers to the repository with a path, not a URL."
24093 msgstr "因为<command>svnlook</command>通过直接版本库访问(因此只可以在保存版本库的机器上工作)工作,所以他通过版本库的路径访问,而不是URL。"
24095 #. (para)
24096 #: ../source/book.xml:22206
24097 #, fuzzy
24098 msgid "If no revision or transaction is specified, <command>svnlook</command> defaults to the youngest (most recent) revision of the repository."
24099 msgstr "如果没有指定修订版本或事物,<command>svnlook</command>缺省的是版本库最年轻的(最新的)修订版本。"
24101 #. (title)
24102 #: ../source/book.xml:22212
24103 #, fuzzy
24104 msgid "<command>svnlook</command> Options"
24105 msgstr "<command>svnlook</command> 选项"
24107 #. (para)
24108 #: ../source/book.xml:22214
24109 #, fuzzy
24110 msgid "Options in <command>svnlook</command> are global, just like in <command>svn</command> and <command>svnadmin</command>; however, most options only apply to one subcommand since the functionality of <command>svnlook</command> is (intentionally) limited in scope."
24111 msgstr "<command>svnlook</command>的选项是全局的,就像<command>svn</command>和<command>svnadmin</command>;然而,大多数选项只会应用到一个子命令,因为<command>svnlook</command>的功能是(有意的)限制在一定范围的。"
24113 #. (para)
24114 #: ../source/book.xml:22226
24115 #, fuzzy
24116 msgid "Prevents <command>svnlook diff</command> from printing differences for deleted files. The default behavior when a file is deleted in a transaction/revision is to print the same differences that you would see if you had left the file but removed all the content."
24117 msgstr "防止<command moreinfo=\"none\">svnlook</command>打印删除文件的区别,缺省的行为方式是当一个文件在一次事物/修订版本中删除后,得到的结果与保留这个文件的内容变成空相同。"
24119 #. (option)
24120 #: ../source/book.xml:22235
24121 msgid "--no-diff-added"
24122 msgstr "--no-diff-added"
24124 #. (para)
24125 #: ../source/book.xml:22238
24126 #, fuzzy
24127 msgid "Prevents <command>svnlook diff</command> from printing differences for added files. The default behavior when you add a file is to print the same differences that you would see if you had added the entire contents of an existing (empty) file."
24128 msgstr "防止Subversion打印添加文件的区别。缺省的行为方式是,当添加一个文件时,<command moreinfo=\"none\">svn diff</command>打印的信息和比较一个空白文件相同。"
24130 #. (term)
24131 #: ../source/book.xml:22246
24132 msgid "<option>--revision</option> (<option>-r</option>)"
24133 msgstr "<option>--revision</option> (<option>-r</option>)"
24135 #. (para)
24136 #: ../source/book.xml:22249
24137 msgid "Specify a particular revision number that you wish to examine."
24138 msgstr "指定要进行检查的特定修订版本。"
24140 #. (term)
24141 #: ../source/book.xml:22266
24142 msgid "<option>--transaction</option> (<option>-t</option>)"
24143 msgstr "<option>--transaction</option> (<option>-t</option>)"
24145 #. (para)
24146 #: ../source/book.xml:22269
24147 msgid "Specify a particular transaction ID that you wish to examine."
24148 msgstr "指定一个希望检查的特定事物ID。"
24150 #. (option)
24151 #: ../source/book.xml:22275
24152 msgid "--show-ids"
24153 msgstr "--show-ids"
24155 #. (para)
24156 #: ../source/book.xml:22278
24157 msgid "Show the filesystem node revision IDs for each path in the filesystem tree."
24158 msgstr "显示文件系统树中每条路径的文件系统节点修订版本ID。"
24160 #. (title)
24161 #: ../source/book.xml:22287
24162 #, fuzzy
24163 msgid "<command>svnlook</command> Subcommands"
24164 msgstr "<command>svnlook</command> 子命令"
24166 #. (tertiary)
24167 #: ../source/book.xml:22293
24168 msgid "author"
24169 msgstr "author"
24171 #. (refname)
24172 #: ../source/book.xml:22296
24173 msgid "svnlook author"
24174 msgstr "svnlook author"
24176 #. (refpurpose)
24177 #: ../source/book.xml:22297
24178 msgid "Print the author."
24179 msgstr "打印作者。"
24181 #. (programlisting)
24182 #: ../source/book.xml:22303
24183 #, no-wrap
24184 msgid "svnlook author REPOS_PATH"
24185 msgstr "svnlook author REPOS_PATH"
24187 #. (para)
24188 #: ../source/book.xml:22309
24189 msgid "Print the author of a revision or transaction in the repository."
24190 msgstr "打印版本库一个修订版本或者事物的作者。"
24192 #. (screen)
24193 #: ../source/book.xml:22316 ../source/book.xml:22359 ../source/book.xml:22452
24194 #: ../source/book.xml:22505 ../source/book.xml:22619 ../source/book.xml:22759
24195 #: ../source/book.xml:22855
24196 #, no-wrap
24197 msgid ""
24198 "\n"
24199 "--revision (-r) REV\n"
24200 "--transaction (-t)\n"
24201 msgstr ""
24202 "\n"
24203 "--revision (-r) REV\n"
24204 "--transaction (-t)\n"
24206 #. (para)
24207 #: ../source/book.xml:22325
24208 #, fuzzy
24209 msgid "<command>svnlook author</command> is handy, but not very exciting:"
24210 msgstr "<command>svnlook author</command>垂手可得,但是并不令人激动:"
24212 #. (screen)
24213 #: ../source/book.xml:22327
24214 #, fuzzy, no-wrap
24215 msgid ""
24216 "\n"
24217 "$ svnlook author -r 40 /var/svn/repos \n"
24218 "sally\n"
24219 msgstr ""
24220 "\n"
24221 "$ svnlook author -r 40 /usr/local/svn/repos \n"
24222 "sally\n"
24224 #. (refname)
24225 #: ../source/book.xml:22340
24226 msgid "svnlook cat"
24227 msgstr "svnlook cat"
24229 #. (refpurpose), (para)
24230 #: ../source/book.xml:22341 ../source/book.xml:22353
24231 msgid "Print the contents of a file."
24232 msgstr "打印一个文件的内容。"
24234 #. (programlisting)
24235 #: ../source/book.xml:22347
24236 #, no-wrap
24237 msgid "svnlook cat REPOS_PATH PATH_IN_REPOS"
24238 msgstr "svnlook cat REPOS_PATH PATH_IN_REPOS"
24240 #. (para)
24241 #: ../source/book.xml:22368
24242 #, fuzzy
24243 msgid "This shows the contents of a file in transaction <literal>ax8</literal>, located at <filename>/trunk/README</filename>:"
24244 msgstr "这会显示事物<literal>ax8</literal>中一个文件的内容,位于<filename>/trunk/README</filename>:"
24246 #. (screen)
24247 #: ../source/book.xml:22371
24248 #, fuzzy, no-wrap
24249 msgid ""
24250 "\n"
24251 "$ svnlook cat -t ax8 /var/svn/repos /trunk/README\n"
24252 "\n"
24253 "               Subversion, a version control system.\n"
24254 "               =====================================\n"
24255 "\n"
24256 "$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $\n"
24257 "\n"
24258 "Contents:\n"
24259 "\n"
24260 "     I. A FEW POINTERS\n"
24261 "    II. DOCUMENTATION\n"
24262 "   III. PARTICIPATING IN THE SUBVERSION COMMUNITY\n"
24263 "…\n"
24264 msgstr ""
24265 "\n"
24266 "$ svnlook cat -t ax8 /usr/local/svn/repos /trunk/README\n"
24267 "\n"
24268 "               Subversion, a version control system.\n"
24269 "               =====================================\n"
24270 "\n"
24271 "$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $\n"
24272 "\n"
24273 "Contents:\n"
24274 "\n"
24275 "     I. A FEW POINTERS\n"
24276 "    II. DOCUMENTATION\n"
24277 "   III. PARTICIPATING IN THE SUBVERSION COMMUNITY\n"
24278 "…\n"
24280 #. (tertiary)
24281 #: ../source/book.xml:22392
24282 msgid "changed"
24283 msgstr "changed"
24285 #. (refname)
24286 #: ../source/book.xml:22395
24287 msgid "svnlook changed"
24288 msgstr "svnlook changed"
24290 #. (refpurpose)
24291 #: ../source/book.xml:22396
24292 msgid "Print the paths that were changed."
24293 msgstr "打印修改的路径。"
24295 #. (programlisting)
24296 #: ../source/book.xml:22402
24297 #, no-wrap
24298 msgid "svnlook changed REPOS_PATH"
24299 msgstr "svnlook changed REPOS_PATH"
24301 #. (para)
24302 #: ../source/book.xml:22408
24303 msgid "Print the paths that were changed in a particular revision or transaction, as well as <quote>svn update-style</quote> status letters in the first two columns:"
24304 msgstr "打印在特定修订版本或事物修改的路径,也是在前两列使用<quote>svn update样式的</quote>状态字符:"
24306 #. (term)
24307 #: ../source/book.xml:22414
24308 #, fuzzy
24309 msgid "'<literal>A </literal>'"
24310 msgstr "'<literal>A </literal>'"
24312 #. (para)
24313 #: ../source/book.xml:22416
24314 msgid "Item added to repository."
24315 msgstr "条目添加到版本库。"
24317 #. (term)
24318 #: ../source/book.xml:22420
24319 #, fuzzy
24320 msgid "'<literal>D </literal>'"
24321 msgstr "'<literal>D </literal>'"
24323 #. (para)
24324 #: ../source/book.xml:22422
24325 msgid "Item deleted from repository."
24326 msgstr "条目从版本库删除。"
24328 #. (term)
24329 #: ../source/book.xml:22426
24330 #, fuzzy
24331 msgid "'<literal>U </literal>'"
24332 msgstr "'<literal>U </literal>'"
24334 #. (para)
24335 #: ../source/book.xml:22428
24336 msgid "File contents changed."
24337 msgstr "文件内容改变了。"
24339 #. (term)
24340 #: ../source/book.xml:22432
24341 #, fuzzy
24342 msgid "'<literal> U</literal>'"
24343 msgstr "'<literal>A </literal>'"
24345 #. (para)
24346 #: ../source/book.xml:22434
24347 #, fuzzy
24348 msgid "Properties of item changed. Note the leading space."
24349 msgstr "条目属性改变了。"
24351 #. (term)
24352 #: ../source/book.xml:22438
24353 #, fuzzy
24354 msgid "'<literal>UU</literal>'"
24355 msgstr "'<literal>UU</literal>'"
24357 #. (para)
24358 #: ../source/book.xml:22440
24359 msgid "File contents and properties changed."
24360 msgstr "文件内容和属性修改了。"
24362 #. (para)
24363 #: ../source/book.xml:22444
24364 #, fuzzy
24365 msgid "Files and directories can be distinguished, as directory paths are displayed with a trailing '<literal>/</literal>' character."
24366 msgstr "文件和目录可以区分,目录路径后面会显示字符'<literal>/</literal>'。"
24368 #. (para)
24369 #: ../source/book.xml:22461
24370 msgid "This shows a list of all the changed files and directories in revision 39 of a test repository. Note that the first changed item is a directory, as evidenced by the trailing <literal>/</literal>:"
24371 msgstr "这里显示了在测试版本库中修订版本39改变的文件和目录,注意修改的第一个项目是一个目录,证据就是结尾的<literal>/</literal>:"
24373 #. (screen)
24374 #: ../source/book.xml:22465
24375 #, fuzzy, no-wrap
24376 msgid ""
24377 "\n"
24378 "$ svnlook changed -r 39 /var/svn/repos\n"
24379 "A   trunk/vendors/deli/\n"
24380 "A   trunk/vendors/deli/chips.txt\n"
24381 "A   trunk/vendors/deli/sandwich.txt\n"
24382 "A   trunk/vendors/deli/pickle.txt\n"
24383 "U   trunk/vendors/baker/bagel.txt\n"
24384 " U  trunk/vendors/baker/croissant.txt\n"
24385 "UU  trunk/vendors/baker/pretzel.txt\n"
24386 "D   trunk/vendors/baker/baguette.txt\n"
24387 msgstr ""
24388 "\n"
24389 "$ svnlook changed -r 39 /usr/local/svn/repos\n"
24390 "A   trunk/vendors/deli/\n"
24391 "A   trunk/vendors/deli/chips.txt\n"
24392 "A   trunk/vendors/deli/sandwich.txt\n"
24393 "A   trunk/vendors/deli/pickle.txt\n"
24394 "U   trunk/vendors/baker/bagel.txt\n"
24395 "_U  trunk/vendors/baker/croissant.txt\n"
24396 "UU  trunk/vendors/baker/pretzel.txt\n"
24397 "D   trunk/vendors/baker/baguette.txt\n"
24399 #. (tertiary)
24400 #: ../source/book.xml:22482
24401 msgid "date"
24402 msgstr "date"
24404 #. (refname)
24405 #: ../source/book.xml:22485
24406 msgid "svnlook date"
24407 msgstr "svnlook date"
24409 #. (refpurpose)
24410 #: ../source/book.xml:22486
24411 msgid "Print the datestamp."
24412 msgstr "打印时间戳。"
24414 #. (programlisting)
24415 #: ../source/book.xml:22492
24416 #, no-wrap
24417 msgid "svnlook date REPOS_PATH"
24418 msgstr "svnlook date REPOS_PATH"
24420 #. (para)
24421 #: ../source/book.xml:22498
24422 msgid "Print the datestamp of a revision or transaction in a repository."
24423 msgstr "打印版本库一个修订版本或事物的时间戳。"
24425 #. (para)
24426 #: ../source/book.xml:22514
24427 msgid "This shows the date of revision 40 of a test repository:"
24428 msgstr "显示测试版本库修订版本40的日期:"
24430 #. (screen)
24431 #: ../source/book.xml:22516
24432 #, fuzzy, no-wrap
24433 msgid ""
24434 "\n"
24435 "$ svnlook date -r 40 /var/svn/repos/\n"
24436 "2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n"
24437 msgstr ""
24438 "\n"
24439 "$ svnlook date -r 40 /tmp/repos/\n"
24440 "2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n"
24442 #. (refname)
24443 #: ../source/book.xml:22529
24444 msgid "svnlook diff"
24445 msgstr "svnlook diff"
24447 #. (refpurpose)
24448 #: ../source/book.xml:22530
24449 msgid "Print differences of changed files and properties."
24450 msgstr "打印修改的文件和属性的区别。"
24452 #. (programlisting)
24453 #: ../source/book.xml:22536
24454 #, no-wrap
24455 msgid "svnlook diff REPOS_PATH"
24456 msgstr "svnlook diff REPOS_PATH"
24458 #. (para)
24459 #: ../source/book.xml:22542
24460 msgid "Print GNU-style differences of changed files and properties in a repository."
24461 msgstr "打印版本库中GNU样式的文件和属性修改区别。"
24463 #. (screen)
24464 #: ../source/book.xml:22549
24465 #, no-wrap
24466 msgid ""
24467 "\n"
24468 "--revision (-r) REV\n"
24469 "--transaction (-t)\n"
24470 "--no-diff-added\n"
24471 "--no-diff-deleted\n"
24472 msgstr ""
24473 "\n"
24474 "--revision (-r) REV\n"
24475 "--transaction (-t)\n"
24476 "--no-diff-added\n"
24477 "--no-diff-deleted\n"
24479 #. (para)
24480 #: ../source/book.xml:22560
24481 msgid "This shows a newly added (empty) file, a deleted file, and a copied file:"
24482 msgstr "这显示了一个新添加的(空的)文件,一个删除的文件和一个拷贝的文件:"
24484 #. (screen)
24485 #: ../source/book.xml:22562
24486 #, fuzzy, no-wrap
24487 msgid ""
24488 "\n"
24489 "$ svnlook diff -r 40 /var/svn/repos/\n"
24490 "Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)\n"
24491 "\n"
24492 "Added: trunk/vendors/deli/soda.txt\n"
24493 "==============================================================================\n"
24494 "\n"
24495 "Modified: trunk/vendors/deli/sandwich.txt\n"
24496 "==============================================================================\n"
24497 "--- trunk/vendors/deli/sandwich.txt\t(original)\n"
24498 "+++ trunk/vendors/deli/sandwich.txt\t2003-02-22 17:45:04.000000000 -0600\n"
24499 "@@ -0,0 +1 @@\n"
24500 "+Don't forget the mayo!\n"
24501 "\n"
24502 "Modified: trunk/vendors/deli/logo.jpg\n"
24503 "==============================================================================\n"
24504 "(Binary files differ)\n"
24505 "\n"
24506 "Deleted: trunk/vendors/deli/chips.txt\n"
24507 "==============================================================================\n"
24508 "\n"
24509 "Deleted: trunk/vendors/deli/pickle.txt\n"
24510 "==============================================================================\n"
24511 msgstr ""
24512 "\n"
24513 "$ svnlook diff -r 40 /usr/local/svn/repos/\n"
24514 "Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)\n"
24515 "\n"
24516 "Added: trunk/vendors/deli/soda.txt\n"
24517 "==============================================================================\n"
24518 "\n"
24519 "Modified: trunk/vendors/deli/sandwich.txt\n"
24520 "==============================================================================\n"
24521 "--- trunk/vendors/deli/sandwich.txt\t(original)\n"
24522 "+++ trunk/vendors/deli/sandwich.txt\t2003-02-22 17:45:04.000000000 -0600\n"
24523 "@@ -0,0 +1 @@\n"
24524 "+Don't forget the mayo!\n"
24525 "\n"
24526 "Modified: trunk/vendors/deli/logo.jpg\n"
24527 "==============================================================================\n"
24528 "(Binary files differ)\n"
24529 "\n"
24530 "Deleted: trunk/vendors/deli/chips.txt\n"
24531 "==============================================================================\n"
24532 "\n"
24533 "Deleted: trunk/vendors/deli/pickle.txt\n"
24534 "==============================================================================\n"
24536 #. (para)
24537 #: ../source/book.xml:22586
24538 #, fuzzy
24539 msgid "If a file has a non-textual <literal>svn:mime-type</literal> property, then the differences are not explicitly shown."
24540 msgstr "如果一个文件有非文本的<literal>svn:mime-type</literal>属性,区别不会明确显示。"
24542 #. (tertiary)
24543 #: ../source/book.xml:22595
24544 msgid "dirs-changed"
24545 msgstr "dirs-changed"
24547 #. (refname)
24548 #: ../source/book.xml:22598
24549 msgid "svnlook dirs-changed"
24550 msgstr "svnlook dirs-changed"
24552 #. (refpurpose)
24553 #: ../source/book.xml:22599
24554 msgid "Print the directories that were themselves changed."
24555 msgstr "打印本身修改的目录。"
24557 #. (programlisting)
24558 #: ../source/book.xml:22605
24559 #, no-wrap
24560 msgid "svnlook dirs-changed REPOS_PATH"
24561 msgstr "svnlook dirs-changed REPOS_PATH"
24563 #. (para)
24564 #: ../source/book.xml:22611
24565 msgid "Print the directories that were themselves changed (property edits) or whose file children were changed."
24566 msgstr "打印本身修改(属性编辑)或子文件修改的目录。"
24568 #. (para)
24569 #: ../source/book.xml:22628
24570 msgid "This shows the directories that changed in revision 40 in our sample repository:"
24571 msgstr "这显示了在我们的实例版本库中在修订版本40修改的目录:"
24573 #. (screen)
24574 #: ../source/book.xml:22630
24575 #, fuzzy, no-wrap
24576 msgid ""
24577 "\n"
24578 "$ svnlook dirs-changed -r 40 /var/svn/repos\n"
24579 "trunk/vendors/deli/\n"
24580 msgstr ""
24581 "\n"
24582 "$ svnlook dirs-changed -r 40 /usr/local/svn/repos\n"
24583 "trunk/vendors/deli/\n"
24585 #. (refname)
24586 #: ../source/book.xml:22643
24587 msgid "svnlook help"
24588 msgstr "svnlook help"
24590 #. (programlisting)
24591 #: ../source/book.xml:22650
24592 #, no-wrap
24593 msgid "Also svnlook -h and svnlook -?."
24594 msgstr "Also svnlook -h and svnlook -?."
24596 #. (para)
24597 #: ../source/book.xml:22656
24598 #, fuzzy
24599 msgid "Displays the help message for svnlook. This command, like its brother <command>svn help</command>, is also your friend, even though you never call it anymore and forgot to invite it to your last party."
24600 msgstr "显示svnlook的帮助信息,这个命令如同<command>svn help</command>的兄弟,也是你的朋友,即使你从不调用它,并且忘掉了邀请它加入你的上一次聚会。"
24602 #. (tertiary)
24603 #: ../source/book.xml:22672
24604 msgid "history"
24605 msgstr "history"
24607 #. (refname)
24608 #: ../source/book.xml:22675
24609 msgid "svnlook history"
24610 msgstr "svnlook history"
24612 #. (refpurpose), (para)
24613 #: ../source/book.xml:22676 ../source/book.xml:22690
24614 msgid "Print information about the history of a path in the repository (or the root directory if no path is supplied)."
24615 msgstr "打印版本库(如果没有路径,则是根目录)某一个路径的历史。"
24617 #. (programlisting)
24618 #: ../source/book.xml:22684
24619 #, no-wrap
24620 msgid "svnlook history REPOS_PATH [PATH_IN_REPOS]"
24621 msgstr ""
24622 "svnlook history REPOS_PATH\n"
24623 "            [PATH_IN_REPOS]"
24625 #. (screen)
24626 #: ../source/book.xml:22698
24627 #, no-wrap
24628 msgid ""
24629 "\n"
24630 "--revision (-r) REV\n"
24631 "--show-ids\n"
24632 msgstr ""
24633 "\n"
24634 "--revision (-r) REV\n"
24635 "--show-ids\n"
24637 #. (para)
24638 #: ../source/book.xml:22707
24639 #, fuzzy
24640 msgid "This shows the history output for the path <filename>/tags/1.0</filename> as of revision 20 in our sample repository."
24641 msgstr "这显示了实例版本库中作为修订版本20的路径<filename>/tags/1.0</filename>的历史输出。"
24643 #. (screen)
24644 #: ../source/book.xml:22710
24645 #, fuzzy, no-wrap
24646 msgid ""
24647 "\n"
24648 "$ svnlook history -r 20 /var/svn/repos /tags/1.0 --show-ids\n"
24649 "REVISION   PATH &lt;ID&gt;\n"
24650 "--------   ---------\n"
24651 "      19   /tags/1.0 &lt;1.2.12&gt;\n"
24652 "      17   /branches/1.0-rc2 &lt;1.1.10&gt;\n"
24653 "      16   /branches/1.0-rc2 &lt;1.1.x&gt;\n"
24654 "      14   /trunk &lt;1.0.q&gt;\n"
24655 "      13   /trunk &lt;1.0.o&gt;\n"
24656 "      11   /trunk &lt;1.0.k&gt;\n"
24657 "       9   /trunk &lt;1.0.g&gt;\n"
24658 "       8   /trunk &lt;1.0.e&gt;\n"
24659 "       7   /trunk &lt;1.0.b&gt;\n"
24660 "       6   /trunk &lt;1.0.9&gt;\n"
24661 "       5   /trunk &lt;1.0.7&gt;\n"
24662 "       4   /trunk &lt;1.0.6&gt;\n"
24663 "       2   /trunk &lt;1.0.3&gt;\n"
24664 "       1   /trunk &lt;1.0.2&gt;\n"
24665 msgstr ""
24666 "\n"
24667 "$ svnlook history -r 20 /usr/local/svn/repos /tags/1.0 --show-ids\n"
24668 "REVISION   PATH &lt;ID&gt;\n"
24669 "--------   ---------\n"
24670 "      19   /tags/1.0 &lt;1.2.12&gt;\n"
24671 "      17   /branches/1.0-rc2 &lt;1.1.10&gt;\n"
24672 "      16   /branches/1.0-rc2 &lt;1.1.x&gt;\n"
24673 "      14   /trunk &lt;1.0.q&gt;\n"
24674 "      13   /trunk &lt;1.0.o&gt;\n"
24675 "      11   /trunk &lt;1.0.k&gt;\n"
24676 "       9   /trunk &lt;1.0.g&gt;\n"
24677 "       8   /trunk &lt;1.0.e&gt;\n"
24678 "       7   /trunk &lt;1.0.b&gt;\n"
24679 "       6   /trunk &lt;1.0.9&gt;\n"
24680 "       5   /trunk &lt;1.0.7&gt;\n"
24681 "       4   /trunk &lt;1.0.6&gt;\n"
24682 "       2   /trunk &lt;1.0.3&gt;\n"
24683 "       1   /trunk &lt;1.0.2&gt;\n"
24685 #. (refname)
24686 #: ../source/book.xml:22738
24687 msgid "svnlook info"
24688 msgstr "svnlook info"
24690 #. (refpurpose)
24691 #: ../source/book.xml:22739
24692 msgid "Print the author, datestamp, log message size, and log message."
24693 msgstr "打印作者、时间戳、日志信息大小和日志信息。"
24695 #. (programlisting)
24696 #: ../source/book.xml:22746
24697 #, no-wrap
24698 msgid "svnlook info REPOS_PATH"
24699 msgstr "svnlook info REPOS_PATH"
24701 #. (para)
24702 #: ../source/book.xml:22752
24703 #, fuzzy
24704 msgid "Print the author, datestamp, log message size (in bytes) and log message, followed by a newline character."
24705 msgstr "打印作者、时间戳、日志信息大小和日志信息。"
24707 #. (para)
24708 #: ../source/book.xml:22768
24709 msgid "This shows the info output for revision 40 in our sample repository."
24710 msgstr "显示了你的实例版本库在修订版本40的信息输出。"
24712 #. (screen)
24713 #: ../source/book.xml:22770
24714 #, fuzzy, no-wrap
24715 msgid ""
24716 "\n"
24717 "$ svnlook info -r 40 /var/svn/repos\n"
24718 "sally\n"
24719 "2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n"
24720 "16\n"
24721 "Rearrange lunch.\n"
24722 msgstr ""
24723 "\n"
24724 "$ svnlook info -r 40 /usr/local/svn/repos\n"
24725 "sally\n"
24726 "2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n"
24727 "16\n"
24728 "Rearrange lunch.\n"
24730 #. (refname)
24731 #: ../source/book.xml:22786
24732 msgid "svnlook lock"
24733 msgstr "svnlook lock"
24735 #. (refpurpose)
24736 #: ../source/book.xml:22787
24737 msgid "If a lock exists on a path in the repository, describe it."
24738 msgstr "如果版本库路径已经被锁定,描述它。"
24740 #. (programlisting)
24741 #: ../source/book.xml:22794
24742 #, no-wrap
24743 msgid "svnlook lock REPOS_PATH PATH_IN_REPOS"
24744 msgstr "svnlook lock REPOS_PATH PATH_IN_REPOS"
24746 #. (para)
24747 #: ../source/book.xml:22800
24748 msgid "Print all information available for the lock at <replaceable>PATH_IN_REPOS</replaceable>. If <replaceable>PATH_IN_REPOS</replaceable> is not locked, print nothing."
24749 msgstr "打印<replaceable>PATH_IN_REPOS</replaceable>锁定的所有信息,如果<replaceable>PATH_IN_REPOS</replaceable>没有锁定,则不打印任何内容。"
24751 #. (para)
24752 #: ../source/book.xml:22815
24753 #, fuzzy
24754 msgid "This describes the lock on the file <filename>tree.jpg</filename>."
24755 msgstr "这描述了文件<filename>tree.jpg</filename>的锁定。"
24757 #. (screen)
24758 #: ../source/book.xml:22817
24759 #, fuzzy, no-wrap
24760 msgid ""
24761 "\n"
24762 "$ svnlook lock /var/svn/repos tree.jpg\n"
24763 "UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n"
24764 "Owner: harry\n"
24765 "Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n"
24766 "Expires: \n"
24767 "Comment (1 line):\n"
24768 "Rework the uppermost branches on the bald cypress in the foreground.\n"
24769 msgstr ""
24770 "\n"
24771 "$ svnlook lock /svn/repos tree.jpg\n"
24772 "UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n"
24773 "Owner: harry\n"
24774 "Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n"
24775 "Expires: \n"
24776 "Comment (1 line):\n"
24777 "Rework the uppermost branches on the bald cypress in the foreground.\n"
24779 #. (refname)
24780 #: ../source/book.xml:22835
24781 msgid "svnlook log"
24782 msgstr "svnlook log"
24784 #. (refpurpose)
24785 #: ../source/book.xml:22836
24786 #, fuzzy
24787 msgid "Print the log message, followed by a newline character."
24788 msgstr "日志信息本身, 后接换行。"
24790 #. (programlisting)
24791 #: ../source/book.xml:22843
24792 #, no-wrap
24793 msgid "svnlook log REPOS_PATH"
24794 msgstr "svnlook log REPOS_PATH"
24796 #. (para)
24797 #: ../source/book.xml:22849
24798 msgid "Print the log message."
24799 msgstr "打印日志信息。"
24801 #. (para)
24802 #: ../source/book.xml:22864
24803 msgid "This shows the log output for revision 40 in our sample repository:"
24804 msgstr "这显示了实例版本库在修订版本40的日志输出:"
24806 #. (screen)
24807 #: ../source/book.xml:22866
24808 #, fuzzy, no-wrap
24809 msgid ""
24810 "\n"
24811 "$ svnlook log /var/svn/repos/\n"
24812 "Rearrange lunch.\n"
24813 msgstr ""
24814 "\n"
24815 "$ svnlook log /tmp/repos/\n"
24816 "Rearrange lunch.\n"
24818 #. (refname)
24819 #: ../source/book.xml:22879
24820 msgid "svnlook propget"
24821 msgstr "svnlook propget"
24823 #. (refpurpose)
24824 #: ../source/book.xml:22880
24825 msgid "Print the raw value of a property on a path in the repository."
24826 msgstr "打印版本库中一个路径一个属性的原始值。"
24828 #. (programlisting)
24829 #: ../source/book.xml:22887
24830 #, no-wrap
24831 msgid "svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS]"
24832 msgstr "svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS]"
24834 #. (para)
24835 #: ../source/book.xml:22893
24836 msgid "List the value of a property on a path in the repository."
24837 msgstr "列出版本库中一个路径一个属性的值。"
24839 #. (para)
24840 #: ../source/book.xml:22900
24841 msgid "pg, pget"
24842 msgstr "pg, pget"
24844 #. (screen)
24845 #: ../source/book.xml:22906
24846 #, no-wrap
24847 msgid ""
24848 "\n"
24849 "--revision (-r) REV\n"
24850 "--transaction (-t)\n"
24851 "--revprop\n"
24852 msgstr ""
24853 "\n"
24854 "--revision (-r) REV\n"
24855 "--transaction (-t)\n"
24856 "--revprop\n"
24858 #. (para)
24859 #: ../source/book.xml:22916
24860 #, fuzzy
24861 msgid "This shows the value of the <quote>seasonings</quote> property on the file <filename>/trunk/sandwich</filename> in the <literal>HEAD</literal> revision:"
24862 msgstr "这显示了<literal>HEAD</literal>修订版本中文件<filename>/trunk/sandwich</filename>的<quote>seasonings</quote>属性的值:"
24864 #. (screen)
24865 #: ../source/book.xml:22919
24866 #, fuzzy, no-wrap
24867 msgid ""
24868 "\n"
24869 "$ svnlook pg /var/svn/repos seasonings /trunk/sandwich\n"
24870 "mustard\n"
24871 msgstr ""
24872 "\n"
24873 "$ svnlook pg /usr/local/svn/repos seasonings /trunk/sandwich\n"
24874 "mustard\n"
24876 #. (refname)
24877 #: ../source/book.xml:22932
24878 msgid "svnlook proplist"
24879 msgstr "svnlook proplist"
24881 #. (refpurpose)
24882 #: ../source/book.xml:22933
24883 msgid "Print the names and values of versioned file and directory properties."
24884 msgstr "打印版本化的文件和目录的属性名称和值。"
24886 #. (programlisting)
24887 #: ../source/book.xml:22940
24888 #, no-wrap
24889 msgid "svnlook proplist REPOS_PATH [PATH_IN_REPOS]"
24890 msgstr "svnlook proplist REPOS_PATH [PATH_IN_REPOS]"
24892 #. (para)
24893 #: ../source/book.xml:22946
24894 msgid "List the properties of a path in the repository. With <option>--verbose</option>, show the property values too."
24895 msgstr "列出版本库中一个路径的属性,使用<option>--verbose</option>选项也会显示所有的属性值。"
24897 #. (para)
24898 #: ../source/book.xml:22953
24899 msgid "pl, plist"
24900 msgstr "pl, plist"
24902 #. (screen)
24903 #: ../source/book.xml:22959
24904 #, no-wrap
24905 msgid ""
24906 "\n"
24907 "--revision (-r) REV\n"
24908 "--transaction (-t)\n"
24909 "--verbose (-v)\n"
24910 "--revprop\n"
24911 msgstr ""
24912 "\n"
24913 "--revision (-r) REV\n"
24914 "--transaction (-t)\n"
24915 "--verbose (-v)\n"
24916 "--revprop\n"
24918 #. (para)
24919 #: ../source/book.xml:22970
24920 #, fuzzy
24921 msgid "This shows the names of properties set on the file <filename>/trunk/README</filename> in the <literal>HEAD</literal> revision:"
24922 msgstr "这显示了<literal>HEAD</literal>修订版本中<filename>/trunk/README</filename>的属性名称:"
24924 #. (screen)
24925 #: ../source/book.xml:22973
24926 #, fuzzy, no-wrap
24927 msgid ""
24928 "\n"
24929 "$ svnlook proplist /var/svn/repos /trunk/README\n"
24930 "  original-author\n"
24931 "  svn:mime-type\n"
24932 msgstr ""
24933 "\n"
24934 "$ svnlook proplist /usr/local/svn/repos /trunk/README\n"
24935 "  original-author\n"
24936 "  svn:mime-type\n"
24938 #. (para)
24939 #: ../source/book.xml:22978
24940 msgid "This is the same command as in the previous example, but this time showing the property values as well:"
24941 msgstr "这与前一个例子是同一个命令,但是同时显示了属性值:"
24943 #. (screen)
24944 #: ../source/book.xml:22980
24945 #, fuzzy, no-wrap
24946 msgid ""
24947 "\n"
24948 "$ svnlook --verbose proplist /var/svn/repos /trunk/README\n"
24949 "  original-author : fitz\n"
24950 "  svn:mime-type : text/plain\n"
24951 msgstr ""
24952 "\n"
24953 "$ svnlook --verbose proplist /usr/local/svn/repos /trunk/README\n"
24954 "  original-author : fitz\n"
24955 "  svn:mime-type : text/plain\n"
24957 #. (tertiary)
24958 #: ../source/book.xml:22991
24959 msgid "tree"
24960 msgstr "tree"
24962 #. (refname)
24963 #: ../source/book.xml:22994
24964 msgid "svnlook tree"
24965 msgstr "svnlook tree"
24967 #. (refpurpose)
24968 #: ../source/book.xml:22995
24969 msgid "Print the tree."
24970 msgstr "打印树。"
24972 #. (programlisting)
24973 #: ../source/book.xml:23001
24974 #, no-wrap
24975 msgid "svnlook tree REPOS_PATH [PATH_IN_REPOS]"
24976 msgstr "svnlook tree REPOS_PATH [PATH_IN_REPOS]"
24978 #. (para)
24979 #: ../source/book.xml:23007
24980 msgid "Print the tree, starting at <replaceable>PATH_IN_REPOS</replaceable> (if supplied, at the root of the tree otherwise), optionally showing node revision IDs."
24981 msgstr "打印树,从<replaceable>PATH_IN_REPOS</replaceable>(如果提供,会作为树的根)开始,可以选择显示节点修订版本ID。"
24983 #. (screen)
24984 #: ../source/book.xml:23016
24985 #, no-wrap
24986 msgid ""
24987 "\n"
24988 "--revision (-r) REV\n"
24989 "--transaction (-t)\n"
24990 "--show-ids\n"
24991 msgstr ""
24992 "\n"
24993 "--revision (-r) REV\n"
24994 "--transaction (-t)\n"
24995 "--show-ids\n"
24997 #. (para)
24998 #: ../source/book.xml:23026
24999 msgid "This shows the tree output (with node-IDs) for revision 40 in our sample repository:"
25000 msgstr "这会显示实例版本库中修订版本40的树输出(包括节点ID):"
25002 #. (screen)
25003 #: ../source/book.xml:23028
25004 #, fuzzy, no-wrap
25005 msgid ""
25006 "\n"
25007 "$ svnlook tree -r 40 /var/svn/repos --show-ids\n"
25008 "/ &lt;0.0.2j&gt;\n"
25009 " trunk/ &lt;p.0.2j&gt;\n"
25010 "  vendors/ &lt;q.0.2j&gt;\n"
25011 "   deli/ &lt;1g.0.2j&gt;\n"
25012 "    egg.txt &lt;1i.e.2j&gt;\n"
25013 "    soda.txt &lt;1k.0.2j&gt;\n"
25014 "    sandwich.txt &lt;1j.0.2j&gt;\n"
25015 msgstr ""
25016 "\n"
25017 "$ svnlook tree -r 40 /usr/local/svn/repos --show-ids\n"
25018 "/ &lt;0.0.2j&gt;\n"
25019 " trunk/ &lt;p.0.2j&gt;\n"
25020 "  vendors/ &lt;q.0.2j&gt;\n"
25021 "   deli/ &lt;1g.0.2j&gt;\n"
25022 "    egg.txt &lt;1i.e.2j&gt;\n"
25023 "    soda.txt &lt;1k.0.2j&gt;\n"
25024 "    sandwich.txt &lt;1j.0.2j&gt;\n"
25026 #. (tertiary)
25027 #: ../source/book.xml:23044
25028 msgid "uuid"
25029 msgstr "uuid"
25031 #. (refname)
25032 #: ../source/book.xml:23047
25033 msgid "svnlook uuid"
25034 msgstr "svnlook uuid"
25036 #. (literal)
25037 #: ../source/book.xml:23049
25038 msgid "UUID"
25039 msgstr "UUID"
25041 #. (refpurpose)
25042 #: ../source/book.xml:23048
25043 msgid "Print the repository's <placeholder-1/>."
25044 msgstr "打印版本库的<placeholder-1/>。"
25046 #. (programlisting)
25047 #: ../source/book.xml:23055
25048 #, no-wrap
25049 msgid "svnlook uuid REPOS_PATH"
25050 msgstr "svnlook uuid REPOS_PATH"
25052 #. (para)
25053 #: ../source/book.xml:23061
25054 #, fuzzy
25055 msgid "Print the <literal>UUID</literal> for the repository. the UUID is the repository's <emphasis>u</emphasis>niversal <emphasis>u</emphasis>nique <emphasis>id</emphasis>entifier. The Subversion client uses this identifier to differentiate between one repository and another."
25056 msgstr "打印版本库的<literal>UUID</literal>,UUID是版本库的<emphasis>u</emphasis>niversal <emphasis>u</emphasis>nique <emphasis>ID</emphasis>entifier(全局唯一标示),Subversion客户端可以使用这个标示区分不同的版本库。"
25058 #. (screen)
25059 #: ../source/book.xml:23072
25060 #, fuzzy, no-wrap
25061 msgid ""
25062 "\n"
25063 "$ svnlook uuid /var/svn/repos\n"
25064 "e7fe1b91-8cd5-0310-98dd-2f12e793c5e8\n"
25065 msgstr ""
25066 "\n"
25067 "$ svnlook uuid /usr/local/svn/repos\n"
25068 "e7fe1b91-8cd5-0310-98dd-2f12e793c5e8\n"
25070 #. (tertiary)
25071 #: ../source/book.xml:23082
25072 msgid "youngest"
25073 msgstr "youngest"
25075 #. (refname)
25076 #: ../source/book.xml:23085
25077 msgid "svnlook youngest"
25078 msgstr "svnlook youngest"
25080 #. (refpurpose)
25081 #: ../source/book.xml:23086
25082 msgid "Print the youngest revision number."
25083 msgstr "显示最年轻的修订版本号。"
25085 #. (programlisting)
25086 #: ../source/book.xml:23092
25087 #, no-wrap
25088 msgid "svnlook youngest REPOS_PATH"
25089 msgstr "svnlook youngest REPOS_PATH"
25091 #. (para)
25092 #: ../source/book.xml:23098
25093 msgid "Print the youngest revision number of a repository."
25094 msgstr "打印一个版本库最年轻的修订版本号。"
25096 #. (para)
25097 #: ../source/book.xml:23104
25098 msgid "This shows the youngest revision of our sample repository:"
25099 msgstr "这显示了在实例版本库显示最年轻的修订版本:"
25101 #. (screen)
25102 #: ../source/book.xml:23106
25103 #, fuzzy, no-wrap
25104 msgid ""
25105 "\n"
25106 "$ svnlook youngest /var/svn/repos/ \n"
25107 "42\n"
25108 msgstr ""
25109 "\n"
25110 "$ svnlook youngest /tmp/repos/ \n"
25111 "42\n"
25113 #. (para)
25114 #: ../source/book.xml:23123
25115 #, fuzzy
25116 msgid "<command>svnsync</command> is the Subversion remote repository mirroring tool. Put simply, it allows you to replay the revisions of one repository into another one."
25117 msgstr "运行<command>svn commit</command>将更改提交到版本库中。"
25119 #. (para)
25120 #: ../source/book.xml:23126
25121 msgid "In any mirroring scenario, there are two repositories: the source repository, and the mirror (or <quote>sink</quote>) repository. The source repository is the repository from which <command>svnsync</command> pulls revisions. The mirror repository is the destination for the revisions pulled from the source repository. Each of the repositories may be local or remote—they are only ever addressed by their URLs."
25122 msgstr "在任何镜像场景中,有两个版本库:源版本库,镜像(或<quote>sink</quote>)版本库,源版本库就是<command>svnsync</command>获取修订版本的库,镜像版本库是源版本库修订版本的目标,两个版本库可以是在本地或远程—它们只是通过URL跟踪。"
25124 #. (para)
25125 #: ../source/book.xml:23133
25126 msgid "The <command>svnsync</command> process requires only read access to the source repository; it never attempts to modify it. But obviously, <command>svnsync</command> requires both read and write access to the mirror repository."
25127 msgstr "<command>svnsync</command>进程只需要对源版本库有读权限;它不会尝试修改它。但是很明显,<command>svnsync</command>可以读写访问镜像版本库。"
25129 #. (para)
25130 #: ../source/book.xml:23138
25131 msgid "<command>svnsync</command> is very sensitive to changes made in the mirror repository that weren't made as part of a mirroring operation. To prevent this from happening, it's best if the <command>svnsync</command> process is the only process permitted to modify the mirror repository."
25132 msgstr "<command>svnsync</command>对于不能作为镜像操作一部分的修改非常敏感,为了防止发生这个情况,最好保证<command>svnsync</command>是唯一可以修改镜像版本库的进程。"
25134 #. (title)
25135 #: ../source/book.xml:23147
25136 #, fuzzy
25137 msgid "<command>svnsync</command> Options"
25138 msgstr "<command>svn</command> 选项"
25140 #. (title)
25141 #: ../source/book.xml:23214
25142 #, fuzzy
25143 msgid "<command>svnsync</command> Subcommands"
25144 msgstr "<command>svn</command> 子命令"
25146 #. (tertiary)
25147 #: ../source/book.xml:23221
25148 #, fuzzy
25149 msgid "copy-revprops"
25150 msgstr "--revprop"
25152 #. (refname)
25153 #: ../source/book.xml:23224
25154 msgid "svnsync copy-revprops"
25155 msgstr "svnsync copy-revprops"
25157 #. (refpurpose)
25158 #: ../source/book.xml:23225
25159 msgid "Copy all revision properties for a given revision from the source repository to the mirror repository."
25160 msgstr "从源版本库拷贝所有的修订版本属性到镜像版本库。"
25162 #. (programlisting)
25163 #: ../source/book.xml:23233
25164 #, no-wrap
25165 msgid "svnsync copy-revprops DEST_URL REV"
25166 msgstr "svnsync copy-revprops DEST_URL REV"
25168 #. (para)
25169 #: ../source/book.xml:23239
25170 msgid "Because Subversion revision properties can be changed at any time, it's possible that the properties for some revision might be changed after that revision has already been synchronized to another repository. Because the <command>svnsync synchronize</command> command operates only on the range of revisions that have not yet been synchronized, it won't notice a revision property change outside that range. Left as is, this causes a deviation in the values of that revision's properties between the source and mirror repositories. <command>svnsync copy-revprops</command> is the answer to this problem. Use it to re-synchronize the revision properties for a particular revision."
25171 msgstr "因为Subversion修订版本属性可以在任何时候修改,很有可能有一些修订版本的属性会在已经同步后改变,因为<command>svnsync synchronize</command>不会对没有同步的修订版本范围进行操作,而不会注意修改范围之外的属性修改。这样导致了修订版本属性在源版本库与目标版本库的偏离,<command>svnsync copy-revprops</command>是这个问题的答案,用它可以同步特定修订版本的属性。"
25173 #. (screen)
25174 #: ../source/book.xml:23263 ../source/book.xml:23324 ../source/book.xml:23394
25175 #, no-wrap
25176 msgid ""
25177 "\n"
25178 "--non-interactive\n"
25179 "--no-auth-cache\n"
25180 "--username NAME\n"
25181 "--password PASS\n"
25182 "--config-dir DIR\n"
25183 msgstr ""
25184 "\n"
25185 "--non-interactive\n"
25186 "--no-auth-cache\n"
25187 "--username NAME\n"
25188 "--password PASS\n"
25189 "--config-dir DIR\n"
25191 #. (para)
25192 #: ../source/book.xml:23275
25193 msgid "Re-synchronize revision properties for a single revision:"
25194 msgstr "为单个修订版本重新同步修订版本属性:"
25196 #. (screen)
25197 #: ../source/book.xml:23276
25198 #, fuzzy, no-wrap
25199 msgid ""
25200 "\n"
25201 "$ svnsync copy-revprops file:///var/svn/repos-mirror 6\n"
25202 "Copied properties for revision 6.\n"
25203 "$\n"
25204 msgstr ""
25205 "\n"
25206 "$ svnsync copy-revprops file:///opt/svn/repos-mirror 6\n"
25207 "Copied properties for revision 6.\n"
25208 "$\n"
25210 #. (tertiary)
25211 #: ../source/book.xml:23287
25212 #, fuzzy
25213 msgid "initialize"
25214 msgstr "初始设置"
25216 #. (refname)
25217 #: ../source/book.xml:23290
25218 msgid "svnsync initialize"
25219 msgstr "svnsync initialize"
25221 #. (refpurpose)
25222 #: ../source/book.xml:23291
25223 msgid "Initialize a destination repository for synchronization from another repository."
25224 msgstr "为与另一个版本库的同步初而始化目标版本库。"
25226 #. (programlisting)
25227 #: ../source/book.xml:23298
25228 #, no-wrap
25229 msgid "svnsync initialize DEST_URL SOURCE_URL"
25230 msgstr "svnsync initialize DEST_URL SOURCE_URL"
25232 #. (para)
25233 #: ../source/book.xml:23304
25234 msgid "<command>svnsync initialize</command> verifies that a repository meets the requirements of a new mirror repository—that it has no previous existing version history, and that it allows revision property modifications—and records the initial administrative information which associates the mirror repository with the source repository. This is the first <command>svnsync</command> operation you run on a would-be mirror repository."
25235 msgstr "<command>svnsync initialize</command>检验版本库是否满足了新镜像版本库的需求—它必须没有存在的版本历史,并允许修订版本修改—记录镜像版本库与源版本库关联的初始管理信息,这是对即将镜像的版本库的第一个<command>svnsync</command>操作。"
25237 #. (para)
25238 #: ../source/book.xml:23318
25239 msgid "init"
25240 msgstr "init"
25242 #. (para)
25243 #: ../source/book.xml:23336
25244 msgid "Fail to initialize a mirror repository due to inability to modify revision properties:"
25245 msgstr "因为无法修改修订版本属性而初始化镜像版本库失败:"
25247 #. (screen)
25248 #: ../source/book.xml:23338
25249 #, fuzzy, no-wrap
25250 msgid ""
25251 "\n"
25252 "$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\n"
25253 "svnsync: Repository has not been enabled to accept revision propchanges;\n"
25254 "ask the administrator to create a pre-revprop-change hook\n"
25255 "$\n"
25256 msgstr ""
25257 "\n"
25258 "$ svnsync initialize file:///opt/svn/repos-mirror http://svn.example.com/repos\n"
25259 "svnsync: Repository has not been enabled to accept revision propchanges;\n"
25260 "ask the administrator to create a pre-revprop-change hook\n"
25261 "$\n"
25263 #. (para)
25264 #: ../source/book.xml:23344
25265 msgid "Initialize a repository as a mirror, having already created a pre-revprop-change hook which permits all revision property changes:"
25266 msgstr "以镜像初始化版本库,包含已创建允许所有修订版本属性修改的pre-revprop-change钩子:"
25268 #. (screen)
25269 #: ../source/book.xml:23347
25270 #, fuzzy, no-wrap
25271 msgid ""
25272 "\n"
25273 "$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\n"
25274 "Copied properties for revision 0.\n"
25275 "$\n"
25276 msgstr ""
25277 "\n"
25278 "$ svnsync initialize file:///opt/svn/repos-mirror http://svn.example.com/repos\n"
25279 "Copied properties for revision 0.\n"
25280 "$\n"
25282 #. (tertiary)
25283 #: ../source/book.xml:23358
25284 msgid "synchronize"
25285 msgstr "synchronize"
25287 #. (refname)
25288 #: ../source/book.xml:23361
25289 msgid "svnsync synchronize"
25290 msgstr "svnsync synchronize"
25292 #. (refpurpose)
25293 #: ../source/book.xml:23362
25294 msgid "Transfer all pending revisions from the source repository to the mirror repository."
25295 msgstr "将所有未完成的修订版本从源版本库转移到镜像版本库。"
25297 #. (programlisting)
25298 #: ../source/book.xml:23369
25299 #, no-wrap
25300 msgid "svnsync synchronize DEST_URL"
25301 msgstr "svnsync synchronize DEST_URL"
25303 #. (para)
25304 #: ../source/book.xml:23375
25305 msgid "The <command>svnsync synchronize</command> command does all the heavy lifting of a repository mirroring operation. After consulting with the mirror repository to see which revisions have already been copied into it, it then begins copying any not-yet-mirrored revisions from the source repository."
25306 msgstr "<command>svnsync synchronize</command>命令做了版本库镜像工作的所有体力活,通过讯问镜像版本库来查看已经拷贝的修订版本,然后开始拷贝未镜像修订版本到镜像版本库。"
25308 #. (para)
25309 #: ../source/book.xml:23381
25310 #, fuzzy
25311 msgid "<command>svnsync synchronize</command> can be gracefully cancelled and restarted."
25312 msgstr "<command>svn</command> 子命令"
25314 #. (para)
25315 #: ../source/book.xml:23388
25316 #, fuzzy
25317 msgid "sync"
25318 msgstr "svnsync"
25320 #. (para)
25321 #: ../source/book.xml:23406
25322 msgid "Copy unsynchronized revisions from the source repository to the mirror repository:"
25323 msgstr "从源版本库拷贝未同步修订版本到镜像版本库:"
25325 #. (screen)
25326 #: ../source/book.xml:23408
25327 #, fuzzy, no-wrap
25328 msgid ""
25329 "\n"
25330 "$ svnsync synchronize file:///var/svn/repos-mirror\n"
25331 "Committed revision 1.\n"
25332 "Copied properties for revision 1.\n"
25333 "Committed revision 2.\n"
25334 "Copied properties for revision 2.\n"
25335 "Committed revision 3.\n"
25336 "Copied properties for revision 3.\n"
25337 "…\n"
25338 "Committed revision 45.\n"
25339 "Copied properties for revision 45.\n"
25340 "Committed revision 46.\n"
25341 "Copied properties for revision 46.\n"
25342 "Committed revision 47.\n"
25343 "Copied properties for revision 47.\n"
25344 "$\n"
25345 msgstr ""
25346 "\n"
25347 "$ svnsync help synchronize\n"
25348 "synchronize (sync): usage: svnsync synchronize DEST_URL\n"
25349 "\n"
25350 "Transfer all pending revisions from source to destination.\n"
25351 "…\n"
25352 "$ svnsync synchronize http://svn.example.com/svn-mirror \\\n"
25353 "                      --username syncuser --password syncpass\n"
25354 "Committed revision 1.\n"
25355 "Copied properties for revision 1.\n"
25356 "Committed revision 2.\n"
25357 "Copied properties for revision 2.\n"
25358 "Committed revision 3.\n"
25359 "Copied properties for revision 3.\n"
25360 "…\n"
25361 "Committed revision 23406.\n"
25362 "Copied properties for revision 23406.\n"
25363 "Committed revision 23407.\n"
25364 "Copied properties for revision 23407.\n"
25365 "Committed revision 23408.\n"
25366 "Copied properties for revision 23408.\n"
25368 #. (para)
25369 #: ../source/book.xml:23438
25370 #, fuzzy
25371 msgid "<command>svnserve</command> allows access to Subversion repositories using Subversion's custom network protocol."
25372 msgstr "当对远程源版本库使用<command>svnsync</command>时,Subversion版本库的服务器必须是Subversion1.4或更高的版本。"
25374 #. (para)
25375 #: ../source/book.xml:23440
25376 #, fuzzy
25377 msgid "You can run <command>svnserve</command> as a standalone server process (for clients that are using the <literal>svn://</literal> access method); you can have a daemon such as <command>inetd</command> or <command>xinetd</command> launch it for you on demand (also for <literal>svn://</literal>), or you can have <command>sshd</command> launch it on demand for the <literal>svn+ssh://</literal> access method."
25378 msgstr "<command>svnserve</command>允许Subversion版本库使用<literal>svn</literal>网络协议,你可以作为独立服务器进程运行svnserve,或者是使用其它进程,如<command>inetd</command>、<command>xinetd</command>或<command>sshd</command>为你启动进程。"
25380 #. (para)
25381 #: ../source/book.xml:23448
25382 #, fuzzy
25383 msgid "Regardless of the access method, once the client has selected a repository by transmitting its URL, <command>svnserve</command> reads a file named <filename>conf/svnserve.conf</filename> in the repository directory to determine repository-specific settings such as what authentication database to use and what authorization policies to apply. See <xref linkend=\"svn.serverconfig.svnserve\"/> for details of the <filename>svnserve.conf</filename> file."
25384 msgstr "一旦客户端已经选择了一个版本库来传递它的URL,<command>svnserve</command>会读取版本库目录的<filename>conf/svnserve.conf</filename>文件,来检测版本库特定的设置,如使用哪个认证数据库和应用怎样的授权策略。关于<filename>svnserve.conf</filename>文件的详情见<xref linkend=\"svn.serverconfig.svnserve\"/>。"
25386 #. (title)
25387 #: ../source/book.xml:23459
25388 #, fuzzy
25389 msgid "<command>svnserve</command> Options"
25390 msgstr "<command>svnserve</command> 选项"
25392 #. (para)
25393 #: ../source/book.xml:23461
25394 #, fuzzy
25395 msgid "Unlike the previous commands we've described, <command>svnserve</command> has no subcommands—<command>svnserve</command> is controlled exclusively by options."
25396 msgstr "不象前面描述的例子,<command>svnserve</command>没有子命令—<command>svnserve</command>完全通过选项控制。"
25398 #. (term)
25399 #: ../source/book.xml:23467
25400 msgid "<option>--daemon</option> (<option>-d</option>)"
25401 msgstr "<option>--daemon</option> (<option>-d</option>)"
25403 #. (para)
25404 #: ../source/book.xml:23469
25405 #, fuzzy
25406 msgid "Causes <command>svnserve</command> to run in daemon mode. <command>svnserve</command> backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default)."
25407 msgstr "导致<command>svnserve</command>以守护进程方式运行,<command>svnserve</command>维护本身并且接受和服务svn端口(缺省3690)的TCP/IP连接。"
25409 #. (term)
25410 #: ../source/book.xml:23476
25411 msgid "<option>--listen-port</option>=<replaceable>PORT</replaceable>"
25412 msgstr "<option>--listen-port</option>=<replaceable>PORT</replaceable>"
25414 #. (para)
25415 #: ../source/book.xml:23478
25416 #, fuzzy
25417 msgid "Causes svnserve to listen on <replaceable>PORT</replaceable> when run in daemon mode. (FreeBSD daemons only listen on tcp6 by default—this option tells them to also listen on tcp4.)"
25418 msgstr "在守护进程模式时导致svnserve监听<replaceable>PORT</replaceable>端口。"
25420 #. (term)
25421 #: ../source/book.xml:23485
25422 msgid "<option>--listen-host</option>=<replaceable>HOST</replaceable>"
25423 msgstr "<option>--listen-host</option>=<replaceable>HOST</replaceable>"
25425 #. (para)
25426 #: ../source/book.xml:23487
25427 #, fuzzy
25428 msgid "Causes <command>svnserve</command> to listen on the interface specified by <replaceable>HOST</replaceable>, which may be either a hostname or an IP address."
25429 msgstr "<command>svnserve</command>监听的<replaceable>HOST</replaceable>,可能是一个主机名或是一个IP地址。"
25431 #. (option)
25432 #: ../source/book.xml:23494
25433 msgid "--foreground"
25434 msgstr "--foreground"
25436 #. (para)
25437 #: ../source/book.xml:23497
25438 #, fuzzy
25439 msgid "When used together with <option>-d</option>, this option causes <command>svnserve</command> to stay in the foreground. This option is mainly useful for debugging."
25440 msgstr "当与<option>-d</option>一起使用,会导致<command>svnserve</command>停留在前台,主要用来调试。"
25442 #. (term)
25443 #: ../source/book.xml:23504
25444 msgid "<option>--inetd</option> (<option>-i</option>)"
25445 msgstr "<option>--inetd</option> (<option>-i</option>)"
25447 #. (para)
25448 #: ../source/book.xml:23506
25449 #, fuzzy
25450 msgid "Causes <command>svnserve</command> to use the stdin/stdout file descriptors, as is appropriate for a daemon running out of <command>inetd</command>."
25451 msgstr "导致<command>svnserve</command>使用标准输出/标准输入文件描述符,更准确的是使用<command>inetd</command>作为守护进程。"
25453 #. (term)
25454 #: ../source/book.xml:23512 ../source/book.xml:23659
25455 msgid "<option>--help</option> (<option>-h</option>)"
25456 msgstr "<option>--help</option> (<option>-h</option>)"
25458 #. (para)
25459 #: ../source/book.xml:23514
25460 msgid "Displays a usage summary and exits."
25461 msgstr "显示有用的摘要和选项。"
25463 #. (para)
25464 #: ../source/book.xml:23522
25465 msgid "Displays version information, a list of repository back-end modules available, and exits."
25466 msgstr "显示版本信息,版本库后端存在和可用的模块列表。"
25468 #. (term)
25469 #: ../source/book.xml:23527
25470 msgid "<option>--root</option>=<replaceable>ROOT</replaceable> (<option>-r</option>=<replaceable>ROOT</replaceable>)"
25471 msgstr "<option>--root</option>=<replaceable>ROOT</replaceable> (<option>-r</option>=<replaceable>ROOT</replaceable>)"
25473 #. (para)
25474 #: ../source/book.xml:23530
25475 #, fuzzy
25476 msgid "Sets the virtual root for repositories served by <command>svnserve</command>. The pathname in URLs provided by the client will be interpreted relative to this root, and will not be allowed to escape this root."
25477 msgstr "设置<command>svnserve</command>服务的版本库的虚拟根,客户端提供的URL中显示的路径会解释为这个根的相对路径,不会允许离开这个根。"
25479 #. (term)
25480 #: ../source/book.xml:23538
25481 msgid "<option>--tunnel</option> (<option>-t</option>)"
25482 msgstr "<option>--tunnel</option> (<option>-t</option>)"
25484 #. (para)
25485 #: ../source/book.xml:23540
25486 #, fuzzy
25487 msgid "Causes <command>svnserve</command> to run in tunnel mode, which is just like the <command>inetd</command> mode of operation (both modes serve one connection over stdin/stdout, then exit), except that the connection is considered to be pre-authenticated with the username of the current uid. This flag is automatically passed for you by the client when running over a tunnel agent such as <command>ssh</command>. That means there's rarely any need for <emphasis>you</emphasis> to pass this option to <command>svnserve</command>. So if you find yourself typing <literal>svnserve --tunnel</literal> on the command line, and wondering what to do next, see <xref linkend=\"svn.serverconfig.svnserve.sshauth\"/>."
25488 msgstr "导致<command>svnserve</command>以管道模式运行,很像<command>inetd</command>操作的模式(服务于一个标准输入/标准输出的连接),除了连接是用当前uid的用户名预先认证过的这一点。这个选项在客户端使用如<command>ssh</command>之类的管道时使用。"
25490 #. (option)
25491 #: ../source/book.xml:23558
25492 msgid "--tunnel-user NAME"
25493 msgstr "--tunnel-user NAME"
25495 #. (para)
25496 #: ../source/book.xml:23561
25497 #, fuzzy
25498 msgid "Used in conjunction with the <option>--tunnel</option> option; tells svnserve to assume that <replaceable>NAME</replaceable> is the authenticated user, rather than the UID of the svnserve process. Useful for users wishing to share a single system account over SSH, but maintaining separate commit identities."
25499 msgstr "与<option>--tunnel</option>选项结合使用;告诉svnserve假定<replaceable>NAME</replaceable>就是认证用户,而不是svnserve进程的UID用户,当希望多个用户通过SSH共享同一个系统帐户,但是维护各自的提交标示符时非常有用。"
25501 #. (term)
25502 #: ../source/book.xml:23571
25503 msgid "<option>--threads</option> (<option>-T</option>)"
25504 msgstr "<option>--threads</option> (<option>-T</option>)"
25506 #. (para)
25507 #: ../source/book.xml:23573
25508 #, fuzzy
25509 msgid "When running in daemon mode, causes <command>svnserve</command> to spawn a thread instead of a process for each connection (e.g. for when running on Windows). The <command>svnserve</command> process still backgrounds itself at startup time."
25510 msgstr "当以守护进程模式运行,导致<command>svnserve</command>为每个连接产生一个线程而不是一个进程,<command>svnserve</command>进程本身在启动后会一直在后台。"
25512 #. (term)
25513 #: ../source/book.xml:23581
25514 msgid "<option>--listen-once</option> (<option>-X</option>)"
25515 msgstr "<option>--listen-once</option> (<option>-X</option>)"
25517 #. (para)
25518 #: ../source/book.xml:23583
25519 #, fuzzy
25520 msgid "Causes <command>svnserve</command> to accept one connection on the svn port, serve it, and exit. This option is mainly useful for debugging."
25521 msgstr "导致<command>svnserve</command>在svn端口接受一个连接,维护完成它退出。这个选项主要用来调试。"
25523 #. (refpurpose)
25524 #: ../source/book.xml:23606
25525 msgid "Summarize the local revision(s) of a working copy."
25526 msgstr "总结工作拷贝的本地修订版本。"
25528 #. (programlisting)
25529 #: ../source/book.xml:23613
25530 #, no-wrap
25531 msgid "svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]"
25532 msgstr "svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]"
25534 #. (para)
25535 #: ../source/book.xml:23619
25536 #, fuzzy
25537 msgid "<command>svnversion</command> is a program for summarizing the revision mixture of a working copy. The resultant revision number, or revision range, is written to standard output."
25538 msgstr "<command>svnversion</command>是用来总结工作拷贝修订版本混合的程序,结果修订版本号或范围会写到标准输出。"
25540 #. (para)
25541 #: ../source/book.xml:23623
25542 msgid "It's common to use this output in your build process when defining the version number of your program."
25543 msgstr "通常在构建过程中利用其输出定义程序的版本号码。"
25545 #. (para)
25546 #: ../source/book.xml:23625
25547 msgid "<replaceable>TRAIL_URL</replaceable>, if present, is the trailing portion of the URL used to determine if <replaceable>WC_PATH</replaceable> itself is switched (detection of switches within <replaceable>WC_PATH</replaceable> does not rely on <replaceable>TRAIL_URL</replaceable>)."
25548 msgstr "如果提供<replaceable>TRAIL_URL</replaceable>,URL的尾端部分用来监测是否<replaceable>WC_PATH</replaceable>本身已经跳转(监测<replaceable>WC_PATH</replaceable>的跳转不需要依赖<replaceable>TRAIL_URL</replaceable>)。"
25550 #. (para)
25551 #: ../source/book.xml:23631
25552 #, fuzzy
25553 msgid "When <replaceable>WC_PATH</replaceable> is not defined, the current directory will be used as the working copy path. <replaceable>TRAIL_URL</replaceable> cannot be defined if <replaceable>WC_PATH</replaceable> is not explicitly given."
25554 msgstr "当没有定义WC_PATH,会使用当前路径作为工作拷贝路径,如果没有显式定义WC_PATH,TRAIL_URL将无法定义。"
25556 #. (para)
25557 #: ../source/book.xml:23641
25558 #, fuzzy
25559 msgid "Like <command>svnserve</command>, <command>svnversion</command> has no subcommands, it only has options."
25560 msgstr "像<command>svnserve</command>,<command>svnversion</command>没有子命令,只有选项。"
25562 #. (term)
25563 #: ../source/book.xml:23646
25564 msgid "<option>--no-newline</option> (<option>-n</option>)"
25565 msgstr "<option>--no-newline</option> (<option>-n</option>)"
25567 #. (para)
25568 #: ../source/book.xml:23648
25569 msgid "Omit the usual trailing newline from the output."
25570 msgstr "忽略输出的尾端新行。."
25572 #. (term)
25573 #: ../source/book.xml:23652
25574 msgid "<option>--committed</option> (<option>-c</option>)"
25575 msgstr "<option>--committed</option> (<option>-c</option>)"
25577 #. (para)
25578 #: ../source/book.xml:23654
25579 msgid "Use the last-changed revisions rather than the current (i.e., highest locally available) revisions."
25580 msgstr "使用最后修改修订版本而不是当前的(例如,本地存在的最高修订版本)修订版本。"
25582 #. (para)
25583 #: ../source/book.xml:23661
25584 msgid "Print a help summary."
25585 msgstr "打印帮助摘要。"
25587 #. (para)
25588 #: ../source/book.xml:23669
25589 #, fuzzy
25590 msgid "Print the version of <command>svnversion</command> and exit with no error."
25591 msgstr "打印<command>svnversion</command>,如果没有错误退出。"
25593 #. (para)
25594 #: ../source/book.xml:23679
25595 msgid "If the working copy is all at the same revision (for example, immediately after an update), then that revision is printed out:"
25596 msgstr "如果工作拷贝都是一样的修订版本(例如,在更新后那一刻),会打印修订版本:"
25598 #. (screen)
25599 #: ../source/book.xml:23682
25600 #, no-wrap
25601 msgid ""
25602 "\n"
25603 "$ svnversion\n"
25604 "4168\n"
25605 msgstr ""
25606 "\n"
25607 "$ svnversion\n"
25608 "4168\n"
25610 #. (para)
25611 #: ../source/book.xml:23686
25612 #, fuzzy
25613 msgid "You can add <replaceable>TRAIL_URL</replaceable> to make sure that the working copy is not switched from what you expect. Note that the <replaceable>WC_PATH</replaceable> is required in this command:"
25614 msgstr "添加TRAIL_URL来展示工作拷贝不是从你希望的地方跳转过来的,注意这个命令需要WC_PATH:"
25616 #. (screen)
25617 #: ../source/book.xml:23690
25618 #, fuzzy, no-wrap
25619 msgid ""
25620 "\n"
25621 "$ svnversion . /var/svn/trunk\n"
25622 "4168\n"
25623 msgstr ""
25624 "\n"
25625 "$ svnversion . /repos/svn/trunk\n"
25626 "4168\n"
25628 #. (para)
25629 #: ../source/book.xml:23694
25630 msgid "For a mixed-revision working copy, the range of revisions present is printed:"
25631 msgstr "对于混合修订版本的工作拷贝,修订版本的范围会被打印:"
25633 #. (screen)
25634 #: ../source/book.xml:23696
25635 #, no-wrap
25636 msgid ""
25637 "\n"
25638 "$ svnversion\n"
25639 "4123:4168\n"
25640 msgstr ""
25641 "\n"
25642 "$ svnversion\n"
25643 "4123:4168\n"
25645 #. (para)
25646 #: ../source/book.xml:23700
25647 msgid "If the working copy contains modifications, a trailing \"M\" is added:"
25648 msgstr "如果工作拷贝包含修改,后面会紧跟一个\"M\":"
25650 #. (screen)
25651 #: ../source/book.xml:23702
25652 #, no-wrap
25653 msgid ""
25654 "\n"
25655 "$ svnversion\n"
25656 "4168M\n"
25657 msgstr ""
25658 "\n"
25659 "$ svnversion\n"
25660 "4168M\n"
25662 #. (para)
25663 #: ../source/book.xml:23706
25664 msgid "If the working copy is switched, a trailing \"S\" is added:"
25665 msgstr "如果工作拷贝已经跳转,后面会有一个\"S\":"
25667 #. (screen)
25668 #: ../source/book.xml:23708
25669 #, no-wrap
25670 msgid ""
25671 "\n"
25672 "$ svnversion\n"
25673 "4168S\n"
25674 msgstr ""
25675 "\n"
25676 "$ svnversion\n"
25677 "4168S\n"
25679 #. (para)
25680 #: ../source/book.xml:23712
25681 msgid "Thus, here is a mixed-revision, switched working copy containing some local modifications:"
25682 msgstr "因此,这里是一个混合修订版本,跳转的工作拷贝包含了一些本地修改:"
25684 #. (screen)
25685 #: ../source/book.xml:23714
25686 #, no-wrap
25687 msgid ""
25688 "\n"
25689 "$ svnversion\n"
25690 "4212:4168MS\n"
25691 msgstr ""
25692 "\n"
25693 "$ svnversion\n"
25694 "4212:4168MS\n"
25696 #. (para)
25697 #: ../source/book.xml:23718
25698 #, fuzzy
25699 msgid "If invoked on a directory that is not a working copy, <command>svnversion</command> assumes it is an exported working copy and prints \"exported\":"
25700 msgstr "如果从一个目录而不是工作拷贝调用,<command>svnversion</command>假定它是一个导出的工作拷贝并且打印\"exported\":"
25702 #. (screen)
25703 #: ../source/book.xml:23721
25704 #, no-wrap
25705 msgid ""
25706 "\n"
25707 "$ svnversion\n"
25708 "exported\n"
25709 msgstr ""
25710 "\n"
25711 "$ svnversion\n"
25712 "exported\n"
25714 #. (refname)
25715 #: ../source/book.xml:23739
25716 msgid "<placeholder-1/> Configuration Directives"
25717 msgstr "<placeholder-1/> Configuration Directives"
25719 #. (refpurpose)
25720 #: ../source/book.xml:23741
25721 msgid "Apache configuration directives for serving Subversion repositories through Apache HTTP Server."
25722 msgstr "Apache通过Apache HTTP服务器用来维护Subversion版本库配置指示。"
25724 #. (para)
25725 #: ../source/book.xml:23749
25726 msgid "This section briefly describes each of the Subversion Apache configuration directives. For an in-depth description of configuring Apache with Subversion, see <xref linkend=\"svn.serverconfig.httpd\"/>.)"
25727 msgstr "这个小节主要描述了Subversion Apache配置的每个指示,关于Apache配置Subversion的更多信息见<xref linkend=\"svn.serverconfig.httpd\"/>。"
25729 #. (title)
25730 #: ../source/book.xml:23755
25731 msgid "Directives"
25732 msgstr "指示"
25734 #. (literal)
25735 #: ../source/book.xml:23760
25736 msgid "DAV svn"
25737 msgstr "DAV svn"
25739 #. (para)
25740 #: ../source/book.xml:23763
25741 #, fuzzy
25742 msgid "This directive must be included in any <literal>Directory</literal> or <literal>Location</literal> block for a Subversion repository. It tells httpd to use the Subversion backend for mod_dav to handle all requests."
25743 msgstr "这个指示必须包含在所有Subversion版本库的<literal>Directory</literal>或<literal>Location</literal>块中,它告诉httpd使用Subversion的后端,用mod_dav来处理所有的请求。"
25745 #. (literal)
25746 #: ../source/book.xml:23772
25747 msgid "SVNAutoversioning On"
25748 msgstr "SVNAutoversioning On"
25750 #. (para)
25751 #: ../source/book.xml:23775
25752 #, fuzzy
25753 msgid "This directive allows write requests from WebDAV clients to result in automatic commits. A generic log message is auto-generated and attached to each revision. If you enable Autoversioning, you'll likely want to set <literal>ModMimeUsePathInfo On</literal> so that <literal>mod_mime</literal> can set <literal>svn:mime-type</literal> to the correct mime-type automatically (as best as <literal>mod_mime</literal> is able to, of course). For more information, see <xref linkend=\"svn.webdav\"/>"
25754 msgstr "这个指示允许WebDAV客户端的请求导致自动提交,每个修订版本会产生一个普通的日志信息。如果你开启了自动版本化,你很可能需要设置<literal>ModMimeUsePathInfo On</literal>,这样<literal>mod_mime</literal>可以自动的(像<literal>mod_mime</literal>一样好,当然)将<literal>svn:mime-type</literal>设置为正确的mime-type值。更多信息见<xref linkend=\"svn.webdav\"/>。"
25756 #. (literal)
25757 #: ../source/book.xml:23789
25758 msgid "SVNPath"
25759 msgstr "SVNPath"
25761 #. (para)
25762 #: ../source/book.xml:23792
25763 #, fuzzy
25764 msgid "This directive specifies the location in the filesystem for a Subversion repository's files. In a configuration block for a Subversion repository, either this directive or <literal>SVNParentPath</literal> must be present, but not both."
25765 msgstr "这个指示指定Subversion版本库文件文件系统的位置,在一个Subversion版本库的配置块里,必须提供这个指示或<literal>SVNParentPath</literal>,但不能同时存在。"
25767 #. (literal)
25768 #: ../source/book.xml:23802
25769 msgid "SVNSpecialURI"
25770 msgstr "SVNSpecialURI"
25772 #. (para)
25773 #: ../source/book.xml:23805
25774 #, fuzzy
25775 msgid "Specifies the URI component (namespace) for special Subversion resources. The default is <quote><literal>!svn</literal></quote>, and most administrators will never use this directive. Only set this if there is a pressing need to have a file named <filename>!svn</filename> in your repository. If you change this on a server already in use, it will break all of the outstanding working copies and your users will hunt you down with pitchforks and flaming torches."
25776 msgstr "指定特定Subversion资源的URI部分(命名空间),缺省是<quote><literal>!svn</literal></quote>,大多数管理员不会用到这个指示。只有那些必须要在版本库中放一个名字为<filename>!svn</filename>的文件时需要设置。如果你在一个已经使用中的服务器上这样修改,它会破坏所有的工作拷贝,你的用户会拿着叉子和火把追杀你。"
25778 #. (literal)
25779 #: ../source/book.xml:23819
25780 msgid "SVNReposName"
25781 msgstr "SVNReposName"
25783 #. (para)
25784 #: ../source/book.xml:23822
25785 #, fuzzy
25786 msgid "Specifies the name of a Subversion repository for use in <literal>HTTP GET</literal> responses. This value will be prepended to the title of all directory listings (which are served when you navigate to a Subversion repository with a web browser). This directive is optional."
25787 msgstr "指定Subversion版本库在<literal>HTTP GET</literal>请求中使用的名字,这个值会作为所有目录列表(当你用web浏览器察看Subversion版本库时会看到)的标题,这个指示是可选的。"
25789 #. (literal)
25790 #: ../source/book.xml:23832
25791 msgid "SVNIndexXSLT"
25792 msgstr "SVNIndexXSLT"
25794 #. (para)
25795 #: ../source/book.xml:23835
25796 msgid "Specifies the URI of an XSL transformation for directory indexes. This directive is optional."
25797 msgstr "目录列表所使用的XSL转化的URI,这个指示可选。"
25799 #. (literal)
25800 #: ../source/book.xml:23841
25801 msgid "SVNParentPath"
25802 msgstr "SVNParentPath"
25804 #. (para)
25805 #: ../source/book.xml:23844
25806 #, fuzzy
25807 msgid "Specifies the location in the filesystem of a parent directory whose child directories are Subversion repositories. In a configuration block for a Subversion repository, either this directive or <literal>SVNPath</literal> must be present, but not both."
25808 msgstr "指定子目录会是版本库的父目录在文件系统的位置,在一个Subversion版本库的配置块里,必须提供这个指示或<literal>SVNPath</literal>,但不能同时存在。"
25810 #. (literal)
25811 #: ../source/book.xml:23854
25812 msgid "SVNPathAuthz"
25813 msgstr "SVNPathAuthz"
25815 #. (para)
25816 #: ../source/book.xml:23857
25817 msgid "Control path-based authorization by enabling or disabling subrequests. See <xref linkend=\"svn.serverconfig.httpd.authz.pathauthzoff\"/> for details."
25818 msgstr "控制开启和关闭路径为基础的授权,更多细节见<xref linkend=\"svn.serverconfig.httpd.authz.pathauthzoff\"/>。"
25820 #. (title)
25821 #: ../source/book.xml:23870
25822 msgid "Subversion properties"
25823 msgstr "Subversion 属性"
25825 #. (para)
25826 #: ../source/book.xml:23872
25827 #, fuzzy
25828 msgid "Subversion allows users to invent arbitrarily-named versioned properties on files and directories, as well as unversioned properties on revisions. The only restriction is on properties whose names begin with <literal>svn:</literal> (those are reserved for Subversion's own use). While these properties may be set by users to control Subversion's behavior, users may not invent new <literal>svn:</literal> properties."
25829 msgstr "Subversion允许用户在文件或目录上发明任意名称的版本化属性和非版本化属性,唯一的限制就是<quote>svn:</quote>是Subversion本身的保留前缀,用户可以设置这些属性来改变Subversion的行为方式,用户不能发明新的<quote>svn:</quote>属性。"
25831 #. (title)
25832 #: ../source/book.xml:23881
25833 msgid "Versioned Properties"
25834 msgstr "版本控制的属性"
25836 #. (literal)
25837 #: ../source/book.xml:23886
25838 msgid "svn:executable"
25839 msgstr "svn:executable"
25841 #. (para)
25842 #: ../source/book.xml:23889
25843 msgid "If present on a file, the client will make the file executable in Unix-hosted working copies. See <xref linkend=\"svn.advanced.props.special.executable\"/>."
25844 msgstr "如果出现在一个文件上,客户端会将此文件在Unix工作拷贝中设置为可执行,见<xref linkend=\"svn.advanced.props.special.executable\"/>。"
25846 #. (literal)
25847 #: ../source/book.xml:23896
25848 msgid "svn:mime-type"
25849 msgstr "svn:mime-type"
25851 #. (para)
25852 #: ../source/book.xml:23899
25853 msgid "If present on a file, the value indicates the file's mime-type. This allows the client to decide whether line-based contextual merging is safe to perform during updates, and can also affect how the file behaves when fetched via web browser. See <xref linkend=\"svn.advanced.props.special.mime-type\"/>."
25854 msgstr "如果出现在一个文件,这个值表示了文件的mime-type,这允许客户端在执行更新时决定以行为依据的合并是否安全,同时也会影响使用浏览器浏览文件时的行为方式。见<xref linkend=\"svn.advanced.props.special.mime-type\"/>。"
25856 #. (literal)
25857 #: ../source/book.xml:23909
25858 msgid "svn:ignore"
25859 msgstr "svn:ignore"
25861 #. (para)
25862 #: ../source/book.xml:23912
25863 #, fuzzy
25864 msgid "If present on a directory, the value is a list of <emphasis>unversioned</emphasis> file patterns to be ignored by <command>svn status</command> and other subcommands. See <xref linkend=\"svn.advanced.props.special.ignore\"/>"
25865 msgstr "如果出现在目录上,这是一组<command>svn status</command>可以忽略的未版本化文件的名称模式,见<xref linkend=\"svn.advanced.props.special.ignore\"/>。"
25867 #. (literal)
25868 #: ../source/book.xml:23921
25869 msgid "svn:keywords"
25870 msgstr "svn:keywords"
25872 #. (para)
25873 #: ../source/book.xml:23924
25874 msgid "If present on a file, the value tells the client how to expand particular keywords within the file. See <xref linkend=\"svn.advanced.props.special.keywords\"/>."
25875 msgstr "如果出现在一个文件上,这个值告诉客户端如何扩展文件的特定关键字,见<xref linkend=\"svn.advanced.props.special.keywords\"/>。"
25877 #. (literal)
25878 #: ../source/book.xml:23932
25879 msgid "svn:eol-style"
25880 msgstr "svn:eol-style"
25882 #. (para)
25883 #: ../source/book.xml:23935
25884 #, fuzzy
25885 msgid "If present on a file, the value tells the client how to manipulate the file's line-endings in the working copy, and in exported trees. See <xref linkend=\"svn.advanced.props.special.eol-style\"/> and <xref linkend=\"svn.ref.svn.c.export\"/>."
25886 msgstr "如果出现在一个文件上,这个值告诉客户端如何处理工作拷贝中的文件的行结束符,见<xref linkend=\"svn.advanced.props.special.eol-style\"/>。"
25888 #. (literal)
25889 #: ../source/book.xml:23943
25890 msgid "svn:externals"
25891 msgstr "svn:externals"
25893 #. (para)
25894 #: ../source/book.xml:23946
25895 msgid "If present on a directory, the value is a multi-line list of other paths and URLs the client should check out. See <xref linkend=\"svn.advanced.externals\"/>."
25896 msgstr "如果出现在一个目录上,则这个值就是客户端必须要检出的路径和URL列表。见<xref linkend=\"svn.advanced.externals\"/>。"
25898 #. (literal)
25899 #: ../source/book.xml:23954
25900 msgid "svn:special"
25901 msgstr "svn:special"
25903 #. (para)
25904 #: ../source/book.xml:23959
25905 msgid "As of this writing, symbolic links are indeed the only <quote>special</quote> objects. But there might be more in future releases of Subversion."
25906 msgstr "此时,符号链是唯一的<quote>特别</quote>对象,但是以后,也许Subversion会有更多的特别对象。"
25908 #. (para)
25909 #: ../source/book.xml:23957
25910 #, fuzzy
25911 msgid "If present on a file, indicates that the file is not an ordinary file, but a symbolic link or other special object<placeholder-1/>."
25912 msgstr "如果出现在一个文件上,表示了那个文件不是一个普通的文件,而是一个符号链或者是其他特殊的对象。"
25914 #. (literal)
25915 #: ../source/book.xml:23967
25916 msgid "svn:needs-lock"
25917 msgstr "svn:needs-lock"
25919 #. (para)
25920 #: ../source/book.xml:23970
25921 msgid "If present on a file, tells the client to make the file read-only in the working copy, as a reminder that the file should be locked before editing begins. See <xref linkend=\"svn.advanced.locking.lock-communication\"/>."
25922 msgstr "如果出现在一个文件上,告诉客户端在工作拷贝将文件置为只读,可以提醒我们在修改以前必须解锁。见<xref linkend=\"svn.advanced.locking.lock-communication\"/>。"
25924 #. (title)
25925 #: ../source/book.xml:23980
25926 msgid "Unversioned Properties"
25927 msgstr "未版本控制的属性"
25929 #. (literal)
25930 #: ../source/book.xml:23985
25931 msgid "svn:author"
25932 msgstr "svn:author"
25934 #. (para)
25935 #: ../source/book.xml:23988
25936 msgid "If present, contains the authenticated username of the person who created the revision. (If not present, then the revision was committed anonymously.)"
25937 msgstr "如果出现,则保存了创建这个修订版本的认证用户名。(如果没有出现,则修订版本是匿名提交的。)"
25939 #. (literal)
25940 #: ../source/book.xml:23995
25941 msgid "svn:date"
25942 msgstr "svn:date"
25944 #. (para)
25945 #: ../source/book.xml:23998
25946 #, fuzzy
25947 msgid "Contains the UTC time the revision was created, in ISO 8601 format. The value comes from the <emphasis>server</emphasis> machine's clock, not the client's."
25948 msgstr "保存了修订版本创建的UTC时间,这个值来自服务器主机时钟。"
25950 #. (literal)
25951 #: ../source/book.xml:24006
25952 msgid "svn:log"
25953 msgstr "svn:log"
25955 #. (para)
25956 #: ../source/book.xml:24009
25957 msgid "Contains the log message describing the revision."
25958 msgstr "保存了描述修订版本的日志信息。"
25960 #. (literal)
25961 #: ../source/book.xml:24015
25962 msgid "svn:autoversioned"
25963 msgstr "svn:autoversioned"
25965 #. (para)
25966 #: ../source/book.xml:24018
25967 msgid "If present, the revision was created via the autoversioning feature. See <xref linkend=\"svn.webdav.autoversioning\"/>."
25968 msgstr "如果出现,则修订版本是通过自动版本化特性创建,见<xref linkend=\"svn.webdav.autoversioning\"/>。"
25970 #. (title)
25971 #: ../source/book.xml:24031
25972 msgid "Repository Hooks"
25973 msgstr "版本库钩子"
25975 #. (primary)
25976 #: ../source/book.xml:24036 ../source/book.xml:24083 ../source/book.xml:24132
25977 #: ../source/book.xml:24178 ../source/book.xml:24241 ../source/book.xml:24303
25978 #: ../source/book.xml:24354 ../source/book.xml:24400 ../source/book.xml:24453
25979 msgid "repository"
25980 msgstr "版本库"
25982 #. (tertiary), (refname)
25983 #: ../source/book.xml:24038 ../source/book.xml:24041
25984 msgid "start-commit"
25985 msgstr "start-commit"
25987 #. (refpurpose)
25988 #: ../source/book.xml:24042
25989 msgid "Notification of the beginning of a commit."
25990 msgstr "开始提交的通知"
25992 #. (para)
25993 #: ../source/book.xml:24048
25994 msgid "The start-commit hook is run before the commit transaction is even created. It is typically used to decide if the user has commit privileges at all."
25995 msgstr " start-commit在开始事务之前执行,通常是用来确定用户是否有提交权限。"
25997 #. (para)
25998 #: ../source/book.xml:24051
25999 msgid "If the start-commit hook program returns a non-zero exit value, the commit is stopped before the commit transaction is even created, and anything printed to stderr is marshalled back to the client."
26000 msgstr "如果start-commit钩子程序返回非零值,提交就会在创建之前停止,标准错误的任何输出都会返回到客户端。"
26002 #. (title)
26003 #: ../source/book.xml:24058 ../source/book.xml:24109 ../source/book.xml:24155
26004 #: ../source/book.xml:24205 ../source/book.xml:24267 ../source/book.xml:24327
26005 #: ../source/book.xml:24374 ../source/book.xml:24426 ../source/book.xml:24473
26006 msgid "Input Parameter(s)"
26007 msgstr "输入参数"
26009 #. (para)
26010 #: ../source/book.xml:24060 ../source/book.xml:24111 ../source/book.xml:24157
26011 #: ../source/book.xml:24207 ../source/book.xml:24269 ../source/book.xml:24329
26012 #: ../source/book.xml:24376 ../source/book.xml:24428 ../source/book.xml:24475
26013 msgid "The command-line arguments passed to the hook program, in order, are:"
26014 msgstr "传递给你钩子程序的命令行参数,按照顺序是:"
26016 #. (para)
26017 #: ../source/book.xml:24064 ../source/book.xml:24115 ../source/book.xml:24161
26018 #: ../source/book.xml:24211 ../source/book.xml:24273 ../source/book.xml:24333
26019 #: ../source/book.xml:24380 ../source/book.xml:24432 ../source/book.xml:24479
26020 msgid "repository path"
26021 msgstr "版本库路径"
26023 #. (para)
26024 #: ../source/book.xml:24067
26025 msgid "authenticated username attempting the commit"
26026 msgstr "认证过的用户名尝试提交"
26028 #. (title)
26029 #: ../source/book.xml:24073 ../source/book.xml:24124 ../source/book.xml:24170
26030 #: ../source/book.xml:24233 ../source/book.xml:24295 ../source/book.xml:24346
26031 #: ../source/book.xml:24392 ../source/book.xml:24445 ../source/book.xml:24491
26032 msgid "Common Uses"
26033 msgstr "普通用户"
26035 #. (para)
26036 #: ../source/book.xml:24075 ../source/book.xml:24348 ../source/book.xml:24447
26037 msgid "access control"
26038 msgstr "访问控制"
26040 #. (tertiary), (refname)
26041 #: ../source/book.xml:24085 ../source/book.xml:24088
26042 msgid "pre-commit"
26043 msgstr "pre-commit"
26045 #. (refpurpose)
26046 #: ../source/book.xml:24089
26047 msgid "Notification just prior to commit completion."
26048 msgstr "在提交结束之前提醒。"
26050 #. (para)
26051 #: ../source/book.xml:24095
26052 msgid "The pre-commit hook is run just before a commit transaction is promoted to a new revision. Typically, this hook is used to protect against commits that are disallowed due to content or location (for example, your site might require that all commits to a certain branch include a ticket number from the bug tracker, or that the incoming log message is non-empty)."
26053 msgstr "pre-commit hook在事务完成提交之前运行,通常这个钩子是用来保护因为内容或位置(例如,你要求所有到一个特定分支的提交必须包括一个bug追踪的ticket号,或者是要求日志信息不为空)而不允许的提交。"
26055 #. (para)
26056 #: ../source/book.xml:24102
26057 msgid "If the pre-commit hook program returns a non-zero exit value, the commit is aborted, the commit transaction is removed, and anything printed to stderr is marshalled back to the client."
26058 msgstr "如果pre-commit钩子返回非零值,提交会退出,提交事务被删除,所有标准错误的输出返回到客户端。"
26060 #. (para)
26061 #: ../source/book.xml:24118
26062 msgid "commit transaction name"
26063 msgstr "提交事务的名称"
26065 #. (para)
26066 #: ../source/book.xml:24126
26067 msgid "change validation and control"
26068 msgstr "修改确认和控制"
26070 #. (tertiary), (refname)
26071 #: ../source/book.xml:24134 ../source/book.xml:24137
26072 msgid "post-commit"
26073 msgstr "post-commit"
26075 #. (refpurpose)
26076 #: ../source/book.xml:24138
26077 msgid "Notification of a successful commit."
26078 msgstr "成功提交的通知。"
26080 #. (para)
26081 #: ../source/book.xml:24144
26082 msgid "The post-commit hook is run after the transaction is committed, and a new revision created. Most people use this hook to send out descriptive emails about the commit or to notify some other tool (such as an issue tracker) that a commit has happened. Some configurations also use this hook to trigger backup processes."
26083 msgstr " post-commit hook在事务完成后运行,创建一个新的修订版本。大多数人用这个钩子来发送关于提交的描述性电子邮件,或者作为版本库的备份。"
26085 #. (para)
26086 #: ../source/book.xml:24150
26087 #, fuzzy
26088 msgid "The output from, and exit value returned by the post-commit hook program are ignored."
26089 msgstr "post-commit钩子程序的返回值和输出被忽略。"
26091 #. (para)
26092 #: ../source/book.xml:24164
26093 msgid "revision number created by the commit"
26094 msgstr "提交创建的版本号"
26096 #. (para)
26097 #: ../source/book.xml:24172
26098 msgid "commit notification, tool integration"
26099 msgstr "提交通知,工具集成"
26101 #. (tertiary), (refname)
26102 #: ../source/book.xml:24180 ../source/book.xml:24183
26103 msgid "pre-revprop-change"
26104 msgstr "pre-revprop-change"
26106 #. (refpurpose)
26107 #: ../source/book.xml:24184
26108 msgid "Notification of a revision property change attempt."
26109 msgstr "修订版本属性修改的通知。"
26111 #. (para)
26112 #: ../source/book.xml:24191
26113 msgid "The pre-revprop-change hook is run immediately prior to the modification of a revision property when performed outside the scope of a normal commit. Unlike the other hooks, the default state of this one is to deny the proposed action. The hook must actually exist and return a zero exit value before a revision property modification can happen."
26114 msgstr "pre-revprop-change钩子在修订版本属性修改之前,正常提交范围之外被执行,不象其他钩子,这个钩子默认是拒绝所有的属性修改,钩子必须实际存在并且返回一个零值,这样属性修改才能实现。"
26116 #. (para)
26117 #: ../source/book.xml:24198
26118 #, fuzzy
26119 msgid "If the pre-revprop-change hook doesn't exist, isn't executable, or returns a non-zero exit value, no change to the property will be made, and anything printed to stderr is marshalled back to the client."
26120 msgstr "如果pre-revprop-change钩子没有实现或返回一个非零值,对属性的修改就不会成功,所以的标准错误输出会返回到客户端。"
26122 #. (para)
26123 #: ../source/book.xml:24214
26124 msgid "revision whose property is about to be modified"
26125 msgstr "要修改属性的修订版本"
26127 #. (para)
26128 #: ../source/book.xml:24217
26129 msgid "authenticated username attempting the propchange"
26130 msgstr "企图修改属性的认证用户名"
26132 #. (para)
26133 #: ../source/book.xml:24220 ../source/book.xml:24282
26134 msgid "name of the property changed"
26135 msgstr "属性名称已修改"
26137 #. (para)
26138 #: ../source/book.xml:24223 ../source/book.xml:24285
26139 #, fuzzy
26140 msgid "change description: <literal>A</literal> (added), <literal>D</literal> (deleted), or <literal>M</literal> (modified)"
26141 msgstr "变更描述:<literal>A</literal> (添加的),<literal>D</literal> (删除的)或<literal>M</literal> (修改的)"
26143 #. (para)
26144 #: ../source/book.xml:24228
26145 msgid "Additionally, Subversion passes to the hook program via standard input the proposed value of the property."
26146 msgstr "此外,Subversion通过标准输入将属性值传递给钩子程序。"
26148 #. (para)
26149 #: ../source/book.xml:24235
26150 msgid "access control, change validation and control"
26151 msgstr "访问控制,修改确认和控制"
26153 #. (tertiary), (refname)
26154 #: ../source/book.xml:24243 ../source/book.xml:24246
26155 msgid "post-revprop-change"
26156 msgstr "post-revprop-change"
26158 #. (refpurpose)
26159 #: ../source/book.xml:24247
26160 msgid "Notification of a successful revision property change."
26161 msgstr "修订版本属性修改成功的通知"
26163 #. (para)
26164 #: ../source/book.xml:24254
26165 msgid "The post-revprop-change hook is run immediately after to the modification of a revision property when performed outside the scope of a normal commit. As can be derived from the description of its counterpart, the pre-revprop-change hook, this hook will not run at all unless the pre-revprop-change hook is implemented. It is typically used to send email notification of the property change."
26166 msgstr "post-revprop-change钩子会在修订版本属性修改后立即执行,在提交范围之外。可以从其对应物pre-revprop-change知道,如果没有实现pre-revprop-change钩子就不会执行。它通常用来在属性修改后发送邮件通知。"
26168 #. (para)
26169 #: ../source/book.xml:24262
26170 #, fuzzy
26171 msgid "The output from, and exit value returned by, the post-revprop-change hook program are ignored."
26172 msgstr "post-revprop-change的返回值和输出会被忽略。"
26174 #. (para)
26175 #: ../source/book.xml:24276
26176 msgid "revision whose property was modified"
26177 msgstr "已经修改属性的修订版本"
26179 #. (para)
26180 #: ../source/book.xml:24279
26181 msgid "authenticated username of the person making the change"
26182 msgstr "做出修改的认证用户名"
26184 #. (para)
26185 #: ../source/book.xml:24290
26186 #, fuzzy
26187 msgid "Additionally, Subversion passes to the hook program, via standard input, the previous value of the property."
26188 msgstr "此外,Subversion通过标准输入将属性的前一个值传递给钩子。"
26190 #. (para)
26191 #: ../source/book.xml:24297
26192 msgid "propchange notification"
26193 msgstr "属性修改通知"
26195 #. (tertiary), (refname)
26196 #: ../source/book.xml:24305 ../source/book.xml:24308
26197 msgid "pre-lock"
26198 msgstr "pre-lock"
26200 #. (refpurpose)
26201 #: ../source/book.xml:24309
26202 msgid "Notification of a path lock attempt."
26203 msgstr "路径锁定尝试的通知。"
26205 #. (para)
26206 #: ../source/book.xml:24315
26207 msgid "The pre-lock hook runs whenever someone attempts to lock a path. It can be used to prevent locks altogether, or to create a more complex policy specifying exactly which users are allowed to lock particular paths. If the hook notices a pre-existing lock, then it can also decide whether a user is allowed to <quote>steal</quote> the existing lock."
26208 msgstr "这个钩子会在每次有人尝试锁定文件时执行,可以防止完全的锁定,或者用来指定控制哪些用户可以锁定特定路径的复杂策略,如果钩子发现已存在的钩子,也可以决定是否<quote>窃取</quote>这个钩子。"
26210 #. (para)
26211 #: ../source/book.xml:24321
26212 msgid "If the pre-lock hook program returns a non-zero exit value, the lock action is aborted and anything printed to stderr is marshalled back to the client."
26213 msgstr "如果pre-lock钩子返回非零值,锁定动作会退出,并将标准错误返回到客户端。"
26215 #. (para)
26216 #: ../source/book.xml:24336 ../source/book.xml:24435
26217 msgid "versioned path which is to be locked"
26218 msgstr "将要锁定的版本化路径"
26220 #. (para)
26221 #: ../source/book.xml:24339 ../source/book.xml:24438
26222 msgid "authenticated username of the person attempting the lock"
26223 msgstr "尝试锁定的认证用户名"
26225 #. (tertiary), (refname)
26226 #: ../source/book.xml:24356 ../source/book.xml:24359
26227 msgid "post-lock"
26228 msgstr "post-lock"
26230 #. (refpurpose)
26231 #: ../source/book.xml:24360
26232 msgid "Notification of a successful path lock."
26233 msgstr "成功锁定路径的通知。"
26235 #. (para)
26236 #: ../source/book.xml:24366
26237 msgid "The post-lock hook runs after one or more paths has been locked. It is typically used to send email notification of the lock event."
26238 msgstr "post-lock在路径锁定后执行,通常用来发送锁定事件邮件通知。"
26240 #. (para)
26241 #: ../source/book.xml:24369
26242 #, fuzzy
26243 msgid "The output from and exit value returned by the post-lock hook program are ignored."
26244 msgstr "post-unlock钩子程序的输出和返回值会被忽略。"
26246 #. (para)
26247 #: ../source/book.xml:24383
26248 msgid "authenticated username of the person who locked the paths"
26249 msgstr "锁定路径的认证用户名"
26251 #. (para)
26252 #: ../source/book.xml:24387
26253 msgid "Additionally, the list of paths locked is passed to the hook program via standard input, one path per line."
26254 msgstr "此外,锁定路径通过标准输入传递给钩子程序,每行一个路径。"
26256 #. (para)
26257 #: ../source/book.xml:24394
26258 msgid "lock notification"
26259 msgstr "加锁通知"
26261 #. (tertiary), (refname)
26262 #: ../source/book.xml:24402 ../source/book.xml:24405
26263 msgid "pre-unlock"
26264 msgstr "pre-unlock"
26266 #. (refpurpose)
26267 #: ../source/book.xml:24406
26268 msgid "Notification of a path unlock attempt."
26269 msgstr "路径解锁尝试的通知。"
26271 #. (para)
26272 #: ../source/book.xml:24412
26273 msgid "The pre-unlock hook runs whenever someone attempts to remove a lock on a file. It can be used to create policies that specify which users are allowed to unlock particular paths. It's particularly important for determining policies about lock breakage. If user A locks a file, is user B allowed to break the lock? What if the lock is more than a week old? These sorts of things can be decided and enforced by the hook."
26274 msgstr "这个钩子在某人企图删除一个文件上的钩子时发生,可以用来制定哪些用户可以解除文件锁定的策略。制定破坏锁定的策略非常重要,如果一个用户A锁定了一个文件,允许用户B打开这个锁?如果这个锁已经一周了呢?这种事情可以通过钩子决定并执行。"
26276 #. (para)
26277 #: ../source/book.xml:24420
26278 msgid "If the pre-unlock hook program returns a non-zero exit value, the unlock action is aborted and anything printed to stderr is marshalled back to the client."
26279 msgstr "如果pre-unlock返回非零值,解锁过程就会退出,标准错误返回到客户端。"
26281 #. (tertiary), (refname)
26282 #: ../source/book.xml:24455 ../source/book.xml:24458
26283 msgid "post-unlock"
26284 msgstr "post-unlock"
26286 #. (refpurpose)
26287 #: ../source/book.xml:24459
26288 msgid "Notification of a successful path unlock."
26289 msgstr "路径成功解锁的通知。"
26291 #. (para)
26292 #: ../source/book.xml:24465
26293 msgid "The post-unlock hook runs after one or more paths has been unlocked. It is typically used to send email notification of the unlock event."
26294 msgstr "post-unlock在一个或多个路径已经被解锁后执行,通常用来发送解锁事件通知邮件。"
26296 #. (para)
26297 #: ../source/book.xml:24468
26298 #, fuzzy
26299 msgid "The output from and exit value returned by, the post-unlock hook program are ignored."
26300 msgstr "post-unlock钩子程序的输出和返回值会被忽略。"
26302 #. (para)
26303 #: ../source/book.xml:24482
26304 msgid "authenticated username of the person who unlocked the paths"
26305 msgstr "路径解锁的认证用户名"
26307 #. (para)
26308 #: ../source/book.xml:24486
26309 msgid "Additionally, the list of paths unlocked is passed to the hook program via standard input, one path per line."
26310 msgstr "此外,解锁路径通过标准输入传递给钩子程序,每行一个路径。"
26312 #. (para)
26313 #: ../source/book.xml:24493
26314 msgid "unlock notification"
26315 msgstr "解锁通知"
26317 #. (title)
26318 #: ../source/book.xml:24505
26319 msgid "Subversion Quick-Start Guide"
26320 msgstr "Subversion 快速入门指南"
26322 #. (para)
26323 #: ../source/book.xml:24507
26324 msgid "If you're eager to get Subversion up and running (and you enjoy learning by experimentation), this chapter will show you how to create a repository, import code, and then check it back out again as a working copy. Along the way, we give links to the relevant chapters of this book."
26325 msgstr "如果你渴望快速配置Subversion并运行(而且你喜欢通过实验学习),本章会展示如何创建版本库,导入代码,然后以工作拷贝检出,继续我们会给出本书的相关章节的链接。"
26327 #. (para)
26328 #: ../source/book.xml:24513
26329 msgid "If you're new to the entire concept of version control or to the <quote>copy-modify-merge</quote> model used by both CVS and Subversion, then you should read <xref linkend=\"svn.basic\"/> before going any further."
26330 msgstr "如果读者还不熟悉版本控制,以及在Subversion和CVS中使用的<quote>拷贝-修改-合并</quote>模型这些基础的概念,那么建议在进一步学习之前,首先阅读<xref linkend=\"svn.basic\"/>。"
26332 #. (title)
26333 #: ../source/book.xml:24523
26334 msgid "Installing Subversion"
26335 msgstr "安装 Subversion"
26337 #. (para)
26338 #: ../source/book.xml:24525
26339 msgid "Subversion is built on a portability layer called APR—the Apache Portable Runtime library. The APR library provides all the interfaces that Subversion needs to function on different operating systems: disk access, network access, memory management, and so on. While Subversion is able to use Apache as one of its network server programs, its dependence on APR <emphasis>does not</emphasis> mean that Apache is a required component. APR is a standalone library useable by any application. It does mean, however, that like Apache, Subversion clients and servers run on any operating system that the Apache httpd server runs on: Windows, Linux, all flavors of BSD, Mac OS X, Netware, and others."
26340 msgstr "Subversion是基于APR构建的。APR全称为Apache Portable Runtime library,是一个移植性很好的程序库。APR库提供了全部与操作系统相关的操作接口,如磁盘访问、内存管理等等,这使得Subversion自身能够在不加修改的情况下运行于不同的操作系统之上。Subversion对APR的依赖并不意味着必须使用Apache作为它的网络服务器程序,相反,Apache只是Subversion支持的网络服务器程序之一。APR是一个独立的程序库,任何应用程序都可以使用它(Apache也是基于它开发的)。这就是说,Subversion能够在所有可运行Apache服务器的操作系统上运转,如Windows、Linux、各种BSD、Mac OS X、Netware等等。"
26342 #. (para)
26343 #: ../source/book.xml:24537
26344 #, fuzzy
26345 msgid "The easiest way to get Subversion is to download a binary package built for your operating system. Subversion's website (<uri href=\"http://subversion.tigris.org\">http://subversion.tigris.org</uri>) often has these packages available for download, posted by volunteers. The site usually contains graphical installer packages for users of Microsoft operating systems. If you run a Unix-like operating system, you can use your system's native package distribution system (RPMs, DEBs, the ports tree, etc.) to get Subversion."
26346 msgstr "最简单的安装Subversion的方法就是下载与你的操作系统对应的二进制程序包。在Subversion的网站(<ulink url=\"http://subversion.tigris.org\"/>)上通常可以找到由志愿者提供下载的程序包。在这个网站上,会提供微软操作系统上的图形化应用程序安装包。而对于类Unix系统,则可以使用其自身的程序包系统(PRMs、DEBs、ports tree等等)来获取Subversion。"
26348 #. (para)
26349 #: ../source/book.xml:24546
26350 #, fuzzy
26351 msgid "Alternately, you can build Subversion directly from source code, though it's not always an easy task. (If you're not experienced at building open source software packages, you're probably better off downloading a binary distribution instead!) From the Subversion website, download the latest source-code release. After unpacking it, follow the instructions in the <filename>INSTALL</filename> file to build it. Note that a released source package may not contain everything you need to build a command-line client capable of talking to a remote repository. Starting with Subversion 1.4 and later, the libraries Subversion depends on (apr, apr-util, and neon) are distributed in a separate source package suffixed with <filename>-deps</filename>. These libraries are now common enough that they may already be installed on your system. If not, you'll need to unpack the dependency package into the same directory where you unpacked the main Subversion source. Regardless, it's possible that you may want to fetch other optional dependencies such as Berkeley DB and possibly Apache httpd. If you want to do a complete build, make sure you have all of the packages documented in the <filename>INSTALL</filename> file."
26352 msgstr "此外,还可以通过编译源代码包直接生成Subversion程序。首先,从Subversion网站下载最新的源代码包,然后解压缩。然后,根据<filename>INSTALL</filename>文件的指示进行编译。需要注意的是,正式发布的源代码包中包含了构建命令行客户端工具所需的全部内容(如apr,apr-util和neno库),可以直接进行编译。但是一些可选的组件则依赖于其它一些程序库,如Berkeley DB和Apache httpd。因此,如果想要进行完整的编译,请根据<filename>INSTALL</filename>文件中的内容确认这些程序库是否可用。"
26354 #. (para)
26355 #: ../source/book.xml:24573
26356 #, fuzzy
26357 msgid "Note that the URL checked out in the example above ends not with <literal>svn</literal>, but with a subdirectory thereof called <literal>trunk</literal>. See our discussion of Subversion's branching and tagging model for the reasoning behind this."
26358 msgstr "注意上面例子中检出的URL并不是以<literal>svn</literal>结尾,而是它的一个叫做<literal>trunk</literal>的子目录,可以看我们对Subversion的分支和标签模型的讨论来理解背后的原因。"
26360 #. (para)
26361 #: ../source/book.xml:24567
26362 #, fuzzy
26363 msgid "If you're one of those folks that likes to use bleeding-edge software, you can also get the Subversion source code from the Subversion repository in which it lives. Obviously, you'll need to already have a Subversion client on hand to do this. But once you do, you can check out a working copy of the Subversion source repository from <uri href=\"http://svn.collab.net/repos/svn/trunk/\">http://svn.collab.net/repos/svn/trunk/</uri>: <placeholder-1/>"
26364 msgstr "如果你是一个喜欢使用最新软件的人,你可以从Subversion本身的版本库得到Subversion最新的源代码,显然,你首先需要一个Subversion客户端,有了之后,你就可以从<ulink url=\"http://svn.collab.net/repos/svn/trunk/\"/>检出一个Subversion源代码的工作拷贝:<placeholder-1/>"
26366 #. (screen)
26367 #: ../source/book.xml:24578
26368 #, no-wrap
26369 msgid ""
26370 "\n"
26371 "$ svn checkout http://svn.collab.net/repos/svn/trunk subversion\n"
26372 "A    subversion/HACKING\n"
26373 "A    subversion/INSTALL\n"
26374 "A    subversion/README\n"
26375 "A    subversion/autogen.sh\n"
26376 "A    subversion/build.conf\n"
26377 "…\n"
26378 msgstr ""
26379 "\n"
26380 "$ svn checkout http://svn.collab.net/repos/svn/trunk subversion\n"
26381 "A    subversion/HACKING\n"
26382 "A    subversion/INSTALL\n"
26383 "A    subversion/README\n"
26384 "A    subversion/autogen.sh\n"
26385 "A    subversion/build.conf\n"
26386 "…\n"
26388 #. (para)
26389 #: ../source/book.xml:24587
26390 #, fuzzy
26391 msgid "The above command will create a working copy of the latest (unreleased) Subversion source code into a subdirectory named <filename>subversion</filename> in your current working directory. You can adjust that last argument as you see fit. Regardless of what you call the new working copy directory, though, after this operation completes, you will now have the Subversion source code. Of course, you will still need to fetch a few helper libraries (apr, apr-util, etc.)—see the <filename>INSTALL</filename> file in the top level of the working copy for details."
26392 msgstr "上面的命令会检出一个流血的,最新的Subversion源代码版本到你的叫做<filename>subversion</filename>的当前工作目录。很明显,你可以调整最后的参数改为你需要的。不管你怎么称呼你的新的工作拷贝目录,在操作之后,你现在已经有了Subversion的源代码。当然,你还是需要得到一些帮助库(apr,apr-util等等)—见工作拷贝根目录的<filename>INSTALL</filename>来得到更多细节。"
26394 #. (title)
26395 #: ../source/book.xml:24603
26396 msgid "High-speed Tutorial"
26397 msgstr "快速指南"
26399 #. (quote)
26400 #: ../source/book.xml:24607
26401 msgid "Please make sure your seat backs are in their full, upright position, and that your tray tables are stored. Flight attendants, prepare for take-off…."
26402 msgstr "请确定你坐在了正确的位置,你的盘桌已经关闭,乘务员们,准备起飞…。"
26404 #. (para)
26405 #: ../source/book.xml:24612
26406 #, fuzzy
26407 msgid "What follows is a quick tutorial that walks you through some basic Subversion configuration and operation. When you finish it, you should have a basic understanding of Subversion's typical usage."
26408 msgstr "这是一个非常高层次的教程,能够帮助你熟悉Subversion的基本配置和操作,在结束这个教程时,你一定能够对Subversion的典型使用有了一个基础的认识。"
26410 #. (para)
26411 #: ../source/book.xml:24617
26412 #, fuzzy
26413 msgid "The examples used in this appendix assume that you have <command>svn</command>, the Subversion command-line client, and <command>svnadmin</command>, the administrative tool, ready to go on a Unix-like operating system. (This tutorial also works at the Windows commandline prompt, assuming you make some obvious tweaks.) We also assume you are using Subversion 1.2 or later (run <command>svn --version</command> to check.)"
26414 msgstr "运行下面的例子需要首先正确安装Subversion客户端程序<command>svn</command>以及管理工具<command>svnadmin</command>,并且必须为1.2或更新版本的Subversion程序(可以运行<command>svn --version</command>来检查Subversion的版本。)"
26416 #. (para)
26417 #: ../source/book.xml:24626
26418 msgid "Subversion stores all versioned data in a central repository. To begin, create a new repository:"
26419 msgstr "Subversion的所有版本化数据都储存在中心版本库中。因此首先,我们需要创建一个版本库:"
26421 #. (screen)
26422 #: ../source/book.xml:24628
26423 #, fuzzy, no-wrap
26424 msgid ""
26425 "\n"
26426 "$ svnadmin create /var/svn/repos\n"
26427 "$ ls /var/svn/repos\n"
26428 "conf/  dav/  db/  format  hooks/  locks/  README.txt\n"
26429 msgstr ""
26430 "\n"
26431 "$ svnadmin create /path/to/repos\n"
26432 "$ ls /path/to/repos\n"
26433 "conf/  dav/  db/  format  hooks/  locks/  README.txt\n"
26435 #. (para)
26436 #: ../source/book.xml:24633
26437 #, fuzzy
26438 msgid "This command creates a new directory <filename>/var/svn/repos</filename> which contains a Subversion repository. This new directory contains (among other things) a collection of database files. You won't see your versioned files if you peek inside. For more information about repository creation and maintenance, see <xref linkend=\"svn.reposadmin\"/>."
26439 msgstr "这个命令创建了一个新目录<filename>/path/to/repos</filename>,并在其中创建了一个Subversion版本库。这个目录里主要保存了一些数据库文件(还有其它一些文件),而不像CVS那样保存着版本化的文件。需要更多版本库创建和维护方面的内容,参见<xref linkend=\"svn.reposadmin\"/>。"
26441 #. (para)
26442 #: ../source/book.xml:24640
26443 msgid "Subversion has no concept of a <quote>project</quote>. The repository is just a virtual versioned filesystem, a large tree that can hold anything you wish. Some administrators prefer to store only one project in a repository, and others prefer to store multiple projects in a repository by placing them into separate directories. The merits of each approach are discussed in <xref linkend=\"svn.reposadmin.projects.chooselayout\"/>. Either way, the repository only manages files and directories, so it's up to humans to interpret particular directories as <quote>projects</quote>. So while you might see references to projects throughout this book, keep in mind that we're only ever talking about some directory (or collection of directories) in the repository."
26444 msgstr "在Subversion没有<quote>项目</quote>的概念。Subversion的版本库只是一个虚拟的版本化文件系统,可以存放你想要存放的任何文件。有些管理员喜欢为每个项目建立一个独立的版本库,而另外一些管理员则喜欢将多个项目存放到同一个版本库的不同目录里。这两种方式各有各的优点,关于这方面内容的叙述,参见<xref linkend=\"svn.reposadmin.projects.chooselayout\"/>。不论是哪一种方式,版本库都只是负责管理文件和目录,而<quote>项目</quote>则是人为指定的概念。因此,尽管本书中遍布着项目这个词,但是请记住我们只不过是在谈论版本库中的某些特定目录(或者是一组目录)。"
26446 #. (para)
26447 #: ../source/book.xml:24653
26448 #, fuzzy
26449 msgid "In this example, we assume that you already have some sort of project (a collection of files and directories) that you wish to import into your newly created Subversion repository. Begin by organizing your data into a single directory called <filename>myproject</filename> (or whatever you wish). For reasons that will be clear later (see <xref linkend=\"svn.branchmerge\"/>), your project's tree structure should contain three top-level directories named <filename>branches</filename>, <filename>tags</filename>, and <filename>trunk</filename>. The <filename>trunk</filename> directory should contain all of your data, while <filename>branches</filename> and <filename>tags</filename> directories are empty:"
26450 msgstr "在这个例子中,我们假定已经有一些需要导入到Subversion版本库的条目(一组文件和目录)。接下来,我们需要把这些条目整理到一个名为<filename>myproject</filename>的目录(或者其它任意目录)里。在这个目录下,创建三个顶级子目录:<filename>branches</filename>、<filename>tags</filename>和<filename>trunk</filename>,这样做的原因将在后文中阐述。之后,将所有需版本化的数据保存到<filename>trunk</filename>目录下,同时保持<filename>branches</filename>和<filename>tags</filename>目录为空:"
26452 #. (screen)
26453 #: ../source/book.xml:24667
26454 #, no-wrap
26455 msgid ""
26456 "\n"
26457 "/tmp/myproject/branches/\n"
26458 "/tmp/myproject/tags/\n"
26459 "/tmp/myproject/trunk/\n"
26460 "                     foo.c\n"
26461 "                     bar.c\n"
26462 "                     Makefile\n"
26463 "                     …\n"
26464 msgstr ""
26465 "\n"
26466 "/tmp/myproject/branches/\n"
26467 "/tmp/myproject/tags/\n"
26468 "/tmp/myproject/trunk/\n"
26469 "                     foo.c\n"
26470 "                     bar.c\n"
26471 "                     Makefile\n"
26472 "                     …\n"
26474 #. (para)
26475 #: ../source/book.xml:24676
26476 #, fuzzy
26477 msgid "The <filename>branches</filename>, <filename>tags</filename>, and <filename>trunk</filename> subdirectories aren't actually required by Subversion. They're merely a popular convention that you'll most likely want to use later on."
26478 msgstr "<filename>branches</filename>、<filename>tags</filename>和<filename>trunk</filename>这三个子目录不是Subversion必须的。但这样做是Subversion的习惯用法,我们还是遵守这个约定吧。"
26480 #. (para)
26481 #: ../source/book.xml:24680
26482 #, fuzzy
26483 msgid "Once you have your tree of data ready to go, import it into the repository with the <command>svn import</command> command (see <xref linkend=\"svn.tour.importing\"/>):"
26484 msgstr "准备好了数据之后,就可以使用<command>svn import</command>命令(参见<xref linkend=\"svn.tour.importing\"/>)将其导入到版本库中:"
26486 #. (screen)
26487 #: ../source/book.xml:24683
26488 #, fuzzy, no-wrap
26489 msgid ""
26490 "\n"
26491 "$ svn import /tmp/myproject file:///var/svn/repos/myproject -m \"initial import\"\n"
26492 "Adding         /tmp/myproject/branches\n"
26493 "Adding         /tmp/myproject/tags\n"
26494 "Adding         /tmp/myproject/trunk\n"
26495 "Adding         /tmp/myproject/trunk/foo.c\n"
26496 "Adding         /tmp/myproject/trunk/bar.c\n"
26497 "Adding         /tmp/myproject/trunk/Makefile\n"
26498 "…\n"
26499 "Committed revision 1.\n"
26500 "$ \n"
26501 msgstr ""
26502 "\n"
26503 "$ svn import /tmp/myproject file:///path/to/repos/myproject -m \"initial import\"\n"
26504 "Adding         /tmp/myproject/branches\n"
26505 "Adding         /tmp/myproject/tags\n"
26506 "Adding         /tmp/myproject/trunk\n"
26507 "Adding         /tmp/myproject/trunk/foo.c\n"
26508 "Adding         /tmp/myproject/trunk/bar.c\n"
26509 "Adding         /tmp/myproject/trunk/Makefile\n"
26510 "…\n"
26511 "Committed revision 1.\n"
26512 "$ \n"
26514 #. (para)
26515 #: ../source/book.xml:24695
26516 #, fuzzy
26517 msgid "Now the repository contains this tree of data. As mentioned earlier, you won't see your files by directly peeking into the repository; they're all stored within a database. But the repository's imaginary filesystem now contains a top-level directory named <filename>myproject</filename>, which in turn contains your data."
26518 msgstr "现在版本库中已经保存了目录中的数据。如前所述,直接查看版本库是看不到文件和目录的;它们存放在数据库之中。但是版本库的虚拟文件系统中则包含了一个名为<filename>myproject</filename>的顶级目录,其中依此保存了所有的数据。"
26520 #. (para)
26521 #: ../source/book.xml:24701
26522 #, fuzzy
26523 msgid "Note that the original <filename>/tmp/myproject</filename> directory is unchanged; Subversion is unaware of it. (In fact, you can even delete that directory if you wish.) In order to start manipulating repository data, you need to create a new <quote>working copy</quote> of the data, a sort of private workspace. Ask Subversion to <quote>check out</quote> a working copy of the <filename>myproject/trunk</filename> directory in the repository:"
26524 msgstr "注意我们在一开始创建的那个<filename>/tmp/myproject</filename>目录并没有改变,Subversion并不在意它(事实上,完全可以删除这个目录)。要开始使用版本库数据,我们还要创建一个新的用于存储数据的<quote>工作拷贝</quote>,这是一个私有工作区。从Subversion版本库里<quote>检出</quote>一个<filename>myproject/trunk</filename>目录工作拷贝的操作如下:"
26526 #. (screen)
26527 #: ../source/book.xml:24709
26528 #, fuzzy, no-wrap
26529 msgid ""
26530 "\n"
26531 "$ svn checkout file:///var/svn/repos/myproject/trunk myproject\n"
26532 "A  myproject/foo.c\n"
26533 "A  myproject/bar.c\n"
26534 "A  myproject/Makefile\n"
26535 "…\n"
26536 "Checked out revision 1.\n"
26537 msgstr ""
26538 "\n"
26539 "$ svn checkout file:///path/to/repos/myproject/trunk myproject\n"
26540 "A  myproject/foo.c\n"
26541 "A  myproject/bar.c\n"
26542 "A  myproject/Makefile\n"
26543 "…\n"
26544 "Checked out revision 1.\n"
26546 #. (para)
26547 #: ../source/book.xml:24717
26548 #, fuzzy
26549 msgid "Now you have a personal copy of part of the repository in a new directory named <filename>myproject</filename>. You can edit the files in your working copy and then commit those changes back into the repository."
26550 msgstr "现在,在<filename>myproject</filename>目录下生成了一个版本库数据的独立拷贝。我们可以在这个工作拷贝中编辑文件,并将修改提交到版本库中。"
26552 #. (para)
26553 #: ../source/book.xml:24723
26554 msgid "Enter your working copy and edit a file's contents."
26555 msgstr "进入工作拷贝目录,编辑某个文件的内容。"
26557 #. (para)
26558 #: ../source/book.xml:24727
26559 #, fuzzy
26560 msgid "Run <command>svn diff</command> to see unified diff output of your changes."
26561 msgstr "运行<command>svn diff</command>以标准差别格式查看修改的内容。"
26563 #. (para)
26564 #: ../source/book.xml:24731
26565 #, fuzzy
26566 msgid "Run <command>svn commit</command> to commit the new version of your file to the repository."
26567 msgstr "运行<command>svn commit</command>将更改提交到版本库中。"
26569 #. (para)
26570 #: ../source/book.xml:24735
26571 #, fuzzy
26572 msgid "Run <command>svn update</command> to bring your working copy <quote>up-to-date</quote> with the repository."
26573 msgstr "运行<command>svn update</command><quote>更新</quote>工作拷贝。"
26575 #. (para)
26576 #: ../source/book.xml:24739
26577 msgid "For a full tour of all the things you can do with your working copy, read <xref linkend=\"svn.tour\"/>."
26578 msgstr "完整的工作拷贝操作指南,请参见<xref linkend=\"svn.tour\"/>。"
26580 #. (para)
26581 #: ../source/book.xml:24741
26582 msgid "At this point, you have the option of making your repository available to others over a network. See <xref linkend=\"svn.serverconfig\"/> to learn about the different sorts of server processes available and how to configure them."
26583 msgstr "现在,Subversion版本库可以通过网络方式访问。参考<xref linkend=\"svn.serverconfig\"/>,了解不同服务器软件的使用以及配置方法。"
26585 #. (title)
26586 #: ../source/book.xml:24755
26587 msgid "Subversion for CVS Users"
26588 msgstr "CVS 用户的 Subversion 指南"
26590 #. (para)
26591 #: ../source/book.xml:24757
26592 msgid "This appendix is a guide for CVS users new to Subversion. It's essentially a list of differences between the two systems as <quote>viewed from 10,000 feet</quote>. For each section, we provide backreferences to relevant chapters when possible."
26593 msgstr "这个附录可以作为CVS用户开始使用Subversion的指南,实质上就是鸟瞰这两个系统之间的区别列表,在每一小节,我们会尽可能提供相关章节的引用。"
26595 #. (para)
26596 #: ../source/book.xml:24762
26597 msgid "Although the goal of Subversion is to take over the current and future CVS user base, some new features and design changes were required to fix certain <quote>broken</quote> behaviors that CVS had. This means that, as a CVS user, you may need to break habits—ones that you forgot were odd to begin with."
26598 msgstr "尽管Subversion的目标是接管当前和未来的CVS用户基础,需要一些新的特性设计来修正一些CVS<quote>不好的</quote>行为习惯,这意味着,作为一个CVS用户,你或许需要打破习惯—忘记一些奇怪的习惯来作为开始。"
26600 #. (title)
26601 #: ../source/book.xml:24773
26602 msgid "Revision Numbers Are Different Now"
26603 msgstr "版本号现在不同了"
26605 #. (para)
26606 #: ../source/book.xml:24775
26607 msgid "In CVS, revision numbers are per-file. This is because CVS stores its data in RCS files; each file has a corresponding RCS file in the repository, and the repository is roughly laid out according to the structure of your project tree."
26608 msgstr "在CVS中,修订版本号是每文件的,这是因为CVS使用RCS文件保存数据,每个文件都在版本库有一个对应的RCS文件,版本库几乎就是根据项目树的结构创建。"
26610 #. (para)
26611 #: ../source/book.xml:24779
26612 msgid "In Subversion, the repository looks like a single filesystem. Each commit results in an entirely new filesystem tree; in essence, the repository is an array of trees. Each of these trees is labeled with a single revision number. When someone talks about <quote>revision 54</quote>, they're talking about a particular tree (and indirectly, the way the filesystem looked after the 54th commit)."
26613 msgstr "在Subversion,版本库看起来像是一个单独的文件系统,每次提交导致一个新的文件系统;本质上,版本库是一堆树,每棵树都有一个单独的修订版本号。当有人谈论<quote>修订版本54</quote>时,他们是在讨论一个特定的树(并且间接来说,文件系统在提交54次之后的样子)。"
26615 #. (para)
26616 #: ../source/book.xml:24786
26617 #, fuzzy
26618 msgid "Technically, it's not valid to talk about <quote>revision 5 of <filename>foo.c</filename></quote>. Instead, one would say <quote><filename>foo.c</filename> as it appears in revision 5</quote>. Also, be careful when making assumptions about the evolution of a file. In CVS, revisions 5 and 6 of <filename>foo.c</filename> are always different. In Subversion, it's most likely that <filename>foo.c</filename> did <emphasis>not</emphasis> change between revisions 5 and 6."
26619 msgstr "技术上讲,谈论<quote>文件<filename>foo.c</filename>的修订版本5</quote>是不正确的,相反,一个人会说<quote><filename>foo.c</filename>在修订版本5出现</quote>。同样,我们在假定文件的进展时也要小心,在CVS,文件<filename>foo.c</filename>的修订版本5和6一定是不同的,在Subversion,<filename>foo.c</filename>可能在修订版本5和6之间<emphasis>没有</emphasis>改变。"
26621 #. (para)
26622 #: ../source/book.xml:24795
26623 msgid "Similarly, in CVS a tag or branch is an annotation on the file, or on the version information for that individual file, whereas in Subversion a tag or branch is a copy of an entire tree (by convention, into the <filename>/branches</filename> or <filename>/tags</filename> directories that appear at the top level of the repository, beside <filename>/trunk</filename>). In the repository as a whole, many versions of each file may be visible: the latest version on each branch, every tagged version, and of course the latest version on the trunk itself. So, to refine the terms even further, one would often say <quote><filename>foo.c</filename> as it appears in <filename>/branches/REL1</filename> in revision 5.</quote>"
26624 msgstr "类似的,在CVS中标签或分支是文件的一种标注,或者是单个文件的版本信息,而在Subversion中,标签和分支是整个目录树的拷贝(为了方便,进入版本库顶级目录的<filename>/branches</filename>或<filename>/tags</filename>子目录,<filename>/trunk</filename>旁边)。版本库作为一个整体,每个文件的许多版本可见:每个分支的最新版本,每个标签的最新版本以及trunk本身的最新版本。所以,我们再精炼一下术语,我们说<quote><filename>foo.c</filename>在修订版本5出现在<filename>/branches/REL1</filename>。</quote>"
26626 #. (para)
26627 #: ../source/book.xml:24808
26628 msgid "For more details on this topic, see <xref linkend=\"svn.basic.in-action.revs\"/>."
26629 msgstr "更多细节见<xref linkend=\"svn.basic.in-action.revs\"/>."
26631 #. (title)
26632 #: ../source/book.xml:24815
26633 msgid "Directory Versions"
26634 msgstr "目录的版本"
26636 #. (para)
26637 #: ../source/book.xml:24817
26638 msgid "Subversion tracks tree structures, not just file contents. It's one of the biggest reasons Subversion was written to replace CVS."
26639 msgstr "Subversion会记录目录树的结构,不仅仅是文件的内容。这是编写Subversion替代CVS最重要的一个原因。"
26641 #. (para)
26642 #: ../source/book.xml:24820
26643 msgid "Here's what this means to you, as a former CVS user:"
26644 msgstr "以下是对你这意味着什么的说明,作为一个前CVS用户:"
26646 #. (para)
26647 #: ../source/book.xml:24823
26648 #, fuzzy
26649 msgid "The <command>svn add</command> and <command>svn delete</command> commands work on directories now, just as they work on files. So do <command>svn copy</command> and <command>svn move</command>. However, these commands do <emphasis>not</emphasis> cause any kind of immediate change in the repository. Instead, the working items are simply <quote>scheduled</quote> for addition or deletion. No repository changes happen until you run <command>svn commit</command>."
26650 msgstr "<command>svn add</command>和<command>svn delete</command>现在也工作在目录上了,就像在文件上一样,还有<command>svn copy</command>和<command>svn move</command>也一样。然而,这些命令<emphasis>不</emphasis>会导致版本库即时的变化,相反,工作的项目只是<quote>预定要</quote>添加和删除,在运行<command>svn commit</command>之前没有版本库的修改。"
26652 #. (para)
26653 #: ../source/book.xml:24834
26654 #, fuzzy
26655 msgid "Directories aren't dumb containers anymore; they have revision numbers like files. (Or more properly, it's correct to talk about <quote>directory <filename>foo/</filename> in revision 5</quote>.)"
26656 msgstr "目录不再是哑容器了;它们也有文件一样的修订版本号。(更准确一点,谈论<quote>修订版本5的目录 <filename>foo/</filename></quote>是正确的。)"
26658 #. (para)
26659 #: ../source/book.xml:24840
26660 msgid "Let's talk more about that last point. Directory versioning is a hard problem; because we want to allow mixed-revision working copies, there are some limitations on how far we can abuse this model."
26661 msgstr "让我们再讨论一下最后一点,目录版本化是一个困难的问题;因为我们希望允许混合修订版本的工作拷贝,有一些防止我们滥用这个模型的限制。"
26663 #. (para)
26664 #: ../source/book.xml:24844
26665 #, fuzzy
26666 msgid "From a theoretical point of view, we define <quote>revision 5 of directory <filename>foo</filename></quote> to mean a specific collection of directory-entries and properties. Now suppose we start adding and removing files from <filename>foo</filename>, and then commit. It would be a lie to say that we still have revision 5 of <filename>foo</filename>. However, if we bumped <filename>foo</filename>'s revision number after the commit, that would be a lie too; there may be other changes to <filename>foo</filename> we haven't yet received, because we haven't updated yet."
26667 msgstr "从理论观点,我们定义<quote>目录<filename>foo</filename>的修订版本5</quote>意味着一组目录条目和属性。现在假定我们从<filename>foo</filename>开始添加和删除文件,然后提交。如果说我们还有<filename>foo</filename>的修订版本5就是一个谎言。然而,如果说我们在提交之后增加了一位<filename>foo</filename>的修订版本号码,这也是一个谎言;<filename>foo</filename>还有一些修改我们没有得到,因为我们还没有更新。"
26669 #. (para)
26670 #: ../source/book.xml:24855
26671 #, fuzzy
26672 msgid "Subversion deals with this problem by quietly tracking committed adds and deletes in the <filename>.svn</filename> area. When you eventually run <command>svn update</command>, all accounts are settled with the repository, and the directory's new revision number is set correctly. <emphasis>Therefore, only after an update is it truly safe to say that you have a <quote>perfect</quote> revision of a directory.</emphasis> Most of the time, your working copy will contain <quote>imperfect</quote> directory revisions."
26673 msgstr "Subversion通过在<filename>.svn</filename>区域偷偷的纪录添加和删除来处理这些问题,当你最后运行<command>svn update</command>,所有的账目会到版本库结算,并且目录的新修订版本号会正确设置。<emphasis>因此,只有在更新之后才可以真正安全地说我们有了一个<quote>完美的</quote>修订版本目录。</emphasis>在大多数时候,你的工作拷贝会保存<quote>不完美的</quote>目录修订版本。"
26675 #. (para)
26676 #: ../source/book.xml:24864
26677 msgid "Similarly, a problem arises if you attempt to commit property changes on a directory. Normally, the commit would bump the working directory's local revision number. But again, that would be a lie, because there may be adds or deletes that the directory doesn't yet have, because no update has happened. <emphasis>Therefore, you are not allowed to commit property-changes on a directory unless the directory is up-to-date.</emphasis>"
26678 msgstr "同样的,如果你尝试提交目录的属性修改会有一个问题,通常情况下,提交应该会提高工作目录的本地修订版本号,但是再一次,这还是一个谎言,因为这个目录还没有添加和删除发生,因为还没有更新发生。<emphasis>因此,在你的目录不是最新的时候不允许你提交属性修改。</emphasis>"
26680 #. (para)
26681 #: ../source/book.xml:24872
26682 msgid "For more discussion about the limitations of directory versioning, see <xref linkend=\"svn.basic.in-action.mixedrevs\"/>."
26683 msgstr "关于目录版本的更多讨论见<xref linkend=\"svn.basic.in-action.mixedrevs\"/>。"
26685 #. (title)
26686 #: ../source/book.xml:24880
26687 msgid "More Disconnected Operations"
26688 msgstr "更多离线操作"
26690 #. (para)
26691 #: ../source/book.xml:24882
26692 msgid "In recent years, disk space has become outrageously cheap and abundant, but network bandwidth has not. Therefore, the Subversion working copy has been optimized around the scarcer resource."
26693 msgstr "近些年来,磁盘空间变得异常便宜和丰富,但是网络带宽还没有,因此Subversion工作拷贝为紧缺资源进行了优化。"
26695 #. (para)
26696 #: ../source/book.xml:24886
26697 #, fuzzy
26698 msgid "The <filename>.svn</filename> administrative directory serves the same purpose as the <filename>CVS</filename> directory, except that it also stores read-only, <quote>pristine</quote> copies of your files. This allows you to do many things off-line:"
26699 msgstr "<filename>.svn</filename>管理目录维护者与<filename>CVS</filename>同样的功能,除了它还保存了只读的文件<quote>原始</quote>拷贝,这允许你做许多离线操作:"
26701 #. (para)
26702 #: ../source/book.xml:24897
26703 msgid "Shows you any local changes you've made (see <xref linkend=\"svn.tour.cycle.examine.status\"/>)"
26704 msgstr "显示你所做的本地修改(见<xref linkend=\"svn.tour.cycle.examine.status\"/>)"
26706 #. (para)
26707 #: ../source/book.xml:24905
26708 msgid "Shows you the details of your changes (see <xref linkend=\"svn.tour.cycle.examine.diff\"/>)"
26709 msgstr "显示修改的详细信息(见see <xref linkend=\"svn.tour.cycle.examine.diff\"/>)"
26711 #. (para)
26712 #: ../source/book.xml:24913
26713 msgid "Removes your local changes (see <xref linkend=\"svn.tour.cycle.revert\"/>)"
26714 msgstr "删除你的本地修改(见<xref linkend=\"svn.tour.cycle.revert\"/>)"
26716 #. (para)
26717 #: ../source/book.xml:24917
26718 msgid "Also, the cached pristine files allow the Subversion client to send differences when committing, which CVS cannot do."
26719 msgstr "另外,原始文件的缓存允许Subversion客户端在提交时只提交区别,这是CVS做不到的。"
26721 #. (para)
26722 #: ../source/book.xml:24919
26723 #, fuzzy
26724 msgid "The last subcommand in the list is new; it will not only remove local changes, but it will un-schedule operations such as adds and deletes. It's the preferred way to revert a file; running <command>rm file; svn update</command> will still work, but it blurs the purpose of updating. And, while we're on this subject…"
26725 msgstr "列表中最后一个子命令是新的;它不仅仅删除本地修改,也会取消如增加和删除的预定操作,这是恢复文件推荐的方式;运行<command>rm file; svn update</command>还可以工作,但是这样侮辱了更新操作的作用,而且,我们在这个主题…"
26727 #. (title)
26728 #: ../source/book.xml:24933
26729 msgid "Distinction Between Status and Update"
26730 msgstr "区分状态和更新"
26732 #. (para)
26733 #: ../source/book.xml:24935
26734 #, fuzzy
26735 msgid "In Subversion, we've tried to erase a lot of the confusion between the <command>cvs status</command> and <command>cvs update</command> commands."
26736 msgstr "在Subversion,我们已经设法抹去<command>cvs status</command>和<command>cvs update</command>之间的混乱。"
26738 #. (para)
26739 #: ../source/book.xml:24938
26740 #, fuzzy
26741 msgid "The <command>cvs status</command> command has two purposes: first, to show the user any local modifications in the working copy, and second, to show the user which files are out-of-date. Unfortunately, because of CVS's hard-to-read status output, many CVS users don't take advantage of this command at all. Instead, they've developed a habit of running <command>cvs update</command> or <command>cvs -n update</command> to quickly see their changes. If users forget to use the <option>-n</option> option, this has the side effect of merging repository changes they may not be ready to deal with."
26742 msgstr "<command>cvs status</command>命令有两个目的:第一,显示用户在工作拷贝的所有本地修改,第二,显示给用户哪些文件是最新的。很不幸,因为CVS难以阅读的状态输出,许多CVS用户并没有充分利用这个命令的好处。相反,他们慢慢习惯运行<command>cvs update</command>或<command>cvs -n update</command>来快速查看区别,如果用户忘记使用<option>-n</option>选项,副作用就是将还没有准备好处理的版本库修改合并到工作拷贝。"
26744 #. (para)
26745 #: ../source/book.xml:24949
26746 #, fuzzy
26747 msgid "With Subversion, we've tried to remove this muddle by making the output of <command>svn status</command> easy to read for both humans and parsers. Also, <command>svn update</command> only prints information about files that are updated, <emphasis>not</emphasis> local modifications."
26748 msgstr "对于Subversion,我们通过修改<command>svn status</command>的输出使之同时满足阅读和解析的需要来努力消除这种混乱,同样,<command>svn update</command>只会打印将要更新的文件信息,而<emphasis>不是</emphasis>本地修改。"
26750 #. (title)
26751 #: ../source/book.xml:24956
26752 msgid "Status"
26753 msgstr "状态"
26755 #. (para)
26756 #: ../source/book.xml:24958
26757 #, fuzzy
26758 msgid "<command>svn status</command> prints all files that have local modifications. By default, the repository is not contacted. While this subcommand accepts a fair number of options, the following are the most commonly used ones:"
26759 msgstr "<command>svn status</command>打印所有本地修改的文件,缺省情况下,不会联系版本库,然而这个命令接受一些选项,如下是一些最常用的:"
26761 #. (option)
26762 #: ../source/book.xml:24965
26763 msgid "-u"
26764 msgstr "-u"
26766 #. (para)
26767 #: ../source/book.xml:24968
26768 msgid "Contact the repository to determine, and then display, out-of-dateness information."
26769 msgstr "访问版本库检测并显示过期的信息。"
26771 #. (option)
26772 #: ../source/book.xml:24974
26773 msgid "-v"
26774 msgstr "-v"
26776 #. (para)
26777 #: ../source/book.xml:24977
26778 msgid "Show <emphasis>all</emphasis> entries under version control."
26779 msgstr "显示<emphasis>所有</emphasis>版本控制下的文件。"
26781 #. (option)
26782 #: ../source/book.xml:24983
26783 msgid "-N"
26784 msgstr "-N"
26786 #. (para)
26787 #: ../source/book.xml:24986
26788 msgid "Run non-recursively (do not descend into subdirectories)."
26789 msgstr "非递归方式运行(不会访问子目录)。"
26791 #. (para)
26792 #: ../source/book.xml:24991
26793 #, fuzzy
26794 msgid "The <command>status</command> command has two output formats. In the default <quote>short</quote> format, local modifications look like this:"
26795 msgstr "<command>status</command>命令有两种输出格式,缺省是<quote>短</quote>格式,本地修改像这样:"
26797 #. (screen)
26798 #: ../source/book.xml:24994
26799 #, no-wrap
26800 msgid ""
26801 "\n"
26802 "$ svn status\n"
26803 "M      foo.c\n"
26804 "M      bar/baz.c\n"
26805 msgstr ""
26806 "\n"
26807 "$ svn status\n"
26808 "M      foo.c\n"
26809 "M      bar/baz.c\n"
26811 #. (para)
26812 #: ../source/book.xml:24999
26813 #, fuzzy
26814 msgid "If you specify the <option>--show-updates</option> (<option>-u</option>) option, a longer output format is used:"
26815 msgstr "如果你指定<option>--show-updates</option>(<option>-u</option>)选项,就会使用较长的格式输出:"
26817 #. (screen)
26818 #: ../source/book.xml:25002
26819 #, no-wrap
26820 msgid ""
26821 "\n"
26822 "$ svn status -u\n"
26823 "M            1047   foo.c\n"
26824 "       *     1045   faces.html\n"
26825 "       *            bloo.png\n"
26826 "M            1050   bar/baz.c\n"
26827 "Status against revision:   1066\n"
26828 msgstr ""
26829 "\n"
26830 "$ svn status -u\n"
26831 "M            1047   foo.c\n"
26832 "       *     1045   faces.html\n"
26833 "       *            bloo.png\n"
26834 "M            1050   bar/baz.c\n"
26835 "Status against revision:   1066\n"
26837 #. (para)
26838 #: ../source/book.xml:25010
26839 #, fuzzy
26840 msgid "In this case, two new columns appear. The second column contains an asterisk if the file or directory is out-of-date. The third column shows the working-copy's revision number of the item. In the example above, the asterisk indicates that <filename>faces.html</filename> would be patched if we updated, and that <filename>bloo.png</filename> is a newly added file in the repository. (The absence of any revision number next to <filename>bloo.png</filename> means that it doesn't yet exist in the working copy.)"
26841 msgstr "在这个例子里,出现了两列,第二列的星号表示了文件或目录是否过期,第三列显示了工作拷贝修订版本号,在上面的例子里,星号表示如果进行更新,<filename>faces.html</filename>会被合并,而<filename>bloo.png</filename>则是版本库新加的文件。(<filename>bloo.png</filename>前面的修订版本号为空表示了这个文件在工作拷贝已经不存在了。)"
26843 #. ###TODO describe -v here as well as -uv. -u and -v use
26844 #.            different <quote>long</quote> formats and need to be
26845 #.            documented separately.  Moreover, as you can combine -u and
26846 #.            -v, it needs to be explained what each of them does.  As -u is
26847 #.            much more important than -v, and the example following that
26848 #.            paragraph *is* about -u, not -v, my patch concentrated on
26849 #.            that.
26850 #. (para)
26851 #: ../source/book.xml:25026
26852 msgid "At this point, you should take a quick look at the list of all possible status codes in <xref linkend=\"svn.ref.svn.c.status\"/>. Here are a few of the more common status codes you'll see:"
26853 msgstr "此刻,你必须赶快看一下<xref linkend=\"svn.ref.svn.c.status\"/>中所说的可能属性代码,下面是一些你会看到的常用状态代码:"
26855 #. (screen)
26856 #: ../source/book.xml:25030
26857 #, no-wrap
26858 msgid ""
26859 "\n"
26860 "A    Resource is scheduled for Addition\n"
26861 "D    Resource is scheduled for Deletion\n"
26862 "M    Resource has local Modifications\n"
26863 "C    Resource has Conflicts (changes have not been completely merged\n"
26864 "       between the repository and working copy version)\n"
26865 "X    Resource is eXternal to this working copy (may come from another\n"
26866 "       repository).  See <xref linkend=\"svn.advanced.externals\"></xref>\n"
26867 "?    Resource is not under version control\n"
26868 "!    Resource is missing or incomplete (removed by another tool than\n"
26869 "       Subversion)\n"
26870 msgstr ""
26871 "\n"
26872 "A    Resource is scheduled for Addition\n"
26873 "D    Resource is scheduled for Deletion\n"
26874 "M    Resource has local Modifications\n"
26875 "C    Resource has Conflicts (changes have not been completely merged\n"
26876 "       between the repository and working copy version)\n"
26877 "X    Resource is eXternal to this working copy (may come from another\n"
26878 "       repository).  See <xref linkend=\"svn.advanced.externals\"></xref>\n"
26879 "?    Resource is not under version control\n"
26880 "!    Resource is missing or incomplete (removed by another tool than\n"
26881 "       Subversion)\n"
26883 #. (para)
26884 #: ../source/book.xml:25042
26885 #, fuzzy
26886 msgid "For a more detailed discussion of <command>svn status</command>, see <xref linkend=\"svn.tour.cycle.examine.status\"/>."
26887 msgstr "关于<command>svn status</command>的详细讨论,见<xref linkend=\"svn.tour.cycle.examine.status\"/>。"
26889 #. (title)
26890 #: ../source/book.xml:25047
26891 msgid "Update"
26892 msgstr "更新"
26894 #. (para)
26895 #: ../source/book.xml:25049
26896 #, fuzzy
26897 msgid "<command>svn update</command> updates your working copy, and only prints information about files that it updates."
26898 msgstr "<command>svn update</command>会更新你的工作拷贝,只打印这次更新的文件。"
26900 #. (para)
26901 #: ../source/book.xml:25051
26902 #, fuzzy
26903 msgid "Subversion has combined the CVS <literal>P</literal> and <literal>U</literal> codes into just <literal>U</literal>. When a merge or conflict occurs, Subversion simply prints <literal>G</literal> or <literal>C</literal>, rather than a whole sentence about it."
26904 msgstr "Subversion将CVS的<literal>P</literal>和<literal>U</literal>合并为<literal>U</literal>,当合并或冲突发生时,Subversion会简单的打印<literal>G</literal>或<literal>C</literal>,而不是大段相关内容。"
26906 #. (para)
26907 #: ../source/book.xml:25056
26908 #, fuzzy
26909 msgid "For a more detailed discussion of <command>svn update</command>, see <xref linkend=\"svn.tour.cycle.update\"/>."
26910 msgstr "关于<command>svn update</command>的详细讨论,见<xref linkend=\"svn.tour.cycle.update\"/>。"
26912 #. (title)
26913 #: ../source/book.xml:25065
26914 msgid "Branches and Tags"
26915 msgstr "分支和标签"
26917 #. (para)
26918 #: ../source/book.xml:25067
26919 msgid "Subversion doesn't distinguish between filesystem space and <quote>branch</quote> space; branches and tags are ordinary directories within the filesystem. This is probably the single biggest mental hurdle a CVS user will need to climb. Read all about it in <xref linkend=\"svn.branchmerge\"/>."
26920 msgstr "Subversion不区分文件系统空间和<quote>分支</quote>空间;分支和标签都是普通的文件系统目录,这恐怕是CVS用户需要逾越的最大心理障碍,所有信息在<xref linkend=\"svn.branchmerge\"/>。"
26922 #. (para)
26923 #: ../source/book.xml:25082
26924 msgid "That is, providing you don't run out of disk space before your checkout finishes."
26925 msgstr "如果在检出完成之前没有消耗完磁盘空间的话。"
26927 #. (para)
26928 #: ../source/book.xml:25073
26929 #, fuzzy
26930 msgid "Since Subversion treats branches and tags as ordinary directories, always remember to check out the <literal>trunk</literal> (<literal>http://svn.example.com/repos/calc/trunk/</literal>) of your project, and not the project itself (<literal>http://svn.example.com/repos/calc/</literal>). If you make the mistake of checking out the project itself, you'll wind up with a working copy that contains a copy of your project for every branch and tag you have.<placeholder-1/>"
26931 msgstr "因为Subversion把分支和标签看作普通目录看待,一直要记住检出项目的<literal>trunk</literal>(<literal>http://svn.example.com/repos/calc/trunk/</literal>),而不是项目本身的(<literal>http://svn.example.com/repos/calc/</literal>)。如果你错误的检出了项目本身,你会紧张的发现你的项目拷贝包含了所有的分支和标签。<placeholder-1/>"
26933 #. (title)
26934 #: ../source/book.xml:25092
26935 msgid "Metadata Properties"
26936 msgstr "元数据属性"
26938 #. (para)
26939 #: ../source/book.xml:25094
26940 msgid "A new feature of Subversion is that you can attach arbitrary metadata (or <quote>properties</quote>) to files and directories. Properties are arbitrary name/value pairs associated with files and directories in your working copy."
26941 msgstr "Subversion的一个新特性就是你可以对文件和目录任意附加元数据(或者是<quote>属性</quote>),属性是关联在工作拷贝文件或目录的任意名称/值对。"
26943 #. (para)
26944 #: ../source/book.xml:25099
26945 #, fuzzy
26946 msgid "To set or get a property name, use the <command>svn propset</command> and <command>svn propget</command> subcommands. To list all properties on an object, use <command>svn proplist</command>."
26947 msgstr "为了设置或得到一个属性名称,使用<command>svn propset</command>和<command>svn propget</command>子命令,列出对象所有的属性,使用<command>svn proplist</command>。"
26949 #. (para)
26950 #: ../source/book.xml:25103
26951 msgid "For more information, see <xref linkend=\"svn.advanced.props\"/>."
26952 msgstr "更多信息见<xref linkend=\"svn.advanced.props\"/>。"
26954 #. (title)
26955 #: ../source/book.xml:25110
26956 msgid "Conflict Resolution"
26957 msgstr "解决冲突"
26959 #. (para)
26960 #: ../source/book.xml:25112
26961 #, fuzzy
26962 msgid "CVS marks conflicts with in-line <quote>conflict markers</quote>, and prints a <literal>C</literal> during an update. Historically, this has caused problems, because CVS isn't doing enough. Many users forget about (or don't see) the <literal>C</literal> after it whizzes by on their terminal. They often forget that the conflict-markers are even present, and then accidentally commit files containing conflict-markers."
26963 msgstr "CVS使用内联<quote>冲突标志</quote>来标记冲突,并且在更新时打印<literal>C</literal>。历史上讲,这导致了许多问题,因为CVS做得还不够。许多用户在它们快速闪过终端时忘记(或没有看到)<literal>C</literal>,即使出现了冲突标记,他们也经常忘记,然后提交了带有冲突标记的文件。"
26965 #. (para)
26966 #: ../source/book.xml:25120
26967 #, fuzzy
26968 msgid "Subversion solves this problem by making conflicts more tangible. It remembers that a file is in a state of conflict, and won't allow you to commit your changes until you run <command>svn resolved</command>. See <xref linkend=\"svn.tour.cycle.resolve\"/> for more details."
26969 msgstr "Subversion通过让冲突更明显来解决这个问题,它记住一个文件是处于冲突状态,在你运行<command>svn resolved</command>之前不会允许你提交修改,详情见<xref linkend=\"svn.tour.cycle.resolve\"/>。"
26971 #. (title)
26972 #: ../source/book.xml:25130
26973 msgid "Binary Files and Translation"
26974 msgstr "二进制文件和行结束标记转换"
26976 #. (para)
26977 #: ../source/book.xml:25132
26978 msgid "In the most general sense, Subversion handles binary files more gracefully than CVS does. Because CVS uses RCS, it can only store successive full copies of a changing binary file. Subversion, however, expresses differences between files using a binary-differencing algorithm, regardless of whether they contain textual or binary data. That means that all files are stored differentially (compressed) in the repository."
26979 msgstr "在大多数情况下,Subversion比CVS更好的处理二进制文件,因为CVS使用RCS,它只可以存储二进制文件的完整拷贝,但是,Subversion使用二进制区别算法来表示文件的区别,而不管文件是文本文件还是二进制文件。这意味着所有的文件是以微分的(压缩的)形式存放在版本库。"
26981 #. (para)
26982 #: ../source/book.xml:25139
26983 msgid "CVS users have to mark binary files with <option>-kb</option> flags, to prevent data from being garbled (due to keyword expansion and line-ending translations). They sometimes forget to do this."
26984 msgstr "CVS用户需要使用<option>-kb</option>选项来标记二进制文件,防止数据的混淆(因为关键字解释和行结束转化),他们有时候会忘记这样做。"
26986 #. (para)
26987 #: ../source/book.xml:25143
26988 msgid "Subversion takes the more paranoid route—first, it never performs any kind of keyword or line-ending translation unless you explicitly ask it do so (see <xref linkend=\"svn.advanced.props.special.keywords\"/> and <xref linkend=\"svn.advanced.props.special.eol-style\"/> for more details). By default, Subversion treats all file data as literal byte strings, and files are always stored in the repository in an untranslated state."
26989 msgstr "Subversion使用更加异想天开的方法—第一,如果你不明确的告诉它(详情见<xref linkend=\"svn.advanced.props.special.keywords\"/>和<xref linkend=\"svn.advanced.props.special.eol-style\"/>)这样做,它不会做任何关键字或行结束转化的操作,缺省情况下Subversion会把所有的数据看作字节串,所有的储存在版本库的文件都处于未转化的状态。"
26991 #. (para)
26992 #: ../source/book.xml:25149
26993 #, fuzzy
26994 msgid "Second, Subversion maintains an internal notion of whether a file is <quote>text</quote> or <quote>binary</quote> data, but this notion is <emphasis>only</emphasis> extant in the working copy. During an <command>svn update</command>, Subversion will perform contextual merges on locally modified text files, but will not attempt to do so for binary files."
26995 msgstr "第二,Subversion维护了一个内部的概念来区别一个文件是<quote>文本</quote>还是<quote>二进制</quote>文件,但这个概念<emphasis>只</emphasis>在工作拷贝非常重要,在<command>svn update</command>,Subversion会对本地修改的文本文件执行上下文的合并,但是对二进制文件不会。"
26997 #. (para)
26998 #: ../source/book.xml:25155
26999 #, fuzzy
27000 msgid "To determine whether a contextual merge is possible, Subversion examines the <literal>svn:mime-type</literal> property. If the file has no <literal>svn:mime-type</literal> property, or has a mime-type that is textual (e.g. <literal>text/*</literal>), Subversion assumes it is text. Otherwise, Subversion assumes the file is binary. Subversion also helps users by running a binary-detection algorithm in the <command>svn import</command> and <command>svn add</command> commands. These commands will make a good guess and then (possibly) set a binary <literal>svn:mime-type</literal> property on the file being added. (If Subversion guesses wrong, the user can always remove or hand-edit the property.)"
27001 msgstr "为了检测一个上下文的合并是可能的,Subversion检测<literal>svn:mime-type</literal>属性,如果没有<literal>svn:mime-type</literal>属性,或者这个属性是文本的(例如<literal>text/*</literal>),Subversion会假定它是文本的,否则Subversion认为它是二进制文件。Subversion也会在<command>svn import</command>和<command>svn add</command>命令时通过运行一个二进制检测算法来帮助用户。这些命令会做出很好的猜测,然后(如果可能)设置添加文件的<literal>svn:mime-type</literal>属性。(如果Subversion猜测错误,用户可以删除或手工编辑这个属性。)"
27003 #. (title)
27004 #: ../source/book.xml:25174
27005 msgid "Versioned Modules"
27006 msgstr "版本化的模块"
27008 #. (para)
27009 #: ../source/book.xml:25176
27010 #, fuzzy
27011 msgid "Unlike CVS, a Subversion working copy is aware that it has checked out a module. That means that if somebody changes the definition of a module (e.g. adds or removes components), then a call to <command>svn update</command> will update the working copy appropriately, adding and removing components."
27012 msgstr "不像CVS,Subversion工作拷贝会意识到它检出了一个模块,这意味着如果有人修改了模块的定义(例如添加和删除组件),然后一个对<command>svn update</command>的调用会适当的更新工作拷贝,添加或删除组件。"
27014 #. (para)
27015 #: ../source/book.xml:25181
27016 msgid "Subversion defines modules as a list of directories within a directory property: see <xref linkend=\"svn.advanced.externals\"/>."
27017 msgstr "Subversion定义了模块作为一个目录属性的目录列表:见<xref linkend=\"svn.advanced.externals\"/>。"
27019 #. (title)
27020 #: ../source/book.xml:25189
27021 msgid "Authentication"
27022 msgstr "认证"
27024 #. (para)
27025 #: ../source/book.xml:25191
27026 #, fuzzy
27027 msgid "With CVS's pserver, you are required to <quote>login</quote> to the server before any read or write operation—you sometimes even have to login for anonymous operations. With a Subversion repository using Apache <command>httpd</command> or <command>svnserve</command> as the server, you don't provide any authentication credentials at the outset—if an operation that you perform requires authentication, the server will challenge you for your credentials (whether those credentials are username and password, a client certificate, or even both). So if your repository is world-readable, you will not be required to authenticate at all for read operations."
27028 msgstr "通过CVS的pserver,你需要在读写操作之前<quote>登陆</quote>到服务器—即使是匿名操作。Subversion版本库使用Apache的<command>httpd</command>或<command>svnserve</command>作为服务器,你不需要开始时提供认证凭证—如果一个操作需要认证,服务器会要求你的凭证(不管这凭证是用户名与密码,客户证书还是两个都有)。所以如果你的工作拷贝是全局可读的,在所有的读操作中不需要任何认证。"
27030 #. (para)
27031 #: ../source/book.xml:25203
27032 #, fuzzy
27033 msgid "As with CVS, Subversion still caches your credentials on disk (in your <filename>~/.subversion/auth/</filename> directory) unless you tell it not to by using the <option>--no-auth-cache</option> option."
27034 msgstr "相对于CVS,Subversion会一直在磁盘(在你的<filename>~/.subversion/auth/</filename>目录)缓存凭证,除非你通过<option>--no-auth-cache</option>选项告诉它不这样做。"
27036 #. (para)
27037 #: ../source/book.xml:25207
27038 #, fuzzy
27039 msgid "The exception to this behavior, however, is in the case of accessing an <command>svnserve</command> server over an SSH tunnel, using the <literal>svn+ssh://</literal> URL scheme. In that case, the <command>ssh</command> program unconditionally demands authentication just to start the tunnel."
27040 msgstr "这个行为也有例外,当使用SSH管道的<command>svnserve</command>服务器时,使用<literal>svn+ssh://</literal>的URL模式这种情况下,<command>ssh</command>会在通道刚开始时无条件的要求认证。"
27042 #. (title)
27043 #: ../source/book.xml:25218
27044 msgid "Converting a Repository from CVS to Subversion"
27045 msgstr "迁移 CVS 版本库到 Subversion"
27047 #. (para)
27048 #: ../source/book.xml:25220
27049 msgid "Perhaps the most important way to familiarize CVS users with Subversion is to let them continue to work on their projects using the new system. And while that can be somewhat accomplished using a flat import into a Subversion repository of an exported CVS repository, the more thorough solution involves transferring not just the latest snapshot of their data, but all the history behind it as well, from one system to another. This is an extremely difficult problem to solve that involves deducing changesets in the absence of atomicity, and translating between the systems' completely orthogonal branching policies, among other complications. Still, there are a handful of tools claiming to at least partially support the ability to convert existing CVS repositories into Subversion ones."
27050 msgstr "或许让CVS用户熟悉Subversion最好的办法就是让他们的项目继续在新系统下工作,这可以简单得通过平淡的把CVS版本库的导出数据导入到Subversion完成,或者是更加完全的方案,不仅仅包括最新数据快照,还包括所有的历史,从一个系统到另一个系统。这是一个非常困难的问题,包括推导保持原子性的修改集,转化两个系统完全不同的分支政策。但是我们还是有许多工具声称至少部分具备了的转化已存在的CVS版本库为Subversion版本库的能力。"
27052 #. (para)
27053 #: ../source/book.xml:25233
27054 msgid "The most popular (and likely the most mature) conversion tool is cvs2svn (<uri href=\"http://cvs2svn.tigris.org/\">http://cvs2svn.tigris.org/</uri>), a Python script originally created by members of Subversion's own development community. This tool is meant to run exactly once: it scans your CVS repository multiple times and attempts to deduce commits, branches, and tags as best it can. When it finishes, the result is a either a Subversion repository or a portable Subversion dumpfile representing your code's history. See the website for detailed instructions and caveats."
27055 msgstr "最流行的(好像是最成熟的)转化工具是cvs2svn(<uri href=\"http://cvs2svn.tigris.org/\">http://cvs2svn.tigris.org/</uri>),它是最初由Subversion自己的开发社区成员开发的一个Python脚本:它会多次扫描你的CVS版本库,并尽可能尝试推断提交,分支和标签,当它结束时,结果是可以代表代码历史的Subversion版本库或可移植的Subversion转储文件,关于指令和警告的详细信息可以看网站。"
27057 #. (title)
27058 #: ../source/book.xml:25251
27059 msgid "WebDAV and Autoversioning"
27060 msgstr "WebDAV 和自动版本"
27062 #. (para)
27063 #: ../source/book.xml:25253
27064 msgid "WebDAV is an extension to HTTP, and is growing more and more popular as a standard for file-sharing. Today's operating systems are becoming extremely Web-aware, and many now have built-in support for mounting <quote>shares</quote> exported by WebDAV servers."
27065 msgstr "WebDAV是HTTP的一个扩展,作为一个文件共享的标准不断发展。当今的操作系统变得极端的web化,许多内置了对装配WebDAV服务器导出的<quote>共享</quote>的支持。"
27067 #. (para)
27068 #: ../source/book.xml:25258
27069 msgid "If you use Apache as your Subversion network server, then to some extent you are also running a WebDAV server. This appendix gives some background on the nature of this protocol, how Subversion uses it, and how well Subversion interoperates with other software that is WebDAV-aware."
27070 msgstr "如果你使用Apache/mod_dav_svn作为你的Subversion网络服务器,某种程度上,你也是在运行一个WebDAV服务器。这个附录提供了这种协议一些背景知识,Subversion如何使用它,Subversion如何和认识WebDAV的软件交互工作。"
27072 #. (title)
27073 #: ../source/book.xml:25268
27074 msgid "What is WebDAV?"
27075 msgstr "什么是 WebDAV ?"
27077 #. (para)
27078 #: ../source/book.xml:25270
27079 msgid "<firstterm>DAV</firstterm> stands for <quote>Distributed Authoring and Versioning</quote>. RFC 2518 defines a set of concepts and accompanying extension methods to HTTP 1.1 that make the web into a more universal read/write medium. The basic idea is that a WebDAV-compliant web server can act like a generic file server; clients can <quote>mount</quote> shared folders over HTTP that behave much like other network filesystems (such as NFS or SMB.)"
27080 msgstr "<firstterm>DAV</firstterm>的意思是<quote>Distributed Authoring and Versioning</quote>。RFC 2518为HTTP 1.1定义了一组概念和附加扩展方法来把web变成一个更加普遍的读/写媒体,基本思想是一个WebDAV兼容的web服务器可以像普通的文件服务器一样工作;客户端可以通过HTTP装配类似于NFS或SMB的WebDAV共享文件夹。"
27082 #. (para)
27083 #: ../source/book.xml:25278
27084 msgid "The tragedy, though, is that despite the acronym, the RFC specification doesn't actually describe any sort of version control. Basic WebDAV clients and servers assume only one version of each file or directory exists, and can be repeatedly overwritten."
27085 msgstr "悲惨的是,RFC规范并没有提供任何版本控制模型。基本的DAV客户端和服务器只是假定每个文件或目录只有一个版本存在,可以重复的覆盖。"
27087 #. (para)
27088 #: ../source/book.xml:25283
27089 msgid "Because RFC 2518 left out versioning concepts, another committee was left with the responsibility of writing RFC 3253 a few years later. The new RFC adds versioning concepts to WebDAV, placing the <quote>V</quote> back in <quote>DAV</quote> — hence the term <quote>DeltaV</quote>. WebDAV/DeltaV clients and servers are often called just <quote>DeltaV</quote> programs, since DeltaV implies the existence of basic WebDAV."
27090 msgstr "因为RFC 2518漏下了版本概念,几年之后,另一个委员会留下来负责撰写RFC 3253来添加WebDAV的版本化,也就是<quote>DeltaV</quote>。WebDAV/DeltaV客户端和服务器经常叫做<quote>DeltaV</quote>客户端和服务器,因为DeltaV暗含了基本的WebDAV。"
27092 #. (para)
27093 #: ../source/book.xml:25291
27094 #, fuzzy
27095 msgid "The original WebDAV standard has been widely successful. Every modern computer operating system has a general WebDAV client built-in (details to follow), and a number of popular standalone applications are also able to speak WebDAV— Microsoft Office, Dreamweaver, and Photoshop to name a few. On the server end, the Apache webserver has been able to provide WebDAV services since 1998 and is considered the de-facto open-source standard. There are several other commercial WebDAV servers available, including Microsoft's own IIS."
27096 msgstr "最初的WebDAV标准得到了广泛的成功,所有的现代操作系统拥有内置的(后面有详细资料)对普通WebDAV的支持,许多流行的应用程序也可以使用WebDAV—Microsoft Office,Dreamweaver和Photoshop。在服务器方面,Apache从1998年就开始支持WebDAV,并被认为是一个事实上的开源标准,也有许多商业的WebDAV服务器,例如Microsoft的IIS。"
27098 #. (para)
27099 #: ../source/book.xml:25300
27100 #, fuzzy
27101 msgid "DeltaV, unfortunately, has not been so successful. It's very difficult to find any DeltaV clients or servers. The few that do exist are relatively unknown commercial products, and thus it's very difficult to test interoperability. It's not entirely clear as to why DeltaV has remained stagnant. Some argue that the specification is just too complex, others argue that while WebDAV's features have mass appeal (even the least technical users appreciate network file-sharing), version control features aren't interesting or necessary for most users. Finally, some have argued that DeltaV remains unpopular because there's still no open-source server product which implements it well."
27102 msgstr "不幸的是,DeltaV没有这样的成功,很难寻找到任何DeltaV客户端和服务器。只有一些不太出名的商业产品,因此很难测试交互性,不清楚为什么DeltaV还这样停滞,一些人说规范太复杂了,还有些人认为尽管DeltaV的特性有很大的吸引力(即使最新的技术用户也喜欢使用网络文件共享),版本控制特性对大多数用户还不是这样有趣和必须。最后,有些人认为DeltaV还这样不流行主要是因为一直没有开源的服务器产品实现它。"
27104 #. (para)
27105 #: ../source/book.xml:25312
27106 #, fuzzy
27107 msgid "When Subversion was still in its design phase, it seemed like a great idea to use Apache as a network server. It already had a module to provide WebDAV services. DeltaV was a relatively new specification. The hope was that the Subversion server module (<command>mod_dav_svn</command>) would eventually evolve into an open-source DeltaV reference implementation. Unfortunately, DeltaV has a very specific versioning model that doesn't quite line up with Subversion's model. Some concepts were mappable, others were not."
27108 msgstr "当Subversion还在设计阶段时,使用Apache的httpd作为主要网络服务器就是一个很好的想法,已经有了支持WebDAV服务的模块。DeltaV有一个很新的规范,希望就是Subversion服务器模块最终能够成为一个开源的DeltaV参考实现,但非常不幸,DeltaV得版本模型过于详细,与Subversion的模型并不匹配,虽然有些概念可以对应起来,但有些则不能。"
27110 #. (para)
27111 #: ../source/book.xml:25321
27112 msgid "What does this mean, then?"
27113 msgstr "这是什么意思呢?"
27115 #. (para)
27116 #: ../source/book.xml:25322
27117 #, fuzzy
27118 msgid "First, the Subversion client is not a fully-implemented DeltaV client. It needs certain types of things from the server that DeltaV itself cannot provide, and thus is largely dependent on a number of Subversion-specific HTTP <literal>REPORT</literal> requests that only <command>mod_dav_svn</command> understands."
27119 msgstr "首先,Subversion客户端不是一个完全实现的DeltaV客户端,它需要从服务器得到DeltaV不能提供的东西,因此非常依赖于只有mod_dav_svn理解的Subversion特定的<literal>REPORT</literal>请求。"
27121 #. (para)
27122 #: ../source/book.xml:25328
27123 #, fuzzy
27124 msgid "Second, <command>mod_dav_svn</command> is not a fully-realized DeltaV server. Many portions of the DeltaV specification were irrelevant to Subversion, and thus left unimplemented."
27125 msgstr "其次,<command>mod_dav_svn</command>不是一个完全的DeltaV服务,许多与Subversion不相关的DeltaV规范还没有实现。"
27127 #. (para)
27128 #: ../source/book.xml:25332
27129 #, fuzzy
27130 msgid "There is still some debate in the developer community as to whether or not it's worthwhile to remedy either of these situations. It's fairly unrealistic to change Subversion's design to match DeltaV, so there's probably no way the client can ever learn to get everything it needs from a general DeltaV server. On the other hand, <command>mod_dav_svn</command><emphasis>could</emphasis> be further developed to implement all of DeltaV, but it's hard to find motivation to do so—there are almost no DeltaV clients to interoperate with."
27131 msgstr "在开发者社区一直有这样的讨论,是否值得弥补这种形势。改变Subversion的设计来匹配DeltaV看起来并不现实,所以可能没有办法让客户端从普通的DeltaV服务器上得到所有的东西。另一方面,mod_dav_svn<emphasis>可以</emphasis>继续开发来实现所有的DeltaV,但缺乏这样做的动力—几乎没有能与之交户的DeltaV客户端。"
27133 #. (title)
27134 #: ../source/book.xml:25348
27135 msgid "Autoversioning"
27136 msgstr "自动版本"
27138 #. (para)
27139 #: ../source/book.xml:25350
27140 msgid "While the Subversion client is not a full DeltaV client, nor the Subversion server a full DeltaV server, there's still a glimmer of WebDAV interoperability to be happy about: it's called autoversioning."
27141 msgstr "因为Subversion客户端不是完整的DeltaV客户端,Subversion服务器也不是完整的DeltaV服务器,但仍有值得高兴的交互特性:叫做自动版本化。"
27143 #. (para)
27144 #: ../source/book.xml:25354
27145 #, fuzzy
27146 msgid "Autoversioning is an optional feature defined in the DeltaV standard. A typical DeltaV server will reject an ignorant WebDAV client attempting to do a <literal>PUT</literal> to a file that's under version control. To change a version-controlled file, the server expects a series of proper versioning requests: something like <literal>MKACTIVITY</literal>, <literal>CHECKOUT</literal>, <literal>PUT</literal>, <literal>CHECKIN</literal>. But if the DeltaV server supports autoversioning, then write-requests from basic WebDAV clients are accepted. The server behaves as if the client <emphasis>had</emphasis> issued the proper series of versioning requests, performing a commit under the hood. In other words, it allows a DeltaV server to interoperate with ordinary WebDAV clients that don't understand versioning."
27147 msgstr "自动版本化是DeltaV标准中的可选特性,一个典型的DeltaV服务器会拒绝一个对版本控制之下文件的<literal>PUT</literal>操作,为了修改一个版本控制下的文件,服务器只会接受一系列正确的版本请求:例如<literal>MKACTIVITY</literal>、<literal>CHECKOUT</literal>、<literal>PUT</literal>和<literal>CHECKIN</literal>。但是如果DeltaV服务器支持自动版本化,服务器可以在后台假装客户端执行了一些列正确的版本请求,也就是说,DeltaV服务器可以与一个对版本化一无所知的普通WebDAV客户端交互。"
27149 #. (para)
27150 #: ../source/book.xml:25368
27151 #, fuzzy
27152 msgid "Because so many operating systems already have integrated WebDAV clients, the use case for this feature can be incredibly appealing to administrators working with non-technical users: imagine an office of ordinary users running Microsoft Windows or Mac OS. Each user <quote>mounts</quote> the Subversion repository, which appears to be an ordinary network folder. They use the shared folder as they always do: open files, edit them, save them. Meanwhile, the server is automatically versioning everything. Any administrator (or knowledgeable user) can still use a Subversion client to search history and retrieve older versions of data."
27153 msgstr "因为有许多操作系统已经集成了WebDAV客户端,这个特性的用例可能是这样的:假设一个办公室有许多使用Microsoft Windows或Mac OS的普通用户,每个用户<quote>装载</quote>了一个Subversion版本库,看起来就是普通的网络共享文件夹。他们像普通目录一样的操作这个目录:打开文件、编辑它们,保存它们。同时,服务器自动的版本化所有的东西,任何管理员(或有知识的用户)可以一直使用Subversion客户端来查询历史来检索旧版本的数据。"
27155 #. (para)
27156 #: ../source/book.xml:25379
27157 #, fuzzy
27158 msgid "This scenario isn't fiction: it's real and it works, as of Subversion 1.2 and later. To activate autoversioning in <command>mod_dav_svn</command>, use the <literal>SVNAutoversioning</literal> directive within the <filename>httpd.conf</filename> Location block, like so:"
27159 msgstr "这个场景不是小说:对于Subversion 1.2来说,是真实的和有效的。为了激活<command>mod_dav_svn</command>的自动版本化,需要使用<filename>httpd.conf</filename>中Location区块的<literal>SVNAutoversioning</literal>指示,例如:"
27161 #. (screen)
27162 #: ../source/book.xml:25385
27163 #, fuzzy, no-wrap
27164 msgid ""
27165 "\n"
27166 "&lt;Location /repos&gt;\n"
27167 "  DAV svn\n"
27168 "  SVNPath /var/svn/repository\n"
27169 "  SVNAutoversioning on\n"
27170 "&lt;/Location&gt;\n"
27171 msgstr ""
27172 "\n"
27173 "&lt;Location /repos&gt;\n"
27174 "  DAV svn\n"
27175 "  SVNPath /path/to/repository\n"
27176 "  SVNAutoversioning on\n"
27177 "&lt;/Location&gt;\n"
27179 #. (para)
27180 #: ../source/book.xml:25392
27181 msgid "When SVNAutoversioning is active, write requests from WebDAV clients result in automatic commits. A generic log message is auto-generated and attached to each revision."
27182 msgstr "当激活了SVNAutoversioning,来自WebDAV的客户端请求会导致自动提交,每个修订版本会自动附加一个原始的日志信息。"
27184 #. (para)
27185 #: ../source/book.xml:25395
27186 #, fuzzy
27187 msgid "Before activating this feature, however, understand what you're getting into. WebDAV clients tend to do <emphasis>many</emphasis> write requests, resulting in a huge number of automatically committed revisions. For example, when saving data, many clients will do a <literal>PUT</literal> of a 0-byte file (as a way of reserving a name) followed by another <literal>PUT</literal> with the real file data. The single file-write results in two separate commits. Also consider that many applications auto-save every few minutes, resulting in even more commits."
27188 msgstr "然而,在激活这个特性之前,需要理解你做的事情。WebDAV会做许多写请求,导致了产生数量<emphasis>非常多</emphasis>的自动提交修订版本。例如,当保存数据,许多客户端会使用一个<literal>PUT</literal>一个0字节的文件,然后紧跟一个<literal>PUT</literal>真实的文件数据。一个单独的文件写操作产生了两个不同的提交。考虑到许多应用程序隔几分钟的自动保存,会产生更多的提交。"
27190 #. (para)
27191 #: ../source/book.xml:25405
27192 #, fuzzy
27193 msgid "If you have a post-commit hook program that sends email, you may want to disable email generation either altogether, or on certain sections of the repository; it depends on whether you think the influx of emails will still prove to be valuable notifications or not. Also, a smart post-commit hook program can distinguish between a transaction created via autoversioning and one created through a normal <command>svn commit</command>. The trick is to look for a revision property named <literal>svn:autoversioned</literal>. If present, the commit was made by a generic WebDAV client."
27194 msgstr "如果你有发送邮件的post-commit钩子程序,例如,你会根据是否有价值来开启和关闭邮件通知,另外,一个聪明的post-commit钩子也应该能够区分自动版本化和<command>svn commit</command>产生的事务。技巧就是检查修订版本的<literal>svn:autoversioned</literal>属性,如果有,则提交来自一个原始的WebDAV客户端。"
27196 #. (para)
27197 #: ../source/book.xml:25415
27198 #, fuzzy
27199 msgid "Another feature that may be a useful complement for <literal>SVNAutoversioning</literal> comes from Apache's <literal>mod_mime</literal> module. If a WebDAV client adds a new file to the repository, there's no opportunity for the user to set the the <literal>svn:mime-type</literal> property. This might cause the file to appear as generic icon when viewed within a WebDAV shared folder, not having an association with any application. One remedy is to have a sysadmin (or other Subversion-knowledgeable person) check out a working copy and manually set the <literal>svn:mime-type</literal> property on necessary files. But there's potentially no end to such cleanup tasks. Instead, you can use the <literal>ModMimeUsePathInfo</literal> directive in your Subversion <literal>&lt;Location&gt;</literal> block:"
27200 msgstr "另一个作为<literal>SVNAutoversioning</literal>特性补充的特性来自Apache的<literal>mod_mime</literal>模块,如果一个原始的WebDAV客户端在版本库添加了一个新文件,用户就没有机会设置<literal>svn:mime-type</literal>属性,这会导致使用WebDAV共享目录查看时会看到原始的图标,而没有关联到任何应用。一个补救办法就是让系统管理员(或其他理解Subversion)的人检出一份工作拷贝,然后为需要的文件手动设置<literal>svn:mime-type</literal>属性,但是这个整理工作永远不会结束,作为替代,你可以在你的Subversion<literal>&lt;Location&gt;</literal>区使用<literal>ModMimeUsePathInfo</literal>指示:"
27202 #. (screen)
27203 #: ../source/book.xml:25430
27204 #, fuzzy, no-wrap
27205 msgid ""
27206 "\n"
27207 "&lt;Location /repos&gt;\n"
27208 "  DAV svn\n"
27209 "  SVNPath /var/svn/repository\n"
27210 "  SVNAutoversioning on\n"
27211 "\n"
27212 "  ModMimeUsePathInfo on\n"
27213 "\n"
27214 "&lt;/Location&gt;\n"
27215 msgstr ""
27216 "\n"
27217 "&lt;Location /repos&gt;\n"
27218 "  DAV svn\n"
27219 "  SVNPath /path/to/repository\n"
27220 "  SVNAutoversioning on\n"
27221 "\n"
27222 "  ModMimeUsePathInfo on\n"
27223 "\n"
27224 "&lt;/Location&gt;\n"
27226 #. (para)
27227 #: ../source/book.xml:25440
27228 #, fuzzy
27229 msgid "This directive allows <literal>mod_mime</literal> to attempt automatic deduction of the mime-type on new files that enter the repository via autoversioning. The module looks at the file's named extension and possibly the contents as well; if the file matches some common patterns, then the the file's <literal>svn:mime-type</literal> property will be set automatically."
27230 msgstr "这个指示允许<literal>mod_mime</literal>在使用自动版本化添加新文件时尝试自动检测新文件的mime-type,这个模块查看文件的扩展名,有可能的话还包括检查内容;如果文件符合某个常用模式,就会自动设置文件的<literal>svn;mime-type</literal>。"
27232 #. (title)
27233 #: ../source/book.xml:25453
27234 msgid "Client Interoperability"
27235 msgstr "客户端交互性"
27237 #. (para)
27238 #: ../source/book.xml:25455
27239 msgid "All WebDAV clients fall into one of three categories—standalone applications, file-explorer extensions, or filesystem implementations. These categories broadly define the types of WebDAV functionality available to users. <xref linkend=\"svn.webdav.clients.tbl-1\"/> gives our categorization and a quick description of some common pieces of WebDAV-enabled software. More details about these software offerings, as well as their general category, can be found in the sections that follow."
27240 msgstr "所有的WebDAV客户端分为三类—独立应用程序,文件浏览器扩展或文件系统实现,这些分类定义了WebDAV用户可用的功能性。<xref linkend=\"svn.webdav.clients.tbl-1\"/>给WebDAV常见软件进行了分类,并提供了的简短描述。"
27242 #. (title)
27243 #: ../source/book.xml:25466
27244 msgid "Common WebDAV Clients"
27245 msgstr "常用 WebDAV 客户端"
27247 #. (entry)
27248 #: ../source/book.xml:25471
27249 msgid "Software"
27250 msgstr "软件"
27252 #. (entry)
27253 #: ../source/book.xml:25472
27254 msgid "Type"
27255 msgstr "类型"
27257 #. (entry)
27258 #: ../source/book.xml:25473
27259 msgid "Windows"
27260 msgstr "Windows"
27262 #. (entry)
27263 #: ../source/book.xml:25474
27264 msgid "Mac"
27265 msgstr "Mac"
27267 #. (entry)
27268 #: ../source/book.xml:25475
27269 msgid "Linux"
27270 msgstr "Linux"
27272 #. (entry)
27273 #: ../source/book.xml:25481
27274 msgid "Adobe Photoshop"
27275 msgstr "Adobe Photoshop"
27277 #. (entry)
27278 #: ../source/book.xml:25482 ../source/book.xml:25491 ../source/book.xml:25500
27279 #: ../source/book.xml:25508 ../source/book.xml:25517
27280 #, fuzzy
27281 msgid "Standalone WebDAV application"
27282 msgstr "独立的 WebDAV 应用程序"
27284 #. (entry)
27285 #: ../source/book.xml:25483 ../source/book.xml:25493 ../source/book.xml:25494
27286 #: ../source/book.xml:25501 ../source/book.xml:25502 ../source/book.xml:25503
27287 #: ../source/book.xml:25509 ../source/book.xml:25518 ../source/book.xml:25528
27288 #: ../source/book.xml:25539 ../source/book.xml:25548 ../source/book.xml:25556
27289 #: ../source/book.xml:25564 ../source/book.xml:25573 ../source/book.xml:25585
27290 msgid "X"
27291 msgstr "X"
27293 #. (entry)
27294 #: ../source/book.xml:25486
27295 msgid "Image editing software, allowing direct opening from, and writing to, WebDAV URLs"
27296 msgstr "图像编辑软件,允许直接从WebDAV的URL打开文件和修改。"
27298 #. (entry)
27299 #: ../source/book.xml:25490
27300 msgid "Cadaver"
27301 msgstr "Cadaver"
27303 #. (entry)
27304 #: ../source/book.xml:25495
27305 msgid "Command-line WebDAV client supporting file transfer, tree, and locking operations"
27306 msgstr "命令行的WebDAV客户端,支持文件传输,目录树显示和锁定操作"
27308 #. (entry)
27309 #: ../source/book.xml:25499
27310 msgid "DAV Explorer"
27311 msgstr "DAV Explorer"
27313 #. (entry)
27314 #: ../source/book.xml:25504
27315 msgid "Java GUI tool for exploring WebDAV shares"
27316 msgstr "浏览 WebDAV 共享的 Java GUI 工具"
27318 #. (entry)
27319 #: ../source/book.xml:25507
27320 msgid "Macromedia Dreamweaver"
27321 msgstr "Macromedia Dreamweaver"
27323 #. (entry)
27324 #: ../source/book.xml:25512
27325 msgid "Web production software able to directly read from and write to WebDAV URLs"
27326 msgstr "Web制作软件,可以直接读写WebDAV的URL"
27328 #. (entry)
27329 #: ../source/book.xml:25516
27330 msgid "Microsoft Office"
27331 msgstr "Microsoft Office"
27333 #. (entry)
27334 #: ../source/book.xml:25521
27335 msgid "Office productivity suite with several components able to directly read from and write to WebDAV URLs"
27336 msgstr "Office上产套件,可以直接读写WebDAV的URL"
27338 #. (entry), (title)
27339 #: ../source/book.xml:25526 ../source/book.xml:25693
27340 msgid "Microsoft Web Folders"
27341 msgstr "Microsoft Web 文件夹"
27343 #. (entry)
27344 #: ../source/book.xml:25527 ../source/book.xml:25536 ../source/book.xml:25545
27345 #, fuzzy
27346 msgid "File-explorer WebDAV extension"
27347 msgstr "文件浏览器 WebDAV 扩展"
27349 #. (entry)
27350 #: ../source/book.xml:25531
27351 msgid "GUI file explorer program able to perform tree operations on a WebDAV share"
27352 msgstr "Novell NetDrive"
27354 #. (entry)
27355 #: ../source/book.xml:25535
27356 msgid "GNOME Nautilus"
27357 msgstr "GNOME Nautilus"
27359 #. (entry)
27360 #: ../source/book.xml:25540 ../source/book.xml:25549
27361 msgid "GUI file explorer able to perform tree operations on a WebDAV share"
27362 msgstr "GUI文件浏览器,可以对WebDAV共享执行目录树操作"
27364 #. (entry)
27365 #: ../source/book.xml:25544
27366 msgid "KDE Konqueror"
27367 msgstr "KDE Konqueror"
27369 #. (entry), (title)
27370 #: ../source/book.xml:25553 ../source/book.xml:25822
27371 msgid "Mac OS X"
27372 msgstr "Mac OS X"
27374 #. (entry), (title)
27375 #: ../source/book.xml:25554 ../source/book.xml:25563 ../source/book.xml:25572
27376 #: ../source/book.xml:25582 ../source/book.xml:25791
27377 msgid "WebDAV filesystem implementation"
27378 msgstr "WebDAV 文件系统实现"
27380 #. (entry)
27381 #: ../source/book.xml:25558
27382 msgid "Operating system has built-in support for mounting WebDAV shares."
27383 msgstr "内置支持加载WebDAV到本地功能的操作系统"
27385 #. (entry)
27386 #: ../source/book.xml:25562
27387 msgid "Novell NetDrive"
27388 msgstr "驱动器映射程序,可以将Windows驱动器加载为远程的WebDAV共享"
27390 #. (entry)
27391 #: ../source/book.xml:25567
27392 msgid "Drive-mapping program for assigning Windows drive letters to a mounted remote WebDAV share"
27393 msgstr "SRT WebDrive"
27395 #. (entry)
27396 #: ../source/book.xml:25571
27397 msgid "SRT WebDrive"
27398 msgstr "文件传输软件,可以将Windows驱动器加载为远程的WebDAV共享"
27400 #. (entry)
27401 #: ../source/book.xml:25576
27402 msgid "File transfer software which, among other things, allows the assignment of Windows drive letters to a mounted remote WebDAV share"
27403 msgstr "一个WebDAV应用就是一个内置WebDAV协议的程序,我们会覆盖大多数支持WebDAV的流行程序。"
27405 #. (entry)
27406 #: ../source/book.xml:25581
27407 msgid "davfs2"
27408 msgstr "davfs2"
27410 #. (entry)
27411 #: ../source/book.xml:25586
27412 msgid "Linux file system driver that allows you to mount a WebDAV share"
27413 msgstr "Linux 文件系统驱动允许加载 WebDAV 共享"
27415 #. (title)
27416 #: ../source/book.xml:25595
27417 msgid "Standalone WebDAV applications"
27418 msgstr "独立的 WebDAV 应用程序"
27420 #. (para)
27421 #: ../source/book.xml:25597
27422 #, fuzzy
27423 msgid "A WebDAV application is a program which speakes WebDAV protocols with a WebDAV server. We'll cover some of the most popular programs with this kind of WebDAV support."
27424 msgstr "Microsoft Office,Dreamweaver,Photoshop"
27426 #. (title)
27427 #: ../source/book.xml:25603
27428 msgid "Microsoft Office, Dreamweaver, Photoshop"
27429 msgstr "Microsoft Office,Dreamweaver,Photoshop"
27431 #. (para)
27432 #: ../source/book.xml:25608
27433 msgid "WebDAV support was removed from Microsoft Access for some reason, but exists in the rest of the Office suite."
27434 msgstr "在Windows下,有一些有名的集成WebDAV客户端功能的软件,例如Microsoft's Office、Adobe的Photoshop和Macromedia的Dreamweaver。它们都可以直接打开和保存URL,也可以在编辑时大量的使用WebDAV的锁定。"
27436 #. (para)
27437 #: ../source/book.xml:25605
27438 msgid "On Windows, there are several well-known applications that contain integrated WebDAV client functionality, such as Microsoft's Office, <placeholder-1/> Adobe's Photoshop, and Macromedia's Dreamweaver programs. They're able to directly open and save to URLs, and tend to make heavy use of WebDAV locks when editing a file."
27439 msgstr "在Windows下,有许多已知的应用程序支持WebDAV客户端功能,例如微软Office,<placeholder-1/>Adobe的Photoshop和Macromedia的Dreamweaver程序,他们可以直接打开和保存URL,并且在编辑文件时经常使用WebDAV的锁。 "
27441 #. (para)
27442 #: ../source/book.xml:25614
27443 #, fuzzy
27444 msgid "Note that while many of these programs also exist for the Mac OS X, they do not appear to support WebDAV directly on that platform. In fact, on Mac OS X, the <guimenu>File-&gt;Open</guimenu> dialog box doesn't allow one to type a path or URL at all. It's likely that the WebDAV features were deliberately left out of Macintosh versions of these programs, since OS X already provides such excellent low-level filesystem support for WebDAV."
27445 msgstr "需要注意尽管这些程序也存在于Mac OS X,但是在这个平台上并不是直接支持WebDAV。实际上在Mac OS X,<guimenu moreinfo=\"none\">File-&gt;Open</guimenu>会离开对应的程序,因为OS X已经实现了底层的文件系统级WebDAV支持。"
27447 #. (title)
27448 #: ../source/book.xml:25626
27449 msgid "Cadaver, DAV Explorer"
27450 msgstr "Cadaver,DAV 浏览器"
27452 #. (para)
27453 #: ../source/book.xml:25628
27454 #, fuzzy
27455 msgid "Cadaver is a bare-bones Unix commandline program for browsing and changing WebDAV shares. Like the Subversion client, it uses the neon HTTP library—not surprisingly, since both neon and cadaver are written by the same author. Cadaver is free software (GPL license) and is available at <uri href=\"http://www.webdav.org/cadaver/\">http://www.webdav.org/cadaver/</uri>."
27456 msgstr "使用cadaver就像使用命令行的FTP程序,因此它很适合基本的WebDAV调试。它可以以压缩方式上传和下载文件,也会检验属性、拷贝、移动、锁定和解锁文件:"
27458 #. (para)
27459 #: ../source/book.xml:25635
27460 msgid "Using cadaver is similar to using a commandline FTP program, and thus it's extremely useful for basic WebDAV debugging. It can be used to upload or download files in a pinch, and also to examine properties, and to copy, move, lock or unlock files:"
27461 msgstr "使用cadaver与命令行FTP程序类似,因此它在基本的WebDAV调试中非常有用,它可以用来在紧急情况下上传或下载文件,也可以用来验证属性,并拷贝、移动、锁定或解锁文件:"
27463 #. (screen)
27464 #: ../source/book.xml:25640
27465 #, no-wrap
27466 msgid ""
27467 "\n"
27468 "$ cadaver http://host/repos\n"
27469 "dav:/repos/&gt; ls\n"
27470 "Listing collection `/repos/': succeeded.\n"
27471 "Coll: &gt; foobar                                 0  May 10 16:19\n"
27472 "      &gt; playwright.el                       2864  May  4 16:18\n"
27473 "      &gt; proofbypoem.txt                     1461  May  5 15:09\n"
27474 "      &gt; westcoast.jpg                      66737  May  5 15:09\n"
27475 "\n"
27476 "dav:/repos/&gt; put README\n"
27477 "Uploading README to `/repos/README':\n"
27478 "Progress: [=============================&gt;] 100.0% of 357 bytes succeeded.\n"
27479 "\n"
27480 "dav:/repos/&gt; get proofbypoem.txt\n"
27481 "Downloading `/repos/proofbypoem.txt' to proofbypoem.txt:\n"
27482 "Progress: [=============================&gt;] 100.0% of 1461 bytes succeeded.\n"
27483 msgstr ""
27484 "\n"
27485 "$ cadaver http://host/repos\n"
27486 "dav:/repos/&gt; ls\n"
27487 "Listing collection `/repos/': succeeded.\n"
27488 "Coll: &gt; foobar                                 0  May 10 16:19\n"
27489 "      &gt; playwright.el                       2864  May  4 16:18\n"
27490 "      &gt; proofbypoem.txt                     1461  May  5 15:09\n"
27491 "      &gt; westcoast.jpg                      66737  May  5 15:09\n"
27492 "\n"
27493 "dav:/repos/&gt; put README\n"
27494 "Uploading README to `/repos/README':\n"
27495 "Progress: [=============================&gt;] 100.0% of 357 bytes succeeded.\n"
27496 "\n"
27497 "dav:/repos/&gt; get proofbypoem.txt\n"
27498 "Downloading `/repos/proofbypoem.txt' to proofbypoem.txt:\n"
27499 "Progress: [=============================&gt;] 100.0% of 1461 bytes succeeded.\n"
27501 #. (para)
27502 #: ../source/book.xml:25657
27503 #, fuzzy
27504 msgid "DAV Explorer is another standalone WebDAV client, written in Java. It's under a free Apache-like license and is available at <uri href=\"http://www.ics.uci.edu/~webdav/\">http://www.ics.uci.edu/~webdav/</uri>. DAV Explorer does everything cadaver does, but has the advantages of being portable and being a more user-friendly GUI application. It's also one of the first clients to support the new WebDAV Access Control Protocol (RFC 3744)."
27505 msgstr "DAV Explorer是另一个独立运行的WebDAV客户端,使用Java编写,有一个类Apache的许可证,网站是<ulink url=\"http://www.ics.uci.edu/~webdav/\"/>。DAV Explorer与cadaver功能差不多,优点可移植,并有一个用户友好的GUI程序。它也是最早的支持WebDAV访问控制协议(RFC 3744)的客户端之一。"
27507 #. (para)
27508 #: ../source/book.xml:25664
27509 #, fuzzy
27510 msgid "Of course, DAV Explorer's ACL support is useless in this case, since <command>mod_dav_svn</command> doesn't support it. The fact that both Cadaver and DAV Explorer support some limited DeltaV commands isn't particularly useful either, since they don't allow <literal>MKACTIVITY</literal> requests. But it's not relevant anyway; we're assuming all of these clients are operating against an autoversioning repository."
27511 msgstr "当然,在这个情况下DAV Explorer的ACL支持没有任何用处,事实上,Cadaver和DAV Explorer支持的一些有限的DeltaV命令也并不有效,因为他们不允许<literal>MKACTIVITY</literal>请求,但是这都不相干;我们假定这些客户端都是针对自动版本化版本库工作。"
27513 #. (title)
27514 #: ../source/book.xml:25677
27515 msgid "File-explorer WebDAV extensions"
27516 msgstr "文件浏览器 WebDAV 扩展"
27518 #. (para)
27519 #: ../source/book.xml:25679
27520 #, fuzzy
27521 msgid "Some popular file explorer GUI programs support WebDAV extensions which allow a user to browse a DAV share as if it was just another directory on the local computer, and to perform basic tree editing operations on the items in that share. For example, Windows Explorer is able to browse a WebDAV server as a <quote>network place</quote>. Users can drag files to and from the desktop, or can rename, copy, or delete files in the usual way. But because it's only a feature of the file-explorer, the DAV share isn't visible to ordinary applications. All DAV interaction must happen through the explorer interface."
27522 msgstr "一些流行的文件浏览器GUI程序支持WebDAV扩展,允许用户将DAV共享当作本地文件夹访问,例如Windows浏览器可以以<quote>network place</quote>方式浏览WebDAV服务器。用户可以拖入和拖出文件,或者是改名、拷贝或删除其中的文件。但是因为它只是文件浏览器的一个特性,DAV对普通应用不可见,所有的DAV交互必须通过浏览器界面。"
27524 #. (para)
27525 #: ../source/book.xml:25695
27526 msgid "Microsoft was one of the original backers of the WebDAV specification, and first started shipping a client in Windows 98, known as <quote>Web Folders</quote>. This client was also shipped in Windows NT4 and 2000."
27527 msgstr "Microsoft是WebDAV规范最早的支持者,最早在Windows 98配置客户端,被称作<quote>网络文件夹</quote>,这个客户端在Windows NT4和2000上也存在。"
27529 #. (para)
27530 #: ../source/book.xml:25699
27531 msgid "The original Web Folders client was an extension to Explorer, the main GUI program used to browse filesystems. It works well enough. In Windows 98, the feature might need to be explicitly installed if Web Folders aren't already visible inside <quote>My Computer</quote>. In Windows 2000, simply add a new <quote>network place</quote>, enter the URL, and the WebDAV share will pop up for browsing."
27532 msgstr "最早的Webfolders客户端是浏览器的扩展,主要的浏览文件系统的GUI程序,工作良好。在Windows 98,如果<quote>我的电脑</quote>里没有网络文件夹,这个特性需要明确安装。在Windows 2000,只需要添加一个新的<quote>网络位置</quote>,输入URL,WebDAV共享就会弹出让你浏览。"
27534 #. (para)
27535 #: ../source/book.xml:25706
27536 #, fuzzy
27537 msgid "With the release of Windows XP, Microsoft started shipping a new implementation of Web Folders, known as the <quote>WebDAV mini-redirector</quote>. The new implementation is a filesystem-level client, allowing WebDAV shares to be mounted as drive letters. Unfortunately, this implementation is incredibly buggy. The client usually tries to convert http URLs (<literal>http://host/repos</literal>) into UNC share notation (<literal>\\\\host\\repos</literal>); it also often tries to use Windows Domain authentication to respond to basic-auth HTTP challenges, sending usernames as <literal>HOST\\username</literal>. These interoperability problems are severe and documented in numerous places around the web, to the frustration of many users. Even Greg Stein, the original author of Apache's WebDAV module, recommends against trying to use XP Web Folders against an Apache server."
27538 msgstr "伴随着Windows XP,Microsoft开始了另一种网络文件夹的实现,叫做<quote>WebDAV mini-redirector</quote>,这个新的实现是文件系统级的客户端,允许WebDAV转载到驱动器盘符上。不幸的是,这个实现充满难以相信的bug。客户端经常会尝试把http的URL(<literal>http://host/repos</literal>)转化为UNC共享符号(<literal>\\\\host\\repos</literal>),它也经常使用Windows域认证来回应基本的HTTP认证,按照<literal>HOST\\username</literal>发送用户名。这类互动性问题在网络上大量传播,使大量用户受挫。即使是ApacheWebDAV的作者Greg Stein也建议不要对Apaache服务器使用XP的网络文件夹。"
27540 #. (para)
27541 #: ../source/book.xml:25722
27542 msgid "It turns out that the original <quote>Explorer-only</quote> Web Folders implementation isn't dead in XP, it's just buried. It's still possible to find it by using this technique:"
27543 msgstr "结果是原始的网络文件夹并没有在XP中死掉,只是要被埋葬了。还是有办法适用这个技术:"
27545 #. (para)
27546 #: ../source/book.xml:25728
27547 msgid "Go to 'Network Places'."
27548 msgstr "到网络位置。"
27550 #. (para)
27551 #: ../source/book.xml:25731
27552 msgid "Add a new network place."
27553 msgstr "添加一个新的网络位置。"
27555 #. (para)
27556 #: ../source/book.xml:25734
27557 #, fuzzy
27558 msgid "When prompted, enter the URL of the repository, but <emphasis>include a port number</emphasis> in the URL. For example, <literal>http://host/repos</literal> would be entered as <literal>http://host:80/repos</literal> instead."
27559 msgstr "当要求输入,输入版本库的URL,但URL中<emphasis>要包含端口号</emphasis>。例如<literal>http://host/repos</literal>的输入是<literal>http://host:80/repos</literal>。"
27561 #. (para)
27562 #: ../source/book.xml:25741
27563 msgid "Respond to any authentication prompts."
27564 msgstr "回应所有的认证请求。"
27566 #. (para)
27567 #: ../source/book.xml:25744
27568 msgid "There are a number of other rumored workarounds to the problems, but none of them seem to work on all versions and patchlevels of Windows XP. In our tests, only the previous algorithm seems to work consistently on every system. The general consensus of the WebDAV community is that you should avoid the new Web Folders implementation and use the old one instead, and that if you need a real filesystem-level client for Windows XP, then use a third-party program like WebDrive or NetDrive."
27569 msgstr "有各种解决问题的方法,但好像没有一种能够在各版本和各级别的Windows XP中有效。在我们的测试里,只有上面这种策略在各种系统中有效。WebDAV社区一致认为避免使用新的网络文件夹实现,而使用旧的,如果你希望在Windows XP使用真实的文件系统级的客户端,请使用第三方的程序,例如WebDrive或NetDrive。"
27571 #. (para)
27572 #: ../source/book.xml:25753
27573 #, fuzzy
27574 msgid "A final tip: if you're attempting to use XP Web Folders, make sure you have the absolute latest version from Microsoft. For example, Microsoft released a bug-fixed version in January 2005, available at <uri href=\"http://support.microsoft.com/?kbid=892211\">http://support.microsoft.com/?kbid=892211</uri>. In particular, this release is known to fix a bug whereby browsing a DAV share shows an unexpected infinite recursion."
27575 msgstr "最后一个提示:如果你尝试使用XP的网络文件夹,确定你有Microsoft最新的版本,Microsoft在2005年1月发布了一个问题修正,在<ulink url=\"http://support.microsoft.com/?kbid=892211\"/>,特别的,这个发布是用来修正在访问DAV时发生无限递归的问题。"
27577 #. (title)
27578 #: ../source/book.xml:25765
27579 msgid "Nautilus, Konqueror"
27580 msgstr "Nautilus,Konqueror"
27582 #. (para)
27583 #: ../source/book.xml:25767
27584 #, fuzzy
27585 msgid "Nautilus is the official file manager/browser for the GNOME desktop (<uri href=\"http://www.gnome.org\">http://www.gnome.org</uri>), and Konqueror is the manager/browser for the KDE desktop (<uri href=\"http://www.kde.org\">http://www.kde.org</uri>). Both of these applications have an explorer-level WebDAV client built-in, and operate just fine against an autoversioning repository."
27586 msgstr "Nautilus是GNOME桌面(<ulink url=\"http://www.gnome.org\"/>)官方的文件管理/浏览器,KDE桌面(<ulink url=\"http://www.kde.org\"/>)的则是Konqueror。两个应用程序都是浏览器级别的WebDAV客户端,对自动版本化的版本库工作良好。"
27588 #. (para)
27589 #: ../source/book.xml:25772
27590 #, fuzzy
27591 msgid "In GNOME's Nautilus, from the <guimenu>File menu</guimenu>, select <guimenuitem>Open location</guimenuitem> and enter the URL. The repository should then be displayed like any other filesystem."
27592 msgstr "GNOME的Nautilus里,从<guimenu moreinfo=\"none\">File menu</guimenu>选择<guimenuitem moreinfo=\"none\">Open location</guimenuitem>,并且输入URL。版本库就会显示出来,就像其他文件系统。"
27594 #. (para)
27595 #: ../source/book.xml:25776
27596 #, fuzzy
27597 msgid "In KDE's Konqueror, you need to use the <literal>webdav://</literal> scheme when entering the URL in the location bar. If you enter an <literal>http://</literal> URL, Konqueror will behave like an ordinary web browser. You'll likely see the generic HTML directory listing produced by <command>mod_dav_svn</command>. By entering <literal>webdav://host/repos</literal> instead of <literal>http://host/repos</literal>, Konqueror becomes a WebDAV client and displays the repository as a filesystem."
27598 msgstr "KDE的Konqueror里你需要在地址栏使用<literal>webdav://</literal>模式来输入URL,如果你输入<literal>http://</literal>的URL,Konqueror会像普通的web浏览器。你会看到mod_dav_svn输出的普通HTML目录列表。通过输入<literal>webdav://host/repos</literal>代替<literal>http://host/repos</literal>,Konqueror就成为了一个WebDAV客户端,并且按照文件系统的方式显示版本库。"
27600 #. (para)
27601 #: ../source/book.xml:25793
27602 #, fuzzy
27603 msgid "The WebDAV filesystem implementation is arguably the best sort of WebDAV client. It's implemented as a low-level filesystem module, typically within the operating system's kernel. This means that the DAV share is mounted like any other network filesystem, similar to mounting an NFS share on Unix, or attaching an SMB share as drive letter in Windows. As a result, this sort of client provides completely transparent read/write WebDAV access to all programs. Applications aren't even aware that WebDAV requests are happening."
27604 msgstr "WebDAV文件系统实现被认为是最佳的WebDAV客户端,它通过低级的文件系统模块实现,通常在操作系统的核心。这意味着DAV共享像网络的其他文件系统一样装载,就像在Unix下面装载NFS,或者是在Windows下装载一个SMB共享。结果就是这种客户端为所有程序提供了对WebDAV得透明访问。"
27606 #. (title)
27607 #: ../source/book.xml:25806
27608 msgid "WebDrive, NetDrive"
27609 msgstr "WebDrive,NetDrive"
27611 #. (para)
27612 #: ../source/book.xml:25808
27613 #, fuzzy
27614 msgid "Both WebDrive and NetDrive are excellent commercial products which allow a WebDAV share to be attached as drive letters in Windows. We've had nothing but success with these products. At the time of writing, WebDrive can be purchased from South River Technologies (<uri href=\"http://www.southrivertech.com\">http://www.southrivertech.com</uri>). NetDrive ships with Netware, is free of charge, and can be found by searching the web for <quote>netdrive.exe</quote>. Though it is freely available online, users are required to have a Netware license. (If any of that sounds odd to you, you're not alone. See this page on Novell's website: <uri href=\"http://www.novell.com/coolsolutions/qna/999.html\">http://www.novell.com/coolsolutions/qna/999.html</uri>)"
27615 msgstr "WebDrive和NetDrive都是完美的商业产品,允许将WebDAV绑定到Windows的盘符,当我们写作的时候,WebDrive可以从South River Technologies(<ulink url=\"http://www.southrivertech.com\"/>)购买。NetDrive由Netware装运,通过查找<quote>netdrive.exe</quote>就会找到。尽管它可以自由得到,用户还是需要一个Netware许可证。(如果着听起来有点奇怪,你并不孤单,看Novell网站的这个页面:<ulink url=\"http://www.novell.com/coolsolutions/qna/999.html\"/>)"
27617 #. (para)
27618 #: ../source/book.xml:25824
27619 #, fuzzy
27620 msgid "Apple's OS X operating system has an integrated filesystem-level WebDAV client. From the Finder, select the <guimenuitem>Connect to Server</guimenuitem> item from the <guimenu>Go menu</guimenu>. Enter a WebDAV URL, and it appears as a disk on the desktop, just like any other mounted volume. You can also mount a WebDAV share from the Darwin terminal by using the <literal>webdav</literal> filesystem type with the <command>mount</command> command:"
27621 msgstr "Apple的OS X操作系统是集成的文件系统级的WebDAV客户端,通过Finder,选择<guimenu moreinfo=\"none\">Go menu</guimenu>的<guimenuitem moreinfo=\"none\">Connect to Server</guimenuitem>条目,输入WebDAV的URL,会在桌面显示一个磁盘,就像其他装载的卷。你也可以从Darwin终端通过<command>mount</command>类型为<literal>webdav</literal>的文件系统实现。"
27623 #. (screen)
27624 #: ../source/book.xml:25832
27625 #, no-wrap
27626 msgid ""
27627 "\n"
27628 "$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint\n"
27629 "$\n"
27630 msgstr ""
27631 "\n"
27632 "$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint\n"
27633 "$\n"
27635 #. (para)
27636 #: ../source/book.xml:25836
27637 #, fuzzy
27638 msgid "Note that if your <command>mod_dav_svn</command> is older than version 1.2, OS X will refuse to mount the share as read-write; it will appear as read-only. This is because OS X insists on locking support for read-write shares, and the ability to lock files first appeared in Subversion 1.2."
27639 msgstr "注意如果<command>mod_dav_svn</command>是1.2之前的版本,OS X不能按照可读写装载,而是会成为只读。这是因为,OS X坚持要读写共享支持锁定,而锁定文件出现在Subversion 1.2。"
27641 #. (para)
27642 #: ../source/book.xml:25842
27643 #, fuzzy
27644 msgid "One more word of warning: OS X's WebDAV client can sometimes be overly sensitive to HTTP redirects. If OS X is unable to mount the repository at all, you may need to enable the BrowserMatch directive in the Apache server's <filename>httpd.conf</filename>:"
27645 msgstr "警告一句话:OS X的WebDAV客户端有时候对HTTP重定向很敏感,如果OS X不能装载版本库,你或许需要开启Apache服务器<filename>httpd.conf</filename>的BrowserMatch指示:"
27647 #. (screen)
27648 #: ../source/book.xml:25847
27649 #, no-wrap
27650 msgid ""
27651 "\n"
27652 "BrowserMatch \"^WebDAVFS/1.[012]\" redirect-carefully\n"
27653 msgstr ""
27654 "\n"
27655 "BrowserMatch \"^WebDAVFS/1.[012]\" redirect-carefully\n"
27657 #. (title)
27658 #: ../source/book.xml:25854
27659 msgid "Linux davfs2"
27660 msgstr "Linux davfs2"
27662 #. (para)
27663 #: ../source/book.xml:25856
27664 #, fuzzy
27665 msgid "Linux davfs2 is a filesystem module for the Linux kernel, whose development is located at <uri href=\"http://dav.sourceforge.net/\">http://dav.sourceforge.net/</uri>. Once installed, a WebDAV network share can be mounted with the usual Linux mount command:"
27666 msgstr "Linux davfs2是一个Linux核心的文件系统模块,开发坐落在<ulink url=\"http://dav.sourceforge.net/\"/>。一旦安装,一个WebDAV网络共享可以使用mount命令装载:"
27668 #. (screen)
27669 #: ../source/book.xml:25860
27670 #, no-wrap
27671 msgid ""
27672 "\n"
27673 "$ mount.davfs http://host/repos /mnt/dav\n"
27674 msgstr ""
27675 "\n"
27676 "$ mount.davfs http://host/repos /mnt/dav\n"
27678 #. (title)
27679 #: ../source/book.xml:25874
27680 msgid "Third Party Tools"
27681 msgstr "第三方工具"
27683 #. (para)
27684 #: ../source/book.xml:25876
27685 #, fuzzy
27686 msgid "Subversion's modular design (covered in <xref linkend=\"svn.developer.layerlib\"/>) and the availability of language bindings (as described in <xref linkend=\"svn.developer.usingapi.otherlangs\"/>) make it a likely candidate for use as an extension or backend to other pieces of software. For a listing of many third-party tools that are using Subversion functionality under-the-hood, check out the Links page on the Subversion website (<uri href=\"http://subversion.tigris.org/project_links.html\">http://subversion.tigris.org/project_links.html</uri>)."
27687 msgstr "Subversion的模块设计(在<xref linkend=\"svn.developer.layerlib\"/>讨论过)和语言绑定的能力(在<xref linkend=\"svn.developer.usingapi.otherlangs\"/>描述过)使的我们可以作为扩展和后端支持来替代软件的某些部分,在这个附录里,我们会简略介绍一些使用Subversion功能的第三方的工具。关于更新的信息,可以在Subversion的网站(<ulink url=\"http://subversion.tigris.org/project_links.html\"/>)查看。"
27689 #. (title)
27690 #: ../source/book.xml:25890
27691 msgid "Copyright"
27692 msgstr "Copyright"
27694 #. (programlisting)
27695 #: ../source/book.xml:25892
27696 #, fuzzy, no-wrap
27697 msgid ""
27698 "\n"
27699 "\n"
27700 "Copyright (c) 2002-2007\n"
27701 "Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato.  \n"
27702 "\n"
27703 "This work is licensed under the Creative Commons Attribution License.\n"
27704 "To view a copy of this license, visit\n"
27705 "http://creativecommons.org/licenses/by/2.0/ or send a letter to\n"
27706 "Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,\n"
27707 "USA.\n"
27708 "\n"
27709 "A summary of the license is given below, followed by the full legal\n"
27710 "text.\n"
27711 "\n"
27712 "--------------------------------------------------------------------\n"
27713 "\n"
27714 "You are free:\n"
27715 "\n"
27716 "    * to copy, distribute, display, and perform the work\n"
27717 "    * to make derivative works\n"
27718 "    * to make commercial use of the work\n"
27719 "\n"
27720 "Under the following conditions:\n"
27721 "\t\n"
27722 "Attribution. You must give the original author credit.\n"
27723 "\n"
27724 "    * For any reuse or distribution, you must make clear to others the\n"
27725 "      license terms of this work.\n"
27726 "\n"
27727 "    * Any of these conditions can be waived if you get permission from\n"
27728 "      the author.\n"
27729 "\n"
27730 "Your fair use and other rights are in no way affected by the above.\n"
27731 "\n"
27732 "The above is a summary of the full license below.\n"
27733 "\n"
27734 "====================================================================\n"
27735 "\n"
27736 "Creative Commons Legal Code\n"
27737 "Attribution 2.0\n"
27738 "\n"
27739 "CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\n"
27740 "LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN\n"
27741 "ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\n"
27742 "INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\n"
27743 "REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR\n"
27744 "DAMAGES RESULTING FROM ITS USE.\n"
27745 "\n"
27746 "License\n"
27747 "\n"
27748 "THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS\n"
27749 "CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS\n"
27750 "PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE\n"
27751 "WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS\n"
27752 "PROHIBITED.\n"
27753 "\n"
27754 "BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND\n"
27755 "AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS\n"
27756 "YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF\n"
27757 "SUCH TERMS AND CONDITIONS.\n"
27758 "\n"
27759 "1. Definitions\n"
27760 "\n"
27761 "   a. \"Collective Work\" means a work, such as a periodical issue,\n"
27762 "      anthology or encyclopedia, in which the Work in its entirety in\n"
27763 "      unmodified form, along with a number of other contributions,\n"
27764 "      constituting separate and independent works in themselves, are\n"
27765 "      assembled into a collective whole. A work that constitutes a\n"
27766 "      Collective Work will not be considered a Derivative Work (as\n"
27767 "      defined below) for the purposes of this License.\n"
27768 "\n"
27769 "   b. \"Derivative Work\" means a work based upon the Work or upon the\n"
27770 "      Work and other pre-existing works, such as a translation,\n"
27771 "      musical arrangement, dramatization, fictionalization, motion\n"
27772 "      picture version, sound recording, art reproduction, abridgment,\n"
27773 "      condensation, or any other form in which the Work may be recast,\n"
27774 "      transformed, or adapted, except that a work that constitutes a\n"
27775 "      Collective Work will not be considered a Derivative Work for the\n"
27776 "      purpose of this License. For the avoidance of doubt, where the\n"
27777 "      Work is a musical composition or sound recording, the\n"
27778 "      synchronization of the Work in timed-relation with a moving\n"
27779 "      image (\"synching\") will be considered a Derivative Work for the\n"
27780 "      purpose of this License.\n"
27781 "\n"
27782 "   c. \"Licensor\" means the individual or entity that offers the Work\n"
27783 "      under the terms of this License.\n"
27784 "\n"
27785 "   d. \"Original Author\" means the individual or entity who created the Work.\n"
27786 "\n"
27787 "   e. \"Work\" means the copyrightable work of authorship offered under\n"
27788 "      the terms of this License.\n"
27789 "\n"
27790 "   f. \"You\" means an individual or entity exercising rights under this\n"
27791 "      License who has not previously violated the terms of this\n"
27792 "      License with respect to the Work, or who has received express\n"
27793 "      permission from the Licensor to exercise rights under this\n"
27794 "      License despite a previous violation.\n"
27795 "\n"
27796 "2. Fair Use Rights. Nothing in this license is intended to reduce,\n"
27797 "   limit, or restrict any rights arising from fair use, first sale or\n"
27798 "   other limitations on the exclusive rights of the copyright owner\n"
27799 "   under copyright law or other applicable laws.\n"
27800 "\n"
27801 "3. License Grant. Subject to the terms and conditions of this License,\n"
27802 "   Licensor hereby grants You a worldwide, royalty-free,\n"
27803 "   non-exclusive, perpetual (for the duration of the applicable\n"
27804 "   copyright) license to exercise the rights in the Work as stated\n"
27805 "   below:\n"
27806 "\n"
27807 "   a. to reproduce the Work, to incorporate the Work into one or more\n"
27808 "      Collective Works, and to reproduce the Work as incorporated in\n"
27809 "      the Collective Works;\n"
27810 "\n"
27811 "   b. to create and reproduce Derivative Works;\n"
27812 "\n"
27813 "   c. to distribute copies or phonorecords of, display publicly,\n"
27814 "      perform publicly, and perform publicly by means of a digital\n"
27815 "      audio transmission the Work including as incorporated in\n"
27816 "      Collective Works;\n"
27817 "\n"
27818 "   d. to distribute copies or phonorecords of, display publicly,\n"
27819 "      perform publicly, and perform publicly by means of a digital\n"
27820 "      audio transmission Derivative Works.\n"
27821 "\n"
27822 "   e.\n"
27823 "\n"
27824 "      For the avoidance of doubt, where the work is a musical composition:\n"
27825 "\n"
27826 "         i. Performance Royalties Under Blanket Licenses. Licensor\n"
27827 "            waives the exclusive right to collect, whether\n"
27828 "            individually or via a performance rights society\n"
27829 "            (e.g. ASCAP, BMI, SESAC), royalties for the public\n"
27830 "            performance or public digital performance (e.g. webcast)\n"
27831 "            of the Work.\n"
27832 "\n"
27833 "        ii. Mechanical Rights and Statutory Royalties. Licensor waives\n"
27834 "            the exclusive right to collect, whether individually or\n"
27835 "            via a music rights agency or designated agent (e.g. Harry\n"
27836 "            Fox Agency), royalties for any phonorecord You create from\n"
27837 "            the Work (\"cover version\") and distribute, subject to the\n"
27838 "            compulsory license created by 17 USC Section 115 of the US\n"
27839 "            Copyright Act (or the equivalent in other jurisdictions).\n"
27840 "\n"
27841 "   f. Webcasting Rights and Statutory Royalties. For the avoidance of\n"
27842 "      doubt, where the Work is a sound recording, Licensor waives the\n"
27843 "      exclusive right to collect, whether individually or via a\n"
27844 "      performance-rights society (e.g. SoundExchange), royalties for\n"
27845 "      the public digital performance (e.g. webcast) of the Work,\n"
27846 "      subject to the compulsory license created by 17 USC Section 114\n"
27847 "      of the US Copyright Act (or the equivalent in other\n"
27848 "      jurisdictions).\n"
27849 "\n"
27850 "The above rights may be exercised in all media and formats whether now\n"
27851 "known or hereafter devised. The above rights include the right to make\n"
27852 "such modifications as are technically necessary to exercise the rights\n"
27853 "in other media and formats. All rights not expressly granted by\n"
27854 "Licensor are hereby reserved.\n"
27855 "\n"
27856 "4. Restrictions.The license granted in Section 3 above is expressly\n"
27857 "   made subject to and limited by the following restrictions:\n"
27858 "\n"
27859 "   a. You may distribute, publicly display, publicly perform, or\n"
27860 "      publicly digitally perform the Work only under the terms of this\n"
27861 "      License, and You must include a copy of, or the Uniform Resource\n"
27862 "      Identifier for, this License with every copy or phonorecord of\n"
27863 "      the Work You distribute, publicly display, publicly perform, or\n"
27864 "      publicly digitally perform. You may not offer or impose any\n"
27865 "      terms on the Work that alter or restrict the terms of this\n"
27866 "      License or the recipients' exercise of the rights granted\n"
27867 "      hereunder. You may not sublicense the Work. You must keep intact\n"
27868 "      all notices that refer to this License and to the disclaimer of\n"
27869 "      warranties. You may not distribute, publicly display, publicly\n"
27870 "      perform, or publicly digitally perform the Work with any\n"
27871 "      technological measures that control access or use of the Work in\n"
27872 "      a manner inconsistent with the terms of this License\n"
27873 "      Agreement. The above applies to the Work as incorporated in a\n"
27874 "      Collective Work, but this does not require the Collective Work\n"
27875 "      apart from the Work itself to be made subject to the terms of\n"
27876 "      this License. If You create a Collective Work, upon notice from\n"
27877 "      any Licensor You must, to the extent practicable, remove from\n"
27878 "      the Collective Work any reference to such Licensor or the\n"
27879 "      Original Author, as requested. If You create a Derivative Work,\n"
27880 "      upon notice from any Licensor You must, to the extent\n"
27881 "      practicable, remove from the Derivative Work any reference to\n"
27882 "      such Licensor or the Original Author, as requested.\n"
27883 "\n"
27884 "   b. If you distribute, publicly display, publicly perform, or\n"
27885 "      publicly digitally perform the Work or any Derivative Works or\n"
27886 "      Collective Works, You must keep intact all copyright notices for\n"
27887 "      the Work and give the Original Author credit reasonable to the\n"
27888 "      medium or means You are utilizing by conveying the name (or\n"
27889 "      pseudonym if applicable) of the Original Author if supplied; the\n"
27890 "      title of the Work if supplied; to the extent reasonably\n"
27891 "      practicable, the Uniform Resource Identifier, if any, that\n"
27892 "      Licensor specifies to be associated with the Work, unless such\n"
27893 "      URI does not refer to the copyright notice or licensing\n"
27894 "      information for the Work; and in the case of a Derivative Work,\n"
27895 "      a credit identifying the use of the Work in the Derivative Work\n"
27896 "      (e.g., \"French translation of the Work by Original Author,\" or\n"
27897 "      \"Screenplay based on original Work by Original Author\"). Such\n"
27898 "      credit may be implemented in any reasonable manner; provided,\n"
27899 "      however, that in the case of a Derivative Work or Collective\n"
27900 "      Work, at a minimum such credit will appear where any other\n"
27901 "      comparable authorship credit appears and in a manner at least as\n"
27902 "      prominent as such other comparable authorship credit.\n"
27903 "\n"
27904 "5. Representations, Warranties and Disclaimer\n"
27905 "\n"
27906 "UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING,\n"
27907 "LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR\n"
27908 "WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED,\n"
27909 "STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF\n"
27910 "TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,\n"
27911 "NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY,\n"
27912 "OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT\n"
27913 "DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED\n"
27914 "WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\n"
27915 "\n"
27916 "6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY\n"
27917 "   APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY\n"
27918 "   LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE\n"
27919 "   OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE\n"
27920 "   WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n"
27921 "   DAMAGES.\n"
27922 "\n"
27923 "7. Termination\n"
27924 "\n"
27925 "   a. This License and the rights granted hereunder will terminate\n"
27926 "      automatically upon any breach by You of the terms of this\n"
27927 "      License. Individuals or entities who have received Derivative\n"
27928 "      Works or Collective Works from You under this License, however,\n"
27929 "      will not have their licenses terminated provided such\n"
27930 "      individuals or entities remain in full compliance with those\n"
27931 "      licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any\n"
27932 "      termination of this License.\n"
27933 "\n"
27934 "   b. Subject to the above terms and conditions, the license granted\n"
27935 "      here is perpetual (for the duration of the applicable copyright\n"
27936 "      in the Work). Notwithstanding the above, Licensor reserves the\n"
27937 "      right to release the Work under different license terms or to\n"
27938 "      stop distributing the Work at any time; provided, however that\n"
27939 "      any such election will not serve to withdraw this License (or\n"
27940 "      any other license that has been, or is required to be, granted\n"
27941 "      under the terms of this License), and this License will continue\n"
27942 "      in full force and effect unless terminated as stated above.\n"
27943 "\n"
27944 "8. Miscellaneous\n"
27945 "\n"
27946 "   a. Each time You distribute or publicly digitally perform the Work\n"
27947 "      or a Collective Work, the Licensor offers to the recipient a\n"
27948 "      license to the Work on the same terms and conditions as the\n"
27949 "      license granted to You under this License.\n"
27950 "\n"
27951 "   b. Each time You distribute or publicly digitally perform a\n"
27952 "      Derivative Work, Licensor offers to the recipient a license to\n"
27953 "      the original Work on the same terms and conditions as the\n"
27954 "      license granted to You under this License.\n"
27955 "\n"
27956 "   c. If any provision of this License is invalid or unenforceable\n"
27957 "      under applicable law, it shall not affect the validity or\n"
27958 "      enforceability of the remainder of the terms of this License,\n"
27959 "      and without further action by the parties to this agreement,\n"
27960 "      such provision shall be reformed to the minimum extent necessary\n"
27961 "      to make such provision valid and enforceable.\n"
27962 "\n"
27963 "   d. No term or provision of this License shall be deemed waived and\n"
27964 "      no breach consented to unless such waiver or consent shall be in\n"
27965 "      writing and signed by the party to be charged with such waiver\n"
27966 "      or consent.\n"
27967 "\n"
27968 "   e. This License constitutes the entire agreement between the\n"
27969 "      parties with respect to the Work licensed here. There are no\n"
27970 "      understandings, agreements or representations with respect to\n"
27971 "      the Work not specified here. Licensor shall not be bound by any\n"
27972 "      additional provisions that may appear in any communication from\n"
27973 "      You. This License may not be modified without the mutual written\n"
27974 "      agreement of the Licensor and You.\n"
27975 "\n"
27976 "Creative Commons is not a party to this License, and makes no warranty\n"
27977 "whatsoever in connection with the Work. Creative Commons will not be\n"
27978 "liable to You or any party on any legal theory for any damages\n"
27979 "whatsoever, including without limitation any general, special,\n"
27980 "incidental or consequential damages arising in connection to this\n"
27981 "license. Notwithstanding the foregoing two (2) sentences, if Creative\n"
27982 "Commons has expressly identified itself as the Licensor hereunder, it\n"
27983 "shall have all rights and obligations of Licensor.\n"
27984 "\n"
27985 "Except for the limited purpose of indicating to the public that the\n"
27986 "Work is licensed under the CCPL, neither party will use the trademark\n"
27987 "\"Creative Commons\" or any related trademark or logo of Creative\n"
27988 "Commons without the prior written consent of Creative Commons. Any\n"
27989 "permitted use will be in compliance with Creative Commons'\n"
27990 "then-current trademark usage guidelines, as may be published on its\n"
27991 "website or otherwise made available upon request from time to time.\n"
27992 "\n"
27993 "Creative Commons may be contacted at http://creativecommons.org/.\n"
27994 "\n"
27995 "====================================================================\n"
27996 msgstr ""
27997 "\n"
27998 "\n"
27999 "Copyright (c) 2002-2006\n"
28000 "Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato.  \n"
28001 "\n"
28002 "This work is licensed under the Creative Commons Attribution License.\n"
28003 "To view a copy of this license, visit\n"
28004 "http://creativecommons.org/licenses/by/2.0/ or send a letter to\n"
28005 "Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,\n"
28006 "USA.\n"
28008 #. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2.
28009 #. (None)
28010 #: ../source/book.xml:0
28011 msgid "translator-credits"
28012 msgstr ""
28013 "Dongsheng Song <dongsheng.song@gmail.com>\n"
28014 "Xun Leasun <leasun@gmail.com>\n"
28015 "Daijun Sun <daijun@gmail.com>"