From 66a9d077d3b6449d834c2d52289c1a1fbda11d42 Mon Sep 17 00:00:00 2001 From: Dongsheng Song Date: Mon, 24 Nov 2008 17:01:46 +0800 Subject: [PATCH] svnbook moved to http://code.google.com/p/i18n-zh/ . --- doc/svnbook/.gitignore | 4 - doc/svnbook/build.tmpl.properties | 23 - doc/svnbook/build.xml | 269 - doc/svnbook/po/book.pot | 19058 ----------------- doc/svnbook/po/zh_CN.po | 28015 ------------------------- doc/svnbook/readme.txt | 5 - doc/svnbook/source/book.txt | 19 - doc/svnbook/source/book.xml | 26198 ----------------------- doc/svnbook/source/images/ch01dia1.png | Bin 55406 -> 0 bytes doc/svnbook/source/images/ch02dia1.png | Bin 2544 -> 0 bytes doc/svnbook/source/images/ch02dia2.png | Bin 11754 -> 0 bytes doc/svnbook/source/images/ch02dia3.png | Bin 14307 -> 0 bytes doc/svnbook/source/images/ch02dia4.png | Bin 11705 -> 0 bytes doc/svnbook/source/images/ch02dia5.png | Bin 12176 -> 0 bytes doc/svnbook/source/images/ch02dia6.png | Bin 4023 -> 0 bytes doc/svnbook/source/images/ch02dia7.png | Bin 5495 -> 0 bytes doc/svnbook/source/images/ch04dia1.png | Bin 2713 -> 0 bytes doc/svnbook/source/images/ch04dia2.png | Bin 4127 -> 0 bytes doc/svnbook/source/images/ch04dia3.png | Bin 6537 -> 0 bytes doc/svnbook/source/images/ch04dia4.png | Bin 3849 -> 0 bytes doc/svnbook/source/images/ch08dia1.png | Bin 2644 -> 0 bytes doc/svnbook/source/images/ch08dia2.png | Bin 3910 -> 0 bytes doc/svnbook/stylesheets/chm-import.tmpl.xsl | 4 - doc/svnbook/stylesheets/chm.xsl | 30 - doc/svnbook/stylesheets/fo-import.tmpl.xsl | 4 - doc/svnbook/stylesheets/fo.xsl | 50 - doc/svnbook/stylesheets/html-import.tmpl.xsl | 4 - doc/svnbook/stylesheets/html.xsl | 16 - doc/svnbook/stylesheets/zh_CN/chm.xsl | 17 - doc/svnbook/stylesheets/zh_CN/fo.xsl | 26 - doc/svnbook/stylesheets/zh_CN/html.xsl | 6 - doc/svnbook/version | 1 - doc/svnbook/xml2po/xml2po-modes/docbook.py | 205 - doc/svnbook/xml2po/xml2po.py | 889 - 34 files changed, 74843 deletions(-) delete mode 100644 doc/svnbook/.gitignore delete mode 100644 doc/svnbook/build.tmpl.properties delete mode 100644 doc/svnbook/build.xml delete mode 100644 doc/svnbook/po/book.pot delete mode 100644 doc/svnbook/po/zh_CN.po delete mode 100644 doc/svnbook/readme.txt delete mode 100644 doc/svnbook/source/book.txt delete mode 100644 doc/svnbook/source/book.xml delete mode 100644 doc/svnbook/source/images/ch01dia1.png delete mode 100644 doc/svnbook/source/images/ch02dia1.png delete mode 100644 doc/svnbook/source/images/ch02dia2.png delete mode 100644 doc/svnbook/source/images/ch02dia3.png delete mode 100644 doc/svnbook/source/images/ch02dia4.png delete mode 100644 doc/svnbook/source/images/ch02dia5.png delete mode 100644 doc/svnbook/source/images/ch02dia6.png delete mode 100644 doc/svnbook/source/images/ch02dia7.png delete mode 100644 doc/svnbook/source/images/ch04dia1.png delete mode 100644 doc/svnbook/source/images/ch04dia2.png delete mode 100644 doc/svnbook/source/images/ch04dia3.png delete mode 100644 doc/svnbook/source/images/ch04dia4.png delete mode 100644 doc/svnbook/source/images/ch08dia1.png delete mode 100644 doc/svnbook/source/images/ch08dia2.png delete mode 100644 doc/svnbook/stylesheets/chm-import.tmpl.xsl delete mode 100644 doc/svnbook/stylesheets/chm.xsl delete mode 100644 doc/svnbook/stylesheets/fo-import.tmpl.xsl delete mode 100644 doc/svnbook/stylesheets/fo.xsl delete mode 100644 doc/svnbook/stylesheets/html-import.tmpl.xsl delete mode 100644 doc/svnbook/stylesheets/html.xsl delete mode 100644 doc/svnbook/stylesheets/zh_CN/chm.xsl delete mode 100644 doc/svnbook/stylesheets/zh_CN/fo.xsl delete mode 100644 doc/svnbook/stylesheets/zh_CN/html.xsl delete mode 100644 doc/svnbook/version delete mode 100644 doc/svnbook/xml2po/xml2po-modes/docbook.py delete mode 100644 doc/svnbook/xml2po/xml2po.py diff --git a/doc/svnbook/.gitignore b/doc/svnbook/.gitignore deleted file mode 100644 index 02f1c49..0000000 --- a/doc/svnbook/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -build.properties -chm-import.xsl -fo-import.xsl -html-import.xsl diff --git a/doc/svnbook/build.tmpl.properties b/doc/svnbook/build.tmpl.properties deleted file mode 100644 index 7082dc8..0000000 --- a/doc/svnbook/build.tmpl.properties +++ /dev/null @@ -1,23 +0,0 @@ -# -# Please create your build.properties file from this template file. -# - -docbook5.home=C:/wc/svn/i18n-zh/trunk/lib/docbook/docbook5 -docbook5.xsl=C:/wc/svn/i18n-zh/trunk/lib/docbook/docbook5-xsl -docbook5.xsl.url=file:///C:/wc/svn/i18n-zh/trunk/lib/docbook/docbook5-xsl - -#You jars put here -# usr.share.java = /usr/share/java -usr.share.java = C:/wc/svn/i18n-zh/trunk/lib/share/java - -# Only for pdf files(fop 0.20.5) -fop.home=C:/wc/svn/i18n-zh/trunk/lib/fop/0.20.5 -fop.class=org.apache.fop.apps.Fop - -# Only for pdf files(fop 0.94+) -# fop.home=C:/wc/svn/i18n-zh/trunk/lib/fop/1.x -# fop.class=org.apache.fop.cli.Main - -#Only for MBCS pdf files -fonts.dir=C:/wc/svn/i18n-zh/trunk/lib/fonts -fonts.metrics.dir=${fop.home}/conf diff --git a/doc/svnbook/build.xml b/doc/svnbook/build.xml deleted file mode 100644 index 5193875..0000000 --- a/doc/svnbook/build.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This target only work on windows ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/svnbook/po/book.pot b/doc/svnbook/po/book.pot deleted file mode 100644 index d4b6426..0000000 --- a/doc/svnbook/po/book.pot +++ /dev/null @@ -1,19058 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-12-09 10:12 +0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1001 -msgid "@@image: 'images/ch01dia1.png'; md5=d5cf54020bcbb99fb12150481d94bffa" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1131 -msgid "@@image: 'images/ch02dia1.png'; md5=9f98bd2bd15fabc36d55db0572a7b32b" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1202 -msgid "@@image: 'images/ch02dia2.png'; md5=4c3e6e55f9a0c50d6925f5ca4587e47b" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1231 -msgid "@@image: 'images/ch02dia3.png'; md5=e9cd778666a999ab329a069efed37500" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1316 -msgid "@@image: 'images/ch02dia4.png'; md5=8d13576c2af1db88349f6ff144ef6fc2" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1326 -msgid "@@image: 'images/ch02dia5.png'; md5=f4ec352cd843cf130fe500cfdbc358ca" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1514 -msgid "@@image: 'images/ch02dia6.png'; md5=d4eac305c63464419d945a616284c4ce" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:1697 -msgid "@@image: 'images/ch02dia7.png'; md5=067bb47f6fe3dcdeefac6755da876cdf" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:6763 -msgid "@@image: 'images/ch04dia1.png'; md5=a157a2c9fc737cab3db918aaf489bf7e" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:6801 -msgid "@@image: 'images/ch04dia2.png'; md5=5c6b571282ff05d99a99d69fdef50378" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:6910 -msgid "@@image: 'images/ch04dia3.png'; md5=7226def64bf6dea42b547d968b853a08" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:7000 -msgid "@@image: 'images/ch04dia4.png'; md5=03cbad24eee5abe0cadc452be19c2613" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:15988 -msgid "@@image: 'images/ch08dia1.png'; md5=870a5b07012b21f7b187fdb1d912d8d6" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#.(None) -#: ../source/book.xml:16017 -msgid "@@image: 'images/ch08dia2.png'; md5=a72633f0cc8f6f83fa4d8a96b47202ca" -msgstr "" - -#.(title) -#: ../source/book.xml:4 -msgid "Version Control with Subversion" -msgstr "" - -#.(subtitle) -#: ../source/book.xml:5 -msgid "For Subversion 1.5(Compiled from r2907)" -msgstr "" - -#.(edition) -#: ../source/book.xml:6 -msgid "Second" -msgstr "" - -#.(biblioid) -#: ../source/book.xml:7 -msgid "?-?????-???-?" -msgstr "" - -#.(firstname) -#: ../source/book.xml:11 -msgid "Ben" -msgstr "" - -#.(surname) -#: ../source/book.xml:12 -msgid "Collins-Sussman" -msgstr "" - -#.(firstname) -#: ../source/book.xml:17 -msgid "Brian W." -msgstr "" - -#.(surname) -#: ../source/book.xml:18 -msgid "Fitzpatrick" -msgstr "" - -#.(firstname) -#: ../source/book.xml:23 -msgid "C. Michael" -msgstr "" - -#.(surname) -#: ../source/book.xml:24 -msgid "Pilato" -msgstr "" - -#.(firstname) -#: ../source/book.xml:30 -msgid "Tatiana" -msgstr "" - -#.(surname) -#: ../source/book.xml:31 -msgid "Apandi" -msgstr "" - -#.(pagenums) -#: ../source/book.xml:34 -msgid "350 pages (est.)" -msgstr "" - -#.(pubdate) -#: ../source/book.xml:35 -msgid "(TBA)" -msgstr "" - -#.(year) -#: ../source/book.xml:37 -msgid "2002" -msgstr "" - -#.(year) -#: ../source/book.xml:38 -msgid "2003" -msgstr "" - -#.(year) -#: ../source/book.xml:39 -msgid "2004" -msgstr "" - -#.(year) -#: ../source/book.xml:40 -msgid "2005" -msgstr "" - -#.(year) -#: ../source/book.xml:41 -msgid "2006" -msgstr "" - -#.(year) -#: ../source/book.xml:42 -msgid "2007" -msgstr "" - -#.(holder) -#: ../source/book.xml:43 -msgid "Ben Collins-Sussman" -msgstr "" - -#.(holder) -#: ../source/book.xml:44 -msgid "Brian W. Fitzpatrick" -msgstr "" - -#.(holder) -#: ../source/book.xml:45 -msgid "C. Michael Pilato" -msgstr "" - -#.(para) -#: ../source/book.xml:48 -msgid "This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA." -msgstr "" - -#.(title) -#: ../source/book.xml:62 -msgid "Foreword" -msgstr "" - -#.(firstname) -#: ../source/book.xml:65 -msgid "Karl" -msgstr "" - -#.(surname) -#: ../source/book.xml:66 -msgid "Fogel" -msgstr "" - -#.(pubdate) -#: ../source/book.xml:69 -msgid "Chicago, March 14, 2004" -msgstr "" - -#.(para) -#: ../source/book.xml:71 -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 wished people had asked. Perhaps you've seen the type before:" -msgstr "" - -#.(para) -#: ../source/book.xml:76 -msgid "Q: How can I use Glorbosoft XYZ to maximize team productivity?" -msgstr "" - -#.(para) -#: ../source/book.xml:80 -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 File menu, scroll down to Increase Productivity, then…" -msgstr "" - -#.(para) -#: ../source/book.xml:87 -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, How can we maximize productivity?. Rather, people asked highly specific questions, like, How can we change the calendaring system to send reminders two days in advance instead of one? 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." -msgstr "" - -#.(para) -#: ../source/book.xml:103 -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?" -msgstr "" - -#.(para) -#: ../source/book.xml:111 -msgid "Frustrated at seeing the same questions day after day, Ben worked intensely over a month in the summer of 2002 to write The Subversion Handbook, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:121 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:130 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:150 -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 users@subversion.tigris.org 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, you are not alone." -msgstr "" - -#.(para) -#: ../source/book.xml:168 -msgid "Let this book be your first companion." -msgstr "" - -#.(title) -#: ../source/book.xml:177 -msgid "Preface" -msgstr "" - -#.(attribution) -#: ../source/book.xml:180 -msgid "Greg Hudson" -msgstr "" - -#.(quote) -#: ../source/book.xml:182 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:189 -msgid "Concurrent Versions System (CVS) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:200 -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 look and feel) 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 is 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." -msgstr "" - -#.(para) -#: ../source/book.xml:211 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:223 -msgid "Audience" -msgstr "" - -#.(para) -#: ../source/book.xml:225 -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 (svn), and some auxiliary programs, are the focus of this book." -msgstr "" - -#.(para) -#: ../source/book.xml:231 -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 svn program also runs on non-Unix platforms like Microsoft Windows. With a few minor exceptions, such as the use of backward slashes (\\) instead of forward slashes (/) for path separators, the input to and output from this tool when run on Windows are identical to its Unix counterpart." -msgstr "" - -#.(para) -#: ../source/book.xml:240 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:247 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:254 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:265 -msgid "How to Read this Book" -msgstr "" - -#.(para) -#: ../source/book.xml:267 -msgid "Technical books always face a certain dilemma: whether to cater to top-down or bottom-up 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 learn by doing 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:285 -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 recommended reading list for various types of readers:" -msgstr "" - -#.(term) -#: ../source/book.xml:295 -msgid "Experienced System Administrators" -msgstr "" - -#.(para) -#: ../source/book.xml:297 -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. and will show you how to create your first repository and make it available over the network. After that's done, and are the fastest routes to learning the Subversion client." -msgstr "" - -#.(term) -#: ../source/book.xml:310 -msgid "New users" -msgstr "" - -#.(para) -#: ../source/book.xml:312 -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 is a vital introduction to the ideas behind version control. is a guided tour of the Subversion client." -msgstr "" - -#.(term) -#: ../source/book.xml:321 -msgid "Advanced users" -msgstr "" - -#.(para) -#: ../source/book.xml:323 -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 (), how to use Subversion's property support (), how to configure runtime options (), and other things. These chapters aren't critical at first, but be sure to read them once you're comfortable with the basics." -msgstr "" - -#.(term) -#: ../source/book.xml:334 -msgid "Developers" -msgstr "" - -#.(para) -#: ../source/book.xml:336 -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. is just for you." -msgstr "" - -#.(para) -#: ../source/book.xml:343 -msgid "The book ends with reference material— 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." -msgstr "" - -#.(title) -#: ../source/book.xml:353 -msgid "Conventions Used in This Book" -msgstr "" - -#.(para) -#: ../source/book.xml:355 -msgid "This section covers the various conventions used in this book." -msgstr "" - -#.(title) -#: ../source/book.xml:360 -msgid "Typographic Conventions" -msgstr "" - -#.(command) -#: ../source/book.xml:365 -msgid "Constant width" -msgstr "" - -#.(para) -#: ../source/book.xml:368 -msgid "Used for commands, command output, and options" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:373 -msgid "Constant width italic" -msgstr "" - -#.(para) -#: ../source/book.xml:376 -msgid "Used for replaceable items in code and text" -msgstr "" - -#.(filename) -#: ../source/book.xml:381 -msgid "Italic" -msgstr "" - -#.(para) -#: ../source/book.xml:384 -msgid "Used for file and directory names" -msgstr "" - -#.(title) -#: ../source/book.xml:392 -msgid "Icons" -msgstr "" - -#.(para) -#: ../source/book.xml:395 -msgid "This icon designates a note relating to the surrounding text." -msgstr "" - -#.(para) -#: ../source/book.xml:399 -msgid "This icon designates a helpful tip relating to the surrounding text." -msgstr "" - -#.(para) -#: ../source/book.xml:403 -msgid "This icon designates a warning relating to the surrounding text." -msgstr "" - -#.(title) -#: ../source/book.xml:413 -msgid "Organization of This Book" -msgstr "" - -#.(para) -#: ../source/book.xml:415 -msgid "The chapters that follow and their contents are listed here:" -msgstr "" - -#.(para) -#: ../source/book.xml:423 -msgid "Covers the history of Subversion as well as its features, architecture, and components." -msgstr "" - -#.(para) -#: ../source/book.xml:432 -msgid "Explains the basics of version control and different versioning models, along with Subversion's repository, working copies, and revisions." -msgstr "" - -#.(para) -#: ../source/book.xml:442 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:452 -msgid "Covers more complex features that regular users will eventually come into contact with, such as versioned metadata, file locking, and peg revisions." -msgstr "" - -#.(para) -#: ../source/book.xml:462 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:473 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:483 -msgid "Explains how to configure your Subversion server and different ways to access your repository: HTTP, the svn protocol, and local disk access. It also covers the details of authentication, authorization and anonymous access." -msgstr "" - -#.(para) -#: ../source/book.xml:496 -msgid "Explores the Subversion client configuration files, the handling of internationalized text, and how to make external tools cooperate with Subversion." -msgstr "" - -#.(para) -#: ../source/book.xml:506 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:519 -msgid "Explains in great detail every subcommand of svn, svnadmin, and svnlook with plenty of examples for the whole family!" -msgstr "" - -#.(para) -#: ../source/book.xml:530 -msgid "For the impatient, a whirlwind explanation of how to install Subversion and start using it immediately. You have been warned." -msgstr "" - -#.(para) -#: ../source/book.xml:540 -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, update vs. status, branches, tags, metadata, conflict resolution, and authentication." -msgstr "" - -#.(para) -#: ../source/book.xml:555 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:565 -msgid "Discusses tools that support or use Subversion, including alternative client programs, repository browser tools, and so on." -msgstr "" - -#.(title) -#: ../source/book.xml:577 -msgid "This Book is Free" -msgstr "" - -#.(para) -#: ../source/book.xml:579 -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 .) In fact, the book was written in the public eye, originally as a part of Subversion project itself. This means two things:" -msgstr "" - -#.(para) -#: ../source/book.xml:587 -msgid "You will always find the latest version of this book in the book's own Subversion repository." -msgstr "" - -#.(para) -#: ../source/book.xml:591 -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." -msgstr "" - -#. O'REILLY SHOULD TWEAK THIS PARAGRAPH -#.(para) -#: ../source/book.xml:600 -msgid "The online home of this book's development and most of the volunteer-driven translation efforts around it is http://svnbook.red-bean.com. 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 svnbook-dev@red-bean.com." -msgstr "" - -#.(title) -#: ../source/book.xml:615 -msgid "Acknowledgments" -msgstr "" - -#.(para) -#: ../source/book.xml:623 -msgid "Oh, and thanks, Karl, for being too overworked to write this book yourself." -msgstr "" - -#.(para) -#: ../source/book.xml:617 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:625 -msgid "Thanks to O'Reilly and our editors, Linda Mui and Tatiana Diaz for their patience and support." -msgstr "" - -#.(para) -#: ../source/book.xml:627 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:654 -msgid "From Ben Collins-Sussman" -msgstr "" - -#.(para) -#: ../source/book.xml:656 -msgid "Thanks to my wife Frances, who, for many months, got to hear, But honey, I'm still working on the book, rather than the usual, But honey, I'm still doing email. I don't know where she gets all that patience! She's my perfect counterbalance." -msgstr "" - -#.(para) -#: ../source/book.xml:661 -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, Ooh, you wrote a book?, and then when you tell them it's a computer book, sort of glaze over.)" -msgstr "" - -#.(para) -#: ../source/book.xml:666 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:668 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:675 -msgid "From Brian W. Fitzpatrick" -msgstr "" - -#. ### TODO(fitz): update this? -#.(para) -#: ../source/book.xml:678 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:685 -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!" -msgstr "" - -#.(para) -#: ../source/book.xml:687 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:691 -msgid "Lastly, thanks to my Grandfather who always told me that freedom equals responsibility. I couldn't agree more." -msgstr "" - -#.(title) -#: ../source/book.xml:698 -msgid "From C. Michael Pilato" -msgstr "" - -#.(para) -#: ../source/book.xml:700 -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!" -msgstr "" - -#.(para) -#: ../source/book.xml:706 -msgid "Gavin, there probably aren't many words in this book that you can successfully sound out 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." -msgstr "" - -#.(para) -#: ../source/book.xml:713 -msgid "Translation: Daddy loves you and hopes you like computers as much as you like basketball, baseball, and football. (Wasn't that obvious?)" -msgstr "" - -#.(para) -#: ../source/book.xml:711 -msgid "Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as Aiduh yike batetball, base-ball, et bootball. " -msgstr "" - -#.(para) -#: ../source/book.xml:717 -msgid "Mom and Dad, thanks for your constant support and enthusiasm. Mom- and Dad-in-law, thanks for all of the same plus your fabulous daughter." -msgstr "" - -#.(para) -#: ../source/book.xml:720 -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 are my .emacs; 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!" -msgstr "" - -#.(para) -#: ../source/book.xml:728 -msgid "Finally, to the One who perfectly demonstrates creative excellence—thank You." -msgstr "" - -#.(title) -#: ../source/book.xml:737 -msgid "What is Subversion?" -msgstr "" - -#.(para) -#: ../source/book.xml:739 -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 time machine." -msgstr "" - -#.(para) -#: ../source/book.xml:745 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:754 -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 any collection of files. For you, those files might be source code—for others, anything from grocery shopping lists to digital video mixdowns and beyond." -msgstr "" - -#.(title) -#: ../source/book.xml:768 -msgid "Is Subversion the Right Tool?" -msgstr "" - -#.(para) -#: ../source/book.xml:770 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:775 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:803 -msgid "Or as a friend puts it, swatting a fly with a Buick." -msgstr "" - -#.(para) -#: ../source/book.xml:792 -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\". There are simpler tools that efficiently replicate data without the overhead of tracking changes, such as rsync or unison." -msgstr "" - -#.(title) -#: ../source/book.xml:813 -msgid "Subversion's History" -msgstr "" - -#.(para) -#: ../source/book.xml:815 -msgid "Subversionhistory of In early 2000, CollabNet, Inc. (http://www.collab.net) 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 wasn't 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." -msgstr "" - -#.(para) -#: ../source/book.xml:830 -msgid "In February 2000, they contacted Karl Fogel, the author of Open Source Development with CVS (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 Subversion, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:854 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:862 -msgid "After fourteen months of coding, Subversion became self-hosting on August 31, 2001. That is, Subversion developers stopped using CVS to manage Subversion's own source code, and started using Subversion instead." -msgstr "" - -#.(para) -#: ../source/book.xml:866 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:879 -msgid "Subversion's Features" -msgstr "" - -#.(para) -#: ../source/book.xml:881 -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 , in which we provide a gentle introduction to version control." -msgstr "" - -#.(para) -#: ../source/book.xml:888 -msgid "Subversion provides:" -msgstr "" - -#.(term) -#: ../source/book.xml:891 -msgid "Directory versioning" -msgstr "" - -#.(para) -#: ../source/book.xml:893 -msgid "CVS only tracks the history of individual files, but Subversion implements a virtual versioned filesystem that tracks changes to whole directory trees over time. Files and directories are versioned." -msgstr "" - -#.(term) -#: ../source/book.xml:901 -msgid "True version history" -msgstr "" - -#.(para) -#: ../source/book.xml:903 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:917 -msgid "Atomic commits" -msgstr "" - -#.(para) -#: ../source/book.xml:919 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:928 -msgid "Versioned metadata" -msgstr "" - -#.(para) -#: ../source/book.xml:930 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:938 -msgid "Choice of network layers" -msgstr "" - -#.(para) -#: ../source/book.xml:940 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:954 -msgid "Consistent data handling" -msgstr "" - -#.(para) -#: ../source/book.xml:956 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:965 -msgid "Efficient branching and tagging" -msgstr "" - -#.(para) -#: ../source/book.xml:967 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:976 -msgid "Hackability" -msgstr "" - -#.(para) -#: ../source/book.xml:978 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:990 ../source/book.xml:997 -msgid "Subversion's Architecture" -msgstr "" - -#.(para) -#: ../source/book.xml:992 -msgid " illustrates a mile-high view of Subversion's design." -msgstr "" - -#.(para) -#: ../source/book.xml:1005 -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 working copies). 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." -msgstr "" - -#.(title) -#: ../source/book.xml:1018 -msgid "Subversion's Components" -msgstr "" - -#.(para) -#: ../source/book.xml:1020 -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 plenty more pages in this book devoted to alleviating that confusion." -msgstr "" - -#.(term), (primary) -#: ../source/book.xml:1027 ../source/book.xml:17467 ../source/book.xml:17570 ../source/book.xml:17674 ../source/book.xml:17759 ../source/book.xml:17890 ../source/book.xml:17966 ../source/book.xml:18094 ../source/book.xml:18273 ../source/book.xml:18383 ../source/book.xml:18636 ../source/book.xml:18748 ../source/book.xml:18801 ../source/book.xml:18905 ../source/book.xml:19106 ../source/book.xml:19224 ../source/book.xml:19318 ../source/book.xml:19542 ../source/book.xml:19664 ../source/book.xml:19749 ../source/book.xml:19869 ../source/book.xml:19948 ../source/book.xml:20027 ../source/book.xml:20108 ../source/book.xml:20196 ../source/book.xml:20321 ../source/book.xml:20410 ../source/book.xml:20516 ../source/book.xml:20861 ../source/book.xml:21023 ../source/book.xml:21110 -msgid "svn" -msgstr "" - -#.(para) -#: ../source/book.xml:1029 -msgid "The command-line client program." -msgstr "" - -#.(term), (command), (primary), (refname) -#: ../source/book.xml:1033 ../source/book.xml:23597 ../source/book.xml:23602 ../source/book.xml:23605 -msgid "svnversion" -msgstr "" - -#.(para) -#: ../source/book.xml:1035 -msgid "A program for reporting the state (in terms of revisions of the items present) of a working copy." -msgstr "" - -#.(term), (title), (command), (primary) -#: ../source/book.xml:1040 ../source/book.xml:10192 ../source/book.xml:22193 ../source/book.xml:22291 ../source/book.xml:22335 ../source/book.xml:22390 ../source/book.xml:22480 ../source/book.xml:22524 ../source/book.xml:22593 ../source/book.xml:22638 ../source/book.xml:22670 ../source/book.xml:22733 ../source/book.xml:22781 ../source/book.xml:22830 ../source/book.xml:22874 ../source/book.xml:22927 ../source/book.xml:22989 ../source/book.xml:23042 ../source/book.xml:23080 -msgid "svnlook" -msgstr "" - -#.(para) -#: ../source/book.xml:1042 -msgid "A tool for directly inspecting a Subversion repository." -msgstr "" - -#.(term), (title), (command), (primary) -#: ../source/book.xml:1046 ../source/book.xml:10162 ../source/book.xml:21254 ../source/book.xml:21404 ../source/book.xml:21472 ../source/book.xml:21511 ../source/book.xml:21614 ../source/book.xml:21647 ../source/book.xml:21693 ../source/book.xml:21725 ../source/book.xml:21771 ../source/book.xml:21834 ../source/book.xml:21880 ../source/book.xml:21918 ../source/book.xml:21995 ../source/book.xml:22039 ../source/book.xml:22087 ../source/book.xml:22144 -msgid "svnadmin" -msgstr "" - -#.(para) -#: ../source/book.xml:1048 -msgid "A tool for creating, tweaking or repairing a Subversion repository." -msgstr "" - -#.(term), (title) -#: ../source/book.xml:1053 ../source/book.xml:10304 -msgid "svndumpfilter" -msgstr "" - -#.(para) -#: ../source/book.xml:1055 -msgid "A program for filtering Subversion repository dump streams." -msgstr "" - -#.(term), (command), (literal) -#: ../source/book.xml:1060 ../source/book.xml:15819 ../source/book.xml:23734 ../source/book.xml:23739 -msgid "mod_dav_svn" -msgstr "" - -#.(para) -#: ../source/book.xml:1062 -msgid "A plug-in module for the Apache HTTP Server, used to make your repository available to others over a network." -msgstr "" - -#.(term), (literal), (entry), (command) -#: ../source/book.xml:1068 ../source/book.xml:1643 ../source/book.xml:11970 ../source/book.xml:23435 -msgid "svnserve" -msgstr "" - -#.(para) -#: ../source/book.xml:1070 -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." -msgstr "" - -#.(term), (title), (command), (primary) -#: ../source/book.xml:1076 ../source/book.xml:10354 ../source/book.xml:23120 ../source/book.xml:23219 ../source/book.xml:23285 ../source/book.xml:23356 -msgid "svnsync" -msgstr "" - -#.(para) -#: ../source/book.xml:1078 -msgid "A program for incrementally mirroring one repository to another over a network." -msgstr "" - -#.(para) -#: ../source/book.xml:1083 -msgid "Assuming you have Subversion installed correctly, you should be ready to start. The next two chapters will walk you through the use of svn, Subversion's command-line client program." -msgstr "" - -#.(title) -#: ../source/book.xml:1097 -msgid "Fundamental Concepts" -msgstr "" - -#.(para) -#: ../source/book.xml:1099 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1105 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:1114 -msgid "The Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:1116 -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 filesystem tree—a typical hierarchy of files and directories. Any number of clients 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. illustrates this." -msgstr "" - -#.(title) -#: ../source/book.xml:1127 -msgid "A typical client/server system" -msgstr "" - -#.(para) -#: ../source/book.xml:1135 -msgid "So why is this interesting? So far, this sounds like the definition of a typical file server. And indeed, the repository is a kind of file server, but it's not your usual breed. What makes the Subversion repository special is that it remembers every change 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1143 -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 previous states of the filesystem. For example, a client can ask historical questions like, What did this directory contain last Wednesday? or Who was the last person to change this file, and what changes did he make? These are the sorts of questions that are at the heart of any version control system: systems that are designed to track changes to data over time." -msgstr "" - -#.(title) -#: ../source/book.xml:1160 -msgid "Versioning Models" -msgstr "" - -#.(para) -#: ../source/book.xml:1162 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:1174 -msgid "The Problem of File-Sharing" -msgstr "" - -#.(para) -#: ../source/book.xml:1176 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1182 -msgid "Consider the scenario shown in . 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 won't 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!" -msgstr "" - -#.(title) -#: ../source/book.xml:1198 -msgid "The problem to avoid" -msgstr "" - -#.(title) -#: ../source/book.xml:1210 -msgid "The Lock-Modify-Unlock Solution" -msgstr "" - -#.(para) -#: ../source/book.xml:1212 -msgid "Many version control systems use a lock-modify-unlock 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 lock 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. demonstrates this simple solution." -msgstr "" - -#.(title) -#: ../source/book.xml:1227 -msgid "The lock-modify-unlock solution" -msgstr "" - -#.(para) -#: ../source/book.xml:1235 -msgid "The problem with the lock-modify-unlock model is that it's a bit restrictive, and often becomes a roadblock for users:" -msgstr "" - -#.(para) -#: ../source/book.xml:1240 -msgid "Locking may cause administrative problems. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1251 -msgid "Locking may cause unnecessary serialization. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1263 -msgid "Locking may create a false sense of security. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:1283 -msgid "The Copy-Modify-Merge Solution" -msgstr "" - -#.(para) -#: ../source/book.xml:1285 -msgid "Subversion, CVS, and many other version control systems use a copy-modify-merge model as an alternative to locking. In this model, each user's client contacts the project repository and creates a personal working copy—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." -msgstr "" - -#.(para) -#: ../source/book.xml:1296 -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 out-of-date. In other words, that file A in the repository has somehow changed since he last copied it. So Harry asks his client to merge 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. and show this process." -msgstr "" - -#.(title) -#: ../source/book.xml:1312 -msgid "The copy-modify-merge solution" -msgstr "" - -#.(title) -#: ../source/book.xml:1322 -msgid "The copy-modify-merge solution (continued)" -msgstr "" - -#.(para) -#: ../source/book.xml:1330 -msgid "But what if Sally's changes do overlap with Harry's changes? What then? This situation is called a conflict, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1343 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1350 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:1360 -msgid "When Locking is Necessary" -msgstr "" - -#.(para) -#: ../source/book.xml:1362 -msgid "While the lock-modify-unlock model is considered generally harmful to collaboration, there are still times when locking is appropriate." -msgstr "" - -#.(para) -#: ../source/book.xml:1365 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1375 -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 ." -msgstr "" - -#.(title) -#: ../source/book.xml:1389 -msgid "Subversion in Action" -msgstr "" - -#.(para) -#: ../source/book.xml:1391 -msgid "It's time to move from the abstract to the concrete. In this section, we'll show real examples of Subversion being used." -msgstr "" - -#.(title) -#: ../source/book.xml:1397 -msgid "Subversion Repository URLs" -msgstr "" - -#.(para) -#: ../source/book.xml:1399 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1404 -#, no-wrap -msgid "\n$ svn checkout http://svn.example.com:9834/repos\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1408 -msgid "But there are some nuances in Subversion's handling of URLs that are notable. For example, URLs containing the file:// access method (used for local repositories) must, in accordance with convention, have either a server name of localhost or no server name at all:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1414 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos\n…\n$ svn checkout file://localhost/var/svn/repos\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1420 -msgid "Also, users of the file:// scheme on Windows platforms will need to use an unofficially standard 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 X is the drive on which the repository resides:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1428 -#, no-wrap -msgid "\nC:\\> svn checkout file:///X:/var/svn/repos\n…\nC:\\> svn checkout \"file:///X|/var/svn/repos\"\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1434 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1439 -msgid "Subversion's file:// URLs cannot be used in a regular web browser the way typical file:// URLs can. When you attempt to view a file:// 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 ), and your browser will not understand how to interact with that filesystem." -msgstr "" - -#.(para) -#: ../source/book.xml:1449 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1453 -#, no-wrap -msgid "\n$ svn checkout \"http://host/path with space/project/españa\"\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1456 -msgid "…then Subversion will escape the unsafe characters and behave as if you had typed:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1458 -#, no-wrap -msgid "\n$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1461 -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 svn program." -msgstr "" - -#.(title) -#: ../source/book.xml:1468 -msgid "Working Copies" -msgstr "" - -#.(para) -#: ../source/book.xml:1470 -msgid "You've already read about working copies; now we'll demonstrate how the Subversion client creates and uses them." -msgstr "" - -#.(para) -#: ../source/book.xml:1473 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1482 -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 publish 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:1490 -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 .svn, also known as the working copy administrative directory. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1499 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1504 -msgid "For example, suppose you have a repository that contains two software projects, paint and calc. Each project lives in its own top-level subdirectory, as shown in ." -msgstr "" - -#.(title) -#: ../source/book.xml:1510 -msgid "The repository's filesystem" -msgstr "" - -#.(para) -#: ../source/book.xml:1518 -msgid "To get a working copy, you must check out some subtree of the repository. (The term check out 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 /calc, you will get a working copy like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1525 -#, no-wrap -msgid "\n$ svn checkout http://svn.example.com/repos/calc\nA calc/Makefile\nA calc/integer.c\nA calc/button.c\nChecked out revision 56.\n\n$ ls -A calc\nMakefile integer.c button.c .svn/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1535 -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 /calc directory, with one additional entry—.svn—which holds the extra information needed by Subversion, as mentioned earlier." -msgstr "" - -#.(para) -#: ../source/book.xml:1542 -msgid "Suppose you make changes to button.c. Since the .svn 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 committing (or checking in) changes to the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:1550 -msgid "To publish your changes to others, you can use Subversion's commit command." -msgstr "" - -#.(screen) -#: ../source/book.xml:1552 -#, no-wrap -msgid "\n$ svn commit button.c -m \"Fixed a typo in button.c.\"\nSending button.c\nTransmitting file data .\nCommitted revision 57.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1558 -msgid "Now your changes to button.c 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 /calc, they will see your changes in the latest version of the file." -msgstr "" - -#.(para) -#: ../source/book.xml:1564 -msgid "Suppose you have a collaborator, Sally, who checked out a working copy of /calc at the same time you did. When you commit your change to button.c, Sally's working copy is left unchanged; Subversion only modifies working copies at the user's request." -msgstr "" - -#.(para) -#: ../source/book.xml:1570 -msgid "To bring her project up to date, Sally can ask Subversion to update her working copy, by using the Subversion update command. This will incorporate your changes into her working copy, as well as any others that have been committed since she checked it out." -msgstr "" - -#.(screen) -#: ../source/book.xml:1576 -#, no-wrap -msgid "\n$ pwd\n/home/sally/calc\n\n$ ls -A \n.svn/ Makefile integer.c button.c\n\n$ svn update\nU button.c\nUpdated to revision 57.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1587 -msgid "The output from the svn update command indicates that Subversion updated the contents of button.c. Note that Sally didn't need to specify which files to update; Subversion uses the information in the .svn directory, and further information in the repository, to decide which files need to be brought up to date." -msgstr "" - -#.(title) -#: ../source/book.xml:1596 -msgid "Repository URLs" -msgstr "" - -#.(para) -#: ../source/book.xml:1598 -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. describes how different URL schemes map to the available access methods." -msgstr "" - -#.(title) -#: ../source/book.xml:1608 -msgid "Repository Access URLs" -msgstr "" - -#.(entry) -#: ../source/book.xml:1613 -msgid "Schema" -msgstr "" - -#.(entry) -#: ../source/book.xml:1614 -msgid "Access Method" -msgstr "" - -#.(literal) -#: ../source/book.xml:1620 -msgid "file:///" -msgstr "" - -#.(entry) -#: ../source/book.xml:1622 -msgid "direct repository access (on local disk)" -msgstr "" - -#.(literal) -#: ../source/book.xml:1626 ../source/book.xml:1635 -msgid "http://" -msgstr "" - -#.(entry) -#: ../source/book.xml:1628 -msgid "access via WebDAV protocol to Subversion-aware Apache server" -msgstr "" - -#.(literal) -#: ../source/book.xml:1633 -msgid "https://" -msgstr "" - -#.(entry) -#: ../source/book.xml:1635 -msgid "same as , but with SSL encryption." -msgstr "" - -#.(literal) -#: ../source/book.xml:1640 ../source/book.xml:1649 -msgid "svn://" -msgstr "" - -#.(entry) -#: ../source/book.xml:1642 -msgid "access via custom protocol to an server" -msgstr "" - -#.(literal) -#: ../source/book.xml:1647 -msgid "svn+ssh://" -msgstr "" - -#.(entry) -#: ../source/book.xml:1649 -msgid "same as , but through an SSH tunnel." -msgstr "" - -#.(para) -#: ../source/book.xml:1655 -msgid "For more information on how Subversion parses URLs, see . For more information on the different types of network servers available for Subversion, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:1665 -msgid "Revisions" -msgstr "" - -#.(para) -#: ../source/book.xml:1667 -msgid "An svn commit 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1673 -msgid "By atomic transaction, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1678 -msgid "Each time the repository accepts a commit, this creates a new state of the filesystem tree, called a revision. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1685 -msgid " 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 snapshot of the way the repository looked after a commit." -msgstr "" - -#.(title) -#: ../source/book.xml:1693 -msgid "The repository" -msgstr "" - -#.(title) -#: ../source/book.xml:1703 -msgid "Global Revision Numbers" -msgstr "" - -#.(para) -#: ../source/book.xml:1705 -msgid "Unlike most version control systems, Subversion's revision numbers apply to entire trees, 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 revision 5 of foo.c, they really mean foo.c as it appears in revision 5. Notice that in general, revisions N and M of a file do not 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 for more details.)" -msgstr "" - -#.(para) -#: ../source/book.xml:1722 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1727 -#, no-wrap -msgid "\ncalc/Makefile:4\n integer.c:4\n button.c:4\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1732 -msgid "At the moment, this working directory corresponds exactly to revision 4 in the repository. However, suppose you make a change to button.c, 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1738 -#, no-wrap -msgid "\ncalc/Makefile:4\n integer.c:4\n button.c:5\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1743 -msgid "Suppose that, at this point, Sally commits a change to integer.c, creating revision 6. If you use svn update to bring your working copy up to date, then it will look like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:1747 -#, no-wrap -msgid "\ncalc/Makefile:6\n integer.c:6\n button.c:6\n" -msgstr "" - -#.(para) -#: ../source/book.xml:1752 -msgid "Sally's change to integer.c will appear in your working copy, and your change will still be present in button.c. In this example, the text of Makefile is identical in revisions 4, 5, and 6, but Subversion will mark your working copy of Makefile 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." -msgstr "" - -#.(title) -#: ../source/book.xml:1765 -msgid "How Working Copies Track the Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:1767 -msgid "For each file in a working directory, Subversion records two essential pieces of information in the .svn/ administrative area:" -msgstr "" - -#.(para) -#: ../source/book.xml:1772 -msgid "what revision your working file is based on (this is called the file's working revision), and" -msgstr "" - -#.(para) -#: ../source/book.xml:1777 -msgid "a timestamp recording when the local copy was last updated by the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:1781 -msgid "Given this information, by talking to the repository, Subversion can tell which of the following four states a working file is in:" -msgstr "" - -#.(term) -#: ../source/book.xml:1786 -msgid "Unchanged, and current" -msgstr "" - -#.(para) -#: ../source/book.xml:1788 -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 svn commit of the file will do nothing, and an svn update of the file will do nothing." -msgstr "" - -#.(term) -#: ../source/book.xml:1797 -msgid "Locally changed, and current" -msgstr "" - -#.(para) -#: ../source/book.xml:1799 -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 svn commit of the file will succeed in publishing your changes, and an svn update of the file will do nothing." -msgstr "" - -#.(term) -#: ../source/book.xml:1809 -msgid "Unchanged, and out-of-date" -msgstr "" - -#.(para) -#: ../source/book.xml:1811 -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 svn commit of the file will do nothing, and an svn update of the file will fold the latest changes into your working copy." -msgstr "" - -#.(term) -#: ../source/book.xml:1821 -msgid "Locally changed, and out-of-date" -msgstr "" - -#.(para) -#: ../source/book.xml:1823 -msgid "The file has been changed both in the working directory, and in the repository. An svn commit of the file will fail with an out-of-date error. The file should be updated first; an svn update 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." -msgstr "" - -#.(para) -#: ../source/book.xml:1835 -msgid "This may sound like a lot to keep track of, but the svn status command will show you the state of any item in your working copy. For more information on that command, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:1844 -msgid "Mixed Revision Working Copies" -msgstr "" - -#.(para) -#: ../source/book.xml:1846 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:1857 -msgid "Updates and Commits are Separate" -msgstr "" - -#.(para) -#: ../source/book.xml:1859 -msgid "One of the fundamental rules of Subversion is that a push action does not cause a pull, 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 svn update should gracefully merge repository changes into your own, rather than forcing you to publish them." -msgstr "" - -#.(para) -#: ../source/book.xml:1868 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1873 -msgid "For example, suppose you have a working copy entirely at revision 10. You edit the file foo.html and then perform an svn commit, 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 svn update, and svn commit doesn't pull down new changes. If, on the other hand, svn commitwere 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 push and pull remaining separate actions. Therefore the only safe thing the Subversion client can do is mark the one file—foo.html—as being at revision 15. The rest of the working copy remains at revision 10. Only by running svn update can the latest changes be downloaded, and the whole working copy be marked as revision 15." -msgstr "" - -#.(title) -#: ../source/book.xml:1901 -msgid "Mixed revisions are normal" -msgstr "" - -#.(para) -#: ../source/book.xml:1903 -msgid "The fact is, every time you run svn commit, 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 svn status --verbose command (see for more information.)" -msgstr "" - -#.(para) -#: ../source/book.xml:1914 -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 svn log command is used to display the history of changes to a file or directory (see ). 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 svn update hasn't been run in a long time), then the history of the older version of the object is shown." -msgstr "" - -#.(title) -#: ../source/book.xml:1931 -msgid "Mixed revisions are useful" -msgstr "" - -#.(para) -#: ../source/book.xml:1933 -msgid "If your project is sufficiently complex, you'll discover that it's sometimes nice to forcibly backdate (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 . 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 time machine aspect of a version control system—the feature which allows you to move any portion of your working copy forward and backward in history." -msgstr "" - -#.(title) -#: ../source/book.xml:1949 -msgid "Mixed revisions have limitations" -msgstr "" - -#.(para) -#: ../source/book.xml:1951 -msgid "However you make use of mixed revisions in your working copy, there are limitations to this flexibility." -msgstr "" - -#.(para) -#: ../source/book.xml:1953 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:1958 -msgid "Second, you cannot commit a metadata change to a directory unless it's fully up-to-date. You'll learn about attaching properties to items in . 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." -msgstr "" - -#.(title) -#: ../source/book.xml:1972 ../source/book.xml:3797 ../source/book.xml:9193 ../source/book.xml:11876 -msgid "Summary" -msgstr "" - -#.(para) -#: ../source/book.xml:1974 -msgid "We've covered a number of fundamental Subversion concepts in this chapter:" -msgstr "" - -#.(para) -#: ../source/book.xml:1978 -msgid "We've introduced the notions of the central repository, the client working copy, and the array of repository revision trees." -msgstr "" - -#.(para) -#: ../source/book.xml:1983 -msgid "We've seen some simple examples of how two collaborators can use Subversion to publish and receive changes from one another, using the copy-modify-merge model." -msgstr "" - -#.(para) -#: ../source/book.xml:1989 -msgid "We've talked a bit about the way Subversion tracks and manages information in a working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:1993 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:2006 -msgid "Basic Usage" -msgstr "" - -#.(para) -#: ../source/book.xml:2008 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:2017 -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 and are familiar with the general model of Subversion. For a complete reference of all commands, see ." -msgstr "" - -#.(title), (refpurpose) -#: ../source/book.xml:2029 ../source/book.xml:18754 ../source/book.xml:21620 ../source/book.xml:22644 -msgid "Help!" -msgstr "" - -#.(para) -#: ../source/book.xml:2031 -msgid "Before reading on, here is the most important command you'll ever need when using Subversion: svn help. The Subversion command-line client is self-documenting—at any time, a quick svn help SUBCOMMAND will describe the syntax, options, and behavior of the subcommand." -msgstr "" - -#.(screen) -#: ../source/book.xml:2037 -#, no-wrap -msgid "\n$ svn help import\nimport: Commit an unversioned file or tree into the repository.\nusage: import [PATH] URL\n\n Recursively commit a copy of PATH to URL.\n If PATH is omitted '.' is assumed.\n Parent directories are created as necessary in the repository.\n If PATH is a directory, the contents of the directory are added\n directly under URL.\n\nValid options:\n -q [--quiet] : print as little as possible\n -N [--non-recursive] : operate on single directory only\n…\n" -msgstr "" - -#.(title) -#: ../source/book.xml:2055 -msgid "Options and Switches and Flags, Oh My!" -msgstr "" - -#.(para) -#: ../source/book.xml:2057 -msgid "The Subversion command line client has numerous command modifiers (which we call options), but there are two distinct kinds of options—short options that are a single hyphen followed by a single letter, and long options that consist of two hyphens followed by a number of letters (eg -s and --this-is-a-long-option 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 usually 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." -msgstr "" - -#.(title) -#: ../source/book.xml:2080 -msgid "Getting Data into your Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:2082 -msgid "There are two ways to get new files into your Subversion repository: svn import and svn add. We'll discuss svn import here and svn add later in this chapter when we review a typical day with Subversion." -msgstr "" - -#.(title), (refname) -#: ../source/book.xml:2090 ../source/book.xml:18806 -msgid "svn import" -msgstr "" - -#.(para) -#: ../source/book.xml:2092 -msgid "The svn import command is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. svn import 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2099 -#, no-wrap -msgid "\n$ svnadmin create /var/svn/newrepos\n$ svn import mytree file:///var/svn/newrepos/some/project \\\n -m \"Initial import\"\nAdding mytree/foo.c\nAdding mytree/bar.c\nAdding mytree/subdir\nAdding mytree/subdir/quux.h\n\nCommitted revision 1.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2110 -msgid "The previous example copied the contents of directory mytree under the directory some/project in the repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2113 -#, no-wrap -msgid "\n$ svn list file:///var/svn/newrepos/some/project\nbar.c\nfoo.c\nsubdir/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2119 -msgid "Note that after the import is finished, the original tree is not converted into a working copy. To start working, you still need to svn checkout a fresh working copy of the tree." -msgstr "" - -#.(title) -#: ../source/book.xml:2127 -msgid "Recommended repository layout" -msgstr "" - -#.(para) -#: ../source/book.xml:2129 -msgid "While Subversion's flexibility allows you to layout your repository in any way that you choose, we recommend that you create a trunk directory to hold the main line of development, a branches directory to contain branch copies, and a tags directory to contain tag copies, for example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2136 -#, no-wrap -msgid "\n$ svn list file:///var/svn/repos\n/trunk\n/branches\n/tags\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2142 -msgid "You'll learn more about tags and branches in . For details and how to set up multiple projects, see and to read more about project roots." -msgstr "" - -#.(title) -#: ../source/book.xml:2152 -msgid "Initial Checkout" -msgstr "" - -#.(para) -#: ../source/book.xml:2154 -msgid "Most of the time, you will start using a Subversion repository by doing a checkout of your project. Checking out a repository creates a working copy of it on your local machine. This copy contains the HEAD (latest revision) of the Subversion repository that you specify on the command line:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2160 -#, no-wrap -msgid "\n$ svn checkout http://svn.collab.net/repos/svn/trunk\nA trunk/Makefile.in\nA trunk/ac-helpers\nA trunk/ac-helpers/install.sh\nA trunk/ac-helpers/install-sh\nA trunk/build.conf\n…\nChecked out revision 8810.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:2172 -msgid "What's in a Name?" -msgstr "" - -#.(para) -#: ../source/book.xml:2174 -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 tells you how to give Subversion a hint that textual operations don't make sense for a particular file. There are a few places, however, where Subversion places restrictions on information it stores." -msgstr "" - -#.(para) -#: ../source/book.xml:2183 -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)." -msgstr "" - -#.(para) -#: ../source/book.xml:2192 -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 or ." -msgstr "" - -#.(para) -#: ../source/book.xml:2199 -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 legally correct versions for internal use." -msgstr "" - -#.(para) -#: ../source/book.xml:2209 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2213 -#, no-wrap -msgid "\n$ svn checkout \\\n http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/\nA cmdline/revert_tests.py\nA cmdline/diff_tests.py\nA cmdline/autoprop_tests.py\nA cmdline/xmltests\nA cmdline/xmltests/svn-test.sh\n…\nChecked out revision 8810.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2224 -msgid "Since Subversion uses a copy-modify-merge model instead of lock-modify-unlock (see ), 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2232 -msgid "While your working copy is just like any other collection of files and directories on your system, you can edit files at will, but you must tell Subversion about everything else that you do. For example, if you want to copy or move an item in a working copy, you should use svn copy or svn move instead of the copy and move commands provided by your operating system. We'll talk more about them later in this chapter." -msgstr "" - -#.(para) -#: ../source/book.xml:2242 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:2248 -msgid "What's with the .svn directory?" -msgstr "" - -#.(para) -#: ../source/book.xml:2250 -msgid "Every directory in a working copy contains an administrative area, a subdirectory named .svn. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2257 -msgid "If you accidentally remove the .svn subdirectory, the easiest way to fix the problem is to remove the entire containing directory (a normal system deletion, not svn delete), then run svn update from a parent directory. The Subversion client will re-download the directory you've deleted, with a new .svn area as well." -msgstr "" - -#.(para) -#: ../source/book.xml:2265 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2269 -#, no-wrap -msgid "\n$ svn checkout http://svn.collab.net/repos/svn/trunk subv\nA subv/Makefile.in\nA subv/ac-helpers\nA subv/ac-helpers/install.sh\nA subv/ac-helpers/install-sh\nA subv/build.conf\n…\nChecked out revision 8810.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2279 -msgid "That will place your working copy in a directory named subv instead of a directory named trunk as we did previously. The directory subv will be created if it doesn't already exist." -msgstr "" - -#.(title) -#: ../source/book.xml:2286 -msgid "Disabling Password Caching" -msgstr "" - -#.(para) -#: ../source/book.xml:2293 -msgid "Of course, you're not terribly worried—first because you know that you can't really 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?" -msgstr "" - -#.(para) -#: ../source/book.xml:2288 -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, you can disable caching either permanently or on a case-by-case basis." -msgstr "" - -#.(para) -#: ../source/book.xml:2301 -msgid "To disable password caching for a particular one-time command, pass the option on the commandline. To permanently disable caching, you can add the line store-passwords = no to your local machine's Subversion configuration file. See for details." -msgstr "" - -#.(title) -#: ../source/book.xml:2310 -msgid "Authenticating as a Different User" -msgstr "" - -#.(para) -#: ../source/book.xml:2312 -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 on the commandline and Subversion will attempt to authenticate as that user, prompting you for a password if necessary." -msgstr "" - -#.(title) -#: ../source/book.xml:2328 -msgid "Basic Work Cycle" -msgstr "" - -#.(para) -#: ../source/book.xml:2330 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:2335 -msgid "The typical work cycle looks like this:" -msgstr "" - -#.(para) -#: ../source/book.xml:2338 -msgid "Update your working copy" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2342 ../source/book.xml:2402 ../source/book.xml:21115 -msgid "svn update" -msgstr "" - -#.(para) -#: ../source/book.xml:2348 -msgid "Make changes" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2352 ../source/book.xml:17472 -msgid "svn add" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2357 ../source/book.xml:18278 -msgid "svn delete" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2362 ../source/book.xml:18099 -msgid "svn copy" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2367 ../source/book.xml:19754 -msgid "svn move" -msgstr "" - -#.(para) -#: ../source/book.xml:2373 -msgid "Examine your changes" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2377 ../source/book.xml:20521 ../source/book.xml:24894 -msgid "svn status" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2382 ../source/book.xml:3353 ../source/book.xml:18388 ../source/book.xml:24902 -msgid "svn diff" -msgstr "" - -#.(para) -#: ../source/book.xml:2388 -msgid "Possibly undo some changes" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2392 ../source/book.xml:20415 ../source/book.xml:24910 -msgid "svn revert" -msgstr "" - -#.(para) -#: ../source/book.xml:2398 -msgid "Resolve Conflicts (Merge Others' Changes)" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2407 ../source/book.xml:20326 -msgid "svn resolved" -msgstr "" - -#.(para) -#: ../source/book.xml:2413 -msgid "Commit your changes" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:2417 ../source/book.xml:17971 -msgid "svn commit" -msgstr "" - -#.(title) -#: ../source/book.xml:2426 -msgid "Update Your Working Copy" -msgstr "" - -#.(para) -#: ../source/book.xml:2428 -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 svn update to bring your working copy into sync with the latest revision in the repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:2433 -#, no-wrap -msgid "\n$ svn update\nU foo.c\nU bar.c\nUpdated to revision 2.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2439 -msgid "In this case, someone else checked in modifications to both foo.c and bar.c since the last time you updated, and Subversion has updated your working copy to include those changes." -msgstr "" - -#.(para) -#: ../source/book.xml:2443 -msgid "When the server sends changes to your working copy via svn update, 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 ." -msgstr "" - -#.(title) -#: ../source/book.xml:2452 -msgid "Make Changes to Your Working Copy" -msgstr "" - -#.(para) -#: ../source/book.xml:2454 -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 svn add, svn delete, svn copy, svn move, and svn mkdir. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2464 -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 mark 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2477 -msgid "Here is an overview of the five Subversion subcommands that you'll use most often to make tree changes." -msgstr "" - -#.(title) -#: ../source/book.xml:2481 -msgid "Versioning symbolic links" -msgstr "" - -#.(para) -#: ../source/book.xml:2483 -msgid "On non-Windows platforms, Subversion is able to version files of the special type symbolic link (or, symlink). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2490 -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 points. 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." -msgstr "" - -#.(command) -#: ../source/book.xml:2508 -msgid "svn add foo" -msgstr "" - -#.(para) -#: ../source/book.xml:2511 -msgid "Schedule file, directory, or symbolic link foo to be added to the repository. When you next commit, foo will become a child of its parent directory. Note that if foo is a directory, everything underneath foo will be scheduled for addition. If you only want to add foo itself, pass the option." -msgstr "" - -#.(command) -#: ../source/book.xml:2524 -msgid "svn delete foo" -msgstr "" - -#.(para) -#: ../source/book.xml:2536 -msgid "Of course, nothing is ever totally deleted from the repository—just from the HEAD 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:2527 -msgid "Schedule file, directory, or symbolic link foo to be deleted from the repository. If foo is a file or link, it is immediately deleted from your working copy. If foo is a directory, it is not deleted, but Subversion schedules it for deletion. When you commit your changes, foo will be entirely removed from your working copy and the repository. " -msgstr "" - -#.(command) -#: ../source/book.xml:2548 -msgid "svn copy foo bar" -msgstr "" - -#.(para) -#: ../source/book.xml:2551 -msgid "Create a new item bar as a duplicate of foo and automatically schedule bar for addition. When bar is added to the repository on the next commit, its copy history is recorded (as having originally come from foo). svn copy does not create intermediate directories unless you pass the ." -msgstr "" - -#.(command) -#: ../source/book.xml:2564 -msgid "svn move foo bar" -msgstr "" - -#.(para) -#: ../source/book.xml:2567 -msgid "This command is exactly the same as running svn copy foo bar; svn delete foo. That is, bar is scheduled for addition as a copy of foo, and foo is scheduled for removal. svn move does not create intermediate directories unless you pass the ." -msgstr "" - -#.(command) -#: ../source/book.xml:2579 -msgid "svn mkdir blort" -msgstr "" - -#.(para) -#: ../source/book.xml:2582 -msgid "This command is exactly the same as running mkdir blort; svn add blort. That is, a new directory named blort is created and scheduled for addition." -msgstr "" - -#.(title) -#: ../source/book.xml:2591 -msgid "Changing the Repository Without a Working Copy" -msgstr "" - -#.(para) -#: ../source/book.xml:2593 -msgid "There are 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 svn mkdir, svn copy, svn move, and svn delete can work with URLs (And don't forget that svn import always makes changes to a URL)." -msgstr "" - -#.(para) -#: ../source/book.xml:2602 -msgid "URL operations behave in this manner because commands that operate on a working copy can use the working copy as a sort of staging area 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." -msgstr "" - -#.(title) -#: ../source/book.xml:2614 -msgid "Examine Your Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:2616 -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 svn status, and dig into the details of those changes by using svn diff." -msgstr "" - -#.(title) -#: ../source/book.xml:2630 -msgid "Look Ma! No Network!" -msgstr "" - -#.(para) -#: ../source/book.xml:2639 -msgid "And also that you don't have a WAN card. Thought you got us, huh?" -msgstr "" - -#.(para) -#: ../source/book.xml:2632 -msgid "The commands svn status, svn diff, and svn revert can be used without any network access even if your repository is 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2642 -msgid "Subversion does this by keeping private caches of pristine versions of each versioned file inside of the .svn administrative areas. This allows Subversion to report—and revert—local modifications to those files without network access. This cache (called the text-base) also allows Subversion to send the user's local modifications during a commit to the server as a compressed delta (or difference) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2657 -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 pristine copy of each version controlled file within the .svn 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." -msgstr "" - -#.(title) -#: ../source/book.xml:2668 -msgid "See an overview of your changes" -msgstr "" - -#.(para) -#: ../source/book.xml:2670 -msgid "To get an overview of your changes, you'll use the svn status command. You'll probably use svn status more than any other Subversion command." -msgstr "" - -#.(title) -#: ../source/book.xml:2676 -msgid "CVS Users: Hold That Update!" -msgstr "" - -#.(para) -#: ../source/book.xml:2678 -msgid "You're probably used to using cvs update to see what changes you've made to your working copy. svn status 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2685 -msgid "In Subversion, update 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 update command to see what local modifications you've made." -msgstr "" - -#.(para) -#: ../source/book.xml:2692 -msgid "If you run svn status 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 svn status can return. (Note that the text following # is not actually printed by svn status.)" -msgstr "" - -#.(screen) -#: ../source/book.xml:2699 -#, no-wrap -msgid "\nA stuff/loot/bloo.h # file is scheduled for addition\nC stuff/loot/lump.c # file has textual conflicts from an update\nD stuff/fish.c # file is scheduled for deletion\nM bar.c # the content in bar.c has local modifications\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2705 -msgid "In this output format svn status 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:" -msgstr "" - -#.(computeroutput) -#: ../source/book.xml:2713 -#, no-wrap -msgid "A item" -msgstr "" - -#.(para) -#: ../source/book.xml:2716 -msgid "The file, directory, or symbolic link item has been scheduled for addition into the repository." -msgstr "" - -#.(computeroutput) -#: ../source/book.xml:2723 -#, no-wrap -msgid "C item" -msgstr "" - -#.(para) -#: ../source/book.xml:2726 -msgid "The file item 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." -msgstr "" - -#.(computeroutput) -#: ../source/book.xml:2736 -#, no-wrap -msgid "D item" -msgstr "" - -#.(para) -#: ../source/book.xml:2739 -msgid "The file, directory, or symbolic link item has been scheduled for deletion from the repository." -msgstr "" - -#.(computeroutput) -#: ../source/book.xml:2746 -#, no-wrap -msgid "M item" -msgstr "" - -#.(para) -#: ../source/book.xml:2749 -msgid "The contents of the file item have been modified." -msgstr "" - -#.(para) -#: ../source/book.xml:2754 -msgid "If you pass a specific path to svn status, you get information about that item alone:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2757 -#, no-wrap -msgid "\n$ svn status stuff/fish.c\nD stuff/fish.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2761 -msgid "svn status also has a option, which will show you the status of every item in your working copy, even if it has not been changed:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2765 -#, no-wrap -msgid "\n$ svn status -v\nM 44 23 sally README\n 44 30 sally INSTALL\nM 44 20 harry bar.c\n 44 18 ira stuff\n 44 35 harry stuff/trout.c\nD 44 19 ira stuff/fish.c\n 44 21 sally stuff/things\nA 0 ? ? stuff/things/bloo.h\n 44 36 harry stuff/things/gloo.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2777 -msgid "This is the long form output of svn status. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2783 -msgid "None of the prior invocations to svn status contact the repository—instead, they compare the metadata in the .svn directory with the working copy. Finally, there is the option, which contacts the repository and adds information about things that are out-of-date:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2790 -#, no-wrap -msgid "\n$ svn status -u -v\nM * 44 23 sally README\nM 44 20 harry bar.c\n * 44 35 harry stuff/trout.c\nD 44 19 ira stuff/fish.c\nA 0 ? ? stuff/things/bloo.h\nStatus against revision: 46\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2799 -msgid "Notice the two asterisks: if you were to run svn update at this point, you would receive changes to README and trout.c. This tells you some very useful information—you'll need to update and get the server changes on README before you commit, or the repository will reject your commit for being out-of-date. (More on this subject later.)" -msgstr "" - -#.(para) -#: ../source/book.xml:2807 -msgid "svn status 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 ." -msgstr "" - -#.(title) -#: ../source/book.xml:2815 -msgid "Examine the details of your local modifications" -msgstr "" - -#.(para) -#: ../source/book.xml:2817 -msgid "Another way to examine your changes is with the svn diff command. You can find out exactly how you've modified things by running svn diff with no arguments, which prints out file changes in unified diff format:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2823 -#, no-wrap -msgid "\n$ svn diff\nIndex: bar.c\n===================================================================\n--- bar.c\t(revision 3)\n+++ bar.c\t(working copy)\n@@ -1,7 +1,12 @@\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <unistd.h>\n+\n+#include <stdio.h>\n\n int main(void) {\n- printf(\"Sixty-four slices of American Cheese...\\n\");\n+ printf(\"Sixty-five slices of American Cheese...\\n\");\n return 0;\n }\n\nIndex: README\n===================================================================\n--- README\t(revision 3)\n+++ README\t(working copy)\n@@ -193,3 +193,4 @@\n+Note to self: pick up laundry.\n\nIndex: stuff/fish.c\n===================================================================\n--- stuff/fish.c\t(revision 1)\n+++ stuff/fish.c\t(working copy)\n-Welcome to the file known as 'fish'.\n-Information on fish will be here soon.\n\nIndex: stuff/things/bloo.h\n===================================================================\n--- stuff/things/bloo.h\t(revision 8)\n+++ stuff/things/bloo.h\t(working copy)\n+Here is a new file to describe\n+things about bloo.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2863 -msgid "The svn diff command produces this output by comparing your working files against the cached pristine copies within the .svn area. Files scheduled for addition are displayed as all added-text, and files scheduled for deletion are displayed as all deleted text." -msgstr "" - -#.(para) -#: ../source/book.xml:2870 -msgid "Output is displayed in unified diff format. That is, removed lines are prefaced with - and added lines are prefaced with +. svn diff also prints filename and offset information useful to the patch program, so you can generate patches by redirecting the diff output to a file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2878 -#, no-wrap -msgid "\n$ svn diff > patchfile\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2881 -msgid "You could, for example, email the patch file to another developer for review or testing prior to commit." -msgstr "" - -#.(para) -#: ../source/book.xml:2883 -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 and pass any flags you'd like to it using the option. For example, to see local differences in file foo.c in context output format while ignoring case differences, you might run svn diff --diff-cmd /usr/bin/diff --extensions '-i' foo.c." -msgstr "" - -#.(title) -#: ../source/book.xml:2898 -msgid "Undoing Working Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:2900 -msgid "Suppose while viewing the output of svn diff 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2905 -msgid "This is a perfect opportunity to use svn revert:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2907 -#, no-wrap -msgid "\n$ svn revert README\nReverted 'README'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2911 -msgid "Subversion reverts the file to its pre-modified state by overwriting it with the cached pristine copy from the .svn area. But also note that svn revert can undo any scheduled operations—for example, you might decide that you don't want to add a new file after all:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2918 -#, no-wrap -msgid "\n$ svn status foo\n? foo\n\n$ svn add foo\nA foo\n\n$ svn revert foo\nReverted 'foo'\n\n$ svn status foo\n? foo\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2932 -msgid "svn revertITEM has exactly the same effect as deleting ITEM from your working copy and then running svn update -r BASEITEM. However, if you're reverting a file, svn revert has one very noticeable difference—it doesn't have to communicate with the repository to restore your file." -msgstr "" - -#.(para) -#: ../source/book.xml:2941 -msgid "Or perhaps you mistakenly removed a file from version control:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2943 -#, no-wrap -msgid "\n$ svn status README\n README\n\n$ svn delete README\nD README\n\n$ svn revert README\nReverted 'README'\n\n$ svn status README\n README\n" -msgstr "" - -#.(title) -#: ../source/book.xml:2960 -msgid "Resolve Conflicts (Merging Others' Changes)" -msgstr "" - -#.(para) -#: ../source/book.xml:2962 -msgid "We've already seen how svn status -u can predict conflicts. Suppose you run svn update and some interesting things occur:" -msgstr "" - -#.(screen) -#: ../source/book.xml:2965 -#, no-wrap -msgid "\n$ svn update\nU INSTALL\nG README\nC bar.c\nUpdated to revision 46.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:2972 -msgid "The U and G codes are no cause for concern; those files cleanly absorbed changes from the repository. The files marked with U contained no local changes but were Updated with changes from the repository. The G stands for merGed, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:2983 -msgid "But the C stands for conflict. This means that the changes from the server overlapped with your own, and now you have to manually choose between them." -msgstr "" - -#.(para) -#: ../source/book.xml:2987 -msgid "Whenever a conflict occurs, three things typically occur to assist you in noticing and resolving that conflict:" -msgstr "" - -#.(para) -#: ../source/book.xml:2991 -msgid "Subversion prints a C during the update, and remembers that the file is in a state of conflict." -msgstr "" - -#.(para) -#: ../source/book.xml:2996 -msgid "If Subversion considers the file to be mergeable, it places conflict markers—special strings of text which delimit the sides of the conflict—into the file to visibly demonstrate the overlapping areas. (Subversion uses the svn:mime-type property to decide if a file is capable of contextual, line-based merging. See to learn more.)" -msgstr "" - -#.(para) -#: ../source/book.xml:3007 -msgid "For every conflicted file, Subversion places three extra unversioned files in your working copy:" -msgstr "" - -#.(filename) -#: ../source/book.xml:3012 -msgid "filename.mine" -msgstr "" - -#.(para) -#: ../source/book.xml:3015 -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 .mine file isn't created, since it would be identical to the working file.)" -msgstr "" - -#.(filename) -#: ../source/book.xml:3026 -msgid "filename.rOLDREV" -msgstr "" - -#.(para) -#: ../source/book.xml:3029 -msgid "This is the file that was the BASE revision before you updated your working copy. That is, the file that you checked out before you made your latest edits." -msgstr "" - -#.(filename) -#: ../source/book.xml:3038 -msgid "filename.rNEWREV" -msgstr "" - -#.(para) -#: ../source/book.xml:3041 -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 HEAD revision of the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:3049 -msgid "Here OLDREV is the revision number of the file in your .svn directory and NEWREV is the revision number of the repository HEAD." -msgstr "" - -#.(para) -#: ../source/book.xml:3055 -msgid "For example, Sally makes changes to the file sandwich.txt 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3060 -#, no-wrap -msgid "\n$ svn update\nC sandwich.txt\nUpdated to revision 2.\n$ ls -1\nsandwich.txt\nsandwich.txt.mine\nsandwich.txt.r1\nsandwich.txt.r2\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3070 -msgid "At this point, Subversion will not allow you to commit the file sandwich.txt until the three temporary files are removed." -msgstr "" - -#.(screen) -#: ../source/book.xml:3073 -#, no-wrap -msgid "\n$ svn commit -m \"Add a few more things\"\nsvn: Commit failed (details follow):\nsvn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3078 -msgid "If you get a conflict, you need to do one of three things:" -msgstr "" - -#.(para) -#: ../source/book.xml:3082 -msgid "Merge the conflicted text by hand (by examining and editing the conflict markers within the file)." -msgstr "" - -#.(para) -#: ../source/book.xml:3087 -msgid "Copy one of the temporary files on top of your working file." -msgstr "" - -#.(para) -#: ../source/book.xml:3091 -msgid "Run svn revert <filename> to throw away all of your local changes." -msgstr "" - -#.(para) -#: ../source/book.xml:3099 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:3095 -msgid "Once you've resolved the conflict, you need to let Subversion know by running svn resolved. This removes the three temporary files and Subversion no longer considers the file to be in a state of conflict." -msgstr "" - -#.(screen) -#: ../source/book.xml:3102 -#, no-wrap -msgid "\n$ svn resolved sandwich.txt\nResolved conflicted state of 'sandwich.txt'\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3109 -msgid "Merging Conflicts by Hand" -msgstr "" - -#.(para) -#: ../source/book.xml:3111 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:3114 -msgid "Here's an example. Due to a miscommunication, you and Sally, your collaborator, both edit the file sandwich.txt 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 sandwich.txt to resolve the conflicts. First, let's take a look at the file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3121 -#, no-wrap -msgid "\n$ cat sandwich.txt\nTop piece of bread\nMayonnaise\nLettuce\nTomato\nProvolone\n<<<<<<< .mine\nSalami\nMortadella\nProsciutto\n=======\nSauerkraut\nGrilled Chicken\n>>>>>>> .r2\nCreole Mustard\nBottom piece of bread\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3139 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3146 -#, no-wrap -msgid "\n<<<<<<< .mine\nSalami\nMortadella\nProsciutto\n=======\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3153 -msgid "The text between the second and third sets of conflict markers is the text from Sally's commit:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3155 -#, no-wrap -msgid "\n=======\nSauerkraut\nGrilled Chicken\n>>>>>>> .r2\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3166 -msgid "And if you ask them for it, they may very well ride you out of town on a rail." -msgstr "" - -#.(para) -#: ../source/book.xml:3161 -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. Once you've agreed on the changes you will check in, edit your file and remove the conflict markers." -msgstr "" - -#.(screen) -#: ../source/book.xml:3171 -#, no-wrap -msgid "\nTop piece of bread\nMayonnaise\nLettuce\nTomato\nProvolone\nSalami\nMortadella\nProsciutto\nCreole Mustard\nBottom piece of bread\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3183 -msgid "Now run svn resolved, and you're ready to commit your changes:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3185 -#, no-wrap -msgid "\n$ svn resolved sandwich.txt\n$ svn commit -m \"Go ahead and use my sandwich, discarding Sally's edits.\"\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3189 -msgid "Note that svn resolved, 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 svn resolved 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." -msgstr "" - -#.(para) -#: ../source/book.xml:3196 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:3206 -msgid "Copying a File Onto Your Working File" -msgstr "" - -#.(para) -#: ../source/book.xml:3208 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3212 -#, no-wrap -msgid "\n$ svn update\nC sandwich.txt\nUpdated to revision 2.\n$ ls sandwich.*\nsandwich.txt sandwich.txt.mine sandwich.txt.r2 sandwich.txt.r1\n$ cp sandwich.txt.r2 sandwich.txt\n$ svn resolved sandwich.txt\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3225 -msgid "Punting: Using svn revert" -msgstr "" - -#.(para) -#: ../source/book.xml:3227 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3230 -#, no-wrap -msgid "\n$ svn revert sandwich.txt\nReverted 'sandwich.txt'\n$ ls sandwich.*\nsandwich.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3236 -msgid "Note that when you revert a conflicted file, you don't have to run svn resolved." -msgstr "" - -#.(title) -#: ../source/book.xml:3243 -msgid "Commit Your Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:3245 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:3248 -msgid "The svn commit command sends all of your changes to the repository. When you commit a change, you need to supply a log message, 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 (or ) option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3256 -#, no-wrap -msgid "\n$ svn commit -m \"Corrected number of cheese slices.\"\nSending sandwich.txt\nTransmitting file data .\nCommitted revision 3.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3262 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3266 -#, no-wrap -msgid "\n$ svn commit -F logmsg\nSending sandwich.txt\nTransmitting file data .\nCommitted revision 4.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3272 -msgid "If you fail to specify either the or option, then Subversion will automatically launch your favorite editor (see the editor-cmd section in ) for composing a log message." -msgstr "" - -#.(para) -#: ../source/book.xml:3279 -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." -msgstr "" - -#.(screen) -#: ../source/book.xml:3284 -#, no-wrap -msgid "\n$ svn commit\nWaiting for Emacs...Done\n\nLog message unchanged or not specified\na)bort, c)ontinue, e)dit\na\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3294 -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 has done that, the entire commit will fail with a message informing you that one or more of your files is out-of-date:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3300 -#, no-wrap -msgid "\n$ svn commit -m \"Add another rule\"\nSending rules.txt\nsvn: Commit failed (details follow):\nsvn: Your file or directory 'sandwich.txt' is probably out-of-date\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3307 -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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:3310 -msgid "At this point, you need to run svn update, deal with any merges or conflicts that result, and attempt your commit again." -msgstr "" - -#.(para) -#: ../source/book.xml:3313 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:3327 -msgid "Examining History" -msgstr "" - -#.(para) -#: ../source/book.xml:3329 -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 peer into the past instead of going into the past." -msgstr "" - -#.(para) -#: ../source/book.xml:3338 -msgid "There are several commands that can provide you with historical data from the repository:" -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:3343 ../source/book.xml:19323 -msgid "svn log" -msgstr "" - -#.(para) -#: ../source/book.xml:3346 -msgid "Shows you broad information: log messages with date and author information attached to revisions, and which paths changed in each revision." -msgstr "" - -#.(para) -#: ../source/book.xml:3356 -msgid "Shows line-level details of a particular change." -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:3361 ../source/book.xml:3638 ../source/book.xml:17679 -msgid "svn cat" -msgstr "" - -#.(para) -#: ../source/book.xml:3364 -msgid "Retrieves a file as it existed in a particular revision number and display it on your screen." -msgstr "" - -#.(command), (refname) -#: ../source/book.xml:3370 ../source/book.xml:3663 ../source/book.xml:19111 -msgid "svn list" -msgstr "" - -#.(para) -#: ../source/book.xml:3373 -msgid "Displays the files in a directory for any given revision." -msgstr "" - -#.(title) -#: ../source/book.xml:3381 -msgid "Generating a list of historical changes" -msgstr "" - -#.(para) -#: ../source/book.xml:3383 -msgid "To find information about the history of a file or directory, use the svn log command. svn log 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:3390 -#, no-wrap -msgid "\n$ svn log\n------------------------------------------------------------------------\nr3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line\n\nAdded include lines and corrected # of cheese slices.\n------------------------------------------------------------------------\nr2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line\n\nAdded main() methods.\n------------------------------------------------------------------------\nr1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line\n\nInitial import\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3406 -msgid "Note that the log messages are printed in reverse chronological order by default. If you wish to see a different range of revisions in a particular order, or just a single revision, pass the option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3411 -#, no-wrap -msgid "\n$ svn log -r 5:19 # shows logs 5 through 19 in chronological order\n\n$ svn log -r 19:5 # shows logs 5 through 19 in reverse order\n\n$ svn log -r 8 # shows log for revision 8\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3418 -msgid "You can also examine the log history of a single file or directory. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3420 -#, no-wrap -msgid "\n$ svn log foo.c\n…\n$ svn log http://foo.com/svn/trunk/code/foo.c\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3426 -msgid "These will display log messages only for those revisions in which the working file (or URL) changed." -msgstr "" - -#.(title) -#: ../source/book.xml:3431 -msgid "Why Does svn log Not Show Me What I Just Committed?" -msgstr "" - -#.(para) -#: ../source/book.xml:3434 -msgid "If you make a commit and immediately type svn log 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 svn commit and the default behavior of svn log. First, when you commit changes to the repository, svn only bumps the revision of files (and directories) that it commits, so usually the parent directory remains at the older revision (See for why). svn log 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 svn log by using the () option." -msgstr "" - -#.(para) -#: ../source/book.xml:3452 -msgid "If you want even more information about a file or directory, svn log also takes a 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, svn log will include a list of changed paths in a revision in its output:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3459 -#, no-wrap -msgid "\n$ svn log -r 8 -v\n------------------------------------------------------------------------\nr8 | sally | 2002-07-14 08:15:29 -0500 | 1 line\nChanged paths:\nM /trunk/code/foo.c\nM /trunk/code/bar.h\nA /trunk/code/doc/README\n\nFrozzled the sub-space winch.\n\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3472 -msgid "svn log also takes a () option, which suppresses the body of the log message. When combined with , it gives just the names of the changed files." -msgstr "" - -#.(title) -#: ../source/book.xml:3478 -msgid "Why Does svn log Give Me an Empty Response?" -msgstr "" - -#.(para) -#: ../source/book.xml:3481 -msgid "After working with Subversion for a bit, most users will come across something like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3483 -#, no-wrap -msgid "\n$ svn log -r 2\n------------------------------------------------------------------------\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3488 -msgid "At first glance, this seems like an error. But recall that while revisions are repository-wide, svn log 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 svn log directly at the top-most URL of your repository, as in svn log -r 2 http://svn.collab.net/repos/svn." -msgstr "" - -#.(title) -#: ../source/book.xml:3505 -msgid "Examining the details of historical changes" -msgstr "" - -#.(para) -#: ../source/book.xml:3507 -msgid "We've already seen svn diff 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." -msgstr "" - -#.(para) -#: ../source/book.xml:3511 -msgid "In fact, it turns out that there are three distinct uses of svn diff:" -msgstr "" - -#.(para) -#: ../source/book.xml:3516 -msgid "Examining local changes" -msgstr "" - -#.(para) -#: ../source/book.xml:3519 -msgid "Comparing your working copy to the repository" -msgstr "" - -#.(para) -#: ../source/book.xml:3522 -msgid "Comparing repository to repository" -msgstr "" - -#.(title) -#: ../source/book.xml:3528 -msgid "Examining Local Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:3530 -msgid "As we've seen, invoking svn diff with no options will compare your working files to the cached pristine copies in the .svn area:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3534 -#, no-wrap -msgid "\n$ svn diff\nIndex: rules.txt\n===================================================================\n--- rules.txt\t(revision 3)\n+++ rules.txt\t(working copy)\n@@ -1,4 +1,5 @@\n Be kind to others\n Freedom = Responsibility\n Everything in moderation\n-Chew with your mouth open\n+Chew with your mouth closed\n+Listen when others are speaking\n$\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3553 -msgid "Comparing Working Copy to Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:3555 -msgid "If a single () number is passed, then your working copy is compared to the specified revision in the repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:3559 -#, no-wrap -msgid "\n$ svn diff -r 3 rules.txt\nIndex: rules.txt\n===================================================================\n--- rules.txt\t(revision 3)\n+++ rules.txt\t(working copy)\n@@ -1,4 +1,5 @@\n Be kind to others\n Freedom = Responsibility\n Everything in moderation\n-Chew with your mouth open\n+Chew with your mouth closed\n+Listen when others are speaking\n$\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3578 -msgid "Comparing Repository to Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:3580 -msgid "If two revision numbers, separated by a colon, are passed via , then the two revisions are directly compared." -msgstr "" - -#.(screen) -#: ../source/book.xml:3583 -#, no-wrap -msgid "\n$ svn diff -r 2:3 rules.txt\nIndex: rules.txt\n===================================================================\n--- rules.txt\t(revision 2)\n+++ rules.txt\t(revision 3)\n@@ -1,4 +1,4 @@\n Be kind to others\n-Freedom = Chocolate Ice Cream\n+Freedom = Responsibility\n Everything in moderation\n Chew with your mouth open\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3597 -msgid "A more convenient way of comparing a revision to the previous revision is to use the :" -msgstr "" - -#.(screen) -#: ../source/book.xml:3600 -#, no-wrap -msgid "\n$ svn diff -c 3 rules.txt\nIndex: rules.txt\n===================================================================\n--- rules.txt\t(revision 2)\n+++ rules.txt\t(revision 3)\n@@ -1,4 +1,4 @@\n Be kind to others\n-Freedom = Chocolate Ice Cream\n+Freedom = Responsibility\n Everything in moderation\n Chew with your mouth open\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3614 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3617 -#, no-wrap -msgid "\n$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt\n…\n$\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3627 -msgid "Browsing the repository" -msgstr "" - -#.(para) -#: ../source/book.xml:3629 -msgid "Using svn cat and svn list, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:3641 -msgid "If you want to examine an earlier version of a file and not necessarily the differences between two files, you can use svn cat:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3644 -#, no-wrap -msgid "\n$ svn cat -r 2 rules.txt\nBe kind to others\nFreedom = Chocolate Ice Cream\nEverything in moderation\nChew with your mouth open\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3652 -msgid "You can also redirect the output directly into a file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3654 -#, no-wrap -msgid "\n$ svn cat -r 2 rules.txt > rules.txt.v2\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3666 -msgid "The svn list command shows you what files are in a repository directory without actually downloading the files to your local machine:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3669 -#, no-wrap -msgid "\n$ svn list http://svn.collab.net/repos/svn\nREADME\nbranches/\nclients/\ntags/\ntrunk/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3677 -msgid "If you want a more detailed listing, pass the flag to get output like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3680 -#, no-wrap -msgid "\n$ svn list -v http://svn.collab.net/repos/svn\n 20620 harry 1084 Jul 13 2006 README\n 23339 harry Feb 04 01:40 branches/\n 21282 sally Aug 27 09:41 developer-resources/\n 23198 harry Jan 23 17:17 tags/\n 23351 sally Feb 05 13:26 trunk/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3688 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:3693 -msgid "The svn list with no arguments defaults to the repository URL of the current working directory, not the local working copy directory. After all, if you wanted a listing of your local directory, you could use just plain ls (or any reasonable non-Unixy equivalent)." -msgstr "" - -#.(title) -#: ../source/book.xml:3706 -msgid "Fetching older repository snapshots" -msgstr "" - -#.(para) -#: ../source/book.xml:3712 -msgid "See? We told you that Subversion was a time machine." -msgstr "" - -#.(para) -#: ../source/book.xml:3708 -msgid "In addition to all of the above commands, you can use svn update and svn checkout with the option to take an entire working copy back in time:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3714 -#, no-wrap -msgid "\n$ svn checkout -r 1729 # Checks out a new working copy at r1729\n…\n$ svn update -r 1729 # Updates an existing working copy to r1729\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3721 -msgid "Many Subversion newcomers attempt to use the above svn update example to undo 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 for a description of how to undo a commit." -msgstr "" - -#.(para) -#: ../source/book.xml:3728 -msgid "Lastly, if you're building a release and wish to bundle up your files from Subversion but don't want those pesky .svn directories in the way, then you can use svn export to create a local copy of all or part of your repository sans .svn directories. As with svn update and svn checkout, you can also pass the option to svn export:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3738 -#, no-wrap -msgid "\n$ svn export http://svn.example.com/svn/repos1 # Exports latest revision\n…\n$ svn export http://svn.example.com/svn/repos1 -r 1729\n# Exports revision r1729\n…\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3752 -msgid "Sometimes You Just Need to Clean Up" -msgstr "" - -#.(para) -#: ../source/book.xml:3754 -msgid "When Subversion modifies your working copy (or any information within .svn), 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." -msgstr "" - -#.(para) -#: ../source/book.xml:3769 -msgid "And this is exactly what svn cleanup 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 locked, then this is the command that you should run. Also, svn status will display an L next to locked items:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3776 -#, no-wrap -msgid "\n$ svn status\n L somedir\nM somedir/foo.c\n\n$ svn cleanup\n$ svn status\nM somedir/foo.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:3785 -msgid "Don't confuse these working copy locks with the ordinary locks that Subversion users create when using the lock-modify-unlock model of concurrent version control; see for clarification." -msgstr "" - -#.(para) -#: ../source/book.xml:3799 -msgid "Now we've covered most of the Subversion client commands. Notable exceptions are those dealing with branching and merging (see ) and properties (see ). However, you may want to take a moment to skim through to get an idea of all the many different commands that Subversion has—and how you can use them to make your work easier." -msgstr "" - -#.(title) -#: ../source/book.xml:3816 -msgid "Advanced Topics" -msgstr "" - -#.(para) -#: ../source/book.xml:3818 -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 svn commit and svn update functions. You've probably even developed a reflex which causes you to run the svn status command almost unconsciously. For all intents and purposes, you are ready to use Subversion in a typical environment." -msgstr "" - -#.(para) -#: ../source/book.xml:3829 -msgid "But the Subversion feature set doesn't stop at common version control operations. It has other bits of functionality besides just communicating file and directory changes to and from a central repository." -msgstr "" - -#.(para) -#: ../source/book.xml:3833 -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 and . Once you've mastered those basics and consumed this chapter, you'll be a Subversion power-user!" -msgstr "" - -#.(title) -#: ../source/book.xml:3844 -msgid "Revision Specifiers" -msgstr "" - -#.(para) -#: ../source/book.xml:3846 -msgid "As you saw in , 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 do 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." -msgstr "" - -#.(para) -#: ../source/book.xml:3859 -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, svn allows as input some additional forms of revision specifiers—revision keywords, and revision dates." -msgstr "" - -#.(para) -#: ../source/book.xml:3866 -msgid "The various forms of Subversion revision specifiers can be mixed and matched when used to specify revision ranges. For example, you can use where REV1 is a revision keyword and REV2 is a revision number, or where REV1 is a date and REV2 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." -msgstr "" - -#.(title) -#: ../source/book.xml:3881 -msgid "Revision Keywords" -msgstr "" - -#.(primary) -#: ../source/book.xml:3884 ../source/book.xml:3980 -msgid "revisions" -msgstr "" - -#.(secondary) -#: ../source/book.xml:3885 -msgid "revision keywords" -msgstr "" - -#.(primary), (term) -#: ../source/book.xml:3888 ../source/book.xml:3906 -msgid "HEAD" -msgstr "" - -#.(primary), (term) -#: ../source/book.xml:3891 ../source/book.xml:3913 -msgid "BASE" -msgstr "" - -#.(primary), (term) -#: ../source/book.xml:3894 ../source/book.xml:3922 -msgid "COMMITTED" -msgstr "" - -#.(primary), (term) -#: ../source/book.xml:3897 ../source/book.xml:3929 -msgid "PREV" -msgstr "" - -#.(para) -#: ../source/book.xml:3899 -msgid "The Subversion client understands a number of revision keywords. These keywords can be used instead of integer arguments to the switch, and are resolved into specific revision numbers by Subversion:" -msgstr "" - -#.(para) -#: ../source/book.xml:3908 -msgid "The latest (or youngest) revision in the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:3915 -msgid "The revision number of an item in a working copy. If the item has been locally modified, the BASE version refers to the way the item appears without those local modifications." -msgstr "" - -#.(para) -#: ../source/book.xml:3924 -msgid "The most recent revision prior to, or equal to, BASE, in which an item changed." -msgstr "" - -#.(para) -#: ../source/book.xml:3931 -msgid "The revision immediately before the last revision in which an item changed. Technically, this boils down to COMMITTED-1." -msgstr "" - -#.(para) -#: ../source/book.xml:3938 -msgid "As can be derived from their descriptions, the PREV, BASE, and COMMITTED revision keywords are used only when referring to a working copy path—they don't apply to repository URLs. HEAD, on the other hand, can be used in conjunction with both of these path types." -msgstr "" - -#.(para) -#: ../source/book.xml:3945 -msgid "Here are some examples of revision keywords in action:" -msgstr "" - -#.(screen) -#: ../source/book.xml:3947 -#, no-wrap -msgid "\n$ svn diff -r PREV:COMMITTED foo.c\n# shows the last change committed to foo.c\n\n$ svn log -r HEAD\n# shows log message for the latest repository commit\n\n$ svn diff -r HEAD\n# compares your working copy (with all of its local changes) to the\n# latest version of that tree in the repository\n\n$ svn diff -r BASE:HEAD foo.c\n# compares the unmodified version of foo.c with the latest version of\n# foo.c in the repository\n\n$ svn log -r BASE:HEAD\n# shows all commit logs for the current versioned directory since you\n# last updated\n\n$ svn update -r PREV foo.c\n# rewinds the last change on foo.c, decreasing foo.c's working revision\n\n$ svn diff -r BASE:14 foo.c\n# compares the unmodified version of foo.c with the way foo.c looked\n# in revision 14\n" -msgstr "" - -#.(title) -#: ../source/book.xml:3977 -msgid "Revision Dates" -msgstr "" - -#.(secondary) -#: ../source/book.xml:3981 -msgid "specified as dates" -msgstr "" - -#.(para) -#: ../source/book.xml:3983 -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 can also accept as input date specifiers wrapped in curly braces ({ and }). 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.)" -msgstr "" - -#.(screen) -#: ../source/book.xml:3993 -#, no-wrap -msgid "\n$ svn checkout -r {2006-02-17}\n$ svn checkout -r {15:30}\n$ svn checkout -r {15:30:00.200000}\n$ svn checkout -r {\"2006-02-17 15:30\"}\n$ svn checkout -r {\"2006-02-17 15:30 +0230\"}\n$ svn checkout -r {2006-02-17T15:30}\n$ svn checkout -r {2006-02-17T15:30Z}\n$ svn checkout -r {2006-02-17T15:30-04:00}\n$ svn checkout -r {20060217T1530}\n$ svn checkout -r {20060217T1530Z}\n$ svn checkout -r {20060217T1530-0500}\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4007 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4011 -#, no-wrap -msgid "\n$ svn log -r {2006-11-28}\n------------------------------------------------------------------------\nr12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines\n…\n" -msgstr "" - -#.(title) -#: ../source/book.xml:4019 -msgid "Is Subversion a Day Early?" -msgstr "" - -#.(para) -#: ../source/book.xml:4021 -msgid "If you specify a single date as a revision without specifying a time of day (for example 2006-11-27), 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 most recent revision of the repository as of the date you give. If you give a date without a timestamp, like 2006-11-27, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4033 -msgid "If you want to include the 27th in your search, you can either specify the 27th with the time ({\"2006-11-27 23:59\"}), or just specify the next day ({2006-11-28})." -msgstr "" - -#.(para) -#: ../source/book.xml:4038 -msgid "You can also use a range of dates. Subversion will find all revisions between both dates, inclusive:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4040 -#, no-wrap -msgid "\n$ svn log -r {2006-11-20}:{2006-11-29}\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4045 -msgid "Since the timestamp of a revision is stored as an unversioned, modifiable property of the revision (see , 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." -msgstr "" - -#.(title) -#: ../source/book.xml:4064 -msgid "Properties" -msgstr "" - -#.(primary) -#: ../source/book.xml:4067 -msgid "properties" -msgstr "" - -#.(para) -#: ../source/book.xml:4069 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4075 -msgid "But it doesn't stop there." -msgstr "" - -#.(para) -#: ../source/book.xml:4076 -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 properties, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4093 -msgid "Subversion has reserved the set of properties whose names begin with svn: 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4102 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4111 -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 svn:. 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:4126 -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 svn subcommands, and how property modifications affect your normal Subversion workflow." -msgstr "" - -#.(title) -#: ../source/book.xml:4134 -msgid "Why Properties?" -msgstr "" - -#.(para) -#: ../source/book.xml:4136 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4142 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4149 -msgid "Now, you can get this functionality using traditional files. That is, you can have your image123.jpg and an image123-thumbnail.jpg 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 thumbnails/image123.jpg. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4160 -msgid "Now consider the same website deployed in a way that makes use of Subversion's file properties. Imagine having a single image file, image123.jpg, and then properties set on that file named caption, datestamp, and even thumbnail. 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 svn (or better yet, they can use the Subversion language bindings—see ) to dig out the extra information that your site needs to display without having to read an index file or play path manipulation games." -msgstr "" - -#.(para) -#: ../source/book.xml:4174 -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 test-results property on that revision with a value all passing, that's meaningful information to have." -msgstr "" - -#.(title) -#: ../source/book.xml:4186 -msgid "Searchability (or, Why Not Properties)" -msgstr "" - -#.(para) -#: ../source/book.xml:4189 -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 set a custom property, finding that property later is whole different ball of wax." -msgstr "" - -#.(para) -#: ../source/book.xml:4195 -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 svn propget 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4207 -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 svn log. It is quite common to see in Subversion log messages the likes of:" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:4214 -#, no-wrap -msgid "\nIssue(s): IZ2376, IZ1919\nReviewed by: sally\n\nThis fixes a nasty segfault in the wort frabbing process\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4221 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:4230 -msgid "Manipulating Properties" -msgstr "" - -#.(para) -#: ../source/book.xml:4232 -msgid "The svn 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 propset subcommand." -msgstr "" - -#.(screen) -#: ../source/book.xml:4238 -#, no-wrap -msgid "\n$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c\nproperty 'copyright' set on 'calc/button.c'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4243 -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 propset subcommand takes a option for specifying the name of a file which contains the new property value." -msgstr "" - -#.(screen) -#: ../source/book.xml:4250 -#, no-wrap -msgid "\n$ svn propset license -F /path/to/LICENSE calc/button.c\nproperty 'license' set on 'calc/button.c'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4261 -msgid "If you're familiar with XML, this is pretty much the ASCII subset of the syntax for XML \"Name\"." -msgstr "" - -#.(para) -#: ../source/book.xml:4255 -msgid "There are some restrictions on the names you can use for properties. A property name must start with a letter, a colon (:), or an underscore (_); after that, you can also use digits, hyphens (-), and periods (.). " -msgstr "" - -#.(para) -#: ../source/book.xml:4264 -msgid "In addition to the propset command, the svn program supplies the propedit command. This command uses the configured editor program (see ) to add or modify properties. When you run the command, svn 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4279 -#, no-wrap -msgid "\n$ svn propedit copyright calc/button.c ### exit the editor without changes\nNo changes to property 'copyright' on 'calc/button.c'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4284 -msgid "We should note that, as with other svn 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4289 -#, no-wrap -msgid "\n$ svn propset copyright '(c) 2006 Red-Bean Software' calc/*\nproperty 'copyright' set on 'calc/Makefile'\nproperty 'copyright' set on 'calc/button.c'\nproperty 'copyright' set on 'calc/integer.c'\n…\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4297 -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 svn program supplies two subcommands for displaying the names and values of properties stored on files and directories. The svn proplist 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 svn propget. 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:4308 -#, no-wrap -msgid "\n$ svn proplist calc/button.c\nProperties on 'calc/button.c':\n copyright\n license\n$ svn propget copyright calc/button.c\n(c) 2006 Red-Bean Software\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4316 -msgid "There's even a variation of the proplist command that will list both the name and value of all of the properties. Simply supply the () option." -msgstr "" - -#.(screen) -#: ../source/book.xml:4320 -#, no-wrap -msgid "\n$ svn proplist -v calc/button.c\nProperties on 'calc/button.c':\n copyright : (c) 2006 Red-Bean Software\n license : ================================================================\nCopyright (c) 2006 Red-Bean Software. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions \nare met:\n\n1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions, and the recipe for Fitz's famous\nred-beans-and-rice.\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4336 -msgid "The last property-related subcommand is propdel. Since Subversion allows you to store properties with empty values, you can't remove a property altogether using propedit or propset. For example, this command will not yield the desired effect:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4342 -#, no-wrap -msgid "\n$ svn propset license '' calc/button.c\nproperty 'license' set on 'calc/button.c'\n$ svn proplist -v calc/button.c\nProperties on 'calc/button.c':\n copyright : (c) 2006 Red-Bean Software\n license : \n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4351 -msgid "You need to use the propdel subcommand to delete properties altogether. The syntax is similar to the other property commands:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4354 -#, no-wrap -msgid "\n$ svn propdel license calc/button.c\nproperty 'license' deleted from 'calc/button.c'.\n$ svn proplist -v calc/button.c\nProperties on 'calc/button.c':\n copyright : (c) 2006 Red-Bean Software\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4375 -msgid "Fixing spelling errors, grammatical gotchas, and just-plain-wrongness in commit log messages is perhaps the most common use case for the option." -msgstr "" - -#.(para) -#: ../source/book.xml:4362 -msgid "Remember those unversioned revision properties? You can modify those, too, using the same svn subcommands that we just described. Simply add the 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. If your current working directory is part of a working copy of your repository, you can simply run the svn propset command with no target path:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4382 -#, no-wrap -msgid "\n$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop\nproperty 'svn:log' set on repository revision '11'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4387 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4390 -#, no-wrap -msgid "\n$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \\\n http://svn.example.com/repos/project\nproperty 'svn:log' set on repository revision '11'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4396 -msgid "Note that the ability to modify these unversioned properties must be explicitly added by the repository administrator (see ). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4405 -msgid "Users should, where possible, use svn propedit instead of svn propset. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:4420 -msgid "Properties and the Subversion Workflow" -msgstr "" - -#.(para) -#: ../source/book.xml:4422 -msgid "Now that you are familiar with all of the property-related svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4430 -msgid "And as with file contents, your property changes are local modifications, only made permanent when you commit them to the repository with svn commit. Your property changes can be easily unmade, too—the svn revert 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 svn status and svn diff commands." -msgstr "" - -#.(screen) -#: ../source/book.xml:4440 -#, no-wrap -msgid "\n$ svn status calc/button.c\n M calc/button.c\n$ svn diff calc/button.c\nProperty changes on: calc/button.c\n___________________________________________________________________\nName: copyright\n + (c) 2006 Red-Bean Software\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4451 -msgid "Notice how the status subcommand displays M in the second column instead of the first. That is because we have modified the properties on calc/button.c, but not its textual contents. Had we changed both, we would have seen M in the first column, too (see )." -msgstr "" - -#.(title) -#: ../source/book.xml:4459 -msgid "Property Conflicts" -msgstr "" - -#.(para) -#: ../source/book.xml:4461 -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." -msgstr "" - -#.(screen) -#: ../source/book.xml:4467 -#, no-wrap -msgid "\n% svn update calc\nM calc/Makefile.in\n C calc/button.c\nUpdated to revision 143.\n$ \n" -msgstr "" - -#.(para) -#: ../source/book.xml:4474 -msgid "Subversion will also create, in the same directory as the conflicted object, a file with a .prej 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 C in the second column of svn status output for that object, and attempts to commit your local modifications will fail." -msgstr "" - -#.(screen) -#: ../source/book.xml:4483 -#, no-wrap -msgid "\n$ svn status calc\n C calc/button.c\n? calc/button.c.prej\n$ cat calc/button.c.prej \nprop 'linecount': user set to '1256', but update set to '1301'.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4491 -msgid "To resolve property conflicts, simply ensure that the conflicting properties contain the values that they should, and then use the svn resolved command to alert Subversion that you have manually resolved the problem." -msgstr "" - -#.(para) -#: ../source/book.xml:4497 -msgid "You might also have noticed the non-standard way that Subversion currently displays property differences. You can still run svn diff and redirect the output to create a usable patch file. The patch 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 svn diff, any property modifications will need to be applied by hand." -msgstr "" - -#.(title) -#: ../source/book.xml:4510 -msgid "Automatic Property Setting" -msgstr "" - -#.(para) -#: ../source/book.xml:4512 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4524 -msgid "Whenever you introduce a file to version control using the svn add or svn import 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 svn:executable property on newly added or imported files whose execute bit is enabled. (See 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 svn:mime-type property on that file to application/octet-stream (the generic this is a collection of bytes MIME type). Of course, if Subversion guesses incorrectly, or if you wish to set the svn:mime-type property to something more precise—perhaps image/png or application/x-shockwave-flash—you can always remove or edit that property. (For more on Subversion's use of MIME types, see .)" -msgstr "" - -#.(para) -#: ../source/book.xml:4544 -msgid "Subversion also provides, via its runtime configuration system (see ), 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 *.jpg—Subversion should automatically set the svn:mime-type property on those files to image/jpeg. Or perhaps any files that match *.cpp should have svn:eol-style set to native, and svn:keywords set to Id. Automatic property support is perhaps the handiest property-related tool in the Subversion toolbox. See for more about configuring that support." -msgstr "" - -#.(title) -#: ../source/book.xml:4571 -msgid "File Portability" -msgstr "" - -#.(para) -#: ../source/book.xml:4573 -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 svn on one platform, you know how to wield it everywhere." -msgstr "" - -#.(para) -#: ../source/book.xml:4579 -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 text file 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4589 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:4598 -msgid "File Content Type" -msgstr "" - -#.(para) -#: ../source/book.xml:4600 -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 svn:mime-type file property determines some behavioral characteristics of Subversion itself." -msgstr "" - -#.(title) -#: ../source/book.xml:4609 -msgid "Identifying File Types" -msgstr "" - -#.(para) -#: ../source/book.xml:4611 -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 .txt 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 .png, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4636 -msgid "You think that was rough? During that same era, WordPerfect also used .DOC for their proprietary file format's preferred extension!" -msgstr "" - -#.(para) -#: ../source/book.xml:4624 -msgid "Unfortunately, some of those extensions have changed their meanings over time. When personal computers first appeared, a file named README.DOC would have almost certainly been a plaintext file, just like today's .txt 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 .DOC file. " -msgstr "" - -#.(para) -#: ../source/book.xml:4640 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4651 -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 MIME types—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." -msgstr "" - -#.(para) -#: ../source/book.xml:4662 -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 line. So, for versioned files whose svn:mime-type property is set to a non-textual MIME type (generally, something that doesn't begin with text/, 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 .oldrev extension and contains the BASE revision of the file. The other file has a .newrev 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4681 -msgid "Also, if the svn:mime-type property is set, then the Subversion Apache module will use its value to populate the Content-type: 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." -msgstr "" - -#.(title) -#: ../source/book.xml:4691 -msgid "File Executability" -msgstr "" - -#.(para) -#: ../source/book.xml:4693 -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 svn:executable 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4708 -msgid "The Windows filesystems use file extensions (such as .EXE, .BAT, and .COM) to denote executable files." -msgstr "" - -#.(para) -#: ../source/book.xml:4705 -msgid "This property has no effect on filesystems that have no concept of an executable permission bit, such as FAT32 and NTFS. Also, although it has no defined values, Subversion will force its value to * when setting this property. Finally, this property is valid only on files, not on directories." -msgstr "" - -#.(title) -#: ../source/book.xml:4720 -msgid "End-of-Line Character Sequences" -msgstr "" - -#.(para) -#: ../source/book.xml:4722 -msgid "Unless otherwise noted using a versioned file's svn:mime-type 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4728 -msgid "This means that by default, Subversion doesn't pay any attention to the type of end-of-line (EOL) markers 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 (CR) followed by a line feed (LF). Unix software, however, just uses the LF character to denote the end of a line." -msgstr "" - -#.(para) -#: ../source/book.xml:4739 -msgid "Not all of the various tools on these operating systems understand files that contain line endings in a format that differs from the native line ending style of the operating system on which they are running. So, typically, Unix programs treat the CR character present in Windows files as a regular character (usually rendered as ^M), and Windows programs combine all of the lines of a Unix file into one giant line because no carriage return-linefeed (or CRLF) character combination was found to denote the ends of the lines." -msgstr "" - -#.(para) -#: ../source/book.xml:4751 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4758 -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 dos2unix or its companion, unix2dos) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4773 -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?" -msgstr "" - -#.(para) -#: ../source/book.xml:4780 -msgid "The solution to this problem is the svn:eol-style 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:" -msgstr "" - -#.(literal) -#: ../source/book.xml:4790 -msgid "native" -msgstr "" - -#.(para) -#: ../source/book.xml:4793 -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 svn:eol-style property set to native, that file will contain CRLF EOL markers. A Unix user checking out a working copy which contains the same file will see LF EOL markers in his copy of the file." -msgstr "" - -#.(para) -#: ../source/book.xml:4804 -msgid "Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though." -msgstr "" - -#.(literal) -#: ../source/book.xml:4813 -msgid "CRLF" -msgstr "" - -#.(para) -#: ../source/book.xml:4816 -msgid "This causes the file to contain CRLF sequences for EOL markers, regardless of the operating system in use." -msgstr "" - -#.(literal) -#: ../source/book.xml:4823 -msgid "LF" -msgstr "" - -#.(para) -#: ../source/book.xml:4826 -msgid "This causes the file to contain LF characters for EOL markers, regardless of the operating system in use." -msgstr "" - -#.(literal) -#: ../source/book.xml:4833 -msgid "CR" -msgstr "" - -#.(para) -#: ../source/book.xml:4836 -msgid "This causes the file to contain CR 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)." -msgstr "" - -#.(title) -#: ../source/book.xml:4852 -msgid "Ignoring Unversioned Items" -msgstr "" - -#.(para) -#: ../source/book.xml:4854 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:4863 -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 feature 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 svn add and svn import 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 svn status 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4878 -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 ), 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4889 -msgid "The Subversion runtime configuration system provides an option, global-ignores, whose value is a whitespace-delimited collection of file patterns (also known as globs). 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 svn status 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' *~ and .*~ files." -msgstr "" - -#.(para) -#: ../source/book.xml:4902 -msgid "When found on a versioned directory, the svn:ignore 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 global-ignores runtime configuration option, but are instead appended to that list. And it's worth noting again that, unlike the global-ignores option, the patterns found in the svn:ignore property apply only to the directory on which that property is set, and not to any of its subdirectories. The svn:ignore 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." -msgstr "" - -#.(para) -#: ../source/book.xml:4921 -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 always notices all of its versioned objects." -msgstr "" - -#.(title) -#: ../source/book.xml:4933 -msgid "Ignore Patterns for CVS Users" -msgstr "" - -#.(para) -#: ../source/book.xml:4935 -msgid "The Subversion svn:ignore property is very similar in syntax and function to the CVS .cvsignore file. In fact, if you are migrating a CVS working copy to Subversion, you can directly migrate the ignore patterns by using the .cvsignore file as input file to the svn propset command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4942 -#, no-wrap -msgid "\n$ svn propset svn:ignore -F .cvsignore .\nproperty 'svn:ignore' set on '.'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4947 -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 ! pattern as a reset back to having no ignore patterns at all." -msgstr "" - -#.(para) -#: ../source/book.xml:4955 -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 svn:ignore property and its uses." -msgstr "" - -#.(para) -#: ../source/book.xml:4961 -msgid "Say you have the following output from svn status:" -msgstr "" - -#.(screen) -#: ../source/book.xml:4963 -#, no-wrap -msgid "\n$ svn status calc\n M calc/button.c\n? calc/calculator\n? calc/data.c\n? calc/debug_log\n? calc/debug_log.1\n? calc/debug_log.2.gz\n? calc/debug_log.3.gz\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4981 -msgid "Isn't that the whole point of a build system?" -msgstr "" - -#.(para) -#: ../source/book.xml:4973 -msgid "In this example, you have made some property modifications to button.c, but in your working copy you also have some unversioned files: the latest calculator program that you've compiled from your source code, a source file named data.c, and a set of debugging output log files. Now, you know that your build system always results in the calculator program being generated. 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 svn status, and pretty sure that nobody else is interested in them either. So you use svn propedit svn:ignore calc to add some ignore patterns to the calc directory. For example, you might add this as the new value of the svn:ignore property:" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:4992 -#, no-wrap -msgid "\ncalculator\ndebug_log*\n" -msgstr "" - -#.(para) -#: ../source/book.xml:4996 -msgid "After you've added this property, you will now have a local property modification on the calc directory. But notice what else is different about your svn status output:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5000 -#, no-wrap -msgid "\n$ svn status\n M calc\n M calc/button.c\n? calc/data.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5006 -msgid "Now, all that cruft is missing from the output! Of course, your calculator 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 data.c that you probably forgot to add to version control." -msgstr "" - -#.(para) -#: ../source/book.xml:5014 -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 to Subversion:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5018 -#, no-wrap -msgid "\n$ svn status --no-ignore\n M calc\n M calc/button.c\nI calc/calculator\n? calc/data.c\nI calc/debug_log\nI calc/debug_log.1\nI calc/debug_log.2.gz\nI calc/debug_log.3.gz\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5029 -msgid "As mentioned earlier, the list of file patterns to ignore is also used by svn add and svn import. 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 to tell Subversion ignore its ignores list and operate on all the files and directories present." -msgstr "" - -#.(title) -#: ../source/book.xml:5048 -msgid "Keyword Substitution" -msgstr "" - -#.(para) -#: ../source/book.xml:5050 -msgid "Subversion has the ability to substitute keywords—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 after 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5061 -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 LastChangedDate keyword. You control where the keyword is inserted into your document by placing a keyword anchor at the desired location in the file. This anchor is just a string of text formatted as $KeywordName$." -msgstr "" - -#.(para) -#: ../source/book.xml:5074 -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 svn:keywords property to be case-sensitive too—certain keyword names will be recognized regardless of case, but this behavior is deprecated." -msgstr "" - -#.(para) -#: ../source/book.xml:5080 -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:" -msgstr "" - -#.(literal) -#: ../source/book.xml:5086 -msgid "Date" -msgstr "" - -#.(para) -#: ../source/book.xml:5089 -msgid "This keyword describes the last time the file was known to have been changed in the repository, and is of the form $Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $. It may also be specified as LastChangedDate." -msgstr "" - -#.(literal), (para) -#: ../source/book.xml:5099 ../source/book.xml:18944 -msgid "Revision" -msgstr "" - -#.(para) -#: ../source/book.xml:5102 -msgid "This keyword describes the last known revision in which this file changed in the repository, and looks something like $Revision: 144 $. It may also be specified as LastChangedRevision or Rev." -msgstr "" - -#.(literal) -#: ../source/book.xml:5112 -msgid "Author" -msgstr "" - -#.(para) -#: ../source/book.xml:5115 -msgid "This keyword describes the last known user to change this file in the repository, and looks something like $Author: harry $. It may also be specified as LastChangedBy." -msgstr "" - -#.(literal) -#: ../source/book.xml:5124 -msgid "HeadURL" -msgstr "" - -#.(para) -#: ../source/book.xml:5127 -msgid "This keyword describes the full URL to the latest version of the file in the repository, and looks something like $HeadURL: http://svn.collab.net/repos/trunk/README $. It may be abbreviated as URL." -msgstr "" - -#.(literal) -#: ../source/book.xml:5137 -msgid "Id" -msgstr "" - -#.(para) -#: ../source/book.xml:5140 -msgid "This keyword is a compressed combination of the other keywords. Its substitution looks something like $Id: calc.c 148 2006-07-28 21:30:43Z sally $, and is interpreted to mean that the file calc.c was last changed in revision 148 on the evening of July 28, 2006 by the user sally." -msgstr "" - -#.(para) -#: ../source/book.xml:5150 -msgid "Several of the previous descriptions use the phrase last known or similar wording. Keep in mind that keyword expansion is a client-side operation, and your client only knows 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5164 -msgid "… or maybe even a section of a book …" -msgstr "" - -#.(para) -#: ../source/book.xml:5159 -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 about how to use keywords, and you don't want Subversion to substitute your beautiful examples of un-substituted keyword anchors!" -msgstr "" - -#.(para) -#: ../source/book.xml:5168 -msgid "To tell Subversion whether or not to substitute keywords on a particular file, we again turn to the property-related subcommands. The svn:keywords 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5175 -msgid "For example, say you have a versioned file named weather.txt that looks like this:" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:5178 -#, no-wrap -msgid "\nHere is the latest report from the front lines.\n$LastChangedDate$\n$Rev$\nCumulus clouds are appearing more frequently as summer approaches.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5184 -msgid "With no svn:keywords property set on that file, Subversion will do nothing special. Now, let's enable substitution of the LastChangedDate keyword." -msgstr "" - -#.(screen) -#: ../source/book.xml:5188 -#, no-wrap -msgid "\n$ svn propset svn:keywords \"Date Author\" weather.txt\nproperty 'svn:keywords' set on 'weather.txt'\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5193 -msgid "Now you have made a local property modification on the weather.txt 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 Rev 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 svn:keywords property value." -msgstr "" - -#.(para) -#: ../source/book.xml:5203 -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 $LastChangedDate$, you'll see its substituted result. That result also contains the name of the keyword, and continues to be bounded by the dollar sign ($) characters. And as we predicted, the Rev keyword was not substituted because we didn't ask for it to be." -msgstr "" - -#.(para) -#: ../source/book.xml:5212 -msgid "Note also that we set the svn:keywords property to Date Author yet the keyword anchor used the alias $LastChangedDate$ and still expanded correctly." -msgstr "" - -#.(screen) -#: ../source/book.xml:5216 -#, no-wrap -msgid "\nHere is the latest report from the front lines.\n$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $\n$Rev$\nCumulus clouds are appearing more frequently as summer approaches.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5222 -msgid "If someone else now commits a change to weather.txt, 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 weather.txt file will be re-substituted with information that reflects the most recent known commit to that file." -msgstr "" - -#.(title) -#: ../source/book.xml:5231 -msgid "Where's $GlobalRev$?" -msgstr "" - -#.(para) -#: ../source/book.xml:5233 -msgid "New users are often confused by how the $Rev$ 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 $Rev$ keyword's value. But $Rev$ expands to show the last revision in which the file changed, 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?" -msgstr "" - -#.(para) -#: ../source/book.xml:5245 -msgid "To do this, you need external processing. Subversion ships with a tool called svnversion which was designed for just this purpose. svnversion 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 svnversion, see ." -msgstr "" - -#.(para) -#: ../source/book.xml:5254 -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 (::) 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 (#) character just before the final dollar sign terminator." -msgstr "" - -#.(para) -#: ../source/book.xml:5270 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5275 -#, no-wrap -msgid "\n$Rev$: Revision of last commit\n$Author$: Author of last commit\n$Date$: Date of last commit\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5280 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5283 -#, no-wrap -msgid "\n$Rev: 12 $: Revision of last commit\n$Author: harry $: Author of last commit\n$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $: Date of last commit\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5288 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5298 -#, no-wrap -msgid "\n$Rev:: $: Revision of last commit\n$Author:: $: Author of last commit\n$Date:: $: Date of last commit\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5303 -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 Rev and Author are padded with spaces, and the long Date field is truncated by a hash character:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5312 -#, no-wrap -msgid "\n$Rev:: 13 $: Revision of last commit\n$Author:: harry $: Author of last commit\n$Date:: 2006-03-15 0#$: Date of last commit\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5317 -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)." -msgstr "" - -#.(para) -#: ../source/book.xml:5324 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:5346 -msgid "Locking" -msgstr "" - -#.(para) -#: ../source/book.xml:5348 -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 ), 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5365 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:5375 -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 HEAD, 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 HEAD, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5390 -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!" -msgstr "" - -#.(para) -#: ../source/book.xml:5411 -msgid "Communication wouldn't have been such bad medicine for Harry and Sally's Hollywood namesakes, either, for that matter." -msgstr "" - -#.(para) -#: ../source/book.xml:5404 -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 , most of these types of problems go away entirely where perfect communication between Harry and Sally exists. 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 locking feature, which is similar to the reserved checkouts mechanisms of other version control systems." -msgstr "" - -#.(para) -#: ../source/book.xml:5423 -msgid "Subversion's locking feature serves two main purposes:" -msgstr "" - -#.(para) -#: ../source/book.xml:5427 -msgid "Serializing access to a versioned object. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5435 -msgid "Aiding communication. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5447 -msgid "Subversion does not currently allow locks on directories." -msgstr "" - -#.(para) -#: ../source/book.xml:5444 -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 (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." -msgstr "" - -#.(title) -#: ../source/book.xml:5456 -msgid "The three meanings of lock" -msgstr "" - -#.(para) -#: ../source/book.xml:5458 -msgid "In this section, and almost everywhere in this book, the words lock and locking describe a mechanism for mutual exclusion between users to avoid clashing commits. Unfortunately, there are two other sorts of lock with which Subversion, and therefore this book, sometimes needs to be concerned." -msgstr "" - -#.(para) -#: ../source/book.xml:5464 -msgid "The first is working copy locks, 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 L in the third column of svn status output, and removed by the svn cleanup command, as described in ." -msgstr "" - -#.(para) -#: ../source/book.xml:5471 -msgid "Secondly, there are database locks, 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 wedged, as described in ." -msgstr "" - -#.(para) -#: ../source/book.xml:5477 -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, lock means the first sort unless the contrary is either clear from context or explicitly stated." -msgstr "" - -#.(title) -#: ../source/book.xml:5486 -msgid "Creating locks" -msgstr "" - -#.(para) -#: ../source/book.xml:5488 -msgid "In the Subversion repository, a lock is a piece of metadata which grants exclusive access to one user to change a file. This user is said to be the lock owner. Each lock also has a unique identifier, typically a long string of characters, known as the lock token. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5503 -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 svn lock command." -msgstr "" - -#.(screen) -#: ../source/book.xml:5510 -#, no-wrap -msgid "\n$ svn lock banana.jpg -m \"Editing file for tomorrow's release.\"\n'banana.jpg' locked by user 'harry'.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5515 -msgid "There are a number of new things demonstrated in the previous example. First, notice that Harry passed the option to svn lock. Similar to svn commit, the svn lock command can take comments (either via or ) to describe the reason for locking the file. Unlike svn commit, however, svn lock will not demand a message by launching your preferred text editor. Lock comments are optional, but still recommended to aid communication." -msgstr "" - -#.(para) -#: ../source/book.xml:5526 -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 svn update and reattempt the locking command. The locking command would also have failed if the file already been locked by someone else." -msgstr "" - -#.(para) -#: ../source/book.xml:5534 -msgid "As you can see, the svn lock command prints confirmation of the successful lock. At this point, the fact that the file is locked becomes apparent in the output of the svn status and svn info reporting subcommands." -msgstr "" - -#.(screen) -#: ../source/book.xml:5539 -#, no-wrap -msgid "\n$ svn status\n K banana.jpg\n\n$ svn info banana.jpg\nPath: banana.jpg\nName: banana.jpg\nURL: http://svn.example.com/repos/project/banana.jpg\nRepository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\nRevision: 2198\nNode Kind: file\nSchedule: normal\nLast Changed Author: frank\nLast Changed Rev: 1950\nLast Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006)\nText Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\nProperties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\nChecksum: 3b110d3b10638f5d1f4fe0f436a5a2a5\nLock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e\nLock Owner: harry\nLock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006)\nLock Comment (1 line):\nEditing file for tomorrow's release.\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5565 -msgid "That the svn info 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 svn status command shows a K next to the file (short for locKed), indicating that the lock token is present." -msgstr "" - -#.(title) -#: ../source/book.xml:5576 -msgid "Regarding lock tokens" -msgstr "" - -#.(para) -#: ../source/book.xml:5578 -msgid "A lock token isn't an authentication token, so much as an authorization token. The token isn't a protected secret. In fact, a lock's unique token is discoverable by anyone who runs svn info URL. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5587 -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 break the lock and re-lock the file.)" -msgstr "" - -#.(para) -#: ../source/book.xml:5599 -msgid "Now that Harry has locked banana.jpg, Sally is unable to change or delete that file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5601 -#, no-wrap -msgid "\n$ svn delete banana.jpg\nD banana.jpg\n$ svn commit -m \"Delete useless file.\"\nDeleting banana.jpg\nsvn: Commit failed (details follow):\nsvn: DELETE of\n'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg':\n423 Locked (http://svn.example.com)\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5612 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5616 -#, no-wrap -msgid "\n$ svn status\nM K banana.jpg\n$ svn commit -m \"Make banana more yellow\"\nSending banana.jpg\nTransmitting file data .\nCommitted revision 2201.\n$ svn status\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5626 -msgid "Notice that after the commit is finished, svn status shows that the lock token is no longer present in working copy. This is the standard behavior of svn commit—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—even on files that weren't committed. 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 images because he's unsure of which files he needs to change, yet only only changes four of those files, when he runs svn commit images, the process will still release all thirty locks." -msgstr "" - -#.(para) -#: ../source/book.xml:5643 -msgid "This behavior of automatically releasing locks can be overridden with the option to svn commit. 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 no-unlock runtime configuration option (see )." -msgstr "" - -#.(para) -#: ../source/book.xml:5651 -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 svn unlock command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5654 -#, no-wrap -msgid "\n$ svn unlock banana.c\n'banana.c' unlocked.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:5662 -msgid "Discovering locks" -msgstr "" - -#.(para) -#: ../source/book.xml:5664 -msgid "When a commit fails due to someone else's locks, it's fairly easy to learn about them. The easiest of these is svn status --show-updates:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5667 -#, no-wrap -msgid "\n$ svn status -u\nM 23 bar.c\nM O 32 raisin.jpg\n * 72 foo.h\nStatus against revision: 105\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5675 -msgid "In this example, Sally can see not only that her copy of foo.h is out-of-date, but that one of the two modified files she plans to commit is locked in the repository. The O symbol stands for Other, meaning that a lock exists on the file, and was created by somebody else. If she were to attempt a commit, the lock on raisin.jpg would prevent it. Sally is left wondering who made the lock, when, and why. Once again, svn info has the answers:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5685 -#, no-wrap -msgid "\n$ svn info http://svn.example.com/repos/project/raisin.jpg\nPath: raisin.jpg\nName: raisin.jpg\nURL: http://svn.example.com/repos/project/raisin.jpg\nRepository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\nRevision: 105\nNode Kind: file\nLast Changed Author: sally\nLast Changed Rev: 32\nLast Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006)\nLock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\nLock Owner: harry\nLock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\nLock Comment (1 line):\nNeed to make a quick tweak to this image.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5703 -msgid "Just as svn info 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 svn info 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, svn info on a working copy path will show no lock information at all). If the main argument to svn info 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5716 -msgid "So in this particular example, Sally can see that Harry locked the file on February 16th to make a quick tweak. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:5727 -msgid "Breaking and stealing locks" -msgstr "" - -#.(para) -#: ../source/book.xml:5729 -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 breaking the lock." -msgstr "" - -#.(para) -#: ../source/book.xml:5735 -msgid "From the administrator's chair, it's simple to break locks. The svnlook and svnadmin programs have the ability to display and remove locks directly from the repository. (For more information about these tools, see .)" -msgstr "" - -#.(screen) -#: ../source/book.xml:5741 -#, no-wrap -msgid "\n$ svnadmin lslocks /var/svn/repos\nPath: /project2/images/banana.jpg\nUUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923\nOwner: frank\nCreated: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006)\nExpires: \nComment (1 line):\nStill improving the yellow color.\n\nPath: /project/raisin.jpg\nUUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\nOwner: harry\nCreated: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\nExpires: \nComment (1 line):\nNeed to make a quick tweak to this image.\n\n$ svnadmin rmlocks /var/svn/repos /project/raisin.jpg\nRemoved lock on '/project/raisin.jpg'.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5763 -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 to the unlock command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5767 -#, no-wrap -msgid "\n$ svn status -u\nM 23 bar.c\nM O 32 raisin.jpg\n * 72 foo.h\nStatus against revision: 105\n$ svn unlock raisin.jpg\nsvn: 'raisin.jpg' is not locked in this working copy\n$ svn info raisin.jpg | grep URL\nURL: http://svn.example.com/repos/project/raisin.jpg\n$ svn unlock http://svn.example.com/repos/project/raisin.jpg\nsvn: Unlock request failed: 403 Forbidden (http://svn.example.com)\n$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg\n'raisin.jpg' unlocked.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5783 -msgid "Now, Sally's initial attempt to unlock failed because she ran svn unlock 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 svn unlock. 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 , the authentication and authorization requirements are ignored, and the remote lock is broken." -msgstr "" - -#.(para) -#: ../source/book.xml:5793 -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 svn unlock --force and then svn lock 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 steal the lock, which involves breaking and re-locking the file all in one atomic step. To do this, Sally passes the option to svn lock:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5804 -#, no-wrap -msgid "\n$ svn lock raisin.jpg\nsvn: Lock request failed: 423 Locked (http://svn.example.com)\n$ svn lock --force raisin.jpg\n'raisin.jpg' locked by user 'sally'.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5811 -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 defunct. 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 svn status to contact the repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5820 -#, no-wrap -msgid "\n$ svn status\n K raisin.jpg\n$ svn status -u\n B 32 raisin.jpg\n$ svn update\n B raisin.jpg\n$ svn status\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5830 -msgid "If the repository lock was broken, then svn status --show-updates displays a B (Broken) symbol next to the file. If a new lock exists in place of the old one, then a T (sTolen) symbol is shown. Finally, svn update notices any defunct lock tokens and removes them from the working copy." -msgstr "" - -#.(title) -#: ../source/book.xml:5839 -msgid "Locking Policies" -msgstr "" - -#.(para) -#: ../source/book.xml:5841 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:5851 -msgid "Subversion defaults to the softer approach, but still allows administrators to create stricter enforcement policies through the use of hook scripts. In particular, the pre-lock and pre-unlock 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 post-lock and post-unlock hooks are also available, and can be used to send email after locking actions. To learn more about repository hooks, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:5869 -msgid "Lock Communication" -msgstr "" - -#.(para) -#: ../source/book.xml:5871 -msgid "We've seen how svn lock and svn unlock 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?" -msgstr "" - -#.(para) -#: ../source/book.xml:5876 -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 svn status --show-updates, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5886 -msgid "Subversion's solution to this problem is to provide a mechanism to remind users that a file ought to be locked before the editing begins. The mechanism is a special property, svn:needs-lock. 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 svn lock), the file becomes read-write. When the lock is released, the file becomes read-only again." -msgstr "" - -#.(para) -#: ../source/book.xml:5898 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:5906 -#, no-wrap -msgid "\n$ /usr/local/bin/gimp raisin.jpg\ngimp: error: file is read-only!\n$ ls -l raisin.jpg\n-r--r--r-- 1 sally sally 215589 Jun 8 19:23 raisin.jpg\n$ svn lock raisin.jpg\nsvn: Lock request failed: 423 Locked (http://svn.example.com)\n$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock\nLock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\nLock Owner: harry\nLock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006)\nLock Comment (1 line):\nMaking some tweaks. Locking for the next two hours.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5922 -msgid "Users and administrators alike are encouraged to attach the svn:needs-lock property to any file which cannot be contextually merged. This is the primary technique for encouraging good locking habits and preventing wasted effort." -msgstr "" - -#.(para) -#: ../source/book.xml:5928 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:5942 -msgid "Except, perhaps, a classic Vulcan mind-meld." -msgstr "" - -#.(para) -#: ../source/book.xml:5934 -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 hijack 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. " -msgstr "" - -#.(title) -#: ../source/book.xml:5951 -msgid "Externals Definitions" -msgstr "" - -#.(para) -#: ../source/book.xml:5953 -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 svn checkout 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5963 -msgid "Fortunately, Subversion provides support for externals definitions. 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 svn:externals property. You can create or modify this property using svn propset or svn propedit (see ). 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:5976 -#, no-wrap -msgid "\n$ svn propget svn:externals calc\nthird-party/sounds http://sounds.red-bean.com/repos\nthird-party/skins http://skins.red-bean.com/repositories/skinproj\nthird-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker\n" -msgstr "" - -#.(para) -#: ../source/book.xml:5982 -msgid "The convenience of the svn:externals 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." -msgstr "" - -#.(para) -#: ../source/book.xml:5991 -msgid "The relative target subdirectories of externals definitions must not already exist on your or other users' systems—Subversion will create them when it checks out the external working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:5996 -msgid "Note the previous externals definition example. When someone checks out a working copy of the calc directory, Subversion also continues to check out the items found in its externals definition." -msgstr "" - -#.(screen) -#: ../source/book.xml:6000 -#, no-wrap -msgid "\n$ svn checkout http://svn.example.com/repos/calc\nA calc\nA calc/Makefile\nA calc/integer.c\nA calc/button.c\nChecked out revision 148.\n\nFetching external item into calc/third-party/sounds\nA calc/third-party/sounds/ding.ogg\nA calc/third-party/sounds/dong.ogg\nA calc/third-party/sounds/clang.ogg\n…\nA calc/third-party/sounds/bang.ogg\nA calc/third-party/sounds/twang.ogg\nChecked out revision 14.\n\nFetching external item into calc/third-party/skins\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6020 -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 svn:externals property, Subversion will synchronize the checked-out items against the changed externals definition when you next run svn update. The same thing will happen when others update their working copies and receive your changes to the externals definition." -msgstr "" - -#.(para) -#: ../source/book.xml:6029 -msgid "Because the svn:externals property has a multiline value, we strongly recommend that you use svn propedit instead of svn propset." -msgstr "" - -#.(para) -#: ../source/book.xml:6035 -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 they 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6051 -msgid "The svn status command also recognizes externals definitions, displaying a status code of X 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6057 -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 ../../skins/myskin). Third, the working copies created via the externals definition support are still disconnected from the primary working copy (on whose versioned directories the svn:externals 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 svn commit explicitly on those working copies—committing on the primary working copy will not recurse into any external ones." -msgstr "" - -#.(para) -#: ../source/book.xml:6072 -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 my-project, and you've created an externals definition on one of its subdirectories (my-project/some-dir) which tracks the latest revision of another of its subdirectories (my-project/external-dir)." -msgstr "" - -#.(screen) -#: ../source/book.xml:6084 -#, no-wrap -msgid "\n$ svn checkout http://svn.example.com/projects .\nA my-project\nA my-project/some-dir\nA my-project/external-dir\n…\nFetching external item into 'my-project/some-dir/subdir'\nChecked out external at revision 11.\n\nChecked out revision 11.\n$ svn propget svn:externals my-project/some-dir\nsubdir http://svn.example.com/projects/my-project/external-dir\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6099 -msgid "Now you use svn move to rename the my-project directory. At this point, your externals definition will still refer to a path under the my-project directory, even though that directory no longer exists." -msgstr "" - -#.(screen) -#: ../source/book.xml:6104 -#, no-wrap -msgid "\n$ svn move -q my-project renamed-project\n$ svn commit -m \"Rename my-project to renamed-project.\"\nDeleting my-project\nAdding my-renamed-project\n\nCommitted revision 12.\n$ svn update\n\nFetching external item into 'renamed-project/some-dir/subdir'\nsvn: Target path does not exist\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6117 -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 http:// or https://, but only allow commits to come in via https://, you have an interesting problem on your hands. If your externals definitions use the http:// 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 https:// form of the URLs, anyone who might be checking out via http:// because their client doesn't support https:// will be unable to fetch the external items. Be aware, too, that if you need to re-parent your working copy (using svn switch --relocate), externals definitions will not also be re-parented." -msgstr "" - -#.(para) -#: ../source/book.xml:6135 -msgid "Finally, there might be times when you would prefer that svn subcommands would not recognize, or otherwise operate upon, the external working copies. In those instances, you can pass the option to the subcommand." -msgstr "" - -#.(title) -#: ../source/book.xml:6146 -msgid "Peg and Operative Revisions" -msgstr "" - -#.(para) -#: ../source/book.xml:6148 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6161 -msgid "Subversion is pretty smart about noticing when an object's version history includes such changes of address. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6170 -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, /trunk/object for example. What, then, does it mean to ask Subversion about the history of /trunk/object? 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 all the objects that have ever lived at that path? Clearly, Subversion needs a hint about what you really want." -msgstr "" - -#.(para) -#: ../source/book.xml:6190 -msgid "You're not supposed to name it. Once you name it, you start getting attached to it.—Mike Wazowski" -msgstr "" - -#.(para) -#: ../source/book.xml:6183 -msgid "And thanks to moves, versioned object history can get far more twisted than that, even. For example, you might have a directory named concept, 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. 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 concept is renamed to frabnaggilywort. Life goes on, Frabnaggilywort releases a 1.0 version, and is downloaded and used daily by hordes of people aiming to improve their lives." -msgstr "" - -#.(para) -#: ../source/book.xml:6200 -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, concept, and the cycle begins again. In fact, the cycle begins again many times over the years, each time starting with that old concept 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 concept to something else for a while, but later rename the thing back to concept for some reason." -msgstr "" - -#.(para) -#: ../source/book.xml:6212 -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 Main Street 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6220 -msgid "In version 1.1, Subversion introduced a way for you to tell it exactly which Main Street you meant. It's called the peg revision, 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 at syntax, so called because the syntax involves appending an at sign (@) and the peg revision to the end of the path with which the revision is associated." -msgstr "" - -#.(para) -#: ../source/book.xml:6242 -msgid "606 N. Main Street, Wheaton, Illinois, is the home of the Wheaton History Center. Get it—History Center? It seemed appropriate…." -msgstr "" - -#.(para) -#: ../source/book.xml:6233 -msgid "But what of the of which we've spoken so much in this book? That revision (or set of revisions) is called the operative revision (or operative revision range). 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, we can think of Main Street as our path and Wheaton 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 606 N. as our operative revision, of sorts, and we know exactly where to go." -msgstr "" - -#.(title) -#: ../source/book.xml:6255 -msgid "The peg revision algorithm" -msgstr "" - -#.(para) -#: ../source/book.xml:6257 -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:" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:6262 -msgid "command" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:6262 -msgid "OPERATIVE-REV" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:6262 -msgid "PEG-REV" -msgstr "" - -#.(screen) -#: ../source/book.xml:6261 -#, no-wrap -msgid "\n$ svn -r item@\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6264 -msgid "If OPERATIVE-REV is older than PEG-REV, then the algorithm is as follows:" -msgstr "" - -#.(para) -#: ../source/book.xml:6269 -msgid "Locate item in the revision identified by PEG-REV. There can be only one such object." -msgstr "" - -#.(para) -#: ../source/book.xml:6274 -msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision OPERATIVE-REV." -msgstr "" - -#.(para) -#: ../source/book.xml:6279 -msgid "Perform the requested action on that ancestor, wherever it is located, or whatever its name might be or have been at that time." -msgstr "" - -#.(para) -#: ../source/book.xml:6284 -msgid "But what if OPERATIVE-REV is younger than PEG-REV? Well, that adds some complexity to the theoretical problem of locating the path in OPERATIVE-REV, because the path's history could have forked multiple times (thanks to copy operations) between PEG-REV and OPERATIVE-REV. 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:" -msgstr "" - -#.(para) -#: ../source/book.xml:6297 -msgid "Locate item in the revision identified by OPERATIVE-REV. There can be only one such object." -msgstr "" - -#.(para) -#: ../source/book.xml:6302 -msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision PEG-REV." -msgstr "" - -#.(para) -#: ../source/book.xml:6307 -msgid "Verify that the object's location (path-wise) in PEG-REV is the same as it is in OPERATIVE-REV. 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 OPERATIVE-REV. 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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6320 -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 BASE for working copy items and HEAD for repository URLs. And when no operative revision is provided, it defaults to being the same revision as the peg revision." -msgstr "" - -#.(para) -#: ../source/book.xml:6328 -msgid "Say that long ago we created our repository, and in revision 1 added our first concept directory, plus an IDEA 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 frabnaggilywort. By revision 27, we had a new concept, a new concept directory to hold it, and a new IDEA file to describe it. And then five years and twenty thousand revisions flew by, just like they would in any good romance story." -msgstr "" - -#.(para) -#: ../source/book.xml:6338 -msgid "Now, years later, we wonder what the IDEA file looked like back in revision 1. But Subversion needs to know if we are asking about how the current file looked back in revision 1, or if we are asking for the contents of whatever file lived at concepts/IDEA 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 IDEA file looked in that old revision, you run:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6348 -#, no-wrap -msgid "\n$ svn cat -r 1 concept/IDEA \nsvn: Unable to find repository location for 'concept/IDEA' in revision 1\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6352 -msgid "Of course, in this example, the current IDEA 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6357 -#, no-wrap -msgid "\n$ svn cat -r 1 concept/IDEA@BASE\nsvn: Unable to find repository location for 'concept/IDEA' in revision 1\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6361 -msgid "And when executed, it has the expected results." -msgstr "" - -#.(para) -#: ../source/book.xml:6362 -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 svn know whether news@11 is the name of a directory in my tree, or just a syntax for revision 11 of news? Thankfully, while svn 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 news@11@. svn 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 filename@@ to talk about a file named filename@." -msgstr "" - -#.(para) -#: ../source/book.xml:6378 -msgid "Let's ask the other question, then—in revision 1, what were the contents of whatever file occupied the address concepts/IDEA at the time? We'll use an explicit peg revision to help us out." -msgstr "" - -#.(screen) -#: ../source/book.xml:6382 -#, no-wrap -msgid "\n$ svn cat concept/IDEA@1\nThe idea behind this project is to come up with a piece of software\nthat can frab a naggily wort. Frabbing naggily worts is tricky\nbusiness, and doing it incorrectly can have serious ramifications, so\nwe need to employ over-the-top input validation and data verification\nmechanisms.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6390 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6394 -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 HEAD, the Frabnaggilywort project is located in the frabnaggilywort directory. So we specify that we want to see how the line of history identified in HEAD as the path frabnaggilywort/IDEA looked in revision 1." -msgstr "" - -#.(screen) -#: ../source/book.xml:6406 -#, no-wrap -msgid "\n$ svn cat -r 1 frabnaggilywort/IDEA@HEAD\nThe idea behind this project is to come up with a piece of software\nthat can frab a naggily wort. Frabbing naggily worts is tricky\nbusiness, and doing it incorrectly can have serious ramifications, so\nwe need to employ over-the-top input validation and data verification\nmechanisms.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6414 -msgid "And the peg and operative revisions need not be so trivial, either. For example, say frabnaggilywort had been deleted from HEAD, but we know it existed in revision 20, and we want to see the diffs for its IDEA file between revisions 4 and 10. We can use the peg revision 20 in conjunction with the URL that would have held Frabnaggilywort's IDEA file in revision 20, and then use 4 and 10 as our operative revision range." -msgstr "" - -#.(screen) -#: ../source/book.xml:6423 -#, no-wrap -msgid "\n$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20\nIndex: frabnaggilywort/IDEA\n===================================================================\n--- frabnaggilywort/IDEA\t(revision 4)\n+++ frabnaggilywort/IDEA\t(revision 10)\n@@ -1,5 +1,5 @@\n-The idea behind this project is to come up with a piece of software\n-that can frab a naggily wort. Frabbing naggily worts is tricky\n-business, and doing it incorrectly can have serious ramifications, so\n-we need to employ over-the-top input validation and data verification\n-mechanisms.\n+The idea behind this project is to come up with a piece of\n+client-server software that can remotely frab a naggily wort.\n+Frabbing naggily worts is tricky business, and doing it incorrectly\n+can have serious ramifications, so we need to employ over-the-top\n+input validation and data verification mechanisms.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6441 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:6450 -msgid "Network Model" -msgstr "" - -#.(para) -#: ../source/book.xml:6452 -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 (http://) with the Apache HTTP Server or speaking the custom Subversion protocol (svn://) with svnserve, 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." -msgstr "" - -#.(title) -#: ../source/book.xml:6467 -msgid "Requests and Responses" -msgstr "" - -#.(para) -#: ../source/book.xml:6469 -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 )." -msgstr "" - -#.(para) -#: ../source/book.xml:6477 -msgid "Run svn --version to see which URL schemes and protocols the client knows how to use." -msgstr "" - -#.(para) -#: ../source/book.xml:6481 -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 credentials 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 (logs in) to the server before ever making a request. In Subversion, the server pulls credentials by challenging the client at the appropriate moment, rather than the client pushing 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 svn checkout." -msgstr "" - -#.(para) -#: ../source/book.xml:6497 -msgid "If the particular network requests issued by the client result in a new revision being created in the repository, (e.g. svn commit), 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 svn:author property on the new revision (see ). If the client was not authenticated (in other words, the server never issued an authentication challenge), then the revision's svn:author property is empty." -msgstr "" - -#.(title) -#: ../source/book.xml:6513 -msgid "Client Credentials Caching" -msgstr "" - -#.(para) -#: ../source/book.xml:6515 -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 (~/.subversion/auth/ on Unix-like systems or %APPDATA%/Subversion/auth/ on Windows; see 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6530 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6536 -msgid "The security-conscious reader will suspect immediately that there is reason for concern here. Caching passwords on disk? That's terrible! You should never do that!" -msgstr "" - -#.(para) -#: ../source/book.xml:6540 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:6548 -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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6560 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6569 -msgid "For other Unix-like operating systems, no standard keychain services exist. However, the auth/ 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6577 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6582 -msgid "To disable caching for a single command, pass the option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6584 -#, no-wrap -msgid "\n$ svn commit -F log_msg.txt --no-auth-cache\nAuthentication realm: <svn://host.example.com:3690> example realm\nUsername: joe\nPassword for 'joe':\n\nAdding newfile\nTransmitting file data .\nCommitted revision 2324.\n\n# password was not cached, so a second commit still prompts us\n\n$ svn delete newfile\n$ svn commit -F new_msg.txt\nAuthentication realm: <svn://host.example.com:3690> example realm\nUsername: joe\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6602 -msgid "Or, if you want to disable credential caching permanently, you can edit the config file in your runtime configuration area, and set the option to no. 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 )." -msgstr "" - -#.(screen) -#: ../source/book.xml:6611 -#, no-wrap -msgid "\n[auth]\nstore-auth-creds = no\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6615 -msgid "Sometimes users will want to remove specific credentials from the disk cache. To do this, you need to navigate into the auth/ 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 svn:realmstring key describes the particular server realm that the file is associated with:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6623 -#, no-wrap -msgid "\n$ ls ~/.subversion/auth/svn.simple/\n5671adf2865e267db74f09ba6f872c28\n3893ed123b39500bca8a0b382839198e\n5c3c22968347b390f349ff340196ed39\n\n$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28\n\nK 8\nusername\nV 3\njoe\nK 8\npassword\nV 4\nblah\nK 15\nsvn:realmstring\nV 45\n<https://svn.domain.com:443> Joe's repository\nEND\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6645 -msgid "Once you have located the proper cache file, just delete it." -msgstr "" - -#.(para) -#: ../source/book.xml:6658 -msgid "Again, a common mistake is to misconfigure a server so that it never issues an authentication challenge. When users pass and 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!" -msgstr "" - -#.(para) -#: ../source/book.xml:6647 -msgid "One last word about svn's authentication behavior, specifically regarding the and options. Many client subcommands accept these options, but it is important to understand using these options does not automatically send credentials to the server. As discussed earlier, the server pulls credentials from the client when it deems necessary; the client cannot push 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. 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 svn from a script)." -msgstr "" - -#.(para) -#: ../source/book.xml:6671 -msgid "Here is a final summary that describes how a Subversion client behaves when it receives an authentication challenge." -msgstr "" - -#.(para) -#: ../source/book.xml:6676 -msgid "First, the client checks whether the user specified any credentials as command-line options ( and/or ). If not, or if these options fail to authenticate successfully, then" -msgstr "" - -#.(para) -#: ../source/book.xml:6683 -msgid "the client looks up the server's hostname, port, and realm in the runtime auth/ area, to see if the user already has the appropriate credentials cached. If not, or if the cached credentials fail to authenticate, then" -msgstr "" - -#.(para) -#: ../source/book.xml:6690 -msgid "finally, the client resorts to prompting the user (unless instructed not to do so via the option or its client-specific equivalents)." -msgstr "" - -#.(para) -#: ../source/book.xml:6696 -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)." -msgstr "" - -#.(title) -#: ../source/book.xml:6710 -msgid "Branching and Merging" -msgstr "" - -#.(attribution) -#: ../source/book.xml:6713 -msgid "Confucius" -msgstr "" - -#.(quote) -#: ../source/book.xml:6715 -msgid "君子务本 (It is upon the Trunk that a gentleman works.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6719 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6724 -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 ()." -msgstr "" - -#.(title) -#: ../source/book.xml:6734 -msgid "What's a Branch?" -msgstr "" - -#.(para) -#: ../source/book.xml:6736 -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 tweaked for them, since they do things slightly differently." -msgstr "" - -#.(para) -#: ../source/book.xml:6741 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6746 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:6751 -msgid "This is the basic concept of a branch—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 )." -msgstr "" - -#.(title) -#: ../source/book.xml:6759 -msgid "Branches of development" -msgstr "" - -#.(para) -#: ../source/book.xml:6767 -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 mix and match different lines of development in your daily work." -msgstr "" - -#.(title) -#: ../source/book.xml:6781 -msgid "Using Branches" -msgstr "" - -#.(para) -#: ../source/book.xml:6783 -msgid "At this point, you should understand how each commit creates an entire new filesystem tree (called a revision) in the repository. If not, go back and read about revisions in ." -msgstr "" - -#.(para) -#: ../source/book.xml:6787 -msgid "For this chapter, we'll go back to the same example from . Remember that you and your collaborator, Sally, are sharing a repository that contains two projects, paint and calc. Notice that in , however, each project directory now contains subdirectories named trunk and branches. The reason for this will soon become clear." -msgstr "" - -#.(title) -#: ../source/book.xml:6797 -msgid "Starting repository layout" -msgstr "" - -#.(para) -#: ../source/book.xml:6805 -msgid "As before, assume that Sally and you both have working copies of the calc project. Specifically, you each have a working copy of /calc/trunk. All the files for the project are in this subdirectory rather than in /calc itself, because your team has decided that /calc/trunk is where the main line of development is going to take place." -msgstr "" - -#.(para) -#: ../source/book.xml:6813 -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 /calc/trunk) 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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6822 -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 /calc/trunk 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 best practice 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 svn update after weeks of isolation." -msgstr "" - -#.(para) -#: ../source/book.xml:6847 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:6856 -msgid "Creating a Branch" -msgstr "" - -#.(para) -#: ../source/book.xml:6858 -msgid "Creating a branch is very simple—you make a copy of the project in the repository using the svn copy 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 /calc/trunk 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 /calc/branches area of the repository, and you want to name your branch my-calc-branch. You'll want to create a new directory, /calc/branches/my-calc-branch, which begins its life as a copy of /calc/trunk." -msgstr "" - -#.(para) -#: ../source/book.xml:6873 -msgid "At this point, you might have seen svn copy used to copy one file to another within a working copy. But it can also be used to do a remote copy entirely within the repository. Just copy one URL to another:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6878 -#, no-wrap -msgid "\n$ svn copy http://svn.example.com/repos/calc/trunk \\\n http://svn.example.com/repos/calc/branches/my-calc-branch \\\n -m \"Creating a private branch of /calc/trunk.\"\n\nCommitted revision 341.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6890 -msgid "Subversion does not support copying between different repositories. When using URLs with svn copy or svn move, you can only copy items within the same repository." -msgstr "" - -#.(para) -#: ../source/book.xml:6885 -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 /calc/trunk. This is shown in . While it's also possible to create a branch by using svn copy 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." -msgstr "" - -#.(title) -#: ../source/book.xml:6906 -msgid "Repository with new copy" -msgstr "" - -#.(title) -#: ../source/book.xml:6916 -msgid "Cheap Copies" -msgstr "" - -#.(para) -#: ../source/book.xml:6918 -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 existing 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." -msgstr "" - -#.(para) -#: ../source/book.xml:6929 -msgid "This is why you'll often hear Subversion users talk about cheap copies. 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 cheap copy of the previous revision, with a few items lazily changed within. (To read more about this, visit Subversion's website and read about the bubble up method in Subversion's design documents.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6939 -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 svn copy URL1 URL2), it's a quick, constant-time operation. Make branches as often as you want." -msgstr "" - -#.(title) -#: ../source/book.xml:6951 -msgid "Working with Your Branch" -msgstr "" - -#.(para) -#: ../source/book.xml:6953 -msgid "Now that you've created a branch of the project, you can check out a new working copy to start using it:" -msgstr "" - -#.(screen) -#: ../source/book.xml:6955 -#, no-wrap -msgid "\n$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch\nA my-calc-branch/Makefile\nA my-calc-branch/integer.c\nA my-calc-branch/button.c\nChecked out revision 341.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:6962 -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 /calc/trunk. (Be sure to read later in this chapter: the svn switch command is an alternate way of creating a working copy of a branch.)" -msgstr "" - -#.(para) -#: ../source/book.xml:6969 -msgid "Let's pretend that a week goes by, and the following commits happen:" -msgstr "" - -#.(para) -#: ../source/book.xml:6973 -msgid "You make a change to /calc/branches/my-calc-branch/button.c, which creates revision 342." -msgstr "" - -#.(para) -#: ../source/book.xml:6979 -msgid "You make a change to /calc/branches/my-calc-branch/integer.c, which creates revision 343." -msgstr "" - -#.(para) -#: ../source/book.xml:6985 -msgid "Sally makes a change to /calc/trunk/integer.c, which creates revision 344." -msgstr "" - -#.(para) -#: ../source/book.xml:6991 -msgid "There are now two independent lines of development, shown in , happening on integer.c." -msgstr "" - -#.(title) -#: ../source/book.xml:6996 -msgid "The branching of one file's history" -msgstr "" - -#.(para) -#: ../source/book.xml:7004 -msgid "Things get interesting when you look at the history of changes made to your copy of integer.c:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7007 -#, no-wrap -msgid "\n$ pwd\n/home/user/my-calc-branch\n\n$ svn log -v integer.c\n------------------------------------------------------------------------\nr343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\nChanged paths:\n M /calc/branches/my-calc-branch/integer.c\n\n* integer.c: frozzled the wazjub.\n\n------------------------------------------------------------------------\nr341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\nChanged paths:\n A /calc/branches/my-calc-branch (from /calc/trunk:340)\n\nCreating a private branch of /calc/trunk.\n\n------------------------------------------------------------------------\nr303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\nChanged paths:\n M /calc/trunk/integer.c\n\n* integer.c: changed a docstring.\n\n------------------------------------------------------------------------\nr98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\nChanged paths:\n M /calc/trunk/integer.c\n\n* integer.c: adding this file to the project.\n\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7042 -msgid "Notice that Subversion is tracing the history of your branch's integer.c 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 integer.c was implicitly copied when all of /calc/trunk/ was copied. Now look what happens when Sally runs the same command on her copy of the file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7050 -#, no-wrap -msgid "\n$ pwd\n/home/sally/calc\n\n$ svn log -v integer.c\n------------------------------------------------------------------------\nr344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\nChanged paths:\n M /calc/trunk/integer.c\n\n* integer.c: fix a bunch of spelling errors.\n\n------------------------------------------------------------------------\nr303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\nChanged paths:\n M /calc/trunk/integer.c\n\n* integer.c: changed a docstring.\n\n------------------------------------------------------------------------\nr98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\nChanged paths:\n M /calc/trunk/integer.c\n\n* integer.c: adding this file to the project.\n\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7078 -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 does 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." -msgstr "" - -#.(title) -#: ../source/book.xml:7090 -msgid "The Key Concepts Behind Branching" -msgstr "" - -#.(para) -#: ../source/book.xml:7092 -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 branch because you 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." -msgstr "" - -#.(para) -#: ../source/book.xml:7101 -msgid "Second, because of this copy mechanism, Subversion's branches exist as normal filesystem directories in the repository. This is different from other version control systems, where branches are typically defined by adding extra-dimensional labels 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 /branches directory, but you're free to invent any policy you wish." -msgstr "" - -#.(title) -#: ../source/book.xml:7118 -msgid "Basic Merging" -msgstr "" - -#.(para) -#: ../source/book.xml:7120 -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 trunk, or main line of development." -msgstr "" - -#.(para) -#: ../source/book.xml:7124 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:7130 -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 too far apart. Remember that one of the problems with the crawl in a hole 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." -msgstr "" - -#.(para) -#: ../source/book.xml:7137 -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 copy 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 merging, and is performed using various invocations of the svn merge command." -msgstr "" - -#.(para) -#: ../source/book.xml:7147 -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 manual methods to achieve similar results. (See .)" -msgstr "" - -#.(title) -#: ../source/book.xml:7157 -msgid "Keeping a Branch in Sync" -msgstr "" - -#.(para) -#: ../source/book.xml:7159 -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 /trunk. 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 surprise conflicts when it comes time for you to fold your changes back into the trunk." -msgstr "" - -#.(para) -#: ../source/book.xml:7171 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7175 -#, no-wrap -msgid "\n$ pwd\n/home/user/my-calc-branch\n\n$ svn merge http://svn.example.com/repos/calc/trunk\n--- Merging r345 through r356 into '.':\nU button.c\nU integer.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7184 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7188 -#, no-wrap -msgid "\n$ svn status\nM button.c\nM integer.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7193 -msgid "At this point, the wise thing to do is look at the changes carefully with svn diff, then build and test your branch. You might need to resolve some conflicts (just as you do with svn update), or possibly make some small edits to get things working properly. (Remember, just because there are no syntactic conflicts doesn't mean there aren't any semantic conflicts!) If you encounter serious problems, you can always abort the local changes by running svn revert and start a long what's going on? discussion with your collaborators. If things look good, however, then you can submit your changes into the repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7206 -#, no-wrap -msgid "\n$ svn commit -m \"Merged /trunk to /my-calc-branch.\"\nSending button.c\nSending integer.c\nTransmitting file data ..\nCommitted revision 357.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7213 -msgid "At this point, your private branch is now in sync with the trunk, so you can rest easier knowing that as you continue to work in isolation, you're not drifting too far away from what everyone else is doing." -msgstr "" - -#.(title) -#: ../source/book.xml:7220 -msgid "Why Not Use Patches Instead?" -msgstr "" - -#.(para) -#: ../source/book.xml:7222 -msgid "A question may be on your mind, especially if you're a Unix user: why bother to use svn merge at all? Why not simply use the operating system's patch command to accomplish the same job? For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7227 -#, no-wrap -msgid "\n$ cd my-calc-branch\n$ svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk > patchfile\n$ patch -p0 < patchfile\nPatching file integer.c using Plan A...\nHunk #1 succeeded at 147.\nHunk #2 succeeded at 164.\nHunk #3 succeeded at 241.\nHunk #4 succeeded at 249.\ndone\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7238 -msgid "In this particular case, yes, there really is no difference. But svn merge has special abilities that surpass the patch program. The file format used by patch is quite limited; it's only able to tweak file contents. There's no way to represent changes to trees, such as the addition, removal, or renaming of files and directories. Nor can the patch program notice changes to properties. If Sally's change had, say, added a new directory, the output of svn diff wouldn't have mentioned it at all. svn diff only outputs the limited patch-format, so there are some ideas it simply can't express." -msgstr "" - -#.(para) -#: ../source/book.xml:7252 -msgid "The svn merge 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 .) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:7264 -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!" -msgstr "" - -#.(screen) -#: ../source/book.xml:7270 -#, no-wrap -msgid "\n$ svn merge http://svn.example.com/repos/calc/trunk\n--- Merging r357 through r380 into '.':\nU integer.c\nU Makefile\nA README\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7277 -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 svn commit the local modifications to your branch." -msgstr "" - -#.(para) -#: ../source/book.xml:7282 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7288 -#, no-wrap -msgid "\n$ svn merge http://svn.example.com/repos/calc/trunk\n--- Merging r381 through r385 into '.':\nU button.c\nU README\n\n$ # build, test, ...\n\n$ svn commit -m \"Final merge of trunk changes to my-calc-branch.\"\nSending button.c\nSending README\nTransmitting file data ..\nCommitted revision 390.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7302 -msgid "Now, you use svn merge to replicate your branch changes back into the trunk. To do this, you'll need a working copy of /trunk. You can do this by either doing an svn checkout, dredging up an old trunk working copy from somewhere on your disk, or by using svn switch (see .) Then invoke svn merge within your trunk working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7311 -#, no-wrap -msgid "\n$ pwd\n/home/user/calc-trunk\n\n$ svn merge http://svn.example.com/repos/calc/branches/my-calc-branch\n--- Merging r341 through r390 into '.':\nU button.c\nU integer.c\nU Makefile\n\n$ # build, test, verify, ...\n\n$ svn commit -m \"Merge my-calc-branch back into trunk!\"\nSending button.c\nSending integer.c\nSending Makefile\nTransmitting file data ..\nCommitted revision 391.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7330 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7334 -#, no-wrap -msgid "\n$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch\nCommitted revision 392.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7338 -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 /branches directory, its existence is still an immutable part of the repository's history. A simple svn log command on the /branches URL will show the entire history of your branch. Your branch can even be resurrected at some point, should you desire. (See .)" -msgstr "" - -#.(title) -#: ../source/book.xml:7353 -msgid "Basic Merge Tracking" -msgstr "" - -#.(para) -#: ../source/book.xml:7355 -msgid "###TODO: set expectations on what gets tracked and what doesn't." -msgstr "" - -#.(title) -#: ../source/book.xml:7360 -msgid "Mergeinfo" -msgstr "" - -#.(para) -#: ../source/book.xml:7362 -msgid "###TODO: explain svn:mergeinfo prop and 'svn mergeinfo' command, so users get a general sense of how the system is tracking changes." -msgstr "" - -#.(title) -#: ../source/book.xml:7369 -msgid "Previewing Merges" -msgstr "" - -#.(para) -#: ../source/book.xml:7371 -msgid "It's a best practice to do your merge into a working copy that has no local edits and has been recently updated. If your working copy isn't clean in these ways, you can run into some headaches." -msgstr "" - -#.(para) -#: ../source/book.xml:7376 -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 svn revert the changes and try again." -msgstr "" - -#.(para) -#: ../source/book.xml:7380 -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 svn revert is no longer an option. The two sets of changes may be impossible to separate." -msgstr "" - -#.(para) -#: ../source/book.xml:7385 -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 svn diff with the same arguments you plan to pass to svn merge, as we already showed in our first example of merging. Another method of previewing is to pass the option to the merge command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7393 -#, no-wrap -msgid "\n$ svn merge --dry-run http://svn.example.com/repos/calc/trunk\nU integer.c\n\n$ svn status\n# nothing printed, working copy is still unchanged.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7400 -msgid "The option doesn't actually apply any local changes to the working copy. It only shows status codes that would be printed in a real merge. It's useful for getting a high level preview of the potential merge, for those times when running svn diff gives too much detail." -msgstr "" - -#.(title) -#: ../source/book.xml:7411 -msgid "Multi-Layered Merges" -msgstr "" - -#.(para) -#: ../source/book.xml:7413 -msgid "###TODO: explain how a merge can apply successive patches, and that any intermediate conflicts *must* be resolved (for now, at least.)" -msgstr "" - -#.(title) -#: ../source/book.xml:7424 -msgid "Advanced Merging" -msgstr "" - -#.(para) -#: ../source/book.xml:7426 -msgid "###TODO: Intro: talk about how and why advanced users can pass specific revision numbers to 'svn merge'." -msgstr "" - -#.(title) -#: ../source/book.xml:7431 -msgid "Copying Specific Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:7433 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:7437 -msgid "Assume you get word that Sally made an interesting change to integer.c 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, before you start working too heavily in the same places." -msgstr "" - -#.(screen) -#: ../source/book.xml:7448 -#, no-wrap -msgid "\n$ svn diff -c 344 http://svn.example.com/repos/calc/trunk\n\nIndex: integer.c\n===================================================================\n--- integer.c\t(revision 343)\n+++ integer.c\t(revision 344)\n@@ -147,7 +147,7 @@\n case 6: sprintf(info->operating_system, \"HPFS (OS/2 or NT)\"); break;\n case 7: sprintf(info->operating_system, \"Macintosh\"); break;\n case 8: sprintf(info->operating_system, \"Z-System\"); break;\n- case 9: sprintf(info->operating_system, \"CPM\"); break;\n+ case 9: sprintf(info->operating_system, \"CP/M\"); break;\n case 10: sprintf(info->operating_system, \"TOPS-20\"); break;\n case 11: sprintf(info->operating_system, \"NTFS (Windows NT)\"); break;\n case 12: sprintf(info->operating_system, \"QDOS\"); break;\n@@ -164,7 +164,7 @@\n low = (unsigned short) read_byte(gzfile); /* read LSB */\n high = (unsigned short) read_byte(gzfile); /* read MSB */\n high = high << 8; /* interpret MSB correctly */\n- total = low + high; /* add them togethe for correct total */\n+ total = low + high; /* add them together for correct total */\n\n info->extra_header = (unsigned char *) my_malloc(total);\n fread(info->extra_header, total, 1, gzfile);\n@@ -241,7 +241,7 @@\n Store the offset with ftell() ! */\n\n if ((info->data_offset = ftell(gzfile))== -1) {\n- printf(\"error: ftell() retturned -1.\\n\");\n+ printf(\"error: ftell() returned -1.\\n\");\n exit(1);\n }\n\n@@ -249,7 +249,7 @@\n printf(\"I believe start of compressed data is %u\\n\", info->data_offset);\n #endif\n\n- /* Set postion eight bytes from the end of the file. */\n+ /* Set position eight bytes from the end of the file. */\n\n if (fseek(gzfile, -8, SEEK_END)) {\n printf(\"error: fseek() returned non-zero\\n\");\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7492 -msgid "The svn merge command is almost exactly the same. Instead of printing the differences to your terminal, however, it applies them directly to your working copy as local modifications:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7496 -#, no-wrap -msgid "\n$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\nU integer.c\n\n$ svn status\nM integer.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7503 -msgid "The output of svn merge shows that your copy of integer.c was patched. It now contains Sally's change—the change has been copied 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." -msgstr "" - -#.(para) -#: ../source/book.xml:7510 -msgid "In another scenario, it's possible that things may not have gone so well, and that integer.c may have entered a conflicted state. You might need to resolve the conflict using standard procedures (see ), or if you decide that the merge was a bad idea altogether, simply give up and svn revert the local change." -msgstr "" - -#.(para) -#: ../source/book.xml:7516 -msgid "But assuming that you've reviewed the merged change, you can svn commit 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 porting changes." -msgstr "" - -#.(para) -#: ../source/book.xml:7522 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7525 -#, no-wrap -msgid "\n$ svn commit -m \"integer.c: ported r344 (spelling fixes) from trunk.\"\nSending integer.c\nTransmitting file data .\nCommitted revision 360.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7531 -msgid "A word of warning: while svn diff and svn merge are very similar in concept, they do have different syntax in many cases. Be sure to read about them in for details, or ask svn help. For example, svn merge 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:" -msgstr "" - -#.(para) -#: ../source/book.xml:7542 -msgid "You want to merge directory changes into your current working directory." -msgstr "" - -#.(para) -#: ../source/book.xml:7546 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:7551 -msgid "If you are merging a directory and haven't specified a target path, svn merge 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, svn merge assumes the second case and tries to apply the changes to a local file with the same name." -msgstr "" - -#.(para) -#: ../source/book.xml:7558 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7562 -#, no-wrap -msgid "\n$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\nU my-calc-branch/integer.c\n" -msgstr "" - -#.(title) -#: ../source/book.xml:7570 -msgid "Advanced Merge Syntax" -msgstr "" - -#.(para) -#: ../source/book.xml:7572 -msgid "You've now seen some examples of the svn merge 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 svn merge behaves." -msgstr "" - -#.(para) -#: ../source/book.xml:7582 -msgid "The main source of confusion is the name of the command. The term merge 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 svn diff-and-apply, because that's all that happens: two repository trees are compared, and the differences are applied to a working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:7591 -msgid "If you're using svn merge to do basic copying of changes between branches, it will generally do the right thing automatically. For example, a command like" -msgstr "" - -#.(screen) -#: ../source/book.xml:7594 -#, no-wrap -msgid "\n$ svn merge http://svn.example.com/repos/calc/some-branch\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7597 -msgid "... will attempt to duplicate any changes made on some-branch 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 newest branch changes that happened since you last merged." -msgstr "" - -#.(para) -#: ../source/book.xml:7605 -msgid "If you choose to use the svn merge command in all its full glory by giving it specific revision ranges to duplicate, then the command takes three main arguments:" -msgstr "" - -#.(para) -#: ../source/book.xml:7611 -msgid "An initial repository tree (often called the left side of the comparison)," -msgstr "" - -#.(para) -#: ../source/book.xml:7616 -msgid "A final repository tree (often called the right side of the comparison)," -msgstr "" - -#.(para) -#: ../source/book.xml:7621 -msgid "A working copy to accept the differences as local changes (often called the target of the merge)." -msgstr "" - -#.(para) -#: ../source/book.xml:7626 -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 svn add or svn delete commands yourself. If you like the results, you can commit them. If you don't like the results, you can simply svn revert all of the changes." -msgstr "" - -#.(para) -#: ../source/book.xml:7635 -msgid "The syntax of svn merge allows you to specify the three necessary arguments rather flexibly. Here are some examples:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7638 -#, no-wrap -msgid "\n$ svn merge http://svn.example.com/repos/branch1@150 \\\n http://svn.example.com/repos/branch2@212 \\\n my-working-copy\n\n$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy\n\n$ svn merge -r 100:200 http://svn.example.com/repos/trunk\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7647 -msgid "The first syntax lays out all three arguments explicitly, naming each tree in the form URL@REV 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." -msgstr "" - -#.(title) -#: ../source/book.xml:7658 -msgid "Undoing Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:7660 -msgid "Another common use for svn merge is to roll back a change that has already been committed. Suppose you're working away happily on a working copy of /calc/trunk, and you discover that the change made way back in revision 303, which changed integer.c, is completely wrong. It never should have been committed. You can use svn merge to undo the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying , or by an equivalent .)" -msgstr "" - -#.(screen) -#: ../source/book.xml:7673 -#, no-wrap -msgid "\n$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\nU integer.c\n\n$ svn status\nM integer.c\n\n$ svn diff\n…\n# verify that the change is removed\n…\n\n$ svn commit -m \"Undoing change committed in r303.\"\nSending integer.c\nTransmitting file data .\nCommitted revision 350.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7690 -msgid "One way to think about a repository revision is as a specific group of changes (some version control systems call these changesets). By using the option, you can ask svn merge to apply a changeset, or whole range of changesets, to your working copy. In our case of undoing a change, we're asking svn merge to apply changeset #303 to our working copy backwards." -msgstr "" - -#.(title) -#: ../source/book.xml:7701 -msgid "Subversion and Changesets" -msgstr "" - -#.(para) -#: ../source/book.xml:7703 -msgid "Everyone seems to have a slightly different definition of changeset, or at least a different expectation of what it means for a version control system to have changeset features. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:7712 -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 revision N 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, this issue was fixed by revision 9238.. Somebody can then run svn log -r9238 to read about the exact changeset which fixed the bug, and run svn diff -c 9238 to see the patch itself. And Subversion's merge command also uses revision numbers. You can merge specific changesets from one branch to another by naming them in the merge arguments: svn merge -c 9238 would merge changeset #9238 into your working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:7731 -msgid "Keep in mind that rolling back a change like this is just like any other svn merge operation, so you should use svn status and svn diff to confirm that your work is in the state you want it to be in, and then use svn commit to send the final version to the repository. After committing, this particular changeset is no longer reflected in the HEAD revision." -msgstr "" - -#.(para) -#: ../source/book.xml:7739 -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 calc project between revisions 303 and 349, they'll still see the bad change, right?" -msgstr "" - -#.(para) -#: ../source/book.xml:7759 -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 for a possible workaround." -msgstr "" - -#.(para) -#: ../source/book.xml:7744 -msgid "Yes, that's true. When we talk about removing a change, we're really talking about removing it from HEAD. 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 HEAD 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. " -msgstr "" - -#.(title) -#: ../source/book.xml:7769 -msgid "Resurrecting Deleted Items" -msgstr "" - -#.(para) -#: ../source/book.xml:7771 -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 HEAD revision, but the object still exists in earlier revisions. One of the most common questions new users ask is, How do I get my old file or directory back?." -msgstr "" - -#.(para) -#: ../source/book.xml:7777 -msgid "The first step is to define exactly which 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 peg revision syntax—foo.c@224 —mentioned back in .)" -msgstr "" - -#.(para) -#: ../source/book.xml:7788 -msgid "First, you might need to use svn log to discover the exact coordinate pair you wish to resurrect. A good strategy is to run svn log --verbose in a directory which used to contain your deleted item. The 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 grep, or perhaps via an incremental search in an editor)." -msgstr "" - -#.(screen) -#: ../source/book.xml:7798 -#, no-wrap -msgid "\n$ cd parent-dir\n$ svn log -v\n…\n------------------------------------------------------------------------\nr808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines\nChanged paths:\n D /calc/trunk/real.c\n M /calc/trunk/integer.c\n\nAdded fast fourier transform functions to integer.c.\nRemoved real.c because code now in double.c.\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7812 -msgid "In the example, we're assuming that you're looking for a deleted file real.c. 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 /calc/trunk/real.c from revision 807." -msgstr "" - -#.(para) -#: ../source/book.xml:7820 -msgid "That was the hard part—the research. Now that you know what you want to restore, you have two different choices." -msgstr "" - -#.(para) -#: ../source/book.xml:7823 -msgid "One option is to use svn merge to apply revision 808 in reverse. (We've already discussed how to undo changes, see .) This would have the effect of re-adding real.c as a local modification. The file would be scheduled for addition, and after a commit, the file would again exist in HEAD." -msgstr "" - -#.(para) -#: ../source/book.xml:7831 -msgid "In this particular example, however, this is probably not the best strategy. Reverse-applying revision 808 would not only schedule real.c for addition, but the log message indicates that it would also undo certain changes to integer.c, which you don't want. Certainly, you could reverse-merge revision 808 and then svn revert the local modifications to integer.c, but this technique doesn't scale well. What if there were 90 files changed in revision 808?" -msgstr "" - -#.(para) -#: ../source/book.xml:7841 -msgid "A second, more targeted strategy is not to use svn merge at all, but rather the svn copy command. Simply copy the exact revision and path coordinate pair from the repository to your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7846 -#, no-wrap -msgid "\n$ svn copy -r 807 \\\n http://svn.example.com/repos/calc/trunk/real.c ./real.c\n\n$ svn status\nA + real.c\n\n$ svn commit -m \"Resurrected real.c from revision 807, /calc/trunk/real.c.\"\nAdding real.c\nTransmitting file data .\nCommitted revision 1390.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7858 -msgid "The plus sign in the status output indicates that the item isn't merely scheduled for addition, but scheduled for addition with history. Subversion remembers where it was copied from. In the future, running svn log 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 real.c isn't really new; it's a direct descendant of the original, deleted file." -msgstr "" - -#.(para) -#: ../source/book.xml:7867 -msgid "Although our example shows us resurrecting a file, note that these same techniques work just as well for resurrecting deleted directories." -msgstr "" - -#.(title) -#: ../source/book.xml:7874 -msgid "Manually Merging a Branch" -msgstr "" - -#.(para) -#: ../source/book.xml:7876 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:7880 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:7887 -msgid "So how do we use svn merge 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 /calc/trunk." -msgstr "" - -#.(para) -#: ../source/book.xml:7894 -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 wrong, and has burned many a new user! Since svn merge operates like svn diff, comparing the latest trunk and branch trees will not 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 removal of trunk changes that never happened on your branch." -msgstr "" - -#.(para) -#: ../source/book.xml:7905 -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 svn log 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 HEAD revision. That means you want to compare revisions 341 and HEAD of your branch directory, and apply those differences to a working copy of the trunk." -msgstr "" - -#.(para) -#: ../source/book.xml:7915 -msgid "A nice way of finding the revision in which a branch was created (the base of the branch) is to use the option to svn log. 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 will halt log output as soon as svn log detects that its target was copied or renamed." -msgstr "" - -#.(para) -#: ../source/book.xml:7925 -msgid "So in our continuing example," -msgstr "" - -#.(screen) -#: ../source/book.xml:7926 -#, no-wrap -msgid "\n$ svn log -v --stop-on-copy \\\n http://svn.example.com/repos/calc/branches/my-calc-branch\n…\n------------------------------------------------------------------------\nr341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\nChanged paths:\n A /calc/branches/my-calc-branch (from /calc/trunk:340)\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7937 -msgid "As expected, the final revision printed by this command is the revision in which my-calc-branch was created by copying." -msgstr "" - -#.(para) -#: ../source/book.xml:7941 -msgid "Here's the final merging procedure, then:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7942 -#, no-wrap -msgid "\n$ cd calc/trunk\n$ svn update\nAt revision 405.\n\n$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\nU integer.c\nU button.c\nU Makefile\n\n$ svn status\nM integer.c\nM button.c\nM Makefile\n\n# ...examine the diffs, compile, test, etc...\n\n$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\nSending integer.c\nSending button.c\nSending Makefile\nTransmitting file data ...\nCommitted revision 406.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7966 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:7970 -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 HEAD 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 new on your branch since the last time you merged. The trick is to figure out what's new." -msgstr "" - -#.(para) -#: ../source/book.xml:7979 -msgid "The first step is to run svn log on the trunk, and look for a log message about the last time you merged from the branch:" -msgstr "" - -#.(screen) -#: ../source/book.xml:7982 -#, no-wrap -msgid "\n$ cd calc/trunk\n$ svn log\n…\n------------------------------------------------------------------------\nr406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line\n\nMerged my-calc-branch changes r341:405 into the trunk.\n------------------------------------------------------------------------\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:7993 -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 HEAD." -msgstr "" - -#.(screen) -#: ../source/book.xml:7998 -#, no-wrap -msgid "\n$ cd calc/trunk\n$ svn update\nAt revision 480.\n\n# We notice that HEAD is currently 480, so we use it to do the merge:\n\n$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch\nU integer.c\nU button.c\nU Makefile\n\n$ svn commit -m \"Merged my-calc-branch changes r406:480 into the trunk.\"\nSending integer.c\nSending button.c\nSending Makefile\nTransmitting file data ...\nCommitted revision 481.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8017 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:8026 -msgid "Merge Conflicts" -msgstr "" - -#.(para) -#: ../source/book.xml:8028 -msgid "Just like the svn update command, svn merge applies changes to your working copy. And therefore it's also capable of creating conflicts. The conflicts produced by svn merge, however, are sometimes different, and this section explains those differences." -msgstr "" - -#.(para) -#: ../source/book.xml:8034 -msgid "To begin with, assume that your working copy has no local edits. When you svn update to a particular revision, the changes sent by the server will always apply cleanly 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8044 -msgid "But svn merge has no such guarantees and can be much more chaotic: the advanced user can ask the server to compare any 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. svn merge will do its best to apply as much of the delta as possible, but some parts may be impossible. Just as the Unix patch command sometimes complains about failed hunks, svn merge will complain about skipped targets:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8056 -#, no-wrap -msgid "\n $ svn merge -r 1288:1351 http://svn.example.com/repos/branch\n U foo.c\n U bar.c\n Skipped missing target: 'baz.c'\n U glub.c\n C glorb.h\n\n $\n " -msgstr "" - -#.(para) -#: ../source/book.xml:8066 -msgid "In the previous example it might be the case that baz.c 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 skipped 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 (svn revert --recursive), delete any unversioned files or directories left behind after the revert, and re-run svn merge with different arguments." -msgstr "" - -#.(para) -#: ../source/book.xml:8079 -msgid "Also notice that the previous example shows a conflict happening on glorb.h. We already stated that the working copy has no local edits: how can a conflict possibly happen? Again, because the user can use svn merge 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8087 -msgid "Another small difference between svn update and svn merge are the names of the full-text files created when a conflict happens. In , we saw that an update produces files named filename.mine, filename.rOLDREV, and filename.rNEWREV. When svn merge produces a conflict, though, it creates three files named filename.working, filename.left, and filename.right. In this case, the terms left and right 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." -msgstr "" - -#.(title) -#: ../source/book.xml:8109 -msgid "Blocking Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:8111 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:8121 -msgid "Logging and Blaming" -msgstr "" - -#.(para) -#: ../source/book.xml:8123 -msgid "###TODO: demonstrate 'svn log -g' and 'svn blame -g', and explain why they're useful." -msgstr "" - -#.(title) -#: ../source/book.xml:8129 -msgid "Noticing or Ignoring Ancestry" -msgstr "" - -#.(para) -#: ../source/book.xml:8131 -msgid "When conversing with a Subversion developer, you might very likely hear reference to the term ancestry. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8137 -msgid "For example, suppose you commit revision 100, which includes a change to a file foo.c. Then foo.c@99 is an ancestor of foo.c@100. On the other hand, suppose you commit the deletion of foo.c in revision 101, and then add a new file by the same name in revision 102. In this case, foo.c@99 and foo.c@102 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 ancestry." -msgstr "" - -#.(para) -#: ../source/book.xml:8149 -msgid "The reason for bringing this up is to point out an important difference between svn diff and svn merge. The former command ignores ancestry, while the latter command is quite sensitive to it. For example, if you asked svn diff to compare revisions 99 and 102 of foo.c, you would see line-based diffs; the diff command is blindly comparing two paths. But if you asked svn merge 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8161 -#, no-wrap -msgid "\n D foo.c\n A foo.c\n " -msgstr "" - -#.(para) -#: ../source/book.xml:8165 -msgid "Most merges involve comparing trees that are ancestrally related to one another, and therefore svn merge defaults to this behavior. Occasionally, however, you may want the merge 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 ). If you asked svn merge 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 svn merge to do a path-based comparison only, ignoring any relations between files and directories. Add the option to your merge command, and it will behave just like svn diff. (And conversely, the option will cause svn diff to behave like the merge command.)" -msgstr "" - -#.(title) -#: ../source/book.xml:8187 -msgid "Merges and Moves" -msgstr "" - -#.(para) -#: ../source/book.xml:8189 -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?" -msgstr "" - -#.(para) -#: ../source/book.xml:8196 -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 update command isn't as robust as it should be, particularly when dealing with copy and move operations." -msgstr "" - -#.(para) -#: ../source/book.xml:8201 -msgid "When you use svn copy 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 svn update or svn merge. Instead of telling the client, Copy that file you already have to this new location, 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 true renames—the svn move command is nothing more than an aggregation of svn copy and svn delete." -msgstr "" - -#.(para) -#: ../source/book.xml:8214 -msgid "For example, suppose that while working on your private branch, you rename integer.c to whole.c. 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 trunk, Sally has committed some improvements to integer.c. Now you decide to merge your branch to the trunk:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8222 -#, no-wrap -msgid "\n $ cd calc/trunk\n\n $ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n D integer.c\n A whole.c\n " -msgstr "" - -#.(para) -#: ../source/book.xml:8229 -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 integer.c file (the one containing Sally's latest changes), and blindly added your new whole.c file—which is a duplicate of the older version of integer.c. The net effect is that merging your rename to the branch has removed Sally's recent changes from the latest revision!" -msgstr "" - -#.(para) -#: ../source/book.xml:8239 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:8249 -msgid "Blocking Pre-1.5 Clients" -msgstr "" - -#.(para) -#: ../source/book.xml:8251 -msgid "###TODO: Why you might want to do this. (How did we decide to do this??)" -msgstr "" - -#.(title) -#: ../source/book.xml:8260 -msgid "Common Branching Patterns" -msgstr "" - -#.(para) -#: ../source/book.xml:8262 -msgid "There are many different uses for branching and svn merge, and this section describes the most common ones you're likely to run into." -msgstr "" - -#.(para) -#: ../source/book.xml:8265 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:8279 -msgid "Release Branches" -msgstr "" - -#.(para) -#: ../source/book.xml:8281 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8292 -msgid "Here's where version control can help. The typical procedure looks like this:" -msgstr "" - -#.(para) -#: ../source/book.xml:8296 -msgid "Developers commit all new work to the trunk. Day-to-day changes are committed to /trunk: new features, bugfixes, and so on." -msgstr "" - -#.(para) -#: ../source/book.xml:8304 -msgid "The trunk is copied to a release branch. When the team thinks the software is ready for release (say, a 1.0 release), then /trunk might be copied to /branches/1.0." -msgstr "" - -#.(para) -#: ../source/book.xml:8313 -msgid "Teams continue to work in parallel. One team begins rigorous testing of the release branch, while another team continues new work (say, for version 2.0) on /trunk. 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 frozen for final testing right before a release." -msgstr "" - -#.(para) -#: ../source/book.xml:8324 -msgid "The branch is tagged and released. When testing is complete, /branches/1.0 is copied to /tags/1.0.0 as a reference snapshot. The tag is packaged and released to customers." -msgstr "" - -#.(para) -#: ../source/book.xml:8333 -msgid "The branch is maintained over time. While work continues on /trunk for version 2.0, bugfixes continue to be ported from /trunk to /branches/1.0. When enough bugfixes have accumulated, management may decide to do a 1.0.1 release: /branches/1.0 is copied to /tags/1.0.1, and the tag is packaged and released." -msgstr "" - -#.(para) -#: ../source/book.xml:8345 -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 maintenance mode, and a number of tags representing final shipped versions." -msgstr "" - -#.(title) -#: ../source/book.xml:8355 -msgid "Feature Branches" -msgstr "" - -#.(para) -#: ../source/book.xml:8357 -msgid "A feature branch 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 /trunk. It's a temporary branch created to work on a complex change without interfering with the stability of /trunk. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8367 -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 /trunk 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 ever 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8381 -msgid "Most projects take a middle-of-the-road approach. They commonly insist that /trunk 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 /trunk were never destabilized), would it be too large a change to review? If the answer to that question is yes, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8394 -msgid "Finally, there's the issue of how to best keep a feature branch in sync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8401 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8409 -msgid "At some point, you'll be ready to merge the synchronized 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:" -msgstr "" - -#.(para) -#: ../source/book.xml:8416 -msgid "###TODO: SIMPLIFY THIS EXAMPLE TO SHOW MERGE-TRACKING" -msgstr "" - -#.(screen) -#: ../source/book.xml:8417 -#, no-wrap -msgid "\n $ cd trunk-working-copy\n\n $ svn update\n At revision 1910.\n\n $ svn merge http://svn.example.com/repos/calc/trunk@1910 \\\n http://svn.example.com/repos/calc/branches/mybranch@1910\n U real.c\n U integer.c\n A newdirectory\n A newdirectory/newfile\n …\n " -msgstr "" - -#.(para) -#: ../source/book.xml:8431 -msgid "By comparing the HEAD revision of the trunk with the HEAD 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8436 -msgid "Another way of thinking about this pattern is that your weekly sync of trunk to branch is analogous to running svn update in a working copy, while the final merge step is analogous to running svn commit from a working copy. After all, what else is a working copy but a very shallow private branch? It's a branch that's only capable of storing one change at a time." -msgstr "" - -#.(title) -#: ../source/book.xml:8451 -msgid "Traversing Branches" -msgstr "" - -#.(para) -#: ../source/book.xml:8453 -msgid "The svn switch 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 /calc/trunk to mirror the new branch location:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8462 -#, no-wrap -msgid "\n$ cd calc\n\n$ svn info | grep URL\nURL: http://svn.example.com/repos/calc/trunk\n\n$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch\nU integer.c\nU button.c\nU Makefile\nUpdated to revision 341.\n\n$ svn info | grep URL\nURL: http://svn.example.com/repos/calc/branches/my-calc-branch\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8477 -msgid "After switching 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8484 -msgid "The svn switch command also takes a () option, so you need not always move your working copy to the HEAD of the branch." -msgstr "" - -#.(para) -#: ../source/book.xml:8488 -msgid "Of course, most projects are more complicated than our calc example, containing multiple subdirectories. Subversion users often follow a specific algorithm when using branches:" -msgstr "" - -#.(para) -#: ../source/book.xml:8494 -msgid "Copy the project's entire trunk to a new branch directory." -msgstr "" - -#.(para) -#: ../source/book.xml:8498 -msgid "Switch only part of the trunk working copy to mirror the branch." -msgstr "" - -#.(para) -#: ../source/book.xml:8502 -msgid "In other words, if a user knows that the branch-work only needs to happen on a specific subdirectory, they use svn switch 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 trunk 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 mixed working copy—not only can working copies contain a mixture of working revisions, but a mixture of repository locations as well." -msgstr "" - -#.(para) -#: ../source/book.xml:8514 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8525 -msgid "You can, however, use svn switch with the option if the URL of your server changes and you don't want to abandon an existing working copy. See for more information and an example." -msgstr "" - -#.(para) -#: ../source/book.xml:8519 -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 same repository. Subversion repositories aren't yet able to communicate with one another; that's a feature planned for the future. " -msgstr "" - -#.(title) -#: ../source/book.xml:8532 -msgid "Switches and Updates" -msgstr "" - -#.(para) -#: ../source/book.xml:8534 -msgid "Have you noticed that the output of svn switch and svn update look the same? The switch command is actually a superset of the update command." -msgstr "" - -#.(para) -#: ../source/book.xml:8538 -msgid "When you run svn update, 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 svn switch and svn update is that the update command always compares two identical paths." -msgstr "" - -#.(para) -#: ../source/book.xml:8545 -msgid "That is, if your working copy is a mirror of /calc/trunk, then svn update will automatically compare your working copy of /calc/trunk to /calc/trunk in the HEAD revision. If you're switching your working copy to a branch, then svn switch will compare your working copy of /calc/trunk to some other branch-directory in the HEAD revision." -msgstr "" - -#.(para) -#: ../source/book.xml:8556 -msgid "In other words, an update moves your working copy through time. A switch moves your working copy through time and space." -msgstr "" - -#.(para) -#: ../source/book.xml:8560 -msgid "Because svn switch is essentially a variant of svn update, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8565 -msgid "For example, suppose you have a working copy of /calc/trunk 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 svn switch your working copy to the branch, the local changes will remain. You can then test and commit them to the branch." -msgstr "" - -#.(title) -#: ../source/book.xml:8578 -msgid "Tags" -msgstr "" - -#.(para) -#: ../source/book.xml:8580 -msgid "Another common version control concept is a tag. A tag is just a snapshot 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8586 -msgid "However, people often want to give more human-friendly names to tags, like release-1.0. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:8595 -msgid "Creating a Simple Tag" -msgstr "" - -#.(para) -#: ../source/book.xml:8597 -msgid "Once again, svn copy comes to the rescue. If you want to create a snapshot of /calc/trunk exactly as it looks in the HEAD revision, then make a copy of it:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8601 -#, no-wrap -msgid "\n$ svn copy http://svn.example.com/repos/calc/trunk \\\n http://svn.example.com/repos/calc/tags/release-1.0 \\\n -m \"Tagging the 1.0 release of the 'calc' project.\"\n\nCommitted revision 351.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8608 -msgid "This example assumes that a /calc/tags directory already exists. (If it doesn't, you can create it using svn mkdir.) After the copy completes, the new release-1.0 directory is forever a snapshot of how the project looked in the HEAD 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 /calc/trunk is exactly the snapshot you want, you can specify it by passing to the svn copy command." -msgstr "" - -#.(para) -#: ../source/book.xml:8622 -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 tag is because humans 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8632 -msgid "If you are administering a repository, there are two approaches you can take to managing tags. The first approach is hands off: 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 .) 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." -msgstr "" - -#.(title) -#: ../source/book.xml:8650 -msgid "Creating a Complex Tag" -msgstr "" - -#.(para) -#: ../source/book.xml:8652 -msgid "Sometimes you may want your snapshot to be more complicated than a single directory at a single revision." -msgstr "" - -#.(para) -#: ../source/book.xml:8655 -msgid "For example, pretend your project is much larger than our calc 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 svn update -r liberally), or by switching files and directories to particular branches (making use of svn switch). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8668 -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, svn copy actually has four different uses (which you can read about in ), including the ability to copy a working-copy tree to the repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8674 -#, no-wrap -msgid "\n$ ls\nmy-working-copy/\n\n$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag\n\nCommitted revision 352.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8682 -msgid "Now there is a new directory in the repository, /calc/tags/mytag, which is an exact snapshot of your working copy—mixed revisions, URLs, and all." -msgstr "" - -#.(para) -#: ../source/book.xml:8686 -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 svn diff and sending a patch file (which won't capture tree changes, symlink changes or changes in properties), you can instead use svn copy to upload 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 svn merge to receive your exact changes." -msgstr "" - -#.(para) -#: ../source/book.xml:8697 -msgid "While this is a nice method for uploading a quick snapshot of your working copy, note that this is not 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8705 -msgid "Have you ever found yourself making some complex edits (in your /trunk working copy) and suddenly realized, hey, these changes ought to be in their own branch? A great technique to do this can be summarized in two steps:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8710 -#, no-wrap -msgid "\n$ svn copy http://svn.example.com/repos/calc/trunk \\\n http://svn.example.com/repos/calc/branches/newbranch\nCommitted revision 353.\n\n$ svn switch http://svn.example.com/repos/calc/branches/newbranch\nAt revision 353.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8718 -msgid "The svn switch command, like svn update, preserves your local edits. At this point, your working copy is now a reflection of the newly created branch, and your next svn commit invocation will send your changes there." -msgstr "" - -#.(title) -#: ../source/book.xml:8732 -msgid "Branch Maintenance" -msgstr "" - -#.(para) -#: ../source/book.xml:8734 -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 too flexible. In this section, we'll offer some suggestions for arranging and managing your data over time." -msgstr "" - -#.(title) -#: ../source/book.xml:8744 -msgid "Repository Layout" -msgstr "" - -#.(para) -#: ../source/book.xml:8746 -msgid "There are some standard, recommended ways to organize a repository. Most people create a trunk directory to hold the main line of development, a branches directory to contain branch copies, and a tags directory to contain tag copies. If a repository holds only one project, then often people create these top-level directories:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8753 -#, no-wrap -msgid "\n/trunk\n/branches\n/tags\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8758 -msgid "If a repository contains multiple projects, admins typically index their layout by project (see to read more about project roots):" -msgstr "" - -#.(screen) -#: ../source/book.xml:8761 -#, no-wrap -msgid "\n/paint/trunk\n/paint/branches\n/paint/tags\n/calc/trunk\n/calc/branches\n/calc/tags\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8769 -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 svn move 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8779 -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 svn move operation might remove the path from the latest revision. When the user next runs svn update, she will be told that her working copy represents a path that no longer exists, and the user will be forced to svn switch to the new location." -msgstr "" - -#.(title) -#: ../source/book.xml:8794 -msgid "Data Lifetimes" -msgstr "" - -#.(para) -#: ../source/book.xml:8796 -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 calc project. After merging all of your changes back into /calc/trunk, there's no need for your private branch directory to stick around anymore:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8804 -#, no-wrap -msgid "\n$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n -m \"Removing obsolete branch of calc project.\"\n\nCommitted revision 375.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8810 -msgid "And now your branch is gone. Of course it's not really gone: the directory is simply missing from the HEAD revision, no longer distracting anyone. If you use svn checkout, svn switch, or svn list to examine an earlier revision, you'll still be able to see your old branch." -msgstr "" - -#.(para) -#: ../source/book.xml:8817 -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 HEAD, simply use svn copy -r to copy it from the old revision:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8823 -#, no-wrap -msgid "\n$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \\\n http://svn.example.com/repos/calc/branches/my-calc-branch\n\nCommitted revision 376.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8829 -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 main branches running side-by-side for very long periods. For example, suppose it's time to release a stable version of the calc 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 stable branch of the software that won't change much:" -msgstr "" - -#.(screen) -#: ../source/book.xml:8842 -#, no-wrap -msgid "\n$ svn copy http://svn.example.com/repos/calc/trunk \\\n http://svn.example.com/repos/calc/branches/stable-1.0 \\\n -m \"Creating stable branch of calc project.\"\n\nCommitted revision 377.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8849 -msgid "And now developers are free to continue adding cutting-edge (or experimental) features to /calc/trunk, and you can declare a project policy that only bug fixes are to be committed to /calc/branches/stable-1.0. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:8866 -msgid "Vendor branches" -msgstr "" - -#.(para) -#: ../source/book.xml:8868 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8877 -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 ). 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 bleeding edge 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." -msgstr "" - -#.(para) -#: ../source/book.xml:8888 -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 pin down specific versions of that information to some location in your own working copy directory (see )." -msgstr "" - -#.(para) -#: ../source/book.xml:8899 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8909 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:8917 -msgid "The solution to this problem is to use vendor branches. 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 vendor drop." -msgstr "" - -#.(para) -#: ../source/book.xml:8923 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:8935 -msgid "General Vendor Branch Management Procedure" -msgstr "" - -#.(para) -#: ../source/book.xml:8937 -msgid "Managing vendor branches generally works like this. You create a top-level directory (such as /vendor) 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, /trunk) 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 /trunk, resolving whatever conflicts occur between your local changes and the upstream changes." -msgstr "" - -#.(para) -#: ../source/book.xml:8950 -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 libcomplex, and our code drops will go into a subdirectory of our vendor branch called current. And since svn import creates all the intermediate parent directories it needs, we can actually accomplish both of these steps with a single command." -msgstr "" - -#.(screen) -#: ../source/book.xml:8962 -#, no-wrap -msgid "\n$ svn import /path/to/libcomplex-1.0 \\\n http://svn.example.com/repos/vendor/libcomplex/current \\\n -m 'importing initial 1.0 vendor drop'\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8968 -msgid "We now have the current version of the libcomplex source code in /vendor/libcomplex/current. Now, we tag that version (see ) and then copy it into the main development branch. Our copy will create a new directory called libcomplex in our existing calc project directory. It is in this copied version of the vendor data that we will make our customizations." -msgstr "" - -#.(screen) -#: ../source/book.xml:8977 -#, no-wrap -msgid "\n$ svn copy http://svn.example.com/repos/vendor/libcomplex/current \\\n http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n -m 'tagging libcomplex-1.0'\n…\n$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n http://svn.example.com/repos/calc/libcomplex \\\n -m 'bringing libcomplex-1.0 into the main branch'\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:8992 -msgid "And entirely bug-free, of course!" -msgstr "" - -#.(para) -#: ../source/book.xml:8987 -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. " -msgstr "" - -#.(para) -#: ../source/book.xml:8994 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9006 -msgid "To perform this upgrade, we check out a copy of our vendor branch, and replace the code in the current 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 current 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9017 -msgid "After replacing the 1.0 code with 1.1 code, svn status 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 svn add 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 svn delete. Finally, once our current working copy contains only the libcomplex 1.1 code, we commit the changes we made to get it looking that way." -msgstr "" - -#.(para) -#: ../source/book.xml:9029 -msgid "Our current 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:9035 -#, no-wrap -msgid "\n$ cd working-copies/calc\n$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n http://svn.example.com/repos/vendor/libcomplex/current \\\n libcomplex\n… # resolve all the conflicts between their changes and our changes\n$ svn commit -m 'merging libcomplex-1.1 into the main branch'\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9044 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9053 -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." -msgstr "" - -#.(command) -#: ../source/book.xml:9074 -msgid "svn_load_dirs.pl" -msgstr "" - -#.(para) -#: ../source/book.xml:9077 -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 svn_load_dirs.pl 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 svn_load_dirs.pl can help you more quickly and easily arrive at that stage." -msgstr "" - -#.(para) -#: ../source/book.xml:9089 -msgid "In short, svn_load_dirs.pl is an enhancement to svn import that has several important characteristics:" -msgstr "" - -#.(para) -#: ../source/book.xml:9094 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9100 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9105 -msgid "It will optionally tag the newly imported directory." -msgstr "" - -#.(para) -#: ../source/book.xml:9108 -msgid "It will optionally add arbitrary properties to files and directories that match a regular expression." -msgstr "" - -#.(para) -#: ../source/book.xml:9112 -msgid "svn_load_dirs.pl 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 svn_load_dirs.pl might look like:" -msgstr "" - -#.(screen) -#: ../source/book.xml:9120 -#, no-wrap -msgid "\n$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \\\n current \\\n /path/to/libcomplex-1.1\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9126 -msgid "You can indicate that you'd like svn_load_dirs.pl to tag the new vendor drop by passing the command-line option and specifying a tag name. This tag is another URL relative to the first program argument." -msgstr "" - -#.(screen) -#: ../source/book.xml:9131 -#, no-wrap -msgid "\n$ svn_load_dirs.pl -t libcomplex-1.1 \\\n http://svn.example.com/repos/vendor/libcomplex \\\n current \\\n /path/to/libcomplex-1.1\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9138 -msgid "When you run svn_load_dirs.pl, it examines the contents of your existing current 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, svn_load_dirs.pl 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 math.c in version 1.0 of libcomplex was renamed to arithmetic.c in libcomplex 1.1. Any discrepancies not explained by moves are treated as regular additions and deletions." -msgstr "" - -#.(para) -#: ../source/book.xml:9152 -msgid "The script also accepts a separate configuration file for setting properties on files and directories matching a regular expression that are added to the repository. This configuration file is specified to svn_load_dirs.pl using the 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 break or cont), and then optionally a property name and value." -msgstr "" - -#.(screen) -#: ../source/book.xml:9163 -#, no-wrap -msgid "\n\\.png$ break svn:mime-type image/png\n\\.jpe?g$ break svn:mime-type image/jpeg\n\\.m3u$ cont svn:mime-type audio/x-mpegurl\n\\.m3u$ break svn:eol-style LF\n.* break svn:eol-style native\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9170 -msgid "For each added path, the configured property changes whose regular expression matches the path are applied in order, unless the control specification is break (which means that no more property changes should be applied to that path). If the control specification is cont—an abbreviation for continue—then matching will continue with the next line of the configuration file." -msgstr "" - -#.(para) -#: ../source/book.xml:9178 -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 (\\) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9195 -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 svn copy command. We've shown how to use svn merge to copy changes from one branch to another, or roll back bad changes. We've gone over the use of svn switch to create mixed-location working copies. And we've talked about how one might manage the organization and lifetimes of branches in a repository." -msgstr "" - -#.(para) -#: ../source/book.xml:9205 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:9218 -msgid "Repository Administration" -msgstr "" - -#.(para) -#: ../source/book.xml:9220 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9227 -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 svnlook and svnadmin 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9239 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9234 -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, this chapter is for you." -msgstr "" - -#.(title) -#: ../source/book.xml:9249 -msgid "The Subversion Repository, Defined" -msgstr "" - -#.(para) -#: ../source/book.xml:9251 -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 inside the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:9260 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:9271 -#, no-wrap -msgid "\n$ ls repos\nconf/ dav/ db/ format hooks/ locks/ README.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9275 -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.)" -msgstr "" - -#.(term) -#: ../source/book.xml:9281 -msgid "conf" -msgstr "" - -#.(para) -#: ../source/book.xml:9283 -msgid "A directory containing repository configuration files." -msgstr "" - -#.(term) -#: ../source/book.xml:9287 -msgid "dav" -msgstr "" - -#.(para) -#: ../source/book.xml:9289 -msgid "A directory provided to mod_dav_svn for its private housekeeping data." -msgstr "" - -#.(term) -#: ../source/book.xml:9294 -msgid "db" -msgstr "" - -#.(para) -#: ../source/book.xml:9296 -msgid "The data store for all of your versioned data." -msgstr "" - -#.(term) -#: ../source/book.xml:9300 -msgid "format" -msgstr "" - -#.(para) -#: ../source/book.xml:9302 -msgid "A file that contains a single integer that indicates the version number of the repository layout." -msgstr "" - -#.(term), (secondary) -#: ../source/book.xml:9307 ../source/book.xml:24037 ../source/book.xml:24084 ../source/book.xml:24133 ../source/book.xml:24179 ../source/book.xml:24242 ../source/book.xml:24304 ../source/book.xml:24355 ../source/book.xml:24401 ../source/book.xml:24454 -msgid "hooks" -msgstr "" - -#.(para) -#: ../source/book.xml:9309 -msgid "A directory full of hook script templates (and hook scripts themselves, once you've installed some)." -msgstr "" - -#.(term) -#: ../source/book.xml:9314 -msgid "locks" -msgstr "" - -#.(para) -#: ../source/book.xml:9316 -msgid "A directory for Subversion's repository lock files, used for tracking accessors to the repository." -msgstr "" - -#.(term) -#: ../source/book.xml:9321 -msgid "README.txt" -msgstr "" - -#.(para) -#: ../source/book.xml:9323 -msgid "A file whose contents merely inform its readers that they are looking at a Subversion repository." -msgstr "" - -#.(para) -#: ../source/book.xml:9328 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:9345 -msgid "Strategies for Repository Deployment" -msgstr "" - -#.(para) -#: ../source/book.xml:9347 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9355 -msgid "Some things you'll want to consider up front, though, are:" -msgstr "" - -#.(para) -#: ../source/book.xml:9358 -msgid "What data do you expect to live in your repository (or repositories), and how will that data be organized?" -msgstr "" - -#.(para) -#: ../source/book.xml:9362 -msgid "Where will your repository live, and how will it be accessed?" -msgstr "" - -#.(para) -#: ../source/book.xml:9366 -msgid "What types of access control and repository event reporting do you need?" -msgstr "" - -#.(para) -#: ../source/book.xml:9370 -msgid "Which of the available types of data store do you want to use?" -msgstr "" - -#.(para) -#: ../source/book.xml:9374 -msgid "In this section, we'll try to help you answer those questions." -msgstr "" - -#.(title) -#: ../source/book.xml:9379 -msgid "Planning Your Repository Organization" -msgstr "" - -#.(para) -#: ../source/book.xml:9381 -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 laying out your repository or repositories and their versioned contents ahead of time, you can prevent many future headaches." -msgstr "" - -#.(para) -#: ../source/book.xml:9392 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9398 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9422 -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 not the kind of thing you should weigh when deciding how to arrange your projects and repositories." -msgstr "" - -#.(para) -#: ../source/book.xml:9406 -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. " -msgstr "" - -#.(para) -#: ../source/book.xml:9429 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9454 -msgid "The trunk, tags, and branches trio are sometimes referred to as the TTB directories." -msgstr "" - -#.(para) -#: ../source/book.xml:9437 -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 ), the Subversion community recommends that you choose a repository location for each project root—the top-most directory which contains data related to that project—and then create three subdirectories beneath that root: trunk, meaning the directory under which the main project development occurs; branches, which is a directory in which to create various named branches of the main development line; tags, which is a collection of tree snapshots that are created, and perhaps destroyed, but never changed. " -msgstr "" - -#.(para) -#: ../source/book.xml:9458 -msgid "For example, your repository might look like:" -msgstr "" - -#.(screen) -#: ../source/book.xml:9459 -#, no-wrap -msgid "\n/\n calc/\n trunk/\n tags/\n branches/\n calendar/\n trunk/\n tags/\n branches/\n spreadsheet/\n trunk/\n tags/\n branches/\n …\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9475 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:9484 -#, no-wrap -msgid "\n/\n utils/\n calc/\n trunk/\n tags/\n branches/\n calendar/\n trunk/\n tags/\n branches/\n …\n office/\n spreadsheet/\n trunk/\n tags/\n branches/\n …\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9503 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9509 -msgid "In the name of full disclosure, though, we'll mention another very common layout. In this layout, the trunk, tags, and branches directories live in the root directory of your repository, and your projects are in subdirectories beneath those, like:" -msgstr "" - -#.(screen) -#: ../source/book.xml:9515 -#, no-wrap -msgid "\n/\n trunk/\n calc/\n calendar/\n spreadsheet/\n …\n tags/\n calc/\n calendar/\n spreadsheet/\n …\n branches/\n calc/\n calendar/\n spreadsheet/\n …\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9533 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:9551 -msgid "Deciding Where and How to Host Your Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:9553 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9563 -msgid "We cover server choice and configuration in , 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9573 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:9582 -msgid "Choosing a Data Store" -msgstr "" - -#.(para) -#: ../source/book.xml:9595 -msgid "Often pronounced fuzz-fuzz, if Jack Repenning has anything to say about it. (This book, however, assumes that the reader is thinking eff-ess-eff-ess.)" -msgstr "" - -#.(para) -#: ../source/book.xml:9584 -msgid "As of version 1.1, Subversion provides two options for the type of underlying data store—often referred to as the back-end or, somewhat confusingly, the (versioned) filesystem—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 BDB-backed. 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 FSFS —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." -msgstr "" - -#.(para) -#: ../source/book.xml:9602 -msgid " gives a comparative overview of Berkeley DB and FSFS repositories." -msgstr "" - -#.(title) -#: ../source/book.xml:9607 -msgid "Repository Data Store Comparison" -msgstr "" - -#.(entry) -#: ../source/book.xml:9612 -msgid "Category" -msgstr "" - -#.(entry) -#: ../source/book.xml:9613 ../source/book.xml:11968 -msgid "Feature" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:9614 ../source/book.xml:9715 -msgid "Berkeley DB" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:9615 ../source/book.xml:9831 -msgid "FSFS" -msgstr "" - -#.(entry) -#: ../source/book.xml:9620 -msgid "Reliability" -msgstr "" - -#.(entry) -#: ../source/book.xml:9621 -msgid "Data integrity" -msgstr "" - -#.(entry) -#: ../source/book.xml:9622 -msgid "when properly deployed, extremely reliable; Berkeley DB 4.4 brings auto-recovery" -msgstr "" - -#.(entry) -#: ../source/book.xml:9624 -msgid "older versions had some rarely demonstrated, but data-destroying bugs" -msgstr "" - -#.(entry) -#: ../source/book.xml:9628 -msgid "Sensitivity to interruptions" -msgstr "" - -#.(quote) -#: ../source/book.xml:9630 -msgid "wedged" -msgstr "" - -#.(entry) -#: ../source/book.xml:9629 -msgid "very; crashes and permission problems can leave the database , requiring journaled recovery procedures" -msgstr "" - -#.(entry) -#: ../source/book.xml:9632 -msgid "quite insensitive" -msgstr "" - -#.(entry) -#: ../source/book.xml:9635 -msgid "Accessibility" -msgstr "" - -#.(entry) -#: ../source/book.xml:9636 -msgid "Usable from a read-only mount" -msgstr "" - -#.(entry) -#: ../source/book.xml:9637 ../source/book.xml:9642 -msgid "no" -msgstr "" - -#.(entry) -#: ../source/book.xml:9638 ../source/book.xml:9643 ../source/book.xml:9648 -msgid "yes" -msgstr "" - -#.(entry) -#: ../source/book.xml:9641 -msgid "Platform-independent storage" -msgstr "" - -#.(entry) -#: ../source/book.xml:9646 -msgid "Usable over network filesystems" -msgstr "" - -#.(entry) -#: ../source/book.xml:9647 -msgid "generally, no" -msgstr "" - -#.(entry) -#: ../source/book.xml:9651 -msgid "Group permissions handling" -msgstr "" - -#.(entry) -#: ../source/book.xml:9652 -msgid "sensitive to user umask problems; best if accessed by only one user" -msgstr "" - -#.(entry) -#: ../source/book.xml:9654 -msgid "works around umask problems" -msgstr "" - -#.(entry) -#: ../source/book.xml:9657 -msgid "Scalability" -msgstr "" - -#.(entry) -#: ../source/book.xml:9658 -msgid "Repository disk usage" -msgstr "" - -#.(entry) -#: ../source/book.xml:9659 -msgid "larger (especially if logfiles aren't purged)" -msgstr "" - -#.(entry) -#: ../source/book.xml:9660 -msgid "smaller" -msgstr "" - -#.(entry) -#: ../source/book.xml:9663 -msgid "Number of revision trees" -msgstr "" - -#.(entry) -#: ../source/book.xml:9664 -msgid "database; no problems" -msgstr "" - -#.(entry) -#: ../source/book.xml:9665 -msgid "some older native filesystems don't scale well with thousands of entries in a single directory" -msgstr "" - -#.(entry) -#: ../source/book.xml:9669 -msgid "Directories with many files" -msgstr "" - -#.(entry) -#: ../source/book.xml:9670 -msgid "slower" -msgstr "" - -#.(entry) -#: ../source/book.xml:9671 -msgid "faster" -msgstr "" - -#.(entry) -#: ../source/book.xml:9674 -msgid "Performance" -msgstr "" - -#.(entry) -#: ../source/book.xml:9675 -msgid "Checking out latest revision" -msgstr "" - -#.(entry) -#: ../source/book.xml:9676 ../source/book.xml:9677 -msgid "no meaningful difference" -msgstr "" - -#.(entry) -#: ../source/book.xml:9680 -msgid "Large commits" -msgstr "" - -#.(entry) -#: ../source/book.xml:9681 -msgid "slower overall, but cost is amortized across the lifetime of the commit" -msgstr "" - -#.(entry) -#: ../source/book.xml:9683 -msgid "faster overall, but finalization delay may cause client timeouts" -msgstr "" - -#.(para) -#: ../source/book.xml:9689 -msgid "There are advantages and disadvantages to each of these two back-end types. Neither of them is more official 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 , 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9702 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9710 -msgid "The following subsections provide a more detailed look at the available data store types." -msgstr "" - -#.(para) -#: ../source/book.xml:9717 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9723 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9737 -msgid "Another great feature of Berkeley DB is hot backups—the ability to backup the database environment without taking it offline. We'll discuss how to backup your repository in , but the benefits of being able to make fully functional copies of your repositories without any downtime should be obvious." -msgstr "" - -#.(para) -#: ../source/book.xml:9743 -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 checkpoint—a location in the log files known not to be corrupt—and replay transactions until the data is restored to a usable state. See for more about Berkeley DB log files." -msgstr "" - -#.(para) -#: ../source/book.xml:9755 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9768 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9766 -msgid "While Berkeley DB promises to behave correctly on network shares that meet a particular set of specifications, most networked filesystem types and appliances do not 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:9780 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9788 -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 wedge besides crashed processes, such as programs conflicting over ownership and permissions on the database files." -msgstr "" - -#.(para) -#: ../source/book.xml:9808 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9820 -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 httpd or svnserve (see )—rather than accessing it as many different users via file:// or svn+ssh:// URLs. If using a Berkeley DB repository directly as multiple users, be sure to read ." -msgstr "" - -#.(para) -#: ../source/book.xml:9833 -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 hot, just like a BDB-backed repository." -msgstr "" - -#.(para) -#: ../source/book.xml:9846 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9856 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:9866 -msgid "The most important distinction, however, is FSFS's imperviousness to wedging 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9878 -msgid "Oracle bought Sleepycat and its flagship software, Berkeley DB, on Valentine's Day in 2006." -msgstr "" - -#.(para) -#: ../source/book.xml:9874 -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, 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." -msgstr "" - -#.(title) -#: ../source/book.xml:9895 -msgid "Creating and Configuring Your Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:9897 -msgid "In , 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." -msgstr "" - -#.(title) -#: ../source/book.xml:9907 -msgid "Creating the Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:9909 -msgid "Subversion repository creation is an incredibly simple task. The svnadmin utility that comes with Subversion provides a subcommand (create) for doing just that." -msgstr "" - -#.(screen) -#: ../source/book.xml:9913 ../source/book.xml:21457 -#, no-wrap -msgid "\n$ svnadmin create /var/svn/repos\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9916 -msgid "This creates a new repository in the directory /var/svn/repos, 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 argument, which accepts as a parameter either fsfs or bdb." -msgstr "" - -#.(screen) -#: ../source/book.xml:9924 -#, no-wrap -msgid "\n$ # Create an FSFS-backed repository\n$ svnadmin create --fs-type fsfs /var/svn/repos\n$\n" -msgstr "" - -#.(screen) -#: ../source/book.xml:9929 -#, no-wrap -msgid "\n# Create a Berkeley-DB-backed repository\n$ svnadmin create --fs-type bdb /var/svn/repos\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:9934 -msgid "After running this simple command, you have a Subversion repository." -msgstr "" - -#.(para) -#: ../source/book.xml:9937 -msgid "The path argument to svnadmin is just a regular filesystem path and not a URL like the svn client program uses when referring to repositories. Both svnadmin and svnlook 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 localfile:// ones) to these two programs." -msgstr "" - -#.(para) -#: ../source/book.xml:9949 -msgid "Present in the db/ 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 (/) directory. Initially, revision 0 also has a single revision property, svn:date, set to the time at which the repository was created." -msgstr "" - -#.(para) -#: ../source/book.xml:9957 -msgid "Now that you have a repository, it's time to customize it." -msgstr "" - -#.(para) -#: ../source/book.xml:9960 -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 by hand. The svnadmin 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 not attempt manual manipulation of your version control history by poking and prodding around in your repository's data store files!" -msgstr "" - -#.(title) -#: ../source/book.xml:9977 -msgid "Implementing Repository Hooks" -msgstr "" - -#.(para) -#: ../source/book.xml:9979 -msgid "A hook 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 pre hooks) 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 post hooks) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:9992 -msgid "The hooks subdirectory is, by default, filled with templates for various repository hooks." -msgstr "" - -#.(screen) -#: ../source/book.xml:9995 -#, no-wrap -msgid "\n$ ls repos/hooks/\npost-commit.tmpl\t post-unlock.tmpl pre-revprop-change.tmpl\npost-lock.tmpl\t\t pre-commit.tmpl pre-unlock.tmpl\npost-revprop-change.tmpl pre-lock.tmpl start-commit.tmpl\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10001 -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 repos/hooks directory which can be executed as the name (like start-commit or post-commit) of the hook." -msgstr "" - -#.(para) -#: ../source/book.xml:10013 -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 .tmpl 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 .exe for programs, and .bat for batch files." -msgstr "" - -#.(para) -#: ../source/book.xml:10030 -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 $PATH (or %PATH%, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10040 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10052 -msgid "There are nine hooks implemented by the Subversion repository, and you can get details about each of them in . 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10064 -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 for discussion of some of the most commonly used hook programs. Or, if you wish to write your own, see ." -msgstr "" - -#.(para) -#: ../source/book.xml:10073 -msgid "While hook scripts can do almost anything, there is one dimension in which hook script authors should show restraint: do not 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 validate the transaction in the pre-commit 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." -msgstr "" - -#.(title) -#: ../source/book.xml:10095 -msgid "Berkeley DB Configuration" -msgstr "" - -#.(para) -#: ../source/book.xml:10097 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10108 -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 DB_CONFIG in the environment directory (namely, the repository's db 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 DB_CONFIG 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 DB_CONFIG won't take effect until you recover the database environment (using svnadmin recover)." -msgstr "" - -#.(title) -#: ../source/book.xml:10137 -msgid "Repository Maintenance" -msgstr "" - -#.(para) -#: ../source/book.xml:10139 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:10150 -msgid "An Administrator's Toolkit" -msgstr "" - -#.(para) -#: ../source/book.xml:10152 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10164 -msgid "The svnadmin 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 svnadmin is similar to that of other Subversion command-line programs:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10171 -#, no-wrap -msgid "\n$ svnadmin help\ngeneral usage: svnadmin SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\nType 'svnadmin help <subcommand>' for help on a specific subcommand.\nType 'svnadmin --version' to see the program version and FS modules.\n\nAvailable subcommands:\n crashtest\n create\n deltify\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10183 -msgid "We've already mentioned svnadmin's create subcommand (see ). Most of the others we will cover later in this chapter. And you can consult for a full rundown of subcommands and what each of them offers." -msgstr "" - -#.(para) -#: ../source/book.xml:10194 -msgid "svnlook is a tool provided by Subversion for examining the various revisions and transactions (which are revisions in-the-making) in a repository. No part of this program attempts to change the repository. svnlook is typically used by the repository hooks for reporting the changes that are about to be committed (in the case of the pre-commit hook) or that were just committed (in the case of the post-commit hook) to the repository. A repository administrator may use this tool for diagnostic purposes." -msgstr "" - -#.(para) -#: ../source/book.xml:10205 -msgid "svnlook has a straightforward syntax:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10207 -#, no-wrap -msgid "\n$ svnlook help\ngeneral usage: svnlook SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\nNote: any subcommand which takes the '--revision' and '--transaction'\n options will, if invoked without one of those options, act on\n the repository's youngest revision.\nType 'svnlook help <subcommand>' for help on a specific subcommand.\nType 'svnlook --version' to see the program version and FS modules.\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10217 -msgid "Nearly every one of svnlook'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 and options to specify which revision or transaction, respectively, to examine. In the absence of both the and options, svnlook will examine the youngest (or HEAD) 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 /var/svn/repos:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10231 -#, no-wrap -msgid "\n$ svnlook info /var/svn/repos\n$ svnlook info /var/svn/repos -r 19\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10235 -msgid "The only exception to these rules about subcommands is the svnlook youngest subcommand, which takes no options, and simply prints out the repository's youngest revision number." -msgstr "" - -#.(screen) -#: ../source/book.xml:10239 -#, no-wrap -msgid "\n$ svnlook youngest /var/svn/repos\n19\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10244 -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) or aborted and removed." -msgstr "" - -#.(para) -#: ../source/book.xml:10251 -msgid "Output from svnlook is designed to be both human- and machine-parsable. Take as an example the output of the info subcommand:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10254 -#, no-wrap -msgid "\n$ svnlook info /var/svn/repos\nsally\n2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002)\n27\nAdded the usual\nGreek tree.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10262 -msgid "The output of the info subcommand is defined as:" -msgstr "" - -#.(para) -#: ../source/book.xml:10266 -msgid "The author, followed by a newline." -msgstr "" - -#.(para) -#: ../source/book.xml:10269 -msgid "The date, followed by a newline." -msgstr "" - -#.(para) -#: ../source/book.xml:10272 -msgid "The number of characters in the log message, followed by a newline." -msgstr "" - -#.(para) -#: ../source/book.xml:10276 -msgid "The log message itself, followed by a newline." -msgstr "" - -#.(para) -#: ../source/book.xml:10279 -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, svnlook 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10292 -msgid "svnlook 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 for a full reference of svnlook's features." -msgstr "" - -#.(para) -#: ../source/book.xml:10306 -msgid "While it won't be the most commonly used tool at the administrator's disposal, svndumpfilter 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10312 -msgid "The syntax of svndumpfilter is as follows:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10314 -#, no-wrap -msgid "\n$ svndumpfilter help\ngeneral usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...]\nType \"svndumpfilter help <subcommand>\" for help on a specific subcommand.\nType 'svndumpfilter --version' to see the program version.\n \nAvailable subcommands:\n exclude\n include\n help (?, h)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10325 -msgid "There are only two interesting subcommands. They allow you to make the choice between explicit or implicit inclusion of paths in the stream:" -msgstr "" - -#.(literal) -#: ../source/book.xml:10331 -msgid "exclude" -msgstr "" - -#.(para) -#: ../source/book.xml:10334 -msgid "Filter out a set of paths from the dump data stream." -msgstr "" - -#.(literal) -#: ../source/book.xml:10340 -msgid "include" -msgstr "" - -#.(para) -#: ../source/book.xml:10343 -msgid "Allow only the requested set of paths to pass through the dump data stream." -msgstr "" - -#.(para) -#: ../source/book.xml:10348 -msgid "You can learn more about these subcommands and svndumpfilter's unique purpose in ." -msgstr "" - -#.(para) -#: ../source/book.xml:10365 -msgid "Or is that, the sync?" -msgstr "" - -#.(para) -#: ../source/book.xml:10356 -msgid "The svnsync 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 source and sink repositories may be on different computers from each other and from svnsync itself." -msgstr "" - -#.(para) -#: ../source/book.xml:10368 -msgid "As you might expect, svnsync has a syntax that looks very much like every other program we've mentioned in this chapter:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10371 -#, no-wrap -msgid "\n$ svnsync help\ngeneral usage: svnsync SUBCOMMAND DEST_URL [ARGS & OPTIONS ...]\nType 'svnsync help <subcommand>' for help on a specific subcommand.\nType 'svnsync --version' to see the program version and RA modules.\n\nAvailable subcommands:\n initialize (init)\n synchronize (sync)\n copy-revprops\n help (?, h)\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10384 -msgid "We talk more about replication repositories with svnsync in ." -msgstr "" - -#.(title) -#: ../source/book.xml:10390 -msgid "Berkeley DB Utilities" -msgstr "" - -#.(para) -#: ../source/book.xml:10392 -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 db/ 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10400 -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 svnadmin tool. For example, svnadmin list-unused-dblogs and svnadmin list-dblogs perform a subset of what is provided by the Berkeley db_archive command, and svnadmin recover reflects the common use cases of the db_recover utility." -msgstr "" - -#.(para) -#: ../source/book.xml:10410 -msgid "However, there are still a few Berkeley DB utilities that you might find useful. The db_dump and db_load 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 svnadmin dump and svnadmin load for similar purposes, but db_dump and db_load 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 db_stat utility can provide useful information about the status of your Berkeley DB environment, including detailed statistics about the locking and storage subsystems." -msgstr "" - -#.(para) -#: ../source/book.xml:10430 -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 http://www.oracle.com/technology/documentation/berkeley-db/db/." -msgstr "" - -#.(title) -#: ../source/book.xml:10438 -msgid "Commit Log Message Correction" -msgstr "" - -#.(para) -#: ../source/book.xml:10440 -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 pre-revprop-change hook; see ) to accept changes to this log message after the commit is finished, then the user can fix her log message remotely using the svn program's propset command (see ). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10452 -msgid "If a log message needs to be changed by an administrator, this can be done using svnadmin setlog. This command changes the log message (the svn:log property) on a given revision of a repository, reading the new value from a provided file." -msgstr "" - -#.(screen) -#: ../source/book.xml:10457 -#, no-wrap -msgid "\n$ echo \"Here is the new, correct log message\" > newlog.txt\n$ svnadmin setlog myrepos newlog.txt -r 388\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10461 -msgid "The svnadmin setlog command, by default, is still bound by the same protections against modifying unversioned properties as a remote client is—the pre- and post-revprop-change 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 to the svnadmin setlog command." -msgstr "" - -#.(para) -#: ../source/book.xml:10472 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:10483 -msgid "Managing Disk Space" -msgstr "" - -#.(para) -#: ../source/book.xml:10485 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:10497 -msgid "How Subversion saves disk space" -msgstr "" - -#.(para) -#: ../source/book.xml:10499 -msgid "To keep the repository small, Subversion uses deltification (or, deltified storage) 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, I look just like this other piece of data over here, except for the following couple of changes. 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 fulltext 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10519 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:10534 -msgid "Removing dead transactions" -msgstr "" - -#.(para) -#: ../source/book.xml:10536 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10548 -msgid "You can use svnadmin's lstxns command to list the names of the currently outstanding transactions." -msgstr "" - -#.(screen) -#: ../source/book.xml:10551 -#, no-wrap -msgid "\n$ svnadmin lstxns myrepos\n19\n3a1\na45\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10558 -msgid "Each item in the resultant output can then be used with svnlook (and its 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 svnadmin rmtxns, which will perform the cleanup of the transaction. In fact, the rmtxns subcommand can take its input directly from the output of lstxns!" -msgstr "" - -#.(screen) -#: ../source/book.xml:10571 -#, no-wrap -msgid "\n$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos`\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10575 -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. contains a bit of shell-scripting that can quickly generate information about each outstanding transaction in your repository." -msgstr "" - -#.(title) -#: ../source/book.xml:10584 -msgid "txn-info.sh (Reporting Outstanding Transactions)" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:10586 -#, no-wrap -msgid "\n#!/bin/sh\n\n### Generate informational output for all outstanding transactions in\n### a Subversion repository.\n\nREPOS=\"${1}\"\nif [ \"x$REPOS\" = x ] ; then\n echo \"usage: $0 REPOS_PATH\"\n exit\nfi\n\nfor TXN in `svnadmin lstxns ${REPOS}`; do \n echo \"---[ Transaction ${TXN} ]-------------------------------------------\"\n svnlook info \"${REPOS}\" -t \"${TXN}\"\ndone\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10604 -msgid "The output of the script is basically a concatenation of several chunks of svnlook info output (see ), and will look something like:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10608 -#, no-wrap -msgid "\n$ txn-info.sh myrepos\n---[ Transaction 19 ]-------------------------------------------\nsally\n2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001)\n0\n---[ Transaction 3a1 ]-------------------------------------------\nharry\n2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001)\n39\nTrying to commit over a faulty network.\n---[ Transaction a45 ]-------------------------------------------\nsally\n2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001)\n0\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10625 -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?" -msgstr "" - -#.(para) -#: ../source/book.xml:10630 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:10642 -msgid "Purging unused Berkeley DB logfiles" -msgstr "" - -#.(para) -#: ../source/book.xml:10644 -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 between states. Thus, they can grow and accumulate quite rapidly." -msgstr "" - -#.(para) -#: ../source/book.xml:10654 -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 svnadmin 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 to the svnadmin create command. If you forget to do this, or change your mind at a later time, simply edit the DB_CONFIG file found in your repository's db directory, comment out the line which contains the set_flags DB_LOG_AUTOREMOVE directive, and then run svnadmin recover on your repository to force the configuration changes to take effect. See for more information about database configuration." -msgstr "" - -#.(para) -#: ../source/book.xml:10671 -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 svnadmin list-unused-dblogs command to list the unused log files:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10682 -#, no-wrap -msgid "\n$ svnadmin list-unused-dblogs /var/svn/repos\n/var/svn/repos/log.0000000031\n/var/svn/repos/log.0000000032\n/var/svn/repos/log.0000000033\n…\n$ rm `svnadmin list-unused-dblogs /var/svn/repos`\n## disk space reclaimed!\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10692 -msgid "BDB-backed repositories whose log files are used as part of a backup or disaster recovery plan should not make use of the log file autoremoval feature. Reconstruction of a repository's data from log files can only be accomplished when all 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." -msgstr "" - -#.(title) -#: ../source/book.xml:10707 -msgid "Berkeley DB Recovery" -msgstr "" - -#.(para) -#: ../source/book.xml:10709 -msgid "As mentioned in , 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10720 -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 .)" -msgstr "" - -#.(para) -#: ../source/book.xml:10735 -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 wedged. 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:10747 -msgid "E.g.: hard drive + huge electromagnet = disaster." -msgstr "" - -#.(para) -#: ../source/book.xml:10743 -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 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10752 -msgid "Instead, use the following recipe to attempt to unwedge your repository:" -msgstr "" - -#.(para) -#: ../source/book.xml:10756 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10762 -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 unwedged." -msgstr "" - -#.(para) -#: ../source/book.xml:10770 -msgid "Run the command svnadmin recover /var/svn/repos. You should see output like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10773 -#, no-wrap -msgid "\nRepository lock acquired.\nPlease wait; recovering the repository may take some time...\n\nRecovery completed.\nThe latest repos revision is 19.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10780 -msgid "This command may take many minutes to complete." -msgstr "" - -#.(para) -#: ../source/book.xml:10783 -msgid "Restart the server process." -msgstr "" - -#.(para) -#: ../source/book.xml:10786 -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 root. Part of the recovery process might involve recreating from scratch various database files (shared memory regions, for example). Recovering as root will create those files such that they are owned by root, which means that even after you restore connectivity to your repository, regular users will be unable to access it." -msgstr "" - -#.(para) -#: ../source/book.xml:10796 -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 repos.BROKEN) and then restore your latest backup of it. Then, send an email to the Subversion user list (at users@subversion.tigris.org) describing your problem in detail. Data integrity is an extremely high priority to the Subversion developers." -msgstr "" - -#.(title) -#: ../source/book.xml:10809 -msgid "Migrating Repository Data Elsewhere" -msgstr "" - -#.(para) -#: ../source/book.xml:10811 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:10817 -msgid "Subversion provides such functionality by way of repository dump streams. A repository dump stream (often referred to as a dumpfile 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 svnadmin dump and svnadmin load subcommands, respectively." -msgstr "" - -#.(para) -#: ../source/book.xml:10830 -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 not 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10838 -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 ) purging versioned data from repository history." -msgstr "" - -#.(para) -#: ../source/book.xml:10856 -msgid "Whatever your reason for migrating repository history, using the svnadmin dump and svnadmin load subcommands is straightforward. svnadmin dump 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10867 -#, no-wrap -msgid "\n$ svnlook youngest myrepos\n26\n$ svnadmin dump myrepos > dumpfile\n* Dumped revision 0.\n* Dumped revision 1.\n* Dumped revision 2.\n…\n* Dumped revision 25.\n* Dumped revision 26.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10878 -msgid "At the end of the process, you will have a single file (dumpfile in the previous example) that contains all the data stored in your repository in the requested range of revisions. Note that svnadmin dump is reading revision trees from the repository just like any other reader process would (svn checkout, for example), so it's safe to run this command at any time." -msgstr "" - -#.(para) -#: ../source/book.xml:10886 -msgid "The other subcommand in the pair, svnadmin load, 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:10892 -#, no-wrap -msgid "\n$ svnadmin load newrepos < dumpfile\n<<< Started new txn, based on original revision 1\n * adding path : A ... done.\n * adding path : A/B ... done.\n …\n------- Committed new rev 1 (loaded from original rev 1) >>>\n\n<<< Started new txn, based on original revision 2\n * editing path : A/mu ... done.\n * editing path : A/D/G/rho ... done.\n\n------- Committed new rev 2 (loaded from original rev 2) >>>\n\n…\n\n<<< Started new txn, based on original revision 25\n * editing path : A/D/gamma ... done.\n\n------- Committed new rev 25 (loaded from original rev 25) >>>\n\n<<< Started new txn, based on original revision 26\n * adding path : A/Z/zeta ... done.\n * editing path : A/mu ... done.\n\n------- Committed new rev 26 (loaded from original rev 26) >>>\n\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10920 -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 and options to svnadmin load, 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:10938 -msgid "Note that because svnadmin 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 svnadmin on each side of the pipe):" -msgstr "" - -#.(screen) -#: ../source/book.xml:10943 -#, no-wrap -msgid "\n$ svnadmin create newrepos\n$ svnadmin dump oldrepos | svnadmin load newrepos\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10947 -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. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10961 -msgid "We mentioned previously that svnadmin dump outputs a range of revisions. Use the 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:10967 -#, no-wrap -msgid "\n$ svnadmin dump myrepos -r 23 > rev-23.dumpfile\n$ svnadmin dump myrepos -r 100:200 > revs-100-200.dumpfile\n" -msgstr "" - -#.(para) -#: ../source/book.xml:10971 -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 svnadmin dump command." -msgstr "" - -#.(para) -#: ../source/book.xml:10979 -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 svnadmin dump 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." -msgstr "" - -#.(para) -#: ../source/book.xml:10989 -msgid "However, you can change this default behavior. If you add the option when you dump your repository, svnadmin 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11000 -#, no-wrap -msgid "\n$ svnadmin dump myrepos -r 0:1000 > dumpfile1\n$ svnadmin dump myrepos -r 1001:2000 --incremental > dumpfile2\n$ svnadmin dump myrepos -r 2001:3000 --incremental > dumpfile3\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11005 -msgid "These dump files could be loaded into a new repository with the following command sequence:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11007 -#, no-wrap -msgid "\n$ svnadmin load newrepos < dumpfile1\n$ svnadmin load newrepos < dumpfile2\n$ svnadmin load newrepos < dumpfile3\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11012 -msgid "Another neat trick you can perform with this option involves appending to an existing dump file a new range of dumped revisions. For example, you might have a post-commit 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, svnadmin dump can be one way to back up changes to your repository over time in case of a system crash or some other catastrophic event." -msgstr "" - -#.(para) -#: ../source/book.xml:11023 -msgid "The dump format can also be used to merge the contents of several different repositories into a single repository. By using the option of svnadmin load, you can specify a new virtual root directory for the load process. That means if you have dump files for three repositories, say calc-dumpfile, cal-dumpfile, and ss-dumpfile, you can first create a new repository to hold them all:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11033 -#, no-wrap -msgid "\n$ svnadmin create /var/svn/projects\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11037 -msgid "Then, make new directories in the repository which will encapsulate the contents of each of the three previous repositories:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11040 -#, no-wrap -msgid "\n$ svn mkdir -m \"Initial project roots\" \\\n file:///var/svn/projects/calc \\\n file:///var/svn/projects/calendar \\\n file:///var/svn/projects/spreadsheet\nCommitted revision 1.\n$ \n" -msgstr "" - -#.(para) -#: ../source/book.xml:11048 -msgid "Lastly, load the individual dump files into their respective locations in the new repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11050 -#, no-wrap -msgid "\n$ svnadmin load /var/svn/projects --parent-dir calc < calc-dumpfile\n…\n$ svnadmin load /var/svn/projects --parent-dir calendar < cal-dumpfile\n…\n$ svnadmin load /var/svn/projects --parent-dir spreadsheet < ss-dumpfile\n…\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11059 -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 cvs2svn utility (see ) uses the dump format to represent the contents of a CVS repository so that those contents can be copied into a Subversion repository." -msgstr "" - -#.(title) -#: ../source/book.xml:11073 -msgid "Filtering Repository History" -msgstr "" - -#.(para) -#: ../source/book.xml:11082 -msgid "That's rather the reason you use version control at all, right?" -msgstr "" - -#.(para) -#: ../source/book.xml:11089 -msgid "Conscious, cautious removal of certain bits of versioned data is actually supported by real use-cases. That's why an obliterate feature has been one of the most highly requested Subversion features, and one which the Subversion developers hope to soon provide." -msgstr "" - -#.(para) -#: ../source/book.xml:11075 -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. 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). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11101 -msgid "As we described in , 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 svnadmin dump command to generate the dump data, and svnadmin load to populate a new repository with it (see ). 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11115 -msgid "That's where svndumpfilter 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11123 -msgid "Let's look a realistic example of how you might use this program. We discuss elsewhere (see ) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11133 -msgid "Our imaginary repository contains three projects: calc, calendar, and spreadsheet. They have been living side-by-side in a layout like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11137 -#, no-wrap -msgid "\n/\n calc/\n trunk/\n branches/\n tags/\n calendar/\n trunk/\n branches/\n tags/\n spreadsheet/\n trunk/\n branches/\n tags/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11152 -msgid "To get these three projects into their own repositories, we first dump the whole repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11154 -#, no-wrap -msgid "\n$ svnadmin dump /var/svn/repos > repos-dumpfile\n* Dumped revision 0.\n* Dumped revision 1.\n* Dumped revision 2.\n* Dumped revision 3.\n…\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11163 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11166 -#, no-wrap -msgid "\n$ svndumpfilter include calc < repos-dumpfile > calc-dumpfile\n…\n$ svndumpfilter include calendar < repos-dumpfile > cal-dumpfile\n…\n$ svndumpfilter include spreadsheet < repos-dumpfile > ss-dumpfile\n…\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11175 -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 calc project, that repository would still have a top-level directory named calc. If you want your trunk, tags, and branches directories to live in the root of your repository, you might wish to edit your dump files, tweaking the Node-path and Node-copyfrom-path headers to no longer have that first calc/ path component. Also, you'll want to remove the section of dump data that creates the calc directory. It will look something like:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11191 -#, no-wrap -msgid "\nNode-path: calc\nNode-action: add\nNode-kind: dir\nContent-length: 0\n \n" -msgstr "" - -#.(para) -#: ../source/book.xml:11199 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11206 -msgid "All that remains now is to create your three new repositories, and load each dump file into the right repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11209 -#, no-wrap -msgid "\n$ svnadmin create calc; svnadmin load calc < calc-dumpfile\n<<< Started new transaction, based on original revision 1\n * adding path : Makefile ... done.\n * adding path : button.c ... done.\n…\n$ svnadmin create calendar; svnadmin load calendar < cal-dumpfile\n<<< Started new transaction, based on original revision 1\n * adding path : Makefile ... done.\n * adding path : cal.c ... done.\n…\n$ svnadmin create spreadsheet; svnadmin load spreadsheet < ss-dumpfile\n<<< Started new transaction, based on original revision 1\n * adding path : Makefile ... done.\n * adding path : ss.c ... done.\n…\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11227 -msgid "Both of svndumpfilter's subcommands accept options for deciding how to deal with empty 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, svndumpfilter provides the following command-line options:" -msgstr "" - -#.(option) -#: ../source/book.xml:11238 -msgid "--drop-empty-revs" -msgstr "" - -#.(para) -#: ../source/book.xml:11241 -msgid "Do not generate empty revisions at all—just omit them." -msgstr "" - -#.(option) -#: ../source/book.xml:11247 -msgid "--renumber-revs" -msgstr "" - -#.(para) -#: ../source/book.xml:11250 -msgid "If empty revisions are dropped (using the option), change the revision numbers of the remaining revisions so that there are no gaps in the numeric sequence." -msgstr "" - -#.(option) -#: ../source/book.xml:11258 -msgid "--preserve-revprops" -msgstr "" - -#.(para) -#: ../source/book.xml:11261 -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 svndumpfilter." -msgstr "" - -#.(para) -#: ../source/book.xml:11271 -msgid "While svndumpfilter 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 Node-path and Node-copyfrom-path headers." -msgstr "" - -#.(screen) -#: ../source/book.xml:11278 -#, no-wrap -msgid "\n…\nNode-path: spreadsheet/Makefile\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11289 -msgid "While svnadmin dump has a consistent leading slash policy—to not include them—other programs which generate dump data might not be so consistent." -msgstr "" - -#.(para) -#: ../source/book.xml:11283 -msgid "If the paths have leading slashes, you should include leading slashes in the paths you pass to svndumpfilter include and svndumpfilter exclude (and if they don't, you shouldn't). Further, if your dump file has an inconsistent usage of leading slashes for some reason, you should probably normalize those paths so they all have, or lack, leading slashes." -msgstr "" - -#.(para) -#: ../source/book.xml:11295 -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 svndumpfilter is excluding, to a location that it is including. In order to make the dump data self-sufficient, svndumpfilter 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11315 -msgid "Finally, svndumpfilter takes path filtering quite literally. If you are trying to copy the history of a project rooted at trunk/my-project and move it into a repository of its own, you would, of course, use the svndumpfilter include command to keep all the changes in and under trunk/my-project. 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 trunk/my-project directory, but it will not contain directives which would create the trunk directory itself (because trunk 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." -msgstr "" - -#.(title) -#: ../source/book.xml:11338 -msgid "Repository Replication" -msgstr "" - -#.(para) -#: ../source/book.xml:11340 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11349 -msgid "As of version 1.4, Subversion provides a program for managing scenarios like these—svnsync. svnsync works by essentially asking the Subversion server to replay 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 svnsync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11363 -msgid "When using svnsync against a remote source repository, the Subversion server for that repository must be running Subversion version 1.4 or better." -msgstr "" - -#.(para) -#: ../source/book.xml:11379 -msgid "In fact, it can't truly be read-only, or svnsync itself would have a tough time copying revision history into it." -msgstr "" - -#.(para) -#: ../source/book.xml:11367 -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 ), but it must not yet have any version history in it. The protocol via which svnsync communicates revision information is highly sensitive to mismatches between the versioned histories contained in the source and target repositories. For this reason, while svnsync cannot demand that the target repository be read-only, allowing the revision history in the target repository to change by any mechanism other than the mirroring process is a recipe for disaster." -msgstr "" - -#.(para) -#: ../source/book.xml:11386 -msgid "Do not 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 svnsync tool." -msgstr "" - -#.(para) -#: ../source/book.xml:11393 -msgid "Another requirement of the target repository is that the svnsync process be allowed to modify certain revision properties. svnsync stores its bookkeeping information in special revision properties on revision 0 of the destination repository. Because svnsync works within the framework of that repository's hook system, the default state of the repository (which is to disallow revision property changes; see ) is insufficient. You'll need to explicitly implement the pre-revprop-change hook, and your script must allow svnsync to set and change its special properties. With those provisions in place, you are ready to start mirroring repository revisions." -msgstr "" - -#.(para) -#: ../source/book.xml:11408 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11413 -msgid "Let's walk through the use of svnsync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11418 -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 .) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11432 -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." -msgstr "" - -#.(screen) -#: ../source/book.xml:11437 -#, no-wrap -msgid "\n$ ssh admin@svn.example.com \\\n \"svnadmin create /var/svn/svn-mirror\"\nadmin@svn.example.com's password: ********\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11443 -msgid "At this point, we have our repository, and due to our server's configuration, that repository is now live 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 syncuser will be allowed." -msgstr "" - -#.(para) -#: ../source/book.xml:11452 -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 pre-revprop-change hook script is found in , and basically verifies that the user attempting the property changes is our syncuser user. If so, the change is allowed; otherwise, it is denied." -msgstr "" - -#.(title) -#: ../source/book.xml:11463 -msgid "Mirror repository's pre-revprop-change hook script" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:11465 -#, no-wrap -msgid "\n#!/bin/sh \n\nUSER=\"$3\"\n\nif [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n\necho \"Only the syncuser user may change revision properties\" >&2\nexit 1\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11476 -msgid "That covers revision property changes. Now we need to ensure that only the syncuser user is permitted to commit new revisions to the repository. We do this using a start-commit hook scripts like the one in ." -msgstr "" - -#.(title) -#: ../source/book.xml:11483 -msgid "Mirror repository's start-commit hook script" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:11485 -#, no-wrap -msgid "\n#!/bin/sh \n\nUSER=\"$2\"\n\nif [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n\necho \"Only the syncuser user may commit new revisions\" >&2\nexit 1\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11496 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11500 -msgid "The first thing we need to do with svnsync is to register in our target repository the fact that it will be a mirror of the source repository. We do this using the svnsync initialize subcommand. Note that the various svnsync subcommands provide several of the same authentication-related options that svn does: , , , , and ." -msgstr "" - -#.(screen) -#: ../source/book.xml:11512 -#, no-wrap -msgid "\n$ svnsync help init\ninitialize (init): usage: svnsync initialize DEST_URL SOURCE_URL\n\nInitialize a destination repository for synchronization from\nanother repository.\n\nThe destination URL must point to the root of a repository with\nno committed revisions. The destination repository must allow\nrevision property changes.\n\nYou should not commit to, or make revision property changes in,\nthe destination repository by any method other than 'svnsync'.\nIn other words, the destination repository should be a read-only\nmirror of the source repository.\n\nValid options:\n --non-interactive : do no interactive prompting\n --no-auth-cache : do not cache authentication tokens\n --username arg : specify a username ARG\n --password arg : specify a password ARG\n --config-dir arg : read user configuration files from directory ARG\n\n$ svnsync initialize http://svn.example.com/svn-mirror \\\n http://svn.collab.net/repos/svn \\\n --username syncuser --password syncpass\nCopied properties for revision 0.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11541 -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 svnsync—that was required by the pre-revprop-change hook on our mirror repository." -msgstr "" - -#.(para) -#: ../source/book.xml:11547 -msgid "The URLs provided to svnsync must point to the root directories of the target and source repositories, respectively. The tool does not handle mirroring of repository subtrees." -msgstr "" - -#.(para) -#: ../source/book.xml:11553 -msgid "The initial release of svnsync (in Subversion 1.4) has a small shortcoming—the values given to the and 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 svnsync in non-interactive mode (with the option) might experience problems." -msgstr "" - -#.(para) -#: ../source/book.xml:11569 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11565 -msgid "And now comes the fun part. With a single subcommand, we can tell svnsync to copy all the as-yet-unmirrored revisions from the source repository to the target. The svnsync synchronize 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 svnsync get the resulting response from the source repository's server, it begins forwarding those revisions to the target repository's server as new commits." -msgstr "" - -#.(screen) -#: ../source/book.xml:11586 -#, no-wrap -msgid "\n$ svnsync help synchronize\nsynchronize (sync): usage: svnsync synchronize DEST_URL\n\nTransfer all pending revisions from source to destination.\n…\n$ svnsync synchronize http://svn.example.com/svn-mirror \\\n --username syncuser --password syncpass\nCommitted revision 1.\nCopied properties for revision 1.\nCommitted revision 2.\nCopied properties for revision 2.\nCommitted revision 3.\nCopied properties for revision 3.\n…\nCommitted revision 23406.\nCopied properties for revision 23406.\nCommitted revision 23407.\nCopied properties for revision 23407.\nCommitted revision 23408.\nCopied properties for revision 23408.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11608 -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 syncuser, 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 svnsync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11622 -msgid "Also noteworthy is that svnsync 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 svnsync synchronize 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11631 -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, svnsync 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 svnsync copy-revprops subcommand, which simply re-replicates all the revision properties for a particular revision." -msgstr "" - -#.(screen) -#: ../source/book.xml:11644 -#, no-wrap -msgid "\n$ svnsync help copy-revprops\ncopy-revprops: usage: svnsync copy-revprops DEST_URL REV\n\nCopy all revision properties for revision REV from source to\ndestination.\n…\n$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \\\n --username syncuser --password syncpass\nCopied properties for revision 12.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11656 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11664 -msgid "Also, while it isn't very commonplace to do so, svnsync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11670 -msgid "As far as user interaction with repositories and mirrors goes, it is 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11679 -#, no-wrap -msgid "\n$ cat - <<EOF | svnadmin load --force-uuid dest\nSVN-fs-dump-format-version: 2\n\nUUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e\nEOF\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11687 -msgid "Now that the two repositories have the same UUID, you can use svn switch --relocate to point your working copy to whichever of the repositories you wish to operate against, a process which is described in . 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11702 -msgid "Finally, be aware that the revision-based replication provided by svnsync 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." -msgstr "" - -#.(title) -#: ../source/book.xml:11714 -msgid "Repository Backup" -msgstr "" - -#.(para) -#: ../source/book.xml:11716 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11725 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11736 -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 svnadmin hotcopy command takes care of the minutia involved in making a hot backup of your repository. And its invocation is as trivial as Unix's cp or Windows' copy operations:" -msgstr "" - -#.(screen) -#: ../source/book.xml:11750 -#, no-wrap -msgid "\n$ svnadmin hotcopy /var/svn/repos /var/svn/repos-backup\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11753 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11756 -msgid "When making copies of a Berkeley DB repository, you can even instruct svnadmin hotcopy to purge any unused Berkeley DB logfiles (see ) from the original repository upon completion of the copy. Simply provide the option on the command-line." -msgstr "" - -#.(screen) -#: ../source/book.xml:11762 -#, no-wrap -msgid "\n$ svnadmin hotcopy --clean-logs /var/svn/bdb-repos /var/svn/bdb-repos-backup\n" -msgstr "" - -#.(para) -#: ../source/book.xml:11765 -msgid "Additional tooling around this command is available, too. The tools/backup/ directory of the Subversion source distribution holds the hot-backup.py script. This script adds a bit of backup management atop svnadmin hotcopy, 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 rotate off 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 hot-backup.py from a program scheduler (such as cron on Unix systems) which will cause it to run nightly (or at whatever granularity of Time you deem safe)." -msgstr "" - -#.(para) -#: ../source/book.xml:11782 -msgid "Some administrators use a different backup mechanism built around generating and storing repository dump data. We described in how to use svnadmin dump --incremental 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 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11801 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11816 -msgid "The svnsync program (see ) 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 inside the repository's virtual versioned filesystem are not handled by svnsync." -msgstr "" - -#.(para) -#: ../source/book.xml:11834 -msgid "svnadmin setlog can be called in a way that bypasses the hook interface altogether." -msgstr "" - -#.(para) -#: ../source/book.xml:11828 -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. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11842 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11865 -msgid "You know—the collective term for all of her fickle fingers." -msgstr "" - -#.(para) -#: ../source/book.xml:11851 -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 hot-backup.py and an offsite rsync 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 svnsync. 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, it should certainly help you recover from those trying times." -msgstr "" - -#.(para) -#: ../source/book.xml:11878 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:11884 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:11896 -msgid "Server Configuration" -msgstr "" - -#.(para) -#: ../source/book.xml:11898 -msgid "A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides using the file:// 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11904 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:11916 -msgid "Overview" -msgstr "" - -#.(para) -#: ../source/book.xml:11918 -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 repository access 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11925 -msgid "Apache is an extremely popular webserver; using the mod_dav_svn 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 for free, such as encrypted SSL communication, logging, integration with a number of third-party authentication systems, and limited built-in web browsing of repositories." -msgstr "" - -#.(para) -#: ../source/book.xml:11934 -msgid "In the other corner is svnserve: 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." -msgstr "" - -#.(para) -#: ../source/book.xml:11944 -msgid "A third option is to use svnserve tunneled over an SSH connection. Even though this scenario still uses svnserve, it differs quite a bit in features from a traditional svnserve 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 svnserve, which has its own private user accounts.) Finally, because this setup requires that each user spawn a private, temporary svnserve process, it's equivalent (from a permissions point of view) to allowing a group of local users to all access the repository via file:// URLs. Path-based access control has no meaning, since each user is accessing the repository database files directly." -msgstr "" - -#.(para) -#: ../source/book.xml:11959 -msgid "Here's a quick summary of the three typical server deployments." -msgstr "" - -#.(title) -#: ../source/book.xml:11963 -msgid "Comparison of Subversion Server Options" -msgstr "" - -#.(entry) -#: ../source/book.xml:11969 -msgid "Apache + mod_dav_svn" -msgstr "" - -#.(entry) -#: ../source/book.xml:11971 -msgid "svnserve over SSH" -msgstr "" - -#.(entry) -#: ../source/book.xml:11976 -msgid "Authentication options" -msgstr "" - -#.(entry) -#: ../source/book.xml:11977 -msgid "HTTP(S) basic auth, X.509 certificates, LDAP, NTLM, or any other mechanism available to Apache httpd" -msgstr "" - -#.(entry) -#: ../source/book.xml:11979 -msgid "CRAM-MD5 by default; LDAP, NTLM, or any other mechanism available to SASL" -msgstr "" - -#.(entry) -#: ../source/book.xml:11981 -msgid "SSH" -msgstr "" - -#.(entry) -#: ../source/book.xml:11984 -msgid "User account options" -msgstr "" - -#.(entry) -#: ../source/book.xml:11985 -msgid "private 'users' file, or other mechanisms available to Apache httpd (LDAP, SQL, etc.)" -msgstr "" - -#.(entry) -#: ../source/book.xml:11987 -msgid "private 'users' file, or other mechanisms available to SASL (LDAP, SQL, etc.)" -msgstr "" - -#.(entry) -#: ../source/book.xml:11989 -msgid "system accounts" -msgstr "" - -#.(entry) -#: ../source/book.xml:11992 -msgid "Authorization options" -msgstr "" - -#.(entry) -#: ../source/book.xml:11993 ../source/book.xml:11995 -msgid "read/write access can be granted over whole repository, or specified per-path." -msgstr "" - -#.(entry) -#: ../source/book.xml:11997 -msgid "read/write access only grantable over whole repository" -msgstr "" - -#.(entry) -#: ../source/book.xml:12001 -msgid "Encryption" -msgstr "" - -#.(entry) -#: ../source/book.xml:12002 -msgid "via optional SSL" -msgstr "" - -#.(entry) -#: ../source/book.xml:12003 -msgid "via optional SASL features" -msgstr "" - -#.(entry) -#: ../source/book.xml:12004 -msgid "SSH tunneled" -msgstr "" - -#.(entry) -#: ../source/book.xml:12007 -msgid "Logging" -msgstr "" - -#.(quote) -#: ../source/book.xml:12009 -msgid "high-level" -msgstr "" - -#.(entry) -#: ../source/book.xml:12008 -msgid "full Apache logs of each HTTP request, with optional logging of general client operations" -msgstr "" - -#.(entry) -#: ../source/book.xml:12011 ../source/book.xml:12012 -msgid "no logging" -msgstr "" - -#.(entry) -#: ../source/book.xml:12015 -msgid "Interoperability" -msgstr "" - -#.(entry) -#: ../source/book.xml:12016 -msgid "partially usable by other WebDAV clients" -msgstr "" - -#.(entry) -#: ../source/book.xml:12017 ../source/book.xml:12018 -msgid "only talks to svn clients" -msgstr "" - -#.(entry) -#: ../source/book.xml:12021 -msgid "Web viewing" -msgstr "" - -#.(entry) -#: ../source/book.xml:12022 -msgid "limited built-in support, or via 3rd-party tools such as ViewVC" -msgstr "" - -#.(entry) -#: ../source/book.xml:12024 ../source/book.xml:12025 -msgid "only via 3rd-party tools such as ViewVC" -msgstr "" - -#.(entry) -#: ../source/book.xml:12028 -msgid "Speed" -msgstr "" - -#.(entry) -#: ../source/book.xml:12029 -msgid "somewhat slower" -msgstr "" - -#.(entry) -#: ../source/book.xml:12030 ../source/book.xml:12031 -msgid "somewhat faster" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:12034 ../source/book.xml:13044 -msgid "Initial setup" -msgstr "" - -#.(entry) -#: ../source/book.xml:12035 -msgid "somewhat complex" -msgstr "" - -#.(entry) -#: ../source/book.xml:12036 -msgid "extremely simple" -msgstr "" - -#.(entry) -#: ../source/book.xml:12037 -msgid "moderately simple" -msgstr "" - -#.(title) -#: ../source/book.xml:12045 -msgid "Choosing a Server Configuration" -msgstr "" - -#.(para) -#: ../source/book.xml:12047 -msgid "So, which server should you use? Which is best?" -msgstr "" - -#.(para) -#: ../source/book.xml:12048 -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 official than another." -msgstr "" - -#.(para) -#: ../source/book.xml:12053 -msgid "Here are some reasons why you might choose one deployment over another, as well as reasons you might not choose one." -msgstr "" - -#.(title) -#: ../source/book.xml:12058 -msgid "The svnserve Server" -msgstr "" - -#.(term) -#: ../source/book.xml:12062 ../source/book.xml:12115 ../source/book.xml:12164 -msgid "Why you might want to use it:" -msgstr "" - -#.(para) -#: ../source/book.xml:12066 -msgid "Quick and easy to set up." -msgstr "" - -#.(para) -#: ../source/book.xml:12070 ../source/book.xml:12119 -msgid "Network protocol is stateful and noticeably faster than WebDAV." -msgstr "" - -#.(para) -#: ../source/book.xml:12074 ../source/book.xml:12173 -msgid "No need to create system accounts on server." -msgstr "" - -#.(para) -#: ../source/book.xml:12078 -msgid "Password is not passed over the network." -msgstr "" - -#.(term) -#: ../source/book.xml:12085 ../source/book.xml:12134 ../source/book.xml:12200 -msgid "Why you might want to avoid it:" -msgstr "" - -#.(para) -#: ../source/book.xml:12089 -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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:12096 ../source/book.xml:12142 -msgid "No logging of any kind, not even errors." -msgstr "" - -#.(para) -#: ../source/book.xml:12100 -msgid "No built-in web browsing. (You'd have to install a separate web server and some CGI software to add this.)" -msgstr "" - -#.(title) -#: ../source/book.xml:12111 -msgid "svnserve over SSH" -msgstr "" - -#.(para) -#: ../source/book.xml:12123 -msgid "You can take advantage of existing ssh accounts and user infrastructure." -msgstr "" - -#.(para) -#: ../source/book.xml:12127 -msgid "All network traffic is encrypted." -msgstr "" - -#.(para) -#: ../source/book.xml:12138 -msgid "Only one choice of authentication method." -msgstr "" - -#.(para) -#: ../source/book.xml:12146 -msgid "Requires users to be in same system group, or use a shared ssh key." -msgstr "" - -#.(para) -#: ../source/book.xml:12150 -msgid "If used improperly, can lead to file permissions problems." -msgstr "" - -#.(title) -#: ../source/book.xml:12160 -msgid "The Apache HTTP Server" -msgstr "" - -#.(para) -#: ../source/book.xml:12168 -msgid "Allows Subversion to use any of the numerous authentication systems already integrated with Apache." -msgstr "" - -#.(para) -#: ../source/book.xml:12177 -msgid "Full Apache logging." -msgstr "" - -#.(para) -#: ../source/book.xml:12180 -msgid "Network traffic can be encrypted via SSL." -msgstr "" - -#.(para) -#: ../source/book.xml:12184 -msgid "HTTP(S) can usually go through corporate firewalls." -msgstr "" - -#.(para) -#: ../source/book.xml:12188 -msgid "Built-in repository browsing via web browser." -msgstr "" - -#.(para) -#: ../source/book.xml:12192 -msgid "Repository can be mounted as a network drive for transparent version control. (See .)" -msgstr "" - -#.(para) -#: ../source/book.xml:12204 -msgid "Noticeably slower than svnserve, because HTTP is a stateless protocol and requires more turnarounds." -msgstr "" - -#.(para) -#: ../source/book.xml:12209 -msgid "Initial setup can be complex." -msgstr "" - -#.(title) -#: ../source/book.xml:12218 -msgid "Recommendations" -msgstr "" - -#.(para) -#: ../source/book.xml:12220 -msgid "In general, the authors of this book recommend a vanilla svnserve 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12226 -msgid "Here are some general recommendations and tips, based on years of supporting users:" -msgstr "" - -#.(para) -#: ../source/book.xml:12230 -msgid "If you're trying to set up the simplest possible server for your group, then a vanilla svnserve 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12244 -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 svnserve 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12253 -msgid "If you've decided to use either Apache or stock svnserve, create a single svn user on your system and run the server process as that user. Be sure to make the repository directory wholly owned by the svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12265 -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 svnserve 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 svnserve with SASL encryption instead." -msgstr "" - -#.(para) -#: ../source/book.xml:12280 -msgid "Do not be seduced by the simple idea of having all of your users access a repository directly via file:// 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 .) Note that this is also one of the reasons we warn against accessing repositories via svn+ssh:// URLs—from a security standpoint, it's effectively the same as local users accessing via file://, and can entail all the same problems if the administrator isn't careful." -msgstr "" - -#.(title) -#: ../source/book.xml:12306 -msgid "svnserve, a custom server" -msgstr "" - -#.(para) -#: ../source/book.xml:12308 -msgid "The svnserve program is a lightweight server, capable of speaking to clients over TCP/IP using a custom, stateful protocol. Clients contact an svnserve server by using URLs that begin with the svn:// or svn+ssh:// scheme. This section will explain the different ways of running svnserve, how clients authenticate themselves to the server, and how to configure appropriate access control to your repositories." -msgstr "" - -#.(title) -#: ../source/book.xml:12320 -msgid "Invoking the Server" -msgstr "" - -#.(para) -#: ../source/book.xml:12322 -msgid "There are a few different ways to run the svnserve program:" -msgstr "" - -#.(para) -#: ../source/book.xml:12326 -msgid "Run svnserve as a standalone daemon, listening for requests." -msgstr "" - -#.(para) -#: ../source/book.xml:12331 -msgid "Have the Unix inetd daemon temporarily spawn svnserve whenever a request comes in on a certain port." -msgstr "" - -#.(para) -#: ../source/book.xml:12336 -msgid "Have SSH invoke a temporary svnserve over an encrypted tunnel." -msgstr "" - -#.(para) -#: ../source/book.xml:12341 -msgid "Run svnserve as a Microsoft Windows service." -msgstr "" - -#.(title) -#: ../source/book.xml:12348 -msgid "svnserve as Daemon" -msgstr "" - -#.(para) -#: ../source/book.xml:12350 -msgid "The easiest option is to run svnserve as a standalone daemon process. Use the option for this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12353 -#, no-wrap -msgid "\n$ svnserve -d\n$ # svnserve is now running, listening on port 3690\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12357 -msgid "When running svnserve in daemon mode, you can use the and options to customize the exact port and hostname to bind to." -msgstr "" - -#.(para) -#: ../source/book.xml:12361 -msgid "Once we successfully start svnserve as above, it makes every repository on your system available to the network. A client needs to specify an absolute path in the repository URL. For example, if a repository is located at /var/svn/project1, then a client would reach it via svn://host.example.com/var/svn/project1. To increase security, you can pass the option to svnserve, which restricts it to exporting only repositories below that path. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12373 -#, no-wrap -msgid "\n$ svnserve -d -r /var/svn\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12377 -msgid "Using the 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12382 -#, no-wrap -msgid "\n$ svn checkout svn://host.example.com/project1\n…\n" -msgstr "" - -#.(title) -#: ../source/book.xml:12390 -msgid "svnserve via inetd" -msgstr "" - -#.(para) -#: ../source/book.xml:12392 -msgid "If you want inetd to launch the process, then you need to pass the () option. In the example, we've shown the output from running svnserve -i 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 inetd to start svnserve." -msgstr "" - -#.(screen) -#: ../source/book.xml:12400 -#, no-wrap -msgid "\n$ svnserve -i\n( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12404 -msgid "When invoked with the option, svnserve attempts to speak with a Subversion client via stdin and stdout using a custom protocol. This is the standard behavior for a program being run via inetd. The IANA has reserved port 3690 for the Subversion protocol, so on a Unix-like system you can add lines to /etc/services like these (if they don't already exist):" -msgstr "" - -#.(screen) -#: ../source/book.xml:12413 -#, no-wrap -msgid "\nsvn 3690/tcp # Subversion\nsvn 3690/udp # Subversion\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12417 -msgid "And if your system is using a classic Unix-like inetd daemon, you can add this line to /etc/inetd.conf:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12420 -#, no-wrap -msgid "\nsvn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12423 -msgid "Make sure svnowner is a user which has appropriate permissions to access your repositories. Now, when a client connection comes into your server on port 3690, inetd will spawn an svnserve process to service it. Of course, you may also want to add to the configuration line as well, to restrict which repositories are exported." -msgstr "" - -#.(title) -#: ../source/book.xml:12435 -msgid "svnserve over a Tunnel" -msgstr "" - -#.(para) -#: ../source/book.xml:12437 -msgid "A third way to invoke svnserve is in tunnel mode, with the option. This mode assumes that a remote-service program such as RSH or SSH has successfully authenticated a user and is now invoking a private svnserve process as that user. (Note that you, the user, will rarely, if ever, have reason to invoke svnserve with the at the command line; instead, the SSH daemon does so for you.) The svnserve program behaves normally (communicating via stdin and stdout), and assumes that the traffic is being automatically redirected over some sort of tunnel back to the client. When svnserve 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 file:// URLs." -msgstr "" - -#.(para) -#: ../source/book.xml:12457 -msgid "This option is described in much more detail in ." -msgstr "" - -#.(title) -#: ../source/book.xml:12463 -msgid "svnserve as Windows Service" -msgstr "" - -#.(para) -#: ../source/book.xml:12465 -msgid "If your Windows system is a descendant of Windows NT (2000, 2003, XP, Vista), then you can run svnserve as a standard Windows service. This is typically a much nicer experience than running it as a standalone daemon with the 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12477 -msgid "You'll need to define the new service using the command-line tool SC.EXE. Much like the inetd configuration line, you must specify an exact invocation of svnserve for Windows to run at start-up time:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12482 -#, no-wrap -msgid "\nC:\\> sc create svn\n binpath= \"C:\\svn\\bin\\svnserve.exe --service -r C:\\repos\"\n displayname= \"Subversion Server\"\n depend= Tcpip\n start= auto\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12489 -msgid "This defines a new Windows service named svn, and which executes a particular svnserve.exe command when started (in this case, rooted at C:\\repos.) There are a number of caveats in the prior example, however." -msgstr "" - -#.(para) -#: ../source/book.xml:12495 -msgid "First, notice that the svnserve.exe program must always be invoked with the option. Any other options to svnserve must then be specified on the same line, but you cannot add conflicting options such as , , or . Options such as or are fine, though. Second, be careful about spaces when invoking the SC.EXE command: the key= value patterns must have no spaces between key= and exactly one space before the value. 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 binpath in double-quotes, by escaping them:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12514 -#, no-wrap -msgid "\nC:\\> sc create svn\n binpath= \"\\\"C:\\program files\\svn\\bin\\svnserve.exe\\\" --service -r C:\\repos\"\n displayname= \"Subversion Server\"\n depend= Tcpip\n start= auto\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12521 -msgid "Also note that the word binpath is misleading—its value is a command line, not the path to an executable. That's why you need to surround it with quote marks if it contains embedded spaces." -msgstr "" - -#.(para) -#: ../source/book.xml:12526 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12530 -#, no-wrap -msgid "\nC:\\> net stop svn\nC:\\> net start svn\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12534 -msgid "The service can also be uninstalled (i.e. undefined) by deleting its definition: sc delete svn. Just be sure to stop the service first! The SC.EXE program has many other subcommands and options; run sc /? to learn more about it." -msgstr "" - -#.(title) -#: ../source/book.xml:12545 -msgid "Built-in authentication and authorization" -msgstr "" - -#.(para) -#: ../source/book.xml:12547 -msgid "When a client connects to an svnserve process, the following things happen:" -msgstr "" - -#.(para) -#: ../source/book.xml:12551 -msgid "The client selects a specific repository." -msgstr "" - -#.(para) -#: ../source/book.xml:12555 -msgid "The server processes the repository's conf/svnserve.conf file, and begins to enforce any authentication and authorization policies it describes." -msgstr "" - -#.(para) -#: ../source/book.xml:12561 -msgid "Depending on the defined policies," -msgstr "" - -#.(para) -#: ../source/book.xml:12564 -msgid "the client may be allowed to make requests anonymously, without ever receiving an authentication challenge, OR" -msgstr "" - -#.(para) -#: ../source/book.xml:12569 -msgid "the client may be challenged for authentication at any time, OR" -msgstr "" - -#.(para) -#: ../source/book.xml:12573 -msgid "if operating in tunnel mode, the client will declare itself to be already externally authenticated (typically by SSH)." -msgstr "" - -#.(para) -#: ../source/book.xml:12582 -msgid "See RFC 2195." -msgstr "" - -#.(para) -#: ../source/book.xml:12581 -msgid "The svnserve server, by default, only knows how to send a CRAM-MD5 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. At no point does the actual password travel over the network." -msgstr "" - -#.(para) -#: ../source/book.xml:12591 -msgid "If your svnserve 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 to configure SASL authentication and encryption." -msgstr "" - -#.(para) -#: ../source/book.xml:12597 -msgid "It's also possible, of course, for the client to be externally authenticated via a tunnel agent, such as SSH. 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:12602 -msgid "As you've already guessed, a repository's svnserve.conf file is the central mechanism for controlling authentication and authorization policies. The file has the same format as other configuration files (see ): section names are marked by square brackets ([ and ]), comments begin with hashes (#), and each section contains specific variables that can be set (variable = value). Let's walk through these files and learn how to use them." -msgstr "" - -#.(title) -#: ../source/book.xml:12616 -msgid "Create a 'users' file and realm" -msgstr "" - -#.(para) -#: ../source/book.xml:12618 -msgid "For now, the [general] section of the svnserve.conf 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12623 -#, no-wrap -msgid "\n[general]\npassword-db = userfile\nrealm = example realm\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12628 -msgid "The realm is a name that you define. It tells clients which sort of authentication namespace 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 ). The password-db variable points to a separate file that contains a list of usernames and passwords, using the same familiar format. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12637 -#, no-wrap -msgid "\n[users]\nharry = foopassword\nsally = barpassword\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12642 -msgid "The value of password-db can be an absolute or relative path to the users file. For many admins, it's easy to keep the file right in the conf/ area of the repository, alongside svnserve.conf. 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) svnserve will run as, restrict read access to the user file as necessary." -msgstr "" - -#.(title) -#: ../source/book.xml:12660 -msgid "Set access controls" -msgstr "" - -#.(para) -#: ../source/book.xml:12662 -msgid "There are two more variables to set in the svnserve.conf file: they determine what unauthenticated (anonymous) and authenticated users are allowed to do. The variables anon-access and auth-access can be set to the values none, read, or write. Setting the value to none prohibits both reading and writing; read allows read-only access to the repository, and write allows complete read/write access to the repository. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12673 -#, no-wrap -msgid "\n[general]\npassword-db = userfile\nrealm = example realm\n\n# anonymous users can only read the repository\nanon-access = read\n\n# authenticated users can both read and write\nauth-access = write\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12684 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12688 -#, no-wrap -msgid "\n[general]\npassword-db = userfile\nrealm = example realm\n\n# anonymous users aren't allowed\nanon-access = none\n\n# authenticated users can both read and write\nauth-access = write\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12699 -msgid "The server process not only understands these blanket 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 authz-db variable to point to it:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12706 -#, no-wrap -msgid "\n[general]\npassword-db = userfile\nrealm = example realm\n\n# Specific access rules for specific locations\nauthz-db = authzfile\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12714 -msgid "The syntax of the authzfile file is discussed in detail in . Note that the authz-db variable isn't mutually exclusive with the anon-access and auth-access variables; if all the variables are defined at once, then all of the rules must be satisfied before access is allowed." -msgstr "" - -#.(title) -#: ../source/book.xml:12727 -msgid "Using svnserve with SASL" -msgstr "" - -#.(para) -#: ../source/book.xml:12729 -msgid "For many teams, the built-in CRAM-MD5 authentication is all they need from svnserve. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:12737 -msgid "What is SASL?" -msgstr "" - -#.(para) -#: ../source/book.xml:12739 -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 svnserve server and svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:12758 -msgid "You can download Cyrus SASL (both code and documentation) from http://asg.web.cmu.edu/sasl/sasl-library.html." -msgstr "" - -#.(para) -#: ../source/book.xml:12762 -msgid "Normally, when a subversion client connects to svnserve, 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 ). 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." -msgstr "" - -#.(title) -#: ../source/book.xml:12780 -msgid "Authenticating with SASL" -msgstr "" - -#.(para) -#: ../source/book.xml:12782 -msgid "To activate specific SASL mechanisms on the server, you'll need to do two things. First, create a [sasl] section in your repository's svnserve.conf file, with this key-value pair:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12787 -#, no-wrap -msgid "\n use-sasl = true\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12790 -msgid "Second, create a file called subversion.conf 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 /usr/lib/sasl2/ or /etc/sasl2/. (Note that this is not the svnserve.conf file that lives within a repository!)" -msgstr "" - -#.(para) -#: ../source/book.xml:12800 -msgid "On a Windows server, you'll have to also edit the registry (using a tool like regedit) to tell SASL where to find things. Create a registry key named [HKEY_LOCAL_MACHINE\\SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library], and place two keys inside it: a key called SearchPath (whose value is a path containing the SASL .dll plugins), and a key called ConfFile (whose value is a path containing the subversion.conf file.)" -msgstr "" - -#.(para) -#: ../source/book.xml:12811 -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 doc/ 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 subversion.conf contains:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12823 -#, no-wrap -msgid "\npwcheck_method: auxprop\nauxprop_plugin: sasldb\nmech_list: DIGEST-MD5\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12828 -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 /etc/sasldb2). A system administrator can then use the saslpasswd2 program to add or modify usernames and passwords in the database:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12835 -#, no-wrap -msgid "\n$ saslpasswd2 -c -u realm username\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12838 -msgid "A few words of warning: first, make sure that the \"realm\" argument to saslpasswd2 matches the same \"realm\" you've defined in your repository's svnserve.conf 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 svnserve program has read access to the file (and possibly write access as well, if you're using a mechanism such as OTP.)" -msgstr "" - -#.(para) -#: ../source/book.xml:12849 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:12853 -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 (my clients must all use Kerberos!). 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." -msgstr "" - -#.(title) -#: ../source/book.xml:12867 -msgid "SASL Encryption" -msgstr "" - -#.(para) -#: ../source/book.xml:12869 -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 svnserve.conf file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12876 -#, no-wrap -msgid "\n[sasl]\nuse-sasl = true\nmin-encryption = 128\nmax-encryption = 256\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12882 -msgid "The min-encryption and max-encryption 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." -msgstr "" - -#.(title) -#: ../source/book.xml:12900 -msgid "Tunneling over SSH" -msgstr "" - -#.(para) -#: ../source/book.xml:12902 -msgid "svnserve'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 SSH into the server machine." -msgstr "" - -#.(para) -#: ../source/book.xml:12909 -msgid "It's easy to use SSH in conjunction with svnserve. The client simply uses the svn+ssh:// URL scheme to connect:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12912 -#, no-wrap -msgid "\n$ whoami\nharry\n\n$ svn list svn+ssh://host.example.com/repos/project\nharry@host.example.com's password: *****\n\nfoo\nbar\nbaz\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12924 -msgid "In this example, the Subversion client is invoking a local ssh process, connecting to host.example.com, authenticating as the user harry, then spawning a private svnserve process on the remote machine running as the user harry. The svnserve command is being invoked in tunnel mode () and its network protocol is being tunneled over the encrypted connection by ssh, the tunnel-agent. svnserve is aware that it's running as the user harry, and if the client performs a commit, the authenticated username will be used as the author of the new revision." -msgstr "" - -#.(para) -#: ../source/book.xml:12938 -msgid "The important thing to understand here is that the Subversion client is not connecting to a running svnserve daemon. This method of access doesn't require a daemon, nor does it notice one if present. It relies wholly on the ability of ssh to spawn a temporary svnserve process, which then terminates when the network connection is closed." -msgstr "" - -#.(para) -#: ../source/book.xml:12946 -msgid "When using svn+ssh:// URLs to access a repository, remember that it's the ssh program prompting for authentication, and not the svn client program. That means there's no automatic password caching going on (see ). 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 svn+ssh:// URLs, however, users may be annoyed by ssh repeatedly asking for a password for every outbound connection. The solution is to use a separate SSH password-caching tool like ssh-agent on a Unix-like system, or pageant on Windows." -msgstr "" - -#.(para) -#: ../source/book.xml:12973 -msgid "Note that using any sort of svnserve-enforced access control at all is a bit pointless; the user already has direct access to the repository database." -msgstr "" - -#.(para) -#: ../source/book.xml:12961 -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 file:// 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 .) But even in the case of tunneling, the svnserve.conf file can still be used to block access, by simply setting auth-access = read or auth-access = none. " -msgstr "" - -#.(para) -#: ../source/book.xml:12982 -msgid "We don't actually recommend this, since RSH is notably less secure than SSH." -msgstr "" - -#.(para) -#: ../source/book.xml:12978 -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 config file (see ). For example, suppose you want to use RSH instead of SSH. In the [tunnels] section of your config file, simply define it like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:12988 -#, no-wrap -msgid "\n[tunnels]\nrsh = rsh\n" -msgstr "" - -#.(para) -#: ../source/book.xml:12992 -msgid "And now, you can use this new tunnel definition by using a URL scheme that matches the name of your new variable: svn+rsh://host/path. When using the new URL scheme, the Subversion client will actually be running the command rsh host svnserve -t behind the scenes. If you include a username in the URL (for example, svn+rsh://username@host/path) the client will also include that in its command (rsh username@host svnserve -t). But you can define new tunneling schemes to be much more clever than that:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13002 -#, no-wrap -msgid "\n[tunnels]\njoessh = $JOESSH /opt/alternate/ssh -p 29934\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13006 -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 /opt/alternate/ssh) with specific options. In this case, accessing a svn+joessh:// URL would invoke the particular SSH binary with as arguments—useful if you want the tunnel program to connect to a non-standard port." -msgstr "" - -#.(para) -#: ../source/book.xml:13015 -msgid "Second, it shows how to define a custom environment variable that can override the name of the tunneling program. Setting the SVN_SSH 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 JOESSH environment variable, its value would override the entire value of the tunnel variable—$JOESSH would be executed instead of /opt/alternate/ssh -p 29934." -msgstr "" - -#.(title) -#: ../source/book.xml:13032 -msgid "SSH configuration tricks" -msgstr "" - -#.(para) -#: ../source/book.xml:13034 -msgid "It's not only possible to control the way in which the client invokes ssh, but also to control the behavior of sshd on your server machine. In this section, we'll show how to control the exact svnserve command executed by sshd, as well as how to have multiple users share a single system account." -msgstr "" - -#.(para) -#: ../source/book.xml:13046 -msgid "To begin, locate the home directory of the account you'll be using to launch svnserve. 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 authorized_keys file." -msgstr "" - -#.(para) -#: ../source/book.xml:13053 -msgid "If it doesn't already exist, create the authorized_keys file (on Unix, typically ~/.ssh/authorized_keys). Each line in this file describes a public key that is allowed to connect. The lines are typically of the form:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13059 -#, no-wrap -msgid "\n ssh-dsa AAAABtce9euch… user@example.com\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13062 -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 command field:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13067 -#, no-wrap -msgid "\n command=\"program\" ssh-dsa AAAABtce9euch… user@example.com\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13070 -msgid "When the command field is set, the SSH daemon will run the named program instead of the typical svnserve -t 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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13076 -#, no-wrap -msgid "\n command=\"program\" TYPE KEY COMMENT\n" -msgstr "" - -#.(title) -#: ../source/book.xml:13083 -msgid "Controlling the invoked command" -msgstr "" - -#.(para) -#: ../source/book.xml:13085 -msgid "Because we can specify the executed server-side command, it's easy to name a specific svnserve binary to run and to pass it extra arguments:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13088 -#, no-wrap -msgid "\n command=\"/path/to/svnserve -t -r /virtual/root\" TYPE KEY COMMENT\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13091 -msgid "In this example, /path/to/svnserve might be a custom wrapper script around svnserve which sets the umask (see ). It also shows how to anchor svnserve in a virtual root directory, just as one often does when running svnserve 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 svn+ssh:// URL." -msgstr "" - -#.(para) -#: ../source/book.xml:13102 -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 authorized_users file, one per line, and use the option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13109 -#, no-wrap -msgid "\n command=\"svnserve -t --tunnel-user=harry\" TYPE1 KEY1 harry@example.com\n command=\"svnserve -t --tunnel-user=sally\" TYPE2 KEY2 sally@example.com\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13113 -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 tells svnserve -t to assume that the named argument is the authenticated user. Without , it would appear as though all commits were coming from the one shared system account." -msgstr "" - -#.(para) -#: ../source/book.xml:13122 -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 command value in authorized_keys. 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 command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13132 -#, no-wrap -msgid "\n command=\"svnserve -t --tunnel-user=harry\",no-port-forwarding,\\\n no-agent-forwarding,no-X11-forwarding,no-pty \\\n TYPE1 KEY1 harry@example.com\n" -msgstr "" - -#.(title) -#: ../source/book.xml:13145 -msgid "httpd, the Apache HTTP server" -msgstr "" - -#.(para) -#: ../source/book.xml:13160 -msgid "They really hate doing that." -msgstr "" - -#.(para) -#: ../source/book.xml:13147 -msgid "The Apache HTTP Server is a heavy duty network server that Subversion can leverage. Via a custom module, httpd makes Subversion repositories available to clients via the WebDAV/DeltaV protocol, which is an extension to HTTP 1.1 (see http://www.webdav.org/ 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. While an Apache-Subversion server has more features than svnserve, it's also a bit more difficult to set up. With flexibility often comes more complexity." -msgstr "" - -#.(para) -#: ../source/book.xml:13164 -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 http://httpd.apache.org. For example, a general reference for the configuration directives is located at http://httpd.apache.org/docs-2.0/mod/directives.html." -msgstr "" - -#.(para) -#: ../source/book.xml:13171 -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 httpd.conf file are directives that specify the on-disk locations of the access and error logs generated by Apache (the CustomLog and ErrorLog 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." -msgstr "" - -#.(title) -#: ../source/book.xml:13185 -msgid "Why Apache 2?" -msgstr "" - -#.(para) -#: ../source/book.xml:13187 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:13198 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13204 -#, no-wrap -msgid "\n$ svn checkout http://host.example.com:7382/repos/project\n…\n" -msgstr "" - -#.(title) -#: ../source/book.xml:13212 -msgid "Prerequisites" -msgstr "" - -#.(para) -#: ../source/book.xml:13214 -msgid "To network your repository over HTTP, you basically need four components, available in two packages. You'll need Apache httpd 2.0, the mod_dav DAV module that comes with it, Subversion, and the mod_dav_svn filesystem provider module distributed with Subversion. Once you have all of those components, the process of networking your repository is as simple as:" -msgstr "" - -#.(para) -#: ../source/book.xml:13224 -msgid "getting httpd 2.0 up and running with the mod_dav module," -msgstr "" - -#.(para) -#: ../source/book.xml:13228 -msgid "installing the mod_dav_svn plugin to mod_dav, which uses Subversion's libraries to access the repository, and" -msgstr "" - -#.(para) -#: ../source/book.xml:13233 -msgid "configuring your httpd.conf file to export (or expose) the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:13237 -msgid "You can accomplish the first two items either by compiling httpd 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 INSTALL file in the top level of the Subversion source code tree." -msgstr "" - -#.(title) -#: ../source/book.xml:13249 -msgid "Basic Apache Configuration" -msgstr "" - -#.(para) -#: ../source/book.xml:13251 -msgid "Once you have all the necessary components installed on your system, all that remains is the configuration of Apache via its httpd.conf file. Instruct Apache to load the mod_dav_svn module using the LoadModule directive. This directive must precede any other Subversion-related configuration items. If your Apache was installed using the default layout, your mod_dav_svn module should have been installed in the modules subdirectory of the Apache install location (often /usr/local/apache2). The LoadModule directive has a simple syntax, mapping a named module to the location of a shared library on disk:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13265 -#, no-wrap -msgid "\nLoadModule dav_svn_module modules/mod_dav_svn.so\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13268 -msgid "Note that if mod_dav was compiled as a shared object (instead of statically linked directly to the httpd binary), you'll need a similar LoadModule statement for it, too. Be sure that it comes before the mod_dav_svn line:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13273 -#, no-wrap -msgid "\nLoadModule dav_module modules/mod_dav.so\nLoadModule dav_svn_module modules/mod_dav_svn.so\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13277 -msgid "At a later location in your configuration file, you now need to tell Apache where you keep your Subversion repository (or repositories). The Location 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 Location 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 /repos/ to a DAV provider whose repository is located at /var/svn/repository using the following httpd.conf syntax:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13295 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNPath /var/svn/repository\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13301 -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 SVNParentPath directive, to indicate that common parent directory. For example, if you know you will be creating multiple Subversion repositories in a directory /var/svn that would be accessed via URLs like http://my.server.com/svn/repos1, http://my.server.com/svn/repos2, and so on, you could use the httpd.conf configuration syntax in the following example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13312 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n\n # any \"/svn/foo\" URL will map to a repository /var/svn/foo\n SVNParentPath /var/svn\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13320 -msgid "Using the previous syntax, Apache will delegate the handling of all URLs whose path portions begin with /svn/ to the Subversion DAV provider, which will then assume that any items in the directory specified by the SVNParentPath directive are actually Subversion repositories. This is a particularly convenient syntax in that, unlike the use of the SVNPath directive, you don't have to restart Apache in order to create and network new repositories." -msgstr "" - -#.(para) -#: ../source/book.xml:13330 -msgid "Be sure that when you define your new Location, it doesn't overlap with other exported Locations. For example, if your main DocumentRoot is exported to /www, do not export a Subversion repository in <Location /www/repos>. If a request comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a file repos/foo.c in the DocumentRoot, or whether to delegate mod_dav_svn to return foo.c from the Subversion repository. The result is often an error from the server of the form 301 Moved Permanently." -msgstr "" - -#.(title) -#: ../source/book.xml:13346 -msgid "Server Names and the COPY Request" -msgstr "" - -#.(para) -#: ../source/book.xml:13348 -msgid "Subversion makes use of the COPY 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 ServerName directive in httpd.conf to accomplish this." -msgstr "" - -#.(screen) -#: ../source/book.xml:13357 -#, no-wrap -msgid "\nServerName svn.example.com\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13360 -msgid "If you are using Apache's virtual hosting support via the NameVirtualHost directive, you may need to use the ServerAlias directive to specify additional names that your server is known by. Again, refer to the Apache documentation for full details." -msgstr "" - -#.(para) -#: ../source/book.xml:13367 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:13377 -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 User and Group directives in httpd.conf 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." -msgstr "" - -#.(title) -#: ../source/book.xml:13396 -msgid "Authentication Options" -msgstr "" - -#.(para) -#: ../source/book.xml:13398 -msgid "At this point, if you configured httpd.conf to contain something like" -msgstr "" - -#.(screen) -#: ../source/book.xml:13400 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13406 -msgid "…then your repository is anonymously accessible to the world. Until you configure some authentication and authorization policies, the Subversion repositories you make available via the Location directive will be generally accessible to everyone. In other words," -msgstr "" - -#.(para) -#: ../source/book.xml:13414 -msgid "anyone can use their Subversion client to check out a working copy of a repository URL (or any of its subdirectories)," -msgstr "" - -#.(para) -#: ../source/book.xml:13419 -msgid "anyone can interactively browse the repository's latest revision simply by pointing their web browser to the repository URL, and" -msgstr "" - -#.(para) -#: ../source/book.xml:13424 -msgid "anyone can commit to the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:13427 -msgid "Of course, you might have already set up a pre-commit hook script to prevent commits (see ). 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." -msgstr "" - -#.(title) -#: ../source/book.xml:13436 -msgid "Basic HTTP Authentication" -msgstr "" - -#.(para) -#: ../source/book.xml:13438 -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 htpasswd 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:13446 -#, no-wrap -msgid "\n$ ### First time: use -c to create the file\n$ ### Use -m to use MD5 encryption of the password, which is more secure\n$ htpasswd -cm /etc/svn-auth-file harry\nNew password: *****\nRe-type new password: *****\nAdding password for user harry\n$ htpasswd -m /etc/svn-auth-file sally\nNew password: *******\nRe-type new password: *******\nAdding password for user sally\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13459 -msgid "Next, you need to add some more httpd.conf directives inside your Location block to tell Apache what to do with your new password file. The AuthType directive specifies the type of authentication system to use. In this case, we want to specify the Basic authentication system. AuthName 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 AuthUserFile directive to specify the location of the password file you created using htpasswd." -msgstr "" - -#.(para) -#: ../source/book.xml:13473 -msgid "After adding these three directives, your <Location> block should look something like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13476 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /etc/svn-auth-file\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13485 -msgid "This <Location> 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 which 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 Require valid-user tells Apache that all requests require an authenticated user:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13497 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /etc/svn-auth-file\n Require valid-user\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13507 -msgid "Be sure to read the next section () for more detail on the Require directive and other ways to set authorization policies." -msgstr "" - -#.(para) -#: ../source/book.xml:13518 -msgid "While self-signed server certificates are still vulnerable to a man in the middle attack, such an attack is much more difficult for a casual observer to pull off, compared to sniffing unprotected passwords." -msgstr "" - -#.(para) -#: ../source/book.xml:13510 -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 https:// instead of http://; at a bare minimum, you can configure Apache to use a self-signed server certificate. Consult Apache's documentation (and OpenSSL documentation) about how to do that." -msgstr "" - -#.(title) -#: ../source/book.xml:13529 -msgid "SSL Certificate Management" -msgstr "" - -#.(para) -#: ../source/book.xml:13531 -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 sniffing their network traffic. SSL makes that kind of unwanted attention less likely to result in sensitive data leaks." -msgstr "" - -#.(para) -#: ../source/book.xml:13537 -msgid "If a Subversion client is compiled to use OpenSSL, then it gains the ability to speak to an Apache server via https:// 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." -msgstr "" - -#.(para) -#: ../source/book.xml:13545 -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 can be covered here is how to manage server and client certificates from an ordinary Subversion client." -msgstr "" - -#.(para) -#: ../source/book.xml:13552 -msgid "When speaking to Apache via https://, a Subversion client can receive two different types of information:" -msgstr "" - -#.(para) -#: ../source/book.xml:13557 -msgid "a server certificate" -msgstr "" - -#.(para) -#: ../source/book.xml:13560 -msgid "a demand for a client certificate" -msgstr "" - -#.(para) -#: ../source/book.xml:13563 -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 certifying authority (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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13573 -#, no-wrap -msgid "\n$ svn list https://host.example.com/repos/project\n\nError validating server certificate for 'https://host.example.com:443':\n - The certificate is not issued by a trusted authority. Use the\n fingerprint to validate the certificate manually!\nCertificate information:\n - Hostname: host.example.com\n - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT\n - Issuer: CA, example.com, Sometown, California, US\n - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b\n\n(R)eject, accept (t)emporarily or accept (p)ermanently?\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13587 -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 auth/ area in just the same way your username and password are cached (see ). If cached, Subversion will automatically trust this certificate in future negotiations." -msgstr "" - -#.(para) -#: ../source/book.xml:13596 -msgid "Your run-time servers 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 ssl-authority-files variable to a semicolon-separated list of PEM-encoded CA certificates:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13602 -#, no-wrap -msgid "\n[global]\nssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13606 -msgid "Many OpenSSL installations also have a pre-defined set of default CAs that are nearly universally trusted. To make the Subversion client automatically trust these standard authorities, set the ssl-trust-default-ca variable to true." -msgstr "" - -#.(para) -#: ../source/book.xml:13612 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13622 -#, no-wrap -msgid "\n$ svn list https://host.example.com/repos/project\n\nAuthentication realm: https://host.example.com:443\nClient certificate filename: /path/to/my/cert.p12\nPassphrase for '/path/to/my/cert.p12': ********\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13630 -msgid "Notice that the client certificate is a p12 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." -msgstr "" - -#.(para) -#: ../source/book.xml:13637 -msgid "Again, the runtime servers file allows you to automate this challenge on a per-host basis. Either or both pieces of information can be described in runtime variables:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13641 -#, no-wrap -msgid "\n[groups]\nexamplehost = host.example.com\n\n[examplehost]\nssl-client-cert-file = /path/to/my/cert.p12\nssl-client-cert-password = somepassword\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13654 -msgid "More security-conscious folk might not want to store the client certificate password in the runtime servers file." -msgstr "" - -#.(para) -#: ../source/book.xml:13649 -msgid "Once you've set the ssl-client-cert-file and ssl-client-cert-password variables, the Subversion client can automatically respond to a client certificate challenge without prompting you. " -msgstr "" - -#.(title) -#: ../source/book.xml:13663 -msgid "Authorization Options" -msgstr "" - -#.(para) -#: ../source/book.xml:13665 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:13674 -msgid "Blanket Access Control" -msgstr "" - -#.(para) -#: ../source/book.xml:13676 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:13679 -msgid "You can restrict access on all repository operations by adding the Require valid-user directive to your <Location> block. Using our previous example, this would mean that only clients that claimed to be either harry or sally, and provided the correct password for their respective username, would be allowed to do anything with the Subversion repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13687 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n\n # how to authenticate a user\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /path/to/users/file\n\n # only authenticated users may access the repository\n Require valid-user\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13701 -msgid "Sometimes you don't need to run such a tight ship. For example, Subversion's own source code repository at http://svn.collab.net/repos/svn 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 Limit and LimitExcept configuration directives. Like the Location directive, these blocks have starting and ending tags, and you would nest them inside your <Location> block." -msgstr "" - -#.(para) -#: ../source/book.xml:13714 -msgid "The parameters present on the Limit and LimitExcept 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 LimitExcept directive, passing the GET, PROPFIND, OPTIONS, and REPORT request type parameters. Then the previously mentioned Require valid-user directive would be placed inside the <LimitExcept> block instead of just inside the <Location> block." -msgstr "" - -#.(screen) -#: ../source/book.xml:13727 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n\n # how to authenticate a user\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /path/to/users/file\n\n # For any operations other than these, require an authenticated user.\n <LimitExcept GET PROPFIND OPTIONS REPORT>\n Require valid-user\n </LimitExcept>\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13743 -msgid "These are only a few simple examples. For more in-depth information about Apache access control and the Require directive, take a look at the Security section of the Apache documentation's tutorials collection at http://httpd.apache.org/docs-2.0/misc/tutorials.html." -msgstr "" - -#.(title) -#: ../source/book.xml:13752 -msgid "Per-Directory Access Control" -msgstr "" - -#.(para) -#: ../source/book.xml:13754 -msgid "It's possible to set up finer-grained permissions using a second Apache httpd module, mod_authz_svn. This module grabs the various opaque URLs passing from client to server, asks mod_dav_svn to decode them, and then possibly vetoes requests based on access policies defined in a configuration file." -msgstr "" - -#.(para) -#: ../source/book.xml:13761 -msgid "If you've built Subversion from source code, mod_authz_svn is automatically built and installed alongside mod_dav_svn. Many binary distributions install it automatically as well. To verify that it's installed correctly, make sure it comes right after mod_dav_svn's LoadModule directive in httpd.conf:" -msgstr "" - -#.(screen) -#: ../source/book.xml:13769 -#, no-wrap -msgid "\nLoadModule dav_module modules/mod_dav.so\nLoadModule dav_svn_module modules/mod_dav_svn.so\nLoadModule authz_svn_module modules/mod_authz_svn.so\n" -msgstr "" - -#.(para) -#: ../source/book.xml:13774 -msgid "To activate this module, you need to configure your Location block to use the AuthzSVNAccessFile 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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:13780 -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.)" -msgstr "" - -#.(para) -#: ../source/book.xml:13786 -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 anonymous." -msgstr "" - -#.(title) -#: ../source/book.xml:13792 -msgid "A sample configuration for anonymous access." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:13794 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNParentPath /var/svn\n\n # our access control policy\n AuthzSVNAccessFile /path/to/access/file\n</Location>\n " -msgstr "" - -#.(para) -#: ../source/book.xml:13804 -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 Require valid-user directive, and defines a means to authenticate." -msgstr "" - -#.(title) -#: ../source/book.xml:13812 -msgid "A sample configuration for authenticated access." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:13814 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNParentPath /var/svn\n\n # our access control policy\n AuthzSVNAccessFile /path/to/access/file\n\n # only authenticated users may access the repository\n Require valid-user\n\n # how to authenticate a user\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /path/to/users/file\n</Location>\n " -msgstr "" - -#.(para) -#: ../source/book.xml:13832 -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 Satisfy Any and Require valid-user directives together." -msgstr "" - -#.(title) -#: ../source/book.xml:13845 -msgid "A sample configuration for mixed authenticated/anonymous access." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:13848 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNParentPath /var/svn\n\n # our access control policy\n AuthzSVNAccessFile /path/to/access/file\n\n # try anonymous access first, resort to real\n # authentication if necessary.\n Satisfy Any\n Require valid-user\n\n # how to authenticate a user\n AuthType Basic\n AuthName \"Subversion repository\"\n AuthUserFile /path/to/users/file\n</Location>\n " -msgstr "" - -#.(para) -#: ../source/book.xml:13868 -msgid "Once you've settled on one of these three basic httpd.conf templates, you need to create your file containing access rules for particular paths within the repository. This is described in ." -msgstr "" - -#.(title) -#: ../source/book.xml:13877 -msgid "Disabling Path-based Checks" -msgstr "" - -#.(para) -#: ../source/book.xml:13879 -msgid "The mod_dav_svn module goes through a lot of work to make sure that data you've marked unreadable doesn't get accidentally leaked. This means that it needs to closely monitor all of the paths and file-contents returned by commands like svn checkout or svn update 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 svn cat -r OLD foo.c 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." -msgstr "" - -#.(para) -#: ../source/book.xml:13893 -msgid "All of this path-checking can sometimes be quite expensive, especially in the case of svn log. 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), 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 mod_authz_svn at all, the mod_dav_svn module is still asking Apache httpd to run authorization checks on every path. The mod_dav_svn module has no idea what authorization modules have been installed, so all it can do is ask Apache to invoke whatever might be present." -msgstr "" - -#.(para) -#: ../source/book.xml:13911 -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 mod_authz_svn or similar module), then you can disable all of this path-checking. In your httpd.conf file, use the SVNPathAuthz directive:" -msgstr "" - -#.(title) -#: ../source/book.xml:13921 -msgid "Disabling path checks altogether" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:13923 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNParentPath /var/svn\n\n SVNPathAuthz off\n</Location>\n " -msgstr "" - -#.(para) -#: ../source/book.xml:13932 -msgid "The SVNPathAuthz directive is on by default. When set off, all path-based authorization checking is disabled; mod_dav_svn stops invoking authorization checks on every path it discovers." -msgstr "" - -#.(title) -#: ../source/book.xml:13942 -msgid "Extra Goodies" -msgstr "" - -#.(para) -#: ../source/book.xml:13944 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:13950 -msgid "Repository Browsing" -msgstr "" - -#.(para) -#: ../source/book.xml:13952 -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 GET 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." -msgstr "" - -#.(para) -#: ../source/book.xml:13963 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:13973 -msgid "Can I view older revisions?" -msgstr "" - -#.(para) -#: ../source/book.xml:13975 -msgid "With an ordinary web browser? In one word: nope. At least, not with mod_dav_svn as your only tool." -msgstr "" - -#.(para) -#: ../source/book.xml:13978 -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 discover 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." -msgstr "" - -#.(para) -#: ../source/book.xml:13999 -msgid "Back then, it was called ViewCVS." -msgstr "" - -#.(para) -#: ../source/book.xml:13989 -msgid "So to answer the question, one obvious way to see older revisions of files and directories is by passing the argument to the svn list and svn cat commands. To browse old revisions with your web browser, however, you can use third-party software. A good example of this is ViewVC (http://viewvc.tigris.org/). ViewVC was originally written to display CVS repositories through the web, and the latest releases are able to understand Subversion repositories as well." -msgstr "" - -#.(title) -#: ../source/book.xml:14005 -msgid "Proper MIME Type" -msgstr "" - -#.(para) -#: ../source/book.xml:14007 -msgid "When browsing a Subversion repository, the web browser gets a clue about how to render a file's contents by looking at the Content-Type: header returned in Apache's response to the HTTP GET 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 default MIME type, typically text/plain. 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 foo.html file in the repository actually render as HTML when browsing." -msgstr "" - -#.(para) -#: ../source/book.xml:14021 -msgid "To make this happen, you only need to make sure that your files have the proper svn:mime-type set. This is discussed in more detail in , and you can even configure your client to automatically attach proper svn:mime-type properties to files entering the repository for the first time; see ." -msgstr "" - -#.(para) -#: ../source/book.xml:14030 -msgid "So in our example, if one were to set the svn:mime-type property to text/html on file foo.html, then Apache would properly tell your web browser to render the file as HTML. One could also attach proper image/* 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." -msgstr "" - -#.(title) -#: ../source/book.xml:14045 -msgid "Customizing the Look" -msgstr "" - -#.(para) -#: ../source/book.xml:14047 -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 SVNIndexXSLT directive in your repository's Location block of httpd.conf will instruct mod_dav_svn to generate XML output when displaying a directory listing, and to reference the XSLT stylesheet of your choice:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14062 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n SVNIndexXSLT \"/svnindex.xsl\"\n …\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14070 -msgid "Using the SVNIndexXSLT 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 tools/xslt/ directory. Keep in mind that the path provided to the SVNIndexXSLT directory is actually a URL path—browsers need to be able to read your stylesheets in order to make use of them!" -msgstr "" - -#.(title) -#: ../source/book.xml:14083 -msgid "Listing Repositories" -msgstr "" - -#.(para) -#: ../source/book.xml:14085 -msgid "If you're serving a collection of repositories from a single URL via the SVNParentPath directive, then it's also possible to have Apache display all available repositories to a web browser. Just activate the SVNListParentPath directive:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14091 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n SVNParentPath /var/svn\n SVNListParentPath on\n …\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14099 -msgid "If a user now points her web browser to the URL http://host.example.com/svn/, she'll see list of all Subversion repositories sitting in /var/svn. Obviously, this can be a security problem, so this feature is turned off by default." -msgstr "" - -#.(title) -#: ../source/book.xml:14110 -msgid "Apache Logging" -msgstr "" - -#.(para) -#: ../source/book.xml:14112 -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 httpd.conf file will cause Apache to produce two logs: error_log and access_log. 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 /usr/local/apache2/logs/.)" -msgstr "" - -#.(para) -#: ../source/book.xml:14124 -msgid "The error_log describes any internal errors that Apache runs into as it works. The access_log 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14132 -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 access_log and deduce what the client was doing—most operations look like a series of cryptic PROPPATCH, GET, PUT, and REPORT requests. To make things worse, many client operations send nearly-identical series of requests, so it's even harder to tell them apart." -msgstr "" - -#.(para) -#: ../source/book.xml:14142 -msgid "mod_dav_svn, however, can come to your aid. By activating an operational logging feature, you can ask mod_dav_svn to create a separate log file describing what sort of high-level operations your clients are performing." -msgstr "" - -#.(para) -#: ../source/book.xml:14148 -msgid "To do this, you need to make use of Apache's CustomLog directive (which is explained in more detail in Apache's own documentation). Be sure to invoke this directive outside of your Subversion Location block:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14154 -#, no-wrap -msgid "\n<Location /svn>\n DAV svn\n …\n</Location>\n\nCustomLog logs/svn_logfile \"%t %u %{SVN-ACTION}e\" env=SVN-ACTION\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14162 -msgid "In this example, we're asking Apache to create a special logfile svn_logfile in the standard Apache logs directory. The %t and %u variables are replaced by the time and username of the request, respectively. The really important part are the two instances of SVN-ACTION. When Apache sees that variable, it substitutes the value of the SVN-ACTION environment variable, which is automatically set by mod_dav_svn whenever it detects a high-level client action." -msgstr "" - -#.(para) -#: ../source/book.xml:14173 -msgid "So instead of having to interpret a traditional access_log like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14176 -#, no-wrap -msgid "\n[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1\" 207 398\n[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1\" 207 449\n[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc HTTP/1.1\" 207 647\n[26/Jan/2007:22:25:29 -0600] \"REPORT /svn/calc/!svn/vcc/default HTTP/1.1\" 200 607\n[26/Jan/2007:22:25:31 -0600] \"OPTIONS /svn/calc HTTP/1.1\" 200 188\n[26/Jan/2007:22:25:31 -0600] \"MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1\" 201 227\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14185 -msgid "… you can instead peruse a much more intelligible svn_logfile like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14187 -#, no-wrap -msgid "\n[26/Jan/2007:22:24:20 -0600] - list-dir '/'\n[26/Jan/2007:22:24:27 -0600] - update '/'\n[26/Jan/2007:22:25:29 -0600] - remote-status '/'\n[26/Jan/2007:22:25:31 -0600] sally commit r60\n" -msgstr "" - -#.(title) -#: ../source/book.xml:14197 -msgid "Other Features" -msgstr "" - -#.(para) -#: ../source/book.xml:14199 -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 https://." -msgstr "" - -#.(para) -#: ../source/book.xml:14208 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14215 -msgid "Finally, because mod_dav_svn 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 ." -msgstr "" - -#.(title) -#: ../source/book.xml:14230 -msgid "Path-Based Authorization" -msgstr "" - -#.(para) -#: ../source/book.xml:14232 -msgid "Both Apache and svnserve 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14241 -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 mod_authz_svn module and then add the AuthzSVNAccessFile directive (within the httpd.conf file) pointing to your own rules-file. (For a full explanation, see .) If you're using svnserve, then you need to make the authz-db variable (within svnserve.conf) point to your rules-file." -msgstr "" - -#.(title) -#: ../source/book.xml:14254 -msgid "Do you really need path-based access control?" -msgstr "" - -#.(para) -#: ../source/book.xml:14256 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14264 -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 shouldn't 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14282 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14294 -msgid "A common theme in this book!" -msgstr "" - -#.(para) -#: ../source/book.xml:14288 -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 sounds good 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.." -msgstr "" - -#.(para) -#: ../source/book.xml:14296 -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 are 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14306 -msgid "Once your server knows where to find your rules-file, it's time to define the rules." -msgstr "" - -#.(para) -#: ../source/book.xml:14308 -msgid "The syntax of the file is the same familiar one used by svnserve.conf and the runtime configuration files. Lines that start with a hash (#) 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 r (read-only) or rw (read-write). If the user is not mentioned at all, no access is allowed." -msgstr "" - -#.(para) -#: ../source/book.xml:14319 -msgid "To be more specific: the value of the section-names are either of the form [repos-name:path] or the form [path]. If you're using the SVNParentPath directive, then it's important to specify the repository names in your sections. If you omit them, then a section like [/some/dir] will match the path /some/dir in every repository. If you're using the SVNPath directive, however, then it's fine to only define paths in your sections—after all, there's only one repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:14330 -#, no-wrap -msgid "\n[calc:/branches/calc/bug-142]\nharry = rw\nsally = r\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14335 -msgid "In this first example, the user harry has full read and write access on the /branches/calc/bug-142 directory in the calc repository, but the user sally has read-only access. Any other users are blocked from accessing this directory." -msgstr "" - -#.(para) -#: ../source/book.xml:14341 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14344 -#, no-wrap -msgid "\n[calc:/branches/calc/bug-142]\nharry = rw\nsally = r\n\n# give sally write access only to the 'testing' subdir\n[calc:/branches/calc/bug-142/testing]\nsally = rw\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14353 -msgid "Now Sally can write to the testing subdirectory of the branch, but can still only read other parts. Harry, meanwhile, continues to have complete read-write access to the whole branch." -msgstr "" - -#.(para) -#: ../source/book.xml:14357 -msgid "It's also possible to explicitly deny permission to someone via inheritance rules, by setting the username variable to nothing:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14360 -#, no-wrap -msgid "\n[calc:/branches/calc/bug-142]\nharry = rw\nsally = r\n\n[calc:/branches/calc/bug-142/secret]\nharry =\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14368 -msgid "In this example, Harry has read-write access to the entire bug-142 tree, but has absolutely no access at all to the secret subdirectory within it." -msgstr "" - -#.(para) -#: ../source/book.xml:14372 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14378 -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 (*), which means all users:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14384 -#, no-wrap -msgid "\n[/]\n* = r\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14388 -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 rw permission to certain users on specific subdirectories within specific repositories." -msgstr "" - -#.(para) -#: ../source/book.xml:14394 -msgid "The asterisk variable (*) is also worth special mention here: it's the only 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 * value defined for the path being accessed; if it can't find one, then it demands real authentication from the client." -msgstr "" - -#.(para) -#: ../source/book.xml:14403 -msgid "The access file also allows you to define whole groups of users, much like the Unix /etc/group file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14406 -#, no-wrap -msgid "\n[groups]\ncalc-developers = harry, sally, joe\npaint-developers = frank, sally, jane\neveryone = harry, sally, joe, frank, sally, jane\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14412 -msgid "Groups can be granted access control just like users. Distinguish them with an at (@) prefix:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14415 -#, no-wrap -msgid "\n[calc:/projects/calc]\n@calc-developers = rw\n\n[paint:/projects/paint]\n@paint-developers = rw\njane = r\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14423 -msgid "Groups can also be defined to contain other groups:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14424 -#, no-wrap -msgid "\n[groups]\ncalc-developers = harry, sally, joe\npaint-developers = frank, sally, jane\neveryone = @calc-developers, @paint-developers\n" -msgstr "" - -#.(title) -#: ../source/book.xml:14435 -msgid "Partial Readability and Checkouts" -msgstr "" - -#.(para) -#: ../source/book.xml:14437 -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 svn checkout." -msgstr "" - -#.(para) -#: ../source/book.xml:14442 -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 only 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." -msgstr "" - -#.(title) -#: ../source/book.xml:14466 -msgid "Supporting Multiple Repository Access Methods" -msgstr "" - -#.(para) -#: ../source/book.xml:14468 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14472 -msgid "At any given time, these processes may require read and write access to your repository:" -msgstr "" - -#.(para) -#: ../source/book.xml:14476 -msgid "regular system users using a Subversion client (as themselves) to access the repository directly via file:// URLs;" -msgstr "" - -#.(para) -#: ../source/book.xml:14481 -msgid "regular system users connecting to SSH-spawned private svnserve processes (running as themselves) which access the repository;" -msgstr "" - -#.(para) -#: ../source/book.xml:14486 -msgid "an svnserve process—either a daemon or one launched by inetd—running as a particular fixed user;" -msgstr "" - -#.(para) -#: ../source/book.xml:14492 -msgid "an Apache httpd process, running as a particular fixed user." -msgstr "" - -#.(para) -#: ../source/book.xml:14496 -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 svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14506 -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 svn program into a wrapper script that first sets umask 002 and then runs the real svn client program. You can write a similar wrapper script for the svnserve program, and add a umask 002 command to Apache's own startup script, apachectl. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:14516 -#, no-wrap -msgid "\n$ cat /usr/bin/svn\n\n#!/bin/sh\n\numask 002\n/usr/bin/svn-real \"$@\"\n\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14525 -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 svn 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 db directory. This causes all newly-created log files to have the same group owner as the parent directory." -msgstr "" - -#.(para) -#: ../source/book.xml:14535 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14540 -msgid "Fortunately, most repository administrators will never need to have such a complex configuration. Users who wish to access repositories that live on the same machine are not limited to using file:// access URLs—they can typically contact the Apache HTTP server or svnserve using localhost for the server name in their http:// or svn:// 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!" -msgstr "" - -#.(title) -#: ../source/book.xml:14554 -msgid "The svn+ssh:// server checklist" -msgstr "" - -#.(para) -#: ../source/book.xml:14556 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:14564 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14569 -msgid "Make the repository wholly owned by that group." -msgstr "" - -#.(para) -#: ../source/book.xml:14574 -msgid "Set the group permissions to read/write." -msgstr "" - -#.(para) -#: ../source/book.xml:14577 -msgid "Your users need to use a sane umask when accessing the repository, so: make sure that svnserve (/usr/bin/svnserve, or wherever it lives in $PATH) is actually a wrapper script which sets umask 002 and executes the real svnserve binary." -msgstr "" - -#.(para) -#: ../source/book.xml:14586 -msgid "Take similar measures when using svnlook and svnadmin. Either run them with a sane umask, or wrap them as described above." -msgstr "" - -#.(title) -#: ../source/book.xml:14602 -msgid "Customizing Your Subversion Experience" -msgstr "" - -#.(para) -#: ../source/book.xml:14604 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:14623 -msgid "Runtime Configuration Area" -msgstr "" - -#.(para) -#: ../source/book.xml:14625 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:14632 -msgid "The Subversion configuration area is a two-tiered hierarchy of option names and their values. Usually, this boils down to a special directory that contains configuration files (the first tier), which are just text files in standard INI format (with sections 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." -msgstr "" - -#.(title) -#: ../source/book.xml:14645 -msgid "Configuration Area Layout" -msgstr "" - -#.(para) -#: ../source/book.xml:14658 -msgid "The APPDATA environment variable points to the Application Data area, so you can always refer to this folder as %APPDATA%\\Subversion." -msgstr "" - -#.(para) -#: ../source/book.xml:14647 -msgid "The first time that the svn command-line client is executed, it creates a per-user configuration area. On Unix-like systems, this area appears as a directory named .subversion in the user's home directory. On Win32 systems, Subversion creates a folder named Subversion, typically inside the Application Data 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. We will refer to the per-user configuration area using its Unix name, .subversion." -msgstr "" - -#.(para) -#: ../source/book.xml:14664 -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 svn program have the final word on behavior. On Unix-like platforms, the system-wide configuration area is expected to be the /etc/subversion directory; on Windows machines, it looks for a Subversion directory inside the common Application Data location (again, as specified by the Windows Registry). Unlike the per-user case, the svn program does not attempt to create the system-wide configuration area." -msgstr "" - -#.(para) -#: ../source/book.xml:14681 -msgid "The per-user configuration area currently contains three files—two configuration files (config and servers), and a README.txt 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 svn command, such as svn --version. A new configuration directory with the default contents will be created." -msgstr "" - -#.(para) -#: ../source/book.xml:14697 -msgid "The per-user configuration area also contains a cache of authentication data. The auth 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." -msgstr "" - -#.(title) -#: ../source/book.xml:14708 -msgid "Configuration and the Windows Registry" -msgstr "" - -#.(para) -#: ../source/book.xml:14710 -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 file/section 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14718 -msgid "Subversion looks for system-wide configuration values under the HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion key. For example, the global-ignores option, which is in the miscellany section of the config file, would be found at HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Config\\Miscellany\\global-ignores. Per-user configuration values should be stored under HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion." -msgstr "" - -#.(para) -#: ../source/book.xml:14728 -msgid "Registry-based configuration options are parsed before 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:" -msgstr "" - -#.(para) -#: ../source/book.xml:14736 -msgid "Command-line options" -msgstr "" - -#.(para) -#: ../source/book.xml:14739 -msgid "The per-user INI files" -msgstr "" - -#.(para) -#: ../source/book.xml:14742 -msgid "The per-user Registry values" -msgstr "" - -#.(para) -#: ../source/book.xml:14745 -msgid "The system-wide INI files" -msgstr "" - -#.(para) -#: ../source/book.xml:14748 -msgid "The system-wide Registry values" -msgstr "" - -#.(para) -#: ../source/book.xml:14751 -msgid "Also, the Windows Registry doesn't really support the notion of something being commented out. However, Subversion will ignore any option key whose name begins with a hash (#) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:14758 -msgid "The svn 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 REGEDIT program. Alternatively, you can create a .reg file, and then double-click on that file from the Explorer shell, which will cause the data to be merged into your registry." -msgstr "" - -#.(title) -#: ../source/book.xml:14768 -msgid "Sample Registration Entries (.reg) File." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:14770 -#, no-wrap -msgid "\nREGEDIT4\n\n[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\groups]\n\n[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\global]\n\"#http-proxy-host\"=\"\"\n\"#http-proxy-port\"=\"\"\n\"#http-proxy-username\"=\"\"\n\"#http-proxy-password\"=\"\"\n\"#http-proxy-exceptions\"=\"\"\n\"#http-timeout\"=\"0\"\n\"#http-compression\"=\"yes\"\n\"#neon-debug-mask\"=\"\"\n\"#ssl-authority-files\"=\"\"\n\"#ssl-trust-default-ca\"=\"\"\n\"#ssl-client-cert-file\"=\"\"\n\"#ssl-client-cert-password\"=\"\"\n\n[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auth]\n\"#store-passwords\"=\"yes\"\n\"#store-auth-creds\"=\"yes\"\n\n[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\helpers]\n\"#editor-cmd\"=\"notepad\"\n\"#diff-cmd\"=\"\"\n\"#diff3-cmd\"=\"\"\n\"#diff3-has-program-arg\"=\"\"\n\n[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\tunnels]\n\n[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\miscellany]\n\"#global-ignores\"=\"*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store\"\n\"#log-encoding\"=\"\"\n\"#use-commit-times\"=\"\"\n\"#no-unlock\"=\"\"\n\"#enable-auto-props\"=\"\"\n\n[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auto-props]\n\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14812 -msgid "The previous example shows the contents of a .reg 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 (#) character from the beginning of the option names, and set the values as you desire." -msgstr "" - -#.(title) -#: ../source/book.xml:14826 -msgid "Configuration Options" -msgstr "" - -#. TODO(cmpilato): Rework and move this section to the Reference -#.(para) -#: ../source/book.xml:14829 -msgid "In this section, we will discuss the specific run-time configuration options that are currently supported by Subversion." -msgstr "" - -#.(title) -#: ../source/book.xml:14835 -msgid "Servers" -msgstr "" - -#.(para) -#: ../source/book.xml:14837 -msgid "The servers file contains Subversion configuration options related to the network layers. There are two special section names in this file—groups and global. The groups section is essentially a cross-reference table. The keys in this section are the names of other sections in the file; their values are globs—textual tokens which possibly contain wildcard characters—that are compared against the hostnames of the machine to which Subversion requests are sent." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:14848 -#, no-wrap -msgid "\n[groups]\nbeanie-babies = *.red-bean.com\ncollabnet = svn.collab.net\n\n[beanie-babies]\n…\n\n[collabnet]\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:14859 -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 groups section. If a match is made, Subversion then looks for a section in the servers file whose name is the matched group's name. From that section it reads the actual network configuration settings." -msgstr "" - -#.(para) -#: ../source/book.xml:14866 -msgid "The global section contains the settings that are meant for all of the servers not matched by one of the globs under the groups 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 groups section), and are as follows:" -msgstr "" - -#.(literal) -#: ../source/book.xml:14877 -msgid "http-proxy-exceptions" -msgstr "" - -#.(para) -#: ../source/book.xml:14880 -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." -msgstr "" - -#.(literal) -#: ../source/book.xml:14890 -msgid "http-proxy-host" -msgstr "" - -#.(para) -#: ../source/book.xml:14893 -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." -msgstr "" - -#.(literal) -#: ../source/book.xml:14903 -msgid "http-proxy-port" -msgstr "" - -#.(para) -#: ../source/book.xml:14906 -msgid "This specifies the port number on the proxy host to use. It defaults to an empty value." -msgstr "" - -#.(literal) -#: ../source/book.xml:14912 -msgid "http-proxy-username" -msgstr "" - -#.(para) -#: ../source/book.xml:14915 -msgid "This specifies the username to supply to the proxy machine. It defaults to an empty value." -msgstr "" - -#.(literal) -#: ../source/book.xml:14921 -msgid "http-proxy-password" -msgstr "" - -#.(para) -#: ../source/book.xml:14924 -msgid "This specifies the password to supply to the proxy machine. It defaults to an empty value." -msgstr "" - -#.(literal) -#: ../source/book.xml:14930 -msgid "http-timeout" -msgstr "" - -#.(para) -#: ../source/book.xml:14933 -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 0, which instructs the underlying HTTP library, Neon, to use its default timeout setting." -msgstr "" - -#.(literal) -#: ../source/book.xml:14945 -msgid "http-compression" -msgstr "" - -#.(para) -#: ../source/book.xml:14948 -msgid "This specifies whether or not Subversion should attempt to compress network requests made to DAV-ready servers. The default value is yes (though compression will only occur if that capability is compiled into the network layer). Set this to no to disable compression, such as when debugging network transmissions." -msgstr "" - -#.(literal) -#: ../source/book.xml:14959 -msgid "neon-debug-mask" -msgstr "" - -#.(para) -#: ../source/book.xml:14962 -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 0, which will silence all debugging output. For more information about how Subversion makes use of Neon, see ." -msgstr "" - -#.(literal) -#: ../source/book.xml:14972 -msgid "ssl-authority-files" -msgstr "" - -#.(para) -#: ../source/book.xml:14975 -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." -msgstr "" - -#.(literal) -#: ../source/book.xml:14984 -msgid "ssl-trust-default-ca" -msgstr "" - -#.(para) -#: ../source/book.xml:14987 -msgid "Set this variable to yes if you want Subversion to automatically trust the set of default CAs that ship with OpenSSL." -msgstr "" - -#.(literal) -#: ../source/book.xml:14994 -msgid "ssl-client-cert-file" -msgstr "" - -#.(para) -#: ../source/book.xml:14997 -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." -msgstr "" - -#.(literal) -#: ../source/book.xml:15009 -msgid "ssl-client-cert-password" -msgstr "" - -#.(para) -#: ../source/book.xml:15012 -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 servers file), then you can set this variable to the certificate's passphrase. You won't be prompted anymore." -msgstr "" - -#.(title) -#: ../source/book.xml:15026 -msgid "Config" -msgstr "" - -#.(para) -#: ../source/book.xml:15028 -msgid "The config 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15033 -msgid "The auth section contains settings related to Subversion's authentication and authorization against the repository. It contains:" -msgstr "" - -#.(literal) -#: ../source/book.xml:15039 -msgid "store-passwords" -msgstr "" - -#.(para) -#: ../source/book.xml:15042 -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 yes. Set this to no to disable this on-disk password caching. You can override this option for a single instance of the svn command using the command-line parameter (for those subcommands that support it). For more information, see ." -msgstr "" - -#.(literal) -#: ../source/book.xml:15056 -msgid "store-auth-creds" -msgstr "" - -#.(para) -#: ../source/book.xml:15059 -msgid "This setting is the same as store-passwords, except that it enables or disables disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials." -msgstr "" - -#.(para) -#: ../source/book.xml:15068 -msgid "The helpers section controls which external applications Subversion uses to accomplish its tasks. Valid options in this section are:" -msgstr "" - -#.(literal) -#: ../source/book.xml:15074 -msgid "editor-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:15077 -msgid "This specifies the program Subversion will use to query the user for a log message during a commit operation, such as when using svn commit without either the () or () options. This program is also used with the svn propedit 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 ). 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:" -msgstr "" - -#.(para) -#: ../source/book.xml:15093 -msgid "Command-line option --editor-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:15096 -msgid "Environment variable SVN_EDITOR" -msgstr "" - -#.(para) -#: ../source/book.xml:15099 -msgid "Configuration option editor-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:15102 -msgid "Environment variable VISUAL" -msgstr "" - -#.(para) -#: ../source/book.xml:15105 -msgid "Environment variable EDITOR" -msgstr "" - -#.(para) -#: ../source/book.xml:15108 -msgid "Possibly, a default value built in to Subversion (not present in the official builds)" -msgstr "" - -#.(para) -#: ../source/book.xml:15112 -msgid "The value of any of these options or variables is (unlike diff-cmd) 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." -msgstr "" - -#.(literal) -#: ../source/book.xml:15122 -msgid "diff-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:15125 -msgid "This specifies the absolute path of a differencing program, used when Subversion generates diff output (such as when using the svn diff command). By default Subversion uses an internal differencing library—setting this option will cause it to perform this task using an external program. See for more details on using such programs." -msgstr "" - -#.(literal) -#: ../source/book.xml:15138 -msgid "diff3-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:15141 -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 for more details on using such programs." -msgstr "" - -#.(literal) -#: ../source/book.xml:15153 -msgid "diff3-has-program-arg" -msgstr "" - -#.(para) -#: ../source/book.xml:15156 -msgid "This flag should be set to true if the program specified by the diff3-cmd option accepts a command-line parameter." -msgstr "" - -#.(para) -#: ../source/book.xml:15164 -msgid "The tunnels section allows you to define new tunnel schemes for use with svnserve and svn:// client connections. For more details, see ." -msgstr "" - -#.(para) -#: ../source/book.xml:15170 -msgid "Anyone for potluck dinner?" -msgstr "" - -#.(para) -#: ../source/book.xml:15168 -msgid "The miscellany section is where everything that doesn't belong elsewhere winds up. In this section, you can find:" -msgstr "" - -#.(literal) -#: ../source/book.xml:15175 -msgid "global-ignores" -msgstr "" - -#.(para) -#: ../source/book.xml:15178 -msgid "When running the svn status command, Subversion lists unversioned files and directories along with the versioned ones, annotating them with a ? character (see ). 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 global-ignores 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 *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store." -msgstr "" - -#.(para) -#: ../source/book.xml:15191 -msgid "As well as svn status, the svn add and svn import 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 command-line flag." -msgstr "" - -#.(para) -#: ../source/book.xml:15198 -msgid "For information on more fine-grained control of ignored items, see ." -msgstr "" - -#.(literal) -#: ../source/book.xml:15204 -msgid "enable-auto-props" -msgstr "" - -#.(para) -#: ../source/book.xml:15207 -msgid "This instructs Subversion to automatically set properties on newly added or imported files. The default value is no, so set this to yes to enable Auto-props. The auto-props section of this file specifies which properties are to be set on which files." -msgstr "" - -#.(literal) -#: ../source/book.xml:15217 -msgid "log-encoding" -msgstr "" - -#.(para) -#: ../source/book.xml:15220 -msgid "This variable sets the default character set encoding for commit log messages. It's a permanent form of the option (see ). 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." -msgstr "" - -#.(literal) -#: ../source/book.xml:15233 -msgid "use-commit-times" -msgstr "" - -#.(para) -#: ../source/book.xml:15236 -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 svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15243 -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 svn export command always places these last-commit timestamps on trees that it produces. By setting this config variable to yes, the svn checkout, svn update, svn switch, and svn revert commands will also set last-commit timestamps on files that they touch." -msgstr "" - -#.(para) -#: ../source/book.xml:15260 -msgid "The auto-props 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 PATTERN = PROPNAME=PROPVALUE where PATTERN 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 override another. You can find several examples of auto-props usage in the config file. Lastly, don't forget to set enable-auto-props to yes in the miscellany section if you want to enable auto-props." -msgstr "" - -#.(title) -#: ../source/book.xml:15286 -msgid "Localization" -msgstr "" - -#.(para) -#: ../source/book.xml:15288 -msgid "Localization 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 localized. This section describes steps Subversion has made towards localization." -msgstr "" - -#.(title) -#: ../source/book.xml:15298 -msgid "Understanding locales" -msgstr "" - -#.(para) -#: ../source/book.xml:15300 -msgid "Most modern operating systems have a notion of the current locale—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." -msgstr "" - -#.(para) -#: ../source/book.xml:15307 -msgid "On most Unix-like systems, you can check the values of the locale-related runtime configuration options by running the locale command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:15310 -#, no-wrap -msgid "\n$ locale\nLANG=\nLC_COLLATE=\"C\"\nLC_CTYPE=\"C\"\nLC_MESSAGES=\"C\"\nLC_MONETARY=\"C\"\nLC_NUMERIC=\"C\"\nLC_TIME=\"C\"\nLC_ALL=\"C\"\n" -msgstr "" - -#.(para) -#: ../source/book.xml:15321 -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 C locale, but users can set these variables to specific country/language code combinations. For example, if one were to set the LC_TIME variable to fr_CA, 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 LC_MESSAGES variable to zh_TW, then programs would know to present human-readable messages in Traditional Chinese. Setting the LC_ALL variable has the effect of changing every locale variable to the same value. The value of LANG 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 locale -a." -msgstr "" - -#.(para) -#: ../source/book.xml:15339 -msgid "On Windows, locale configuration is done via the Regional and Language Options 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." -msgstr "" - -#.(title) -#: ../source/book.xml:15349 -msgid "Subversion's use of locales" -msgstr "" - -#.(para) -#: ../source/book.xml:15351 -msgid "The Subversion client, svn, honors the current locale configuration in two ways. First, it notices the value of the LC_MESSAGES variable and attempts to print all messages in the specified language. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:15356 -#, no-wrap -msgid "\n$ export LC_MESSAGES=de_DE\n$ svn help cat\ncat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.\nAufruf: cat ZIEL[@REV]...\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:15363 -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 .mo filename extension. For example, the German translation file is named de.mo. These translation files are installed somewhere on your system. On Unix, they typically live in /usr/share/locale/, while on Windows they're often found in the \\share\\locale\\ folder in Subversion's installation area. Once installed, a module is named after the program it provides translations for. For example, the de.mo file may ultimately end up installed as /usr/share/locale/de/LC_MESSAGES/subversion.mo. By browsing the installed .mo files, you can see which languages the Subversion client is able to speak." -msgstr "" - -#.(para) -#: ../source/book.xml:15385 -msgid "The second way in which the locale is honored involves how svn interprets your input. The repository stores all paths, filenames, and log messages in Unicode, encoded as UTF-8. In that sense, the repository is internationalized—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." -msgstr "" - -#.(para) -#: ../source/book.xml:15395 -msgid "For example, suppose you create a file named caffè.txt, and then when committing the file, you write the log message as Adesso il caffè è più forte. Both the filename and log message contain non-ASCII characters, but because your locale is set to it_IT, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15404 -msgid "Note that while the repository demands UTF-8 filenames and log messages, it does not 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." -msgstr "" - -#.(title) -#: ../source/book.xml:15412 -msgid "Character set conversion errors" -msgstr "" - -#.(para) -#: ../source/book.xml:15414 -msgid "While using Subversion, you might get hit with an error related to character set conversions:" -msgstr "" - -#.(screen) -#: ../source/book.xml:15416 -#, no-wrap -msgid "\nsvn: Can't convert string from native encoding to 'UTF-8':\n…\nsvn: Can't convert string from 'UTF-8' to native encoding:\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:15422 -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 en_US but a collaborator has committed a Japanese filename, you're likely to see this error when you receive the file during an svn update." -msgstr "" - -#.(para) -#: ../source/book.xml:15430 -msgid "The solution is either to set your locale to something which can 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.)" -msgstr "" - -#.(title) -#: ../source/book.xml:15445 -msgid "Using External Differencing Tools" -msgstr "" - -#.(para) -#: ../source/book.xml:15447 -msgid "The presence of and options, and similarly named runtime configuration parameters (see ), can lead to a false notion of how easy it is to use external differencing (or diff) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15465 -msgid "Subversion developers are good, but even the best make mistakes." -msgstr "" - -#.(para) -#: ../source/book.xml:15455 -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 diff and diff3 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, the and 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15475 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:15488 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:15497 -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 svn:mime-type 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 application/msword). For more about MIME type settings, see " -msgstr "" - -#.(title) -#: ../source/book.xml:15514 -msgid "External diff" -msgstr "" - -#.(para) -#: ../source/book.xml:15530 -msgid "The GNU diff manual page puts it this way: An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble." -msgstr "" - -#.(para) -#: ../source/book.xml:15516 -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 backgrounded), 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. " -msgstr "" - -#.(para) -#: ../source/book.xml:15534 -msgid " and are templates for external diff tool wrappers in the Bourne shell and Windows batch scripting languages, respectively." -msgstr "" - -#.(title) -#: ../source/book.xml:15541 -msgid "diffwrap.sh" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:15543 -#, no-wrap -msgid "\n#!/bin/sh\n\n# Configure your favorite diff program here.\nDIFF=\"/usr/local/bin/my-diff-tool\"\n\n# Subversion provides the paths we need as the sixth and seventh \n# parameters.\nLEFT=${6}\nRIGHT=${7}\n\n# Call the diff command (change the following line to make sense for\n# your merge program).\n$DIFF --left $LEFT --right $RIGHT\n\n# Return an errorcode of 0 if no differences were detected, 1 if some were.\n# Any other errorcode will be treated as fatal.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:15564 -msgid "diffwrap.bat" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:15566 -#, no-wrap -msgid "\n@ECHO OFF\n\nREM Configure your favorite diff program here.\nSET DIFF=\"C:\\Program Files\\Funky Stuff\\My Diff Tool.exe\"\n\nREM Subversion provides the paths we need as the sixth and seventh \nREM parameters.\nSET LEFT=%6\nSET RIGHT=%7\n\nREM Call the diff command (change the following line to make sense for\nREM your merge program).\n%DIFF% --left %LEFT% --right %RIGHT%\n\nREM Return an errorcode of 0 if no differences were detected, 1 if some were.\nREM Any other errorcode will be treated as fatal.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:15589 -msgid "External diff3" -msgstr "" - -#.(para) -#: ../source/book.xml:15591 -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 mine, older, and yours 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15608 -msgid " and are templates for external merge tool wrappers in the Bourne shell and Windows batch scripting languages, respectively." -msgstr "" - -#.(title) -#: ../source/book.xml:15614 -msgid "diff3wrap.sh" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:15616 -#, no-wrap -msgid "\n#!/bin/sh\n\n# Configure your favorite diff3/merge program here.\nDIFF3=\"/usr/local/bin/my-merge-tool\"\n\n# Subversion provides the paths we need as the ninth, tenth, and eleventh \n# parameters.\nMINE=${9}\nOLDER=${10}\nYOURS=${11}\n\n# Call the merge command (change the following line to make sense for\n# your merge program).\n$DIFF3 --older $OLDER --mine $MINE --yours $YOURS\n\n# After performing the merge, this script needs to print the contents\n# of the merged file to stdout. Do that in whatever way you see fit.\n# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n# remain in the result. Any other errorcode will be treated as fatal.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:15640 -msgid "diff3wrap.bat" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:15642 -#, no-wrap -msgid "\n@ECHO OFF\n\nREM Configure your favorite diff3/merge program here.\nSET DIFF3=\"C:\\Program Files\\Funky Stuff\\My Merge Tool.exe\"\n\nREM Subversion provides the paths we need as the ninth, tenth, and eleventh \nREM parameters. But we only have access to nine parameters at a time, so we\nREM shift our nine-parameter window twice to let us get to what we need.\nSHIFT\nSHIFT\nSET MINE=%7\nSET OLDER=%8\nSET YOURS=%9\n\nREM Call the merge command (change the following line to make sense for\nREM your merge program).\n%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%\n\nREM After performing the merge, this script needs to print the contents\nREM of the merged file to stdout. Do that in whatever way you see fit.\nREM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\nREM remain in the result. Any other errorcode will be treated as fatal.\n" -msgstr "" - -#.(title) -#: ../source/book.xml:15677 -msgid "Embedding Subversion" -msgstr "" - -#.(para) -#: ../source/book.xml:15679 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:15688 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:15704 -msgid "Layered Library Design" -msgstr "" - -#.(para) -#: ../source/book.xml:15706 -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 ). 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.)." -msgstr "" - -#.(term) -#: ../source/book.xml:15715 -msgid "libsvn_client" -msgstr "" - -#.(para) -#: ../source/book.xml:15717 -msgid "Primary interface for client programs" -msgstr "" - -#.(term) -#: ../source/book.xml:15722 -msgid "libsvn_delta" -msgstr "" - -#.(para) -#: ../source/book.xml:15724 -msgid "Tree and byte-stream differencing routines" -msgstr "" - -#.(term) -#: ../source/book.xml:15729 -msgid "libsvn_diff" -msgstr "" - -#.(para) -#: ../source/book.xml:15731 -msgid "Contextual differencing and merging routines" -msgstr "" - -#.(term) -#: ../source/book.xml:15736 -msgid "libsvn_fs" -msgstr "" - -#.(para) -#: ../source/book.xml:15738 -msgid "Filesystem commons and module loader" -msgstr "" - -#.(term) -#: ../source/book.xml:15743 -msgid "libsvn_fs_base" -msgstr "" - -#.(para) -#: ../source/book.xml:15745 -msgid "The Berkeley DB filesystem back-end" -msgstr "" - -#.(term) -#: ../source/book.xml:15750 -msgid "libsvn_fs_fs" -msgstr "" - -#.(para) -#: ../source/book.xml:15752 -msgid "The native filesystem (FSFS) back-end" -msgstr "" - -#.(term) -#: ../source/book.xml:15757 -msgid "libsvn_ra" -msgstr "" - -#.(para) -#: ../source/book.xml:15759 -msgid "Repository Access commons and module loader" -msgstr "" - -#.(term) -#: ../source/book.xml:15764 -msgid "libsvn_ra_dav" -msgstr "" - -#.(para) -#: ../source/book.xml:15766 -msgid "The WebDAV Repository Access module" -msgstr "" - -#.(term) -#: ../source/book.xml:15771 -msgid "libsvn_ra_local" -msgstr "" - -#.(para) -#: ../source/book.xml:15773 -msgid "The local Repository Access module" -msgstr "" - -#.(term) -#: ../source/book.xml:15778 -msgid "libsvn_ra_serf" -msgstr "" - -#.(para) -#: ../source/book.xml:15780 -msgid "Another (experimental) WebDAV Repository Access module" -msgstr "" - -#.(term) -#: ../source/book.xml:15785 -msgid "libsvn_ra_svn" -msgstr "" - -#.(para) -#: ../source/book.xml:15787 -msgid "The custom protocol Repository Access module" -msgstr "" - -#.(term) -#: ../source/book.xml:15792 -msgid "libsvn_repos" -msgstr "" - -#.(para) -#: ../source/book.xml:15794 -msgid "Repository interface" -msgstr "" - -#.(term) -#: ../source/book.xml:15798 -msgid "libsvn_subr" -msgstr "" - -#.(para) -#: ../source/book.xml:15800 -msgid "Miscellaneous helpful subroutines" -msgstr "" - -#.(term) -#: ../source/book.xml:15805 -msgid "libsvn_wc" -msgstr "" - -#.(para) -#: ../source/book.xml:15807 -msgid "The working copy management library" -msgstr "" - -#.(term) -#: ../source/book.xml:15812 -msgid "mod_authz_svn" -msgstr "" - -#.(para) -#: ../source/book.xml:15814 -msgid "Apache authorization module for Subversion repositories access via WebDAV" -msgstr "" - -#.(para) -#: ../source/book.xml:15821 -msgid "Apache module for mapping WebDAV operations to Subversion ones" -msgstr "" - -#.(para) -#: ../source/book.xml:15826 -msgid "The fact that the word miscellaneous 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 big picture that allows you to pinpoint the location of certain pieces of functionality with relative ease." -msgstr "" - -#.(para) -#: ../source/book.xml:15835 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:15847 -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 ). So while the Subversion distribution provides only the svn 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." -msgstr "" - -#.(title) -#: ../source/book.xml:15862 -msgid "Repository Layer" -msgstr "" - -#.(para) -#: ../source/book.xml:15864 -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 other end of the line." -msgstr "" - -#.(para) -#: ../source/book.xml:15875 -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 files and directories 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 .) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15893 -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 (properties) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15907 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:15913 -msgid "Begin a Subversion commit transaction." -msgstr "" - -#.(para) -#: ../source/book.xml:15916 -msgid "Make your changes (adds, deletes, property modifications, etc.)." -msgstr "" - -#.(para) -#: ../source/book.xml:15920 -msgid "Commit your transaction." -msgstr "" - -#.(para) -#: ../source/book.xml:15923 -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 the way things were." -msgstr "" - -#.(title) -#: ../source/book.xml:15930 -msgid "The Transaction Distraction" -msgstr "" - -#.(para) -#: ../source/book.xml:15932 -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 none of them ever happened—and in a way that does not interfere with other processes acting on the data." -msgstr "" - -#.(para) -#: ../source/book.xml:15944 -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)!" -msgstr "" - -#.(para) -#: ../source/book.xml:15957 -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)." -msgstr "" - -#.(para) -#: ../source/book.xml:15965 -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 /foo/bar, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:15975 -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. shows a typical representation of a tree as exactly that." -msgstr "" - -#.(title) -#: ../source/book.xml:15984 -msgid "Files and directories in two dimensions" -msgstr "" - -#.(para) -#: ../source/book.xml:15995 -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 fourth dimension, and we apologize for any emotional trauma induced by our assertion of a different theory." -msgstr "" - -#.(para) -#: ../source/book.xml:15992 -msgid "The difference here is that the Subversion filesystem has a nifty third dimension that most filesystems do not have—Time! In the filesystem interface, nearly every function that has a path argument also expects a root 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 /foo/bar in revision 32, and the same path as it exists in revision 98. shows revision history as an added dimension to the Subversion filesystem universe." -msgstr "" - -#.(title) -#: ../source/book.xml:16013 -msgid "Versioning time—the third dimension!" -msgstr "" - -#.(para) -#: ../source/book.xml:16021 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16030 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16043 -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:" -msgstr "" - -#.(para) -#: ../source/book.xml:16050 -msgid "create, open, destroy, and perform recovery steps on a Subversion repository and the filesystem included in that repository." -msgstr "" - -#.(para) -#: ../source/book.xml:16055 -msgid "describe the differences between two filesystem trees." -msgstr "" - -#.(para) -#: ../source/book.xml:16059 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16064 -msgid "generate a human-readable dump of the filesystem, a complete representation of the revisions in the filesystem." -msgstr "" - -#.(para) -#: ../source/book.xml:16069 -msgid "parse that dump format, loading the dumped revisions into a different Subversion repository." -msgstr "" - -#.(para) -#: ../source/book.xml:16073 -msgid "As Subversion continues to evolve, the repository library will grow with the filesystem library to offer increased functionality and configurable option support." -msgstr "" - -#.(title) -#: ../source/book.xml:16080 -msgid "Repository Access Layer" -msgstr "" - -#.(para) -#: ../source/book.xml:16082 -msgid "If the Subversion Repository Layer is at the other end of the line, 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, svnserve)." -msgstr "" - -#.(para) -#: ../source/book.xml:16092 -msgid "Since Subversion uses URLs to identify its repository resources, the protocol portion of the URL scheme (usually file://, http://, https://, svn://, or svn+ssh://) is used to determine which RA module will handle the communications. Each module registers a list of the protocols it knows how to speak 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 svn --version:" -msgstr "" - -#.(screen) -#: ../source/book.xml:16104 -#, no-wrap -msgid "\n$ svn --version\nsvn, version 1.4.3 (r23084)\n compiled Jan 18 2007, 07:47:40\n\nCopyright (C) 2000-2006 CollabNet.\nSubversion is open source software, see http://subversion.tigris.org/\nThis product includes software developed by CollabNet (http://www.Collab.Net/).\n\nThe following repository access (RA) modules are available:\n\n* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.\n - handles 'http' scheme\n - handles 'https' scheme\n* ra_svn : Module for accessing a repository using the svn network protocol.\n - handles 'svn' scheme\n* ra_local : Module for accessing a repository on local disk.\n - handles 'file' scheme\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:16125 -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 svnserve program; and so on." -msgstr "" - -#.(para) -#: ../source/book.xml:16134 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:16148 -msgid "Client Layer" -msgstr "" - -#.(para) -#: ../source/book.xml:16150 -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 reflection of one or more repository locations—and propagating changes to and from the Repository Access layer." -msgstr "" - -#.(para) -#: ../source/book.xml:16158 -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 .svn, 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 .svn subdirectory is similar in purpose to the CVS administrative directories found in CVS working copies. For more information about the .svn administrative area, see in this chapter." -msgstr "" - -#.(para) -#: ../source/book.xml:16171 -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 svn_client_checkout() 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 (.svn directories and all)." -msgstr "" - -#.(para) -#: ../source/book.xml:16184 -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 tools/examples/minimal_client.c that exemplifies how to wield the Subversion API to create a simple client program" -msgstr "" - -#.(title) -#: ../source/book.xml:16199 -msgid "Binding Directly—A Word About Correctness" -msgstr "" - -#.(para) -#: ../source/book.xml:16201 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16212 -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 again translate into its 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." -msgstr "" - -#.(para) -#: ../source/book.xml:16221 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:16242 -msgid "Inside the Working Copy Administration Area" -msgstr "" - -#.(para) -#: ../source/book.xml:16244 -msgid "As we mentioned earlier, each directory of a Subversion working copy contains a special subdirectory called .svn which houses administrative data about that working copy directory. Subversion uses the information in .svn to keep track of things like:" -msgstr "" - -#.(para) -#: ../source/book.xml:16251 -msgid "Which repository location(s) are represented by the files and subdirectories in the working copy directory." -msgstr "" - -#.(para) -#: ../source/book.xml:16256 -msgid "What revision of each of those files and directories are currently present in the working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:16260 -msgid "Any user-defined properties that might be attached to those files and directories." -msgstr "" - -#.(para) -#: ../source/book.xml:16264 -msgid "Pristine (un-edited) copies of the working copy files." -msgstr "" - -#.(para) -#: ../source/book.xml:16268 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:16282 -msgid "The Entries File" -msgstr "" - -#.(para) -#: ../source/book.xml:16284 -msgid "Perhaps the single most important file in the .svn directory is the entries 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!" -msgstr "" - -#.(para) -#: ../source/book.xml:16296 -msgid "Folks familiar with CVS's administrative directories will have recognized at this point that Subversion's .svn/entries file serves the purposes of, among other things, CVS's CVS/Entries, CVS/Root, and CVS/Repository files combined." -msgstr "" - -#.(para) -#: ../source/book.xml:16302 -msgid "The format of the .svn/entries 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." -msgstr "" - -#.(title) -#: ../source/book.xml:16321 -msgid "Pristine Copies and Property Files" -msgstr "" - -#.(para) -#: ../source/book.xml:16323 -msgid "As mentioned before, the .svn directory also holds the pristine text-base versions of files. Those can be found in .svn/text-base. 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 text-base an option. Ironically though, it is as your versioned files' sizes get larger that the existence of the text-base becomes more crucial—who wants to transmit a huge file across a network just because they want to commit a tiny change to it?" -msgstr "" - -#.(para) -#: ../source/book.xml:16341 -msgid "Similar in purpose to the text-base files are the property files and their pristine prop-base copies, located in .svn/props and .svn/prop-base respectively. Since directories can have properties, too, there are also .svn/dir-props and .svn/dir-prop-base files." -msgstr "" - -#.(title) -#: ../source/book.xml:16356 -msgid "Using the APIs" -msgstr "" - -#.(para) -#: ../source/book.xml:16358 -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 subversion/include directory of the source tree. These headers are copied into your system locations (for example, /usr/local/include) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:16370 -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 svn_, followed by a short code for the library in which the symbol is defined (such as wc, client, fs, etc.), followed by a single underscore (_) 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 (__). Functions that are private to a given source file have no special prefixing, and are declared static. Of course, a compiler isn't interested in these naming conventions, but they help to clarify the scope of a given function or datatype." -msgstr "" - -#.(para) -#: ../source/book.xml:16395 -msgid "After all, Subversion uses Subversion's APIs, too." -msgstr "" - -#.(para) -#: ../source/book.xml:16388 -msgid "Another good source of information about programming against the Subversion APIs is the project's own hacking guidelines, which can be found at http://subversion.tigris.org/hacking.html. 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. " -msgstr "" - -#.(title) -#: ../source/book.xml:16401 -msgid "The Apache Portable Runtime Library" -msgstr "" - -#.(para) -#: ../source/book.xml:16403 -msgid "Along with Subversion's own datatypes, you will see many references to datatypes that begin with apr_—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." -msgstr "" - -#.(para) -#: ../source/book.xml:16421 -msgid "Subversion uses ANSI system calls and datatypes as much as possible." -msgstr "" - -#.(para) -#: ../source/book.xml:16432 -msgid "Neon and Berkeley DB are examples of such libraries." -msgstr "" - -#.(para) -#: ../source/book.xml:16419 -msgid "In addition to providing consistent implementations of system calls that differ across operating systems, 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), and while a person coding against the Subversion APIs is not required to do the same, they are 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 apr_initialize() to initialize the APR subsystem, and then must create and manage pools for use with Subversion API calls, typically by using svn_pool_create(), svn_pool_clear(), and svn_pool_destroy()." -msgstr "" - -#.(title) -#: ../source/book.xml:16445 -msgid "Programming with Memory Pools" -msgstr "" - -#.(para) -#: ../source/book.xml:16447 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16457 -msgid "Or at least make it something you only toy with when doing extremely tight program optimization." -msgstr "" - -#.(para) -#: ../source/book.xml:16455 -msgid "Higher-level languages, on the other hand, take the job of memory management away from the developer completely. Languages like Java and Python use garbage collection, allocating memory for objects when needed, and automatically freeing that memory when the object is no longer in use." -msgstr "" - -#.(para) -#: ../source/book.xml:16463 -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 pool) of memory, instead of per allocated object. Rather than using malloc() 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 all 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." -msgstr "" - -#.(title) -#: ../source/book.xml:16484 -msgid "URL and Path Requirements" -msgstr "" - -#.(para) -#: ../source/book.xml:16486 -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 remote might mean across the office, it could just as well mean across the globe. 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 subversion/include/svn_utf.h) that can be used by any program to do these conversions." -msgstr "" - -#.(para) -#: ../source/book.xml:16503 -msgid "Also, Subversion APIs require all URL parameters to be properly URI-encoded. So, instead of passing file:///home/username/My File.txt as the URL of a file named My File.txt, you need to pass file:///home/username/My%20File.txt. Again, Subversion supplies helper functions that your application can use—svn_path_uri_encode() and svn_path_uri_decode(), for URI encoding and decoding, respectively." -msgstr "" - -#.(title) -#: ../source/book.xml:16516 -msgid "Using Languages Other than C and C++" -msgstr "" - -#.(para) -#: ../source/book.xml:16518 -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 subversion/bindings/swig. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:16528 -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 http://www.swig.org/." -msgstr "" - -#.(para) -#: ../source/book.xml:16538 -msgid "Subversion also has language bindings for Java. The JavaJL bindings (located in subversion/bindings/java 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." -msgstr "" - -#.(para) -#: ../source/book.xml:16546 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:16553 -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 http://subversion.tigris.org/links.html), but there are a couple of popular ones we feel are especially noteworthy. First, Barry Scott's PySVN bindings (http://pysvn.tigris.org/) 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 (http://svnkit.com/), 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." -msgstr "" - -#.(title) -#: ../source/book.xml:16573 -msgid "Code Samples" -msgstr "" - -#.(para) -#: ../source/book.xml:16575 -msgid " 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 svn_repos_ and svn_fs_ 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)." -msgstr "" - -#.(title) -#: ../source/book.xml:16590 -msgid "Using the Repository Layer" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:16592 -#, no-wrap -msgid "\n/* Convert a Subversion error into a simple boolean error code.\n *\n * NOTE: Subversion errors must be cleared (using svn_error_clear())\n * because they are allocated from the global pool, else memory\n * leaking occurs.\n */\n#define INT_ERR(expr) \\\n do { \\\n svn_error_t *__temperr = (expr); \\\n if (__temperr) \\\n { \\\n svn_error_clear(__temperr); \\\n return 1; \\\n } \\\n return 0; \\\n } while (0)\n\n/* Create a new directory at the path NEW_DIRECTORY in the Subversion\n * repository located at REPOS_PATH. Perform all memory allocation in\n * POOL. This function will create a new revision for the addition of\n * NEW_DIRECTORY. Return zero if the operation completes\n * successfully, non-zero otherwise.\n */\nstatic int\nmake_new_directory(const char *repos_path,\n const char *new_directory,\n apr_pool_t *pool)\n{\n svn_error_t *err;\n svn_repos_t *repos;\n svn_fs_t *fs;\n svn_revnum_t youngest_rev;\n svn_fs_txn_t *txn;\n svn_fs_root_t *txn_root;\n const char *conflict_str;\n\n /* Open the repository located at REPOS_PATH. \n */\n INT_ERR(svn_repos_open(&repos, repos_path, pool));\n\n /* Get a pointer to the filesystem object that is stored in REPOS. \n */\n fs = svn_repos_fs(repos);\n\n /* Ask the filesystem to tell us the youngest revision that\n * currently exists. \n */\n INT_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));\n\n /* Begin a new transaction that is based on YOUNGEST_REV. We are\n * less likely to have our later commit rejected as conflicting if we\n * always try to make our changes against a copy of the latest snapshot\n * of the filesystem tree. \n */\n INT_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));\n\n /* Now that we have started a new Subversion transaction, get a root\n * object that represents that transaction. \n */\n INT_ERR(svn_fs_txn_root(&txn_root, txn, pool));\n \n /* Create our new directory under the transaction root, at the path\n * NEW_DIRECTORY. \n */\n INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool));\n\n /* Commit the transaction, creating a new revision of the filesystem\n * which includes our added directory path.\n */\n err = svn_repos_fs_commit_txn(&conflict_str, repos, \n &youngest_rev, txn, pool);\n if (! err)\n {\n /* No error? Excellent! Print a brief report of our success.\n */\n printf(\"Directory '%s' was successfully added as new revision \"\n \"'%ld'.\\n\", new_directory, youngest_rev);\n }\n else if (err->apr_err == SVN_ERR_FS_CONFLICT)\n {\n /* Uh-oh. Our commit failed as the result of a conflict\n * (someone else seems to have made changes to the same area \n * of the filesystem that we tried to modify). Print an error\n * message.\n */\n printf(\"A conflict occurred at path '%s' while attempting \"\n \"to add directory '%s' to the repository at '%s'.\\n\", \n conflict_str, new_directory, repos_path);\n }\n else\n {\n /* Some other error has occurred. Print an error message.\n */\n printf(\"An error occurred while attempting to add directory '%s' \"\n \"to the repository at '%s'.\\n\", \n new_directory, repos_path);\n }\n\n INT_ERR(err);\n} \n" -msgstr "" - -#.(para) -#: ../source/book.xml:16695 -msgid "Note that in , the code could just as easily have committed the transaction using svn_fs_commit_txn(). 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, svn_repos_fs_commit_txn(). (For more information regarding Subversion's repository hooks, see .)" -msgstr "" - -#.(para) -#: ../source/book.xml:16708 -msgid "Now let's switch languages. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:16714 -msgid "Using the Repository Layer with Python" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:16716 -#, no-wrap -msgid "\n#!/usr/bin/python\n\n\"\"\"Crawl a repository, printing versioned object path names.\"\"\"\n\nimport sys\nimport os.path\nimport svn.fs, svn.core, svn.repos\n\ndef crawl_filesystem_dir(root, directory):\n \"\"\"Recursively crawl DIRECTORY under ROOT in the filesystem, and return\n a list of all the paths at or below DIRECTORY.\"\"\"\n\n # Print the name of this path.\n print directory + \"/\"\n \n # Get the directory entries for DIRECTORY.\n entries = svn.fs.svn_fs_dir_entries(root, directory)\n\n # Loop over the entries.\n names = entries.keys()\n for name in names:\n # Calculate the entry's full path.\n full_path = directory + '/' + name\n\n # If the entry is a directory, recurse. The recursion will return\n # a list with the entry and all its children, which we will add to\n # our running list of paths.\n if svn.fs.svn_fs_is_dir(root, full_path):\n crawl_filesystem_dir(root, full_path)\n else:\n # Else it's a file, so print its path here.\n print full_path\n\ndef crawl_youngest(repos_path):\n \"\"\"Open the repository at REPOS_PATH, and recursively crawl its\n youngest revision.\"\"\"\n \n # Open the repository at REPOS_PATH, and get a reference to its\n # versioning filesystem.\n repos_obj = svn.repos.svn_repos_open(repos_path)\n fs_obj = svn.repos.svn_repos_fs(repos_obj)\n\n # Query the current youngest revision.\n youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj)\n \n # Open a root object representing the youngest (HEAD) revision.\n root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev)\n\n # Do the recursive crawl.\n crawl_filesystem_dir(root_obj, \"\")\n \nif __name__ == \"__main__\":\n # Check for sane usage.\n if len(sys.argv) != 2:\n sys.stderr.write(\"Usage: %s REPOS_PATH\\n\"\n % (os.path.basename(sys.argv[0])))\n sys.exit(1)\n\n # Canonicalize the repository path.\n repos_path = svn.core.svn_path_canonicalize(sys.argv[1])\n\n # Do the real work.\n crawl_youngest(repos_path)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:16782 -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 dictionaries) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:16795 -msgid "The Subversion Python bindings can be used for working copy operations, too. In the previous section of this chapter, we mentioned the libsvn_client interface, and how it exists for the sole purpose of simplifying the process of writing a Subversion client. is a brief example of how that library can be accessed via the SWIG Python bindings to recreate a scaled-down version of the svn status command." -msgstr "" - -#.(title) -#: ../source/book.xml:16805 -msgid "A Python Status Crawler" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:16807 -#, no-wrap -msgid "\n#!/usr/bin/env python\n\n\"\"\"Crawl a working copy directory, printing status information.\"\"\"\n\nimport sys\nimport os.path\nimport getopt\nimport svn.core, svn.client, svn.wc\n\ndef generate_status_code(status):\n \"\"\"Translate a status value into a single-character status code,\n using the same logic as the Subversion command-line client.\"\"\"\n code_map = { svn.wc.svn_wc_status_none : ' ',\n svn.wc.svn_wc_status_normal : ' ',\n svn.wc.svn_wc_status_added : 'A',\n svn.wc.svn_wc_status_missing : '!',\n svn.wc.svn_wc_status_incomplete : '!',\n svn.wc.svn_wc_status_deleted : 'D',\n svn.wc.svn_wc_status_replaced : 'R',\n svn.wc.svn_wc_status_modified : 'M',\n svn.wc.svn_wc_status_merged : 'G',\n svn.wc.svn_wc_status_conflicted : 'C',\n svn.wc.svn_wc_status_obstructed : '~',\n svn.wc.svn_wc_status_ignored : 'I',\n svn.wc.svn_wc_status_external : 'X',\n svn.wc.svn_wc_status_unversioned : '?',\n }\n return code_map.get(status, '?')\n\ndef do_status(wc_path, verbose):\n # Calculate the length of the input working copy path.\n wc_path_len = len(wc_path)\n\n # Build a client context baton.\n ctx = svn.client.svn_client_ctx_t()\n\n def _status_callback(path, status, root_path_len=wc_path_len):\n \"\"\"A callback function for svn_client_status.\"\"\"\n\n # Print the path, minus the bit that overlaps with the root of\n # the status crawl\n text_status = generate_status_code(status.text_status)\n prop_status = generate_status_code(status.prop_status)\n print '%s%s %s' % (text_status, prop_status, path[wc_path_len + 1:])\n \n # Do the status crawl, using _status_callback() as our callback function.\n svn.client.svn_client_status(wc_path, None, _status_callback,\n 1, verbose, 0, 0, ctx)\n\ndef usage_and_exit(errorcode):\n \"\"\"Print usage message, and exit with ERRORCODE.\"\"\"\n stream = errorcode and sys.stderr or sys.stdout\n stream.write(\"\"\"Usage: %s OPTIONS WC-PATH\nOptions:\n --help, -h : Show this usage message\n --verbose, -v : Show all statuses, even uninteresting ones\n\"\"\" % (os.path.basename(sys.argv[0])))\n sys.exit(errorcode)\n \nif __name__ == '__main__':\n # Parse command-line options.\n try:\n opts, args = getopt.getopt(sys.argv[1:], \"hv\", [\"help\", \"verbose\"])\n except getopt.GetoptError:\n usage_and_exit(1)\n verbose = 0\n for opt, arg in opts:\n if opt in (\"-h\", \"--help\"):\n usage_and_exit(0)\n if opt in (\"-v\", \"--verbose\"):\n verbose = 1\n if len(args) != 1:\n usage_and_exit(2)\n \n # Canonicalize the repository path.\n wc_path = svn.core.svn_path_canonicalize(args[0])\n\n # Do the real work.\n try:\n do_status(wc_path, verbose)\n except svn.core.SubversionException, e:\n sys.stderr.write(\"Error (%d): %s\\n\" % (e[1], e[0]))\n sys.exit(1)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:16893 -msgid "As was the case in , this program is pool-free and uses, for the most part, normal Python data types. The call to svn_client_ctx_t() 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 svn_path_canonicalize(), because to not 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." -msgstr "" - -#.(title) -#: ../source/book.xml:16918 -msgid "Subversion Complete Reference" -msgstr "" - -#.(para) -#: ../source/book.xml:16920 -msgid "This chapter is intended to be a complete reference to using Subversion. This includes the command line client (svn) and all its subcommands, as well as the repository administration programs (svnadmin and svnlook) and their respective subcommands." -msgstr "" - -#.(title) -#: ../source/book.xml:16931 -msgid "The Subversion Command Line Client: svn" -msgstr "" - -#.(para) -#: ../source/book.xml:16935 -msgid "Yes, yes, you don't need a subcommand to use the option, but we'll get to that in just a minute." -msgstr "" - -#.(para) -#: ../source/book.xml:16933 -msgid "To use the command line client, you type svn, the subcommand you wish to use , 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 svn status:" -msgstr "" - -#.(screen) -#: ../source/book.xml:16942 -#, no-wrap -msgid "\n$ svn -v status\n$ svn status -v \n$ svn status -v myfile\n" -msgstr "" - -#.(para) -#: ../source/book.xml:16947 -msgid "You can find many more examples of how to use most client commands in and commands for managing properties in ." -msgstr "" - -#.(title) -#: ../source/book.xml:16953 -msgid "svn Options" -msgstr "" - -#.(para) -#: ../source/book.xml:16955 -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, () always means verbose output, regardless of the subcommand you use it with." -msgstr "" - -#.(option) -#: ../source/book.xml:16965 -msgid "--auto-props" -msgstr "" - -#.(para) -#: ../source/book.xml:16968 -msgid "Enables auto-props, overriding the enable-auto-props directive in the config file." -msgstr "" - -#.(term) -#: ../source/book.xml:16974 -msgid " () ARG" -msgstr "" - -#.(para) -#: ../source/book.xml:16977 -msgid "Used as a means to refer to a specific change (aka a revision), this option is syntactic sugar for -r ARG-1:ARG." -msgstr "" - -#.(option) -#: ../source/book.xml:16984 ../source/book.xml:23152 -msgid "--config-dir" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:16985 ../source/book.xml:21349 ../source/book.xml:23153 -msgid "DIR" -msgstr "" - -#.(para) -#: ../source/book.xml:16988 ../source/book.xml:23156 -msgid "Instructs Subversion to read configuration information from the specified directory instead of the default location (.subversion in the user's home directory)." -msgstr "" - -#.(option) -#: ../source/book.xml:16996 -msgid "--diff-cmd" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:16997 ../source/book.xml:17015 ../source/book.xml:17034 -msgid "CMD" -msgstr "" - -#.(para) -#: ../source/book.xml:17000 -msgid "Specifies an external program to use to show differences between files. When svn diff 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 . You can pass options to the diff program with the option (more on that later in this section)." -msgstr "" - -#.(option) -#: ../source/book.xml:17014 -msgid "--diff3-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:17018 -msgid "Specifies an external program to use to merge files." -msgstr "" - -#.(option) -#: ../source/book.xml:17023 -msgid "--dry-run" -msgstr "" - -#.(para) -#: ../source/book.xml:17026 -msgid "Goes through all the motions of running a command, but makes no actual changes—either on disk or in the repository." -msgstr "" - -#.(option) -#: ../source/book.xml:17033 -msgid "--editor-cmd" -msgstr "" - -#.(para) -#: ../source/book.xml:17037 -msgid "Specifies an external program to use to edit a log message or a property value. See the editor-cmd section in for ways to specify a default editor." -msgstr "" - -#.(option) -#: ../source/book.xml:17045 -msgid "--encoding" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17046 -msgid "ENC" -msgstr "" - -#.(para) -#: ../source/book.xml:17049 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:17057 -msgid " () ARGS" -msgstr "" - -#.(para) -#: ../source/book.xml:17060 -msgid "Specifies an argument or arguments that Subversion should pass to an external diff command. This option is valid only when used with the svn diff or svn merge commands, with the option. If you wish to pass multiple arguments, you must enclose all of them in quotes (for example, svn diff --diff-cmd /usr/bin/diff -x \"-b -E\")." -msgstr "" - -#.(term) -#: ../source/book.xml:17073 -msgid " () FILENAME" -msgstr "" - -#.(para) -#: ../source/book.xml:17077 -msgid "Uses the contents of the named file for the specified subcommand, though different subcommands do different things with this content. For example, svn commit uses the content as a commit log, whereas svn propset uses it as a property value." -msgstr "" - -#.(option) -#: ../source/book.xml:17087 -msgid "--force" -msgstr "" - -#.(para) -#: ../source/book.xml:17090 -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 I know what I'm doing as well as the possible repercussions of doing it, so let me at 'em. 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." -msgstr "" - -#.(option) -#: ../source/book.xml:17103 -msgid "--force-log" -msgstr "" - -#.(para) -#: ../source/book.xml:17106 -msgid "Forces a suspicious parameter passed to the () or () 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, 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 to subcommands that accept log messages." -msgstr "" - -#.(term) -#: ../source/book.xml:17124 -msgid " ( or )" -msgstr "" - -#.(para) -#: ../source/book.xml:17128 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:17135 -msgid "--ignore-ancestry" -msgstr "" - -#.(para) -#: ../source/book.xml:17138 -msgid "Tells Subversion to ignore ancestry when calculating differences (rely on path contents alone)." -msgstr "" - -#.(option) -#: ../source/book.xml:17144 -msgid "--ignore-externals" -msgstr "" - -#.(para) -#: ../source/book.xml:17147 -msgid "Tells Subversion to ignore external definitions and the external working copies managed by them." -msgstr "" - -#.(option) -#: ../source/book.xml:17153 ../source/book.xml:21338 -msgid "--incremental" -msgstr "" - -#.(para) -#: ../source/book.xml:17156 -msgid "Prints output in a format suitable for concatenation." -msgstr "" - -#.(option) -#: ../source/book.xml:17162 -msgid "--limit" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17163 -msgid "NUM" -msgstr "" - -#.(para) -#: ../source/book.xml:17166 -msgid "Show only the first NUM log messages." -msgstr "" - -#.(term) -#: ../source/book.xml:17171 -msgid " () MESSAGE" -msgstr "" - -#.(para) -#: ../source/book.xml:17175 -msgid "Indicates that you will specify a either a log message or a lock comment on the command line, following this option. For example:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17178 -#, no-wrap -msgid "\n$ svn commit -m \"They don't make Sunday.\"\n" -msgstr "" - -#.(option) -#: ../source/book.xml:17185 -msgid "--new" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17186 ../source/book.xml:17283 -msgid "ARG" -msgstr "" - -#.(para) -#: ../source/book.xml:17189 -msgid "Uses ARG as the newer target (for use with svn diff)." -msgstr "" - -#.(option) -#: ../source/book.xml:17195 ../source/book.xml:23164 -msgid "--no-auth-cache" -msgstr "" - -#.(para) -#: ../source/book.xml:17198 ../source/book.xml:23167 -msgid "Prevents caching of authentication information (e.g. username and password) in the Subversion administrative directories." -msgstr "" - -#.(option) -#: ../source/book.xml:17205 -msgid "--no-auto-props" -msgstr "" - -#.(para) -#: ../source/book.xml:17208 -msgid "Disables auto-props, overriding the enable-auto-props directive in the config file." -msgstr "" - -#.(option) -#: ../source/book.xml:17215 ../source/book.xml:22223 -msgid "--no-diff-deleted" -msgstr "" - -#.(para) -#: ../source/book.xml:17218 -msgid "Prevents Subversion from printing differences for deleted files. The default behavior when you remove a file is for svn diff to print the same differences that you would see if you had left the file but removed all the content." -msgstr "" - -#.(option) -#: ../source/book.xml:17227 -msgid "--no-ignore" -msgstr "" - -#.(para) -#: ../source/book.xml:17230 -msgid "Shows files in the status listing that would normally be omitted since they match a pattern in the global-ignores configuration option or the svn:ignore property. See and for more information." -msgstr "" - -#.(option) -#: ../source/book.xml:17239 -msgid "--no-unlock" -msgstr "" - -#.(para) -#: ../source/book.xml:17242 -msgid "Don't automatically unlock files (the default commit behavior is to unlock all files listed as part of the commit). See for more information." -msgstr "" - -#.(option) -#: ../source/book.xml:17250 ../source/book.xml:23174 -msgid "--non-interactive" -msgstr "" - -#.(para) -#: ../source/book.xml:17253 ../source/book.xml:23177 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:17262 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:17264 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:17273 -msgid "--notice-ancestry" -msgstr "" - -#.(para) -#: ../source/book.xml:17276 -msgid "Pay attention to ancestry when calculating differences." -msgstr "" - -#.(option) -#: ../source/book.xml:17282 -msgid "--old" -msgstr "" - -#.(para) -#: ../source/book.xml:17286 -msgid "Uses ARG as the older target (for use with svn diff)." -msgstr "" - -#.(option) -#: ../source/book.xml:17292 ../source/book.xml:23187 -msgid "--password" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17293 ../source/book.xml:23188 -msgid "PASS" -msgstr "" - -#.(para) -#: ../source/book.xml:17296 ../source/book.xml:23191 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:17303 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:17305 -msgid "Requests that the client print only essential information while performing an operation." -msgstr "" - -#.(term) -#: ../source/book.xml:17310 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:17312 -msgid "Makes a subcommand recurse into subdirectories. Most subcommands recurse by default." -msgstr "" - -#.(option) -#: ../source/book.xml:17318 -msgid "--relocate" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17319 -msgid "FROM TO [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:17323 -msgid "Used with the svn switch 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 svn switch for an example." -msgstr "" - -#.(term) -#: ../source/book.xml:17333 -msgid " () REV" -msgstr "" - -#.(para) -#: ../source/book.xml:17337 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17344 -#, no-wrap -msgid "\n$ svn log -r 1729\n$ svn log -r 1729:HEAD\n$ svn log -r 1729:1744\n$ svn log -r {2001-12-04}:{2002-02-17}\n$ svn log -r 1729:{2002-02-17}\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17351 -msgid "See for more information." -msgstr "" - -#.(option) -#: ../source/book.xml:17357 ../source/book.xml:22255 -msgid "--revprop" -msgstr "" - -#.(para) -#: ../source/book.xml:17360 ../source/book.xml:22258 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:17368 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:17370 -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 svn update." -msgstr "" - -#.(option) -#: ../source/book.xml:17380 -msgid "--stop-on-copy" -msgstr "" - -#.(para) -#: ../source/book.xml:17383 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:17393 -msgid "--strict" -msgstr "" - -#.(para) -#: ../source/book.xml:17396 -msgid "Causes Subversion to use strict semantics, a notion which is rather vague unless talking about specific subcommands (namely, svn propget)." -msgstr "" - -#.(option) -#: ../source/book.xml:17403 -msgid "--targets" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17404 -msgid "FILENAME" -msgstr "" - -#.(para) -#: ../source/book.xml:17407 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:17415 ../source/book.xml:23199 -msgid "--username" -msgstr "" - -#.(replaceable) -#: ../source/book.xml:17416 ../source/book.xml:23200 -msgid "NAME" -msgstr "" - -#.(para) -#: ../source/book.xml:17419 ../source/book.xml:23203 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:17426 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:17428 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:17437 ../source/book.xml:23519 ../source/book.xml:23666 -msgid "--version" -msgstr "" - -#.(para) -#: ../source/book.xml:17440 -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 () it prints only the version number in a compact form." -msgstr "" - -#.(option) -#: ../source/book.xml:17451 -msgid "--xml" -msgstr "" - -#.(para) -#: ../source/book.xml:17454 -msgid "Prints output in XML format." -msgstr "" - -#.(title) -#: ../source/book.xml:17462 -msgid "svn Subcommands" -msgstr "" - -#.(para) -#: ../source/book.xml:17464 ../source/book.xml:23216 -msgid "Here are the various subcommands:" -msgstr "" - -#.(secondary) -#: ../source/book.xml:17468 ../source/book.xml:17571 ../source/book.xml:17675 ../source/book.xml:17760 ../source/book.xml:17891 ../source/book.xml:17967 ../source/book.xml:18095 ../source/book.xml:18274 ../source/book.xml:18384 ../source/book.xml:18637 ../source/book.xml:18749 ../source/book.xml:18802 ../source/book.xml:18906 ../source/book.xml:19107 ../source/book.xml:19225 ../source/book.xml:19319 ../source/book.xml:19543 ../source/book.xml:19665 ../source/book.xml:19750 ../source/book.xml:19870 ../source/book.xml:19949 ../source/book.xml:20028 ../source/book.xml:20109 ../source/book.xml:20197 ../source/book.xml:20322 ../source/book.xml:20411 ../source/book.xml:20517 ../source/book.xml:20862 ../source/book.xml:21024 ../source/book.xml:21111 ../source/book.xml:21405 ../source/book.xml:21473 ../source/book.xml:21512 ../source/book.xml:21615 ../source/book.xml:21648 ../source/book.xml:21694 ../source/book.xml:21726 ../source/book.xml:21772 ../source/book.xml:21835 ../source/book.xml:21881 ../source/book.xml:21919 ../source/book.xml:21996 ../source/book.xml:22040 ../source/book.xml:22088 ../source/book.xml:22145 ../source/book.xml:22292 ../source/book.xml:22336 ../source/book.xml:22391 ../source/book.xml:22481 ../source/book.xml:22525 ../source/book.xml:22594 ../source/book.xml:22639 ../source/book.xml:22671 ../source/book.xml:22734 ../source/book.xml:22782 ../source/book.xml:22831 ../source/book.xml:22875 ../source/book.xml:22928 ../source/book.xml:22990 ../source/book.xml:23043 ../source/book.xml:23081 ../source/book.xml:23220 ../source/book.xml:23286 ../source/book.xml:23357 -msgid "subcommands" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17469 -msgid "add" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17473 -msgid "Add files, directories, or symbolic links." -msgstr "" - -#.(title) -#: ../source/book.xml:17477 ../source/book.xml:17581 ../source/book.xml:17685 ../source/book.xml:17769 ../source/book.xml:17900 ../source/book.xml:17976 ../source/book.xml:18105 ../source/book.xml:18284 ../source/book.xml:18393 ../source/book.xml:18646 ../source/book.xml:18758 ../source/book.xml:18812 ../source/book.xml:18916 ../source/book.xml:19116 ../source/book.xml:19236 ../source/book.xml:19328 ../source/book.xml:19553 ../source/book.xml:19674 ../source/book.xml:19759 ../source/book.xml:19879 ../source/book.xml:19959 ../source/book.xml:20037 ../source/book.xml:20118 ../source/book.xml:20206 ../source/book.xml:20332 ../source/book.xml:20420 ../source/book.xml:20526 ../source/book.xml:20871 ../source/book.xml:21033 ../source/book.xml:21120 ../source/book.xml:21414 ../source/book.xml:21482 ../source/book.xml:21521 ../source/book.xml:21624 ../source/book.xml:21657 ../source/book.xml:21706 ../source/book.xml:21737 ../source/book.xml:21783 ../source/book.xml:21844 ../source/book.xml:21890 ../source/book.xml:21932 ../source/book.xml:22006 ../source/book.xml:22049 ../source/book.xml:22097 ../source/book.xml:22154 ../source/book.xml:22301 ../source/book.xml:22345 ../source/book.xml:22400 ../source/book.xml:22490 ../source/book.xml:22534 ../source/book.xml:22603 ../source/book.xml:22648 ../source/book.xml:22682 ../source/book.xml:22744 ../source/book.xml:22792 ../source/book.xml:22841 ../source/book.xml:22885 ../source/book.xml:22938 ../source/book.xml:22999 ../source/book.xml:23053 ../source/book.xml:23090 ../source/book.xml:23231 ../source/book.xml:23296 ../source/book.xml:23367 ../source/book.xml:23611 -msgid "Synopsis" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17479 -#, no-wrap -msgid "svn add PATH..." -msgstr "" - -#.(title), (entry) -#: ../source/book.xml:17483 ../source/book.xml:17587 ../source/book.xml:17691 ../source/book.xml:17775 ../source/book.xml:17906 ../source/book.xml:17982 ../source/book.xml:18111 ../source/book.xml:18291 ../source/book.xml:18401 ../source/book.xml:18653 ../source/book.xml:18764 ../source/book.xml:18818 ../source/book.xml:18922 ../source/book.xml:19122 ../source/book.xml:19242 ../source/book.xml:19336 ../source/book.xml:19561 ../source/book.xml:19681 ../source/book.xml:19765 ../source/book.xml:19886 ../source/book.xml:19966 ../source/book.xml:20044 ../source/book.xml:20125 ../source/book.xml:20213 ../source/book.xml:20338 ../source/book.xml:20426 ../source/book.xml:20532 ../source/book.xml:20878 ../source/book.xml:21039 ../source/book.xml:21126 ../source/book.xml:21420 ../source/book.xml:21488 ../source/book.xml:21527 ../source/book.xml:21630 ../source/book.xml:21663 ../source/book.xml:21712 ../source/book.xml:21743 ../source/book.xml:21789 ../source/book.xml:21850 ../source/book.xml:21896 ../source/book.xml:21938 ../source/book.xml:22012 ../source/book.xml:22055 ../source/book.xml:22103 ../source/book.xml:22160 ../source/book.xml:22307 ../source/book.xml:22351 ../source/book.xml:22406 ../source/book.xml:22496 ../source/book.xml:22540 ../source/book.xml:22609 ../source/book.xml:22654 ../source/book.xml:22688 ../source/book.xml:22750 ../source/book.xml:22798 ../source/book.xml:22847 ../source/book.xml:22891 ../source/book.xml:22944 ../source/book.xml:23005 ../source/book.xml:23059 ../source/book.xml:23096 ../source/book.xml:23237 ../source/book.xml:23302 ../source/book.xml:23373 ../source/book.xml:23617 ../source/book.xml:23747 ../source/book.xml:24046 ../source/book.xml:24093 ../source/book.xml:24142 ../source/book.xml:24189 ../source/book.xml:24252 ../source/book.xml:24313 ../source/book.xml:24364 ../source/book.xml:24410 ../source/book.xml:24463 ../source/book.xml:25476 -msgid "Description" -msgstr "" - -#.(para) -#: ../source/book.xml:17485 -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 svn revert." -msgstr "" - -#.(title) -#: ../source/book.xml:17495 ../source/book.xml:17596 ../source/book.xml:17699 ../source/book.xml:17787 ../source/book.xml:17924 ../source/book.xml:18007 ../source/book.xml:18162 ../source/book.xml:18306 ../source/book.xml:18507 ../source/book.xml:18672 ../source/book.xml:18771 ../source/book.xml:18830 ../source/book.xml:19008 ../source/book.xml:19163 ../source/book.xml:19253 ../source/book.xml:19365 ../source/book.xml:19595 ../source/book.xml:19695 ../source/book.xml:19801 ../source/book.xml:19897 ../source/book.xml:19977 ../source/book.xml:20055 ../source/book.xml:20136 ../source/book.xml:20231 ../source/book.xml:20351 ../source/book.xml:20439 ../source/book.xml:20775 ../source/book.xml:20898 ../source/book.xml:21051 ../source/book.xml:21178 ../source/book.xml:21640 ../source/book.xml:22663 ../source/book.xml:22898 ../source/book.xml:22951 ../source/book.xml:23255 ../source/book.xml:23316 ../source/book.xml:23386 -msgid "Alternate Names" -msgstr "" - -#.(para) -#: ../source/book.xml:17497 ../source/book.xml:17701 ../source/book.xml:17926 ../source/book.xml:18674 ../source/book.xml:18832 ../source/book.xml:19010 ../source/book.xml:19255 ../source/book.xml:19367 ../source/book.xml:19597 ../source/book.xml:19697 ../source/book.xml:20353 ../source/book.xml:20441 ../source/book.xml:21053 ../source/book.xml:21858 ../source/book.xml:22020 ../source/book.xml:22809 ../source/book.xml:23257 -msgid "None" -msgstr "" - -#.(title) -#: ../source/book.xml:17501 ../source/book.xml:17602 ../source/book.xml:17705 ../source/book.xml:17793 ../source/book.xml:17930 ../source/book.xml:18015 ../source/book.xml:18168 ../source/book.xml:18312 ../source/book.xml:18513 ../source/book.xml:18678 ../source/book.xml:18780 ../source/book.xml:18836 ../source/book.xml:19014 ../source/book.xml:19169 ../source/book.xml:19259 ../source/book.xml:19371 ../source/book.xml:19601 ../source/book.xml:19701 ../source/book.xml:19807 ../source/book.xml:19903 ../source/book.xml:19983 ../source/book.xml:20061 ../source/book.xml:20142 ../source/book.xml:20237 ../source/book.xml:20357 ../source/book.xml:20445 ../source/book.xml:20781 ../source/book.xml:20904 ../source/book.xml:21057 ../source/book.xml:21184 -msgid "Changes" -msgstr "" - -#.(para) -#: ../source/book.xml:17503 -msgid "Working Copy" -msgstr "" - -#.(title) -#: ../source/book.xml:17507 ../source/book.xml:17608 ../source/book.xml:17711 ../source/book.xml:17799 ../source/book.xml:17936 ../source/book.xml:18021 ../source/book.xml:18175 ../source/book.xml:18319 ../source/book.xml:18519 ../source/book.xml:18684 ../source/book.xml:18786 ../source/book.xml:18842 ../source/book.xml:19020 ../source/book.xml:19175 ../source/book.xml:19265 ../source/book.xml:19377 ../source/book.xml:19607 ../source/book.xml:19707 ../source/book.xml:19813 ../source/book.xml:19909 ../source/book.xml:19989 ../source/book.xml:20067 ../source/book.xml:20148 ../source/book.xml:20243 ../source/book.xml:20363 ../source/book.xml:20451 ../source/book.xml:20787 ../source/book.xml:20910 ../source/book.xml:21063 ../source/book.xml:21190 -msgid "Accesses Repository" -msgstr "" - -#.(para) -#: ../source/book.xml:17509 ../source/book.xml:17938 ../source/book.xml:18788 ../source/book.xml:20365 ../source/book.xml:20453 -msgid "No" -msgstr "" - -#.(title) -#: ../source/book.xml:17513 ../source/book.xml:17614 ../source/book.xml:17717 ../source/book.xml:17805 ../source/book.xml:17942 ../source/book.xml:18027 ../source/book.xml:18182 ../source/book.xml:18325 ../source/book.xml:18526 ../source/book.xml:18690 ../source/book.xml:18792 ../source/book.xml:18848 ../source/book.xml:19026 ../source/book.xml:19181 ../source/book.xml:19271 ../source/book.xml:19383 ../source/book.xml:19613 ../source/book.xml:19713 ../source/book.xml:19819 ../source/book.xml:19915 ../source/book.xml:19995 ../source/book.xml:20073 ../source/book.xml:20154 ../source/book.xml:20249 ../source/book.xml:20369 ../source/book.xml:20457 ../source/book.xml:20793 ../source/book.xml:20916 ../source/book.xml:21069 ../source/book.xml:21196 ../source/book.xml:21443 ../source/book.xml:21501 ../source/book.xml:21576 ../source/book.xml:21677 ../source/book.xml:21797 ../source/book.xml:21856 ../source/book.xml:21945 ../source/book.xml:22018 ../source/book.xml:22062 ../source/book.xml:22122 ../source/book.xml:22314 ../source/book.xml:22357 ../source/book.xml:22450 ../source/book.xml:22503 ../source/book.xml:22547 ../source/book.xml:22617 ../source/book.xml:22696 ../source/book.xml:22757 ../source/book.xml:22807 ../source/book.xml:22853 ../source/book.xml:22904 ../source/book.xml:22957 ../source/book.xml:23014 ../source/book.xml:23261 ../source/book.xml:23322 ../source/book.xml:23392 ../source/book.xml:23639 -msgid "Options" -msgstr "" - -#.(screen) -#: ../source/book.xml:17515 -#, no-wrap -msgid "\n--targets FILENAME\n--non-recursive (-N)\n--quiet (-q)\n--config-dir DIR\n--no-ignore\n--auto-props\n--no-auto-props\n--force\n" -msgstr "" - -#.(title) -#: ../source/book.xml:17528 ../source/book.xml:17654 ../source/book.xml:17730 ../source/book.xml:17821 ../source/book.xml:17951 ../source/book.xml:18047 ../source/book.xml:18201 ../source/book.xml:18345 ../source/book.xml:18550 ../source/book.xml:18708 ../source/book.xml:18870 ../source/book.xml:19043 ../source/book.xml:19198 ../source/book.xml:19289 ../source/book.xml:19403 ../source/book.xml:19634 ../source/book.xml:19731 ../source/book.xml:19839 ../source/book.xml:19931 ../source/book.xml:20011 ../source/book.xml:20089 ../source/book.xml:20171 ../source/book.xml:20269 ../source/book.xml:20380 ../source/book.xml:20468 ../source/book.xml:20811 ../source/book.xml:20933 ../source/book.xml:21083 ../source/book.xml:21215 ../source/book.xml:21454 ../source/book.xml:21587 ../source/book.xml:21755 ../source/book.xml:21905 ../source/book.xml:21953 ../source/book.xml:22070 ../source/book.xml:22131 ../source/book.xml:22176 ../source/book.xml:22323 ../source/book.xml:22366 ../source/book.xml:22459 ../source/book.xml:22512 ../source/book.xml:22558 ../source/book.xml:22626 ../source/book.xml:22705 ../source/book.xml:22766 ../source/book.xml:22813 ../source/book.xml:22862 ../source/book.xml:22914 ../source/book.xml:22968 ../source/book.xml:23024 ../source/book.xml:23070 ../source/book.xml:23102 ../source/book.xml:23273 ../source/book.xml:23334 ../source/book.xml:23404 ../source/book.xml:23677 -msgid "Examples" -msgstr "" - -#.(para) -#: ../source/book.xml:17530 -msgid "To add a file to your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17531 -#, no-wrap -msgid "\n$ svn add foo.c \nA foo.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17535 -msgid "When adding a directory, the default behavior of svn add is to recurse:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17537 -#, no-wrap -msgid "\n$ svn add testdir\nA testdir\nA testdir/a\nA testdir/b\nA testdir/c\nA testdir/d\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17545 -msgid "You can add a directory without adding its contents:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17547 -#, no-wrap -msgid "\n$ svn add --non-recursive otherdir\nA otherdir\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17551 -msgid "Normally, the command svn add * 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 makes svn add recurse into versioned directories:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17559 -#, no-wrap -msgid "\n$ svn add * --force\nA foo.c\nA somedir/bar.c\nA otherdir/docs/baz.doc\n…\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17572 -msgid "blame" -msgstr "" - -#.(refname) -#: ../source/book.xml:17575 -msgid "svn blame" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17576 -msgid "Show author and revision information in-line for the specified files or URLs." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17583 -#, no-wrap -msgid "svn blame TARGET[@REV]..." -msgstr "" - -#.(para) -#: ../source/book.xml:17589 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:17598 -msgid "praise, annotate, ann" -msgstr "" - -#.(para) -#: ../source/book.xml:17604 ../source/book.xml:17707 ../source/book.xml:18515 ../source/book.xml:18782 ../source/book.xml:19016 ../source/book.xml:19171 ../source/book.xml:19373 ../source/book.xml:20783 -msgid "Nothing" -msgstr "" - -#.(para) -#: ../source/book.xml:17610 ../source/book.xml:17713 ../source/book.xml:17801 ../source/book.xml:18023 ../source/book.xml:18844 ../source/book.xml:19177 ../source/book.xml:19267 ../source/book.xml:19379 ../source/book.xml:20912 ../source/book.xml:21065 ../source/book.xml:21192 -msgid "Yes" -msgstr "" - -#.(screen) -#: ../source/book.xml:17616 -#, no-wrap -msgid "\n--revision (-r) ARG\n--verbose (-v)\n--incremental\n--xml\n--extensions (-x) ARG\n--force\n--username ARG\n--password ARG\n--no-auth-cache\n--non-interactive\n--config-dir ARG\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17656 -msgid "If you want to see blame annotated source for readme.txt in your test repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17659 -#, no-wrap -msgid "\n$ svn blame http://svn.red-bean.com/repos/test/readme.txt\n 3 sally This is a README file.\n 5 harry You should read this.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17664 -msgid "Even if svn blame 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 context of the line—he may have just adjusted the whitespace." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17676 ../source/book.xml:22337 -msgid "cat" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17680 -msgid "Output the contents of the specified files or URLs." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17687 -#, no-wrap -msgid "svn cat TARGET[@REV]..." -msgstr "" - -#.(para) -#: ../source/book.xml:17693 -msgid "Output the contents of the specified files or URLs. For listing the contents of directories, see svn list." -msgstr "" - -#.(screen) -#: ../source/book.xml:17719 -#, no-wrap -msgid "\n--revision (-r) REV\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17732 -msgid "If you want to view readme.txt in your repository without checking it out:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17734 -#, no-wrap -msgid "\n$ svn cat http://svn.red-bean.com/repos/test/readme.txt\nThis is a README file.\nYou should read this.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17740 -msgid "If your working copy is out of date (or you have local modifications) and you want to see the HEAD revision of a file in your working copy, svn cat -r HEAD will automatically fetch the HEAD revision when you give it a path:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17747 -#, no-wrap -msgid "\n$ cat foo.c\nThis file is in my local working copy \nand has changes that I've made.\n\n$ svn cat -r HEAD foo.c\nLatest revision fresh from the repository!\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17761 -msgid "checkout" -msgstr "" - -#.(refname) -#: ../source/book.xml:17764 -msgid "svn checkout" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17765 -msgid "Check out a working copy from a repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17771 -#, no-wrap -msgid "svn checkout URL[@REV]... [PATH]" -msgstr "" - -#.(para) -#: ../source/book.xml:17777 -msgid "Check out a working copy from a repository. If PATH 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 PATH, with the name of the subdirectory being the basename of the URL." -msgstr "" - -#.(para) -#: ../source/book.xml:17789 -msgid "co" -msgstr "" - -#.(para) -#: ../source/book.xml:17795 -msgid "Creates a working copy." -msgstr "" - -#.(screen) -#: ../source/book.xml:17807 -#, no-wrap -msgid "\n--revision (-r) REV\n--quiet (-q)\n--non-recursive (-N)\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--ignore-externals\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17823 -msgid "Check out a working copy into a directory called mine:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17825 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos/test mine\nA mine/a\nA mine/b\nChecked out revision 2.\n$ ls\nmine\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17833 -msgid "Check out two different directories into two separate working copies:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17835 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz\nA test/a\nA test/b\nChecked out revision 2.\nA quiz/l\nA quiz/m\nChecked out revision 2.\n$ ls\nquiz test\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17846 -msgid "Check out two different directories into two separate working copies, but place both into a directory called working-copies:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17849 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz working-copies\nA working-copies/test/a\nA working-copies/test/b\nChecked out revision 2.\nA working-copies/quiz/l\nA working-copies/quiz/m\nChecked out revision 2.\n$ ls\nworking-copies\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17860 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:17865 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos/test test\nA test/a\nA test/b\n^C\nsvn: The operation was interrupted\nsvn: caught SIGINT\n\n$ svn checkout file:///var/svn/repos/test test\nA test/c\nA test/d\n^C\nsvn: The operation was interrupted\nsvn: caught SIGINT\n\n$ cd test\n$ svn update\nA test/e\nA test/f\nUpdated to revision 3.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17892 -msgid "cleanup" -msgstr "" - -#.(refname) -#: ../source/book.xml:17895 -msgid "svn cleanup" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17896 -msgid "Recursively clean up the working copy." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17902 -#, no-wrap -msgid "svn cleanup [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:17908 -msgid "Recursively clean up the working copy, removing working copy locks and resuming unfinished operations. If you ever get a working copy locked error, run this command to remove stale locks and get your working copy into a usable state again." -msgstr "" - -#.(para) -#: ../source/book.xml:17913 -msgid "If, for some reason, an svn update fails due to a problem running an external diff program (e.g. user input or network failure), pass the to allow cleanup to complete any merging with your external diff program. You can also specify any configuration directory with the option, but you should need these options extremely infrequently." -msgstr "" - -#.(para) -#: ../source/book.xml:17932 ../source/book.xml:19603 ../source/book.xml:20359 ../source/book.xml:20447 ../source/book.xml:20906 ../source/book.xml:21186 -msgid "Working copy" -msgstr "" - -#.(screen) -#: ../source/book.xml:17944 -#, no-wrap -msgid "\n--diff3-cmd CMD\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:17953 -msgid "Well, there's not much to the examples here as svn cleanup generates no output. If you pass no PATH, . is used." -msgstr "" - -#.(screen) -#: ../source/book.xml:17957 -#, no-wrap -msgid "\n$ svn cleanup\n\n$ svn cleanup /var/svn/working-copy\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:17968 -msgid "commit" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:17972 -msgid "Send changes from your working copy to the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:17978 -#, no-wrap -msgid "svn commit [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:17984 -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 or option, svn will launch your editor for you to compose a commit message. See the editor-cmd section in ." -msgstr "" - -#.(para) -#: ../source/book.xml:17991 -msgid "svn commit will send any lock tokens that it finds and will release locks on all PATHS committed (recursively), unless is passed." -msgstr "" - -#.(para) -#: ../source/book.xml:17996 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:18009 -msgid "ci (short for check in; not co, which is short for checkout)" -msgstr "" - -#.(para) -#: ../source/book.xml:18017 -msgid "Working copy, repository" -msgstr "" - -#.(screen) -#: ../source/book.xml:18029 -#, no-wrap -msgid "\n--message (-m) TEXT\n--file (-F) FILE\n--quiet (-q)\n--no-unlock\n--non-recursive (-N)\n--targets FILENAME\n--force-log\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--encoding ENC\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18049 -msgid "Commit a simple modification to a file with the commit message on the command line and an implicit target of your current directory (.):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18053 -#, no-wrap -msgid "\n$ svn commit -m \"added howto section.\"\nSending a\nTransmitting file data .\nCommitted revision 3.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18059 -msgid "Commit a modification to the file foo.c (explicitly specified on the command line) with the commit message in a file named msg:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18063 -#, no-wrap -msgid "\n$ svn commit -F msg foo.c\nSending foo.c\nTransmitting file data .\nCommitted revision 5.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18069 -msgid "If you want to use a file that's under version control for your commit message with , you need to pass the option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18073 -#, no-wrap -msgid "\n$ svn commit --file file_under_vc.txt foo.c\nsvn: The log message file is under version control\nsvn: Log message file is a versioned file; use '--force-log' to override\n\n$ svn commit --force-log --file file_under_vc.txt foo.c\nSending foo.c\nTransmitting file data .\nCommitted revision 6.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18083 -msgid "To commit a file scheduled for deletion:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18084 -#, no-wrap -msgid "\n$ svn commit -m \"removed file 'c'.\"\nDeleting c\n\nCommitted revision 7.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18096 -msgid "copy" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18100 -msgid "Copy a file or directory in a working copy or in the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18107 -#, no-wrap -msgid "svn copy SRC[@REV]... DST" -msgstr "" - -#.(para) -#: ../source/book.xml:18113 -msgid "Copy one or more files in a working copy or in the repository. SRC and DST can each be either a working copy (WC) path or URL:" -msgstr "" - -#.(term) -#: ../source/book.xml:18119 ../source/book.xml:19785 -msgid "WC -> WC" -msgstr "" - -#.(para) -#: ../source/book.xml:18121 -msgid "Copy and schedule an item for addition (with history)." -msgstr "" - -#.(term) -#: ../source/book.xml:18126 -msgid "WC -> URL" -msgstr "" - -#.(para) -#: ../source/book.xml:18128 -msgid "Immediately commit a copy of WC to URL." -msgstr "" - -#.(term) -#: ../source/book.xml:18132 -msgid "URL -> WC" -msgstr "" - -#.(para) -#: ../source/book.xml:18134 -msgid "Check out URL into WC, and schedule it for addition." -msgstr "" - -#.(term) -#: ../source/book.xml:18139 ../source/book.xml:19792 -msgid "URL -> URL" -msgstr "" - -#.(para) -#: ../source/book.xml:18141 -msgid "Complete server-side copy. This is usually used to branch and tag." -msgstr "" - -#.(para) -#: ../source/book.xml:18146 -msgid "When copying multiple sources, they will be added as children of DST, which must be a directory." -msgstr "" - -#.(para) -#: ../source/book.xml:18149 -msgid "If no peg revision (ie @REV) is supplied, by default the BASE revision will be used for files copied from the working copy, while the HEAD revision will be used for files copied from a URL." -msgstr "" - -#.(para) -#: ../source/book.xml:18156 -msgid "You can only copy files within a single repository. Subversion does not support cross-repository copying." -msgstr "" - -#.(para) -#: ../source/book.xml:18164 -msgid "cp" -msgstr "" - -#.(para) -#: ../source/book.xml:18170 -msgid "Repository if destination is a URL." -msgstr "" - -#.(para) -#: ../source/book.xml:18171 -msgid "Working copy if destination is a WC path." -msgstr "" - -#.(para) -#: ../source/book.xml:18177 -msgid "If source or destination is in the repository, or if needed to look up the source revision number." -msgstr "" - -#.(screen) -#: ../source/book.xml:18184 -#, no-wrap -msgid "\n--message (-m) TEXT\n--file (-F) FILE\n--revision (-r) REV\n--quiet (-q)\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--force-log\n--editor-cmd EDITOR\n--encoding ENC\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18203 -msgid "Copy an item within your working copy (just schedules the copy—nothing goes into the repository until you commit):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18206 -#, no-wrap -msgid "\n$ svn copy foo.txt bar.txt\nA bar.txt\n$ svn status\nA + bar.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18212 -msgid "Copy several files in a working copy into a subdirectory:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18214 -#, no-wrap -msgid "\n$ svn cp bat.c baz.c qux.c src\nA src/bat.c\nA src/baz.c\nA src/qux.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18220 -msgid "Copy revision 8 of bat.c into your working copy under a different name:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18222 -#, no-wrap -msgid "\n$ svn cp bat.c ya-old-bat.c\nA ya-old-bat.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18226 -msgid "Copy an item in your working copy to a URL in the repository (an immediate commit, so you must supply a commit message):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18229 -#, no-wrap -msgid "\n$ svn copy near.txt file:///var/svn/repos/test/far-away.txt -m \"Remote copy.\"\n\nCommitted revision 8.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18234 -msgid "Copy an item from the repository to your working copy (just schedules the copy—nothing goes into the repository until you commit):" -msgstr "" - -#.(para) -#: ../source/book.xml:18238 -msgid "This is the recommended way to resurrect a dead file in your repository!" -msgstr "" - -#.(screen) -#: ../source/book.xml:18241 -#, no-wrap -msgid "\n$ svn copy file:///var/svn/repos/test/far-away near-here\nA near-here\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18245 -msgid "And finally, copying between two URLs:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18246 -#, no-wrap -msgid "\n$ svn copy file:///var/svn/repos/test/far-away file:///var/svn/repos/test/over-there -m \"remote copy.\"\n\nCommitted revision 9.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18252 -msgid "This is the easiest way to tag a revision in your repository—just svn copy that revision (usually HEAD) into your tags directory." -msgstr "" - -#.(screen) -#: ../source/book.xml:18257 -#, no-wrap -msgid "\n$ svn copy file:///var/svn/repos/test/trunk file:///var/svn/repos/test/tags/0.6.32-prerelease -m \"tag tree\"\n\nCommitted revision 12.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18262 -msgid "And don't worry if you forgot to tag—you can always specify an older revision and tag anytime:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18264 -#, no-wrap -msgid "\n$ 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\nCommitted revision 13.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18275 -msgid "delete" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18279 -msgid "Delete an item from a working copy or the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18286 -#, no-wrap -msgid "svn delete PATH..." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18287 -#, no-wrap -msgid "svn delete URL..." -msgstr "" - -#.(para) -#: ../source/book.xml:18293 -msgid "Items specified by PATH 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 to override this behavior." -msgstr "" - -#.(para) -#: ../source/book.xml:18300 -msgid "Items specified by URL are deleted from the repository via an immediate commit. Multiple URLs are committed atomically." -msgstr "" - -#.(para) -#: ../source/book.xml:18308 -msgid "del, remove, rm" -msgstr "" - -#.(para) -#: ../source/book.xml:18314 -msgid "Working copy if operating on files, repository if operating on URLs" -msgstr "" - -#.(para) -#: ../source/book.xml:18321 ../source/book.xml:19022 -msgid "Only if operating on URLs" -msgstr "" - -#.(screen) -#: ../source/book.xml:18327 -#, no-wrap -msgid "\n--force\n--force-log\n--message (-m) TEXT\n--file (-F) FILE\n--quiet (-q)\n--targets FILENAME\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--editor-cmd EDITOR\n--encoding ENC\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18347 -msgid "Using svn 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:18352 -#, no-wrap -msgid "\n$ svn delete myfile\nD myfile\n\n$ svn commit -m \"Deleted file 'myfile'.\"\nDeleting myfile\nTransmitting file data .\nCommitted revision 14.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18361 -msgid "Deleting a URL, however, is immediate, so you have to supply a log message:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18363 -#, no-wrap -msgid "\n$ svn delete -m \"Deleting file 'yourfile'\" file:///var/svn/repos/test/yourfile\n\nCommitted revision 15.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18368 -msgid "Here's an example of how to force deletion of a file that has local mods:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18370 -#, no-wrap -msgid "\n$ svn delete over-there \nsvn: Attempting restricted operation for modified resource\nsvn: Use --force to override this restriction\nsvn: 'over-there' has local modifications\n\n$ svn delete --force over-there \nD over-there\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18385 ../source/book.xml:22526 -msgid "diff" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18389 -msgid "Display the differences between two revisions or paths." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18395 -#, no-wrap -msgid "diff [-c M | -r N[:M]] [TARGET[@REV]...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18396 -#, no-wrap -msgid "diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18397 -#, no-wrap -msgid "diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]" -msgstr "" - -#.(para) -#: ../source/book.xml:18403 -msgid "Display the differences between two paths. The ways you can use svn diff are:" -msgstr "" - -#.(para) -#: ../source/book.xml:18405 -msgid "Use just svn diff'to display local modifications in a working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:18407 -msgid "Display the changes made to TARGETs as they are seen in REV between two revisions. TARGETs may be all working copy paths or all URLs. If TARGETs are working copy paths, N defaults to BASE and M to the working copy; if URLs, N must be specified and M defaults to HEAD. The -c M option is equivalent to -r N:M where N = M-1. Using -c -M does the reverse: -r M:N where N = M-1." -msgstr "" - -#.(para) -#: ../source/book.xml:18423 -msgid "Display the differences between OLD-TGT as it was seen in OLDREV and NEW-TGT as it was seen ain NEWREV. PATHs, if given, are relative to OLD-TGT and NEW-TGT and restrict the output to differences for those paths. OLD-TGT and NEW-TGT may be working copy paths or URL[@REV]. NEW-TGT defaults to OLD-TGT if not specified. -r N makes OLDREV default to N, -r N:M makes OLDREV default to N and NEWREV default to M." -msgstr "" - -#.(para) -#: ../source/book.xml:18442 -msgid "Shorthand for svn diff --old=OLD-URL[@OLDREV] --new=NEW-URL[@NEWREV]" -msgstr "" - -#.(para) -#: ../source/book.xml:18444 -msgid "svn diff -r N:M URL is shorthand for svn diff -r N:M --old=URL --new=URL." -msgstr "" - -#.(para) -#: ../source/book.xml:18447 -msgid "svn diff [-r N[:M]] URL1[@N] URL2[@M] is shorthand for svn diff [-r N[:M]] --old=URL1 --new=URL2." -msgstr "" - -#.(para) -#: ../source/book.xml:18450 -msgid "If TARGET is a URL, then revs N and M can be given either via the or by using @ notation as described earlier." -msgstr "" - -#.(para) -#: ../source/book.xml:18454 -msgid "If TARGET is a working copy path, then the option means:" -msgstr "" - -#.(option) -#: ../source/book.xml:18460 -msgid "--revision N:M" -msgstr "" - -#.(para) -#: ../source/book.xml:18463 -msgid "The server compares TARGET@N and TARGET@M." -msgstr "" - -#.(option) -#: ../source/book.xml:18471 -msgid "--revision N" -msgstr "" - -#.(para) -#: ../source/book.xml:18474 -msgid "The client compares TARGET@N against working copy." -msgstr "" - -#.(term) -#: ../source/book.xml:18480 -msgid "(no )" -msgstr "" - -#.(para) -#: ../source/book.xml:18482 -msgid "The client compares base and working copies of TARGET." -msgstr "" - -#.(para) -#: ../source/book.xml:18487 -msgid "If the alternate syntax is used, the server compares URL1 and URL2 at revisions N and M respectively. If either N or M are omitted, a value of HEAD is assumed." -msgstr "" - -#.(para) -#: ../source/book.xml:18495 -msgid "By default, svn diff ignores the ancestry of files and merely compares the contents of the two files being compared. If you use , the ancestry of the paths in question will be taken into consideration when comparing revisions (that is, if you run svn diff 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:18509 -msgid "di" -msgstr "" - -#.(para) -#: ../source/book.xml:18521 -msgid "For obtaining differences against anything but BASE revision in your working copy" -msgstr "" - -#.(screen) -#: ../source/book.xml:18528 -#, no-wrap -msgid "\n--revision (-r) ARG\n--change (-c) ARG\n--old ARG\n--new ARG\n--non-recursive (-N)\n--diff-cmd CMD\n--extensions (-x) \"ARGS\"\n--no-diff-deleted\n--notice-ancestry\n--summarize\n--force\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18552 -msgid "Compare BASE and your working copy (one of the most popular uses of svn diff):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18555 -#, no-wrap -msgid "\n$ svn diff COMMITTERS \nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 4404)\n+++ COMMITTERS\t(working copy)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18562 -msgid "See what changed in the file COMMITTERS revision 9115:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18564 -#, no-wrap -msgid "\n$ svn diff -c 9115 COMMITTERS \nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 3900)\n+++ COMMITTERS\t(working copy)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18571 -msgid "See how your working copy's modifications compare against an older revision:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18573 -#, no-wrap -msgid "\n$ svn diff -r 3900 COMMITTERS \nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 3900)\n+++ COMMITTERS\t(working copy)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18580 -msgid "Compare revision 3000 to revision 3500 using @ syntax:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18582 -#, no-wrap -msgid "\n$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500\nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 3000)\n+++ COMMITTERS\t(revision 3500)\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18590 -msgid "Compare revision 3000 to revision 3500 using range notation (you only pass the one URL in this case):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18593 -#, no-wrap -msgid "\n$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS\nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 3000)\n+++ COMMITTERS\t(revision 3500)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18600 -msgid "Compare revision 3000 to revision 3500 of all files in trunk using range notation:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18602 -#, no-wrap -msgid "\n$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk\n " -msgstr "" - -#.(para) -#: ../source/book.xml:18605 -msgid "Compare revision 3000 to revision 3500 of only three files in trunk using range notation:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18608 -#, no-wrap -msgid "\n$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING\n " -msgstr "" - -#.(para) -#: ../source/book.xml:18611 -msgid "If you have a working copy, you can obtain the differences without typing in the long URLs:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18613 -#, no-wrap -msgid "\n$ svn diff -r 3000:3500 COMMITTERS \nIndex: COMMITTERS\n===================================================================\n--- COMMITTERS\t(revision 3000)\n+++ COMMITTERS\t(revision 3500)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18620 -msgid "Use CMD to pass arguments directly to the external diff program" -msgstr "" - -#.(screen) -#: ../source/book.xml:18624 -#, no-wrap -msgid "\n$ svn diff --diff-cmd /usr/bin/diff -x \"-i -b\" COMMITTERS \nIndex: COMMITTERS\n===================================================================\n0a1,2\n> This is a test\n> \n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18638 -msgid "export" -msgstr "" - -#.(refname) -#: ../source/book.xml:18641 -msgid "svn export" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18642 -msgid "Export a clean directory tree." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18648 -#, no-wrap -msgid "svn export [-r REV] URL[@PEGREV] [PATH]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18649 -#, no-wrap -msgid "svn export [-r REV] PATH1[@PEGREV] [PATH2]" -msgstr "" - -#.(para) -#: ../source/book.xml:18655 -msgid "The first form exports a clean directory tree from the repository specified by URL, at revision REV if it is given, otherwise at HEAD, into PATH. If PATH is omitted, the last component of the URL is used for the local directory name." -msgstr "" - -#.(para) -#: ../source/book.xml:18663 -msgid "The second form exports a clean directory tree from the working copy specified by PATH1 into PATH2. All local changes will be preserved, but files not under version control will not be copied." -msgstr "" - -#.(para) -#: ../source/book.xml:18680 -msgid "Local disk" -msgstr "" - -#.(para) -#: ../source/book.xml:18686 -msgid "Only if exporting from a URL" -msgstr "" - -#.(screen) -#: ../source/book.xml:18692 -#, no-wrap -msgid "\n--revision (-r) REV\n--quiet (-q)\n--force\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--non-recursive (-N)\n--config-dir DIR\n--native-eol EOL\n--ignore-externals\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18710 -msgid "Export from your working copy (doesn't print every file and directory):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18712 -#, no-wrap -msgid "\n$ svn export a-wc my-export\nExport complete.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18716 -msgid "Export directly from the repository (prints every file and directory):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18718 -#, no-wrap -msgid "\n$ svn export file:///var/svn/repos my-export\nA my-export/test\nA my-export/quiz\n…\nExported revision 15.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18725 -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 will do this, but it only affects files that have svn:eol-style = native properties attached to them. For example, to export a tree with all CRLF line endings (possibly for a Windows .zip file distribution):" -msgstr "" - -#.(screen) -#: ../source/book.xml:18733 -#, no-wrap -msgid "\n$ svn export file:///var/svn/repos my-export --native-eol CRLF\nA my-export/test\nA my-export/quiz\n…\nExported revision 15.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18740 -msgid "You can specify LR, CR, or CRLF as a line ending type with the option." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18750 ../source/book.xml:21616 ../source/book.xml:22640 -msgid "help" -msgstr "" - -#.(refname) -#: ../source/book.xml:18753 -msgid "svn help" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18760 -#, no-wrap -msgid "svn help [SUBCOMMAND...]" -msgstr "" - -#.(para) -#: ../source/book.xml:18766 -msgid "This is your best friend when you're using Subversion and this book isn't within reach!" -msgstr "" - -#.(para) -#: ../source/book.xml:18773 ../source/book.xml:21642 ../source/book.xml:22665 -msgid "?, h" -msgstr "" - -#.(para) -#: ../source/book.xml:18774 -msgid "The options , and have the same effect as using the help subcommand." -msgstr "" - -#.(screen) -#: ../source/book.xml:18794 -#, no-wrap -msgid "\n--config-dir DIR\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18803 -msgid "import" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18807 -msgid "Commit an unversioned file or tree into the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18814 -#, no-wrap -msgid "svn import [PATH] URL" -msgstr "" - -#.(para) -#: ../source/book.xml:18820 -msgid "Recursively commit a copy of PATH to URL. If PATH is omitted . is assumed. Parent directories are created in the repository as necessary." -msgstr "" - -#.(para) -#: ../source/book.xml:18838 -msgid "Repository" -msgstr "" - -#.(screen) -#: ../source/book.xml:18850 -#, no-wrap -msgid "\n--message (-m) TEXT\n--file (-F) FILE\n--quiet (-q)\n--non-recursive (-N)\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--force-log\n--editor-cmd EDITOR\n--encoding ENC\n--config-dir DIR\n--auto-props\n--no-auto-props\n--ignore-externals\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18872 -msgid "This imports the local directory myproj into trunk/misc in your repository. The directory trunk/misc need not exist before you import into it—svn import will recursively create directories for you." -msgstr "" - -#.(screen) -#: ../source/book.xml:18879 -#, no-wrap -msgid "\n$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc\nAdding myproj/sample.txt\n…\nTransmitting file data .........\nCommitted revision 16.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18886 -msgid "Be aware that this will not create a directory named myproj in the repository. If that's what you want, simply add myproj to the end of the URL:" -msgstr "" - -#.(screen) -#: ../source/book.xml:18890 -#, no-wrap -msgid "\n$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc/myproj\nAdding myproj/sample.txt\n…\nTransmitting file data .........\nCommitted revision 16.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:18897 -msgid "After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:18907 ../source/book.xml:22735 -msgid "info" -msgstr "" - -#.(refname) -#: ../source/book.xml:18910 -msgid "svn info" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:18911 -msgid "Display information about a local or remote item." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:18918 -#, no-wrap -msgid "svn info [TARGET[@REV]...]" -msgstr "" - -#.(para) -#: ../source/book.xml:18924 -msgid "Print information about the working copy paths or URLs specified. The information shown for both may include:" -msgstr "" - -#.(para) -#: ../source/book.xml:18929 -msgid "Path" -msgstr "" - -#.(para) -#: ../source/book.xml:18932 -msgid "Name" -msgstr "" - -#.(para) -#: ../source/book.xml:18935 -msgid "URL" -msgstr "" - -#.(para) -#: ../source/book.xml:18938 -msgid "Repository Root" -msgstr "" - -#.(para) -#: ../source/book.xml:18941 -msgid "Repository UUID" -msgstr "" - -#.(para) -#: ../source/book.xml:18947 -msgid "Node Kind" -msgstr "" - -#.(para) -#: ../source/book.xml:18950 -msgid "Last Changed Author" -msgstr "" - -#.(para) -#: ../source/book.xml:18953 -msgid "Last Changed Revision" -msgstr "" - -#.(para) -#: ../source/book.xml:18956 -msgid "Last Changed Date" -msgstr "" - -#.(para) -#: ../source/book.xml:18959 -msgid "Lock Token" -msgstr "" - -#.(para) -#: ../source/book.xml:18962 -msgid "Lock Owner" -msgstr "" - -#.(para) -#: ../source/book.xml:18965 -msgid "Lock Created (date)" -msgstr "" - -#.(para) -#: ../source/book.xml:18968 -msgid "Lock Expires (date)" -msgstr "" - -#.(para) -#: ../source/book.xml:18971 -msgid "Additional kinds of information available only for working copy paths are:" -msgstr "" - -#.(para) -#: ../source/book.xml:18975 -msgid "Schedule" -msgstr "" - -#.(para) -#: ../source/book.xml:18978 -msgid "Copied From URL" -msgstr "" - -#.(para) -#: ../source/book.xml:18981 -msgid "Copied From Rev" -msgstr "" - -#.(para) -#: ../source/book.xml:18984 -msgid "Text Last Updated" -msgstr "" - -#.(para) -#: ../source/book.xml:18987 -msgid "Properties Last Updated" -msgstr "" - -#.(para) -#: ../source/book.xml:18990 -msgid "Checksum" -msgstr "" - -#.(para) -#: ../source/book.xml:18993 -msgid "Conflict Previous Base File" -msgstr "" - -#.(para) -#: ../source/book.xml:18996 -msgid "Conflict Previous Working File" -msgstr "" - -#.(para) -#: ../source/book.xml:18999 -msgid "Conflict Current Base File" -msgstr "" - -#.(para) -#: ../source/book.xml:19002 -msgid "Conflict Properties File" -msgstr "" - -#.(screen) -#: ../source/book.xml:19028 -#, no-wrap -msgid "\n--revision (-r) REV\n--recursive (-R)\n--targets FILENAME\n--incremental\n--xml\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19045 -msgid "svn info will show you all the useful information that it has for items in your working copy. It will show information for files:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19048 -#, no-wrap -msgid "\n$ svn info foo.c\nPath: foo.c\nName: foo.c\nURL: http://svn.red-bean.com/repos/test/foo.c\nRepository Root: http://svn.red-bean.com/repos/test\nRepository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\nRevision: 4417\nNode Kind: file\nSchedule: normal\nLast Changed Author: sally\nLast Changed Rev: 20\nLast Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)\nText Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)\nProperties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)\nChecksum: d6aeb60b0662ccceb6bce4bac344cb66\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19065 -msgid "It will also show information for directories:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19066 -#, no-wrap -msgid "\n$ svn info vendors\nPath: vendors\nURL: http://svn.red-bean.com/repos/test/vendors\nRepository Root: http://svn.red-bean.com/repos/test\nRepository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\nRevision: 19\nNode Kind: directory\nSchedule: normal\nLast Changed Author: harry\nLast Changed Rev: 19\nLast Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003)\nProperties Last Updated: 2003-01-16 23:39:02 -0600 (Thu, 16 Jan 2003)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19080 -msgid "svn info also acts on URLs (also note that the file readme.doc in this example is locked, so lock information is also provided):" -msgstr "" - -#.(screen) -#: ../source/book.xml:19083 -#, no-wrap -msgid "\n$ svn info http://svn.red-bean.com/repos/test/readme.doc\nPath: readme.doc\nName: readme.doc\nURL: http://svn.red-bean.com/repos/test/readme.doc\nRepository Root: http://svn.red-bean.com/repos/test\nRepository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\nRevision: 1\nNode Kind: file\nSchedule: normal\nLast Changed Author: sally\nLast Changed Rev: 42\nLast Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\nLock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2\nLock Owner: harry\nLock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003)\nLock Comment (1 line):\nMy test lock comment\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19108 -msgid "list" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19112 -msgid "List directory entries in the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19118 -#, no-wrap -msgid "svn list [TARGET[@REV]...]" -msgstr "" - -#.(para) -#: ../source/book.xml:19124 -msgid "List each TARGET file and the contents of each TARGET directory as they exist in the repository. If TARGET is a working copy path, the corresponding repository URL will be used." -msgstr "" - -#.(para) -#: ../source/book.xml:19129 -msgid "The default TARGET is ., meaning the repository URL of the current working copy directory." -msgstr "" - -#.(para) -#: ../source/book.xml:19133 -msgid "With , svn list shows the following fields for each item:" -msgstr "" - -#.(para) -#: ../source/book.xml:19138 -msgid "Revision number of the last commit" -msgstr "" - -#.(para) -#: ../source/book.xml:19142 -msgid "Author of the last commit" -msgstr "" - -#.(para) -#: ../source/book.xml:19145 -msgid "If locked, the letter O (See for details)." -msgstr "" - -#.(para) -#: ../source/book.xml:19148 -msgid "Size (in bytes)" -msgstr "" - -#.(para) -#: ../source/book.xml:19151 -msgid "Date and time of the last commit" -msgstr "" - -#.(para) -#: ../source/book.xml:19155 -msgid "With , output is in XML format (with a header and an enclosing document element unless is also specified). All of the information is present; the option is not accepted." -msgstr "" - -#.(para) -#: ../source/book.xml:19165 -msgid "ls" -msgstr "" - -#.(screen) -#: ../source/book.xml:19183 -#, no-wrap -msgid "\n--revision (-r) REV\n--verbose (-v)\n--recursive (-R)\n--incremental\n--xml\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19200 -msgid "svn list is most useful if you want to see what files a repository has without downloading a working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19203 -#, no-wrap -msgid "\n$ svn list http://svn.red-bean.com/repos/test/support\nREADME.txt\nINSTALL\nexamples/\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19210 -msgid "You can pass the option for additional information, rather like the UNIX command ls -l:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19213 -#, no-wrap -msgid "\n$ svn list --verbose file:///var/svn/repos\n 16 sally 28361 Jan 16 23:18 README.txt\n 27 sally 0 Jan 18 15:27 INSTALL\n 24 harry Jan 18 11:27 examples/\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19219 -msgid "For further details, see ." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19226 ../source/book.xml:22783 -msgid "lock" -msgstr "" - -#.(refname) -#: ../source/book.xml:19229 -msgid "svn lock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19230 -msgid "Lock working copy paths or URLs in the repository, so that no other user can commit changes to them." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19238 -#, no-wrap -msgid "svn lock TARGET..." -msgstr "" - -#.(para) -#: ../source/book.xml:19244 -msgid "Lock each TARGET. If any TARGET is already locked by another user, print a warning and continue locking the rest of the TARGETs. Use to steal a lock from another user or working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:19261 ../source/book.xml:21059 -msgid "Working Copy, Repository" -msgstr "" - -#.(screen) -#: ../source/book.xml:19273 -#, no-wrap -msgid "\n--targets FILENAME\n--message (-m) TEXT\n--file (-F) FILE\n--force-log\n--encoding ENC\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n--force\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19291 -msgid "Lock two files in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19292 -#, no-wrap -msgid "\n\n$ svn lock tree.jpg house.jpg\n'tree.jpg' locked by user 'harry'.\n'house.jpg' locked by user 'harry'.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19298 -msgid "Lock a file in your working copy that is currently locked by another user:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19300 -#, no-wrap -msgid "\n$ svn lock tree.jpg\nsvn: warning: Path '/tree.jpg is already locked by user 'sally in \\\n filesystem '/var/svn/repos/db'\n\n$ svn lock --force tree.jpg\n'tree.jpg' locked by user 'harry'.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19308 -msgid "Lock a file without a working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19309 -#, no-wrap -msgid "\n$ svn lock http://svn.red-bean.com/repos/test/tree.jpg\n'tree.jpg' locked by user 'harry'.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19313 ../source/book.xml:21105 -msgid "For further details, see ." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19320 ../source/book.xml:22832 -msgid "log" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19324 -msgid "Display commit log messages." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19330 -#, no-wrap -msgid "svn log [PATH]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19331 -#, no-wrap -msgid "svn log URL [PATH...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19332 -#, no-wrap -msgid "svn log URL[@REV] [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:19338 -msgid "Shows log messages from the repository. If no arguments are supplied, svn log 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 BASE:1." -msgstr "" - -#.(para) -#: ../source/book.xml:19346 -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 HEAD:1." -msgstr "" - -#.(para) -#: ../source/book.xml:19351 -msgid "With , svn log will also print all affected paths with each log message. With , svn log will not print the log message body itself (this is compatible with )." -msgstr "" - -#.(para) -#: ../source/book.xml:19356 -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 to disable this behavior, which can be useful for determining branch points." -msgstr "" - -#.(screen) -#: ../source/book.xml:19385 -#, no-wrap -msgid "\n--revision (-r) REV\n--quiet (-q)\n--verbose (-v)\n--targets FILENAME\n--stop-on-copy\n--incremental\n--limit NUM\n--xml\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19405 -msgid "You can see the log messages for all the paths that changed in your working copy by running svn log from the top:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19408 -#, no-wrap -msgid "\n$ svn log\n------------------------------------------------------------------------\nr20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n\nTweak.\n------------------------------------------------------------------------\nr17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19418 -msgid "Examine all log messages for a particular file in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19420 -#, no-wrap -msgid "\n$ svn log foo.c\n------------------------------------------------------------------------\nr32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n\nAdded defines.\n------------------------------------------------------------------------\nr28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19430 -msgid "If you don't have a working copy handy, you can log a URL:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19432 -#, no-wrap -msgid "\n$ svn log http://svn.red-bean.com/repos/test/foo.c\n------------------------------------------------------------------------\nr32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n\nAdded defines.\n------------------------------------------------------------------------\nr28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19442 -msgid "If you want several distinct paths underneath the same URL, you can use the URL [PATH...] syntax." -msgstr "" - -#.(screen) -#: ../source/book.xml:19445 -#, no-wrap -msgid "\n$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c\n------------------------------------------------------------------------\nr32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n\nAdded defines.\n------------------------------------------------------------------------\nr31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line\n\nAdded new file bar.c\n------------------------------------------------------------------------\nr28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19459 -msgid "When you're concatenating the results of multiple calls to the log command, you may want to use the option. svn log 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 svn log on a range of two revisions, you would get this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19467 -#, no-wrap -msgid "\n$ svn log -r 14:15\n------------------------------------------------------------------------\nr14 | …\n\n------------------------------------------------------------------------\nr15 | …\n\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19477 -msgid "However, if you wanted to gather 2 non-sequential log messages into a file, you might do something like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19480 -#, no-wrap -msgid "\n$ svn log -r 14 > mylog\n$ svn log -r 19 >> mylog\n$ svn log -r 27 >> mylog\n$ cat mylog\n------------------------------------------------------------------------\nr14 | …\n\n------------------------------------------------------------------------\n------------------------------------------------------------------------\nr19 | …\n\n------------------------------------------------------------------------\n------------------------------------------------------------------------\nr27 | …\n\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19498 -msgid "You can avoid the clutter of the double dashed lines in your output by using the incremental option:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19500 -#, no-wrap -msgid "\n$ svn log --incremental -r 14 > mylog\n$ svn log --incremental -r 19 >> mylog\n$ svn log --incremental -r 27 >> mylog\n$ cat mylog\n------------------------------------------------------------------------\nr14 | …\n\n------------------------------------------------------------------------\nr19 | …\n\n------------------------------------------------------------------------\nr27 | …\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19514 -msgid "The option provides similar output control when using the option." -msgstr "" - -#.(para) -#: ../source/book.xml:19518 -msgid "If you run svn log on a specific path and provide a specific revision and get no output at all" -msgstr "" - -#.(screen) -#: ../source/book.xml:19521 -#, no-wrap -msgid "\n$ svn log -r 20 http://svn.red-bean.com/untouched.txt\n------------------------------------------------------------------------\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19525 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19529 -#, no-wrap -msgid "\n$ svn log -r 20 touched.txt \n------------------------------------------------------------------------\nr20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n\nMade a change.\n------------------------------------------------------------------------\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19544 -msgid "merge" -msgstr "" - -#.(refname) -#: ../source/book.xml:19547 -msgid "svn merge" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19548 -msgid "Apply the differences between two sources to a working copy path." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19555 -#, no-wrap -msgid "svn merge [-c M | -r N:M] SOURCE[@REV] [WCPATH]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19556 -#, no-wrap -msgid "svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19557 -#, no-wrap -msgid "svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]" -msgstr "" - -#.(para) -#: ../source/book.xml:19563 -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 N and M. These are the two sources to be compared. The revisions default to HEAD if omitted." -msgstr "" - -#.(para) -#: ../source/book.xml:19569 -msgid "The -c M option is equivalent to -r N:M where N = M-1. Using -c -M does the reverse: -r M:N where N = M-1." -msgstr "" - -#.(para) -#: ../source/book.xml:19574 -msgid "In the third form, SOURCE can be a URL or working copy item, in which case the corresponding URL is used. This URL, at revisions N and M, defines the two sources to be compared." -msgstr "" - -#.(para) -#: ../source/book.xml:19580 -msgid "WCPATH is the working copy path that will receive the changes. If WCPATH is omitted, a default value of . is assumed, unless the sources have identical basenames that match a file within .: in which case, the differences will be applied to that file." -msgstr "" - -#.(para) -#: ../source/book.xml:19587 -msgid "Unlike svn diff, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:19609 -msgid "Only if working with URLs" -msgstr "" - -#.(screen) -#: ../source/book.xml:19615 -#, no-wrap -msgid "\n--revision (-r) REV\n--change (-c) REV\n--non-recursive (-N)\n--quiet (-q)\n--force\n--dry-run\n--diff3-cmd CMD\n--extensions (-x) ARG\n--ignore-ancestry\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19636 -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):" -msgstr "" - -#.(screen) -#: ../source/book.xml:19639 -#, no-wrap -msgid "\n$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch\nU myproj/tiny.txt\nU myproj/thhgttg.txt\nU myproj/win.txt\nU myproj/flo.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19646 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19649 -#, no-wrap -msgid "\n$ svn merge -r 23:30 file:///var/svn/repos/trunk/vendors\nU myproj/thhgttg.txt\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19654 -msgid "To merge changes to a single file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19655 -#, no-wrap -msgid "\n$ cd myproj\n$ svn merge -r 30:31 thhgttg.txt \nU thhgttg.txt\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19666 -msgid "mkdir" -msgstr "" - -#.(refname) -#: ../source/book.xml:19669 -msgid "svn mkdir" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19670 -msgid "Create a new directory under version control." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19676 -#, no-wrap -msgid "svn mkdir PATH..." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19677 -#, no-wrap -msgid "svn mkdir URL..." -msgstr "" - -#.(para) -#: ../source/book.xml:19683 -msgid "Create a directory with a name given by the final component of the PATH or URL. A directory specified by a working copy PATH 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." -msgstr "" - -#.(para) -#: ../source/book.xml:19703 ../source/book.xml:19809 -msgid "Working copy, repository if operating on a URL" -msgstr "" - -#.(para) -#: ../source/book.xml:19709 ../source/book.xml:19815 ../source/book.xml:19911 ../source/book.xml:19991 ../source/book.xml:20069 ../source/book.xml:20150 ../source/book.xml:20245 -msgid "Only if operating on a URL" -msgstr "" - -#.(screen) -#: ../source/book.xml:19715 -#, no-wrap -msgid "\n--message (-m) TEXT\n--file (-F) FILE\n--quiet (-q)\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--editor-cmd EDITOR\n--encoding ENC\n--force-log\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19733 -msgid "Create a directory in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19734 -#, no-wrap -msgid "\n$ svn mkdir newdir\nA newdir\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19738 -msgid "Create one in the repository (instant commit, so a log message is required):" -msgstr "" - -#.(screen) -#: ../source/book.xml:19740 -#, no-wrap -msgid "\n$ svn mkdir -m \"Making a new dir.\" http://svn.red-bean.com/repos/newdir\n\nCommitted revision 26.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19751 -msgid "move" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19755 -msgid "Move a file or directory." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19761 -#, no-wrap -msgid "svn move SRC... DST" -msgstr "" - -#.(para) -#: ../source/book.xml:19767 -msgid "This command moves files or directories in your working copy or in the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:19770 -msgid "This command is equivalent to an svn copy followed by svn delete." -msgstr "" - -#.(para) -#: ../source/book.xml:19774 -msgid "When moving multiple sources, they will be added as children of DST, which must be a directory." -msgstr "" - -#.(para) -#: ../source/book.xml:19778 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:19787 -msgid "Move and schedule a file or directory for addition (with history)." -msgstr "" - -#.(para) -#: ../source/book.xml:19794 -msgid "Complete server-side rename." -msgstr "" - -#.(para) -#: ../source/book.xml:19803 -msgid "mv, rename, ren" -msgstr "" - -#.(emphasis) -#: ../source/book.xml:19824 -msgid "Deprecated" -msgstr "" - -#.(screen) -#: ../source/book.xml:19821 -#, no-wrap -msgid "\n--message (-m) TEXT\n--file (-F) FILE\n--revision (-r) REV ()\n--quiet (-q)\n--force\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--editor-cmd EDITOR\n--encoding ENC\n--force-log\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19841 -msgid "Move a file in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19842 -#, no-wrap -msgid "\n$ svn move foo.c bar.c\nA bar.c\nD foo.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19847 -msgid "Move several files in your working copy into a subdirectory:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19848 -#, no-wrap -msgid "\n$ svn move baz.c bat.c qux.c src\nA src/baz.c\nD baz.c\nA src/bat.c\nD bat.c\nA src/qux.c\nD qux.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19857 -msgid "Move a file in the repository (an immediate commit, so it requires a commit message):" -msgstr "" - -#.(screen) -#: ../source/book.xml:19859 -#, no-wrap -msgid "\n$ svn move -m \"Move a file\" http://svn.red-bean.com/repos/foo.c \\\n http://svn.red-bean.com/repos/bar.c\n\nCommitted revision 27.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19871 -msgid "propdel" -msgstr "" - -#.(refname) -#: ../source/book.xml:19874 -msgid "svn propdel" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19875 -msgid "Remove a property from an item." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19881 -#, no-wrap -msgid "svn propdel PROPNAME [PATH...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19882 -#, no-wrap -msgid "svn propdel PROPNAME --revprop -r REV [TARGET]" -msgstr "" - -#.(para) -#: ../source/book.xml:19888 -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 (TARGET only determines which repository to access)." -msgstr "" - -#.(para) -#: ../source/book.xml:19899 -msgid "pdel, pd" -msgstr "" - -#.(para) -#: ../source/book.xml:19905 ../source/book.xml:19985 ../source/book.xml:20063 ../source/book.xml:20144 ../source/book.xml:20239 -msgid "Working copy, repository only if operating on a URL" -msgstr "" - -#.(screen) -#: ../source/book.xml:19917 -#, no-wrap -msgid "\n--quiet (-q)\n--recursive (-R)\n--revision (-r) REV\n--revprop\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19933 -msgid "Delete a property from a file in your working copy" -msgstr "" - -#.(screen) -#: ../source/book.xml:19935 -#, no-wrap -msgid "\n$ svn propdel svn:mime-type some-script\nproperty 'svn:mime-type' deleted from 'some-script'.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:19939 -msgid "Delete a revision property:" -msgstr "" - -#.(screen) -#: ../source/book.xml:19940 -#, no-wrap -msgid "\n$ svn propdel --revprop -r 26 release-date \nproperty 'release-date' deleted from repository revision '26'\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:19950 -msgid "propedit" -msgstr "" - -#.(refname) -#: ../source/book.xml:19953 -msgid "svn propedit" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:19954 -msgid "Edit the property of one or more items under version control." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19961 -#, no-wrap -msgid "svn propedit PROPNAME PATH..." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:19962 -#, no-wrap -msgid "svn propedit PROPNAME --revprop -r REV [TARGET]" -msgstr "" - -#.(para) -#: ../source/book.xml:19968 -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 (TARGET only determines which repository to access)." -msgstr "" - -#.(para) -#: ../source/book.xml:19979 -msgid "pedit, pe" -msgstr "" - -#.(screen) -#: ../source/book.xml:19997 -#, no-wrap -msgid "\n--revision (-r) REV\n--revprop\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--encoding ENC\n--editor-cmd EDITOR\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20013 -msgid "svn propedit makes it easy to modify properties that have multiple values:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20015 -#, no-wrap -msgid "\n$ svn propedit svn:keywords foo.c \n <svn will launch your favorite editor here, with a buffer open\n containing the current contents of the svn:keywords property. You\n can add multiple values to a property easily here by entering one\n value per line.>\nSet new value for property 'svn:keywords' on 'foo.c'\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20029 ../source/book.xml:22876 -msgid "propget" -msgstr "" - -#.(refname) -#: ../source/book.xml:20032 -msgid "svn propget" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20033 -msgid "Print the value of a property." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20039 -#, no-wrap -msgid "svn propget PROPNAME [TARGET[@REV]...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20040 -#, no-wrap -msgid "svn propget PROPNAME --revprop -r REV [URL]" -msgstr "" - -#.(para) -#: ../source/book.xml:20046 -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 for more information on properties." -msgstr "" - -#.(para) -#: ../source/book.xml:20057 -msgid "pget, pg" -msgstr "" - -#.(screen) -#: ../source/book.xml:20075 -#, no-wrap -msgid "\n--recursive (-R)\n--revision (-r) REV\n--revprop\n--strict\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20091 -msgid "Examine a property of a file in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20093 -#, no-wrap -msgid "\n$ svn propget svn:keywords foo.c\nAuthor\nDate\nRev\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20099 -msgid "The same goes for a revision property:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20100 -#, no-wrap -msgid "\n$ svn propget svn:log --revprop -r 20 \nBegan journal.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20110 ../source/book.xml:22929 -msgid "proplist" -msgstr "" - -#.(refname) -#: ../source/book.xml:20113 -msgid "svn proplist" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20114 -msgid "List all properties." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20120 -#, no-wrap -msgid "svn proplist [TARGET[@REV]...]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20121 -#, no-wrap -msgid "svn proplist --revprop -r REV [TARGET]" -msgstr "" - -#.(para) -#: ../source/book.xml:20127 -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 (TARGET only determines which repository to access)." -msgstr "" - -#.(para) -#: ../source/book.xml:20138 -msgid "plist, pl" -msgstr "" - -#.(screen) -#: ../source/book.xml:20156 -#, no-wrap -msgid "\n--verbose (-v)\n--recursive (-R)\n--revision (-r) REV\n--quiet (-q)\n--revprop\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20173 -msgid "You can use proplist to see the properties on an item in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20175 -#, no-wrap -msgid "\n$ svn proplist foo.c\nProperties on 'foo.c':\n svn:mime-type\n svn:keywords\n owner\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20182 -msgid "But with the flag, svn proplist is extremely handy as it also shows you the values for the properties:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20185 -#, no-wrap -msgid "\n$ svn proplist --verbose foo.c\nProperties on 'foo.c':\n svn:mime-type : text/plain\n svn:keywords : Author Date Rev\n owner : sally\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20198 -msgid "propset" -msgstr "" - -#.(refname) -#: ../source/book.xml:20201 -msgid "svn propset" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20202 -msgid "Set PROPNAME to PROPVAL on files, directories, or revisions." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20208 -#, no-wrap -msgid "svn propset PROPNAME [PROPVAL | -F VALFILE] PATH..." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20209 -#, no-wrap -msgid "svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET]" -msgstr "" - -#.(para) -#: ../source/book.xml:20215 -msgid "Set PROPNAME to PROPVAL 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 (TARGET only determines which repository to access)." -msgstr "" - -#.(para) -#: ../source/book.xml:20224 -msgid "Subversion has a number of special properties that affect its behavior. See for more on these properties." -msgstr "" - -#.(para) -#: ../source/book.xml:20233 -msgid "pset, ps" -msgstr "" - -#.(screen) -#: ../source/book.xml:20251 -#, no-wrap -msgid "\n--file (-F) FILE\n--quiet (-q)\n--revision (-r) REV\n--targets FILENAME\n--recursive (-R)\n--revprop\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--encoding ENC\n--force\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20271 -msgid "Set the mime type on a file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20272 -#, no-wrap -msgid "\n$ svn propset svn:mime-type image/jpeg foo.jpg \nproperty 'svn:mime-type' set on 'foo.jpg'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20276 -msgid "On a UNIX system, if you want a file to have the executable permission set:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20278 -#, no-wrap -msgid "\n$ svn propset svn:executable ON somescript\nproperty 'svn:executable' set on 'somescript'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20282 -msgid "Perhaps you have an internal policy to set certain properties for the benefit of your coworkers:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20284 -#, no-wrap -msgid "\n$ svn propset owner sally foo.c\nproperty 'owner' set on 'foo.c'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20288 -msgid "If you made a mistake in a log message for a particular revision and want to change it, use and set svn:log to the new log message:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20292 -#, no-wrap -msgid "\n$ svn propset --revprop -r 25 svn:log \"Journaled about trip to New York.\"\nproperty 'svn:log' set on repository revision '25'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20296 -msgid "Or, if you don't have a working copy, you can provide a URL." -msgstr "" - -#.(screen) -#: ../source/book.xml:20298 -#, no-wrap -msgid "\n$ svn propset --revprop -r 26 svn:log \"Document nap.\" http://svn.red-bean.com/repos\nproperty 'svn:log' set on repository revision '25'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20302 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20305 -#, no-wrap -msgid "\n$ svn propset owner-pic -F sally.jpg moo.c \nproperty 'owner-pic' set on 'moo.c'\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20310 -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 pre-revprop-change. See for more information on hook scripts." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20323 -msgid "resolved" -msgstr "" - -#.(quote) -#: ../source/book.xml:20327 -msgid "conflicted" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20327 -msgid "Remove state on working copy files or directories." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20334 -#, no-wrap -msgid "svn resolved PATH..." -msgstr "" - -#.(para) -#: ../source/book.xml:20340 -msgid "Remove conflicted state on working copy files or directories. This routine does not semantically resolve conflict markers; it merely removes conflict-related artifact files and allows PATH to be committed again; that is, it tells Subversion that the conflicts have been resolved. See for an in-depth look at resolving conflicts." -msgstr "" - -#.(screen) -#: ../source/book.xml:20371 ../source/book.xml:20459 -#, no-wrap -msgid "\n--targets FILENAME\n--recursive (-R)\n--quiet (-q)\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20382 -msgid "If you get a conflict on an update, your working copy will sprout three new files:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20384 -#, no-wrap -msgid "\n$ svn update\nC foo.c\nUpdated to revision 31.\n$ ls\nfoo.c\nfoo.c.mine\nfoo.c.r30\nfoo.c.r31\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20394 -msgid "Once you've resolved the conflict and foo.c is ready to be committed, run svn resolved to let your working copy know you've taken care of everything." -msgstr "" - -#.(para) -#: ../source/book.xml:20399 -msgid "You can just remove the conflict files and commit, but svn resolved 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." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20412 -msgid "revert" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20416 -msgid "Undo all local edits." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20422 -#, no-wrap -msgid "svn revert PATH..." -msgstr "" - -#.(para) -#: ../source/book.xml:20428 -msgid "Reverts any local changes to a file or directory and resolves any conflicted states. svn revert 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 unscheduled)." -msgstr "" - -#.(para) -#: ../source/book.xml:20470 -msgid "Discard changes to a file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20471 -#, no-wrap -msgid "\n$ svn revert foo.c\nReverted foo.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20475 -msgid "If you want to revert a whole directory of files, use the flag:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20477 -#, no-wrap -msgid "\n$ svn revert --recursive .\nReverted newdir/afile\nReverted foo.c\nReverted bar.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20483 -msgid "Lastly, you can undo any scheduling operations:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20485 -#, no-wrap -msgid "\n$ svn add mistake.txt whoops\nA mistake.txt\nA whoops\nA whoops/oopsie.c\n\n$ svn revert mistake.txt whoops\nReverted mistake.txt\nReverted whoops\n\n$ svn status\n? mistake.txt\n? whoops\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20500 -msgid "svn revert is inherently dangerous, since its entire purpose is to throw away data—namely, your uncommitted changes. Once you've reverted, Subversion provides no way to get back those uncommitted changes." -msgstr "" - -#.(para) -#: ../source/book.xml:20506 -msgid "If you provide no targets to svn revert, it will do nothing—to protect you from accidentally losing changes in your working copy, svn revert requires you to provide at least one target." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20518 -msgid "status" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20522 -msgid "Print the status of working copy files and directories." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20528 -#, no-wrap -msgid "svn status [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:20534 -msgid "Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access). With , it adds working revision and server out-of-date information. With , it prints full revision information on every item." -msgstr "" - -#.(para) -#: ../source/book.xml:20541 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:20544 -msgid "The first column indicates that an item was added, deleted, or otherwise changed." -msgstr "" - -#.(term) -#: ../source/book.xml:20548 ../source/book.xml:20629 ../source/book.xml:20655 ../source/book.xml:20671 ../source/book.xml:20687 ../source/book.xml:20702 ../source/book.xml:20750 -msgid "' '" -msgstr "" - -#.(para) -#: ../source/book.xml:20550 ../source/book.xml:20631 -msgid "No modifications." -msgstr "" - -#.(term) -#: ../source/book.xml:20554 -msgid "'A'" -msgstr "" - -#.(para) -#: ../source/book.xml:20556 -msgid "Item is scheduled for Addition." -msgstr "" - -#.(term) -#: ../source/book.xml:20560 -msgid "'D'" -msgstr "" - -#.(para) -#: ../source/book.xml:20562 -msgid "Item is scheduled for Deletion." -msgstr "" - -#.(term) -#: ../source/book.xml:20566 ../source/book.xml:20635 -msgid "'M'" -msgstr "" - -#.(para) -#: ../source/book.xml:20568 -msgid "Item has been modified." -msgstr "" - -#.(term) -#: ../source/book.xml:20572 -msgid "'R'" -msgstr "" - -#.(para) -#: ../source/book.xml:20574 -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." -msgstr "" - -#.(term) -#: ../source/book.xml:20581 ../source/book.xml:20642 -msgid "'C'" -msgstr "" - -#.(para) -#: ../source/book.xml:20583 -msgid "The contents (as opposed to the properties) of the item conflict with updates received from the repository." -msgstr "" - -#.(term) -#: ../source/book.xml:20589 -msgid "'X'" -msgstr "" - -#.(para) -#: ../source/book.xml:20591 -msgid "Item is present because of an externals definition." -msgstr "" - -#.(term) -#: ../source/book.xml:20595 -msgid "'I'" -msgstr "" - -#.(para) -#: ../source/book.xml:20597 -msgid "Item is being ignored (e.g. with the svn:ignore property)." -msgstr "" - -#.(term) -#: ../source/book.xml:20602 -msgid "'?'" -msgstr "" - -#.(para) -#: ../source/book.xml:20604 -msgid "Item is not under version control." -msgstr "" - -#.(term) -#: ../source/book.xml:20608 -msgid "'!'" -msgstr "" - -#.(para) -#: ../source/book.xml:20610 -msgid "Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted)." -msgstr "" - -#.(term) -#: ../source/book.xml:20617 -msgid "'~'" -msgstr "" - -#.(para) -#: ../source/book.xml:20619 -msgid "Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object." -msgstr "" - -#.(para) -#: ../source/book.xml:20625 -msgid "The second column tells the status of a file's or directory's properties." -msgstr "" - -#.(para) -#: ../source/book.xml:20637 -msgid "Properties for this item have been modified." -msgstr "" - -#.(para) -#: ../source/book.xml:20644 -msgid "Properties for this item are in conflict with property updates received from the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:20650 -msgid "The third column is populated only if the working copy directory is locked. (See .)" -msgstr "" - -#.(para) -#: ../source/book.xml:20657 -msgid "Item is not locked." -msgstr "" - -#.(term) -#: ../source/book.xml:20661 -msgid "'L'" -msgstr "" - -#.(para) -#: ../source/book.xml:20663 -msgid "Item is locked." -msgstr "" - -#.(para) -#: ../source/book.xml:20667 -msgid "The fourth column is populated only if the item is scheduled for addition-with-history." -msgstr "" - -#.(para) -#: ../source/book.xml:20673 -msgid "No history scheduled with commit." -msgstr "" - -#.(term) -#: ../source/book.xml:20677 -msgid "'+'" -msgstr "" - -#.(para) -#: ../source/book.xml:20679 -msgid "History scheduled with commit." -msgstr "" - -#.(para) -#: ../source/book.xml:20683 -msgid "The fifth column is populated only if the item is switched relative to its parent (see )." -msgstr "" - -#.(para) -#: ../source/book.xml:20689 -msgid "Item is a child of its parent directory." -msgstr "" - -#.(term) -#: ../source/book.xml:20693 -msgid "'S'" -msgstr "" - -#.(para) -#: ../source/book.xml:20695 -msgid "Item is switched." -msgstr "" - -#.(para) -#: ../source/book.xml:20699 -msgid "The sixth column is populated with lock information." -msgstr "" - -#.(para) -#: ../source/book.xml:20704 -msgid "When is used, the file is not locked. If is not used, this merely means that the file is not locked in this working copy." -msgstr "" - -#.(term) -#: ../source/book.xml:20712 -msgid "K" -msgstr "" - -#.(para) -#: ../source/book.xml:20714 -msgid "File is locked in this working copy." -msgstr "" - -#.(term) -#: ../source/book.xml:20718 -msgid "O" -msgstr "" - -#.(para) -#: ../source/book.xml:20720 -msgid "File is locked either by another user or in another working copy. This only appears when is used." -msgstr "" - -#.(term) -#: ../source/book.xml:20726 -msgid "T" -msgstr "" - -#.(para) -#: ../source/book.xml:20728 -msgid "File was locked in this working copy, but the lock has been stolen and is invalid. The file is currently locked in the repository. This only appears when is used." -msgstr "" - -#.(term) -#: ../source/book.xml:20736 -msgid "B" -msgstr "" - -#.(para) -#: ../source/book.xml:20738 -msgid "File was locked in this working copy, but the lock has been broken and is invalid. The file is no longer locked This only appears when is used." -msgstr "" - -#.(para) -#: ../source/book.xml:20745 -msgid "The out-of-date information appears in the seventh column (only if you pass the option)." -msgstr "" - -#.(para) -#: ../source/book.xml:20752 -msgid "The item in your working copy is up-to-date." -msgstr "" - -#.(term) -#: ../source/book.xml:20756 -msgid "'*'" -msgstr "" - -#.(para) -#: ../source/book.xml:20758 -msgid "A newer revision of the item exists on the server." -msgstr "" - -#.(para) -#: ../source/book.xml:20763 -msgid "The remaining fields are variable width and delimited by spaces. The working revision is the next field if the or options are passed." -msgstr "" - -#.(para) -#: ../source/book.xml:20767 -msgid "If the option is passed, the last committed revision and last committed author are displayed next." -msgstr "" - -#.(para) -#: ../source/book.xml:20770 -msgid "The working copy path is always the final field, so it can include spaces." -msgstr "" - -#.(para) -#: ../source/book.xml:20777 -msgid "stat, st" -msgstr "" - -#.(para) -#: ../source/book.xml:20789 -msgid "Only if using " -msgstr "" - -#.(screen) -#: ../source/book.xml:20795 -#, no-wrap -msgid "\n--show-updates (-u)\n--verbose (-v)\n--non-recursive (-N)\n--quiet (-q)\n--no-ignore\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n--ignore-externals\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20813 -msgid "This is the easiest way to find out what changes you have made to your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20815 -#, no-wrap -msgid "\n$ svn status wc\n M wc/bar.c\nA + wc/qax.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20820 -msgid "If you want to find out what files in your working copy are out-of-date, pass the option (this will not make any changes to your working copy). Here you can see that wc/foo.c has changed in the repository since we last updated our working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20828 -#, no-wrap -msgid "\n$ svn status --show-updates wc\n M 965 wc/bar.c\n * 965 wc/foo.c\nA + 965 wc/qax.c\nStatus against revision: 981\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20836 -msgid "only places an asterisk next to items that are out of date (that is, items that will be updated from the repository if you run svn update). does not 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:20845 -msgid "And finally, the most information you can get out of the status subcommand:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20847 -#, no-wrap -msgid "\n$ svn status --show-updates --verbose wc\n M 965 938 sally wc/bar.c\n * 965 922 harry wc/foo.c\nA + 965 687 harry wc/qax.c\n 965 687 harry wc/zig.c\nHead revision: 981\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20855 -msgid "For many more examples of svn status, see ." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:20863 -msgid "switch" -msgstr "" - -#.(refname) -#: ../source/book.xml:20866 -msgid "svn switch" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:20867 -msgid "Update working copy to a different URL." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20873 -#, no-wrap -msgid "svn switch URL [PATH]" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:20874 -#, no-wrap -msgid "switch --relocate FROM TO [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:20880 -msgid "The first variant of this subcommand (without the 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 for an in-depth look at switching." -msgstr "" - -#.(para) -#: ../source/book.xml:20887 -msgid "The option causes svn switch to do something different: it updates your working copy to point to the same 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:20900 -msgid "sw" -msgstr "" - -#.(screen) -#: ../source/book.xml:20918 -#, no-wrap -msgid "\n--revision (-r) REV\n--non-recursive (-N)\n--quiet (-q)\n--diff3-cmd CMD\n--relocate FROM TO\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20935 -msgid "If you're currently inside the directory vendors, which was branched to vendors-with-fix, and you'd like to switch your working copy to that branch:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20939 -#, no-wrap -msgid "\n$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .\nU myproj/foo.txt\nU myproj/bar.txt\nU myproj/baz.c\nU myproj/qux.c\nUpdated to revision 31.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20947 -msgid "And to switch back, just provide the URL to the location in the repository from which you originally checked out your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:20950 -#, no-wrap -msgid "\n$ svn switch http://svn.red-bean.com/repos/trunk/vendors .\nU myproj/foo.txt\nU myproj/bar.txt\nU myproj/baz.c\nU myproj/qux.c\nUpdated to revision 31.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20959 -msgid "You can just switch part of your working copy to a branch if you don't want to switch your entire working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:20963 -msgid "Sometimes an administrator might change the base location 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 svn switch command rewrite the beginnings of all the URLs in your working copy. Use the 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 .svn/ directories which runs s/OldRoot/NewRoot/." -msgstr "" - -#.(screen) -#: ../source/book.xml:20978 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos test\nA test/a\nA test/b\n…\n\n$ mv repos newlocation\n$ cd test/\n\n$ svn update\nsvn: Unable to open an ra_local session to URL\nsvn: Unable to open repository 'file:///var/svn/repos'\n\n$ svn switch --relocate file:///var/svn/repos file:///tmp/newlocation .\n$ svn update\nAt revision 3.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:20996 -msgid "Be careful when using the 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 . Here's the rule of thumb:" -msgstr "" - -#.(para) -#: ../source/book.xml:21006 -msgid "If the working copy needs to reflect a new directory within the repository, then use just svn switch." -msgstr "" - -#.(para) -#: ../source/book.xml:21012 -msgid "If the working copy still reflects the same repository directory, but the location of the repository itself has changed, then use svn switch --relocate." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21025 -msgid "unlock" -msgstr "" - -#.(refname) -#: ../source/book.xml:21028 -msgid "svn unlock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21029 -msgid "Unlock working copy paths or URLs." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21035 -#, no-wrap -msgid "svn unlock TARGET..." -msgstr "" - -#.(para) -#: ../source/book.xml:21041 -msgid "Unlock each TARGET. If any TARGET 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 TARGETs. Use to break a lock belonging to another user or working copy." -msgstr "" - -#.(screen) -#: ../source/book.xml:21071 -#, no-wrap -msgid "\n--targets FILENAME\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n--force\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21085 -msgid "Unlock two files in your working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21086 -#, no-wrap -msgid "\n\n$ svn unlock tree.jpg house.jpg\n'tree.jpg' unlocked.\n'house.jpg' unlocked.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21092 -msgid "Unlock a file in your working copy that is currently locked by another user:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21094 -#, no-wrap -msgid "\n$ svn unlock tree.jpg\nsvn: 'tree.jpg' is not locked in this working copy\n$ svn unlock --force tree.jpg\n'tree.jpg' unlocked.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21100 -msgid "Unlock a file without a working copy:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21101 -#, no-wrap -msgid "\n$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg\n'tree.jpg unlocked.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21112 -msgid "update" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21116 -msgid "Update your working copy." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21122 -#, no-wrap -msgid "svn update [PATH...]" -msgstr "" - -#.(para) -#: ../source/book.xml:21128 -msgid "svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up-to-date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the option. As part of the synchronization, svn update also removes any stale locks (see ) found in the working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:21137 -msgid "For each updated item, it prints a line that starts with a character reporting the action taken. These characters have the following meaning:" -msgstr "" - -#.(term) -#: ../source/book.xml:21142 -msgid "A" -msgstr "" - -#.(para) -#: ../source/book.xml:21144 -msgid "Added" -msgstr "" - -#.(term) -#: ../source/book.xml:21148 -msgid "D" -msgstr "" - -#.(para) -#: ../source/book.xml:21150 -msgid "Deleted" -msgstr "" - -#.(term) -#: ../source/book.xml:21154 -msgid "U" -msgstr "" - -#.(para) -#: ../source/book.xml:21156 -msgid "Updated" -msgstr "" - -#.(term) -#: ../source/book.xml:21160 -msgid "C" -msgstr "" - -#.(para) -#: ../source/book.xml:21162 -msgid "Conflicted" -msgstr "" - -#.(term) -#: ../source/book.xml:21166 -msgid "G" -msgstr "" - -#.(para) -#: ../source/book.xml:21168 -msgid "Merged" -msgstr "" - -#.(para) -#: ../source/book.xml:21172 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:21180 -msgid "up" -msgstr "" - -#.(screen) -#: ../source/book.xml:21198 -#, no-wrap -msgid "\n--revision (-r) REV\n--non-recursive (-N)\n--quiet (-q)\n--no-ignore\n--incremental\n--diff3-cmd CMD\n--username USER\n--password PASS\n--no-auth-cache\n--non-interactive\n--config-dir DIR\n--ignore-externals\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21217 -msgid "Pick up repository changes that have happened since your last update:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21219 -#, no-wrap -msgid "\n$ svn update\nA newdir/toggle.c\nA newdir/disclose.c\nA newdir/launch.c\nD newdir/README\nUpdated to revision 32.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21227 -msgid "You can also update your working copy to an older revision (Subversion doesn't have the concept of sticky files like CVS does; see ):" -msgstr "" - -#.(screen) -#: ../source/book.xml:21230 -#, no-wrap -msgid "\n$ svn update -r30\nA newdir/README\nD newdir/toggle.c\nD newdir/disclose.c\nD newdir/launch.c\nU foo.c\nUpdated to revision 30.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21240 -msgid "If you want to examine an older revision of a single file, you may want to use svn cat instead—it won't change your working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:21257 -msgid "svnadmin is the administrative tool for monitoring and repairing your Subversion repository. For detailed information, see ." -msgstr "" - -#.(para) -#: ../source/book.xml:21260 -msgid "Since svnadmin 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." -msgstr "" - -#.(title) -#: ../source/book.xml:21266 -msgid "svnadmin Options" -msgstr "" - -#.(option) -#: ../source/book.xml:21271 -msgid "--bdb-log-keep" -msgstr "" - -#.(para) -#: ../source/book.xml:21274 -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." -msgstr "" - -#.(option) -#: ../source/book.xml:21282 -msgid "--bdb-txn-nosync" -msgstr "" - -#.(para) -#: ../source/book.xml:21285 -msgid "(Berkeley DB specific) Disables fsync when committing database transactions. Used with the svnadmin create command to create a Berkeley DB backed repository with DB_TXN_NOSYNC enabled (which improves speed but has some risks associated with it)." -msgstr "" - -#.(option) -#: ../source/book.xml:21295 -msgid "--bypass-hooks" -msgstr "" - -#.(para) -#: ../source/book.xml:21298 -msgid "Bypass the repository hook system." -msgstr "" - -#.(option) -#: ../source/book.xml:21303 -msgid "--clean-logs" -msgstr "" - -#.(para) -#: ../source/book.xml:21306 -msgid "Removes unused Berkeley DB logs." -msgstr "" - -#.(option) -#: ../source/book.xml:21312 -msgid "--force-uuid" -msgstr "" - -#.(para) -#: ../source/book.xml:21315 -msgid "By default, when loading data into repository that already contains revisions, svnadmin will ignore the UUID from the dump stream. This option will cause the repository's UUID to be set to the UUID from the stream." -msgstr "" - -#.(option) -#: ../source/book.xml:21325 -msgid "--ignore-uuid" -msgstr "" - -#.(para) -#: ../source/book.xml:21328 -msgid "By default, when loading an empty repository, svnadmin will ignore the UUID from the dump stream. This option will force that UUID to be ignored (useful for overriding your configuration file if it has set)." -msgstr "" - -#.(para) -#: ../source/book.xml:21341 -msgid "Dump a revision only as a diff against the previous revision, instead of the usual fulltext." -msgstr "" - -#.(option) -#: ../source/book.xml:21348 -msgid "--parent-dir " -msgstr "" - -#.(para) -#: ../source/book.xml:21352 -msgid "When loading a dump file, root paths at DIR instead of /." -msgstr "" - -#.(term) -#: ../source/book.xml:21358 -msgid " () ARG" -msgstr "" - -#.(para) -#: ../source/book.xml:21361 -msgid "Specify a particular revision to operate on." -msgstr "" - -#.(option) -#: ../source/book.xml:21367 -msgid "--quiet" -msgstr "" - -#.(para) -#: ../source/book.xml:21370 -msgid "Do not show normal progress—show only errors." -msgstr "" - -#.(option) -#: ../source/book.xml:21376 -msgid "--use-post-commit-hook" -msgstr "" - -#.(para) -#: ../source/book.xml:21379 -msgid "When loading a dump file, run the repository's post-commit hook after finalizing each newly loaded revision." -msgstr "" - -#.(option) -#: ../source/book.xml:21386 -msgid "--use-pre-commit-hook" -msgstr "" - -#.(para) -#: ../source/book.xml:21389 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:21400 -msgid "svnadmin Subcommands" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21406 -msgid "create" -msgstr "" - -#.(refname) -#: ../source/book.xml:21409 -msgid "svnadmin create" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21410 -msgid "Create a new, empty repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21416 -#, no-wrap -msgid "svnadmin create REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21424 -msgid "Remember, svnadmin works only with local paths, not URLs." -msgstr "" - -#.(para) -#: ../source/book.xml:21422 -msgid "Create a new, empty repository at the path provided. If the provided directory does not exist, it will be created for you. As of Subversion 1.2, svnadmin creates new repositories with the fsfs filesystem backend by default." -msgstr "" - -#.(para) -#: ../source/book.xml:21431 -msgid "While svnadmin create will create the base directory for a new repository, it will not create intermediate directories. For example, if you have an empty directory named /var/svn, creating /var/svn/repos will work, while attempting to create /var/svn/subdirectory/repos will fail with an error." -msgstr "" - -#.(screen) -#: ../source/book.xml:21445 -#, no-wrap -msgid "\n--bdb-txn-nosync\n--bdb-log-keep\n--config-dir DIR\n--fs-type TYPE\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21456 -msgid "Creating a new repository is just this easy:" -msgstr "" - -#.(para) -#: ../source/book.xml:21460 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21465 -#, no-wrap -msgid "\n$ svnadmin create /var/svn/repos --fs-type fsfs\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21474 -msgid "deltify" -msgstr "" - -#.(refname) -#: ../source/book.xml:21477 -msgid "svnadmin deltify" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21478 -msgid "Deltify changed paths in a revision range." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21484 -#, no-wrap -msgid "svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21490 -msgid "svnadmin deltify exists in current versions of Subversion only for historical reasons. This command is deprecated and no longer needed." -msgstr "" - -#.(para) -#: ../source/book.xml:21493 -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 very little gain, and this feature was deprecated." -msgstr "" - -#.(screen) -#: ../source/book.xml:21503 -#, no-wrap -msgid "\n--revision (-r) REV\n--quiet (-q)\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21513 -msgid "dump" -msgstr "" - -#.(refname) -#: ../source/book.xml:21516 -msgid "svnadmin dump" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21517 -msgid "Dump the contents of filesystem to stdout." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21523 -#, no-wrap -msgid "svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental]" -msgstr "" - -#.(para) -#: ../source/book.xml:21529 -msgid "Dump the contents of filesystem to stdout in a dumpfile portable format, sending feedback to stderr. Dump revisions LOWER rev through UPPER rev. If no revisions are given, dump all revision trees. If only LOWER is given, dump that one revision tree. See for a practical use." -msgstr "" - -#.(para) -#: ../source/book.xml:21538 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:21549 -msgid "There are two useful options which modify the dumpfile generator's behavior. The first is the 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." -msgstr "" - -#.(para) -#: ../source/book.xml:21560 -msgid "The second useful option is . This option causes svnadmin dump 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 svnadmin dump creates. There are, however, disadvantages to using this option—deltified dumpfiles are more CPU intensive to create, cannot be operated on by svndumpfilter, and tend not to compress as well as their non-deltified counterparts when using third-party tools like gzip and bzip2." -msgstr "" - -#.(screen) -#: ../source/book.xml:21578 -#, no-wrap -msgid "\n--revision (-r) REV\n--incremental\n--quiet (-q)\n--deltas\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21589 -msgid "Dump your whole repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21590 -#, no-wrap -msgid "\n$ svnadmin dump /var/svn/repos\nSVN-fs-dump-format-version: 1\nRevision-number: 0\n* Dumped revision 0.\nProp-content-length: 56\nContent-length: 56\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21599 -msgid "Incrementally dump a single transaction from your repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21601 -#, no-wrap -msgid "\n$ svnadmin dump /var/svn/repos -r 21 --incremental \n* Dumped revision 21.\nSVN-fs-dump-format-version: 1\nRevision-number: 21\nProp-content-length: 101\nContent-length: 101\n…\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:21619 -msgid "svnadmin help" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21626 -#, no-wrap -msgid "svnadmin help [SUBCOMMAND...]" -msgstr "" - -#.(para) -#: ../source/book.xml:21632 -msgid "This subcommand is useful when you're trapped on a desert island with neither a net connection nor a copy of this book." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21649 -msgid "hotcopy" -msgstr "" - -#.(refname) -#: ../source/book.xml:21652 -msgid "svnadmin hotcopy" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21653 -msgid "Make a hot copy of a repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21659 -#, no-wrap -msgid "svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21665 -msgid "This subcommand makes a full hot backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the option, svnadmin 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." -msgstr "" - -#.(screen) -#: ../source/book.xml:21679 -#, no-wrap -msgid "\n--clean-logs\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21683 -msgid "As described in , hot-copied Berkeley DB repositories are not portable across operating systems, nor will they work on machines with a different endianness than the machine where they were created." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21695 -msgid "list-dblogs" -msgstr "" - -#.(refname) -#: ../source/book.xml:21698 -msgid "svnadmin list-dblogs" -msgstr "" - -#.(literal) -#: ../source/book.xml:21702 ../source/book.xml:21733 ../source/book.xml:21926 -msgid "bdb" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21699 -msgid "Ask Berkeley DB which log files exist for a given Subversion repository (applies only to repositories using the backend)." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21708 -#, no-wrap -msgid "svnadmin list-dblogs REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21714 ../source/book.xml:21745 -msgid "Berkeley DB creates logs of all changes to the repository, which allow it to recover in the face of catastrophe. Unless you enable DB_LOG_AUTOREMOVE, the log files accumulate, although most are no longer used and can be deleted to reclaim disk space. See for more information." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21727 -msgid "list-unused-dblogs" -msgstr "" - -#.(refname) -#: ../source/book.xml:21730 -msgid "svnadmin list-unused-dblogs" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21731 -msgid "Ask Berkeley DB which log files can be safely deleted (applies only to repositories using the backend)." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21739 -#, no-wrap -msgid "svnadmin list-unused-dblogs REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21757 -msgid "Remove all unused log files from a repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21758 -#, no-wrap -msgid "\n$ svnadmin list-unused-dblogs /var/svn/repos\n/var/svn/repos/log.0000000031\n/var/svn/repos/log.0000000032\n/var/svn/repos/log.0000000033\n\n$ svnadmin list-unused-dblogs /var/svn/repos | xargs rm\n## disk space reclaimed!\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21773 -msgid "load" -msgstr "" - -#.(refname) -#: ../source/book.xml:21776 -msgid "svnadmin load" -msgstr "" - -#.(quote) -#: ../source/book.xml:21778 -msgid "dumpfile" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21777 -msgid "Read a -formatted stream from stdin." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21785 -#, no-wrap -msgid "svnadmin load REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21791 -msgid "Read a dumpfile-formatted stream from stdin, committing new revisions into the repository's filesystem. Send progress feedback to stdout." -msgstr "" - -#.(screen) -#: ../source/book.xml:21799 -#, no-wrap -msgid "\n--quiet (-q)\n--ignore-uuid\n--force-uuid\n--use-pre-commit-hook\n--use-post-commit-hook\n--parent-dir\n" -msgstr "" - -#.(title) -#: ../source/book.xml:21810 ../source/book.xml:21862 ../source/book.xml:22024 -msgid "Example" -msgstr "" - -#.(para) -#: ../source/book.xml:21812 -msgid "This shows the beginning of loading a repository from a backup file (made, of course, with svnadmin dump):" -msgstr "" - -#.(screen) -#: ../source/book.xml:21815 -#, no-wrap -msgid "\n$ svnadmin load /var/svn/restored < repos-backup\n<<< Started new txn, based on original revision 1\n * adding path : test ... done.\n * adding path : test/a ... done.\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21822 -msgid "Or if you want to load into a subdirectory:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21823 -#, no-wrap -msgid "\n$ svnadmin load --parent-dir new/subdir/for/project /var/svn/restored < repos-backup\n<<< Started new txn, based on original revision 1\n * adding path : test ... done.\n * adding path : test/a ... done.\n…\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21836 -msgid "lslocks" -msgstr "" - -#.(refname) -#: ../source/book.xml:21839 -msgid "svnadmin lslocks" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21840 -msgid "Print descriptions of all locks." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21846 -#, no-wrap -msgid "svnadmin lslocks REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21852 -msgid "Print descriptions of all locks in a repository." -msgstr "" - -#.(para) -#: ../source/book.xml:21864 -msgid "This lists the one locked file in the repository at /var/svn/repos:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21866 -#, no-wrap -msgid "\n$ svnadmin lslocks /var/svn/repos\nPath: /tree.jpg\nUUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\nOwner: harry\nCreated: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\nExpires: \nComment (1 line):\nRework the uppermost branches on the bald cypress in the foreground.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21882 -msgid "lstxns" -msgstr "" - -#.(refname) -#: ../source/book.xml:21885 -msgid "svnadmin lstxns" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21886 -msgid "Print the names of all uncommitted transactions." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21892 -#, no-wrap -msgid "svnadmin lstxns REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21898 -msgid "Print the names of all uncommitted transactions. See for information on how uncommitted transactions are created and what you should do with them." -msgstr "" - -#.(para) -#: ../source/book.xml:21907 -msgid "List all outstanding transactions in a repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:21909 -#, no-wrap -msgid "\n$ svnadmin lstxns /var/svn/repos/ \n1w\n1x\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21920 -msgid "recover" -msgstr "" - -#.(refname) -#: ../source/book.xml:21923 -msgid "svnadmin recover" -msgstr "" - -#.(filename) -#: ../source/book.xml:21927 -msgid "repos/conf/passwd" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:21924 -msgid "Bring a repository database back into a consistent state (applies only to repositories using the backend). In addition, if does not exist, it will create a default password file ." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:21934 -#, no-wrap -msgid "svnadmin recover REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:21940 -msgid "Run this command if you get an error indicating that your repository needs to be recovered." -msgstr "" - -#.(screen) -#: ../source/book.xml:21947 -#, no-wrap -msgid "\n--wait\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21955 -msgid "Recover a hung repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21956 -#, no-wrap -msgid "\n$ svnadmin recover /var/svn/repos/ \nRepository lock acquired.\nPlease wait; recovering the repository may take some time...\n\nRecovery completed.\nThe latest repos revision is 34.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21964 -msgid "Recovering the database requires an exclusive lock on the repository. (This is a database lock; see .) If another process is accessing the repository, then svnadmin recover will error:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21969 -#, no-wrap -msgid "\n$ svnadmin recover /var/svn/repos\nsvn: Failed to get exclusive repository access; perhaps another process\nsuch as httpd, svnserve or svn has it open?\n\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:21976 -msgid "The option, however, will cause svnadmin recover to wait indefinitely for other processes to disconnect:" -msgstr "" - -#.(screen) -#: ../source/book.xml:21979 -#, no-wrap -msgid "\n$ svnadmin recover /var/svn/repos --wait\nWaiting on repository lock; perhaps another process has it open?\n\n### time goes by…\n\nRepository lock acquired.\nPlease wait; recovering the repository may take some time...\n\nRecovery completed.\nThe latest repos revision is 34.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:21997 -msgid "rmlocks" -msgstr "" - -#.(refname) -#: ../source/book.xml:22000 -msgid "svnadmin rmlocks" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22001 -msgid "Unconditionally remove one or more locks from a repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22008 -#, no-wrap -msgid "svnadmin rmlocks REPOS_PATH LOCKED_PATH..." -msgstr "" - -#.(para) -#: ../source/book.xml:22014 -msgid "Remove lock from each LOCKED_PATH." -msgstr "" - -#.(para) -#: ../source/book.xml:22026 -msgid "This deletes the locks on tree.jpg and house.jpg in the repository at /var/svn/repos" -msgstr "" - -#.(screen) -#: ../source/book.xml:22030 -#, no-wrap -msgid "\n$ svnadmin rmlocks /var/svn/repos tree.jpg house.jpg\nRemoved lock on '/tree.jpg.\nRemoved lock on '/house.jpg.\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22041 -msgid "rmtxns" -msgstr "" - -#.(refname) -#: ../source/book.xml:22044 -msgid "svnadmin rmtxns" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22045 -msgid "Delete transactions from a repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22051 -#, no-wrap -msgid "svnadmin rmtxns REPOS_PATH TXN_NAME..." -msgstr "" - -#.(para) -#: ../source/book.xml:22057 -msgid "Delete outstanding transactions from a repository. This is covered in detail in ." -msgstr "" - -#.(screen) -#: ../source/book.xml:22064 -#, no-wrap -msgid "\n--quiet (-q)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22072 -msgid "Remove named transactions:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22073 -#, no-wrap -msgid "\n$ svnadmin rmtxns /var/svn/repos/ 1w 1x\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22076 -msgid "Fortunately, the output of lstxns works great as the input for rmtxns:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22078 -#, no-wrap -msgid "\n$ svnadmin rmtxns /var/svn/repos/ `svnadmin lstxns /var/svn/repos/`\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22081 -msgid "Which will remove all uncommitted transactions from your repository." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22089 -msgid "setlog" -msgstr "" - -#.(refname) -#: ../source/book.xml:22092 -msgid "svnadmin setlog" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22093 -msgid "Set the log-message on a revision." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22099 -#, no-wrap -msgid "svnadmin setlog REPOS_PATH -r REVISION FILE" -msgstr "" - -#.(para) -#: ../source/book.xml:22105 -msgid "Set the log-message on revision REVISION to the contents of FILE." -msgstr "" - -#.(para) -#: ../source/book.xml:22107 -msgid "This is similar to using svn propset --revprop to set the svn:log property on a revision, except that you can also use the 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." -msgstr "" - -#.(para) -#: ../source/book.xml:22115 -msgid "Revision properties are not under version control, so this command will permanently overwrite the previous log message." -msgstr "" - -#.(screen) -#: ../source/book.xml:22124 -#, no-wrap -msgid "\n--revision (-r) REV\n--bypass-hooks\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22133 -msgid "Set the log message for revision 19 to the contents of the file msg:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22135 -#, no-wrap -msgid "\n$ svnadmin setlog /var/svn/repos/ -r 19 msg\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22146 -msgid "verify" -msgstr "" - -#.(refname) -#: ../source/book.xml:22149 -msgid "svnadmin verify" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22150 -msgid "Verify the data stored in the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22156 -#, no-wrap -msgid "svnadmin verify REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22162 -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 bitrot. 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?)." -msgstr "" - -#.(para) -#: ../source/book.xml:22178 -msgid "Verify a hung repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22179 -#, no-wrap -msgid "\n$ svnadmin verify /var/svn/repos/ \n* Verified revision 1729.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22196 -msgid "svnlook 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 peeking. svnlook is typically used by the repository hooks, but a repository administrator might find it useful for diagnostic purposes." -msgstr "" - -#.(para) -#: ../source/book.xml:22203 -msgid "Since svnlook 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." -msgstr "" - -#.(para) -#: ../source/book.xml:22206 -msgid "If no revision or transaction is specified, svnlook defaults to the youngest (most recent) revision of the repository." -msgstr "" - -#.(title) -#: ../source/book.xml:22212 -msgid "svnlook Options" -msgstr "" - -#.(para) -#: ../source/book.xml:22214 -msgid "Options in svnlook are global, just like in svn and svnadmin; however, most options only apply to one subcommand since the functionality of svnlook is (intentionally) limited in scope." -msgstr "" - -#.(para) -#: ../source/book.xml:22226 -msgid "Prevents svnlook diff 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." -msgstr "" - -#.(option) -#: ../source/book.xml:22235 -msgid "--no-diff-added" -msgstr "" - -#.(para) -#: ../source/book.xml:22238 -msgid "Prevents svnlook diff 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." -msgstr "" - -#.(term) -#: ../source/book.xml:22246 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:22249 -msgid "Specify a particular revision number that you wish to examine." -msgstr "" - -#.(term) -#: ../source/book.xml:22266 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:22269 -msgid "Specify a particular transaction ID that you wish to examine." -msgstr "" - -#.(option) -#: ../source/book.xml:22275 -msgid "--show-ids" -msgstr "" - -#.(para) -#: ../source/book.xml:22278 -msgid "Show the filesystem node revision IDs for each path in the filesystem tree." -msgstr "" - -#.(title) -#: ../source/book.xml:22287 -msgid "svnlook Subcommands" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22293 -msgid "author" -msgstr "" - -#.(refname) -#: ../source/book.xml:22296 -msgid "svnlook author" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22297 -msgid "Print the author." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22303 -#, no-wrap -msgid "svnlook author REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22309 -msgid "Print the author of a revision or transaction in the repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:22316 ../source/book.xml:22359 ../source/book.xml:22452 ../source/book.xml:22505 ../source/book.xml:22619 ../source/book.xml:22759 ../source/book.xml:22855 -#, no-wrap -msgid "\n--revision (-r) REV\n--transaction (-t)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22325 -msgid "svnlook author is handy, but not very exciting:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22327 -#, no-wrap -msgid "\n$ svnlook author -r 40 /var/svn/repos \nsally\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22340 -msgid "svnlook cat" -msgstr "" - -#.(refpurpose), (para) -#: ../source/book.xml:22341 ../source/book.xml:22353 -msgid "Print the contents of a file." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22347 -#, no-wrap -msgid "svnlook cat REPOS_PATH PATH_IN_REPOS" -msgstr "" - -#.(para) -#: ../source/book.xml:22368 -msgid "This shows the contents of a file in transaction ax8, located at /trunk/README:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22371 -#, no-wrap -msgid "\n$ svnlook cat -t ax8 /var/svn/repos /trunk/README\n\n Subversion, a version control system.\n =====================================\n\n$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $\n\nContents:\n\n I. A FEW POINTERS\n II. DOCUMENTATION\n III. PARTICIPATING IN THE SUBVERSION COMMUNITY\n…\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22392 -msgid "changed" -msgstr "" - -#.(refname) -#: ../source/book.xml:22395 -msgid "svnlook changed" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22396 -msgid "Print the paths that were changed." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22402 -#, no-wrap -msgid "svnlook changed REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22408 -msgid "Print the paths that were changed in a particular revision or transaction, as well as svn update-style status letters in the first two columns:" -msgstr "" - -#.(term) -#: ../source/book.xml:22414 -msgid "'A '" -msgstr "" - -#.(para) -#: ../source/book.xml:22416 -msgid "Item added to repository." -msgstr "" - -#.(term) -#: ../source/book.xml:22420 -msgid "'D '" -msgstr "" - -#.(para) -#: ../source/book.xml:22422 -msgid "Item deleted from repository." -msgstr "" - -#.(term) -#: ../source/book.xml:22426 -msgid "'U '" -msgstr "" - -#.(para) -#: ../source/book.xml:22428 -msgid "File contents changed." -msgstr "" - -#.(term) -#: ../source/book.xml:22432 -msgid "' U'" -msgstr "" - -#.(para) -#: ../source/book.xml:22434 -msgid "Properties of item changed. Note the leading space." -msgstr "" - -#.(term) -#: ../source/book.xml:22438 -msgid "'UU'" -msgstr "" - -#.(para) -#: ../source/book.xml:22440 -msgid "File contents and properties changed." -msgstr "" - -#.(para) -#: ../source/book.xml:22444 -msgid "Files and directories can be distinguished, as directory paths are displayed with a trailing '/' character." -msgstr "" - -#.(para) -#: ../source/book.xml:22461 -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 /:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22465 -#, no-wrap -msgid "\n$ svnlook changed -r 39 /var/svn/repos\nA trunk/vendors/deli/\nA trunk/vendors/deli/chips.txt\nA trunk/vendors/deli/sandwich.txt\nA trunk/vendors/deli/pickle.txt\nU trunk/vendors/baker/bagel.txt\n U trunk/vendors/baker/croissant.txt\nUU trunk/vendors/baker/pretzel.txt\nD trunk/vendors/baker/baguette.txt\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22482 -msgid "date" -msgstr "" - -#.(refname) -#: ../source/book.xml:22485 -msgid "svnlook date" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22486 -msgid "Print the datestamp." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22492 -#, no-wrap -msgid "svnlook date REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22498 -msgid "Print the datestamp of a revision or transaction in a repository." -msgstr "" - -#.(para) -#: ../source/book.xml:22514 -msgid "This shows the date of revision 40 of a test repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22516 -#, no-wrap -msgid "\n$ svnlook date -r 40 /var/svn/repos/\n2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22529 -msgid "svnlook diff" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22530 -msgid "Print differences of changed files and properties." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22536 -#, no-wrap -msgid "svnlook diff REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22542 -msgid "Print GNU-style differences of changed files and properties in a repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:22549 -#, no-wrap -msgid "\n--revision (-r) REV\n--transaction (-t)\n--no-diff-added\n--no-diff-deleted\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22560 -msgid "This shows a newly added (empty) file, a deleted file, and a copied file:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22562 -#, no-wrap -msgid "\n$ svnlook diff -r 40 /var/svn/repos/\nCopied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)\n\nAdded: trunk/vendors/deli/soda.txt\n==============================================================================\n\nModified: trunk/vendors/deli/sandwich.txt\n==============================================================================\n--- trunk/vendors/deli/sandwich.txt\t(original)\n+++ trunk/vendors/deli/sandwich.txt\t2003-02-22 17:45:04.000000000 -0600\n@@ -0,0 +1 @@\n+Don't forget the mayo!\n\nModified: trunk/vendors/deli/logo.jpg\n==============================================================================\n(Binary files differ)\n\nDeleted: trunk/vendors/deli/chips.txt\n==============================================================================\n\nDeleted: trunk/vendors/deli/pickle.txt\n==============================================================================\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22586 -msgid "If a file has a non-textual svn:mime-type property, then the differences are not explicitly shown." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22595 -msgid "dirs-changed" -msgstr "" - -#.(refname) -#: ../source/book.xml:22598 -msgid "svnlook dirs-changed" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22599 -msgid "Print the directories that were themselves changed." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22605 -#, no-wrap -msgid "svnlook dirs-changed REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22611 -msgid "Print the directories that were themselves changed (property edits) or whose file children were changed." -msgstr "" - -#.(para) -#: ../source/book.xml:22628 -msgid "This shows the directories that changed in revision 40 in our sample repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22630 -#, no-wrap -msgid "\n$ svnlook dirs-changed -r 40 /var/svn/repos\ntrunk/vendors/deli/\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22643 -msgid "svnlook help" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22650 -#, no-wrap -msgid "Also svnlook -h and svnlook -?." -msgstr "" - -#.(para) -#: ../source/book.xml:22656 -msgid "Displays the help message for svnlook. This command, like its brother svn help, is also your friend, even though you never call it anymore and forgot to invite it to your last party." -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22672 -msgid "history" -msgstr "" - -#.(refname) -#: ../source/book.xml:22675 -msgid "svnlook history" -msgstr "" - -#.(refpurpose), (para) -#: ../source/book.xml:22676 ../source/book.xml:22690 -msgid "Print information about the history of a path in the repository (or the root directory if no path is supplied)." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22684 -#, no-wrap -msgid "svnlook history REPOS_PATH [PATH_IN_REPOS]" -msgstr "" - -#.(screen) -#: ../source/book.xml:22698 -#, no-wrap -msgid "\n--revision (-r) REV\n--show-ids\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22707 -msgid "This shows the history output for the path /tags/1.0 as of revision 20 in our sample repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:22710 -#, no-wrap -msgid "\n$ svnlook history -r 20 /var/svn/repos /tags/1.0 --show-ids\nREVISION PATH <ID>\n-------- ---------\n 19 /tags/1.0 <1.2.12>\n 17 /branches/1.0-rc2 <1.1.10>\n 16 /branches/1.0-rc2 <1.1.x>\n 14 /trunk <1.0.q>\n 13 /trunk <1.0.o>\n 11 /trunk <1.0.k>\n 9 /trunk <1.0.g>\n 8 /trunk <1.0.e>\n 7 /trunk <1.0.b>\n 6 /trunk <1.0.9>\n 5 /trunk <1.0.7>\n 4 /trunk <1.0.6>\n 2 /trunk <1.0.3>\n 1 /trunk <1.0.2>\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22738 -msgid "svnlook info" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22739 -msgid "Print the author, datestamp, log message size, and log message." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22746 -#, no-wrap -msgid "svnlook info REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22752 -msgid "Print the author, datestamp, log message size (in bytes) and log message, followed by a newline character." -msgstr "" - -#.(para) -#: ../source/book.xml:22768 -msgid "This shows the info output for revision 40 in our sample repository." -msgstr "" - -#.(screen) -#: ../source/book.xml:22770 -#, no-wrap -msgid "\n$ svnlook info -r 40 /var/svn/repos\nsally\n2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n16\nRearrange lunch.\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22786 -msgid "svnlook lock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22787 -msgid "If a lock exists on a path in the repository, describe it." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22794 -#, no-wrap -msgid "svnlook lock REPOS_PATH PATH_IN_REPOS" -msgstr "" - -#.(para) -#: ../source/book.xml:22800 -msgid "Print all information available for the lock at PATH_IN_REPOS. If PATH_IN_REPOS is not locked, print nothing." -msgstr "" - -#.(para) -#: ../source/book.xml:22815 -msgid "This describes the lock on the file tree.jpg." -msgstr "" - -#.(screen) -#: ../source/book.xml:22817 -#, no-wrap -msgid "\n$ svnlook lock /var/svn/repos tree.jpg\nUUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\nOwner: harry\nCreated: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\nExpires: \nComment (1 line):\nRework the uppermost branches on the bald cypress in the foreground.\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22835 -msgid "svnlook log" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22836 -msgid "Print the log message, followed by a newline character." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22843 -#, no-wrap -msgid "svnlook log REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:22849 -msgid "Print the log message." -msgstr "" - -#.(para) -#: ../source/book.xml:22864 -msgid "This shows the log output for revision 40 in our sample repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22866 -#, no-wrap -msgid "\n$ svnlook log /var/svn/repos/\nRearrange lunch.\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22879 -msgid "svnlook propget" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22880 -msgid "Print the raw value of a property on a path in the repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22887 -#, no-wrap -msgid "svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS]" -msgstr "" - -#.(para) -#: ../source/book.xml:22893 -msgid "List the value of a property on a path in the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:22900 -msgid "pg, pget" -msgstr "" - -#.(screen) -#: ../source/book.xml:22906 -#, no-wrap -msgid "\n--revision (-r) REV\n--transaction (-t)\n--revprop\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22916 -msgid "This shows the value of the seasonings property on the file /trunk/sandwich in the HEAD revision:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22919 -#, no-wrap -msgid "\n$ svnlook pg /var/svn/repos seasonings /trunk/sandwich\nmustard\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:22932 -msgid "svnlook proplist" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22933 -msgid "Print the names and values of versioned file and directory properties." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:22940 -#, no-wrap -msgid "svnlook proplist REPOS_PATH [PATH_IN_REPOS]" -msgstr "" - -#.(para) -#: ../source/book.xml:22946 -msgid "List the properties of a path in the repository. With , show the property values too." -msgstr "" - -#.(para) -#: ../source/book.xml:22953 -msgid "pl, plist" -msgstr "" - -#.(screen) -#: ../source/book.xml:22959 -#, no-wrap -msgid "\n--revision (-r) REV\n--transaction (-t)\n--verbose (-v)\n--revprop\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22970 -msgid "This shows the names of properties set on the file /trunk/README in the HEAD revision:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22973 -#, no-wrap -msgid "\n$ svnlook proplist /var/svn/repos /trunk/README\n original-author\n svn:mime-type\n" -msgstr "" - -#.(para) -#: ../source/book.xml:22978 -msgid "This is the same command as in the previous example, but this time showing the property values as well:" -msgstr "" - -#.(screen) -#: ../source/book.xml:22980 -#, no-wrap -msgid "\n$ svnlook --verbose proplist /var/svn/repos /trunk/README\n original-author : fitz\n svn:mime-type : text/plain\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:22991 -msgid "tree" -msgstr "" - -#.(refname) -#: ../source/book.xml:22994 -msgid "svnlook tree" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:22995 -msgid "Print the tree." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23001 -#, no-wrap -msgid "svnlook tree REPOS_PATH [PATH_IN_REPOS]" -msgstr "" - -#.(para) -#: ../source/book.xml:23007 -msgid "Print the tree, starting at PATH_IN_REPOS (if supplied, at the root of the tree otherwise), optionally showing node revision IDs." -msgstr "" - -#.(screen) -#: ../source/book.xml:23016 -#, no-wrap -msgid "\n--revision (-r) REV\n--transaction (-t)\n--show-ids\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23026 -msgid "This shows the tree output (with node-IDs) for revision 40 in our sample repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23028 -#, no-wrap -msgid "\n$ svnlook tree -r 40 /var/svn/repos --show-ids\n/ <0.0.2j>\n trunk/ <p.0.2j>\n vendors/ <q.0.2j>\n deli/ <1g.0.2j>\n egg.txt <1i.e.2j>\n soda.txt <1k.0.2j>\n sandwich.txt <1j.0.2j>\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:23044 -msgid "uuid" -msgstr "" - -#.(refname) -#: ../source/book.xml:23047 -msgid "svnlook uuid" -msgstr "" - -#.(literal) -#: ../source/book.xml:23049 -msgid "UUID" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23048 -msgid "Print the repository's ." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23055 -#, no-wrap -msgid "svnlook uuid REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:23061 -msgid "Print the UUID for the repository. the UUID is the repository's universal unique identifier. The Subversion client uses this identifier to differentiate between one repository and another." -msgstr "" - -#.(screen) -#: ../source/book.xml:23072 -#, no-wrap -msgid "\n$ svnlook uuid /var/svn/repos\ne7fe1b91-8cd5-0310-98dd-2f12e793c5e8\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:23082 -msgid "youngest" -msgstr "" - -#.(refname) -#: ../source/book.xml:23085 -msgid "svnlook youngest" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23086 -msgid "Print the youngest revision number." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23092 -#, no-wrap -msgid "svnlook youngest REPOS_PATH" -msgstr "" - -#.(para) -#: ../source/book.xml:23098 -msgid "Print the youngest revision number of a repository." -msgstr "" - -#.(para) -#: ../source/book.xml:23104 -msgid "This shows the youngest revision of our sample repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23106 -#, no-wrap -msgid "\n$ svnlook youngest /var/svn/repos/ \n42\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23123 -msgid "svnsync is the Subversion remote repository mirroring tool. Put simply, it allows you to replay the revisions of one repository into another one." -msgstr "" - -#.(para) -#: ../source/book.xml:23126 -msgid "In any mirroring scenario, there are two repositories: the source repository, and the mirror (or sink) repository. The source repository is the repository from which svnsync 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." -msgstr "" - -#.(para) -#: ../source/book.xml:23133 -msgid "The svnsync process requires only read access to the source repository; it never attempts to modify it. But obviously, svnsync requires both read and write access to the mirror repository." -msgstr "" - -#.(para) -#: ../source/book.xml:23138 -msgid "svnsync 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 svnsync process is the only process permitted to modify the mirror repository." -msgstr "" - -#.(title) -#: ../source/book.xml:23147 -msgid "svnsync Options" -msgstr "" - -#.(title) -#: ../source/book.xml:23214 -msgid "svnsync Subcommands" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:23221 -msgid "copy-revprops" -msgstr "" - -#.(refname) -#: ../source/book.xml:23224 -msgid "svnsync copy-revprops" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23225 -msgid "Copy all revision properties for a given revision from the source repository to the mirror repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23233 -#, no-wrap -msgid "svnsync copy-revprops DEST_URL REV" -msgstr "" - -#.(para) -#: ../source/book.xml:23239 -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 svnsync synchronize 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. svnsync copy-revprops is the answer to this problem. Use it to re-synchronize the revision properties for a particular revision." -msgstr "" - -#.(screen) -#: ../source/book.xml:23263 ../source/book.xml:23324 ../source/book.xml:23394 -#, no-wrap -msgid "\n--non-interactive\n--no-auth-cache\n--username NAME\n--password PASS\n--config-dir DIR\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23275 -msgid "Re-synchronize revision properties for a single revision:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23276 -#, no-wrap -msgid "\n$ svnsync copy-revprops file:///var/svn/repos-mirror 6\nCopied properties for revision 6.\n$\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:23287 -msgid "initialize" -msgstr "" - -#.(refname) -#: ../source/book.xml:23290 -msgid "svnsync initialize" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23291 -msgid "Initialize a destination repository for synchronization from another repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23298 -#, no-wrap -msgid "svnsync initialize DEST_URL SOURCE_URL" -msgstr "" - -#.(para) -#: ../source/book.xml:23304 -msgid "svnsync initialize 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 svnsync operation you run on a would-be mirror repository." -msgstr "" - -#.(para) -#: ../source/book.xml:23318 -msgid "init" -msgstr "" - -#.(para) -#: ../source/book.xml:23336 -msgid "Fail to initialize a mirror repository due to inability to modify revision properties:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23338 -#, no-wrap -msgid "\n$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\nsvnsync: Repository has not been enabled to accept revision propchanges;\nask the administrator to create a pre-revprop-change hook\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23344 -msgid "Initialize a repository as a mirror, having already created a pre-revprop-change hook which permits all revision property changes:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23347 -#, no-wrap -msgid "\n$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\nCopied properties for revision 0.\n$\n" -msgstr "" - -#.(tertiary) -#: ../source/book.xml:23358 -msgid "synchronize" -msgstr "" - -#.(refname) -#: ../source/book.xml:23361 -msgid "svnsync synchronize" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23362 -msgid "Transfer all pending revisions from the source repository to the mirror repository." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23369 -#, no-wrap -msgid "svnsync synchronize DEST_URL" -msgstr "" - -#.(para) -#: ../source/book.xml:23375 -msgid "The svnsync synchronize 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." -msgstr "" - -#.(para) -#: ../source/book.xml:23381 -msgid "svnsync synchronize can be gracefully cancelled and restarted." -msgstr "" - -#.(para) -#: ../source/book.xml:23388 -msgid "sync" -msgstr "" - -#.(para) -#: ../source/book.xml:23406 -msgid "Copy unsynchronized revisions from the source repository to the mirror repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23408 -#, no-wrap -msgid "\n$ svnsync synchronize file:///var/svn/repos-mirror\nCommitted revision 1.\nCopied properties for revision 1.\nCommitted revision 2.\nCopied properties for revision 2.\nCommitted revision 3.\nCopied properties for revision 3.\n…\nCommitted revision 45.\nCopied properties for revision 45.\nCommitted revision 46.\nCopied properties for revision 46.\nCommitted revision 47.\nCopied properties for revision 47.\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23438 -msgid "svnserve allows access to Subversion repositories using Subversion's custom network protocol." -msgstr "" - -#.(para) -#: ../source/book.xml:23440 -msgid "You can run svnserve as a standalone server process (for clients that are using the svn:// access method); you can have a daemon such as inetd or xinetd launch it for you on demand (also for svn://), or you can have sshd launch it on demand for the svn+ssh:// access method." -msgstr "" - -#.(para) -#: ../source/book.xml:23448 -msgid "Regardless of the access method, once the client has selected a repository by transmitting its URL, svnserve reads a file named conf/svnserve.conf in the repository directory to determine repository-specific settings such as what authentication database to use and what authorization policies to apply. See for details of the svnserve.conf file." -msgstr "" - -#.(title) -#: ../source/book.xml:23459 -msgid "svnserve Options" -msgstr "" - -#.(para) -#: ../source/book.xml:23461 -msgid "Unlike the previous commands we've described, svnserve has no subcommands—svnserve is controlled exclusively by options." -msgstr "" - -#.(term) -#: ../source/book.xml:23467 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23469 -msgid "Causes svnserve to run in daemon mode. svnserve backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default)." -msgstr "" - -#.(term) -#: ../source/book.xml:23476 -msgid "=PORT" -msgstr "" - -#.(para) -#: ../source/book.xml:23478 -msgid "Causes svnserve to listen on PORT when run in daemon mode. (FreeBSD daemons only listen on tcp6 by default—this option tells them to also listen on tcp4.)" -msgstr "" - -#.(term) -#: ../source/book.xml:23485 -msgid "=HOST" -msgstr "" - -#.(para) -#: ../source/book.xml:23487 -msgid "Causes svnserve to listen on the interface specified by HOST, which may be either a hostname or an IP address." -msgstr "" - -#.(option) -#: ../source/book.xml:23494 -msgid "--foreground" -msgstr "" - -#.(para) -#: ../source/book.xml:23497 -msgid "When used together with , this option causes svnserve to stay in the foreground. This option is mainly useful for debugging." -msgstr "" - -#.(term) -#: ../source/book.xml:23504 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23506 -msgid "Causes svnserve to use the stdin/stdout file descriptors, as is appropriate for a daemon running out of inetd." -msgstr "" - -#.(term) -#: ../source/book.xml:23512 ../source/book.xml:23659 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23514 -msgid "Displays a usage summary and exits." -msgstr "" - -#.(para) -#: ../source/book.xml:23522 -msgid "Displays version information, a list of repository back-end modules available, and exits." -msgstr "" - -#.(term) -#: ../source/book.xml:23527 -msgid "=ROOT (=ROOT)" -msgstr "" - -#.(para) -#: ../source/book.xml:23530 -msgid "Sets the virtual root for repositories served by svnserve. The pathname in URLs provided by the client will be interpreted relative to this root, and will not be allowed to escape this root." -msgstr "" - -#.(term) -#: ../source/book.xml:23538 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23540 -msgid "Causes svnserve to run in tunnel mode, which is just like the inetd 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 ssh. That means there's rarely any need for you to pass this option to svnserve. So if you find yourself typing svnserve --tunnel on the command line, and wondering what to do next, see ." -msgstr "" - -#.(option) -#: ../source/book.xml:23558 -msgid "--tunnel-user NAME" -msgstr "" - -#.(para) -#: ../source/book.xml:23561 -msgid "Used in conjunction with the option; tells svnserve to assume that NAME 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." -msgstr "" - -#.(term) -#: ../source/book.xml:23571 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23573 -msgid "When running in daemon mode, causes svnserve to spawn a thread instead of a process for each connection (e.g. for when running on Windows). The svnserve process still backgrounds itself at startup time." -msgstr "" - -#.(term) -#: ../source/book.xml:23581 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23583 -msgid "Causes svnserve to accept one connection on the svn port, serve it, and exit. This option is mainly useful for debugging." -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23606 -msgid "Summarize the local revision(s) of a working copy." -msgstr "" - -#.(programlisting) -#: ../source/book.xml:23613 -#, no-wrap -msgid "svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]" -msgstr "" - -#.(para) -#: ../source/book.xml:23619 -msgid "svnversion is a program for summarizing the revision mixture of a working copy. The resultant revision number, or revision range, is written to standard output." -msgstr "" - -#.(para) -#: ../source/book.xml:23623 -msgid "It's common to use this output in your build process when defining the version number of your program." -msgstr "" - -#.(para) -#: ../source/book.xml:23625 -msgid "TRAIL_URL, if present, is the trailing portion of the URL used to determine if WC_PATH itself is switched (detection of switches within WC_PATH does not rely on TRAIL_URL)." -msgstr "" - -#.(para) -#: ../source/book.xml:23631 -msgid "When WC_PATH is not defined, the current directory will be used as the working copy path. TRAIL_URL cannot be defined if WC_PATH is not explicitly given." -msgstr "" - -#.(para) -#: ../source/book.xml:23641 -msgid "Like svnserve, svnversion has no subcommands, it only has options." -msgstr "" - -#.(term) -#: ../source/book.xml:23646 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23648 -msgid "Omit the usual trailing newline from the output." -msgstr "" - -#.(term) -#: ../source/book.xml:23652 -msgid " ()" -msgstr "" - -#.(para) -#: ../source/book.xml:23654 -msgid "Use the last-changed revisions rather than the current (i.e., highest locally available) revisions." -msgstr "" - -#.(para) -#: ../source/book.xml:23661 -msgid "Print a help summary." -msgstr "" - -#.(para) -#: ../source/book.xml:23669 -msgid "Print the version of svnversion and exit with no error." -msgstr "" - -#.(para) -#: ../source/book.xml:23679 -msgid "If the working copy is all at the same revision (for example, immediately after an update), then that revision is printed out:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23682 -#, no-wrap -msgid "\n$ svnversion\n4168\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23686 -msgid "You can add TRAIL_URL to make sure that the working copy is not switched from what you expect. Note that the WC_PATH is required in this command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23690 -#, no-wrap -msgid "\n$ svnversion . /var/svn/trunk\n4168\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23694 -msgid "For a mixed-revision working copy, the range of revisions present is printed:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23696 -#, no-wrap -msgid "\n$ svnversion\n4123:4168\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23700 -msgid "If the working copy contains modifications, a trailing \"M\" is added:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23702 -#, no-wrap -msgid "\n$ svnversion\n4168M\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23706 -msgid "If the working copy is switched, a trailing \"S\" is added:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23708 -#, no-wrap -msgid "\n$ svnversion\n4168S\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23712 -msgid "Thus, here is a mixed-revision, switched working copy containing some local modifications:" -msgstr "" - -#.(screen) -#: ../source/book.xml:23714 -#, no-wrap -msgid "\n$ svnversion\n4212:4168MS\n" -msgstr "" - -#.(para) -#: ../source/book.xml:23718 -msgid "If invoked on a directory that is not a working copy, svnversion assumes it is an exported working copy and prints \"exported\":" -msgstr "" - -#.(screen) -#: ../source/book.xml:23721 -#, no-wrap -msgid "\n$ svnversion\nexported\n" -msgstr "" - -#.(refname) -#: ../source/book.xml:23739 -msgid " Configuration Directives" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:23741 -msgid "Apache configuration directives for serving Subversion repositories through Apache HTTP Server." -msgstr "" - -#.(para) -#: ../source/book.xml:23749 -msgid "This section briefly describes each of the Subversion Apache configuration directives. For an in-depth description of configuring Apache with Subversion, see .)" -msgstr "" - -#.(title) -#: ../source/book.xml:23755 -msgid "Directives" -msgstr "" - -#.(literal) -#: ../source/book.xml:23760 -msgid "DAV svn" -msgstr "" - -#.(para) -#: ../source/book.xml:23763 -msgid "This directive must be included in any Directory or Location block for a Subversion repository. It tells httpd to use the Subversion backend for mod_dav to handle all requests." -msgstr "" - -#.(literal) -#: ../source/book.xml:23772 -msgid "SVNAutoversioning On" -msgstr "" - -#.(para) -#: ../source/book.xml:23775 -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 ModMimeUsePathInfo On so that mod_mime can set svn:mime-type to the correct mime-type automatically (as best as mod_mime is able to, of course). For more information, see " -msgstr "" - -#.(literal) -#: ../source/book.xml:23789 -msgid "SVNPath" -msgstr "" - -#.(para) -#: ../source/book.xml:23792 -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 SVNParentPath must be present, but not both." -msgstr "" - -#.(literal) -#: ../source/book.xml:23802 -msgid "SVNSpecialURI" -msgstr "" - -#.(para) -#: ../source/book.xml:23805 -msgid "Specifies the URI component (namespace) for special Subversion resources. The default is !svn, and most administrators will never use this directive. Only set this if there is a pressing need to have a file named !svn 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." -msgstr "" - -#.(literal) -#: ../source/book.xml:23819 -msgid "SVNReposName" -msgstr "" - -#.(para) -#: ../source/book.xml:23822 -msgid "Specifies the name of a Subversion repository for use in HTTP GET 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." -msgstr "" - -#.(literal) -#: ../source/book.xml:23832 -msgid "SVNIndexXSLT" -msgstr "" - -#.(para) -#: ../source/book.xml:23835 -msgid "Specifies the URI of an XSL transformation for directory indexes. This directive is optional." -msgstr "" - -#.(literal) -#: ../source/book.xml:23841 -msgid "SVNParentPath" -msgstr "" - -#.(para) -#: ../source/book.xml:23844 -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 SVNPath must be present, but not both." -msgstr "" - -#.(literal) -#: ../source/book.xml:23854 -msgid "SVNPathAuthz" -msgstr "" - -#.(para) -#: ../source/book.xml:23857 -msgid "Control path-based authorization by enabling or disabling subrequests. See for details." -msgstr "" - -#.(title) -#: ../source/book.xml:23870 -msgid "Subversion properties" -msgstr "" - -#.(para) -#: ../source/book.xml:23872 -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 svn: (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 svn: properties." -msgstr "" - -#.(title) -#: ../source/book.xml:23881 -msgid "Versioned Properties" -msgstr "" - -#.(literal) -#: ../source/book.xml:23886 -msgid "svn:executable" -msgstr "" - -#.(para) -#: ../source/book.xml:23889 -msgid "If present on a file, the client will make the file executable in Unix-hosted working copies. See ." -msgstr "" - -#.(literal) -#: ../source/book.xml:23896 -msgid "svn:mime-type" -msgstr "" - -#.(para) -#: ../source/book.xml:23899 -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 ." -msgstr "" - -#.(literal) -#: ../source/book.xml:23909 -msgid "svn:ignore" -msgstr "" - -#.(para) -#: ../source/book.xml:23912 -msgid "If present on a directory, the value is a list of unversioned file patterns to be ignored by svn status and other subcommands. See " -msgstr "" - -#.(literal) -#: ../source/book.xml:23921 -msgid "svn:keywords" -msgstr "" - -#.(para) -#: ../source/book.xml:23924 -msgid "If present on a file, the value tells the client how to expand particular keywords within the file. See ." -msgstr "" - -#.(literal) -#: ../source/book.xml:23932 -msgid "svn:eol-style" -msgstr "" - -#.(para) -#: ../source/book.xml:23935 -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 and ." -msgstr "" - -#.(literal) -#: ../source/book.xml:23943 -msgid "svn:externals" -msgstr "" - -#.(para) -#: ../source/book.xml:23946 -msgid "If present on a directory, the value is a multi-line list of other paths and URLs the client should check out. See ." -msgstr "" - -#.(literal) -#: ../source/book.xml:23954 -msgid "svn:special" -msgstr "" - -#.(para) -#: ../source/book.xml:23959 -msgid "As of this writing, symbolic links are indeed the only special objects. But there might be more in future releases of Subversion." -msgstr "" - -#.(para) -#: ../source/book.xml:23957 -msgid "If present on a file, indicates that the file is not an ordinary file, but a symbolic link or other special object." -msgstr "" - -#.(literal) -#: ../source/book.xml:23967 -msgid "svn:needs-lock" -msgstr "" - -#.(para) -#: ../source/book.xml:23970 -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 ." -msgstr "" - -#.(title) -#: ../source/book.xml:23980 -msgid "Unversioned Properties" -msgstr "" - -#.(literal) -#: ../source/book.xml:23985 -msgid "svn:author" -msgstr "" - -#.(para) -#: ../source/book.xml:23988 -msgid "If present, contains the authenticated username of the person who created the revision. (If not present, then the revision was committed anonymously.)" -msgstr "" - -#.(literal) -#: ../source/book.xml:23995 -msgid "svn:date" -msgstr "" - -#.(para) -#: ../source/book.xml:23998 -msgid "Contains the UTC time the revision was created, in ISO 8601 format. The value comes from the server machine's clock, not the client's." -msgstr "" - -#.(literal) -#: ../source/book.xml:24006 -msgid "svn:log" -msgstr "" - -#.(para) -#: ../source/book.xml:24009 -msgid "Contains the log message describing the revision." -msgstr "" - -#.(literal) -#: ../source/book.xml:24015 -msgid "svn:autoversioned" -msgstr "" - -#.(para) -#: ../source/book.xml:24018 -msgid "If present, the revision was created via the autoversioning feature. See ." -msgstr "" - -#.(title) -#: ../source/book.xml:24031 -msgid "Repository Hooks" -msgstr "" - -#.(primary) -#: ../source/book.xml:24036 ../source/book.xml:24083 ../source/book.xml:24132 ../source/book.xml:24178 ../source/book.xml:24241 ../source/book.xml:24303 ../source/book.xml:24354 ../source/book.xml:24400 ../source/book.xml:24453 -msgid "repository" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24038 ../source/book.xml:24041 -msgid "start-commit" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24042 -msgid "Notification of the beginning of a commit." -msgstr "" - -#.(para) -#: ../source/book.xml:24048 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24051 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:24058 ../source/book.xml:24109 ../source/book.xml:24155 ../source/book.xml:24205 ../source/book.xml:24267 ../source/book.xml:24327 ../source/book.xml:24374 ../source/book.xml:24426 ../source/book.xml:24473 -msgid "Input Parameter(s)" -msgstr "" - -#.(para) -#: ../source/book.xml:24060 ../source/book.xml:24111 ../source/book.xml:24157 ../source/book.xml:24207 ../source/book.xml:24269 ../source/book.xml:24329 ../source/book.xml:24376 ../source/book.xml:24428 ../source/book.xml:24475 -msgid "The command-line arguments passed to the hook program, in order, are:" -msgstr "" - -#.(para) -#: ../source/book.xml:24064 ../source/book.xml:24115 ../source/book.xml:24161 ../source/book.xml:24211 ../source/book.xml:24273 ../source/book.xml:24333 ../source/book.xml:24380 ../source/book.xml:24432 ../source/book.xml:24479 -msgid "repository path" -msgstr "" - -#.(para) -#: ../source/book.xml:24067 -msgid "authenticated username attempting the commit" -msgstr "" - -#.(title) -#: ../source/book.xml:24073 ../source/book.xml:24124 ../source/book.xml:24170 ../source/book.xml:24233 ../source/book.xml:24295 ../source/book.xml:24346 ../source/book.xml:24392 ../source/book.xml:24445 ../source/book.xml:24491 -msgid "Common Uses" -msgstr "" - -#.(para) -#: ../source/book.xml:24075 ../source/book.xml:24348 ../source/book.xml:24447 -msgid "access control" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24085 ../source/book.xml:24088 -msgid "pre-commit" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24089 -msgid "Notification just prior to commit completion." -msgstr "" - -#.(para) -#: ../source/book.xml:24095 -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)." -msgstr "" - -#.(para) -#: ../source/book.xml:24102 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24118 -msgid "commit transaction name" -msgstr "" - -#.(para) -#: ../source/book.xml:24126 -msgid "change validation and control" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24134 ../source/book.xml:24137 -msgid "post-commit" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24138 -msgid "Notification of a successful commit." -msgstr "" - -#.(para) -#: ../source/book.xml:24144 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24150 -msgid "The output from, and exit value returned by the post-commit hook program are ignored." -msgstr "" - -#.(para) -#: ../source/book.xml:24164 -msgid "revision number created by the commit" -msgstr "" - -#.(para) -#: ../source/book.xml:24172 -msgid "commit notification, tool integration" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24180 ../source/book.xml:24183 -msgid "pre-revprop-change" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24184 -msgid "Notification of a revision property change attempt." -msgstr "" - -#.(para) -#: ../source/book.xml:24191 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24198 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24214 -msgid "revision whose property is about to be modified" -msgstr "" - -#.(para) -#: ../source/book.xml:24217 -msgid "authenticated username attempting the propchange" -msgstr "" - -#.(para) -#: ../source/book.xml:24220 ../source/book.xml:24282 -msgid "name of the property changed" -msgstr "" - -#.(para) -#: ../source/book.xml:24223 ../source/book.xml:24285 -msgid "change description: A (added), D (deleted), or M (modified)" -msgstr "" - -#.(para) -#: ../source/book.xml:24228 -msgid "Additionally, Subversion passes to the hook program via standard input the proposed value of the property." -msgstr "" - -#.(para) -#: ../source/book.xml:24235 -msgid "access control, change validation and control" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24243 ../source/book.xml:24246 -msgid "post-revprop-change" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24247 -msgid "Notification of a successful revision property change." -msgstr "" - -#.(para) -#: ../source/book.xml:24254 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24262 -msgid "The output from, and exit value returned by, the post-revprop-change hook program are ignored." -msgstr "" - -#.(para) -#: ../source/book.xml:24276 -msgid "revision whose property was modified" -msgstr "" - -#.(para) -#: ../source/book.xml:24279 -msgid "authenticated username of the person making the change" -msgstr "" - -#.(para) -#: ../source/book.xml:24290 -msgid "Additionally, Subversion passes to the hook program, via standard input, the previous value of the property." -msgstr "" - -#.(para) -#: ../source/book.xml:24297 -msgid "propchange notification" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24305 ../source/book.xml:24308 -msgid "pre-lock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24309 -msgid "Notification of a path lock attempt." -msgstr "" - -#.(para) -#: ../source/book.xml:24315 -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 steal the existing lock." -msgstr "" - -#.(para) -#: ../source/book.xml:24321 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24336 ../source/book.xml:24435 -msgid "versioned path which is to be locked" -msgstr "" - -#.(para) -#: ../source/book.xml:24339 ../source/book.xml:24438 -msgid "authenticated username of the person attempting the lock" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24356 ../source/book.xml:24359 -msgid "post-lock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24360 -msgid "Notification of a successful path lock." -msgstr "" - -#.(para) -#: ../source/book.xml:24366 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24369 -msgid "The output from and exit value returned by the post-lock hook program are ignored." -msgstr "" - -#.(para) -#: ../source/book.xml:24383 -msgid "authenticated username of the person who locked the paths" -msgstr "" - -#.(para) -#: ../source/book.xml:24387 -msgid "Additionally, the list of paths locked is passed to the hook program via standard input, one path per line." -msgstr "" - -#.(para) -#: ../source/book.xml:24394 -msgid "lock notification" -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24402 ../source/book.xml:24405 -msgid "pre-unlock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24406 -msgid "Notification of a path unlock attempt." -msgstr "" - -#.(para) -#: ../source/book.xml:24412 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24420 -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." -msgstr "" - -#.(tertiary), (refname) -#: ../source/book.xml:24455 ../source/book.xml:24458 -msgid "post-unlock" -msgstr "" - -#.(refpurpose) -#: ../source/book.xml:24459 -msgid "Notification of a successful path unlock." -msgstr "" - -#.(para) -#: ../source/book.xml:24465 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24468 -msgid "The output from and exit value returned by, the post-unlock hook program are ignored." -msgstr "" - -#.(para) -#: ../source/book.xml:24482 -msgid "authenticated username of the person who unlocked the paths" -msgstr "" - -#.(para) -#: ../source/book.xml:24486 -msgid "Additionally, the list of paths unlocked is passed to the hook program via standard input, one path per line." -msgstr "" - -#.(para) -#: ../source/book.xml:24493 -msgid "unlock notification" -msgstr "" - -#.(title) -#: ../source/book.xml:24505 -msgid "Subversion Quick-Start Guide" -msgstr "" - -#.(para) -#: ../source/book.xml:24507 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24513 -msgid "If you're new to the entire concept of version control or to the copy-modify-merge model used by both CVS and Subversion, then you should read before going any further." -msgstr "" - -#.(title) -#: ../source/book.xml:24523 -msgid "Installing Subversion" -msgstr "" - -#.(para) -#: ../source/book.xml:24525 -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 does not 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." -msgstr "" - -#.(para) -#: ../source/book.xml:24537 -msgid "The easiest way to get Subversion is to download a binary package built for your operating system. Subversion's website (http://subversion.tigris.org) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:24546 -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 INSTALL 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 -deps. 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 INSTALL file." -msgstr "" - -#.(para) -#: ../source/book.xml:24573 -msgid "Note that the URL checked out in the example above ends not with svn, but with a subdirectory thereof called trunk. See our discussion of Subversion's branching and tagging model for the reasoning behind this." -msgstr "" - -#.(para) -#: ../source/book.xml:24567 -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 http://svn.collab.net/repos/svn/trunk/: " -msgstr "" - -#.(screen) -#: ../source/book.xml:24578 -#, no-wrap -msgid "\n$ svn checkout http://svn.collab.net/repos/svn/trunk subversion\nA subversion/HACKING\nA subversion/INSTALL\nA subversion/README\nA subversion/autogen.sh\nA subversion/build.conf\n…\n" -msgstr "" - -#.(para) -#: ../source/book.xml:24587 -msgid "The above command will create a working copy of the latest (unreleased) Subversion source code into a subdirectory named subversion 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 INSTALL file in the top level of the working copy for details." -msgstr "" - -#.(title) -#: ../source/book.xml:24603 -msgid "High-speed Tutorial" -msgstr "" - -#.(quote) -#: ../source/book.xml:24607 -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…." -msgstr "" - -#.(para) -#: ../source/book.xml:24612 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24617 -msgid "The examples used in this appendix assume that you have svn, the Subversion command-line client, and svnadmin, 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 svn --version to check.)" -msgstr "" - -#.(para) -#: ../source/book.xml:24626 -msgid "Subversion stores all versioned data in a central repository. To begin, create a new repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:24628 -#, no-wrap -msgid "\n$ svnadmin create /var/svn/repos\n$ ls /var/svn/repos\nconf/ dav/ db/ format hooks/ locks/ README.txt\n" -msgstr "" - -#.(para) -#: ../source/book.xml:24633 -msgid "This command creates a new directory /var/svn/repos 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:24640 -msgid "Subversion has no concept of a project. 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 . Either way, the repository only manages files and directories, so it's up to humans to interpret particular directories as projects. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:24653 -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 myproject (or whatever you wish). For reasons that will be clear later (see ), your project's tree structure should contain three top-level directories named branches, tags, and trunk. The trunk directory should contain all of your data, while branches and tags directories are empty:" -msgstr "" - -#.(screen) -#: ../source/book.xml:24667 -#, no-wrap -msgid "\n/tmp/myproject/branches/\n/tmp/myproject/tags/\n/tmp/myproject/trunk/\n foo.c\n bar.c\n Makefile\n …\n" -msgstr "" - -#.(para) -#: ../source/book.xml:24676 -msgid "The branches, tags, and trunk subdirectories aren't actually required by Subversion. They're merely a popular convention that you'll most likely want to use later on." -msgstr "" - -#.(para) -#: ../source/book.xml:24680 -msgid "Once you have your tree of data ready to go, import it into the repository with the svn import command (see ):" -msgstr "" - -#.(screen) -#: ../source/book.xml:24683 -#, no-wrap -msgid "\n$ svn import /tmp/myproject file:///var/svn/repos/myproject -m \"initial import\"\nAdding /tmp/myproject/branches\nAdding /tmp/myproject/tags\nAdding /tmp/myproject/trunk\nAdding /tmp/myproject/trunk/foo.c\nAdding /tmp/myproject/trunk/bar.c\nAdding /tmp/myproject/trunk/Makefile\n…\nCommitted revision 1.\n$ \n" -msgstr "" - -#.(para) -#: ../source/book.xml:24695 -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 myproject, which in turn contains your data." -msgstr "" - -#.(para) -#: ../source/book.xml:24701 -msgid "Note that the original /tmp/myproject 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 working copy of the data, a sort of private workspace. Ask Subversion to check out a working copy of the myproject/trunk directory in the repository:" -msgstr "" - -#.(screen) -#: ../source/book.xml:24709 -#, no-wrap -msgid "\n$ svn checkout file:///var/svn/repos/myproject/trunk myproject\nA myproject/foo.c\nA myproject/bar.c\nA myproject/Makefile\n…\nChecked out revision 1.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:24717 -msgid "Now you have a personal copy of part of the repository in a new directory named myproject. You can edit the files in your working copy and then commit those changes back into the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:24723 -msgid "Enter your working copy and edit a file's contents." -msgstr "" - -#.(para) -#: ../source/book.xml:24727 -msgid "Run svn diff to see unified diff output of your changes." -msgstr "" - -#.(para) -#: ../source/book.xml:24731 -msgid "Run svn commit to commit the new version of your file to the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:24735 -msgid "Run svn update to bring your working copy up-to-date with the repository." -msgstr "" - -#.(para) -#: ../source/book.xml:24739 -msgid "For a full tour of all the things you can do with your working copy, read ." -msgstr "" - -#.(para) -#: ../source/book.xml:24741 -msgid "At this point, you have the option of making your repository available to others over a network. See to learn about the different sorts of server processes available and how to configure them." -msgstr "" - -#.(title) -#: ../source/book.xml:24755 -msgid "Subversion for CVS Users" -msgstr "" - -#.(para) -#: ../source/book.xml:24757 -msgid "This appendix is a guide for CVS users new to Subversion. It's essentially a list of differences between the two systems as viewed from 10,000 feet. For each section, we provide backreferences to relevant chapters when possible." -msgstr "" - -#.(para) -#: ../source/book.xml:24762 -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 broken 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." -msgstr "" - -#.(title) -#: ../source/book.xml:24773 -msgid "Revision Numbers Are Different Now" -msgstr "" - -#.(para) -#: ../source/book.xml:24775 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24779 -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 revision 54, they're talking about a particular tree (and indirectly, the way the filesystem looked after the 54th commit)." -msgstr "" - -#.(para) -#: ../source/book.xml:24786 -msgid "Technically, it's not valid to talk about revision 5 of foo.c. Instead, one would say foo.c as it appears in revision 5. Also, be careful when making assumptions about the evolution of a file. In CVS, revisions 5 and 6 of foo.c are always different. In Subversion, it's most likely that foo.c did not change between revisions 5 and 6." -msgstr "" - -#.(para) -#: ../source/book.xml:24795 -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 /branches or /tags directories that appear at the top level of the repository, beside /trunk). 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 foo.c as it appears in /branches/REL1 in revision 5." -msgstr "" - -#.(para) -#: ../source/book.xml:24808 -msgid "For more details on this topic, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:24815 -msgid "Directory Versions" -msgstr "" - -#.(para) -#: ../source/book.xml:24817 -msgid "Subversion tracks tree structures, not just file contents. It's one of the biggest reasons Subversion was written to replace CVS." -msgstr "" - -#.(para) -#: ../source/book.xml:24820 -msgid "Here's what this means to you, as a former CVS user:" -msgstr "" - -#.(para) -#: ../source/book.xml:24823 -msgid "The svn add and svn delete commands work on directories now, just as they work on files. So do svn copy and svn move. However, these commands do not cause any kind of immediate change in the repository. Instead, the working items are simply scheduled for addition or deletion. No repository changes happen until you run svn commit." -msgstr "" - -#.(para) -#: ../source/book.xml:24834 -msgid "Directories aren't dumb containers anymore; they have revision numbers like files. (Or more properly, it's correct to talk about directory foo/ in revision 5.)" -msgstr "" - -#.(para) -#: ../source/book.xml:24840 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24844 -msgid "From a theoretical point of view, we define revision 5 of directory foo to mean a specific collection of directory-entries and properties. Now suppose we start adding and removing files from foo, and then commit. It would be a lie to say that we still have revision 5 of foo. However, if we bumped foo's revision number after the commit, that would be a lie too; there may be other changes to foo we haven't yet received, because we haven't updated yet." -msgstr "" - -#.(para) -#: ../source/book.xml:24855 -msgid "Subversion deals with this problem by quietly tracking committed adds and deletes in the .svn area. When you eventually run svn update, all accounts are settled with the repository, and the directory's new revision number is set correctly. Therefore, only after an update is it truly safe to say that you have a perfect revision of a directory. Most of the time, your working copy will contain imperfect directory revisions." -msgstr "" - -#.(para) -#: ../source/book.xml:24864 -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. Therefore, you are not allowed to commit property-changes on a directory unless the directory is up-to-date." -msgstr "" - -#.(para) -#: ../source/book.xml:24872 -msgid "For more discussion about the limitations of directory versioning, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:24880 -msgid "More Disconnected Operations" -msgstr "" - -#.(para) -#: ../source/book.xml:24882 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:24886 -msgid "The .svn administrative directory serves the same purpose as the CVS directory, except that it also stores read-only, pristine copies of your files. This allows you to do many things off-line:" -msgstr "" - -#.(para) -#: ../source/book.xml:24897 -msgid "Shows you any local changes you've made (see )" -msgstr "" - -#.(para) -#: ../source/book.xml:24905 -msgid "Shows you the details of your changes (see )" -msgstr "" - -#.(para) -#: ../source/book.xml:24913 -msgid "Removes your local changes (see )" -msgstr "" - -#.(para) -#: ../source/book.xml:24917 -msgid "Also, the cached pristine files allow the Subversion client to send differences when committing, which CVS cannot do." -msgstr "" - -#.(para) -#: ../source/book.xml:24919 -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 rm file; svn update will still work, but it blurs the purpose of updating. And, while we're on this subject…" -msgstr "" - -#.(title) -#: ../source/book.xml:24933 -msgid "Distinction Between Status and Update" -msgstr "" - -#.(para) -#: ../source/book.xml:24935 -msgid "In Subversion, we've tried to erase a lot of the confusion between the cvs status and cvs update commands." -msgstr "" - -#.(para) -#: ../source/book.xml:24938 -msgid "The cvs status 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 cvs update or cvs -n update to quickly see their changes. If users forget to use the option, this has the side effect of merging repository changes they may not be ready to deal with." -msgstr "" - -#.(para) -#: ../source/book.xml:24949 -msgid "With Subversion, we've tried to remove this muddle by making the output of svn status easy to read for both humans and parsers. Also, svn update only prints information about files that are updated, not local modifications." -msgstr "" - -#.(title) -#: ../source/book.xml:24956 -msgid "Status" -msgstr "" - -#.(para) -#: ../source/book.xml:24958 -msgid "svn status 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:" -msgstr "" - -#.(option) -#: ../source/book.xml:24965 -msgid "-u" -msgstr "" - -#.(para) -#: ../source/book.xml:24968 -msgid "Contact the repository to determine, and then display, out-of-dateness information." -msgstr "" - -#.(option) -#: ../source/book.xml:24974 -msgid "-v" -msgstr "" - -#.(para) -#: ../source/book.xml:24977 -msgid "Show all entries under version control." -msgstr "" - -#.(option) -#: ../source/book.xml:24983 -msgid "-N" -msgstr "" - -#.(para) -#: ../source/book.xml:24986 -msgid "Run non-recursively (do not descend into subdirectories)." -msgstr "" - -#.(para) -#: ../source/book.xml:24991 -msgid "The status command has two output formats. In the default short format, local modifications look like this:" -msgstr "" - -#.(screen) -#: ../source/book.xml:24994 -#, no-wrap -msgid "\n$ svn status\nM foo.c\nM bar/baz.c\n" -msgstr "" - -#.(para) -#: ../source/book.xml:24999 -msgid "If you specify the () option, a longer output format is used:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25002 -#, no-wrap -msgid "\n$ svn status -u\nM 1047 foo.c\n * 1045 faces.html\n * bloo.png\nM 1050 bar/baz.c\nStatus against revision: 1066\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25010 -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 faces.html would be patched if we updated, and that bloo.png is a newly added file in the repository. (The absence of any revision number next to bloo.png means that it doesn't yet exist in the working copy.)" -msgstr "" - -#. ###TODO describe -v here as well as -uv. -u and -v use -#. different long formats and need to be -#. documented separately. Moreover, as you can combine -u and -#. -v, it needs to be explained what each of them does. As -u is -#. much more important than -v, and the example following that -#. paragraph *is* about -u, not -v, my patch concentrated on -#. that. -#.(para) -#: ../source/book.xml:25026 -msgid "At this point, you should take a quick look at the list of all possible status codes in . Here are a few of the more common status codes you'll see:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25030 -#, no-wrap -msgid "\nA Resource is scheduled for Addition\nD Resource is scheduled for Deletion\nM Resource has local Modifications\nC Resource has Conflicts (changes have not been completely merged\n between the repository and working copy version)\nX Resource is eXternal to this working copy (may come from another\n repository). See \n? Resource is not under version control\n! Resource is missing or incomplete (removed by another tool than\n Subversion)\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25042 -msgid "For a more detailed discussion of svn status, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:25047 -msgid "Update" -msgstr "" - -#.(para) -#: ../source/book.xml:25049 -msgid "svn update updates your working copy, and only prints information about files that it updates." -msgstr "" - -#.(para) -#: ../source/book.xml:25051 -msgid "Subversion has combined the CVS P and U codes into just U. When a merge or conflict occurs, Subversion simply prints G or C, rather than a whole sentence about it." -msgstr "" - -#.(para) -#: ../source/book.xml:25056 -msgid "For a more detailed discussion of svn update, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:25065 -msgid "Branches and Tags" -msgstr "" - -#.(para) -#: ../source/book.xml:25067 -msgid "Subversion doesn't distinguish between filesystem space and branch 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 ." -msgstr "" - -#.(para) -#: ../source/book.xml:25082 -msgid "That is, providing you don't run out of disk space before your checkout finishes." -msgstr "" - -#.(para) -#: ../source/book.xml:25073 -msgid "Since Subversion treats branches and tags as ordinary directories, always remember to check out the trunk (http://svn.example.com/repos/calc/trunk/) of your project, and not the project itself (http://svn.example.com/repos/calc/). 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." -msgstr "" - -#.(title) -#: ../source/book.xml:25092 -msgid "Metadata Properties" -msgstr "" - -#.(para) -#: ../source/book.xml:25094 -msgid "A new feature of Subversion is that you can attach arbitrary metadata (or properties) to files and directories. Properties are arbitrary name/value pairs associated with files and directories in your working copy." -msgstr "" - -#.(para) -#: ../source/book.xml:25099 -msgid "To set or get a property name, use the svn propset and svn propget subcommands. To list all properties on an object, use svn proplist." -msgstr "" - -#.(para) -#: ../source/book.xml:25103 -msgid "For more information, see ." -msgstr "" - -#.(title) -#: ../source/book.xml:25110 -msgid "Conflict Resolution" -msgstr "" - -#.(para) -#: ../source/book.xml:25112 -msgid "CVS marks conflicts with in-line conflict markers, and prints a C during an update. Historically, this has caused problems, because CVS isn't doing enough. Many users forget about (or don't see) the C 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25120 -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 svn resolved. See for more details." -msgstr "" - -#.(title) -#: ../source/book.xml:25130 -msgid "Binary Files and Translation" -msgstr "" - -#.(para) -#: ../source/book.xml:25132 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25139 -msgid "CVS users have to mark binary files with flags, to prevent data from being garbled (due to keyword expansion and line-ending translations). They sometimes forget to do this." -msgstr "" - -#.(para) -#: ../source/book.xml:25143 -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 and 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25149 -msgid "Second, Subversion maintains an internal notion of whether a file is text or binary data, but this notion is only extant in the working copy. During an svn update, Subversion will perform contextual merges on locally modified text files, but will not attempt to do so for binary files." -msgstr "" - -#.(para) -#: ../source/book.xml:25155 -msgid "To determine whether a contextual merge is possible, Subversion examines the svn:mime-type property. If the file has no svn:mime-type property, or has a mime-type that is textual (e.g. text/*), Subversion assumes it is text. Otherwise, Subversion assumes the file is binary. Subversion also helps users by running a binary-detection algorithm in the svn import and svn add commands. These commands will make a good guess and then (possibly) set a binary svn:mime-type property on the file being added. (If Subversion guesses wrong, the user can always remove or hand-edit the property.)" -msgstr "" - -#.(title) -#: ../source/book.xml:25174 -msgid "Versioned Modules" -msgstr "" - -#.(para) -#: ../source/book.xml:25176 -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 svn update will update the working copy appropriately, adding and removing components." -msgstr "" - -#.(para) -#: ../source/book.xml:25181 -msgid "Subversion defines modules as a list of directories within a directory property: see ." -msgstr "" - -#.(title) -#: ../source/book.xml:25189 -msgid "Authentication" -msgstr "" - -#.(para) -#: ../source/book.xml:25191 -msgid "With CVS's pserver, you are required to login to the server before any read or write operation—you sometimes even have to login for anonymous operations. With a Subversion repository using Apache httpd or svnserve 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25203 -msgid "As with CVS, Subversion still caches your credentials on disk (in your ~/.subversion/auth/ directory) unless you tell it not to by using the option." -msgstr "" - -#.(para) -#: ../source/book.xml:25207 -msgid "The exception to this behavior, however, is in the case of accessing an svnserve server over an SSH tunnel, using the svn+ssh:// URL scheme. In that case, the ssh program unconditionally demands authentication just to start the tunnel." -msgstr "" - -#.(title) -#: ../source/book.xml:25218 -msgid "Converting a Repository from CVS to Subversion" -msgstr "" - -#.(para) -#: ../source/book.xml:25220 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25233 -msgid "The most popular (and likely the most mature) conversion tool is cvs2svn (http://cvs2svn.tigris.org/), 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." -msgstr "" - -#.(title) -#: ../source/book.xml:25251 -msgid "WebDAV and Autoversioning" -msgstr "" - -#.(para) -#: ../source/book.xml:25253 -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 shares exported by WebDAV servers." -msgstr "" - -#.(para) -#: ../source/book.xml:25258 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:25268 -msgid "What is WebDAV?" -msgstr "" - -#.(para) -#: ../source/book.xml:25270 -msgid "DAV stands for Distributed Authoring and Versioning. 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 mount shared folders over HTTP that behave much like other network filesystems (such as NFS or SMB.)" -msgstr "" - -#.(para) -#: ../source/book.xml:25278 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25283 -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 V back in DAV — hence the term DeltaV. WebDAV/DeltaV clients and servers are often called just DeltaV programs, since DeltaV implies the existence of basic WebDAV." -msgstr "" - -#.(para) -#: ../source/book.xml:25291 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25300 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25312 -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 (mod_dav_svn) 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25321 -msgid "What does this mean, then?" -msgstr "" - -#.(para) -#: ../source/book.xml:25322 -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 REPORT requests that only mod_dav_svn understands." -msgstr "" - -#.(para) -#: ../source/book.xml:25328 -msgid "Second, mod_dav_svn is not a fully-realized DeltaV server. Many portions of the DeltaV specification were irrelevant to Subversion, and thus left unimplemented." -msgstr "" - -#.(para) -#: ../source/book.xml:25332 -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, mod_dav_svncould 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." -msgstr "" - -#.(title) -#: ../source/book.xml:25348 -msgid "Autoversioning" -msgstr "" - -#.(para) -#: ../source/book.xml:25350 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25354 -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 PUT 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 MKACTIVITY, CHECKOUT, PUT, CHECKIN. But if the DeltaV server supports autoversioning, then write-requests from basic WebDAV clients are accepted. The server behaves as if the client had 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25368 -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 mounts 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25379 -msgid "This scenario isn't fiction: it's real and it works, as of Subversion 1.2 and later. To activate autoversioning in mod_dav_svn, use the SVNAutoversioning directive within the httpd.conf Location block, like so:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25385 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNPath /var/svn/repository\n SVNAutoversioning on\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25392 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25395 -msgid "Before activating this feature, however, understand what you're getting into. WebDAV clients tend to do many write requests, resulting in a huge number of automatically committed revisions. For example, when saving data, many clients will do a PUT of a 0-byte file (as a way of reserving a name) followed by another PUT 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25405 -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 svn commit. The trick is to look for a revision property named svn:autoversioned. If present, the commit was made by a generic WebDAV client." -msgstr "" - -#.(para) -#: ../source/book.xml:25415 -msgid "Another feature that may be a useful complement for SVNAutoversioning comes from Apache's mod_mime module. If a WebDAV client adds a new file to the repository, there's no opportunity for the user to set the the svn:mime-type 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 svn:mime-type property on necessary files. But there's potentially no end to such cleanup tasks. Instead, you can use the ModMimeUsePathInfo directive in your Subversion <Location> block:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25430 -#, no-wrap -msgid "\n<Location /repos>\n DAV svn\n SVNPath /var/svn/repository\n SVNAutoversioning on\n\n ModMimeUsePathInfo on\n\n</Location>\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25440 -msgid "This directive allows mod_mime 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 svn:mime-type property will be set automatically." -msgstr "" - -#.(title) -#: ../source/book.xml:25453 -msgid "Client Interoperability" -msgstr "" - -#.(para) -#: ../source/book.xml:25455 -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. 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." -msgstr "" - -#.(title) -#: ../source/book.xml:25466 -msgid "Common WebDAV Clients" -msgstr "" - -#.(entry) -#: ../source/book.xml:25471 -msgid "Software" -msgstr "" - -#.(entry) -#: ../source/book.xml:25472 -msgid "Type" -msgstr "" - -#.(entry) -#: ../source/book.xml:25473 -msgid "Windows" -msgstr "" - -#.(entry) -#: ../source/book.xml:25474 -msgid "Mac" -msgstr "" - -#.(entry) -#: ../source/book.xml:25475 -msgid "Linux" -msgstr "" - -#.(entry) -#: ../source/book.xml:25481 -msgid "Adobe Photoshop" -msgstr "" - -#.(entry) -#: ../source/book.xml:25482 ../source/book.xml:25491 ../source/book.xml:25500 ../source/book.xml:25508 ../source/book.xml:25517 -msgid "Standalone WebDAV application" -msgstr "" - -#.(entry) -#: ../source/book.xml:25483 ../source/book.xml:25493 ../source/book.xml:25494 ../source/book.xml:25501 ../source/book.xml:25502 ../source/book.xml:25503 ../source/book.xml:25509 ../source/book.xml:25518 ../source/book.xml:25528 ../source/book.xml:25539 ../source/book.xml:25548 ../source/book.xml:25556 ../source/book.xml:25564 ../source/book.xml:25573 ../source/book.xml:25585 -msgid "X" -msgstr "" - -#.(entry) -#: ../source/book.xml:25486 -msgid "Image editing software, allowing direct opening from, and writing to, WebDAV URLs" -msgstr "" - -#.(entry) -#: ../source/book.xml:25490 -msgid "Cadaver" -msgstr "" - -#.(entry) -#: ../source/book.xml:25495 -msgid "Command-line WebDAV client supporting file transfer, tree, and locking operations" -msgstr "" - -#.(entry) -#: ../source/book.xml:25499 -msgid "DAV Explorer" -msgstr "" - -#.(entry) -#: ../source/book.xml:25504 -msgid "Java GUI tool for exploring WebDAV shares" -msgstr "" - -#.(entry) -#: ../source/book.xml:25507 -msgid "Macromedia Dreamweaver" -msgstr "" - -#.(entry) -#: ../source/book.xml:25512 -msgid "Web production software able to directly read from and write to WebDAV URLs" -msgstr "" - -#.(entry) -#: ../source/book.xml:25516 -msgid "Microsoft Office" -msgstr "" - -#.(entry) -#: ../source/book.xml:25521 -msgid "Office productivity suite with several components able to directly read from and write to WebDAV URLs" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:25526 ../source/book.xml:25693 -msgid "Microsoft Web Folders" -msgstr "" - -#.(entry) -#: ../source/book.xml:25527 ../source/book.xml:25536 ../source/book.xml:25545 -msgid "File-explorer WebDAV extension" -msgstr "" - -#.(entry) -#: ../source/book.xml:25531 -msgid "GUI file explorer program able to perform tree operations on a WebDAV share" -msgstr "" - -#.(entry) -#: ../source/book.xml:25535 -msgid "GNOME Nautilus" -msgstr "" - -#.(entry) -#: ../source/book.xml:25540 ../source/book.xml:25549 -msgid "GUI file explorer able to perform tree operations on a WebDAV share" -msgstr "" - -#.(entry) -#: ../source/book.xml:25544 -msgid "KDE Konqueror" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:25553 ../source/book.xml:25822 -msgid "Mac OS X" -msgstr "" - -#.(entry), (title) -#: ../source/book.xml:25554 ../source/book.xml:25563 ../source/book.xml:25572 ../source/book.xml:25582 ../source/book.xml:25791 -msgid "WebDAV filesystem implementation" -msgstr "" - -#.(entry) -#: ../source/book.xml:25558 -msgid "Operating system has built-in support for mounting WebDAV shares." -msgstr "" - -#.(entry) -#: ../source/book.xml:25562 -msgid "Novell NetDrive" -msgstr "" - -#.(entry) -#: ../source/book.xml:25567 -msgid "Drive-mapping program for assigning Windows drive letters to a mounted remote WebDAV share" -msgstr "" - -#.(entry) -#: ../source/book.xml:25571 -msgid "SRT WebDrive" -msgstr "" - -#.(entry) -#: ../source/book.xml:25576 -msgid "File transfer software which, among other things, allows the assignment of Windows drive letters to a mounted remote WebDAV share" -msgstr "" - -#.(entry) -#: ../source/book.xml:25581 -msgid "davfs2" -msgstr "" - -#.(entry) -#: ../source/book.xml:25586 -msgid "Linux file system driver that allows you to mount a WebDAV share" -msgstr "" - -#.(title) -#: ../source/book.xml:25595 -msgid "Standalone WebDAV applications" -msgstr "" - -#.(para) -#: ../source/book.xml:25597 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:25603 -msgid "Microsoft Office, Dreamweaver, Photoshop" -msgstr "" - -#.(para) -#: ../source/book.xml:25608 -msgid "WebDAV support was removed from Microsoft Access for some reason, but exists in the rest of the Office suite." -msgstr "" - -#.(para) -#: ../source/book.xml:25605 -msgid "On Windows, there are several well-known applications that contain integrated WebDAV client functionality, such as Microsoft's Office, 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25614 -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 File->Open 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." -msgstr "" - -#.(title) -#: ../source/book.xml:25626 -msgid "Cadaver, DAV Explorer" -msgstr "" - -#.(para) -#: ../source/book.xml:25628 -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 http://www.webdav.org/cadaver/." -msgstr "" - -#.(para) -#: ../source/book.xml:25635 -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:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25640 -#, no-wrap -msgid "\n$ cadaver http://host/repos\ndav:/repos/> ls\nListing collection `/repos/': succeeded.\nColl: > foobar 0 May 10 16:19\n > playwright.el 2864 May 4 16:18\n > proofbypoem.txt 1461 May 5 15:09\n > westcoast.jpg 66737 May 5 15:09\n\ndav:/repos/> put README\nUploading README to `/repos/README':\nProgress: [=============================>] 100.0% of 357 bytes succeeded.\n\ndav:/repos/> get proofbypoem.txt\nDownloading `/repos/proofbypoem.txt' to proofbypoem.txt:\nProgress: [=============================>] 100.0% of 1461 bytes succeeded.\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25657 -msgid "DAV Explorer is another standalone WebDAV client, written in Java. It's under a free Apache-like license and is available at http://www.ics.uci.edu/~webdav/. 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)." -msgstr "" - -#.(para) -#: ../source/book.xml:25664 -msgid "Of course, DAV Explorer's ACL support is useless in this case, since mod_dav_svn 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 MKACTIVITY requests. But it's not relevant anyway; we're assuming all of these clients are operating against an autoversioning repository." -msgstr "" - -#.(title) -#: ../source/book.xml:25677 -msgid "File-explorer WebDAV extensions" -msgstr "" - -#.(para) -#: ../source/book.xml:25679 -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 network place. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25695 -msgid "Microsoft was one of the original backers of the WebDAV specification, and first started shipping a client in Windows 98, known as Web Folders. This client was also shipped in Windows NT4 and 2000." -msgstr "" - -#.(para) -#: ../source/book.xml:25699 -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 My Computer. In Windows 2000, simply add a new network place, enter the URL, and the WebDAV share will pop up for browsing." -msgstr "" - -#.(para) -#: ../source/book.xml:25706 -msgid "With the release of Windows XP, Microsoft started shipping a new implementation of Web Folders, known as the WebDAV mini-redirector. 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 (http://host/repos) into UNC share notation (\\\\host\\repos); it also often tries to use Windows Domain authentication to respond to basic-auth HTTP challenges, sending usernames as HOST\\username. 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25722 -msgid "It turns out that the original Explorer-only Web Folders implementation isn't dead in XP, it's just buried. It's still possible to find it by using this technique:" -msgstr "" - -#.(para) -#: ../source/book.xml:25728 -msgid "Go to 'Network Places'." -msgstr "" - -#.(para) -#: ../source/book.xml:25731 -msgid "Add a new network place." -msgstr "" - -#.(para) -#: ../source/book.xml:25734 -msgid "When prompted, enter the URL of the repository, but include a port number in the URL. For example, http://host/repos would be entered as http://host:80/repos instead." -msgstr "" - -#.(para) -#: ../source/book.xml:25741 -msgid "Respond to any authentication prompts." -msgstr "" - -#.(para) -#: ../source/book.xml:25744 -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." -msgstr "" - -#.(para) -#: ../source/book.xml:25753 -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 http://support.microsoft.com/?kbid=892211. In particular, this release is known to fix a bug whereby browsing a DAV share shows an unexpected infinite recursion." -msgstr "" - -#.(title) -#: ../source/book.xml:25765 -msgid "Nautilus, Konqueror" -msgstr "" - -#.(para) -#: ../source/book.xml:25767 -msgid "Nautilus is the official file manager/browser for the GNOME desktop (http://www.gnome.org), and Konqueror is the manager/browser for the KDE desktop (http://www.kde.org). Both of these applications have an explorer-level WebDAV client built-in, and operate just fine against an autoversioning repository." -msgstr "" - -#.(para) -#: ../source/book.xml:25772 -msgid "In GNOME's Nautilus, from the File menu, select Open location and enter the URL. The repository should then be displayed like any other filesystem." -msgstr "" - -#.(para) -#: ../source/book.xml:25776 -msgid "In KDE's Konqueror, you need to use the webdav:// scheme when entering the URL in the location bar. If you enter an http:// URL, Konqueror will behave like an ordinary web browser. You'll likely see the generic HTML directory listing produced by mod_dav_svn. By entering webdav://host/repos instead of http://host/repos, Konqueror becomes a WebDAV client and displays the repository as a filesystem." -msgstr "" - -#.(para) -#: ../source/book.xml:25793 -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." -msgstr "" - -#.(title) -#: ../source/book.xml:25806 -msgid "WebDrive, NetDrive" -msgstr "" - -#.(para) -#: ../source/book.xml:25808 -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 (http://www.southrivertech.com). NetDrive ships with Netware, is free of charge, and can be found by searching the web for netdrive.exe. 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: http://www.novell.com/coolsolutions/qna/999.html)" -msgstr "" - -#.(para) -#: ../source/book.xml:25824 -msgid "Apple's OS X operating system has an integrated filesystem-level WebDAV client. From the Finder, select the Connect to Server item from the Go menu. 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 webdav filesystem type with the mount command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25832 -#, no-wrap -msgid "\n$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint\n$\n" -msgstr "" - -#.(para) -#: ../source/book.xml:25836 -msgid "Note that if your mod_dav_svn 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." -msgstr "" - -#.(para) -#: ../source/book.xml:25842 -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 httpd.conf:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25847 -#, no-wrap -msgid "\nBrowserMatch \"^WebDAVFS/1.[012]\" redirect-carefully\n" -msgstr "" - -#.(title) -#: ../source/book.xml:25854 -msgid "Linux davfs2" -msgstr "" - -#.(para) -#: ../source/book.xml:25856 -msgid "Linux davfs2 is a filesystem module for the Linux kernel, whose development is located at http://dav.sourceforge.net/. Once installed, a WebDAV network share can be mounted with the usual Linux mount command:" -msgstr "" - -#.(screen) -#: ../source/book.xml:25860 -#, no-wrap -msgid "\n$ mount.davfs http://host/repos /mnt/dav\n" -msgstr "" - -#.(title) -#: ../source/book.xml:25874 -msgid "Third Party Tools" -msgstr "" - -#.(para) -#: ../source/book.xml:25876 -msgid "Subversion's modular design (covered in ) and the availability of language bindings (as described in ) 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 (http://subversion.tigris.org/project_links.html)." -msgstr "" - -#.(title) -#: ../source/book.xml:25890 -msgid "Copyright" -msgstr "" - -#.(programlisting) -#: ../source/book.xml:25892 -#, no-wrap -msgid "\n\nCopyright (c) 2002-2007\nBen Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. \n\nThis work is licensed under the Creative Commons Attribution License.\nTo view a copy of this license, visit\nhttp://creativecommons.org/licenses/by/2.0/ or send a letter to\nCreative Commons, 559 Nathan Abbott Way, Stanford, California 94305,\nUSA.\n\nA summary of the license is given below, followed by the full legal\ntext.\n\n--------------------------------------------------------------------\n\nYou are free:\n\n * to copy, distribute, display, and perform the work\n * to make derivative works\n * to make commercial use of the work\n\nUnder the following conditions:\n\t\nAttribution. You must give the original author credit.\n\n * For any reuse or distribution, you must make clear to others the\n license terms of this work.\n\n * Any of these conditions can be waived if you get permission from\n the author.\n\nYour fair use and other rights are in no way affected by the above.\n\nThe above is a summary of the full license below.\n\n====================================================================\n\nCreative Commons Legal Code\nAttribution 2.0\n\nCREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\nLEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN\nATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\nINFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\nREGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR\nDAMAGES RESULTING FROM ITS USE.\n\nLicense\n\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS\nCREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS\nPROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE\nWORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS\nPROHIBITED.\n\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND\nAGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS\nYOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF\nSUCH TERMS AND CONDITIONS.\n\n1. Definitions\n\n a. \"Collective Work\" means a work, such as a periodical issue,\n anthology or encyclopedia, in which the Work in its entirety in\n unmodified form, along with a number of other contributions,\n constituting separate and independent works in themselves, are\n assembled into a collective whole. A work that constitutes a\n Collective Work will not be considered a Derivative Work (as\n defined below) for the purposes of this License.\n\n b. \"Derivative Work\" means a work based upon the Work or upon the\n Work and other pre-existing works, such as a translation,\n musical arrangement, dramatization, fictionalization, motion\n picture version, sound recording, art reproduction, abridgment,\n condensation, or any other form in which the Work may be recast,\n transformed, or adapted, except that a work that constitutes a\n Collective Work will not be considered a Derivative Work for the\n purpose of this License. For the avoidance of doubt, where the\n Work is a musical composition or sound recording, the\n synchronization of the Work in timed-relation with a moving\n image (\"synching\") will be considered a Derivative Work for the\n purpose of this License.\n\n c. \"Licensor\" means the individual or entity that offers the Work\n under the terms of this License.\n\n d. \"Original Author\" means the individual or entity who created the Work.\n\n e. \"Work\" means the copyrightable work of authorship offered under\n the terms of this License.\n\n f. \"You\" means an individual or entity exercising rights under this\n License who has not previously violated the terms of this\n License with respect to the Work, or who has received express\n permission from the Licensor to exercise rights under this\n License despite a previous violation.\n\n2. Fair Use Rights. Nothing in this license is intended to reduce,\n limit, or restrict any rights arising from fair use, first sale or\n other limitations on the exclusive rights of the copyright owner\n under copyright law or other applicable laws.\n\n3. License Grant. Subject to the terms and conditions of this License,\n Licensor hereby grants You a worldwide, royalty-free,\n non-exclusive, perpetual (for the duration of the applicable\n copyright) license to exercise the rights in the Work as stated\n below:\n\n a. to reproduce the Work, to incorporate the Work into one or more\n Collective Works, and to reproduce the Work as incorporated in\n the Collective Works;\n\n b. to create and reproduce Derivative Works;\n\n c. to distribute copies or phonorecords of, display publicly,\n perform publicly, and perform publicly by means of a digital\n audio transmission the Work including as incorporated in\n Collective Works;\n\n d. to distribute copies or phonorecords of, display publicly,\n perform publicly, and perform publicly by means of a digital\n audio transmission Derivative Works.\n\n e.\n\n For the avoidance of doubt, where the work is a musical composition:\n\n i. Performance Royalties Under Blanket Licenses. Licensor\n waives the exclusive right to collect, whether\n individually or via a performance rights society\n (e.g. ASCAP, BMI, SESAC), royalties for the public\n performance or public digital performance (e.g. webcast)\n of the Work.\n\n ii. Mechanical Rights and Statutory Royalties. Licensor waives\n the exclusive right to collect, whether individually or\n via a music rights agency or designated agent (e.g. Harry\n Fox Agency), royalties for any phonorecord You create from\n the Work (\"cover version\") and distribute, subject to the\n compulsory license created by 17 USC Section 115 of the US\n Copyright Act (or the equivalent in other jurisdictions).\n\n f. Webcasting Rights and Statutory Royalties. For the avoidance of\n doubt, where the Work is a sound recording, Licensor waives the\n exclusive right to collect, whether individually or via a\n performance-rights society (e.g. SoundExchange), royalties for\n the public digital performance (e.g. webcast) of the Work,\n subject to the compulsory license created by 17 USC Section 114\n of the US Copyright Act (or the equivalent in other\n jurisdictions).\n\nThe above rights may be exercised in all media and formats whether now\nknown or hereafter devised. The above rights include the right to make\nsuch modifications as are technically necessary to exercise the rights\nin other media and formats. All rights not expressly granted by\nLicensor are hereby reserved.\n\n4. Restrictions.The license granted in Section 3 above is expressly\n made subject to and limited by the following restrictions:\n\n a. You may distribute, publicly display, publicly perform, or\n publicly digitally perform the Work only under the terms of this\n License, and You must include a copy of, or the Uniform Resource\n Identifier for, this License with every copy or phonorecord of\n the Work You distribute, publicly display, publicly perform, or\n publicly digitally perform. You may not offer or impose any\n terms on the Work that alter or restrict the terms of this\n License or the recipients' exercise of the rights granted\n hereunder. You may not sublicense the Work. You must keep intact\n all notices that refer to this License and to the disclaimer of\n warranties. You may not distribute, publicly display, publicly\n perform, or publicly digitally perform the Work with any\n technological measures that control access or use of the Work in\n a manner inconsistent with the terms of this License\n Agreement. The above applies to the Work as incorporated in a\n Collective Work, but this does not require the Collective Work\n apart from the Work itself to be made subject to the terms of\n this License. If You create a Collective Work, upon notice from\n any Licensor You must, to the extent practicable, remove from\n the Collective Work any reference to such Licensor or the\n Original Author, as requested. If You create a Derivative Work,\n upon notice from any Licensor You must, to the extent\n practicable, remove from the Derivative Work any reference to\n such Licensor or the Original Author, as requested.\n\n b. If you distribute, publicly display, publicly perform, or\n publicly digitally perform the Work or any Derivative Works or\n Collective Works, You must keep intact all copyright notices for\n the Work and give the Original Author credit reasonable to the\n medium or means You are utilizing by conveying the name (or\n pseudonym if applicable) of the Original Author if supplied; the\n title of the Work if supplied; to the extent reasonably\n practicable, the Uniform Resource Identifier, if any, that\n Licensor specifies to be associated with the Work, unless such\n URI does not refer to the copyright notice or licensing\n information for the Work; and in the case of a Derivative Work,\n a credit identifying the use of the Work in the Derivative Work\n (e.g., \"French translation of the Work by Original Author,\" or\n \"Screenplay based on original Work by Original Author\"). Such\n credit may be implemented in any reasonable manner; provided,\n however, that in the case of a Derivative Work or Collective\n Work, at a minimum such credit will appear where any other\n comparable authorship credit appears and in a manner at least as\n prominent as such other comparable authorship credit.\n\n5. Representations, Warranties and Disclaimer\n\nUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING,\nLICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR\nWARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED,\nSTATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF\nTITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,\nNONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY,\nOR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT\nDISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED\nWARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\n\n6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY\n APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY\n LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE\n OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE\n WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n DAMAGES.\n\n7. Termination\n\n a. This License and the rights granted hereunder will terminate\n automatically upon any breach by You of the terms of this\n License. Individuals or entities who have received Derivative\n Works or Collective Works from You under this License, however,\n will not have their licenses terminated provided such\n individuals or entities remain in full compliance with those\n licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any\n termination of this License.\n\n b. Subject to the above terms and conditions, the license granted\n here is perpetual (for the duration of the applicable copyright\n in the Work). Notwithstanding the above, Licensor reserves the\n right to release the Work under different license terms or to\n stop distributing the Work at any time; provided, however that\n any such election will not serve to withdraw this License (or\n any other license that has been, or is required to be, granted\n under the terms of this License), and this License will continue\n in full force and effect unless terminated as stated above.\n\n8. Miscellaneous\n\n a. Each time You distribute or publicly digitally perform the Work\n or a Collective Work, the Licensor offers to the recipient a\n license to the Work on the same terms and conditions as the\n license granted to You under this License.\n\n b. Each time You distribute or publicly digitally perform a\n Derivative Work, Licensor offers to the recipient a license to\n the original Work on the same terms and conditions as the\n license granted to You under this License.\n\n c. If any provision of this License is invalid or unenforceable\n under applicable law, it shall not affect the validity or\n enforceability of the remainder of the terms of this License,\n and without further action by the parties to this agreement,\n such provision shall be reformed to the minimum extent necessary\n to make such provision valid and enforceable.\n\n d. No term or provision of this License shall be deemed waived and\n no breach consented to unless such waiver or consent shall be in\n writing and signed by the party to be charged with such waiver\n or consent.\n\n e. This License constitutes the entire agreement between the\n parties with respect to the Work licensed here. There are no\n understandings, agreements or representations with respect to\n the Work not specified here. Licensor shall not be bound by any\n additional provisions that may appear in any communication from\n You. This License may not be modified without the mutual written\n agreement of the Licensor and You.\n\nCreative Commons is not a party to this License, and makes no warranty\nwhatsoever in connection with the Work. Creative Commons will not be\nliable to You or any party on any legal theory for any damages\nwhatsoever, including without limitation any general, special,\nincidental or consequential damages arising in connection to this\nlicense. Notwithstanding the foregoing two (2) sentences, if Creative\nCommons has expressly identified itself as the Licensor hereunder, it\nshall have all rights and obligations of Licensor.\n\nExcept for the limited purpose of indicating to the public that the\nWork is licensed under the CCPL, neither party will use the trademark\n\"Creative Commons\" or any related trademark or logo of Creative\nCommons without the prior written consent of Creative Commons. Any\npermitted use will be in compliance with Creative Commons'\nthen-current trademark usage guidelines, as may be published on its\nwebsite or otherwise made available upon request from time to time.\n\nCreative Commons may be contacted at http://creativecommons.org/.\n\n====================================================================\n" -msgstr "" - -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#.(None) -#: ../source/book.xml:0 -msgid "translator-credits" -msgstr "" - diff --git a/doc/svnbook/po/zh_CN.po b/doc/svnbook/po/zh_CN.po deleted file mode 100644 index e4ad89a..0000000 --- a/doc/svnbook/po/zh_CN.po +++ /dev/null @@ -1,28015 +0,0 @@ -# -# Simplified Chinese translation for svnbook -# This file is distributed under the same license as the svnbook. -# -# Authors: -# Dongsheng Song , 2007 -# Xun Leasun -# Daijun Sun -# -# Update to new pot: -# msgmerge --update zh_CN.po book.pot -# -# Check translation: -# msgfmt --statistics -c -o zh_CN.mo zh_CN.po -# -# Please format your translation before commit: -# msgmerge --no-wrap -o zh_CN_new.po zh_CN.po book.pot -# mv -f zh_CN_new.po zh_CN.po -# -# Dictionary: -# BASE revision 基础版本 -# blame 追溯 -# checkout 检出 -# default 默认 -# HEAD revision 最新版本 -# overlay 重载 -# remove 删除 -# rename 改名 -# repository 版本库 -# revert 恢复 -# revision 版本 -# Subversion book Subversion 手册 -# undo 撤销 -# unified diff 标准差异 -# unversioned 未版本控制 -# versioned 已版本控制 -# working copy 工作副本 -# -msgid "" -msgstr "" -"Project-Id-Version: svnbook 1.5\n" -"POT-Creation-Date: 2007-12-09 10:12 +0000\n" -"PO-Revision-Date: 2007-10-30 21:19+0800\n" -"Last-Translator: Dongsheng Song \n" -"Language-Team: Simplified Chinese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1001 -msgid "@@image: 'images/ch01dia1.png'; md5=d5cf54020bcbb99fb12150481d94bffa" -msgstr "@@image: 'images/ch01dia1.png'; md5=d5cf54020bcbb99fb12150481d94bffa" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1131 -msgid "@@image: 'images/ch02dia1.png'; md5=9f98bd2bd15fabc36d55db0572a7b32b" -msgstr "@@image: 'images/ch02dia1.png'; md5=9f98bd2bd15fabc36d55db0572a7b32b" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1202 -msgid "@@image: 'images/ch02dia2.png'; md5=4c3e6e55f9a0c50d6925f5ca4587e47b" -msgstr "@@image: 'images/ch02dia2.png'; md5=4c3e6e55f9a0c50d6925f5ca4587e47b" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1231 -msgid "@@image: 'images/ch02dia3.png'; md5=e9cd778666a999ab329a069efed37500" -msgstr "@@image: 'images/ch02dia3.png'; md5=e9cd778666a999ab329a069efed37500" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1316 -msgid "@@image: 'images/ch02dia4.png'; md5=8d13576c2af1db88349f6ff144ef6fc2" -msgstr "@@image: 'images/ch02dia4.png'; md5=8d13576c2af1db88349f6ff144ef6fc2" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1326 -msgid "@@image: 'images/ch02dia5.png'; md5=f4ec352cd843cf130fe500cfdbc358ca" -msgstr "@@image: 'images/ch02dia5.png'; md5=f4ec352cd843cf130fe500cfdbc358ca" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1514 -msgid "@@image: 'images/ch02dia6.png'; md5=d4eac305c63464419d945a616284c4ce" -msgstr "@@image: 'images/ch02dia6.png'; md5=d4eac305c63464419d945a616284c4ce" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:1697 -msgid "@@image: 'images/ch02dia7.png'; md5=067bb47f6fe3dcdeefac6755da876cdf" -msgstr "@@image: 'images/ch02dia7.png'; md5=067bb47f6fe3dcdeefac6755da876cdf" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:6763 -msgid "@@image: 'images/ch04dia1.png'; md5=a157a2c9fc737cab3db918aaf489bf7e" -msgstr "@@image: 'images/ch04dia1.png'; md5=a157a2c9fc737cab3db918aaf489bf7e" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:6801 -msgid "@@image: 'images/ch04dia2.png'; md5=5c6b571282ff05d99a99d69fdef50378" -msgstr "@@image: 'images/ch04dia2.png'; md5=5c6b571282ff05d99a99d69fdef50378" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:6910 -msgid "@@image: 'images/ch04dia3.png'; md5=7226def64bf6dea42b547d968b853a08" -msgstr "@@image: 'images/ch04dia3.png'; md5=7226def64bf6dea42b547d968b853a08" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:7000 -msgid "@@image: 'images/ch04dia4.png'; md5=03cbad24eee5abe0cadc452be19c2613" -msgstr "@@image: 'images/ch04dia4.png'; md5=03cbad24eee5abe0cadc452be19c2613" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:15988 -msgid "@@image: 'images/ch08dia1.png'; md5=870a5b07012b21f7b187fdb1d912d8d6" -msgstr "@@image: 'images/ch08dia1.png'; md5=870a5b07012b21f7b187fdb1d912d8d6" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#. (None) -#: ../source/book.xml:16017 -msgid "@@image: 'images/ch08dia2.png'; md5=a72633f0cc8f6f83fa4d8a96b47202ca" -msgstr "@@image: 'images/ch08dia2.png'; md5=a72633f0cc8f6f83fa4d8a96b47202ca" - -#. (title) -#: ../source/book.xml:4 -msgid "Version Control with Subversion" -msgstr "Subversion 权威指南" - -#. (subtitle) -#: ../source/book.xml:5 -#, fuzzy -msgid "For Subversion 1.5(Compiled from r2907)" -msgstr "针对 Subversion 1.5(编译自版本 r2881)" - -#. (edition) -#: ../source/book.xml:6 -msgid "Second" -msgstr "第二" - -#. (biblioid) -#: ../source/book.xml:7 -msgid "?-?????-???-?" -msgstr "?-?????-???-?" - -#. (firstname) -#: ../source/book.xml:11 -msgid "Ben" -msgstr "Ben" - -#. (surname) -#: ../source/book.xml:12 -msgid "Collins-Sussman" -msgstr "Collins-Sussman" - -#. (firstname) -#: ../source/book.xml:17 -msgid "Brian W." -msgstr "Brian W." - -#. (surname) -#: ../source/book.xml:18 -msgid "Fitzpatrick" -msgstr "Fitzpatrick" - -#. (firstname) -#: ../source/book.xml:23 -msgid "C. Michael" -msgstr "C. Michael" - -#. (surname) -#: ../source/book.xml:24 -msgid "Pilato" -msgstr "Pilato" - -#. (firstname) -#: ../source/book.xml:30 -msgid "Tatiana" -msgstr "Tatiana" - -#. (surname) -#: ../source/book.xml:31 -msgid "Apandi" -msgstr "Apandi" - -#. (pagenums) -#: ../source/book.xml:34 -msgid "350 pages (est.)" -msgstr "大约 350 页" - -#. (pubdate) -#: ../source/book.xml:35 -msgid "(TBA)" -msgstr "(TBA)" - -#. (year) -#: ../source/book.xml:37 -msgid "2002" -msgstr "2002" - -#. (year) -#: ../source/book.xml:38 -msgid "2003" -msgstr "2003" - -#. (year) -#: ../source/book.xml:39 -msgid "2004" -msgstr "2004" - -#. (year) -#: ../source/book.xml:40 -msgid "2005" -msgstr "2005" - -#. (year) -#: ../source/book.xml:41 -msgid "2006" -msgstr "2006" - -#. (year) -#: ../source/book.xml:42 -msgid "2007" -msgstr "2007" - -#. (holder) -#: ../source/book.xml:43 -msgid "Ben Collins-Sussman" -msgstr "Ben Collins-Sussman" - -#. (holder) -#: ../source/book.xml:44 -msgid "Brian W. Fitzpatrick" -msgstr "Brian W. Fitzpatrick" - -#. (holder) -#: ../source/book.xml:45 -msgid "C. Michael Pilato" -msgstr "C. Michael Pilato" - -#. (para) -#: ../source/book.xml:48 -msgid "This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA." -msgstr "本作品使用共同创造许可证,可以访问http://creativecommons.org/licenses/by/2.0/或发送邮件到Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.查看本许可证。" - -#. (title) -#: ../source/book.xml:62 -msgid "Foreword" -msgstr "前言" - -#. (firstname) -#: ../source/book.xml:65 -msgid "Karl" -msgstr "Karl" - -#. (surname) -#: ../source/book.xml:66 -msgid "Fogel" -msgstr "Fogel" - -#. (pubdate) -#: ../source/book.xml:69 -msgid "Chicago, March 14, 2004" -msgstr "芝加哥,2004 年 3 月 14 日" - -#. (para) -#: ../source/book.xml:71 -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 wished people had asked. Perhaps you've seen the type before:" -msgstr "一个差劲的常见问题列表(FAQ)总是充斥着作者渴望被问到的问题,而不是人们真正想要了解的问题。也许你曾经见过下面这样的问题:" - -#. (para) -#: ../source/book.xml:76 -msgid "Q: How can I use Glorbosoft XYZ to maximize team productivity?" -msgstr "Q:怎样使用Glorbosoft XYZ最大程度的提高团队生产率?" - -#. (para) -#: ../source/book.xml:80 -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 File menu, scroll down to Increase Productivity, then…" -msgstr "A:许多客户希望知道怎样利用我们革命性的专利办公套件最大程度的提高生产率。答案非常简单:首先,点击文件 菜单,找到提高生产率菜单项,然后…" - -#. (para) -#: ../source/book.xml:87 -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, How can we maximize productivity?. Rather, people asked highly specific questions, like, How can we change the calendaring system to send reminders two days in advance instead of one? 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." -msgstr "类似的问题完全不符合FAQ的精神。没人会打电话给技术支持中心,询问怎样提高生产率?相反,人们经常询问一些非常具体的问题,像怎样让日程系统提前两天而不是一天提醒相关用户?等等。但是想象比发现真正的问题更容易。构建一个真实的问题列表需要持之以恒的、有组织的辛勤工作:跨越整个软件生命周期,追踪新提出的问题,监控反馈信息,所有的问题要整理成一个统一的、可查询的整体,并且能够真实的反映所有用户的感受。这需要耐心,如自然学家一样严谨的态度,没有浮华的假设,没有虚幻的断言—相反的,需要开放的视野和精确的记录。" - -#. (para) -#: ../source/book.xml:103 -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?" -msgstr "我很喜欢这本书,因为它正是按照这种精神建立起来的,这种精神体现在本书的每一页中。这是作者与用户直接交流的结果。而这一切是源于Ben Collins-Sussman's对于Subversion常见问题邮件列表的研究。他发现人们总是在邮件列表中重复询问一些基本问题:使用subversion的一般程序是怎样的?分支与标签同其它版本控制系统的工作方式一样吗?我怎样知道某一处修改是谁做的?" - -#. (para) -#: ../source/book.xml:111 -msgid "Frustrated at seeing the same questions day after day, Ben worked intensely over a month in the summer of 2002 to write The Subversion Handbook, 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." -msgstr "日复一日看到相同问题的烦闷,促使Ben在2002年的夏天努力工作了一个月,撰写了一本Subversion手册,一本六十页厚的、涵盖了所有Subversion使用基础知识的手册。这本手册没有说明最终定稿的时间,但它随着Subversion的每个版本一起发布,帮助许多用户跨过学习之初的艰难。当O'Reilly和Associates决定出版一本完备的Subversion图书的时候,一条捷径浮出水面:扩充Subversion手册。" - -#. (para) -#: ../source/book.xml:121 -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." -msgstr "新书的三位合著者因而面临着一个不寻常的机会。从职责上讲,他们的任务是从一个目录和一些草稿为基础,自上而下的写一部专著。但事实上,他们的灵感源泉则来自一些具体的内容,稳定却难以组织。Subversion被数以千计的早期用户采用,这些用户提供了大量的反馈,不仅仅针对Subversion,还包括业已存在的文档。" - -#. (para) -#: ../source/book.xml:130 -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." -msgstr "在写这本书的过程里,Ben,Mike 和 Brian一直像鬼魂一样游荡在Subversion邮件列表和聊天室中,仔细的研究用户实际遇到的问题。监视这些反馈也是他们在CollabNet工作的一部分,这给他们撰写Subversion文档提供了巨大的便利。这本书建立在丰富的使用经验,而非在流沙般脆弱的想象之上,它结合了用户手册和FAQ的优点。初次阅读时,这种二元性的优势并不明显,按照顺序,从前到后,这本书只是简单的从头到尾描述了软件的细节。书中的内容包括一章概述,一章必不可少的快速指南,一章关于管理配置,一些高级主题,当然还包括命令参考手册和故障排除指南。而当你过一段时间之后,再次翻开本书查找一些特定问题的解决方案时,这种二元性才得以显现:这些生动的细节一定来自不可预测的实际用例的提炼,大多是源于用户的需要和视点。" - -#. (para) -#: ../source/book.xml:150 -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 users@subversion.tigris.org 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, you are not alone." -msgstr "当然,没人可以承诺这本书可以回答所有问题。尽管有时候一些前人提问的惊人一致性让你感觉是心灵感应;你仍有可能在社区的知识库里摔跤,空手而归。如果有这种情况,最好的办法是写明问题发送email到users@subversion.tigris.org,作者还在那里关注着社区,不仅仅封面提到的三位,还包括许多曾经作出修正与提供原始材料的人。从社区的视角,帮你解决问题只是逐步的调整这本书,进一步调整Subversion本身以更合理的适合用户使用这样一个大工程的一个有趣的额外效用。他们渴望你的信息,不仅仅可以帮助你,也因为可以帮助他们。与Subversion这样活跃的自由软件项目一起,你并不孤单。" - -#. (para) -#: ../source/book.xml:168 -msgid "Let this book be your first companion." -msgstr "让这本书将成为你的第一个伙伴。" - -#. (title) -#: ../source/book.xml:177 -msgid "Preface" -msgstr "序言" - -#. (attribution) -#: ../source/book.xml:180 -msgid "Greg Hudson" -msgstr "Greg Hudson" - -#. (quote) -#: ../source/book.xml:182 -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." -msgstr "即使你能确认什么是完美,也不要让完美成为好的敌人,更何况你不能确认。因为落入过去陷阱的不悦,你会在设计时因为担心自己的缺陷而无所作为。" - -#. (para) -#: ../source/book.xml:189 -msgid "Concurrent Versions System (CVS) 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." -msgstr "并行版本系统(CVS)在开源软件世界,长久以来,并行版本系统(CVS)一直是版本控制工具的唯一选择。事实证明,这个选择不错。CVS的自由软件身份,无约束的处事态度,和对网络化操作的支持(网络使众多身处不同地方的程序员可以共享他们的工作成果),正符合了开源世界协作的精神,CVS和它半混乱状态的开发模式已成为开源文化的基石。" - -#. (para) -#: ../source/book.xml:200 -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 look and feel) 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 is 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." -msgstr "但是,CVS也并不是没有缺陷,而修正这些缺陷必定要耗费很大的精力。而Subversion则是以CVS继任者的面目出现的新型版本控制系统。Subversion的设计者们力图通过两方面的努力赢得CVS用户的青睐:保持开源系统的设计(以及界面风格)与CVS尽可能类似,同时尽力弥补CVS许多显著的缺陷。这些努力的结果使得从CVS迁移到Subversion不需要作出重大的变革,Subversion确实是非常强大、非常有用和非常灵活的工具。并且很重要的一点,几乎新开的开源项目都选择了Subversion替代CVS。" - -#. (para) -#: ../source/book.xml:211 -#, fuzzy -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." -msgstr "本书是为Subversion 1.4系列撰写的。在书中,我们尽力涵盖Subversion的所有内容。但是,Subversion有一个兴盛和充满活力的开发社区,已有许多新的特性和改进措施计划在Subversion新版本中实现,本书中讲述的命令和特性可能会有所变化。" - -#. (title) -#: ../source/book.xml:223 -msgid "Audience" -msgstr "读者" - -#. (para) -#: ../source/book.xml:225 -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 (svn), and some auxiliary programs, are the focus of this book." -msgstr "本书是为了那些在计算机领域有丰富知识,并且希望使用Subversion管理数据的人士准备的。尽管Subversion可以在多种不同的操作系统上运行,但其基本用户操作界面是基于命令行的,也就是我们将要在本书中讲述和使用的命令行工具(svn)。" - -#. (para) -#: ../source/book.xml:231 -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 svn program also runs on non-Unix platforms like Microsoft Windows. With a few minor exceptions, such as the use of backward slashes (\\) instead of forward slashes (/) for path separators, the input to and output from this tool when run on Windows are identical to its Unix counterpart." -msgstr "出于一致性的考虑,本书的例子假定读者使用的是类Unix的操作系统,并且熟悉Unix和命令行界面。当然,svn程序也可以在入Microsoft Windows这样的非Unix平台上运行,除了一些微小的不同,如使用反斜线(\\)代替正斜线(/)作为路径分隔符,在Windows上运行svn程序的输入和输出与在Unix平台上运行完全一致。" - -#. (para) -#: ../source/book.xml:240 -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." -msgstr "大多数读者可能是那些需要跟踪代码变化的程序员或者系统管理员,这是Subversion最普遍的用途,因此这个场景贯穿于整本书的例子中。但是Subversion可以用来管理任何类型的数据:图像、音乐、数据库、文档等等。对于Subversion,数据就是数据而已。" - -#. (para) -#: ../source/book.xml:247 -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." -msgstr "本书假定读者从来没有使用过任何版本控制工具,同时,我们也努力使CVS用户能够轻松的投入到Subversion使用当中,不时会出现一些涉及CVS的内容,此外,在附录的一个章节中总结了Subversion和CVS的区别。" - -#. (para) -#: ../source/book.xml:254 -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." -msgstr "需要说明的是,所有源代码示例仅仅是例子而已。这些例子需要通过正确编译参数进行编译,在这里列举它们只是为了说明特定的场景,并非为了展示优秀的编码风格。" - -#. (title) -#: ../source/book.xml:265 -msgid "How to Read this Book" -msgstr "怎样阅读本书" - -#. (para) -#: ../source/book.xml:267 -msgid "Technical books always face a certain dilemma: whether to cater to top-down or bottom-up 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 learn by doing 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 ." -msgstr "技术书籍经常要面对这样两难的困境:是迎合自上至下的初学者,还是自下至上的初学者。一个自上至下的学习者会喜欢略读文档,得到对系统工作原理的总体看法;然后她才会开始实际使用软件。而一个自下至上的学习者,是通过实践学习的人,他们希望快速的开始使用软件,自己领会软件的使用,只在必要时读取相关章节。大多数图书会倾向于针对某一类读者,而本书毫无疑问倾向于自上至下的方法。(如果你阅读了本节,那你也一定是一个自上至下的学习者!)然而,如果你是自下至上的人,不要失望,本书以Subversion主题的广泛观察进行组织,每个章节都包含了大量可以尝试的详细实例。如果你希望马上开工,没有耐心等待,你可以看。" - -#. (para) -#: ../source/book.xml:285 -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 recommended reading list for various types of readers:" -msgstr "本书适用于具有不同背景知识的各个层次的读者—从未使用过版本控制的新手到经验丰富的系统管理员都能够从本书中获益。根据基础的不同,某些的章节可能对某些读者更有价值。下面的内容可以看作是为不同类型的读者提供的推荐阅读清单:" - -#. (term) -#: ../source/book.xml:295 -msgid "Experienced System Administrators" -msgstr "资深系统管理员" - -#. (para) -#: ../source/book.xml:297 -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. and will show you how to create your first repository and make it available over the network. After that's done, and are the fastest routes to learning the Subversion client." -msgstr "假定你从前使用过版本控制,并且迫切需要建立起Subversion服务器并尽快运行起来,将会告诉你如何建立起一个版本库,并将其在网络上发布。此后,依靠你的CVS使用经验,将向你展示怎样使用Subversion客户端软件。" - -#. (term) -#: ../source/book.xml:310 -msgid "New users" -msgstr "新用户" - -#. (para) -#: ../source/book.xml:312 -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 is a vital introduction to the ideas behind version control. is a guided tour of the Subversion client." -msgstr "如果管理员已经为你准备好了Subversion服务,你所需要的是学习如何使用客户端。如果你没有使用版本控制系统(像CVS)的经验,那么是重要的入门教程,其中介绍了版本控制的重要思想。" - -#. (term) -#: ../source/book.xml:321 -msgid "Advanced users" -msgstr "高级用户" - -#. (para) -#: ../source/book.xml:323 -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 (), how to use Subversion's property support (), how to configure runtime options (), and other things. These chapters aren't critical at first, but be sure to read them once you're comfortable with the basics." -msgstr "无论是用户还是管理员,项目终将会壮大起来。那时,就需要学习更多Subversion的高级功能,像如何使用分支和执行合并()、怎样使用Subversion的属性()、怎样配制运行参数()等等。这两章在学习的初期并不重要,但熟悉了基本操作之后还是非常有必要了解一下。" - -#. (term) -#: ../source/book.xml:334 -msgid "Developers" -msgstr "开发者" - -#. (para) -#: ../source/book.xml:336 -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. is just for you." -msgstr "你应该已经很熟悉Subversion了,并且想扩展它或使用它的API开发新软件。将最适合你。" - -#. (para) -#: ../source/book.xml:343 -msgid "The book ends with reference material— 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." -msgstr "本书以参考材料作为结束—是一部Subversion全部命令的详细指南,此外,在附录中还有许多很有意义的主题。阅读完本书后,这些章节将会是你经常查阅的内容。" - -#. (title) -#: ../source/book.xml:353 -msgid "Conventions Used in This Book" -msgstr "本书约定" - -#. (para) -#: ../source/book.xml:355 -msgid "This section covers the various conventions used in this book." -msgstr "本节描述了本书中使用的各种约定。" - -#. (title) -#: ../source/book.xml:360 -msgid "Typographic Conventions" -msgstr "排版习惯" - -#. (command) -#: ../source/book.xml:365 -msgid "Constant width" -msgstr "等宽字体" - -#. (para) -#: ../source/book.xml:368 -msgid "Used for commands, command output, and options" -msgstr "用于命令,命令输出和选项" - -#. (replaceable) -#: ../source/book.xml:373 -msgid "Constant width italic" -msgstr "等宽斜体" - -#. (para) -#: ../source/book.xml:376 -msgid "Used for replaceable items in code and text" -msgstr "用于代码和文本中的可替换部分" - -#. (filename) -#: ../source/book.xml:381 -msgid "Italic" -msgstr "斜体" - -#. (para) -#: ../source/book.xml:384 -msgid "Used for file and directory names" -msgstr "用于文件和路径名" - -#. (title) -#: ../source/book.xml:392 -msgid "Icons" -msgstr "图标" - -#. (para) -#: ../source/book.xml:395 -msgid "This icon designates a note relating to the surrounding text." -msgstr "此图标表示旁边的文本内容需特别注意。" - -#. (para) -#: ../source/book.xml:399 -msgid "This icon designates a helpful tip relating to the surrounding text." -msgstr "此图标表示旁边的文本描述了一个有用的小技巧。" - -#. (para) -#: ../source/book.xml:403 -msgid "This icon designates a warning relating to the surrounding text." -msgstr "此图标表示旁边的文本是警告信息。" - -#. (title) -#: ../source/book.xml:413 -msgid "Organization of This Book" -msgstr "本书的结构" - -#. (para) -#: ../source/book.xml:415 -msgid "The chapters that follow and their contents are listed here:" -msgstr "以下是各个章节的内容介绍:" - -#. (para) -#: ../source/book.xml:423 -msgid "Covers the history of Subversion as well as its features, architecture, and components." -msgstr "回顾了Subversion的历史,描述了Subversion的特性、架构、组件。" - -#. (para) -#: ../source/book.xml:432 -msgid "Explains the basics of version control and different versioning models, along with Subversion's repository, working copies, and revisions." -msgstr "介绍了版本控制的基础知识及不同的版本模型,同时讲述了Subversion版本库,工作拷贝和修订版本的概念。" - -#. (para) -#: ../source/book.xml:442 -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." -msgstr "引领你开始一个Subversion用户的工作。示范怎样使用Subversion获得、修改和提交数据。" - -#. (para) -#: ../source/book.xml:452 -msgid "Covers more complex features that regular users will eventually come into contact with, such as versioned metadata, file locking, and peg revisions." -msgstr "覆盖了许多普通用户最终要面对的复杂特性,例如版本化的元数据、文件锁定和peg修订版本。" - -#. (para) -#: ../source/book.xml:462 -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." -msgstr "讨论分支、合并与标签,包括最佳实践的介绍,常见用例的描述,怎样取消修改,以及怎样从一个分支转到另一个分支。" - -#. (para) -#: ../source/book.xml:473 -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." -msgstr "讲述Subversion版本库的基本概念,怎样建立、配置和维护版本库,以及哪些工具可以完成上述的工作。" - -#. (para) -#: ../source/book.xml:483 -msgid "Explains how to configure your Subversion server and different ways to access your repository: HTTP, the svn protocol, and local disk access. It also covers the details of authentication, authorization and anonymous access." -msgstr "描述了如何配置Subversion服务器,以及三种访问版本库的方式,HTTPsvn协议和本地磁盘访问。这里也介绍了认证,授权与匿名访问的细节。" - -#. (para) -#: ../source/book.xml:496 -msgid "Explores the Subversion client configuration files, the handling of internationalized text, and how to make external tools cooperate with Subversion." -msgstr "研究了Subversion的客户端配置文件,对国际化字符的处理,以及Subversion如何与外置工具交互。" - -#. (para) -#: ../source/book.xml:506 -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." -msgstr "介绍了Subversion的核心部件、Subversion的文件系统,以及程序员眼中的工作拷贝管理区域,展示了如何使用公共API编写Subversion应用程序。最重要的内容是,如何为Subversion的开发贡献力量。" - -#. (para) -#: ../source/book.xml:519 -msgid "Explains in great detail every subcommand of svn, svnadmin, and svnlook with plenty of examples for the whole family!" -msgstr "以大量的实例,详细描述了svnsvnadminsvnlook的所有子命令。" - -#. (para) -#: ../source/book.xml:530 -msgid "For the impatient, a whirlwind explanation of how to install Subversion and start using it immediately. You have been warned." -msgstr "因为缺乏耐心,我们会立刻解释如何安装和使用Subversion,我们已经告诉你了。" - -#. (para) -#: ../source/book.xml:540 -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, update vs. status, branches, tags, metadata, conflict resolution, and authentication." -msgstr "详细比较了Subversion与CVS的异同,并针对如何消除多年使用CVS养成的坏习惯提出建议。内容包括Subversion修订版本号、版本化的目录、离线操作、updatestatus的对比、分支、标签、元数据、冲突处理和认证。" - -#. (para) -#: ../source/book.xml:555 -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." -msgstr "描述了WebDAV与DeltaV的细节,并介绍了如何将Subversion版本库作为可读/写的DAV共享装载。" - -#. (para) -#: ../source/book.xml:565 -msgid "Discusses tools that support or use Subversion, including alternative client programs, repository browser tools, and so on." -msgstr "讨论一些支持和使用Subversion的工具,包括其它客户端工具,版本库浏览工具等。" - -#. (title) -#: ../source/book.xml:577 -msgid "This Book is Free" -msgstr "本书是免费的" - -#. (para) -#: ../source/book.xml:579 -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 .) In fact, the book was written in the public eye, originally as a part of Subversion project itself. This means two things:" -msgstr "本书最初是作为Subversion项目的文档并由Subversion的开发者开始撰写的,后来成为一个独立的项目并进行了重写。与Subversion相同,它始终按免费许可证(见)发布。事实上,本书是在公众的关注中写出来的,最初是Subversion项目的一部分,这有两种含义:" - -#. (para) -#: ../source/book.xml:587 -msgid "You will always find the latest version of this book in the book's own Subversion repository." -msgstr "总可以在Subversion的版本库里找到本书的最新版本。" - -#. (para) -#: ../source/book.xml:591 -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." -msgstr "可以任意分发或修改本书—它在免费许可证的控制之下,你的唯一限制是必须保留正确的最初作者。当然,与其独自发布私有版本,不如向Subversion开发社区提供反馈和修正信息。" - -#. O'REILLY SHOULD TWEAK THIS PARAGRAPH -#. (para) -#: ../source/book.xml:600 -msgid "The online home of this book's development and most of the volunteer-driven translation efforts around it is http://svnbook.red-bean.com. 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 svnbook-dev@red-bean.com." -msgstr "本书的在线主页在http://svnbook.red-bean.com,有许多志愿的翻译工作。在网站上,你可以找到许多本书最新快照和标签版本的链接,也可以访问到本书的Subversion版本库(存放了DocBook XML源文件)。我们欢迎反馈—也愿意接受鼓励。请将所有的评论、抱怨和对本书源文件的补丁发送到svnbook-dev@red-bean.com。" - -#. (title) -#: ../source/book.xml:615 -msgid "Acknowledgments" -msgstr "致谢" - -#. (para) -#: ../source/book.xml:623 -msgid "Oh, and thanks, Karl, for being too overworked to write this book yourself." -msgstr "噢,还要感谢Karl为了本书所付出的辛勤工作。" - -#. (para) -#: ../source/book.xml:617 -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." -msgstr "没有Subversion就不可能有(即使有也没什么价值)这本书。所以作者衷心感谢Brian Behlendorf和CollabNet,他们独到的眼光开创了这个充满冒险但雄心勃勃的开源项目;Jim Blandy贡献了Subversion最初的名字和设计—我们爱你,Jim。还有Karl Fogel,一个好朋友和伟大的社区领袖。" - -#. (para) -#: ../source/book.xml:625 -msgid "Thanks to O'Reilly and our editors, Linda Mui and Tatiana Diaz for their patience and support." -msgstr "感谢O'Reilly和我们的编辑Linda Mui和Tatiana对我们的耐心和支持。" - -#. (para) -#: ../source/book.xml:627 -#, fuzzy -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." -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社区。" - -#. (title) -#: ../source/book.xml:654 -msgid "From Ben Collins-Sussman" -msgstr "来自 Ben Collins-Sussman" - -#. (para) -#: ../source/book.xml:656 -msgid "Thanks to my wife Frances, who, for many months, got to hear, But honey, I'm still working on the book, rather than the usual, But honey, I'm still doing email. I don't know where she gets all that patience! She's my perfect counterbalance." -msgstr "感谢我的妻子Frances,在好几个月里,我一直在对你说:但是亲爱的,我还在为这本书工作,此外还有,但是亲爱的,我还在处理邮件。我不知道她为什么会如此耐心!她是我完美的平衡点。" - -#. (para) -#: ../source/book.xml:661 -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, Ooh, you wrote a book?, and then when you tell them it's a computer book, sort of glaze over.)" -msgstr "感谢我的家人对我的鼓励,无论他们是否真的对我的课题感兴趣。(你知道的,一个人说 哇,你正在写一本书?,然后当他知道你是写一本计算机书时,那种惊讶就变得没有那么多了。)" - -#. (para) -#: ../source/book.xml:666 -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." -msgstr "感谢我身边让我富有的朋友,不要那样看我—你们知道你们是谁。" - -#. (para) -#: ../source/book.xml:668 -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." -msgstr "感谢父母对我的低级格式化,和难以置信的角色典范 ,感谢儿子给我机会传承这些东西。" - -#. (title) -#: ../source/book.xml:675 -msgid "From Brian W. Fitzpatrick" -msgstr "来自 Brian W. Fitzpatrick" - -#. ### TODO(fitz): update this? -#. (para) -#: ../source/book.xml:678 -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." -msgstr "非常非常感谢我的妻子Marie的理解,支持和最重要的耐心。感谢引导我学会UNIX编程的兄弟Eric,感谢我的母亲和祖母的支持,对我在圣诞夜里埋头工作的理解。" - -#. (para) -#: ../source/book.xml:685 -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!" -msgstr "Mike和Ben:与你们一起工作非常快乐,Heck,我们在一起工作很愉快!" - -#. (para) -#: ../source/book.xml:687 -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." -msgstr "感谢所有在Subversion和Apache软件基金会的人们给我机会与你们在一起,没有一天我不从你们那里学到知识。" - -#. (para) -#: ../source/book.xml:691 -msgid "Lastly, thanks to my Grandfather who always told me that freedom equals responsibility. I couldn't agree more." -msgstr "最后,感谢我的祖父,他一直跟我说自由等于责任,我深信不疑。" - -#. (title) -#: ../source/book.xml:698 -msgid "From C. Michael Pilato" -msgstr "来自 C. Michael Pilato" - -#. (para) -#: ../source/book.xml:700 -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!" -msgstr "特别感谢Amy,我最好的朋友和9年里不可思议的妻子,因为她的爱和耐心支持,因为她提供的深夜工作,因为她对我强加给她的版本控制过程的优雅忍受 。不要担心,甜心—你会立刻成为TortoiseSVN巫师!" - -#. (para) -#: ../source/book.xml:706 -msgid "Gavin, there probably aren't many words in this book that you can successfully sound out 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." -msgstr "Gavin,或许现在本书的很多词你还不能读出来,但是当你最终能够书写我们所说的疯狂语言时,希望你会为你的父亲感到骄傲,就像他对你一样。" - -#. (para) -#: ../source/book.xml:713 -msgid "Translation: Daddy loves you and hopes you like computers as much as you like basketball, baseball, and football. (Wasn't that obvious?)" -msgstr "翻译:爸爸希望你会像喜欢篮球、棒球和足球一样喜欢计算机。(不是很明显吗?)" - -#. (para) -#: ../source/book.xml:711 -msgid "Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as Aiduh yike batetball, base-ball, et bootball. " -msgstr "Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as Aiduh yike batetball, base-ball, et bootball. " - -#. (para) -#: ../source/book.xml:717 -msgid "Mom and Dad, thanks for your constant support and enthusiasm. Mom- and Dad-in-law, thanks for all of the same plus your fabulous daughter." -msgstr "妈妈和爸爸,感谢你们的支持和热情,岳父岳母,以同样的理由感谢你们,还要感谢你们难以置信的女儿。" - -#. (para) -#: ../source/book.xml:720 -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 are my .emacs; 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!" -msgstr "向你们致敬,Shep Kendall,为我打开了通向计算机世界的大门;Ben Collins Sussman,我在开源世界的导师;Karl Fogel—你我的.emacs;Greg Stain,让我在困境中知道怎样编程;Brain Fitzpatrick—同我分享他的写作经验。所有我曾经从你们那里获得知识的人—尽管又不断忘记。" - -#. (para) -#: ../source/book.xml:728 -msgid "Finally, to the One who perfectly demonstrates creative excellence—thank You." -msgstr "最后,对所有为我展现完美卓越创造力的人们—感谢。" - -#. (title) -#: ../source/book.xml:737 -msgid "What is Subversion?" -msgstr "Subversion 是什么?" - -#. (para) -#: ../source/book.xml:739 -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 time machine." -msgstr "Subversion是一个自由/开源的版本控制系统。也就是说,在Subversion管理下,文件和目录可以超越时空。也就是Subversion允许你数据恢复到早期版本,或者是检查数据修改的历史。正因为如此,许多人将版本控制系统当作一种神奇的时间机器。" - -#. (para) -#: ../source/book.xml:745 -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." -msgstr "Subversion的版本库可以通过网络访问,从而使用户可以在不同的电脑上进行操作。从某种程度上来说,允许用户在各自的空间里修改和管理同一组数据可以促进团队协作。因为修改不再是单线进行,开发速度会更快。此外,由于所有的工作都已版本化,也就不必担心由于错误的更改而影响软件质量—如果出现不正确的更改,只要撤销那一次更改操作即可。" - -#. (para) -#: ../source/book.xml:754 -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 any collection of files. For you, those files might be source code—for others, anything from grocery shopping lists to digital video mixdowns and beyond." -msgstr "某些版本控制系统本身也是软件配置管理(SCM)系统,这种系统经过精巧的设计,专门用来管理源代码树,并且具备许多与软件开发有关的特性—比如,对编程语言的支持,或者提供程序构建工具。不过Subversion并不是这样的系统。它是一个通用系统,可以管理任何类型的文件集。对你来说,这些文件这可能是源程序—而对别人,则可能是一个货物清单或者是数字电影。" - -#. (title) -#: ../source/book.xml:768 -#, fuzzy -msgid "Is Subversion the Right Tool?" -msgstr "Subversion 会早一天吗?" - -#. (para) -#: ../source/book.xml:770 -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." -msgstr "" - -#. (para) -#: ../source/book.xml:775 -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." -msgstr "" - -#. (para) -#: ../source/book.xml:803 -msgid "Or as a friend puts it, swatting a fly with a Buick." -msgstr "" - -#. (para) -#: ../source/book.xml:792 -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\". There are simpler tools that efficiently replicate data without the overhead of tracking changes, such as rsync or unison." -msgstr "" - -#. (title) -#: ../source/book.xml:813 -msgid "Subversion's History" -msgstr "Subversion的历史" - -#. (para) -#: ../source/book.xml:815 -msgid "Subversionhistory of In early 2000, CollabNet, Inc. (http://www.collab.net) 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 wasn't 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." -msgstr "早在2000年,CollabNet, Inc. (http://www.collab.net)就开始寻找CVS替代产品的开发人员。CollabNet提供了一个名为CollabNet企业版(CEE)的协作软件套件。这个软件套件的一个组成部分就是版本控制系统。尽管CEE在最初采用了CVS作为其版本控制系统,但是CVS的局限性从一开始就很明显,CollabNet知道,迟早要找到一个更好的替代品。遗憾的是,CVS已经成为开源世界事实上的标准,很大程度上是因为没有更好的替代品,至少是没有可以自由使用的替代品。所以CollabNet决定从头编写一个新的版本控制系统,这个系统保留CVS的基本思想,但是要修正其中错误和不合理的特性。" - -#. (para) -#: ../source/book.xml:830 -msgid "In February 2000, they contacted Karl Fogel, the author of Open Source Development with CVS (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 Subversion, 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." -msgstr "2000年2月,他们联系到Open Source Development with CVS(Coriolis, 1999)的作者Karl Fogel,并且询问他是否希望为这个新项目工作。巧合的是,当时Karl正在与朋友Jim Blandy讨论设计一个新的版本控制系统。1995年时,他们两人曾经开办了一个提供CVS支持的公司Cyclic Software,尽管他们最终卖掉了公司,但还是天天使用CVS进行日常工作。使用CVS时的挫折促使Jim认真的思考如何管理版本化的数据,并且他当时不仅使用了Subversion这个名字,并且已经完成了Subversion版本库的最初设计。所以当CollabNet提出邀请的时候,Karl马上同意为这个项目工作,同时Jim也找到了他的雇主—Red Hat软件公司—允许他到这个项目工作,并且没有限定最终的期限。CollabNet雇佣了Karl和Ben Collins Sussman,详细设计工作从三月开始,在Behlendorf 、CollabNet、Jason Robbins和Greg Stein(当时是一个独立开发者,活跃在WebDAV/DeltaV系统规范制订工作中)恰到好处的激励下,Subversion很快吸引了许多活跃的开发者,结果是许多对CVS有过失望经历的人很乐于为这个项目做些事情。" - -#. (para) -#: ../source/book.xml:854 -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." -msgstr "最初的设计小组设定了简单的开发目标。他们不想在版本控制方法学中开垦处女地,他们只是希望修正CVS。他们决定Subversion应符合CVS的特性,并保留相同的开发模型,但不再重复CVS的一些显著缺陷。尽管Subversion并不需要成为CVS的完全替代品,但它应该与CVS保持足够的相似性,以使CVS用户可以轻松的转移到Subversion上。" - -#. (para) -#: ../source/book.xml:862 -msgid "After fourteen months of coding, Subversion became self-hosting on August 31, 2001. That is, Subversion developers stopped using CVS to manage Subversion's own source code, and started using Subversion instead." -msgstr "经过14个月的编码,2001年8月31日,Subversion能够自己管理自己了,开发者停止使用CVS保存Subversion的代码,而使用Subversion本身。" - -#. (para) -#: ../source/book.xml:866 -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." -msgstr "虽然CollabNet启动了这个项目,并且一直提供了大量的工作支持(它为一些全职的Subversion开发者提供薪水),但Subversion像其它许多开源项目一样,被松散的、透明的规则管理着,这样的规则激励着知识界的精英们。CollabNet的版权许可证完全符合Debian的自由软件方针。也就是说,任何人都可以根据自己的意愿自由的下载、修改和重新发布Subversion,不需要CollabNet或其他人的授权。" - -#. (title) -#: ../source/book.xml:879 -msgid "Subversion's Features" -msgstr "Subversion的特性" - -#. (para) -#: ../source/book.xml:881 -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 , in which we provide a gentle introduction to version control." -msgstr "在讲解Subversion为版本控制领域带来的特性时,我们会经常通过Subversion对CVS的改进进行说明。如果不熟悉CVS,了解所有Subversion的特性会有一定的困难。而如果根本就不熟悉版本控制,你就只有干瞪眼的份儿了。因此,最好首先阅读一下,这一章简单介绍了一些版本控制的基本思想和概念。" - -#. (para) -#: ../source/book.xml:888 -msgid "Subversion provides:" -msgstr "Subversion支持:" - -#. (term) -#: ../source/book.xml:891 -msgid "Directory versioning" -msgstr "版本化的目录" - -#. (para) -#: ../source/book.xml:893 -msgid "CVS only tracks the history of individual files, but Subversion implements a virtual versioned filesystem that tracks changes to whole directory trees over time. Files and directories are versioned." -msgstr "CVS只能跟踪单个文件的变更历史,但是Subversion实现的虚拟版本化文件系统则可以跟踪目录树的变更。在Subversion中,文件目录都是版本化的。" - -#. (term) -#: ../source/book.xml:901 -msgid "True version history" -msgstr "真实的版本历史" - -#. (para) -#: ../source/book.xml:903 -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." -msgstr "由于只能跟踪单个文件的变更,CVS无法支持如文件拷贝和改名这些常见的操作—这些操作改变了目录的内容。同样,在CVS中,一个目录下的文件只要名字相同即拥有相同的历史,即使这些同名文件在历史上毫无关系。而在Subversion中,可以对文件或目录进行增加、拷贝和改名操作,也解决了同名而无关的文件之间的历史联系问题。" - -#. (term) -#: ../source/book.xml:917 -msgid "Atomic commits" -msgstr "原子提交" - -#. (para) -#: ../source/book.xml:919 -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." -msgstr "一系列相关的更改,要么全部提交到版本库,要么一个也不提交。这样用户就可以将相关的更改组成一个逻辑整体,防止出现只有部分修改提交到版本库的情况。" - -#. (term) -#: ../source/book.xml:928 -msgid "Versioned metadata" -msgstr "版本化的元数据" - -#. (para) -#: ../source/book.xml:930 -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." -msgstr "每一个文件和目录都有自己的一组属性—键和它们的值。可以根据需要建立并存储任何键/值对。和文件本身的内容一样,属性也在版本控制之下。" - -#. (term) -#: ../source/book.xml:938 -msgid "Choice of network layers" -msgstr "可选的网络层" - -#. (para) -#: ../source/book.xml:940 -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." -msgstr "Subversion在版本库访问的实现上具有较高的抽象程度,利于人们实现新的网络访问机制。Subversion可以作为一个扩展模块嵌入到Apache之中。这种方式在稳定性和交互性方面有很大的优势,可以直接使用服务器的成熟技术—认证、授权和传输压缩等。此外,Subversion自身也实现了一个轻型的,可独立运行的服务器软件。这个服务器使用了一个自定义协议,可以轻松的用SSH封装。" - -#. (term) -#: ../source/book.xml:954 -msgid "Consistent data handling" -msgstr "一致的数据操作" - -#. (para) -#: ../source/book.xml:956 -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." -msgstr "Subversion用一个二进制差异算法描述文件的变化,对于文本(可读)和二进制(不可读)文件其操作方式是一致的。这两种类型的文件压缩存储在版本库中,而差异信息则在网络上双向传递。" - -#. (term) -#: ../source/book.xml:965 -msgid "Efficient branching and tagging" -msgstr "高效的分支和标签操作" - -#. (para) -#: ../source/book.xml:967 -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." -msgstr "在Subversion中,分支与标签操作的开销与工程的大小无关。Subversion的分支和标签操作用只是一种类似于硬链接的机制拷贝整个工程。因而这些操作通常只会花费很少且相对固定的时间。" - -#. (term) -#: ../source/book.xml:976 -msgid "Hackability" -msgstr "可修改性" - -#. (para) -#: ../source/book.xml:978 -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." -msgstr "Subversion没有历史负担,它以一系列优质的共享C程序库的方式实现,具有定义良好的API。这使得Subversion非常容易维护,和其它语言的互操作性很强。" - -#. (title) -#: ../source/book.xml:990 ../source/book.xml:997 -msgid "Subversion's Architecture" -msgstr "Subversion 的架构" - -#. (para) -#: ../source/book.xml:992 -msgid " illustrates a mile-high view of Subversion's design." -msgstr "给出了Subversion设计总体上的俯视图。" - -#. (para) -#: ../source/book.xml:1005 -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 working copies). 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." -msgstr "图中的一端是保存所有版本数据的Subversion版本库,另一端是Subvesion的客户程序,管理着所有版本数据的本地影射(称为工作拷贝),在这两极之间是各种各样的版本库访问(RA)层,某些使用电脑网络通过网络服务器访问版本库,某些则绕过网络服务器直接访问版本库。" - -#. (title) -#: ../source/book.xml:1018 -msgid "Subversion's Components" -msgstr "Subversion 的组件" - -#. (para) -#: ../source/book.xml:1020 -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 plenty more pages in this book devoted to alleviating that confusion." -msgstr "安装好的Subversion由几个部分组成,本节将简单的介绍一下这些组件。下文的描述或许过于简略,不易理解,但不用担心,本书后面的章节中会用更多的内容来详细阐述这些组件。" - -#. (term), (primary) -#: ../source/book.xml:1027 ../source/book.xml:17467 ../source/book.xml:17570 -#: ../source/book.xml:17674 ../source/book.xml:17759 ../source/book.xml:17890 -#: ../source/book.xml:17966 ../source/book.xml:18094 ../source/book.xml:18273 -#: ../source/book.xml:18383 ../source/book.xml:18636 ../source/book.xml:18748 -#: ../source/book.xml:18801 ../source/book.xml:18905 ../source/book.xml:19106 -#: ../source/book.xml:19224 ../source/book.xml:19318 ../source/book.xml:19542 -#: ../source/book.xml:19664 ../source/book.xml:19749 ../source/book.xml:19869 -#: ../source/book.xml:19948 ../source/book.xml:20027 ../source/book.xml:20108 -#: ../source/book.xml:20196 ../source/book.xml:20321 ../source/book.xml:20410 -#: ../source/book.xml:20516 ../source/book.xml:20861 ../source/book.xml:21023 -#: ../source/book.xml:21110 -msgid "svn" -msgstr "svn" - -#. (para) -#: ../source/book.xml:1029 -msgid "The command-line client program." -msgstr "命令行客户端程序。" - -#. (term), (command), (primary), (refname) -#: ../source/book.xml:1033 ../source/book.xml:23597 ../source/book.xml:23602 -#: ../source/book.xml:23605 -msgid "svnversion" -msgstr "svnversion" - -#. (para) -#: ../source/book.xml:1035 -msgid "A program for reporting the state (in terms of revisions of the items present) of a working copy." -msgstr "此工具用来显示工作拷贝的状态(用术语来说,就是当前项目的修订版本)。" - -#. (term), (title), (command), (primary) -#: ../source/book.xml:1040 ../source/book.xml:10192 ../source/book.xml:22193 -#: ../source/book.xml:22291 ../source/book.xml:22335 ../source/book.xml:22390 -#: ../source/book.xml:22480 ../source/book.xml:22524 ../source/book.xml:22593 -#: ../source/book.xml:22638 ../source/book.xml:22670 ../source/book.xml:22733 -#: ../source/book.xml:22781 ../source/book.xml:22830 ../source/book.xml:22874 -#: ../source/book.xml:22927 ../source/book.xml:22989 ../source/book.xml:23042 -#: ../source/book.xml:23080 -msgid "svnlook" -msgstr "svnlook" - -#. (para) -#: ../source/book.xml:1042 -msgid "A tool for directly inspecting a Subversion repository." -msgstr "直接查看Subversion版本库的工具。" - -#. (term), (title), (command), (primary) -#: ../source/book.xml:1046 ../source/book.xml:10162 ../source/book.xml:21254 -#: ../source/book.xml:21404 ../source/book.xml:21472 ../source/book.xml:21511 -#: ../source/book.xml:21614 ../source/book.xml:21647 ../source/book.xml:21693 -#: ../source/book.xml:21725 ../source/book.xml:21771 ../source/book.xml:21834 -#: ../source/book.xml:21880 ../source/book.xml:21918 ../source/book.xml:21995 -#: ../source/book.xml:22039 ../source/book.xml:22087 ../source/book.xml:22144 -msgid "svnadmin" -msgstr "svnadmin" - -#. (para) -#: ../source/book.xml:1048 -msgid "A tool for creating, tweaking or repairing a Subversion repository." -msgstr "建立、调整和修复Subversion版本库的工具。" - -#. (term), (title) -#: ../source/book.xml:1053 ../source/book.xml:10304 -msgid "svndumpfilter" -msgstr "svndumpfilter" - -#. (para) -#: ../source/book.xml:1055 -msgid "A program for filtering Subversion repository dump streams." -msgstr "过滤Subversion版本库转储数据流的工具。" - -#. (term), (command), (literal) -#: ../source/book.xml:1060 ../source/book.xml:15819 ../source/book.xml:23734 -#: ../source/book.xml:23739 -msgid "mod_dav_svn" -msgstr "mod_dav_svn" - -#. (para) -#: ../source/book.xml:1062 -msgid "A plug-in module for the Apache HTTP Server, used to make your repository available to others over a network." -msgstr "Apache HTTP服务器的一个插件,使版本库可以通过网络访问。" - -#. (term), (literal), (entry), (command) -#: ../source/book.xml:1068 ../source/book.xml:1643 ../source/book.xml:11970 -#: ../source/book.xml:23435 -msgid "svnserve" -msgstr "svnserve" - -#. (para) -#: ../source/book.xml:1070 -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." -msgstr "一个单独运行的服务器程序,可以作为守护进程或由SSH调用。这是另一种使版本库可以通过网络访问的方式。" - -#. (term), (title), (command), (primary) -#: ../source/book.xml:1076 ../source/book.xml:10354 ../source/book.xml:23120 -#: ../source/book.xml:23219 ../source/book.xml:23285 ../source/book.xml:23356 -msgid "svnsync" -msgstr "svnsync" - -#. (para) -#: ../source/book.xml:1078 -msgid "A program for incrementally mirroring one repository to another over a network." -msgstr "一个通过网络增量镜像版本库的程序。" - -#. (para) -#: ../source/book.xml:1083 -msgid "Assuming you have Subversion installed correctly, you should be ready to start. The next two chapters will walk you through the use of svn, Subversion's command-line client program." -msgstr "如果已经正确完成了Subversion的安装,我们就可以开始我们的学习之旅了。在后面的两章中,我们将讲解如何使用Subversion的客户端程序svn。" - -#. (title) -#: ../source/book.xml:1097 -msgid "Fundamental Concepts" -msgstr "基本概念" - -#. (para) -#: ../source/book.xml:1099 -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." -msgstr "本章主要为那些不熟悉版本控制技术的入门者提供一个简单扼要的、非系统的介绍。我们将从版本控制的基本概念开始,随后阐述Subversion的独特理念,并演示一些使用Subversion的例子。" - -#. (para) -#: ../source/book.xml:1105 -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." -msgstr "虽然我们在本章中以分享程序源代码作为例子,但是记住Subversion可以管理任何类型的文件集—它并非是程序员专用的。" - -#. (title) -#: ../source/book.xml:1114 -msgid "The Repository" -msgstr "版本库" - -#. (para) -#: ../source/book.xml:1116 -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 filesystem tree—a typical hierarchy of files and directories. Any number of clients 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. illustrates this." -msgstr "Subversion是一个“集中式”的信息共享系统。版本库是Subversion的核心部分,是数据的中央仓库。版本库以典型的文件和目录结构形式文件系统树来保存信息。任意数量的客户端连接到Subversion版本库,读取、修改这些文件。客户端通过写数据将信息分享给其他人,通过读取数据获取别人共享的信息。展示了这种系统:" - -#. (title) -#: ../source/book.xml:1127 -msgid "A typical client/server system" -msgstr "一个典型的客户/服务器系统" - -#. (para) -#: ../source/book.xml:1135 -msgid "So why is this interesting? So far, this sounds like the definition of a typical file server. And indeed, the repository is a kind of file server, but it's not your usual breed. What makes the Subversion repository special is that it remembers every change 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." -msgstr "这有什么意义吗?说了这么多,Subversion听起来和一般的文件服务器没什么不同。事实上,Subversion的版本库的确一种文件服务器,但不是“一般”的文件服务器。Subversion版本库的特别之处在于,它会记录每一次改变:每个文件的改变,甚至是目录树本身的改变,例如文件和目录的添加、删除和重新组织。" - -#. (para) -#: ../source/book.xml:1143 -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 previous states of the filesystem. For example, a client can ask historical questions like, What did this directory contain last Wednesday? or Who was the last person to change this file, and what changes did he make? These are the sorts of questions that are at the heart of any version control system: systems that are designed to track changes to data over time." -msgstr "一般情况下,客户端从版本库中获取的数据是文件系统树中的最新数据。但是客户端也具备查看文件系统树以前任何一个状态的能力。举个例子,客户端有时会对一些历史性问题感兴趣,比如上星期三时的目录结构是什么样的?或者谁最后一个修改了这个文件,都修改了什么?这些都是版本控制系统的核心问题:设计用来记录和跟踪数据变化的系统。" - -#. (title) -#: ../source/book.xml:1160 -msgid "Versioning Models" -msgstr "版本模型" - -#. (para) -#: ../source/book.xml:1162 -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." -msgstr "版本控制系统的核心任务是实现协作编辑和数据共享,但是不同的系统使用不同的策略实现这个目的。我们有许多理由要去理解这些策略的区别,首先,如果你遇到了其他类似Subversion的系统,可以帮助你比较现有的版本控制系统。此外,可以帮助你更有效的使用Subversion,因为Subversion本身支持不同的工作方式。" - -#. (title) -#: ../source/book.xml:1174 -msgid "The Problem of File-Sharing" -msgstr "文件共享的问题" - -#. (para) -#: ../source/book.xml:1176 -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." -msgstr "所有的版本控制系统都需要解决这样一个基础问题:怎样让系统允许用户共享信息,而不会让他们因意外而互相干扰?版本库里意外覆盖别人的更改非常的容易。" - -#. (para) -#: ../source/book.xml:1182 -msgid "Consider the scenario shown in . 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 won't 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!" -msgstr "考虑的情景,我们有两个共同工作者,Harry和Sally,他们想同时编辑版本库里的同一个文件,如果首先Harry保存它的修改,过了一会,Sally可能凑巧用自己的版本覆盖了这些文件,Harry的更改不会永远消失(因为系统记录了每次修改),但Harry所有的修改不会出现在Sally新版本的文件中,所以Harry的工作还是丢失了—至少是从最新的版本中丢失了—而且可能是意外的,这就是我们要明确避免的情况!" - -#. (title) -#: ../source/book.xml:1198 -msgid "The problem to avoid" -msgstr "需要避免的问题" - -#. (title) -#: ../source/book.xml:1210 -msgid "The Lock-Modify-Unlock Solution" -msgstr "锁定-修改-解锁 方案" - -#. (para) -#: ../source/book.xml:1212 -msgid "Many version control systems use a lock-modify-unlock 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 lock 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. demonstrates this simple solution." -msgstr "许多版本控制系统使用锁定-修改-解锁机制解决这种问题,在这样的模型里,在一个时间段里版本库的一个文件只允许被一个人修改。首先在修改之前,Harry要锁定住这个文件,锁定很像是从图书馆借一本书,如果Harry锁住这个文件,Sally不能做任何修改,如果Sally想请求得到一个锁,版本库会拒绝这个请求。在Harry结束编辑并且放开这个锁之前,她只可以阅读文件。Harry解锁后,就要换班了,Sally得到自己的轮换位置,锁定并且开始编辑这个文件。描述了这样的解决方案。" - -#. (title) -#: ../source/book.xml:1227 -msgid "The lock-modify-unlock solution" -msgstr "锁定-修改-解锁 方案" - -#. (para) -#: ../source/book.xml:1235 -msgid "The problem with the lock-modify-unlock model is that it's a bit restrictive, and often becomes a roadblock for users:" -msgstr "锁定-修改-解锁模型有一点问题就是限制太多,经常会成为用户的障碍:" - -#. (para) -#: ../source/book.xml:1240 -msgid "Locking may cause administrative problems. 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." -msgstr "锁定可能导致管理问题。有时候Harry会锁住文件然后忘了此事,这就是说Sally一直等待解锁来编辑这些文件,她在这里僵住了。然后Harry去旅行了,现在Sally只好去找管理员放开锁,这种情况会导致不必要的耽搁和时间浪费。" - -#. (para) -#: ../source/book.xml:1251 -msgid "Locking may cause unnecessary serialization. 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." -msgstr "锁定可能导致不必要的线性化开发。如果Harry编辑一个文件的开始,Sally想编辑同一个文件的结尾,这种修改不会冲突,设想修改可以正确的合并到一起,他们可以轻松的并行工作而没有太多的坏处,没有必要让他们轮流工作。" - -#. (para) -#: ../source/book.xml:1263 -msgid "Locking may create a false sense of security. 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." -msgstr "锁定可能导致错误的安全状态。假设Harry锁定和编辑一个文件A,同时Sally锁定并编辑文件B,如果A和B互相依赖,这种变化是必须同时作的,这样A和B不能正确的工作了,锁定机制对防止此类问题将无能为力—从而产生了一种处于安全状态的假相。很容易想象Harry和Sally都以为自己锁住了文件,而且从一个安全,孤立的情况开始工作,因而没有尽早发现他们不匹配的修改。锁定经常成为真正交流的替代品" - -#. (title) -#: ../source/book.xml:1283 -msgid "The Copy-Modify-Merge Solution" -msgstr "拷贝-修改-合并 方案" - -#. (para) -#: ../source/book.xml:1285 -msgid "Subversion, CVS, and many other version control systems use a copy-modify-merge model as an alternative to locking. In this model, each user's client contacts the project repository and creates a personal working copy—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." -msgstr "Subversion,CVS和一些版本控制系统使用拷贝-修改-合并模型,在这种模型里,每一个客户联系项目版本库建立一个个人工作拷贝—版本库中文件和目录的本地映射。用户并行工作,修改各自的工作拷贝,最终,各个私有的拷贝合并在一起,成为最终的版本,这种系统通常可以辅助合并操作,但是最终要靠人工去确定正误。" - -#. (para) -#: ../source/book.xml:1296 -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 out-of-date. In other words, that file A in the repository has somehow changed since he last copied it. So Harry asks his client to merge 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. and show this process." -msgstr "这是一个例子,Harry和Sally为同一个项目各自建立了一个工作拷贝,工作是并行的,修改了同一个文件A,Sally首先保存修改到版本库,当Harry想去提交修改的时候,版本库提示文件A已经过期,换句话说,A在他上次更新之后已经更改了,所以当他通过客户端请求合并版本库和他的工作拷贝之后,碰巧Sally的修改和他的不冲突,所以一旦他把所有的修改集成到一起,他可以将工作拷贝保存到版本库,展示了这一过程。" - -#. (title) -#: ../source/book.xml:1312 -msgid "The copy-modify-merge solution" -msgstr "拷贝-修改-合并 方案" - -#. (title) -#: ../source/book.xml:1322 -msgid "The copy-modify-merge solution (continued)" -msgstr "拷贝-修改-合并 方案(续)" - -#. (para) -#: ../source/book.xml:1330 -msgid "But what if Sally's changes do overlap with Harry's changes? What then? This situation is called a conflict, 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." -msgstr "但是如果Sally和Harry的修改交迭了该怎么办?这种情况叫做冲突,这通常不是个大问题,当Harry告诉他的客户端去合并版本库的最新修改到自己的工作拷贝时,他的文件A就会处于冲突状态:他可以看到一对冲突的修改集,并手工的选择保留一组修改。需要注意的是软件不能自动的解决冲突,只有人可以理解并作出智能的选择,一旦Harry手工的解决了冲突—也许需要与Sally讨论—它可以安全的把合并的文件保存到版本库。" - -#. (para) -#: ../source/book.xml:1343 -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." -msgstr "拷贝-修改-合并模型感觉有一点混乱,但在实践中,通常运行的很平稳,用户可以并行的工作,不必等待别人,当工作在同一个文件上时,也很少会有交迭发生,冲突并不频繁,处理冲突的时间远比等待解锁花费的时间少。" - -#. (para) -#: ../source/book.xml:1350 -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." -msgstr "最后,一切都要归结到一条重要的因素:用户交流。当用户交流贫乏,语法和语义的冲突就会增加,没有系统可以强制用户完美的交流,没有系统可以检测语义上的冲突,所以没有任何证据能够承诺锁定系统可以防止冲突,实践中,锁定除了约束了生产力,并没有做什么事。" - -#. (title) -#: ../source/book.xml:1360 -msgid "When Locking is Necessary" -msgstr "什么时候锁定是必需的" - -#. (para) -#: ../source/book.xml:1362 -msgid "While the lock-modify-unlock model is considered generally harmful to collaboration, there are still times when locking is appropriate." -msgstr "锁定-修改-解锁模型被认为不利于协作,但有时候锁定会更好。" - -#. (para) -#: ../source/book.xml:1365 -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." -msgstr "拷贝-修改-合并模型假定文件是可以根据上下文合并的:就是版本库的文件主要是以行为基础的文本文件(例如程序源代码)。但对于二进制格式,例如艺术品或声音,在这种情况下,十分有必要让用户轮流修改文件,如果没有线性的访问,有些人的许多工作就最终要被放弃。" - -#. (para) -#: ../source/book.xml:1375 -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 ." -msgstr "尽管Subversion一直主要是一个拷贝-修改-合并系统,但是它也意识到了需要锁定一些文件,并且提供这种锁定机制,这个特性的讨论可以见。" - -#. (title) -#: ../source/book.xml:1389 -msgid "Subversion in Action" -msgstr "Subversion实践" - -#. (para) -#: ../source/book.xml:1391 -msgid "It's time to move from the abstract to the concrete. In this section, we'll show real examples of Subversion being used." -msgstr "是时候从抽象转到具体了,在本小节,我们会展示一个Subversion真实使用的例子。" - -#. (title) -#: ../source/book.xml:1397 -msgid "Subversion Repository URLs" -msgstr "Subversion版本库URL" - -#. (para) -#: ../source/book.xml:1399 -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:" -msgstr "正如我们在整本书里描述的,Subversion使用URL来识别Subversion版本库中的版本化资源,通常情况下,这些URL使用标准的语法,允许服务器名称和端口作为URL的一部分:" - -#. (screen) -#: ../source/book.xml:1404 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.example.com:9834/repos\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout http://svn.example.com:9834/repos\n" -"…\n" - -#. (para) -#: ../source/book.xml:1408 -msgid "But there are some nuances in Subversion's handling of URLs that are notable. For example, URLs containing the file:// access method (used for local repositories) must, in accordance with convention, have either a server name of localhost or no server name at all:" -msgstr "但是Subversion处理URL的一些细微的不同之处需要注意,例如,使用file:访问方法的URL(用来访问本地版本库)必须与习惯一致,可以包括一个localhost服务器名或者没有服务器名:" - -#. (screen) -#: ../source/book.xml:1414 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos\n" -"…\n" -"$ svn checkout file://localhost/var/svn/repos\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout file:///path/to/repos\n" -"…\n" -"$ svn checkout file://localhost/path/to/repos\n" -"…\n" - -#. (para) -#: ../source/book.xml:1420 -msgid "Also, users of the file:// scheme on Windows platforms will need to use an unofficially standard 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 X is the drive on which the repository resides:" -msgstr "同样,在Windows平台下使用file://模式时需要使用一个非正式的标准语法来访问本机上不在同一个磁盘分区中的版本库。下面的任意一个URL路径语法都可以工作,其中的X表示版本库所在的磁盘分区:" - -#. (screen) -#: ../source/book.xml:1428 -#, fuzzy, no-wrap -msgid "" -"\n" -"C:\\> svn checkout file:///X:/var/svn/repos\n" -"…\n" -"C:\\> svn checkout \"file:///X|/var/svn/repos\"\n" -"…\n" -msgstr "" -"\n" -"C:\\> svn checkout file:///X:/path/to/repos\n" -"…\n" -"C:\\> svn checkout \"file:///X|/path/to/repos\"\n" -"…\n" - -#. (para) -#: ../source/book.xml:1434 -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." -msgstr "在第二个语法里,你需要使用引号包含整个URL,这样竖线字符才不会被解释为管道。当然,也要注意URL使用普通的斜线而不是Windows本地(不是URL)的反斜线。" - -#. (para) -#: ../source/book.xml:1439 -msgid "Subversion's file:// URLs cannot be used in a regular web browser the way typical file:// URLs can. When you attempt to view a file:// 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 ), and your browser will not understand how to interact with that filesystem." -msgstr "也必须意识到Subversion的file: URL不能在普通的web服务器中工作。当你尝试在web服务器查看一个file:的URL时,它会通过直接检测文件系统读取和显示那个位置的文件内容,但是Subversion的资源存在于虚拟文件系统(见)中,你的浏览器不会理解怎样读取这个文件系统。" - -#. (para) -#: ../source/book.xml:1449 -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:" -msgstr "最后,必须注意Subversion的客户端会根据需要自动编码URL,这一点和一般的web浏览器一样,举个例子,如果一个URL包含了空格或是一个字符编码大于128的ASCII字符:" - -#. (screen) -#: ../source/book.xml:1453 -#, no-wrap -msgid "" -"\n" -"$ svn checkout \"http://host/path with space/project/españa\"\n" -msgstr "" -"\n" -"$ svn checkout \"http://host/path with space/project/españa\"\n" - -#. (para) -#: ../source/book.xml:1456 -msgid "…then Subversion will escape the unsafe characters and behave as if you had typed:" -msgstr "…Subversion会回避这些不安全字符,并且会像你输入了这些字符一样工作:" - -#. (screen) -#: ../source/book.xml:1458 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a\n" -msgstr "" -"\n" -"$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a\n" - -#. (para) -#: ../source/book.xml:1461 -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 svn program." -msgstr "如果URL包含空格,一定要使用引号,这样你的脚本才会把它做一个单独的svn参数。" - -#. (title) -#: ../source/book.xml:1468 -msgid "Working Copies" -msgstr "工作拷贝" - -#. (para) -#: ../source/book.xml:1470 -msgid "You've already read about working copies; now we'll demonstrate how the Subversion client creates and uses them." -msgstr "你已经阅读过了关于工作拷贝的内容;现在我们要讲一讲客户端怎样建立和使用它。" - -#. (para) -#: ../source/book.xml:1473 -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." -msgstr "一个Subversion工作拷贝是你本地机器上的一个普通目录,保存着一些文件,你可以任意的编辑文件,而且如果是源代码文件,你可以像平常一样编译,你的工作拷贝是你的私有工作区,在你明确的做了特定操作之前,Subversion不会把你的修改与其他人的合并,也不会把你的修改展示给别人,你甚至可以拥有同一个项目的多个工作拷贝。" - -#. (para) -#: ../source/book.xml:1482 -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 publish 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)." -msgstr "当你在工作拷贝作了一些修改并且确认它们工作正常之后,Subversion提供了一个命令可以发布你的修改给项目中的其他人(通过写到版本库),如果别人发布了各自的修改,Subversion提供了手段可以把这些修改与你的工作目录进行合并(通过读取版本库)。" - -#. (para) -#: ../source/book.xml:1490 -#, fuzzy -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 .svn, also known as the working copy administrative directory. 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." -msgstr "一个工作拷贝也包括一些由Subversion创建并维护的额外文件,用来协助执行这些命令。通常情况下,你的工作拷贝的每一个文件夹都有一个以.svn为名的文件夹,也被叫做工作拷贝管理目录,这个目录里的文件能够帮助Subversion识别哪一个文件做过修改,哪一个文件相对于别人的工作已经过期。" - -#. (para) -#: ../source/book.xml:1499 -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." -msgstr "一个典型的Subversion的版本库经常包含许多项目的文件(或者说源代码),通常每一个项目都是版本库的子目录,在这种布局下,一个用户的工作拷贝往往对应版本库的的一个子目录。" - -#. (para) -#: ../source/book.xml:1504 -msgid "For example, suppose you have a repository that contains two software projects, paint and calc. Each project lives in its own top-level subdirectory, as shown in ." -msgstr "举一个例子,你的版本库包含两个软件项目,paintcalc。每个项目在它们各自的顶级子目录下,见。" - -#. (title) -#: ../source/book.xml:1510 -msgid "The repository's filesystem" -msgstr "版本库的文件系统" - -#. (para) -#: ../source/book.xml:1518 -msgid "To get a working copy, you must check out some subtree of the repository. (The term check out 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 /calc, you will get a working copy like this:" -msgstr "为了得到一个工作拷贝,你必须检出check out)版本库的一个子树,(术语check out听起来像是锁定或者保留资源,实际上不是,只是简单的得到一个项目的私有拷贝),举个例子,你检出 /calc,你可以得到这样的工作拷贝:" - -#. (screen) -#: ../source/book.xml:1525 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc\n" -"A calc/Makefile\n" -"A calc/integer.c\n" -"A calc/button.c\n" -"Checked out revision 56.\n" -"\n" -"$ ls -A calc\n" -"Makefile integer.c button.c .svn/\n" -msgstr "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc\n" -"A calc/Makefile\n" -"A calc/integer.c\n" -"A calc/button.c\n" -"Checked out revision 56.\n" -"\n" -"$ ls -A calc\n" -"Makefile integer.c button.c .svn/\n" - -#. (para) -#: ../source/book.xml:1535 -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 /calc directory, with one additional entry—.svn—which holds the extra information needed by Subversion, as mentioned earlier." -msgstr "列表中的A表示Subversion增加了一些条目到工作拷贝,你现在有了一个/calc的个人拷贝,有一个附加的目录—.svn—保存着前面提及的Subversion需要的额外信息。" - -#. (para) -#: ../source/book.xml:1542 -msgid "Suppose you make changes to button.c. Since the .svn 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 committing (or checking in) changes to the repository." -msgstr "假定你修改了button.c,因为.svn目录记录着文件的修改日期和原始内容,Subversion可以告诉你已经修改了文件,然而,在你明确告诉它之前,Subversion不会将你的改变公开,将改变公开的操作被叫做提交(committing,或者是checking in)修改到版本库。" - -#. (para) -#: ../source/book.xml:1550 -msgid "To publish your changes to others, you can use Subversion's commit command." -msgstr "将你的修改发布给别人,你可以使用Subversion的提交(commit)命令。" - -#. (screen) -#: ../source/book.xml:1552 -#, no-wrap -msgid "" -"\n" -"$ svn commit button.c -m \"Fixed a typo in button.c.\"\n" -"Sending button.c\n" -"Transmitting file data .\n" -"Committed revision 57.\n" -msgstr "" -"\n" -"$ svn commit button.c -m \"Fixed a typo in button.c.\"\n" -"Sending button.c\n" -"Transmitting file data .\n" -"Committed revision 57.\n" - -#. (para) -#: ../source/book.xml:1558 -msgid "Now your changes to button.c 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 /calc, they will see your changes in the latest version of the file." -msgstr "这时你对button.c的修改已经提交到了版本库,其中包含了关于此次提交的日志信息(例如是修改了拼写错误)。如果其他人取出了/calc的一个工作拷贝,他们会看到这个文件最新的版本。" - -#. (para) -#: ../source/book.xml:1564 -msgid "Suppose you have a collaborator, Sally, who checked out a working copy of /calc at the same time you did. When you commit your change to button.c, Sally's working copy is left unchanged; Subversion only modifies working copies at the user's request." -msgstr "假设你有个合作者,Sally,她和你同时取出了/calc的一个工作拷贝,你提交了你对button.c的修改,Sally的工作拷贝并没有改变,Subversion只在用户要求的时候才改变工作拷贝。" - -#. (para) -#: ../source/book.xml:1570 -msgid "To bring her project up to date, Sally can ask Subversion to update her working copy, by using the Subversion update command. This will incorporate your changes into her working copy, as well as any others that have been committed since she checked it out." -msgstr "要使项目最新,Sally可以要求Subversion更新她的工作备份,通过使用更新(update)命令,将结合你和所有其他人在她上次更新之后的改变到她的工作拷贝。" - -#. (screen) -#: ../source/book.xml:1576 -#, no-wrap -msgid "" -"\n" -"$ pwd\n" -"/home/sally/calc\n" -"\n" -"$ ls -A \n" -".svn/ Makefile integer.c button.c\n" -"\n" -"$ svn update\n" -"U button.c\n" -"Updated to revision 57.\n" -msgstr "" -"\n" -"$ pwd\n" -"/home/sally/calc\n" -"\n" -"$ ls -A \n" -".svn/ Makefile integer.c button.c\n" -"\n" -"$ svn update\n" -"U button.c\n" -"Updated to revision 57.\n" - -#. (para) -#: ../source/book.xml:1587 -msgid "The output from the svn update command indicates that Subversion updated the contents of button.c. Note that Sally didn't need to specify which files to update; Subversion uses the information in the .svn directory, and further information in the repository, to decide which files need to be brought up to date." -msgstr "svn update命令的输出表明Subversion更新了button.c的内容,注意,Sally不必指定要更新的文件,subversion利用.svn以及版本库的进一步信息决定哪些文件需要更新。" - -#. (title) -#: ../source/book.xml:1596 -msgid "Repository URLs" -msgstr "版本库的 URL" - -#. (para) -#: ../source/book.xml:1598 -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. describes how different URL schemes map to the available access methods." -msgstr "Subversion可以通过多种方式访问—本地磁盘访问,或各种各样不同的网络协议,这要看你的管理员是如何设置,但一个版本库地址永远都只是一个URL,描述了不同的URL模式对应的访问方法。" - -#. (title) -#: ../source/book.xml:1608 -msgid "Repository Access URLs" -msgstr "版本库访问 URL" - -#. (entry) -#: ../source/book.xml:1613 -msgid "Schema" -msgstr "方案" - -#. (entry) -#: ../source/book.xml:1614 -msgid "Access Method" -msgstr "访问方法" - -#. (literal) -#: ../source/book.xml:1620 -msgid "file:///" -msgstr "file:///" - -#. (entry) -#: ../source/book.xml:1622 -msgid "direct repository access (on local disk)" -msgstr "直接版本库访问(本地磁盘)。" - -#. (literal) -#: ../source/book.xml:1626 ../source/book.xml:1635 -msgid "http://" -msgstr "http://" - -#. (entry) -#: ../source/book.xml:1628 -msgid "access via WebDAV protocol to Subversion-aware Apache server" -msgstr "通过配置Subversion的Apache服务器的WebDAV协议。" - -#. (literal) -#: ../source/book.xml:1633 -msgid "https://" -msgstr "https://" - -#. (entry) -#: ../source/book.xml:1635 -msgid "same as , but with SSL encryption." -msgstr "与相似,但是包括SSL加密。" - -#. (literal) -#: ../source/book.xml:1640 ../source/book.xml:1649 -msgid "svn://" -msgstr "svn://" - -#. (entry) -#: ../source/book.xml:1642 -msgid "access via custom protocol to an server" -msgstr "通过服务自定义的协议。" - -#. (literal) -#: ../source/book.xml:1647 -msgid "svn+ssh://" -msgstr "svn+ssh://" - -#. (entry) -#: ../source/book.xml:1649 -msgid "same as , but through an SSH tunnel." -msgstr "与相似,但通过SSH封装。" - -#. (para) -#: ../source/book.xml:1655 -msgid "For more information on how Subversion parses URLs, see . For more information on the different types of network servers available for Subversion, see ." -msgstr "关于Subversion解析URL的更多信息,见。关于不同的网络服务器类型,见。" - -#. (title) -#: ../source/book.xml:1665 -msgid "Revisions" -msgstr "修订版本" - -#. (para) -#: ../source/book.xml:1667 -msgid "An svn commit 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." -msgstr "一个svn commit操作可以作为一个原子事务操作发布任意数量文件和目录的修改,在你的工作拷贝里,你可以改变文件内容、删除、改名以及拷贝文件和目录,然后作为一个原子事务一起提交。" - -#. (para) -#: ../source/book.xml:1673 -msgid "By atomic transaction, 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." -msgstr "原子事务的意思是:要么所有的改变发生,要么都不发生,Subversion努力保持原子性以应对程序错误、系统错误、网络问题和其他用户行为。" - -#. (para) -#: ../source/book.xml:1678 -msgid "Each time the repository accepts a commit, this creates a new state of the filesystem tree, called a revision. 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." -msgstr "每当版本库接受了一个提交,文件系统进入了一个新的状态,叫做一次修订(revision),每一个修订版本被赋予一个独一无二的自然数,一个比一个大,初始修订号是0,只创建了一个空目录,没有任何内容。" - -#. (para) -#: ../source/book.xml:1685 -msgid " 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 snapshot of the way the repository looked after a commit." -msgstr "可以更形象的描述版本库,想象有一组修订号,从0开始,从左到右,每一个修订号有一个目录树挂在它下面,每一个树好像是一次提交后的版本库快照。" - -#. (title) -#: ../source/book.xml:1693 -msgid "The repository" -msgstr "版本库" - -#. (title) -#: ../source/book.xml:1703 -msgid "Global Revision Numbers" -msgstr "全局版本号" - -#. (para) -#: ../source/book.xml:1705 -msgid "Unlike most version control systems, Subversion's revision numbers apply to entire trees, 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 revision 5 of foo.c, they really mean foo.c as it appears in revision 5. Notice that in general, revisions N and M of a file do not 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 for more details.)" -msgstr "不像其他版本控制系统,Subversion的修订号是针对整个目录树的,而不是单个文件。每一个修订号代表了一次提交后版本库整个目录树的特定状态,另一种理解是修订号N代表版本库已经经过了N次提交。当Subversion用户讨论foo.c的修订号5时,他们的实际意思是在修订号5时的foo.c。需要注意的是,一个文件的修订版本N和M并不必有所不同。许多其它版本控制系统使用每文件一个修订号的策略,所以会感觉这些概念有点不一样。(以前的CVS用户可能希望察看来得到更多细节。)" - -#. (para) -#: ../source/book.xml:1722 -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:" -msgstr "需要特别注意的是,工作拷贝并不一定对应版本库中的单个修订版本,他们可能包含多个修订版本的文件。举个例子,你从版本库检出一个工作拷贝,最近的修订号是4:" - -#. (screen) -#: ../source/book.xml:1727 -#, no-wrap -msgid "" -"\n" -"calc/Makefile:4\n" -" integer.c:4\n" -" button.c:4\n" -msgstr "" -"\n" -"calc/Makefile:4\n" -" integer.c:4\n" -" button.c:4\n" - -#. (para) -#: ../source/book.xml:1732 -msgid "At the moment, this working directory corresponds exactly to revision 4 in the repository. However, suppose you make a change to button.c, 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:" -msgstr "此刻,工作目录与版本库的修订版本4完全对应,然而,你修改了button.c并且提交之后,假设没有别的提交出现,你的提交会在版本库建立修订版本5,你的工作拷贝会是这个样子的:" - -#. (screen) -#: ../source/book.xml:1738 -#, no-wrap -msgid "" -"\n" -"calc/Makefile:4\n" -" integer.c:4\n" -" button.c:5\n" -msgstr "" -"\n" -"calc/Makefile:4\n" -" integer.c:4\n" -" button.c:5\n" - -#. (para) -#: ../source/book.xml:1743 -msgid "Suppose that, at this point, Sally commits a change to integer.c, creating revision 6. If you use svn update to bring your working copy up to date, then it will look like this:" -msgstr "假设此刻,Sally提交了对integer.c的修改,建立修订版本6,如果你使用svn update来更新你的工作拷贝,你会看到:" - -#. (screen) -#: ../source/book.xml:1747 -#, no-wrap -msgid "" -"\n" -"calc/Makefile:6\n" -" integer.c:6\n" -" button.c:6\n" -msgstr "" -"\n" -"calc/Makefile:6\n" -" integer.c:6\n" -" button.c:6\n" - -#. (para) -#: ../source/book.xml:1752 -msgid "Sally's change to integer.c will appear in your working copy, and your change will still be present in button.c. In this example, the text of Makefile is identical in revisions 4, 5, and 6, but Subversion will mark your working copy of Makefile 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." -msgstr "Sally对integer.c的改变会出现在你的工作拷贝,你对button.c的改变还在,在这个例子里,Makefile在4、5、6修订版本都是一样的,但是Subversion会把他的Makefile的修订号设为6来表明它是最新的,所以你在工作拷贝顶级目录作一次干净的更新,会使得所有内容对应版本库的同一修订版本。" - -#. (title) -#: ../source/book.xml:1765 -msgid "How Working Copies Track the Repository" -msgstr "工作拷贝怎样跟踪版本库" - -#. (para) -#: ../source/book.xml:1767 -msgid "For each file in a working directory, Subversion records two essential pieces of information in the .svn/ administrative area:" -msgstr "对于工作拷贝的每一个文件,Subversion在管理区域.svn/记录两项关键的信息:" - -#. (para) -#: ../source/book.xml:1772 -msgid "what revision your working file is based on (this is called the file's working revision), and" -msgstr "工作文件所作为基准的修订版本(叫做文件的工作修订版本)和" - -#. (para) -#: ../source/book.xml:1777 -msgid "a timestamp recording when the local copy was last updated by the repository." -msgstr "一个本地拷贝最后更新的时间戳。" - -#. (para) -#: ../source/book.xml:1781 -msgid "Given this information, by talking to the repository, Subversion can tell which of the following four states a working file is in:" -msgstr "给定这些信息,通过与版本库通讯,Subversion可以告诉我们工作文件是处于如下四种状态的那一种:" - -#. (term) -#: ../source/book.xml:1786 -msgid "Unchanged, and current" -msgstr "未修改且是当前的" - -#. (para) -#: ../source/book.xml:1788 -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 svn commit of the file will do nothing, and an svn update of the file will do nothing." -msgstr "文件在工作目录里没有修改,在工作修订版本之后没有修改提交到版本库。svn commit操作不做任何事情,svn update不做任何事情。" - -#. (term) -#: ../source/book.xml:1797 -msgid "Locally changed, and current" -msgstr "本地已修改且是当前的" - -#. (para) -#: ../source/book.xml:1799 -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 svn commit of the file will succeed in publishing your changes, and an svn update of the file will do nothing." -msgstr "在工作目录已经修改,从基本修订版本之后没有修改提交到版本库。本地修改没有提交,因此svn commit会成功提交,svn update不做任何事情。" - -#. (term) -#: ../source/book.xml:1809 -msgid "Unchanged, and out-of-date" -msgstr "未修改且不是当前的了" - -#. (para) -#: ../source/book.xml:1811 -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 svn commit of the file will do nothing, and an svn update of the file will fold the latest changes into your working copy." -msgstr "这个文件在工作目录没有修改,但在版本库中已经修改了。这个文件最终将更新到最新版本,成为当时的公共修订版本。svn commit不做任何事情,svn update将会取得最新的版本到工作拷贝。" - -#. (term) -#: ../source/book.xml:1821 -msgid "Locally changed, and out-of-date" -msgstr "本地已修改且不是最新的" - -#. (para) -#: ../source/book.xml:1823 -msgid "The file has been changed both in the working directory, and in the repository. An svn commit of the file will fail with an out-of-date error. The file should be updated first; an svn update 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." -msgstr "这个文件在工作目录和版本库都得到修改。一个svn commit将会失败,这个文件必须首先更新,svn update命令会合并公共和本地修改,如果Subversion不可以自动完成,将会让用户解决冲突。" - -#. (para) -#: ../source/book.xml:1835 -msgid "This may sound like a lot to keep track of, but the svn status command will show you the state of any item in your working copy. For more information on that command, see ." -msgstr "这看起来需要记录很多事情,但是svn status命令可以告诉你工作拷贝中文件的状态,关于此命令更多的信息,请看。" - -#. (title) -#: ../source/book.xml:1844 -msgid "Mixed Revision Working Copies" -msgstr "混合版本的工作拷贝" - -#. (para) -#: ../source/book.xml:1846 -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." -msgstr "作为一个普遍原理,Subversion努力做到尽可能的灵活,一个特殊的灵活特性就是让工作拷贝包含不同工作修订版本的文件和目录,不幸的是,这个灵活性会让许多新用户感到迷惑。如果上一个混合修订版本的例子让你感到困惑,这里是一个为何有这种特性和如何利用这个特性的基础介绍。" - -#. (title) -#: ../source/book.xml:1857 -msgid "Updates and Commits are Separate" -msgstr "更新和提交是分开的" - -#. (para) -#: ../source/book.xml:1859 -msgid "One of the fundamental rules of Subversion is that a push action does not cause a pull, 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 svn update should gracefully merge repository changes into your own, rather than forcing you to publish them." -msgstr "Subversion有一个基本原则就是一个push动作不会导致pull,反之亦然,因为你准备好了提交你的修改并不意味着你已经准备好了从其他人那里接受修改。如果你的新的修改还在进行,svn update将会优雅的合并版本库的修改到你的工作拷贝,而不会强迫将修改发布。" - -#. (para) -#: ../source/book.xml:1868 -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." -msgstr "这个规则的主要副作用就是工作拷贝需要记录额外的信息来追踪混合修订版本,并且也需要能容忍这种混合,当目录本身也是版本化的时候情况更加复杂。" - -#. (para) -#: ../source/book.xml:1873 -msgid "For example, suppose you have a working copy entirely at revision 10. You edit the file foo.html and then perform an svn commit, 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 svn update, and svn commit doesn't pull down new changes. If, on the other hand, svn commitwere 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 push and pull remaining separate actions. Therefore the only safe thing the Subversion client can do is mark the one file—foo.html—as being at revision 15. The rest of the working copy remains at revision 10. Only by running svn update can the latest changes be downloaded, and the whole working copy be marked as revision 15." -msgstr "举个例子,假定你有一个工作拷贝,修订版本号是10。你修改了foo.html,然后执行svn commit,在版本库里创建了修订版本15。当成功提交之后,许多用户希望工作拷贝完全变成修订版本15,但是事实并非如此。修订版本从10到15会发生任何修改,可是客户端在运行svn update之前不知道版本库发生了怎样的改变,svn commit不会拖出任何新的修改。另一方面,如果svn commit会自动下载最新的修改,可以使得整个工作拷贝成为修订版本15—但是,那样我们会打破pushpull完全分开的原则。因此,Subversion客户端最安全的方式是标记一个文件—foo.html—为修订版本15,工作拷贝余下的部分还是修订版本10。只有运行svn update才会下载最新的修改,整个工作拷贝被标记为修订版本15。" - -#. (title) -#: ../source/book.xml:1901 -msgid "Mixed revisions are normal" -msgstr "混合版本很常见" - -#. (para) -#: ../source/book.xml:1903 -msgid "The fact is, every time you run svn commit, 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 svn status --verbose command (see for more information.)" -msgstr "事实上,每次运行svn commit,你的工作拷贝都会进入混合多个修订版本的状态,刚刚提交的文件会比其他文件有更高的修订版本号。经过多次提交(之间没有更新),你的工作拷贝会完全是混合的修订版本。即使只有你一个人使用版本库,你依然会见到这个现象。为了检验混合工作修订版本,可以使用svn status --verbose命令(详细信息见)。" - -#. (para) -#: ../source/book.xml:1914 -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 svn log command is used to display the history of changes to a file or directory (see ). 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 svn update hasn't been run in a long time), then the history of the older version of the object is shown." -msgstr "通常,新用户对于工作拷贝的混合修订版本一无所知,这会让人糊涂,因为许多客户端命令对于所检验条目的修订版本很敏感。例如svn log命令显示一个文件或目录的历史修改信息(见),当用户对一个工作拷贝对象调用这个命令,他们希望看到这个对象的整个历史信息。但是如果这个对象的修订版本已经相当老了(通常因为很长时间没有运行svn update),此时会显示比这个对象更老的历史。" - -#. (title) -#: ../source/book.xml:1931 -msgid "Mixed revisions are useful" -msgstr "混合版本很有用" - -#. (para) -#: ../source/book.xml:1933 -msgid "If your project is sufficiently complex, you'll discover that it's sometimes nice to forcibly backdate (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 . 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 time machine aspect of a version control system—the feature which allows you to move any portion of your working copy forward and backward in history." -msgstr "如果你的项目十分复杂,有时候你会发现强制工作拷贝的一部分回溯到过去非常有用(或者更新到过去的某个修订版本),你将在学习到如何这样做。或许你很希望测试某一子目录下某一子模块的早期版本,又或是要测试一个bug什么时候发生,这是版本控制系统像时间机器的一个方面—这个特性允许工作拷贝的任何一个部分在历史中前进或后退。" - -#. (title) -#: ../source/book.xml:1949 -msgid "Mixed revisions have limitations" -msgstr "混合版本有限制" - -#. (para) -#: ../source/book.xml:1951 -msgid "However you make use of mixed revisions in your working copy, there are limitations to this flexibility." -msgstr "无论你如何在工作拷贝中利用混合修订版本,这种灵活性还是有限制的。" - -#. (para) -#: ../source/book.xml:1953 -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." -msgstr "首先,你不可以提交一个不是完全最新的文件或目录,如果有个新的版本存在于版本库,你的删除操作会被拒绝,这防止你不小心破坏你没有见到的东西。" - -#. (para) -#: ../source/book.xml:1958 -msgid "Second, you cannot commit a metadata change to a directory unless it's fully up-to-date. You'll learn about attaching properties to items in . 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." -msgstr "第二,如果目录已经不是最新的了,你不能提交一个目录的元数据更改。你将会在学习附加属性,一个目录的工作修订版本定义了许多条目和属性,因而对一个过期的版本提交属性会破坏一些你没有见到的属性。" - -#. (title) -#: ../source/book.xml:1972 ../source/book.xml:3797 ../source/book.xml:9193 -#: ../source/book.xml:11876 -msgid "Summary" -msgstr "总结" - -#. (para) -#: ../source/book.xml:1974 -msgid "We've covered a number of fundamental Subversion concepts in this chapter:" -msgstr "我们在这一章里学习了许多Subversion的基本概念:" - -#. (para) -#: ../source/book.xml:1978 -msgid "We've introduced the notions of the central repository, the client working copy, and the array of repository revision trees." -msgstr "我们介绍了中央版本库、客户工作拷贝和版本修订树的概念。" - -#. (para) -#: ../source/book.xml:1983 -msgid "We've seen some simple examples of how two collaborators can use Subversion to publish and receive changes from one another, using the copy-modify-merge model." -msgstr "我们介绍了两个协作者如何使用Subversion通过拷贝-修改-合并模型发布和获得对方的修改。" - -#. (para) -#: ../source/book.xml:1989 -msgid "We've talked a bit about the way Subversion tracks and manages information in a working copy." -msgstr "我们讨论了一些Subversion跟踪和管理工作拷贝信息的方式。" - -#. (para) -#: ../source/book.xml:1993 -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." -msgstr "现在,你一定对Subversion在多数情形下的工作方式有了很好的认识,有了这些知识的武装,你一定已经准备好跳到下一章去了,一个关于Subversion命令与特性的详细教程。" - -#. (title) -#: ../source/book.xml:2006 -msgid "Basic Usage" -msgstr "基本使用" - -#. (para) -#: ../source/book.xml:2008 -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." -msgstr "现在,我们将要深入到Subversion的使用细节当中,完成本章时,你将学会所有Subversion日常使用的命令,你将从把数据导入到Subversion开始,接着是初始化的检出(check out),然后是做出修改并检查,你也将会学到如何在工作拷贝中获取别人的修改,检查他们,并解决所有可能发生的冲突。" - -#. (para) -#: ../source/book.xml:2017 -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 and are familiar with the general model of Subversion. For a complete reference of all commands, see ." -msgstr "这一章并不是Subversion命令的完全列表—而是你将会遇到的最常用任务的介绍,这一章假定你已经读过并且理解了,而且熟悉Subversion的模型,如果想查看所有命令的参考,见。" - -#. (title), (refpurpose) -#: ../source/book.xml:2029 ../source/book.xml:18754 ../source/book.xml:21620 -#: ../source/book.xml:22644 -msgid "Help!" -msgstr "求助!" - -#. (para) -#: ../source/book.xml:2031 -msgid "Before reading on, here is the most important command you'll ever need when using Subversion: svn help. The Subversion command-line client is self-documenting—at any time, a quick svn help SUBCOMMAND will describe the syntax, options, and behavior of the subcommand." -msgstr "在继续阅读之前,需要知道Subversion使用中最重要的命令:svn help,Subversion命令行工具是一个自文档的工具—在任何时候你可以运行svn help SUBCOMMAND来查看子命令的语法、参数以及行为方式。" - -#. (screen) -#: ../source/book.xml:2037 -#, no-wrap -msgid "" -"\n" -"$ svn help import\n" -"import: Commit an unversioned file or tree into the repository.\n" -"usage: import [PATH] URL\n" -"\n" -" Recursively commit a copy of PATH to URL.\n" -" If PATH is omitted '.' is assumed.\n" -" Parent directories are created as necessary in the repository.\n" -" If PATH is a directory, the contents of the directory are added\n" -" directly under URL.\n" -"\n" -"Valid options:\n" -" -q [--quiet] : print as little as possible\n" -" -N [--non-recursive] : operate on single directory only\n" -"…\n" -msgstr "" -"\n" -"$ svn help import\n" -"import: Commit an unversioned file or tree into the repository.\n" -"usage: import [PATH] URL\n" -"\n" -" Recursively commit a copy of PATH to URL.\n" -" If PATH is omitted '.' is assumed.\n" -" Parent directories are created as necessary in the repository.\n" -" If PATH is a directory, the contents of the directory are added\n" -" directly under URL.\n" -"\n" -"Valid options:\n" -" -q [--quiet] : print as little as possible\n" -" -N [--non-recursive] : operate on single directory only\n" -"…\n" - -#. (title) -#: ../source/book.xml:2055 -msgid "Options and Switches and Flags, Oh My!" -msgstr "" - -#. (para) -#: ../source/book.xml:2057 -msgid "The Subversion command line client has numerous command modifiers (which we call options), but there are two distinct kinds of options—short options that are a single hyphen followed by a single letter, and long options that consist of two hyphens followed by a number of letters (eg -s and --this-is-a-long-option 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 usually 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." -msgstr "" - -#. (title) -#: ../source/book.xml:2080 -msgid "Getting Data into your Repository" -msgstr "导入数据到你的版本库" - -#. (para) -#: ../source/book.xml:2082 -msgid "There are two ways to get new files into your Subversion repository: svn import and svn add. We'll discuss svn import here and svn add later in this chapter when we review a typical day with Subversion." -msgstr "有两种方法可以将新文件引入Subversion版本库:svn importsvn add,我们将在本章讨论svn import,而会在回顾Subversion的典型一天时讨论svn add。" - -#. (title), (refname) -#: ../source/book.xml:2090 ../source/book.xml:18806 -msgid "svn import" -msgstr "svn import" - -#. (para) -#: ../source/book.xml:2092 -msgid "The svn import command is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. svn import 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:" -msgstr "svn import是将未版本化文件导入版本库的最快方法,会根据需要创建中介目录。svn import不需要一个工作拷贝,你的文件会直接提交到版本库,这通常用在你希望将一组文件加入到Subversion版本库时,例如:" - -#. (screen) -#: ../source/book.xml:2099 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin create /var/svn/newrepos\n" -"$ svn import mytree file:///var/svn/newrepos/some/project \\\n" -" -m \"Initial import\"\n" -"Adding mytree/foo.c\n" -"Adding mytree/bar.c\n" -"Adding mytree/subdir\n" -"Adding mytree/subdir/quux.h\n" -"\n" -"Committed revision 1.\n" -msgstr "" -"\n" -"$ svnadmin create /usr/local/svn/newrepos\n" -"$ svn import mytree file:///usr/local/svn/newrepos/some/project \\\n" -" -m \"Initial import\"\n" -"Adding mytree/foo.c\n" -"Adding mytree/bar.c\n" -"Adding mytree/subdir\n" -"Adding mytree/subdir/quux.h\n" -"\n" -"Committed revision 1.\n" - -#. (para) -#: ../source/book.xml:2110 -msgid "The previous example copied the contents of directory mytree under the directory some/project in the repository:" -msgstr "在上一个例子里,将会拷贝目录mytree到版本库的some/project下:" - -#. (screen) -#: ../source/book.xml:2113 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn list file:///var/svn/newrepos/some/project\n" -"bar.c\n" -"foo.c\n" -"subdir/\n" -msgstr "" -"\n" -"$ svn list file:///usr/local/svn/newrepos/some/project\n" -"bar.c\n" -"foo.c\n" -"subdir/\n" - -#. (para) -#: ../source/book.xml:2119 -msgid "Note that after the import is finished, the original tree is not converted into a working copy. To start working, you still need to svn checkout a fresh working copy of the tree." -msgstr "注意,在导入之后,原来的目录树并没有转化成工作拷贝,为了开始工作,你还是需要运行svn checkout导出一个工作拷贝。" - -#. (title) -#: ../source/book.xml:2127 -msgid "Recommended repository layout" -msgstr "推荐的版本库布局" - -#. (para) -#: ../source/book.xml:2129 -msgid "While Subversion's flexibility allows you to layout your repository in any way that you choose, we recommend that you create a trunk directory to hold the main line of development, a branches directory to contain branch copies, and a tags directory to contain tag copies, for example:" -msgstr "尽管Subversion的灵活性允许你自由布局版本库,但我们有一套推荐的方式,创建一个trunk目录来保存开发的主线,一个branches目录存放分支拷贝,tags目录保存标签拷贝,例如:" - -#. (screen) -#: ../source/book.xml:2136 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn list file:///var/svn/repos\n" -"/trunk\n" -"/branches\n" -"/tags\n" -msgstr "" -"\n" -"$ svn list file:///usr/local/svn/repos\n" -"/trunk\n" -"/branches\n" -"/tags\n" - -#. (para) -#: ../source/book.xml:2142 -msgid "You'll learn more about tags and branches in . For details and how to set up multiple projects, see and to read more about project roots." -msgstr "你将会在看到标签和分支的详细内容,关于设置多个项目的信息,可以看中关于项目根目录的内容。" - -#. (title) -#: ../source/book.xml:2152 -msgid "Initial Checkout" -msgstr "初始化检出" - -#. (para) -#: ../source/book.xml:2154 -msgid "Most of the time, you will start using a Subversion repository by doing a checkout of your project. Checking out a repository creates a working copy of it on your local machine. This copy contains the HEAD (latest revision) of the Subversion repository that you specify on the command line:" -msgstr "大多数时候,你会使用checkout从版本库取出一个新拷贝开始使用Subversion,这样会在本机创建一个项目的本地拷贝,这个拷贝包括了命令行指定版本库中的HEAD(最新的)版本:" - -#. (screen) -#: ../source/book.xml:2160 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk\n" -"A trunk/Makefile.in\n" -"A trunk/ac-helpers\n" -"A trunk/ac-helpers/install.sh\n" -"A trunk/ac-helpers/install-sh\n" -"A trunk/build.conf\n" -"…\n" -"Checked out revision 8810.\n" -msgstr "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk\n" -"A trunk/Makefile.in\n" -"A trunk/ac-helpers\n" -"A trunk/ac-helpers/install.sh\n" -"A trunk/ac-helpers/install-sh\n" -"A trunk/build.conf\n" -"…\n" -"Checked out revision 8810.\n" - -#. (title) -#: ../source/book.xml:2172 -msgid "What's in a Name?" -msgstr "名称中有什么?" - -#. (para) -#: ../source/book.xml:2174 -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 tells you how to give Subversion a hint that textual operations don't make sense for a particular file. There are a few places, however, where Subversion places restrictions on information it stores." -msgstr "Subversion努力控制版本控制下数据的类型,文件的内容和属性值都是按照二进制数据存储和传递,并且给Subversion提示以说明对于特定文件文本化的操作是没有意义的,也有一些地方,Subversion对存放信息的有限制。" - -#. (para) -#: ../source/book.xml:2183 -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)." -msgstr "Subversion内部使用二进制处理数据—例如,属性名称,路径名和日志信息—UTF-8编码的Unicode,这并不意味着与Subversion的交互必须完全使用UTF-8。作为一个惯例,Subversion的客户端能够透明的转化UTF-8和你所使用系统的编码,前提是可以进行有意义的转换(当然是大多数目前常见的编码)。" - -#. (para) -#: ../source/book.xml:2192 -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 or ." -msgstr "此外,路径名称在WebDAV交换中会作为XML属性值,就像Subversion的管理文件。这意味着路径名称只能包含合法的XML(1.0)字符,Subversion也会禁止路径名称中出现TAB、CR或LF字符,所以它们才不会在区别程序或如的输出命令中断掉。" - -#. (para) -#: ../source/book.xml:2199 -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 legally correct versions for internal use." -msgstr "虽然看起来要记住很多事情,但在实践中这些限制很少会成为问题。只要你的本地设置兼容UTF-8,也不在路径名称中使用控制字符,与Subversion的通讯就不会有问题。命令行客户端会添加一些额外的帮助字节—自动将你输入的URL路径字符转化为合法正确的内部用版本。" - -#. (para) -#: ../source/book.xml:2209 -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:" -msgstr "尽管上面的例子取出了trunk目录,你也完全可以通过输入特定URL取出任意深度的子目录:" - -#. (screen) -#: ../source/book.xml:2213 -#, no-wrap -msgid "" -"\n" -"$ svn checkout \\\n" -" http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/\n" -"A cmdline/revert_tests.py\n" -"A cmdline/diff_tests.py\n" -"A cmdline/autoprop_tests.py\n" -"A cmdline/xmltests\n" -"A cmdline/xmltests/svn-test.sh\n" -"…\n" -"Checked out revision 8810.\n" -msgstr "" -"\n" -"$ svn checkout \\\n" -" http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/\n" -"A cmdline/revert_tests.py\n" -"A cmdline/diff_tests.py\n" -"A cmdline/autoprop_tests.py\n" -"A cmdline/xmltests\n" -"A cmdline/xmltests/svn-test.sh\n" -"…\n" -"Checked out revision 8810.\n" - -#. (para) -#: ../source/book.xml:2224 -msgid "Since Subversion uses a copy-modify-merge model instead of lock-modify-unlock (see ), 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." -msgstr "因为Subversion使用拷贝-修改-合并模型而不是锁定-修改-解锁模型(见),你可以在工作拷贝中开始修改的目录和文件,你的工作拷贝和你的系统中的其它文件和目录完全一样,你可以编辑并改变它,移动它,也可以完全的删掉它,把它忘了。" - -#. (para) -#: ../source/book.xml:2232 -msgid "While your working copy is just like any other collection of files and directories on your system, you can edit files at will, but you must tell Subversion about everything else that you do. For example, if you want to copy or move an item in a working copy, you should use svn copy or svn move instead of the copy and move commands provided by your operating system. We'll talk more about them later in this chapter." -msgstr "因为你的工作拷贝同你系统上的文件和目录没有任何区别,你可以随意修改文件,但是你必须告诉Subversion你做的其他任何事。例如,你希望拷贝或移动工作拷贝的一个文件,你应该使用svn copy或者 svn move而不要使用操作系统的拷贝移动命令,我们会在本章后面详细介绍。" - -#. (para) -#: ../source/book.xml:2242 -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." -msgstr "除非你准备好了提交一个新文件或目录,或改变了已存在的,否则没有必要通知Subversion你做了什么。" - -#. (title) -#: ../source/book.xml:2248 -msgid "What's with the .svn directory?" -msgstr ".svn目录包含什么?" - -#. (para) -#: ../source/book.xml:2250 -msgid "Every directory in a working copy contains an administrative area, a subdirectory named .svn. 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." -msgstr "工作拷贝中的任何一个目录包括一个名为.svn管理区域,通常列表操作不显示这个目录,但它仍然是一个非常重要的目录,无论你做什么?不要删除或是更改这个管理区域的任何东西,Subversion使用它来管理工作拷贝。" - -#. (para) -#: ../source/book.xml:2257 -msgid "If you accidentally remove the .svn subdirectory, the easiest way to fix the problem is to remove the entire containing directory (a normal system deletion, not svn delete), then run svn update from a parent directory. The Subversion client will re-download the directory you've deleted, with a new .svn area as well." -msgstr "如果你不小心删除了子目录.svn,最简单的解决办法是删除包含的目录(普通的文件系统删除,而不是svn delete),然后在父目录运行svn update,Subversion客户端会重新下载你删除的目录,并包含新的.svn。" - -#. (para) -#: ../source/book.xml:2265 -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:" -msgstr "因为你可以使用版本库的URL作为唯一参数取出一个工作拷贝,你也可以在版本库URL之后指定一个目录,这样会将你的工作目录放到你的新目录,举个例子:" - -#. (screen) -#: ../source/book.xml:2269 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk subv\n" -"A subv/Makefile.in\n" -"A subv/ac-helpers\n" -"A subv/ac-helpers/install.sh\n" -"A subv/ac-helpers/install-sh\n" -"A subv/build.conf\n" -"…\n" -"Checked out revision 8810.\n" -msgstr "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk subv\n" -"A subv/Makefile.in\n" -"A subv/ac-helpers\n" -"A subv/ac-helpers/install.sh\n" -"A subv/ac-helpers/install-sh\n" -"A subv/build.conf\n" -"…\n" -"Checked out revision 8810.\n" - -#. (para) -#: ../source/book.xml:2279 -msgid "That will place your working copy in a directory named subv instead of a directory named trunk as we did previously. The directory subv will be created if it doesn't already exist." -msgstr "这样将把你的工作拷贝放到subv而不是和前面那样放到trunk,如果subv不存在,将会自动创建。" - -#. (title) -#: ../source/book.xml:2286 -msgid "Disabling Password Caching" -msgstr "禁用密码缓存" - -#. (para) -#: ../source/book.xml:2293 -msgid "Of course, you're not terribly worried—first because you know that you can't really 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?" -msgstr "当然,你不必太过担心—首先你要知道你不会从Subversion真的删除文件,第二,Subversion密码不是和你的三百万个密码的任何一个相同,对吧?对吧?" - -#. (para) -#: ../source/book.xml:2288 -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, you can disable caching either permanently or on a case-by-case basis." -msgstr "当你执行的Subversion命令需要认证时,缺省情况下Subversion会在磁盘缓存认证信息,这样做出于便利,在接下来的操作中你就可以不必输入密码,但如果你很在乎密码缓存,你可以永久关闭缓存或每次执行命令时说明。" - -#. (para) -#: ../source/book.xml:2301 -msgid "To disable password caching for a particular one-time command, pass the option on the commandline. To permanently disable caching, you can add the line store-passwords = no to your local machine's Subversion configuration file. See for details." -msgstr "在某次命令关闭密码缓存可以在命令中使用选项,如果希望永久关闭缓存,可以在本机的Subversion配置文件中添加store-passwords = no这一行,详情请见。" - -#. (title) -#: ../source/book.xml:2310 -msgid "Authenticating as a Different User" -msgstr "用其它身份认证" - -#. (para) -#: ../source/book.xml:2312 -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 on the commandline and Subversion will attempt to authenticate as that user, prompting you for a password if necessary." -msgstr "因为Subversion认证缓存是缺省设置(包含用户名和密码)," - -#. (title) -#: ../source/book.xml:2328 -msgid "Basic Work Cycle" -msgstr "基本的工作循环" - -#. (para) -#: ../source/book.xml:2330 -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." -msgstr "Subversion有许多特性、选项和华而不实的高级功能,但日常的工作中你只使用其中的一小部分,在这一节里,我们会介绍许多你在日常工作中常用的命令。" - -#. (para) -#: ../source/book.xml:2335 -msgid "The typical work cycle looks like this:" -msgstr "典型的工作周期是这样的:" - -#. (para) -#: ../source/book.xml:2338 -msgid "Update your working copy" -msgstr "更新你的工作拷贝" - -#. (command), (refname) -#: ../source/book.xml:2342 ../source/book.xml:2402 ../source/book.xml:21115 -msgid "svn update" -msgstr "svn update" - -#. (para) -#: ../source/book.xml:2348 -msgid "Make changes" -msgstr "做出修改" - -#. (command), (refname) -#: ../source/book.xml:2352 ../source/book.xml:17472 -msgid "svn add" -msgstr "svn add" - -#. (command), (refname) -#: ../source/book.xml:2357 ../source/book.xml:18278 -msgid "svn delete" -msgstr "svn delete" - -#. (command), (refname) -#: ../source/book.xml:2362 ../source/book.xml:18099 -msgid "svn copy" -msgstr "svn copy" - -#. (command), (refname) -#: ../source/book.xml:2367 ../source/book.xml:19754 -msgid "svn move" -msgstr "svn move" - -#. (para) -#: ../source/book.xml:2373 -msgid "Examine your changes" -msgstr "检验修改" - -#. (command), (refname) -#: ../source/book.xml:2377 ../source/book.xml:20521 ../source/book.xml:24894 -msgid "svn status" -msgstr "svn status" - -#. (command), (refname) -#: ../source/book.xml:2382 ../source/book.xml:3353 ../source/book.xml:18388 -#: ../source/book.xml:24902 -msgid "svn diff" -msgstr "svn diff" - -#. (para) -#: ../source/book.xml:2388 -msgid "Possibly undo some changes" -msgstr "可能会取消一些修改" - -#. (command), (refname) -#: ../source/book.xml:2392 ../source/book.xml:20415 ../source/book.xml:24910 -msgid "svn revert" -msgstr "svn revert" - -#. (para) -#: ../source/book.xml:2398 -msgid "Resolve Conflicts (Merge Others' Changes)" -msgstr "解决冲突(合并别人的修改)" - -#. (command), (refname) -#: ../source/book.xml:2407 ../source/book.xml:20326 -msgid "svn resolved" -msgstr "svn resolved" - -#. (para) -#: ../source/book.xml:2413 -msgid "Commit your changes" -msgstr "提交你的修改" - -#. (command), (refname) -#: ../source/book.xml:2417 ../source/book.xml:17971 -msgid "svn commit" -msgstr "svn commit" - -#. (title) -#: ../source/book.xml:2426 -msgid "Update Your Working Copy" -msgstr "更新你的工作副本" - -#. (para) -#: ../source/book.xml:2428 -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 svn update to bring your working copy into sync with the latest revision in the repository." -msgstr "当你在一个团队的项目里工作时,你希望更新你的工作拷贝得到所有其他人这段时间作出的修改,使用svn update让你的工作拷贝与最新的版本同步。" - -#. (screen) -#: ../source/book.xml:2433 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"U foo.c\n" -"U bar.c\n" -"Updated to revision 2.\n" -msgstr "" -"\n" -"$ svn update\n" -"U foo.c\n" -"U bar.c\n" -"Updated to revision 2.\n" - -#. (para) -#: ../source/book.xml:2439 -msgid "In this case, someone else checked in modifications to both foo.c and bar.c since the last time you updated, and Subversion has updated your working copy to include those changes." -msgstr "这种情况下,其他人在你上次更新之后提交了对foo.cbar.c的修改,因此Subversion更新你的工作拷贝来引入这些更改。" - -#. (para) -#: ../source/book.xml:2443 -msgid "When the server sends changes to your working copy via svn update, 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 ." -msgstr "当服务器通过svn update将修改传递到你的工作拷贝时,每一个项目之前会有一个字母,来让你知道Subversion为保持最新对你的工作拷贝作了哪些工作。关于这些字母的详细含义,可以看。" - -#. (title) -#: ../source/book.xml:2452 -msgid "Make Changes to Your Working Copy" -msgstr "修改你的工作副本" - -#. (para) -#: ../source/book.xml:2454 -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 svn add, svn delete, svn copy, svn move, and svn mkdir. 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." -msgstr "现在你可以开始工作并且修改你的工作拷贝了,你很容易决定作出一个修改(或者是一组),像写一个新的特性,修正一个错误等等。这时可以使用的Subversion命令包括svn addsvn deletesvn copysvn move。如果你只是修改版本库中已经存在的文件,在你提交之前,不必使用上面的任何一个命令。" - -#. (para) -#: ../source/book.xml:2464 -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 mark 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." -msgstr "你可以对工作拷贝做出两种修改:文件修改和目录树修改。你不需要告诉Subversion你希望修改一个文件,只需要用你的编辑器、字处理器、图形程序或任何工具做出修改,Subversion自动监测到文件的更改,此外,二进制文件的处理方式和文本文件一样—也有同样的效率。对于目录树更改,你可以告诉Subversion将文件和目录预定的删除、添加、拷贝或移动标记,这些动作会在工作拷贝上立刻发生效果,但只有提交后才会在版本库里生效。" - -#. (para) -#: ../source/book.xml:2477 -msgid "Here is an overview of the five Subversion subcommands that you'll use most often to make tree changes." -msgstr "下面是Subversion用来修改目录树结构的五个子命令。" - -#. (title) -#: ../source/book.xml:2481 -msgid "Versioning symbolic links" -msgstr "版本控制符号连接" - -#. (para) -#: ../source/book.xml:2483 -msgid "On non-Windows platforms, Subversion is able to version files of the special type symbolic link (or, symlink). 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." -msgstr "在非Windows平台,Subversion可以将特殊类型符号链接(或是symlink)版本化,一个符号链接是对文件系统中其他对象的透明引用,可以通过对符合链接操作实现对引用对象的读写操作。" - -#. (para) -#: ../source/book.xml:2490 -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 points. 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." -msgstr "当符号链提交到Subversion版本库,Subversion会记住这个文件实际上是一个符号链,也会知道这个符号链指向的对象。当这个符号链检出到另一个支持符号链的操作系统上时,Subversion会重新构建文件系统级的符号链接。当然这样不会影响在Windows这类不支持符号链的系统上,在此类系统上,Subversion只会创建一个包含指向对象路径的文本文件,因为这个文件不能在Windows系统上作为符号链使用,所以它也会防止Windows用户作其他Subversion相关的操作。" - -#. (command) -#: ../source/book.xml:2508 -msgid "svn add foo" -msgstr "svn add foo" - -#. (para) -#: ../source/book.xml:2511 -msgid "Schedule file, directory, or symbolic link foo to be added to the repository. When you next commit, foo will become a child of its parent directory. Note that if foo is a directory, everything underneath foo will be scheduled for addition. If you only want to add foo itself, pass the option." -msgstr "预定将文件、目录或者符号链foo添加到版本库,当你下次提交后,foo会成为其父目录的一个子对象。注意,如果foo是目录,所有foo中的内容也会预定添加进去,如果你只想添加foo本身,请使用参数。" - -#. (command) -#: ../source/book.xml:2524 -msgid "svn delete foo" -msgstr "svn delete foo" - -#. (para) -#: ../source/book.xml:2536 -#, fuzzy -msgid "Of course, nothing is ever totally deleted from the repository—just from the HEAD 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 ." -msgstr "当然没有任何东西是在版本库里被删除了—只是在版本库的HEAD里消失了,你可以通过检出(或者更新你的工作拷贝)你做出删除操作的前一个修订版本来找回所有的东西,详细请见。" - -#. (para) -#: ../source/book.xml:2527 -msgid "Schedule file, directory, or symbolic link foo to be deleted from the repository. If foo is a file or link, it is immediately deleted from your working copy. If foo is a directory, it is not deleted, but Subversion schedules it for deletion. When you commit your changes, foo will be entirely removed from your working copy and the repository. " -msgstr "预定将文件、目录或者符号链foo从版本库中删除掉,如果foo是文件,它马上从工作拷贝中删除,如果是目录,不会被删除,但是Subversion准备好删除了,当你提交你的修改,foo就会在你的工作拷贝和版本库中被删除。" - -#. (command) -#: ../source/book.xml:2548 -msgid "svn copy foo bar" -msgstr "svn copy foo bar" - -#. (para) -#: ../source/book.xml:2551 -#, fuzzy -msgid "Create a new item bar as a duplicate of foo and automatically schedule bar for addition. When bar is added to the repository on the next commit, its copy history is recorded (as having originally come from foo). svn copy does not create intermediate directories unless you pass the ." -msgstr "建立一个新的项目bar作为foo的复制品,会自动预定将bar添加,当在下次提交时会将bar添加到版本库,这种拷贝历史会记录下来(按照来自foo的方式记录),svn copy并不建立中介目录。" - -#. (command) -#: ../source/book.xml:2564 -msgid "svn move foo bar" -msgstr "svn move foo bar" - -#. (para) -#: ../source/book.xml:2567 -#, fuzzy -msgid "This command is exactly the same as running svn copy foo bar; svn delete foo. That is, bar is scheduled for addition as a copy of foo, and foo is scheduled for removal. svn move does not create intermediate directories unless you pass the ." -msgstr "这个命令与与运行svn copy foo bar; svn delete foo完全相同,bar作为foo的拷贝准备添加,foo已经预定要被删除,svn move不建立中介的目录。" - -#. (command) -#: ../source/book.xml:2579 -msgid "svn mkdir blort" -msgstr "svn mkdir blort" - -#. (para) -#: ../source/book.xml:2582 -msgid "This command is exactly the same as running mkdir blort; svn add blort. That is, a new directory named blort is created and scheduled for addition." -msgstr "这个命令同运行 mkdir blort; svn add blort相同,也就是创建一个叫做blort的文件,并且预定添加到版本库。" - -#. (title) -#: ../source/book.xml:2591 -msgid "Changing the Repository Without a Working Copy" -msgstr "不通过工作副本修改版本库" - -#. (para) -#: ../source/book.xml:2593 -msgid "There are 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 svn mkdir, svn copy, svn move, and svn delete can work with URLs (And don't forget that svn import always makes changes to a URL)." -msgstr "有一些情况下会立刻提交目录树的修改到版本库,这只发生在子命令直接操作URL,而不是工作拷贝路径时。以特定的方式使用svn mkdirsvn copysvn movesvn delete可以针对URL操作(并且不要忘记svn import只针对URL操作)。" - -#. (para) -#: ../source/book.xml:2602 -msgid "URL operations behave in this manner because commands that operate on a working copy can use the working copy as a sort of staging area 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." -msgstr "指定URL的操作方式有一些区别,因为在使用工作拷贝的运作方式时,工作拷贝成为一个集结地,可以在提交之前整理组织所要做的修改,直接对URL操作就没有这种奢侈,所以当你直接操作URL的时候,所有以上的动作代表一个立即的提交。" - -#. (title) -#: ../source/book.xml:2614 -msgid "Examine Your Changes" -msgstr "检查你的修改" - -#. (para) -#: ../source/book.xml:2616 -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 svn status, and dig into the details of those changes by using svn diff." -msgstr "当你完成修改,你需要提交他们到版本库,但是在此之前,检查一下做过什么修改是个好主意,通过提交前的检查,你可以整理一份精确的日志信息,你也可以发现你不小心修改的文件,给了你一次恢复修改的机会。此外,这是一个审查和仔细察看修改的好机会,你可通过命令svn status浏览所做的修改,通过svn diff检查修改的详细信息。" - -#. (title) -#: ../source/book.xml:2630 -msgid "Look Ma! No Network!" -msgstr "看!没有网络!" - -#. (para) -#: ../source/book.xml:2639 -msgid "And also that you don't have a WAN card. Thought you got us, huh?" -msgstr "而且你也没有WAN卡,考虑到你得到我们,哈!" - -#. (para) -#: ../source/book.xml:2632 -msgid "The commands svn status, svn diff, and svn revert can be used without any network access even if your repository is 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." -msgstr "这三个命令(svn statussvn diffsvn revert)都可以在没有网络的情况下工作(假定你的版本库是通过网络而不是本地访问的),这让你在没有网络连接时的管理修改过程更加容易,像在飞机上旅行,乘坐火车往返或是在海滩上奋力工作时。" - -#. (para) -#: ../source/book.xml:2642 -msgid "Subversion does this by keeping private caches of pristine versions of each versioned file inside of the .svn administrative areas. This allows Subversion to report—and revert—local modifications to those files without network access. This cache (called the text-base) also allows Subversion to send the user's local modifications during a commit to the server as a compressed delta (or difference) 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." -msgstr "Subversion通过在.svn管理区域使用原始的版本缓存来做到这一点,这使得报告和恢复本地修改而不必访问网络,这个缓存(叫做text-base)也允许Subversion可以根据原始版本生成一个压缩的增量(区别) 提交—即使你有个非常快的网络,有这样一个缓存有极大的好处,只向服务器提交修改的部分而不是整个文件。" - -#. (para) -#: ../source/book.xml:2657 -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 pristine copy of each version controlled file within the .svn 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." -msgstr "Subversion已经被优化来帮助你完成这个任务,可以在不与版本库通讯的情况下做许多事情,详细来说,对于每一个文件,你的的工作拷贝在.svn包含了一个原始的拷贝,所以Subversion可以快速的告诉你那些文件修改了,甚至允许你在不与版本库通讯的情况下恢复修改。" - -#. (title) -#: ../source/book.xml:2668 -msgid "See an overview of your changes" -msgstr "查看你的修改概况" - -#. (para) -#: ../source/book.xml:2670 -msgid "To get an overview of your changes, you'll use the svn status command. You'll probably use svn status more than any other Subversion command." -msgstr "为了浏览修改的内容,你会使用这个svn status命令,在所有Subversion命令里,你可能会最多使用svn status。" - -#. (title) -#: ../source/book.xml:2676 -msgid "CVS Users: Hold That Update!" -msgstr "CVS 用户:控制另类的更新!" - -#. (para) -#: ../source/book.xml:2678 -msgid "You're probably used to using cvs update to see what changes you've made to your working copy. svn status 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." -msgstr "你也许使用cvs update来看你做了哪些修改,svn status会给你所有你做的改变—而不需要访问版本库,并且不会在不知情的情况下与其他用户作的更改比较。" - -#. (para) -#: ../source/book.xml:2685 -msgid "In Subversion, update 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 update command to see what local modifications you've made." -msgstr "在Subversion,update只是做这件事—将工作拷贝更新到版本库的最新版本,你可以消除使用update察看本地修改的习惯。" - -#. (para) -#: ../source/book.xml:2692 -msgid "If you run svn status 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 svn status can return. (Note that the text following # is not actually printed by svn status.)" -msgstr "如果你在工作拷贝的顶级目录运行不带参数的svn status命令,它会检测你做的所有的文件或目录的修改,以下的例子是来展示svn status可能返回的状态码(注意,#之后的不是svn status打印的)。" - -#. (screen) -#: ../source/book.xml:2699 -#, no-wrap -msgid "" -"\n" -"A stuff/loot/bloo.h # file is scheduled for addition\n" -"C stuff/loot/lump.c # file has textual conflicts from an update\n" -"D stuff/fish.c # file is scheduled for deletion\n" -"M bar.c # the content in bar.c has local modifications\n" -msgstr "" -"\n" -"A stuff/loot/bloo.h # file is scheduled for addition\n" -"C stuff/loot/lump.c # file has textual conflicts from an update\n" -"D stuff/fish.c # file is scheduled for deletion\n" -"M bar.c # the content in bar.c has local modifications\n" - -#. (para) -#: ../source/book.xml:2705 -msgid "In this output format svn status 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:" -msgstr "在这种格式下,svn status打印6列字符,紧跟一些空格,接着是文件或者目录名。第一列告诉一个文件或目录的状态或它的内容,返回代码如下:" - -#. (computeroutput) -#: ../source/book.xml:2713 -#, no-wrap -msgid "A item" -msgstr "A item" - -#. (para) -#: ../source/book.xml:2716 -msgid "The file, directory, or symbolic link item has been scheduled for addition into the repository." -msgstr "预定加入到版本库的文件、目录或符号链的item。" - -#. (computeroutput) -#: ../source/book.xml:2723 -#, no-wrap -msgid "C item" -msgstr "C item" - -#. (para) -#: ../source/book.xml:2726 -msgid "The file item 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." -msgstr "文件item发生冲突,在从服务器更新时与本地版本发生交迭,在你提交到版本库前,必须手工的解决冲突。" - -#. (computeroutput) -#: ../source/book.xml:2736 -#, no-wrap -msgid "D item" -msgstr "D item" - -#. (para) -#: ../source/book.xml:2739 -msgid "The file, directory, or symbolic link item has been scheduled for deletion from the repository." -msgstr "文件、目录或是符号链item预定从版本库中删除。" - -#. (computeroutput) -#: ../source/book.xml:2746 -#, no-wrap -msgid "M item" -msgstr "M item" - -#. (para) -#: ../source/book.xml:2749 -msgid "The contents of the file item have been modified." -msgstr "文件item的内容被修改了。" - -#. (para) -#: ../source/book.xml:2754 -msgid "If you pass a specific path to svn status, you get information about that item alone:" -msgstr "如果你传递一个路径给svn status,它只给你这个项目的信息:" - -#. (screen) -#: ../source/book.xml:2757 -#, no-wrap -msgid "" -"\n" -"$ svn status stuff/fish.c\n" -"D stuff/fish.c\n" -msgstr "" -"\n" -"$ svn status stuff/fish.c\n" -"D stuff/fish.c\n" - -#. (para) -#: ../source/book.xml:2761 -msgid "svn status also has a option, which will show you the status of every item in your working copy, even if it has not been changed:" -msgstr "svn status也有一个选项,它可以显示工作拷贝中的所有项目,即使没有改变过的:" - -#. (screen) -#: ../source/book.xml:2765 -#, no-wrap -msgid "" -"\n" -"$ svn status -v\n" -"M 44 23 sally README\n" -" 44 30 sally INSTALL\n" -"M 44 20 harry bar.c\n" -" 44 18 ira stuff\n" -" 44 35 harry stuff/trout.c\n" -"D 44 19 ira stuff/fish.c\n" -" 44 21 sally stuff/things\n" -"A 0 ? ? stuff/things/bloo.h\n" -" 44 36 harry stuff/things/gloo.c\n" -msgstr "" -"\n" -"$ svn status -v\n" -"M 44 23 sally README\n" -" 44 30 sally INSTALL\n" -"M 44 20 harry bar.c\n" -" 44 18 ira stuff\n" -" 44 35 harry stuff/trout.c\n" -"D 44 19 ira stuff/fish.c\n" -" 44 21 sally stuff/things\n" -"A 0 ? ? stuff/things/bloo.h\n" -" 44 36 harry stuff/things/gloo.c\n" - -#. (para) -#: ../source/book.xml:2777 -msgid "This is the long form output of svn status. 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." -msgstr "这是svn status加长形式,第一列保持相同,第二列显示一个工作版本号,第三和第四列显示最后一次修改的版本号和修改人(这些列不会与我们刚才提到的字符混淆)。" - -#. (para) -#: ../source/book.xml:2783 -msgid "None of the prior invocations to svn status contact the repository—instead, they compare the metadata in the .svn directory with the working copy. Finally, there is the option, which contacts the repository and adds information about things that are out-of-date:" -msgstr "上面所有的svn status调用并没有联系版本库,只是与.svn中的原始数据进行比较的结果,最后,是选项,它将会联系版本库为已经过时的数据添加新信息:" - -#. (screen) -#: ../source/book.xml:2790 -#, no-wrap -msgid "" -"\n" -"$ svn status -u -v\n" -"M * 44 23 sally README\n" -"M 44 20 harry bar.c\n" -" * 44 35 harry stuff/trout.c\n" -"D 44 19 ira stuff/fish.c\n" -"A 0 ? ? stuff/things/bloo.h\n" -"Status against revision: 46\n" -msgstr "" -"\n" -"$ svn status -u -v\n" -"M * 44 23 sally README\n" -"M 44 20 harry bar.c\n" -" * 44 35 harry stuff/trout.c\n" -"D 44 19 ira stuff/fish.c\n" -"A 0 ? ? stuff/things/bloo.h\n" -"Status against revision: 46\n" - -#. (para) -#: ../source/book.xml:2799 -msgid "Notice the two asterisks: if you were to run svn update at this point, you would receive changes to README and trout.c. This tells you some very useful information—you'll need to update and get the server changes on README before you commit, or the repository will reject your commit for being out-of-date. (More on this subject later.)" -msgstr "注意这两个星号:如果你现在执行svn update,你的READMEtrout.c会被更新,这告诉你许多有用的信息—你可以在提交之前,需要使用更新操作得到文件README的更新,或者说文件已经过时,版本库会拒绝了你的提交。(后面还有更多关于此主题)。" - -#. (para) -#: ../source/book.xml:2807 -msgid "svn status 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 ." -msgstr "关于文件和目录,svn status可以比我们的展示显示更多的内容,完整的描述可以看。" - -#. (title) -#: ../source/book.xml:2815 -msgid "Examine the details of your local modifications" -msgstr "检查你的本地修改的详情" - -#. (para) -#: ../source/book.xml:2817 -msgid "Another way to examine your changes is with the svn diff command. You can find out exactly how you've modified things by running svn diff with no arguments, which prints out file changes in unified diff format:" -msgstr "另一种检查修改的方式是svn diff命令,你可以通过不带参数的svn diff精确的找出你所做的修改,这会输出统一区别格式的区别信息:" - -#. (screen) -#: ../source/book.xml:2823 -#, no-wrap -msgid "" -"\n" -"$ svn diff\n" -"Index: bar.c\n" -"===================================================================\n" -"--- bar.c\t(revision 3)\n" -"+++ bar.c\t(working copy)\n" -"@@ -1,7 +1,12 @@\n" -"+#include <sys/types.h>\n" -"+#include <sys/stat.h>\n" -"+#include <unistd.h>\n" -"+\n" -"+#include <stdio.h>\n" -"\n" -" int main(void) {\n" -"- printf(\"Sixty-four slices of American Cheese...\\n\");\n" -"+ printf(\"Sixty-five slices of American Cheese...\\n\");\n" -" return 0;\n" -" }\n" -"\n" -"Index: README\n" -"===================================================================\n" -"--- README\t(revision 3)\n" -"+++ README\t(working copy)\n" -"@@ -193,3 +193,4 @@\n" -"+Note to self: pick up laundry.\n" -"\n" -"Index: stuff/fish.c\n" -"===================================================================\n" -"--- stuff/fish.c\t(revision 1)\n" -"+++ stuff/fish.c\t(working copy)\n" -"-Welcome to the file known as 'fish'.\n" -"-Information on fish will be here soon.\n" -"\n" -"Index: stuff/things/bloo.h\n" -"===================================================================\n" -"--- stuff/things/bloo.h\t(revision 8)\n" -"+++ stuff/things/bloo.h\t(working copy)\n" -"+Here is a new file to describe\n" -"+things about bloo.\n" -msgstr "" -"\n" -"$ svn diff\n" -"Index: bar.c\n" -"===================================================================\n" -"--- bar.c\t(revision 3)\n" -"+++ bar.c\t(working copy)\n" -"@@ -1,7 +1,12 @@\n" -"+#include <sys/types.h>\n" -"+#include <sys/stat.h>\n" -"+#include <unistd.h>\n" -"+\n" -"+#include <stdio.h>\n" -"\n" -" int main(void) {\n" -"- printf(\"Sixty-four slices of American Cheese...\\n\");\n" -"+ printf(\"Sixty-five slices of American Cheese...\\n\");\n" -" return 0;\n" -" }\n" -"\n" -"Index: README\n" -"===================================================================\n" -"--- README\t(revision 3)\n" -"+++ README\t(working copy)\n" -"@@ -193,3 +193,4 @@\n" -"+Note to self: pick up laundry.\n" -"\n" -"Index: stuff/fish.c\n" -"===================================================================\n" -"--- stuff/fish.c\t(revision 1)\n" -"+++ stuff/fish.c\t(working copy)\n" -"-Welcome to the file known as 'fish'.\n" -"-Information on fish will be here soon.\n" -"\n" -"Index: stuff/things/bloo.h\n" -"===================================================================\n" -"--- stuff/things/bloo.h\t(revision 8)\n" -"+++ stuff/things/bloo.h\t(working copy)\n" -"+Here is a new file to describe\n" -"+things about bloo.\n" - -#. (para) -#: ../source/book.xml:2863 -msgid "The svn diff command produces this output by comparing your working files against the cached pristine copies within the .svn area. Files scheduled for addition are displayed as all added-text, and files scheduled for deletion are displayed as all deleted text." -msgstr "svn diff命令通过比较你的文件和.svn原始文件来输出信息,预定要增加的文件会显示所有增加的文本,要删除的文件会显示所有要删除的文本。" - -#. (para) -#: ../source/book.xml:2870 -msgid "Output is displayed in unified diff format. That is, removed lines are prefaced with - and added lines are prefaced with +. svn diff also prints filename and offset information useful to the patch program, so you can generate patches by redirecting the diff output to a file:" -msgstr "输出的格式为统一区别格式(unified diff format),删除的行前面加一个-,添加的行前面有一个+svn diff命令也打印文件名和打补丁需要的信息,所以你可以通过重定向一个区别文件来生成补丁:" - -#. (screen) -#: ../source/book.xml:2878 -#, no-wrap -msgid "" -"\n" -"$ svn diff > patchfile\n" -msgstr "" -"\n" -"$ svn diff > patchfile\n" - -#. (para) -#: ../source/book.xml:2881 -msgid "You could, for example, email the patch file to another developer for review or testing prior to commit." -msgstr "举个例子,你可以把补丁文件发送邮件到其他开发者,在提交之前审核和测试。" - -#. (para) -#: ../source/book.xml:2883 -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 and pass any flags you'd like to it using the option. For example, to see local differences in file foo.c in context output format while ignoring case differences, you might run svn diff --diff-cmd /usr/bin/diff --extensions '-i' foo.c." -msgstr "Subversion使用内置区别引擎,缺省情况下输出为统一区别格式。如果你期望不同的输出格式,你可以使用指定外置的区别程序,并且通过传递其他参数,举个例子,察看本地文件foo.c的区别,同时忽略大小写差异,你可以运行svn diff --diff-cmd /usr/bin/diff --extensions '-bc' foo.c。" - -#. (title) -#: ../source/book.xml:2898 -msgid "Undoing Working Changes" -msgstr "取消本地修改" - -#. (para) -#: ../source/book.xml:2900 -msgid "Suppose while viewing the output of svn diff 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." -msgstr "假定我们在看svn diff的输出,你发现对某个文件的所有修改都是错误的,或许你根本不应该修改这个文件,或者是从开头重新修改会更加容易。" - -#. (para) -#: ../source/book.xml:2905 -msgid "This is a perfect opportunity to use svn revert:" -msgstr "这是使用svn revert的好机会:" - -#. (screen) -#: ../source/book.xml:2907 -#, no-wrap -msgid "" -"\n" -"$ svn revert README\n" -"Reverted 'README'\n" -msgstr "" -"\n" -"$ svn revert README\n" -"Reverted 'README'\n" - -#. (para) -#: ../source/book.xml:2911 -msgid "Subversion reverts the file to its pre-modified state by overwriting it with the cached pristine copy from the .svn area. But also note that svn revert can undo any scheduled operations—for example, you might decide that you don't want to add a new file after all:" -msgstr "Subversion把文件恢复到未修改的状态,叫做.svn目录的原始拷贝,应该知道svn revert可以恢复任何预定要做的操作,举个例子,你不再想添加一个文件:" - -#. (screen) -#: ../source/book.xml:2918 -#, no-wrap -msgid "" -"\n" -"$ svn status foo\n" -"? foo\n" -"\n" -"$ svn add foo\n" -"A foo\n" -"\n" -"$ svn revert foo\n" -"Reverted 'foo'\n" -"\n" -"$ svn status foo\n" -"? foo\n" -msgstr "" -"\n" -"$ svn status foo\n" -"? foo\n" -"\n" -"$ svn add foo\n" -"A foo\n" -"\n" -"$ svn revert foo\n" -"Reverted 'foo'\n" -"\n" -"$ svn status foo\n" -"? foo\n" - -#. (para) -#: ../source/book.xml:2932 -msgid "svn revertITEM has exactly the same effect as deleting ITEM from your working copy and then running svn update -r BASEITEM. However, if you're reverting a file, svn revert has one very noticeable difference—it doesn't have to communicate with the repository to restore your file." -msgstr "svn revertITEM的效果与删除ITEM然后执行svn update -r BASEITEM完全一样,但是,如果你使用svn revert它不必通知版本库就可以恢复文件。" - -#. (para) -#: ../source/book.xml:2941 -msgid "Or perhaps you mistakenly removed a file from version control:" -msgstr "或许你不小心删除了一个文件:" - -#. (screen) -#: ../source/book.xml:2943 -#, no-wrap -msgid "" -"\n" -"$ svn status README\n" -" README\n" -"\n" -"$ svn delete README\n" -"D README\n" -"\n" -"$ svn revert README\n" -"Reverted 'README'\n" -"\n" -"$ svn status README\n" -" README\n" -msgstr "" -"\n" -"$ svn status README\n" -" README\n" -"\n" -"$ svn delete README\n" -"D README\n" -"\n" -"$ svn revert README\n" -"Reverted 'README'\n" -"\n" -"$ svn status README\n" -" README\n" - -#. (title) -#: ../source/book.xml:2960 -msgid "Resolve Conflicts (Merging Others' Changes)" -msgstr "解决冲突(合并别人的修改)" - -#. (para) -#: ../source/book.xml:2962 -msgid "We've already seen how svn status -u can predict conflicts. Suppose you run svn update and some interesting things occur:" -msgstr "我们可以使用svn status -u来预测冲突,当你运行svn update一些有趣的事情发生了:" - -#. (screen) -#: ../source/book.xml:2965 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"U INSTALL\n" -"G README\n" -"C bar.c\n" -"Updated to revision 46.\n" -msgstr "" -"\n" -"$ svn update\n" -"U INSTALL\n" -"G README\n" -"C bar.c\n" -"Updated to revision 46.\n" - -#. (para) -#: ../source/book.xml:2972 -msgid "The U and G codes are no cause for concern; those files cleanly absorbed changes from the repository. The files marked with U contained no local changes but were Updated with changes from the repository. The G stands for merGed, 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." -msgstr "UG没必要关心,文件干净的接受了版本库的变化,文件标示为U表明本地没有修改,文件已经根据版本库更新。G标示合并,标示本地已经修改过,与版本库没有重迭的地方,已经合并。" - -#. (para) -#: ../source/book.xml:2983 -msgid "But the C stands for conflict. This means that the changes from the server overlapped with your own, and now you have to manually choose between them." -msgstr "但是C表示冲突,说明服务器上的改动同你的改动冲突了,你需要自己手工去解决。" - -#. (para) -#: ../source/book.xml:2987 -msgid "Whenever a conflict occurs, three things typically occur to assist you in noticing and resolving that conflict:" -msgstr "当冲突发生了,有三件事可以帮助你注意到这种情况和解决问题:" - -#. (para) -#: ../source/book.xml:2991 -msgid "Subversion prints a C during the update, and remembers that the file is in a state of conflict." -msgstr "Subversion在更新时打印C标记,并且标记这个文件已冲突。" - -#. (para) -#: ../source/book.xml:2996 -msgid "If Subversion considers the file to be mergeable, it places conflict markers—special strings of text which delimit the sides of the conflict—into the file to visibly demonstrate the overlapping areas. (Subversion uses the svn:mime-type property to decide if a file is capable of contextual, line-based merging. See to learn more.)" -msgstr "如果Subversion认为这个文件是可合并的,它会置入冲突标记—特殊的横线分开冲突的两面—在文件里可视化的描述重叠的部分(Subversion使用svn:mime-type属性来决定一个文件是否可以使用上下文的,以行为基础的合并,更多信息可以看。)" - -#. (para) -#: ../source/book.xml:3007 -msgid "For every conflicted file, Subversion places three extra unversioned files in your working copy:" -msgstr "对于每一个冲突的文件,Subversion放置三个额外的未版本化文件到你的工作拷贝:" - -#. (filename) -#: ../source/book.xml:3012 -msgid "filename.mine" -msgstr "filename.mine" - -#. (para) -#: ../source/book.xml:3015 -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 .mine file isn't created, since it would be identical to the working file.)" -msgstr "你更新前的文件,没有冲突标志,只是你最新更改的内容。(如果Subversion认为这个文件不可以合并,.mine文件不会创建,因为它和工作文件相同。)" - -#. (filename) -#: ../source/book.xml:3026 -msgid "filename.rOLDREV" -msgstr "filename.rOLDREV" - -#. (para) -#: ../source/book.xml:3029 -msgid "This is the file that was the BASE revision before you updated your working copy. That is, the file that you checked out before you made your latest edits." -msgstr "这是你的做更新操作以前的BASE版本文件,就是你在上次更新之后未作更改的版本。" - -#. (filename) -#: ../source/book.xml:3038 -msgid "filename.rNEWREV" -msgstr "filename.rNEWREV" - -#. (para) -#: ../source/book.xml:3041 -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 HEAD revision of the repository." -msgstr "这是你的Subversion客户端从服务器刚刚收到的版本,这个文件对应版本库的HEAD版本。" - -#. (para) -#: ../source/book.xml:3049 -msgid "Here OLDREV is the revision number of the file in your .svn directory and NEWREV is the revision number of the repository HEAD." -msgstr "这里OLDREV是你的.svn目录中的修订版本号,NEWREV是版本库中HEAD的版本号。" - -#. (para) -#: ../source/book.xml:3055 -msgid "For example, Sally makes changes to the file sandwich.txt 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:" -msgstr "举一个例子,Sally修改了sandwich.txt,Harry刚刚改变了他的本地拷贝中的这个文件并且提交到服务器,Sally在提交之前更新它的工作拷贝得到了冲突:" - -#. (screen) -#: ../source/book.xml:3060 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"C sandwich.txt\n" -"Updated to revision 2.\n" -"$ ls -1\n" -"sandwich.txt\n" -"sandwich.txt.mine\n" -"sandwich.txt.r1\n" -"sandwich.txt.r2\n" -msgstr "" -"\n" -"$ svn update\n" -"C sandwich.txt\n" -"Updated to revision 2.\n" -"$ ls -1\n" -"sandwich.txt\n" -"sandwich.txt.mine\n" -"sandwich.txt.r1\n" -"sandwich.txt.r2\n" - -#. (para) -#: ../source/book.xml:3070 -msgid "At this point, Subversion will not allow you to commit the file sandwich.txt until the three temporary files are removed." -msgstr "在这种情况下,Subversion会允许你提交sandwich.txt,直到你的三个临时文件被删掉。" - -#. (screen) -#: ../source/book.xml:3073 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"Add a few more things\"\n" -"svn: Commit failed (details follow):\n" -"svn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict\n" -msgstr "" -"\n" -"$ svn commit -m \"Add a few more things\"\n" -"svn: Commit failed (details follow):\n" -"svn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict\n" - -#. (para) -#: ../source/book.xml:3078 -msgid "If you get a conflict, you need to do one of three things:" -msgstr "如果你遇到冲突,三件事你可以选择:" - -#. (para) -#: ../source/book.xml:3082 -msgid "Merge the conflicted text by hand (by examining and editing the conflict markers within the file)." -msgstr "手动合并冲突文本(检查和修改文件中的冲突标志)。" - -#. (para) -#: ../source/book.xml:3087 -msgid "Copy one of the temporary files on top of your working file." -msgstr "用某一个临时文件覆盖你的工作文件。" - -#. (para) -#: ../source/book.xml:3091 -msgid "Run svn revert <filename> to throw away all of your local changes." -msgstr "运行svn revert <filename>来放弃所有的本地修改。" - -#. (para) -#: ../source/book.xml:3099 -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." -msgstr "你也可以手工的删除这三个临时文件,但是当Subversion会给你做时你会自己去做吗?我们是这样想的。" - -#. (para) -#: ../source/book.xml:3095 -msgid "Once you've resolved the conflict, you need to let Subversion know by running svn resolved. This removes the three temporary files and Subversion no longer considers the file to be in a state of conflict." -msgstr "一旦你解决了冲突,你需要通过命令svn resolved让Subversion知道,这样就会删除三个临时文件,Subversion就不会认为这个文件是在冲突状态了。" - -#. (screen) -#: ../source/book.xml:3102 -#, no-wrap -msgid "" -"\n" -"$ svn resolved sandwich.txt\n" -"Resolved conflicted state of 'sandwich.txt'\n" -msgstr "" -"\n" -"$ svn resolved sandwich.txt\n" -"Resolved conflicted state of 'sandwich.txt'\n" - -#. (title) -#: ../source/book.xml:3109 -msgid "Merging Conflicts by Hand" -msgstr "手工合并冲突" - -#. (para) -#: ../source/book.xml:3111 -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." -msgstr "第一次尝试解决冲突让人感觉很害怕,但经过一点训练,它简单的像是骑着车子下坡。" - -#. (para) -#: ../source/book.xml:3114 -msgid "Here's an example. Due to a miscommunication, you and Sally, your collaborator, both edit the file sandwich.txt 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 sandwich.txt to resolve the conflicts. First, let's take a look at the file:" -msgstr "这里一个简单的例子,由于不良的交流,你和同事Sally,同时编辑了sandwich.txt。Sally提交了修改,当你准备更新你的工作拷贝,冲突发生了,我们不得不去修改sandwich.txt来解决这个问题。首先,看一下这个文件:" - -#. (screen) -#: ../source/book.xml:3121 -#, no-wrap -msgid "" -"\n" -"$ cat sandwich.txt\n" -"Top piece of bread\n" -"Mayonnaise\n" -"Lettuce\n" -"Tomato\n" -"Provolone\n" -"<<<<<<< .mine\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"=======\n" -"Sauerkraut\n" -"Grilled Chicken\n" -">>>>>>> .r2\n" -"Creole Mustard\n" -"Bottom piece of bread\n" -msgstr "" -"\n" -"$ cat sandwich.txt\n" -"Top piece of bread\n" -"Mayonnaise\n" -"Lettuce\n" -"Tomato\n" -"Provolone\n" -"<<<<<<< .mine\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"=======\n" -"Sauerkraut\n" -"Grilled Chicken\n" -">>>>>>> .r2\n" -"Creole Mustard\n" -"Bottom piece of bread\n" - -#. (para) -#: ../source/book.xml:3139 -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:" -msgstr "小于号、等于号和大于号串是冲突标记,并不是冲突的数据,你一定要确定这些内容在下次提交之前得到删除,前两组标志中间的内容是你在冲突区所做的修改:" - -#. (screen) -#: ../source/book.xml:3146 -#, no-wrap -msgid "" -"\n" -"<<<<<<< .mine\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"=======\n" -msgstr "" -"\n" -"<<<<<<< .mine\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"=======\n" - -#. (para) -#: ../source/book.xml:3153 -msgid "The text between the second and third sets of conflict markers is the text from Sally's commit:" -msgstr "后两组之间的是Sally提交的修改冲突:" - -#. (screen) -#: ../source/book.xml:3155 -#, no-wrap -msgid "" -"\n" -"=======\n" -"Sauerkraut\n" -"Grilled Chicken\n" -">>>>>>> .r2\n" -msgstr "" -"\n" -"=======\n" -"Sauerkraut\n" -"Grilled Chicken\n" -">>>>>>> .r2\n" - -#. (para) -#: ../source/book.xml:3166 -msgid "And if you ask them for it, they may very well ride you out of town on a rail." -msgstr "如果你向他们询问,他们非常有理由把你带到城外的铁轨上。" - -#. (para) -#: ../source/book.xml:3161 -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. Once you've agreed on the changes you will check in, edit your file and remove the conflict markers." -msgstr "通常你并不希望只是删除冲突标志和Sally的修改—当她收到三明治时,会非常的吃惊。所以你应该走到她的办公室或是拿起电话告诉Sally,你没办法从从意大利熟食店得到想要的泡菜。一旦你们确认了提交内容后,修改文件并且删除冲突标志。" - -#. (screen) -#: ../source/book.xml:3171 -#, no-wrap -msgid "" -"\n" -"Top piece of bread\n" -"Mayonnaise\n" -"Lettuce\n" -"Tomato\n" -"Provolone\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"Creole Mustard\n" -"Bottom piece of bread\n" -msgstr "" -"\n" -"Top piece of bread\n" -"Mayonnaise\n" -"Lettuce\n" -"Tomato\n" -"Provolone\n" -"Salami\n" -"Mortadella\n" -"Prosciutto\n" -"Creole Mustard\n" -"Bottom piece of bread\n" - -#. (para) -#: ../source/book.xml:3183 -msgid "Now run svn resolved, and you're ready to commit your changes:" -msgstr "现在运行svn resolved,你已经准备好提交了:" - -#. (screen) -#: ../source/book.xml:3185 -#, no-wrap -msgid "" -"\n" -"$ svn resolved sandwich.txt\n" -"$ svn commit -m \"Go ahead and use my sandwich, discarding Sally's edits.\"\n" -msgstr "" -"\n" -"$ svn resolved sandwich.txt\n" -"$ svn commit -m \"Go ahead and use my sandwich, discarding Sally's edits.\"\n" - -#. (para) -#: ../source/book.xml:3189 -msgid "Note that svn resolved, 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 svn resolved 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." -msgstr "现在我们准备好提交修改了,注意svn resolved不像我们本章学过的其他命令一样需要参数,在任何你认为解决了冲突的时候,只需要小心运行svn resolved,—一旦删除了临时文件,Subversion会让你提交这文件,即使文件中还存在冲突标记。" - -#. (para) -#: ../source/book.xml:3196 -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." -msgstr "记住,如果你修改冲突时感到混乱,你可以参考subversion生成的三个文件—包括你未作更新的文件。你也可以使用三方交互合并工具检验这三个文件。" - -#. (title) -#: ../source/book.xml:3206 -msgid "Copying a File Onto Your Working File" -msgstr "复制文件到你的工作文件" - -#. (para) -#: ../source/book.xml:3208 -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:" -msgstr "如果你只是希望取消你的修改,你可以仅仅拷贝Subversion为你生成的文件替换你的工作拷贝:" - -#. (screen) -#: ../source/book.xml:3212 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"C sandwich.txt\n" -"Updated to revision 2.\n" -"$ ls sandwich.*\n" -"sandwich.txt sandwich.txt.mine sandwich.txt.r2 sandwich.txt.r1\n" -"$ cp sandwich.txt.r2 sandwich.txt\n" -"$ svn resolved sandwich.txt\n" -msgstr "" -"\n" -"$ svn update\n" -"C sandwich.txt\n" -"Updated to revision 2.\n" -"$ ls sandwich.*\n" -"sandwich.txt sandwich.txt.mine sandwich.txt.r2 sandwich.txt.r1\n" -"$ cp sandwich.txt.r2 sandwich.txt\n" -"$ svn resolved sandwich.txt\n" - -#. (title) -#: ../source/book.xml:3225 -msgid "Punting: Using svn revert" -msgstr "脚注:使用svn revert" - -#. (para) -#: ../source/book.xml:3227 -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:" -msgstr "如果你得到冲突,经过检查你决定取消自己的修改并且重新编辑,你可以恢复你的修改:" - -#. (screen) -#: ../source/book.xml:3230 -#, no-wrap -msgid "" -"\n" -"$ svn revert sandwich.txt\n" -"Reverted 'sandwich.txt'\n" -"$ ls sandwich.*\n" -"sandwich.txt\n" -msgstr "" -"\n" -"$ svn revert sandwich.txt\n" -"Reverted 'sandwich.txt'\n" -"$ ls sandwich.*\n" -"sandwich.txt\n" - -#. (para) -#: ../source/book.xml:3236 -msgid "Note that when you revert a conflicted file, you don't have to run svn resolved." -msgstr "注意,当你恢复一个冲突的文件时,不需要再运行svn resolved。" - -#. (title) -#: ../source/book.xml:3243 -msgid "Commit Your Changes" -msgstr "提交你的修改" - -#. (para) -#: ../source/book.xml:3245 -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." -msgstr "最后!你的修改结束了,你合并了服务器上所有的修改,你准备好提交修改到版本库。" - -#. (para) -#: ../source/book.xml:3248 -msgid "The svn commit command sends all of your changes to the repository. When you commit a change, you need to supply a log message, 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 (or ) option:" -msgstr "svn commit命令发送所有的修改到版本库,当你提交修改时,你需要提供一些描述修改的日志信息,你的信息会附到这个修订版本上,如果信息很简短,你可以在命令行中使用(或)选项:" - -#. (screen) -#: ../source/book.xml:3256 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"Corrected number of cheese slices.\"\n" -"Sending sandwich.txt\n" -"Transmitting file data .\n" -"Committed revision 3.\n" -msgstr "" -"\n" -"$ svn commit -m \"Corrected number of cheese slices.\"\n" -"Sending sandwich.txt\n" -"Transmitting file data .\n" -"Committed revision 3.\n" - -#. (para) -#: ../source/book.xml:3262 -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:" -msgstr "然而,如果你把写日志信息当作工作的一部分,你也许会希望告诉Subversion通过一个文件名得到日志信息,使用选项:" - -#. (screen) -#: ../source/book.xml:3266 -#, no-wrap -msgid "" -"\n" -"$ svn commit -F logmsg\n" -"Sending sandwich.txt\n" -"Transmitting file data .\n" -"Committed revision 4.\n" -msgstr "" -"\n" -"$ svn commit -F logmsg\n" -"Sending sandwich.txt\n" -"Transmitting file data .\n" -"Committed revision 4.\n" - -#. (para) -#: ../source/book.xml:3272 -msgid "If you fail to specify either the or option, then Subversion will automatically launch your favorite editor (see the editor-cmd section in ) for composing a log message." -msgstr "如果你没有指定或者选项,Subversion会自动地启动你最喜欢的编辑器(见editor-cmd部分)来编辑日志信息。" - -#. (para) -#: ../source/book.xml:3279 -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." -msgstr "如果你使用编辑器撰写日志信息时希望取消提交,你可以直接关掉编辑器,不要保存,如果你已经做过保存,只要简单的删掉所有的文本并再次保存,然后退出。" - -#. (screen) -#: ../source/book.xml:3284 -#, no-wrap -msgid "" -"\n" -"$ svn commit\n" -"Waiting for Emacs...Done\n" -"\n" -"Log message unchanged or not specified\n" -"a)bort, c)ontinue, e)dit\n" -"a\n" -"$\n" -msgstr "" -"\n" -"$ svn commit\n" -"Waiting for Emacs...Done\n" -"\n" -"Log message unchanged or not specified\n" -"a)bort, c)ontinue, e)dit\n" -"a\n" -"$\n" - -#. (para) -#: ../source/book.xml:3294 -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 has done that, the entire commit will fail with a message informing you that one or more of your files is out-of-date:" -msgstr "版本库不知道也不关心你的修改作为一个整体是否有意义,它只检查是否有其他人修改了同一个文件,如果别人已经这样做了,你的整个提交会失败,并且提示你一个或多个文件已经过时了:" - -#. (screen) -#: ../source/book.xml:3300 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"Add another rule\"\n" -"Sending rules.txt\n" -"svn: Commit failed (details follow):\n" -"svn: Your file or directory 'sandwich.txt' is probably out-of-date\n" -"…\n" -msgstr "" -"\n" -"$ svn commit -m \"Add another rule\"\n" -"Sending rules.txt\n" -"svn: Commit failed (details follow):\n" -"svn: Your file or directory 'sandwich.txt' is probably out-of-date\n" -"…\n" - -#. (para) -#: ../source/book.xml:3307 -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.)" -msgstr "(错误信息的精确措辞依赖于网络协议和你使用的服务器,但对于所有的情况,其思想完全一样。)" - -#. (para) -#: ../source/book.xml:3310 -msgid "At this point, you need to run svn update, deal with any merges or conflicts that result, and attempt your commit again." -msgstr "此刻,你需要运行svn update来处理所有的合并和冲突,然后再尝试提交。" - -#. (para) -#: ../source/book.xml:3313 -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." -msgstr "我们已经覆盖了Subversion基本的工作周期,还有许多其它特性可以管理你得版本库和工作拷贝,但是只使用前面介绍的命令你就可以很进行日常工作了,我们还会覆盖更多用的还算频繁的命令。" - -#. (title) -#: ../source/book.xml:3327 -msgid "Examining History" -msgstr "检验历史" - -#. (para) -#: ../source/book.xml:3329 -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 peer into the past instead of going into the past." -msgstr "你的版本库就像是一台时间机器,它记录了所有提交的修改,允许你检查文件或目录以及相关元数据的历史。通过一个Subversion命令你可以根据时间或修订号取出一个过去的版本(或者恢复现在的工作拷贝),然而,有时候我们只是想看看历史而不想回到历史。" - -#. (para) -#: ../source/book.xml:3338 -msgid "There are several commands that can provide you with historical data from the repository:" -msgstr "有许多命令可以为你提供版本库历史:" - -#. (command), (refname) -#: ../source/book.xml:3343 ../source/book.xml:19323 -msgid "svn log" -msgstr "svn log" - -#. (para) -#: ../source/book.xml:3346 -msgid "Shows you broad information: log messages with date and author information attached to revisions, and which paths changed in each revision." -msgstr "展示给你主要信息:每个版本附加在版本上的作者与日期信息和所有路径修改。" - -#. (para) -#: ../source/book.xml:3356 -msgid "Shows line-level details of a particular change." -msgstr "显示特定修改的行级详细信息。" - -#. (command), (refname) -#: ../source/book.xml:3361 ../source/book.xml:3638 ../source/book.xml:17679 -msgid "svn cat" -msgstr "svn cat" - -#. (para) -#: ../source/book.xml:3364 -msgid "Retrieves a file as it existed in a particular revision number and display it on your screen." -msgstr "取得在特定版本的某一个文件显示在当前屏幕。" - -#. (command), (refname) -#: ../source/book.xml:3370 ../source/book.xml:3663 ../source/book.xml:19111 -msgid "svn list" -msgstr "svn list" - -#. (para) -#: ../source/book.xml:3373 -msgid "Displays the files in a directory for any given revision." -msgstr "显示一个目录在某一版本存在的文件。" - -#. (title) -#: ../source/book.xml:3381 -msgid "Generating a list of historical changes" -msgstr "产生历史修改列表" - -#. (para) -#: ../source/book.xml:3383 -msgid "To find information about the history of a file or directory, use the svn log command. svn log 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." -msgstr "找出一个文件或目录的历史信息,使用svn log命令,svn log将会提供你一条记录,包括:谁对文件或目录作了修改、哪个修订版本作了修改、修订版本的日期和时间、还有如果你当时提供了日志信息,也会显示。" - -#. (screen) -#: ../source/book.xml:3390 -#, no-wrap -msgid "" -"\n" -"$ svn log\n" -"------------------------------------------------------------------------\n" -"r3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line\n" -"\n" -"Added include lines and corrected # of cheese slices.\n" -"------------------------------------------------------------------------\n" -"r2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line\n" -"\n" -"Added main() methods.\n" -"------------------------------------------------------------------------\n" -"r1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line\n" -"\n" -"Initial import\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log\n" -"------------------------------------------------------------------------\n" -"r3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line\n" -"\n" -"Added include lines and corrected # of cheese slices.\n" -"------------------------------------------------------------------------\n" -"r2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line\n" -"\n" -"Added main() methods.\n" -"------------------------------------------------------------------------\n" -"r1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line\n" -"\n" -"Initial import\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:3406 -msgid "Note that the log messages are printed in reverse chronological order by default. If you wish to see a different range of revisions in a particular order, or just a single revision, pass the option:" -msgstr "注意日志信息缺省根据时间逆序排列,如果希望察看特定顺序的一段修订版本或者单一版本,使用 选项:" - -#. (screen) -#: ../source/book.xml:3411 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 5:19 # shows logs 5 through 19 in chronological order\n" -"\n" -"$ svn log -r 19:5 # shows logs 5 through 19 in reverse order\n" -"\n" -"$ svn log -r 8 # shows log for revision 8\n" -msgstr "" -"\n" -"$ svn log -r 5:19 # shows logs 5 through 19 in chronological order\n" -"\n" -"$ svn log -r 19:5 # shows logs 5 through 19 in reverse order\n" -"\n" -"$ svn log -r 8 # shows log for revision 8\n" - -#. (para) -#: ../source/book.xml:3418 -msgid "You can also examine the log history of a single file or directory. For example:" -msgstr "你也可以检查单个文件或目录的日志历史,举个例子:" - -#. (screen) -#: ../source/book.xml:3420 -#, no-wrap -msgid "" -"\n" -"$ svn log foo.c\n" -"…\n" -"$ svn log http://foo.com/svn/trunk/code/foo.c\n" -"…\n" -msgstr "" -"\n" -"$ svn log foo.c\n" -"…\n" -"$ svn log http://foo.com/svn/trunk/code/foo.c\n" -"…\n" - -#. (para) -#: ../source/book.xml:3426 -msgid "These will display log messages only for those revisions in which the working file (or URL) changed." -msgstr "这样只会显示这个工作文件(或者URL)做过修订的版本的日志信息。" - -#. (title) -#: ../source/book.xml:3431 -#, fuzzy -msgid "Why Does svn log Not Show Me What I Just Committed?" -msgstr "为什么svn log给我一个空的回应?" - -#. (para) -#: ../source/book.xml:3434 -msgid "If you make a commit and immediately type svn log 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 svn commit and the default behavior of svn log. First, when you commit changes to the repository, svn only bumps the revision of files (and directories) that it commits, so usually the parent directory remains at the older revision (See for why). svn log 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 svn log by using the () option." -msgstr "" - -#. (para) -#: ../source/book.xml:3452 -msgid "If you want even more information about a file or directory, svn log also takes a 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, svn log will include a list of changed paths in a revision in its output:" -msgstr "如果你希望得到目录和文件更多的信息,你可以对svn log命令使用开关,因为Subversion允许移动和复制文件和目录,所以跟踪路径修改非常重要,在详细模式下,svn log 输出中会包括一个路径修改的历史:" - -#. (screen) -#: ../source/book.xml:3459 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 8 -v\n" -"------------------------------------------------------------------------\n" -"r8 | sally | 2002-07-14 08:15:29 -0500 | 1 line\n" -"Changed paths:\n" -"M /trunk/code/foo.c\n" -"M /trunk/code/bar.h\n" -"A /trunk/code/doc/README\n" -"\n" -"Frozzled the sub-space winch.\n" -"\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log -r 8 -v\n" -"------------------------------------------------------------------------\n" -"r8 | sally | 2002-07-14 08:15:29 -0500 | 1 line\n" -"Changed paths:\n" -"M /trunk/code/foo.c\n" -"M /trunk/code/bar.h\n" -"A /trunk/code/doc/README\n" -"\n" -"Frozzled the sub-space winch.\n" -"\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:3472 -msgid "svn log also takes a () option, which suppresses the body of the log message. When combined with , it gives just the names of the changed files." -msgstr "svn log也有一个 ()选项,会禁止日志信息的主要部分,当与结合使用,仅会显示修改的文件名。" - -#. (title) -#: ../source/book.xml:3478 -msgid "Why Does svn log Give Me an Empty Response?" -msgstr "为什么svn log给我一个空的回应?" - -#. (para) -#: ../source/book.xml:3481 -msgid "After working with Subversion for a bit, most users will come across something like this:" -msgstr "当使用Subversion一些时间后,许多用户会遇到这种情况:" - -#. (screen) -#: ../source/book.xml:3483 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 2\n" -"------------------------------------------------------------------------\n" -"$\n" -msgstr "" -"\n" -"$ svn log -r 2\n" -"------------------------------------------------------------------------\n" -"$\n" - -#. (para) -#: ../source/book.xml:3488 -msgid "At first glance, this seems like an error. But recall that while revisions are repository-wide, svn log 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 svn log directly at the top-most URL of your repository, as in svn log -r 2 http://svn.collab.net/repos/svn." -msgstr "乍一看,好像是一个错误,但是想一下修订版本号是作用在版本库整体之上的,如果你没有提供路径,svn log会使用当前目录作为默认的目标,所以,作为结果,如果你对一个本身和子目录在指定版本到现在没有做过修改的目录运行这个命令,你会得到空的日志。如果你希望察看某个版本做的修改的日志,只需要直接告诉svn log使用版本库顶级的目录作为参数,例如svn log -r 2 http://svn.collab.net/repos/svn。" - -#. (title) -#: ../source/book.xml:3505 -msgid "Examining the details of historical changes" -msgstr "检查历史修改的详情" - -#. (para) -#: ../source/book.xml:3507 -msgid "We've already seen svn diff 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." -msgstr "我们已经看过svn diff—使用标准区别文件格式显示区别,它在提交前用来显示本地工作拷贝与版本库的区别。" - -#. (para) -#: ../source/book.xml:3511 -msgid "In fact, it turns out that there are three distinct uses of svn diff:" -msgstr "事实上,svn diff种不同的用法:" - -#. (para) -#: ../source/book.xml:3516 -msgid "Examining local changes" -msgstr "检查本地修改" - -#. (para) -#: ../source/book.xml:3519 -msgid "Comparing your working copy to the repository" -msgstr "比较工作拷贝与版本库" - -#. (para) -#: ../source/book.xml:3522 -msgid "Comparing repository to repository" -msgstr "比较版本库与版本库" - -#. (title) -#: ../source/book.xml:3528 -msgid "Examining Local Changes" -msgstr "比较本地修改" - -#. (para) -#: ../source/book.xml:3530 -msgid "As we've seen, invoking svn diff with no options will compare your working files to the cached pristine copies in the .svn area:" -msgstr "像我们看到的,不使用任何参数调用时,svn diff将会比较你的工作文件与缓存在.svn原始拷贝:" - -#. (screen) -#: ../source/book.xml:3534 -#, no-wrap -msgid "" -"\n" -"$ svn diff\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 3)\n" -"+++ rules.txt\t(working copy)\n" -"@@ -1,4 +1,5 @@\n" -" Be kind to others\n" -" Freedom = Responsibility\n" -" Everything in moderation\n" -"-Chew with your mouth open\n" -"+Chew with your mouth closed\n" -"+Listen when others are speaking\n" -"$\n" -msgstr "" -"\n" -"$ svn diff\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 3)\n" -"+++ rules.txt\t(working copy)\n" -"@@ -1,4 +1,5 @@\n" -" Be kind to others\n" -" Freedom = Responsibility\n" -" Everything in moderation\n" -"-Chew with your mouth open\n" -"+Chew with your mouth closed\n" -"+Listen when others are speaking\n" -"$\n" - -#. (title) -#: ../source/book.xml:3553 -msgid "Comparing Working Copy to Repository" -msgstr "比较工作副本和版本库" - -#. (para) -#: ../source/book.xml:3555 -msgid "If a single () number is passed, then your working copy is compared to the specified revision in the repository." -msgstr "如果传递一个)参数,你的工作拷贝会与指定的版本比较。" - -#. (screen) -#: ../source/book.xml:3559 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 3)\n" -"+++ rules.txt\t(working copy)\n" -"@@ -1,4 +1,5 @@\n" -" Be kind to others\n" -" Freedom = Responsibility\n" -" Everything in moderation\n" -"-Chew with your mouth open\n" -"+Chew with your mouth closed\n" -"+Listen when others are speaking\n" -"$\n" -msgstr "" -"\n" -"$ svn diff -r 3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 3)\n" -"+++ rules.txt\t(working copy)\n" -"@@ -1,4 +1,5 @@\n" -" Be kind to others\n" -" Freedom = Responsibility\n" -" Everything in moderation\n" -"-Chew with your mouth open\n" -"+Chew with your mouth closed\n" -"+Listen when others are speaking\n" -"$\n" - -#. (title) -#: ../source/book.xml:3578 -msgid "Comparing Repository to Repository" -msgstr "比较版本库与版本库" - -#. (para) -#: ../source/book.xml:3580 -msgid "If two revision numbers, separated by a colon, are passed via , then the two revisions are directly compared." -msgstr "如果通过)传递两个通过冒号分开的版本号,这两个版本会进行比较。" - -#. (screen) -#: ../source/book.xml:3583 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 2:3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 2)\n" -"+++ rules.txt\t(revision 3)\n" -"@@ -1,4 +1,4 @@\n" -" Be kind to others\n" -"-Freedom = Chocolate Ice Cream\n" -"+Freedom = Responsibility\n" -" Everything in moderation\n" -" Chew with your mouth open\n" -"$\n" -msgstr "" -"\n" -"$ svn diff -r 2:3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 2)\n" -"+++ rules.txt\t(revision 3)\n" -"@@ -1,4 +1,4 @@\n" -" Be kind to others\n" -"-Freedom = Chocolate Ice Cream\n" -"+Freedom = Responsibility\n" -" Everything in moderation\n" -" Chew with your mouth open\n" -"$\n" - -#. (para) -#: ../source/book.xml:3597 -msgid "A more convenient way of comparing a revision to the previous revision is to use the :" -msgstr "与前一个修订版本比较更方便的办法是使用:" - -#. (screen) -#: ../source/book.xml:3600 -#, no-wrap -msgid "" -"\n" -"$ svn diff -c 3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 2)\n" -"+++ rules.txt\t(revision 3)\n" -"@@ -1,4 +1,4 @@\n" -" Be kind to others\n" -"-Freedom = Chocolate Ice Cream\n" -"+Freedom = Responsibility\n" -" Everything in moderation\n" -" Chew with your mouth open\n" -"$\n" -msgstr "" -"\n" -"$ svn diff -c 3 rules.txt\n" -"Index: rules.txt\n" -"===================================================================\n" -"--- rules.txt\t(revision 2)\n" -"+++ rules.txt\t(revision 3)\n" -"@@ -1,4 +1,4 @@\n" -" Be kind to others\n" -"-Freedom = Chocolate Ice Cream\n" -"+Freedom = Responsibility\n" -" Everything in moderation\n" -" Chew with your mouth open\n" -"$\n" - -#. (para) -#: ../source/book.xml:3614 -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:" -msgstr "最后,即使你在本机没有工作拷贝,还是可以比较版本库的修订版本,只需要在命令行中输入合适的URL:" - -#. (screen) -#: ../source/book.xml:3617 -#, no-wrap -msgid "" -"\n" -"$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt\n" -"…\n" -"$\n" - -#. (title) -#: ../source/book.xml:3627 -msgid "Browsing the repository" -msgstr "浏览版本库" - -#. (para) -#: ../source/book.xml:3629 -msgid "Using svn cat and svn list, 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." -msgstr "通过svn catsvn list,你可以在未修改工作修订版本的情况下查看文件和目录的内容,实际上,你甚至也不需要有一个工作拷贝。" - -#. (para) -#: ../source/book.xml:3641 -msgid "If you want to examine an earlier version of a file and not necessarily the differences between two files, you can use svn cat:" -msgstr "如果你只是希望检查一个过去的版本而不希望察看它们的区别,使用svn cat:" - -#. (screen) -#: ../source/book.xml:3644 -#, no-wrap -msgid "" -"\n" -"$ svn cat -r 2 rules.txt\n" -"Be kind to others\n" -"Freedom = Chocolate Ice Cream\n" -"Everything in moderation\n" -"Chew with your mouth open\n" -"$\n" -msgstr "" -"\n" -"$ svn cat -r 2 rules.txt\n" -"Be kind to others\n" -"Freedom = Chocolate Ice Cream\n" -"Everything in moderation\n" -"Chew with your mouth open\n" -"$\n" - -#. (para) -#: ../source/book.xml:3652 -msgid "You can also redirect the output directly into a file:" -msgstr "你可以重定向输出到一个文件:" - -#. (screen) -#: ../source/book.xml:3654 -#, no-wrap -msgid "" -"\n" -"$ svn cat -r 2 rules.txt > rules.txt.v2\n" -"$\n" -msgstr "" -"\n" -"$ svn cat -r 2 rules.txt > rules.txt.v2\n" -"$\n" - -#. (para) -#: ../source/book.xml:3666 -msgid "The svn list command shows you what files are in a repository directory without actually downloading the files to your local machine:" -msgstr "svn list可以在不下载文件到本地目录的情况下来察看目录中的文件:" - -#. (screen) -#: ../source/book.xml:3669 -#, no-wrap -msgid "" -"\n" -"$ svn list http://svn.collab.net/repos/svn\n" -"README\n" -"branches/\n" -"clients/\n" -"tags/\n" -"trunk/\n" -msgstr "" -"\n" -"$ svn list http://svn.collab.net/repos/svn\n" -"README\n" -"branches/\n" -"clients/\n" -"tags/\n" -"trunk/\n" - -#. (para) -#: ../source/book.xml:3677 -msgid "If you want a more detailed listing, pass the flag to get output like this:" -msgstr "如果你希望察看详细信息,你可以使用 参数:" - -#. (screen) -#: ../source/book.xml:3680 -#, no-wrap -msgid "" -"\n" -"$ svn list -v http://svn.collab.net/repos/svn\n" -" 20620 harry 1084 Jul 13 2006 README\n" -" 23339 harry Feb 04 01:40 branches/\n" -" 21282 sally Aug 27 09:41 developer-resources/\n" -" 23198 harry Jan 23 17:17 tags/\n" -" 23351 sally Feb 05 13:26 trunk/\n" -msgstr "" -"\n" -"$ svn list -v http://svn.collab.net/repos/svn\n" -" 20620 harry 1084 Jul 13 2006 README\n" -" 23339 harry Feb 04 01:40 branches/\n" -" 21282 sally Aug 27 09:41 developer-resources/\n" -" 23198 harry Jan 23 17:17 tags/\n" -" 23351 sally Feb 05 13:26 trunk/\n" - -#. (para) -#: ../source/book.xml:3688 -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." -msgstr "这些列告诉你文件和目录最后修改的修订版本、做出修改的用户、如果是文件还会有文件的大小,最后是修改日期和项目的名字。" - -#. (para) -#: ../source/book.xml:3693 -msgid "The svn list with no arguments defaults to the repository URL of the current working directory, not the local working copy directory. After all, if you wanted a listing of your local directory, you could use just plain ls (or any reasonable non-Unixy equivalent)." -msgstr "没有任何参数的svn list命令缺省使用当前工作拷贝的版本库URL,而不是本地工作拷贝的目录。毕竟,如果你希望列出本地目录,你只需要使用ls(或任何合理的非UNIX等价物)。" - -#. (title) -#: ../source/book.xml:3706 -msgid "Fetching older repository snapshots" -msgstr "获得旧的版本库快照" - -#. (para) -#: ../source/book.xml:3712 -msgid "See? We told you that Subversion was a time machine." -msgstr "看到了吧?我们说过Subversion是一个时间机器。" - -#. (para) -#: ../source/book.xml:3708 -msgid "In addition to all of the above commands, you can use svn update and svn checkout with the option to take an entire working copy back in time:" -msgstr "除了以上的命令,你可以使用带参数svn updatesvn checkout来使整个工作拷贝回到过去:" - -#. (screen) -#: ../source/book.xml:3714 -#, no-wrap -msgid "" -"\n" -"$ svn checkout -r 1729 # Checks out a new working copy at r1729\n" -"…\n" -"$ svn update -r 1729 # Updates an existing working copy to r1729\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout -r 1729 # Checks out a new working copy at r1729\n" -"…\n" -"$ svn update -r 1729 # Updates an existing working copy to r1729\n" -"…\n" - -#. (para) -#: ../source/book.xml:3721 -#, fuzzy -msgid "Many Subversion newcomers attempt to use the above svn update example to undo 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 for a description of how to undo a commit." -msgstr "许多Subversion新手使用前面的svn update实例来回退修改,但是你不能提交修改,你获得有新修订版本的过时工作拷贝也是没有用的。关于如何回退,我们可以看。" - -#. (para) -#: ../source/book.xml:3728 -msgid "Lastly, if you're building a release and wish to bundle up your files from Subversion but don't want those pesky .svn directories in the way, then you can use svn export to create a local copy of all or part of your repository sans .svn directories. As with svn update and svn checkout, you can also pass the option to svn export:" -msgstr "最后,如果你构建了一个版本,并且希望从Subversion打包文件,但是你不希望有讨厌的.svn目录,这时你可以导出版本库的一部分文件而没有.svn目录。就像svn updatesvn checkout,你也可以传递选项给svn export:" - -#. (screen) -#: ../source/book.xml:3738 -#, no-wrap -msgid "" -"\n" -"$ svn export http://svn.example.com/svn/repos1 # Exports latest revision\n" -"…\n" -"$ svn export http://svn.example.com/svn/repos1 -r 1729\n" -"# Exports revision r1729\n" -"…\n" -msgstr "" -"\n" -"$ svn export http://svn.example.com/svn/repos1 # Exports latest revision\n" -"…\n" -"$ svn export http://svn.example.com/svn/repos1 -r 1729\n" -"# Exports revision r1729\n" -"…\n" - -#. (title) -#: ../source/book.xml:3752 -msgid "Sometimes You Just Need to Clean Up" -msgstr "有时你只需要清理" - -#. (para) -#: ../source/book.xml:3754 -msgid "When Subversion modifies your working copy (or any information within .svn), 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." -msgstr "当Subversion改变你的工作拷贝(或是.svn中的任何信息),它会尽可能的小心,在修改任何事情之前,它把意图写到日志文件中去,然后执行log文件中的命令,并且执行过程中在工作拷贝的相关部分保存一个锁— 防止Subversion客户端在变更过程中访问工作拷贝。然后删掉日志文件,这与记帐试的文件系统架构类似。如果Subversion的操作中断了(举个例子:进程被杀死了,机器死掉了),日志文件会保存在硬盘上,通过重新执行日志文件,Subversion可以完成上一次开始的操作,你的工作拷贝可以回到一致的状态。" - -#. (para) -#: ../source/book.xml:3769 -msgid "And this is exactly what svn cleanup 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 locked, then this is the command that you should run. Also, svn status will display an L next to locked items:" -msgstr "这就是svn cleanup所作的:它查找工作拷贝中的所有遗留的日志文件,删除进程中工作拷贝的锁。如果Subversion告诉你工作拷贝中的一部分已经锁定了,你就需要运行这个命令了。同样,svn status将会使用L 标示锁定的项目:" - -#. (screen) -#: ../source/book.xml:3776 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -" L somedir\n" -"M somedir/foo.c\n" -"\n" -"$ svn cleanup\n" -"$ svn status\n" -"M somedir/foo.c\n" -msgstr "" -"\n" -"$ svn status\n" -" L somedir\n" -"M somedir/foo.c\n" -"\n" -"$ svn cleanup\n" -"$ svn status\n" -"M somedir/foo.c\n" - -#. (para) -#: ../source/book.xml:3785 -msgid "Don't confuse these working copy locks with the ordinary locks that Subversion users create when using the lock-modify-unlock model of concurrent version control; see for clarification." -msgstr "Don't confuse these working copy locks with the ordinary locks that Subversion users create when using the lock-modify-unlock model of concurrent version control; see for clarification." - -#. (para) -#: ../source/book.xml:3799 -msgid "Now we've covered most of the Subversion client commands. Notable exceptions are those dealing with branching and merging (see ) and properties (see ). However, you may want to take a moment to skim through to get an idea of all the many different commands that Subversion has—and how you can use them to make your work easier." -msgstr "我们已经覆盖了大多数Subversion的客户端命令,引人注目的例外是处理分支与合并(见)以及属性(见)的命令,然而你也许会希望跳到来察看所有不同的命令—怎样利用它们使你的工作更容易。" - -#. (title) -#: ../source/book.xml:3816 -msgid "Advanced Topics" -msgstr "高级主题" - -#. (para) -#: ../source/book.xml:3818 -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 svn commit and svn update functions. You've probably even developed a reflex which causes you to run the svn status command almost unconsciously. For all intents and purposes, you are ready to use Subversion in a typical environment." -msgstr "如果你是从头到尾按章节阅读本书,你一定已经具备了使用Subversion客户端执行大多数不同的版本控制操作足够的知识,你理解了怎样从Subversion版本库取出一个工作拷贝,你已经熟悉了通过svn commitsvn update来提交和接收修改,你甚至也经常下意识的使用svn status,无论目的是什么,你已经可以正常使用Subversion了。" - -#. (para) -#: ../source/book.xml:3829 -msgid "But the Subversion feature set doesn't stop at common version control operations. It has other bits of functionality besides just communicating file and directory changes to and from a central repository." -msgstr "但是Subversion的特性并没有止于普通的版本控制操作,它也有一些超越了与版本库传递文件和目录修改以外的功能。" - -#. (para) -#: ../source/book.xml:3833 -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 and . Once you've mastered those basics and consumed this chapter, you'll be a Subversion power-user!" -msgstr "本章重点介绍了一些很重要但不是经常使用的Subversion特性,本章假定你熟悉Subversion对文件和目录的基本版本操作能力,如果你还没有阅读这些内容,或者是需要一个复习,我们建议你重读,一旦你已经掌握了基础知识和本章的内容,你会变成Subversion的超级用户!" - -#. (title) -#: ../source/book.xml:3844 -msgid "Revision Specifiers" -msgstr "版本清单" - -#. (para) -#: ../source/book.xml:3846 -msgid "As you saw in , 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 do 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." -msgstr "就像你在见到的,Subversion的修订版本号码非常直接—就是随提交增大的整数。尽管如此,不会花很长时间你就会忘记每个修订版本的修改,但幸运的是,典型的Subvesion工作流程中一般不会要求你提供任意的修订版本号。在需要输入修订版本号时,通常或者是你在一个提交邮件中看到了一个修订版本,或者是在其他Subversion命令的输出结果中,或者是任何上下文环境得到某个版本号码的情况下。" - -#. (para) -#: ../source/book.xml:3859 -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, svn allows as input some additional forms of revision specifiers—revision keywords, and revision dates." -msgstr "但是有时候,你需要精确指定一个时间,而无法记住或者记录了某个版本,这时除了使用修订版本号码,svn允许使用其他形式来指定修订版本—修订版本关键字和修订版本日期。" - -#. (para) -#: ../source/book.xml:3866 -msgid "The various forms of Subversion revision specifiers can be mixed and matched when used to specify revision ranges. For example, you can use where REV1 is a revision keyword and REV2 is a revision number, or where REV1 is a date and REV2 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." -msgstr "当用来指定修订版本范围时,不同形式的Subversion修订版本可以混合匹配。例如,你可以REV1是修订版本关键字,REV2是修订版本号,或者是REV1是日期,而REV2是修订版本关键字,等等。不同的修订版本指定符是等价的,所以你可以在冒号两边任意使用。" - -#. (title) -#: ../source/book.xml:3881 -msgid "Revision Keywords" -msgstr "修订版本关键字" - -#. (primary) -#: ../source/book.xml:3884 ../source/book.xml:3980 -msgid "revisions" -msgstr "版本" - -#. (secondary) -#: ../source/book.xml:3885 -msgid "revision keywords" -msgstr "版本关键字" - -#. (primary), (term) -#: ../source/book.xml:3888 ../source/book.xml:3906 -msgid "HEAD" -msgstr "HEAD" - -#. (primary), (term) -#: ../source/book.xml:3891 ../source/book.xml:3913 -msgid "BASE" -msgstr "BASE" - -#. (primary), (term) -#: ../source/book.xml:3894 ../source/book.xml:3922 -msgid "COMMITTED" -msgstr "COMMITTED" - -#. (primary), (term) -#: ../source/book.xml:3897 ../source/book.xml:3929 -msgid "PREV" -msgstr "PREV" - -#. (para) -#: ../source/book.xml:3899 -msgid "The Subversion client understands a number of revision keywords. These keywords can be used instead of integer arguments to the switch, and are resolved into specific revision numbers by Subversion:" -msgstr "Subversion客户端可以理解一些修订版本关键字,这些关键字可以用来代替的数字参数,这会被Subversion解释到特定修订版本号:" - -#. (para) -#: ../source/book.xml:3908 -msgid "The latest (or youngest) revision in the repository." -msgstr "版本库中最新的(或者是最年轻的)版本。" - -#. (para) -#: ../source/book.xml:3915 -msgid "The revision number of an item in a working copy. If the item has been locally modified, the BASE version refers to the way the item appears without those local modifications." -msgstr "工作拷贝中一个条目的修订版本号,如果这个版本在本地修改了,则BASE版本就是这个条目在本地未修改的版本。" - -#. (para) -#: ../source/book.xml:3924 -msgid "The most recent revision prior to, or equal to, BASE, in which an item changed." -msgstr "一个项目修改的BASE版本之前或相同的版本。" - -#. (para) -#: ../source/book.xml:3931 -msgid "The revision immediately before the last revision in which an item changed. Technically, this boils down to COMMITTED-1." -msgstr "一个项目最后修改版本之前的那个版本,技术上可以认为是COMMITTED -1。" - -#. (para) -#: ../source/book.xml:3938 -msgid "As can be derived from their descriptions, the PREV, BASE, and COMMITTED revision keywords are used only when referring to a working copy path—they don't apply to repository URLs. HEAD, on the other hand, can be used in conjunction with both of these path types." -msgstr "因为可以从描述中得到,关键字PREVBASECOMMITTED只在引用工作拷贝路径时使用,而不能用于版本库URL,而关键字HEAD则可以用于两种路径类型。" - -#. (para) -#: ../source/book.xml:3945 -msgid "Here are some examples of revision keywords in action:" -msgstr "下面是一些修订版本关键字的例子:" - -#. (screen) -#: ../source/book.xml:3947 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r PREV:COMMITTED foo.c\n" -"# shows the last change committed to foo.c\n" -"\n" -"$ svn log -r HEAD\n" -"# shows log message for the latest repository commit\n" -"\n" -"$ svn diff -r HEAD\n" -"# compares your working copy (with all of its local changes) to the\n" -"# latest version of that tree in the repository\n" -"\n" -"$ svn diff -r BASE:HEAD foo.c\n" -"# compares the unmodified version of foo.c with the latest version of\n" -"# foo.c in the repository\n" -"\n" -"$ svn log -r BASE:HEAD\n" -"# shows all commit logs for the current versioned directory since you\n" -"# last updated\n" -"\n" -"$ svn update -r PREV foo.c\n" -"# rewinds the last change on foo.c, decreasing foo.c's working revision\n" -"\n" -"$ svn diff -r BASE:14 foo.c\n" -"# compares the unmodified version of foo.c with the way foo.c looked\n" -"# in revision 14\n" -msgstr "" -"\n" -"$ svn diff -r PREV:COMMITTED foo.c\n" -"# shows the last change committed to foo.c\n" -"\n" -"$ svn log -r HEAD\n" -"# shows log message for the latest repository commit\n" -"\n" -"$ svn diff -r HEAD\n" -"# compares your working copy (with all of its local changes) to the\n" -"# latest version of that tree in the repository\n" -"\n" -"$ svn diff -r BASE:HEAD foo.c\n" -"# compares the unmodified version of foo.c with the latest version of\n" -"# foo.c in the repository\n" -"\n" -"$ svn log -r BASE:HEAD\n" -"# shows all commit logs for the current versioned directory since you\n" -"# last updated\n" -"\n" -"$ svn update -r PREV foo.c\n" -"# rewinds the last change on foo.c, decreasing foo.c's working revision\n" -"\n" -"$ svn diff -r BASE:14 foo.c\n" -"# compares the unmodified version of foo.c with the way foo.c looked\n" -"# in revision 14\n" - -#. (title) -#: ../source/book.xml:3977 -msgid "Revision Dates" -msgstr "版本日期" - -#. (secondary) -#: ../source/book.xml:3981 -msgid "specified as dates" -msgstr "以日期指定" - -#. (para) -#: ../source/book.xml:3983 -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 can also accept as input date specifiers wrapped in curly braces ({ and }). 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.)" -msgstr "在版本控制系统以外,修订版本号码是没有意义的,但是有时候你需要将时间和历史修订版本号关联。为此,选项接受使用花括号({})包裹的日期输入,Subversion支持标准ISO-8601日期和时间格式,也支持一些其他的。下面是一些例子。(记住使用引号括起所有包含空格的日期。)" - -#. (screen) -#: ../source/book.xml:3993 -#, no-wrap -msgid "" -"\n" -"$ svn checkout -r {2006-02-17}\n" -"$ svn checkout -r {15:30}\n" -"$ svn checkout -r {15:30:00.200000}\n" -"$ svn checkout -r {\"2006-02-17 15:30\"}\n" -"$ svn checkout -r {\"2006-02-17 15:30 +0230\"}\n" -"$ svn checkout -r {2006-02-17T15:30}\n" -"$ svn checkout -r {2006-02-17T15:30Z}\n" -"$ svn checkout -r {2006-02-17T15:30-04:00}\n" -"$ svn checkout -r {20060217T1530}\n" -"$ svn checkout -r {20060217T1530Z}\n" -"$ svn checkout -r {20060217T1530-0500}\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout -r {2006-02-17}\n" -"$ svn checkout -r {15:30}\n" -"$ svn checkout -r {15:30:00.200000}\n" -"$ svn checkout -r {\"2006-02-17 15:30\"}\n" -"$ svn checkout -r {\"2006-02-17 15:30 +0230\"}\n" -"$ svn checkout -r {2006-02-17T15:30}\n" -"$ svn checkout -r {2006-02-17T15:30Z}\n" -"$ svn checkout -r {2006-02-17T15:30-04:00}\n" -"$ svn checkout -r {20060217T1530}\n" -"$ svn checkout -r {20060217T1530Z}\n" -"$ svn checkout -r {20060217T1530-0500}\n" -"…\n" - -#. (para) -#: ../source/book.xml:4007 -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:" -msgstr "当你指定一个日期,Subversion会在版本库找到接近这个日期的最近版本,并且对这个版本继续操作:" - -#. (screen) -#: ../source/book.xml:4011 -#, no-wrap -msgid "" -"\n" -"$ svn log -r {2006-11-28}\n" -"------------------------------------------------------------------------\n" -"r12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines\n" -"…\n" -msgstr "" -"\n" -"$ svn log -r {2006-11-28}\n" -"------------------------------------------------------------------------\n" -"r12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines\n" -"…\n" - -#. (title) -#: ../source/book.xml:4019 -msgid "Is Subversion a Day Early?" -msgstr "Subversion 会早一天吗?" - -#. (para) -#: ../source/book.xml:4021 -msgid "If you specify a single date as a revision without specifying a time of day (for example 2006-11-27), 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 most recent revision of the repository as of the date you give. If you give a date without a timestamp, like 2006-11-27, 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." -msgstr "如果你只是指定了日期而没有时间(举个例子2006-11-27),你也许会以为Subversion会给你11-27号最后的版本,相反,你会得到一个26号版本,甚至更早。记住Subversion会根据你的日期找到最新的版本,如果你给一个日期,而没有给时间,像2006-11-27,Subversion会假定时间是00:00:00,所以在27号找不到任何版本。" - -#. (para) -#: ../source/book.xml:4033 -msgid "If you want to include the 27th in your search, you can either specify the 27th with the time ({\"2006-11-27 23:59\"}), or just specify the next day ({2006-11-28})." -msgstr "如果你希望查询包括27号,你既可以使用({\"2006-11-27 23:59\"}),或是直接使用第二天({2006-11-28})。" - -#. (para) -#: ../source/book.xml:4038 -msgid "You can also use a range of dates. Subversion will find all revisions between both dates, inclusive:" -msgstr "你可以使用时间段,Subversion会找到这段时间的所有版本:" - -#. (screen) -#: ../source/book.xml:4040 -#, no-wrap -msgid "" -"\n" -"$ svn log -r {2006-11-20}:{2006-11-29}\n" -"…\n" -msgstr "" -"\n" -"$ svn log -r {2006-11-20}:{2006-11-29}\n" -"…\n" - -#. (para) -#: ../source/book.xml:4045 -msgid "Since the timestamp of a revision is stored as an unversioned, modifiable property of the revision (see , 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." -msgstr "因为一个版本的时间戳是作为一个属性存储的—不是版本化的,而是可以编辑的属性(见)—版本号的时间戳可以被修改,从而建立一个虚假的年代表,也可以被完全删除。Subversion正确转化修订版本日期到修订版本的能力依赖于修订版本时间戳顺序排列—修订版本越年轻,则时间戳越年轻。如果顺序没有被维护,你会发现使用日期指定修订版本不会返回你期望的数据。" - -#. (title) -#: ../source/book.xml:4064 -msgid "Properties" -msgstr "属性" - -#. (primary) -#: ../source/book.xml:4067 -msgid "properties" -msgstr "属性" - -#. (para) -#: ../source/book.xml:4069 -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." -msgstr "我们已经详细讲述了Subversion存储和检索版本库中不同版本的文件和目录的细节,并且用了好几个章节来论述这个工具的基本功能。到此为止,Subversion还仅仅表现出一个普通的版本控制理念。但是Subversion并没有就此止步。" - -#. (para) -#: ../source/book.xml:4075 -msgid "But it doesn't stop there." -msgstr "但不仅仅如此。" - -#. (para) -#: ../source/book.xml:4076 -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 properties, 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." -msgstr "作为目录和文件版本化的补充,Subversion提供了对每一个版本化的目录和文件添加、修改和删除版本化的元数据的接口,我们用属性来表示这些元数据。我们可以认为它们是一个两列的表,附加到你的工作拷贝的每个条目上,映射属性名到任意的值。一般来说,属性的名称和值可以是你希望的任何值,限制就是名称必须是可读的文本,并且最好的一点是这些属性也是版本化的,就像你的文本内容文件,你可以像提交文本修改一样修改、提交和恢复属性修改,当你更新时也会接收到别人的属性修改—你不必为适应属性改变你的工作流程。" - -#. (para) -#: ../source/book.xml:4093 -msgid "Subversion has reserved the set of properties whose names begin with svn: 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." -msgstr "Subversion自己保留了一组名称以svn:开头的属性,现在已经有了一些在用的属性,所以在你根据需要创建自定义属性时,需要避免这些前缀开头的名称,否则,Subversion的新版本可能会采用同名的属性来满足新的特性,而其含义可能会完全不同。" - -#. (para) -#: ../source/book.xml:4102 -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." -msgstr "Subversion的属性也可以在别的地方出现,就像文件和目录可能附加有任意的属性名和值,每个修订版本作为一个整体也可以附加任意的属性,也有同样的限制—可读的文本名称和任何你希望的二进制值,主要的区别是修订版本属性是版本化的,换句话说,如果你修改,删除一个修订版本属性,在Subversion领域内没有办法恢复到以前的值。" - -#. (para) -#: ../source/book.xml:4111 -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 svn:. 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 ." -msgstr "Subversion不关心如何使用属性,但是要求你不要使用svn:为前缀的属性名,这是Subversion自己使用的命名空间,Subversion使用了版本化的和未版本化的属性。文件和目录上的特定版本化属性都有特别的意义或效果,或者是提供了修订版本的一些信息。一些修订版本属性会在提交时自动附加到修订版本上,包含了修订版本的信息。大多数这些属性会作为普通的主题在后面提及,关于Subversion预定义的属性的详细列表可以看。" - -#. (para) -#: ../source/book.xml:4126 -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 svn subcommands, and how property modifications affect your normal Subversion workflow." -msgstr "在本小节,我们将会检验这个工具—不仅是对Subversion的用户,也对Subversion本身—对于属性的支持。你会学到与属性相关的svn子命令,和属性怎样影响你的普通Subversion工作流,希望你会感到Subversion的属性可以提高你的版本控制体验。" - -#. (title) -#: ../source/book.xml:4134 -msgid "Why Properties?" -msgstr "为什么需要属性?" - -#. (para) -#: ../source/book.xml:4136 -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." -msgstr "就像Subversion使用属性保存其包含的文件、目录和修订版本的附加信息,你也会发现属性有一些类似的使用,你会发现如果在数据附近有个地方保存自定义元数据会非常有用。" - -#. (para) -#: ../source/book.xml:4142 -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." -msgstr "假设你希望设计一个存放许多数码照片的网站,会显示标题和缩略图。现在你的图片会经常修改,所以你希望能够让这个站点尽量自动处理这些事情,这些照片会很大,所以作为网站,你希望为访问者提供相似的缩略图。" - -#. (para) -#: ../source/book.xml:4149 -msgid "Now, you can get this functionality using traditional files. That is, you can have your image123.jpg and an image123-thumbnail.jpg 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 thumbnails/image123.jpg. 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." -msgstr "现在,你可以利用这些功能使用传统文件。你可以有一个image123.jpg和一个对应的image123-thumbnail.jpg在同一个目录里,有时候你希望保持文件名相同,你可以使用不同的目录,如thumbnails/image123.jpg。你可以用一种相似的样式来保存你的标题和时间戳,同原始图像文件分开。每个新图片的添加都会成倍的增加混乱,很快你的目录树会是一团糟。" - -#. (para) -#: ../source/book.xml:4160 -msgid "Now consider the same website deployed in a way that makes use of Subversion's file properties. Imagine having a single image file, image123.jpg, and then properties set on that file named caption, datestamp, and even thumbnail. 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 svn (or better yet, they can use the Subversion language bindings—see ) to dig out the extra information that your site needs to display without having to read an index file or play path manipulation games." -msgstr "现在考虑使用Subversion文件的属性的方式来管理这个站点,想象我们有一个单独的图像文件image123.jpg,然后这个文件的属性集包括captiondatestamp甚至thumbnail。现在你的工作拷贝目录看起来更容易管理—实际上,它看起来只有图像文件,但是你的自动化脚本知道得更多,它们知道可以用svn(更好的选择是使用Subversion的语言绑定—见)来挖掘更多的站点显示需要的额外信息,而不必去阅读一个索引文件或者是玩一个路径处理的游戏。" - -#. (para) -#: ../source/book.xml:4174 -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 test-results property on that revision with a value all passing, that's meaningful information to have." -msgstr "自定义修订版本属性也经常被使用,一个常见的用法是一个包含问题跟踪ID的属性,可能是因为这个修改修正了这个ID的问题。另外一些人用属性来存放更容易记的修订版本名称—记住修订版本1935是一个完全测试的版本是很困难的,但是如果在修订版本上设置一个值为all passingtest-results属性,这就有了一个有用的信息。" - -#. (title) -#: ../source/book.xml:4186 -msgid "Searchability (or, Why Not Properties)" -msgstr "可搜索性(或者,为什么使用属性)" - -#. (para) -#: ../source/book.xml:4189 -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 set a custom property, finding that property later is whole different ball of wax." -msgstr "对于Subversion属性的所有功能—或者更准确的讲,对于属性的所有接口—都有一些主要的应用会削弱他们的应用。设置一个自定义属性后,很容易发现属性完全变成另外一会儿事。" - -#. (para) -#: ../source/book.xml:4195 -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 svn propget 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." -msgstr "为了定位一个自定义属性通常要线形访问版本库的所有修订版本,向每个修订版本询问,“你们有我找的属性吗?”尝试查找自定义版本化属性也是同样的痛苦,通常需要在整个工作拷贝递归调用svn propget。在你的情况下,可能不会比遍历所有修订版本差。但也在性能和成功可能性里留下了许多悬念,特别是当你需要从版本库的根开始搜索时。" - -#. (para) -#: ../source/book.xml:4207 -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 svn log. It is quite common to see in Subversion log messages the likes of:" -msgstr "因为这个原因,你会选择—特别是在修订版本属性用例—简单的添加你的元数据到修订版本日志信息,使用一些政策驱动(并且是编程强制的)且可以通过svn log快速解析格式。如下的Subversion日志信息会很常见:" - -#. (programlisting) -#: ../source/book.xml:4214 -#, no-wrap -msgid "" -"\n" -"Issue(s): IZ2376, IZ1919\n" -"Reviewed by: sally\n" -"\n" -"This fixes a nasty segfault in the wort frabbing process\n" -"…\n" -msgstr "" -"\n" -"Issue(s): IZ2376, IZ1919\n" -"Reviewed by: sally\n" -"\n" -"This fixes a nasty segfault in the wort frabbing process\n" -"…\n" - -#. (para) -#: ../source/book.xml:4221 -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." -msgstr "但是现在依然有一些不幸,Subversion不支持日志信息模版机制,虽然这样对用户与日志嵌入的修订版本元数据保持一致有很大帮助。" - -#. (title) -#: ../source/book.xml:4230 -msgid "Manipulating Properties" -msgstr "操作属性" - -#. (para) -#: ../source/book.xml:4232 -msgid "The svn 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 propset subcommand." -msgstr "svn命令提供一些方法来添加和修改文件或目录的属性,对于短的,可读的属性,最简单的添加方法是在propset子命令里指定正确的名称和值。" - -#. (screen) -#: ../source/book.xml:4238 -#, no-wrap -msgid "" -"\n" -"$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c\n" -"property 'copyright' set on 'calc/button.c'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c\n" -"property 'copyright' set on 'calc/button.c'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4243 -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 propset subcommand takes a option for specifying the name of a file which contains the new property value." -msgstr "但是我们已经吹捧了Subversion提供的属性功能的灵活性,如果你计划使用多行文本,或者是二进制属性值,你可能不会希望通过命令行提供这些值,所以propset子命令提供的选项可以指定包含属性值的文件。" - -#. (screen) -#: ../source/book.xml:4250 -#, no-wrap -msgid "" -"\n" -"$ svn propset license -F /path/to/LICENSE calc/button.c\n" -"property 'license' set on 'calc/button.c'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset license -F /path/to/LICENSE calc/button.c\n" -"property 'license' set on 'calc/button.c'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4261 -msgid "If you're familiar with XML, this is pretty much the ASCII subset of the syntax for XML \"Name\"." -msgstr "如果你熟悉XML,其实这就是XML的\"Name\"语法的ASCII子集。" - -#. (para) -#: ../source/book.xml:4255 -msgid "There are some restrictions on the names you can use for properties. A property name must start with a letter, a colon (:), or an underscore (_); after that, you can also use digits, hyphens (-), and periods (.). " -msgstr "对于属性名称也有一些限制,属性名必须以一个字符、一个冒号(:)或下划线(_)开始,之后你可以使用数字,横线(-)和句号(.)。 " - -#. (para) -#: ../source/book.xml:4264 -msgid "In addition to the propset command, the svn program supplies the propedit command. This command uses the configured editor program (see ) to add or modify properties. When you run the command, svn 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:" -msgstr "作为propset命令的补充,svn提供了一个propedit命令,这个命令使用定制的编辑器程序(见)来添加和修改属性。当你运行这个命令,svn调用你的编辑器程序打开一个临时文件,文件中保存当前的属性值(或者是空文件,如果你正在添加新的属性)。然后你只需要修改为你想要的值,保存临时文件,然后离开编辑器程序。如果Subversion发现你已经修改了属性值,就会接受新值,如果你未作任何修改而离开,不会产生属性修改操作:" - -#. (screen) -#: ../source/book.xml:4279 -#, no-wrap -msgid "" -"\n" -"$ svn propedit copyright calc/button.c ### exit the editor without changes\n" -"No changes to property 'copyright' on 'calc/button.c'\n" -"$\n" -msgstr "" -"\n" -"$ svn propedit copyright calc/button.c ### exit the editor without changes\n" -"No changes to property 'copyright' on 'calc/button.c'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4284 -msgid "We should note that, as with other svn 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:" -msgstr "我们也应该注意导,像其它svn子命令一样,这些关联的属性可以一次添加到多个路径上,这样就可以通过一个命令修改一组文件的属性。例如,我们可以:" - -#. (screen) -#: ../source/book.xml:4289 -#, no-wrap -msgid "" -"\n" -"$ svn propset copyright '(c) 2006 Red-Bean Software' calc/*\n" -"property 'copyright' set on 'calc/Makefile'\n" -"property 'copyright' set on 'calc/button.c'\n" -"property 'copyright' set on 'calc/integer.c'\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svn propset copyright '(c) 2006 Red-Bean Software' calc/*\n" -"property 'copyright' set on 'calc/Makefile'\n" -"property 'copyright' set on 'calc/button.c'\n" -"property 'copyright' set on 'calc/integer.c'\n" -"…\n" -"$\n" - -#. (para) -#: ../source/book.xml:4297 -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 svn program supplies two subcommands for displaying the names and values of properties stored on files and directories. The svn proplist 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 svn propget. 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." -msgstr "如果不能方便的得到存储的属性值,那么属性的添加和编辑操作也不会很容易,所以svn提供了两个子命令来显示文件和目录存储的属性名和值。svn proplist命令会列出路径上存在的所有属性名称,一旦你知道了某个节点的属性名称,你可以用svn propget获取它的值,这个命令获取给定的路径(或者是一组路径)和属性名称,打印这个属性的值到标准输出。" - -#. (screen) -#: ../source/book.xml:4308 -#, no-wrap -msgid "" -"\n" -"$ svn proplist calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright\n" -" license\n" -"$ svn propget copyright calc/button.c\n" -"(c) 2006 Red-Bean Software\n" -msgstr "" -"\n" -"$ svn proplist calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright\n" -" license\n" -"$ svn propget copyright calc/button.c\n" -"(c) 2006 Red-Bean Software\n" - -#. (para) -#: ../source/book.xml:4316 -msgid "There's even a variation of the proplist command that will list both the name and value of all of the properties. Simply supply the () option." -msgstr "还有一个proplist变种命令会列出所有属性的名称和值,只需要设置)选项。" - -#. (screen) -#: ../source/book.xml:4320 -#, no-wrap -msgid "" -"\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -" license : ================================================================\n" -"Copyright (c) 2006 Red-Bean Software. All rights reserved.\n" -"\n" -"Redistribution and use in source and binary forms, with or without\n" -"modification, are permitted provided that the following conditions \n" -"are met:\n" -"\n" -"1. Redistributions of source code must retain the above copyright\n" -"notice, this list of conditions, and the recipe for Fitz's famous\n" -"red-beans-and-rice.\n" -"…\n" -msgstr "" -"\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -" license : ================================================================\n" -"Copyright (c) 2006 Red-Bean Software. All rights reserved.\n" -"\n" -"Redistribution and use in source and binary forms, with or without\n" -"modification, are permitted provided that the following conditions \n" -"are met:\n" -"\n" -"1. Redistributions of source code must retain the above copyright\n" -"notice, this list of conditions, and the recipe for Fitz's famous\n" -"red-beans-and-rice.\n" -"…\n" - -#. (para) -#: ../source/book.xml:4336 -msgid "The last property-related subcommand is propdel. Since Subversion allows you to store properties with empty values, you can't remove a property altogether using propedit or propset. For example, this command will not yield the desired effect:" -msgstr "最后一个与属性相关的子命令是propdel,因为Subversion允许属性值为空,所有不能用propedit或者propset命令删除一个属性。例如,这个命令不会产生预期的效果:" - -#. (screen) -#: ../source/book.xml:4342 -#, no-wrap -msgid "" -"\n" -"$ svn propset license '' calc/button.c\n" -"property 'license' set on 'calc/button.c'\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -" license : \n" -"$\n" -msgstr "" -"\n" -"$ svn propset license '' calc/button.c\n" -"property 'license' set on 'calc/button.c'\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -" license : \n" -"$\n" - -#. (para) -#: ../source/book.xml:4351 -msgid "You need to use the propdel subcommand to delete properties altogether. The syntax is similar to the other property commands:" -msgstr "你需要用propdel来删除属性,语法与其它与属性命令相似:" - -#. (screen) -#: ../source/book.xml:4354 -#, no-wrap -msgid "" -"\n" -"$ svn propdel license calc/button.c\n" -"property 'license' deleted from 'calc/button.c'.\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -"$\n" -msgstr "" -"\n" -"$ svn propdel license calc/button.c\n" -"property 'license' deleted from 'calc/button.c'.\n" -"$ svn proplist -v calc/button.c\n" -"Properties on 'calc/button.c':\n" -" copyright : (c) 2006 Red-Bean Software\n" -"$\n" - -#. (para) -#: ../source/book.xml:4375 -msgid "Fixing spelling errors, grammatical gotchas, and just-plain-wrongness in commit log messages is perhaps the most common use case for the option." -msgstr "修正提交日志信息的拼写错误,文法错误和简单的错误选项最常见用例。" - -#. (para) -#: ../source/book.xml:4362 -msgid "Remember those unversioned revision properties? You can modify those, too, using the same svn subcommands that we just described. Simply add the 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. If your current working directory is part of a working copy of your repository, you can simply run the svn propset command with no target path:" -msgstr "还记的这些未版本化的修订版本属性?你也可以使用svn子命令修改这些属性。只需要添加命令参数,说明希望修改属性的修订版本。因为修订版本是全局的,你不需要指定一个路径,只要你已经位于你希望修改属性的工作拷贝路径,或者,你也可以提供版本库的URL的任何路径(也包括版本库的根URL)。例如,如果你当前的工作路径是一个版本库工作拷贝的一部分,你可以简单的运行没有目标路径的svn propset命令:" - -#. (screen) -#: ../source/book.xml:4382 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop\n" -"property 'svn:log' set on repository revision '11'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop\n" -"property 'svn:log' set on repository revision '11'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4387 -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:" -msgstr "但是即使你没有从版本库检出一个工作拷贝,你仍然可以通过提供版本库根URL来影响属性修改。" - -#. (screen) -#: ../source/book.xml:4390 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \\\n" -" http://svn.example.com/repos/project\n" -"property 'svn:log' set on repository revision '11'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \\\n" -" http://svn.example.com/repos/project\n" -"property 'svn:log' set on repository revision '11'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4396 -msgid "Note that the ability to modify these unversioned properties must be explicitly added by the repository administrator (see ). 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." -msgstr "注意,修改这些未版本化的属性的能力一定要明确的添加给版本库管理员(见)。因为属性没有版本化,如果编辑的时候不小心,就会冒丢失信息的风险,版本库管理员可以设置方法来防范这种意外,缺省情况下,修改未版本化的属性是禁止的。" - -#. (para) -#: ../source/book.xml:4405 -msgid "Users should, where possible, use svn propedit instead of svn propset. 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." -msgstr "用户必须在可能的情况下使用svn propedit,而不是svn propset。然而这两个命令的结果是相同的,前一个会允许他们查看修改以前的内容,可以帮助用户验证,实际上,作出他们所期望的修改,当修改未版本化修订版本属性时,这一点特别需要。另外,这个命令也可以通过文本编辑器或命令行轻松的修改多行属性。" - -#. (title) -#: ../source/book.xml:4420 -msgid "Properties and the Subversion Workflow" -msgstr "属性和 Subversion 工作流程" - -#. (para) -#: ../source/book.xml:4422 -msgid "Now that you are familiar with all of the property-related svn 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." -msgstr "现在你已经熟悉了所有与属性相关的svn子命令,让我们看看属性修改如何影响Subversion的工作流。我们前面提到过,文件和目录的属性是版本化的,这一点类似于版本化的文件内容。后果之一,就是Subversion具有了同样的机制来合并—用干净或者冲突的方式—其他人的修改应用到你的修改。" - -#. (para) -#: ../source/book.xml:4430 -msgid "And as with file contents, your property changes are local modifications, only made permanent when you commit them to the repository with svn commit. Your property changes can be easily unmade, too—the svn revert 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 svn status and svn diff commands." -msgstr "就像文件内容,你的属性修改是本地修改,只有使用svn commit命令提交后才会保存到版本库中,属性修改也可以很容易的取消—svn revert命令会恢复你的文件和目录为编辑前状态,包括内容、属性和其它的信息。另外,你可以使用svn statussvn diff接受感兴趣的文件和目录属性的状态信息。" - -#. (screen) -#: ../source/book.xml:4440 -#, no-wrap -msgid "" -"\n" -"$ svn status calc/button.c\n" -" M calc/button.c\n" -"$ svn diff calc/button.c\n" -"Property changes on: calc/button.c\n" -"___________________________________________________________________\n" -"Name: copyright\n" -" + (c) 2006 Red-Bean Software\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svn status calc/button.c\n" -" M calc/button.c\n" -"$ svn diff calc/button.c\n" -"Property changes on: calc/button.c\n" -"___________________________________________________________________\n" -"Name: copyright\n" -" + (c) 2006 Red-Bean Software\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:4451 -msgid "Notice how the status subcommand displays M in the second column instead of the first. That is because we have modified the properties on calc/button.c, but not its textual contents. Had we changed both, we would have seen M in the first column, too (see )." -msgstr "注意status子命令显示的M在第二列而不是在第一列,这是因为我们修改了calc/button.c的属性,而不是它的文本内容,如果我们都修改了,我们也会看到M出现在第一列(见)。" - -#. (title) -#: ../source/book.xml:4459 -msgid "Property Conflicts" -msgstr "属性冲突" - -#. (para) -#: ../source/book.xml:4461 -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." -msgstr "与文件内容一样,本地的属性修改也会同别人的提交冲突,如果你更新你的工作拷贝目录并且接收到有资源属性修改与你的修改冲突,Subversion会报告资源处于冲突状态。" - -#. (screen) -#: ../source/book.xml:4467 -#, no-wrap -msgid "" -"\n" -"% svn update calc\n" -"M calc/Makefile.in\n" -" C calc/button.c\n" -"Updated to revision 143.\n" -"$ \n" -msgstr "" -"\n" -"% svn update calc\n" -"M calc/Makefile.in\n" -" C calc/button.c\n" -"Updated to revision 143.\n" -"$ \n" - -#. (para) -#: ../source/book.xml:4474 -msgid "Subversion will also create, in the same directory as the conflicted object, a file with a .prej 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 C in the second column of svn status output for that object, and attempts to commit your local modifications will fail." -msgstr "Subversion也会在冲突资源的同一个目录创建一个.prej扩展名的文件,保存冲突的细节。你一定要检查这个文件的内容来决定如何解决冲突,在你解决冲突之前,你会在使用svn status时看到这个资源的输出的第二列是一个C,提交本地修改的尝试会失败。" - -#. (screen) -#: ../source/book.xml:4483 -#, no-wrap -msgid "" -"\n" -"$ svn status calc\n" -" C calc/button.c\n" -"? calc/button.c.prej\n" -"$ cat calc/button.c.prej \n" -"prop 'linecount': user set to '1256', but update set to '1301'.\n" -"$\n" -msgstr "" -"\n" -"$ svn status calc\n" -" C calc/button.c\n" -"? calc/button.c.prej\n" -"$ cat calc/button.c.prej \n" -"prop 'linecount': user set to '1256', but update set to '1301'.\n" -"$\n" - -#. (para) -#: ../source/book.xml:4491 -msgid "To resolve property conflicts, simply ensure that the conflicting properties contain the values that they should, and then use the svn resolved command to alert Subversion that you have manually resolved the problem." -msgstr "为了解决属性冲突,只需要确定冲突的属性保存了它们应该的值,然后使用svn resolved命令告诉Subversion你已经手工解决了问题。" - -#. (para) -#: ../source/book.xml:4497 -msgid "You might also have noticed the non-standard way that Subversion currently displays property differences. You can still run svn diff and redirect the output to create a usable patch file. The patch 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 svn diff, any property modifications will need to be applied by hand." -msgstr "你也许已经注意到了Subversion在显示属性时的非标准方式。你还可以运行svn diff并且重定向输出来产生一个有用的补丁文件,patch程序会忽略属性补丁—作为规则,它会忽略任何不理解的噪音。很遗憾,这意味着完全应用svn diff产生的补丁时,任何属性修改必须手工实施。" - -#. (title) -#: ../source/book.xml:4510 -msgid "Automatic Property Setting" -msgstr "自动设置属性" - -#. (para) -#: ../source/book.xml:4512 -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." -msgstr "属性是Subversion一个强大的特性,成为本章和其它章讨论的许多Subversion特性的关键组成部分—文本区别和合并支持、关键字替换、新行的自动转换等等。但是为了从属性得到完全的利益,他们必须设置到正确的文件和目录。不幸的是,在日常工作中很容易忘记这一步工作,特别是当没有设置属性不会引起明显的错误时(至少相对与未能添加一个文件到版本控制这种操作),为了帮助你在需要添加属性的文件上添加属性,Subversion提供了一些简单但是有用的特性。" - -#. (para) -#: ../source/book.xml:4524 -msgid "Whenever you introduce a file to version control using the svn add or svn import 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 svn:executable property on newly added or imported files whose execute bit is enabled. (See 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 svn:mime-type property on that file to application/octet-stream (the generic this is a collection of bytes MIME type). Of course, if Subversion guesses incorrectly, or if you wish to set the svn:mime-type property to something more precise—perhaps image/png or application/x-shockwave-flash—you can always remove or edit that property. (For more on Subversion's use of MIME types, see .)" -msgstr "当你使用svn add或是svn import准备加入一个版本控制的文件时,Subversion会自动运行一个基本探测来检查文件是包含了可读还是不可读的内容,首先,在支持执行允许位的操作系统,Subversion会自动会为设置执行位的文件设置svn:executable属性(更多信息见)。第二,它会运行非常基础的启发式检查来检测文件是否可读,如果不是,Subversion会自动设置文件的svn:mime-type属性为application/octet-stream(原始的一组字节的MIME类型)。如果Subversion猜测错误,或者是你希望使用svn:mime-type属性更精确的设置—或许是image/png或者application/x-shockwave-flash—你可以一直删除或编辑那个属性(关于Subversion使用MIME类型的更多信息,见。)" - -#. (para) -#: ../source/book.xml:4544 -msgid "Subversion also provides, via its runtime configuration system (see ), 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 *.jpg—Subversion should automatically set the svn:mime-type property on those files to image/jpeg. Or perhaps any files that match *.cpp should have svn:eol-style set to native, and svn:keywords set to Id. Automatic property support is perhaps the handiest property-related tool in the Subversion toolbox. See for more about configuring that support." -msgstr "Subversion也通过运行配置系统(见)提供了自动属性特性,允许你创建文件名到属性名称与值影射,这个影射在你的运行配置区域设置,它们会影响添加和导入操作,而且不仅仅会覆盖Subversion所有缺省的MIME类型判断操作,也会设置额外的Subversion或者自定义的属性。举个例子,你会创建一个影射文件说在任何时候你添加了一个JPEG文件—一些符合*.jpg的文件—Subversion一定会自动设置它们的svn:mime-type属性为image/jpeg。或者是任何匹配*.cpp的文件,必须把svn:eol-style设置为native,并且svn:keywords设置为Id。自动属性支持是Subversion工具箱中属性相关最垂手可得的工具,见来查看更多的配置支持。" - -#. (title) -#: ../source/book.xml:4571 -msgid "File Portability" -msgstr "文件移植性" - -#. (para) -#: ../source/book.xml:4573 -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 svn on one platform, you know how to wield it everywhere." -msgstr "幸运的是,对于许多在不同操作系统下工作的用户,Subversion命令行程序的行为方式几乎完全一致,如果你知道在一个平台上如何运行svn,你也就学会了在其他平台上运行。" - -#. (para) -#: ../source/book.xml:4579 -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 text file 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." -msgstr "然而,这一点在本软件的其他几类地方或Subversion保持的实际文件并不一定都是正确的。例如,在一个Windows系统,文本文件的定义与Linux环境下的类似,但是也有区别—行结束的字符串并不相同。当然也有其他的区别,Unix平台支持(Subversion也支持)符号链;Windows不知吃,Unix使用文件系统执行位来检测可执行性;而Windows使用文件扩展名。" - -#. (para) -#: ../source/book.xml:4589 -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." -msgstr "因为Subversion不是要将世界上的所有此类事情统一起来,所以我们最好是尽可能让我们在多个计算机和操作系统上使用版本化文件和目录时能够更简单,本节描述了Subversion是如何做的。" - -#. (title) -#: ../source/book.xml:4598 -msgid "File Content Type" -msgstr "文件内容类型" - -#. (para) -#: ../source/book.xml:4600 -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 svn:mime-type file property determines some behavioral characteristics of Subversion itself." -msgstr "Subversion同很多应用一样利用多用途网际邮件扩展(MIME)内容类型,svn:mime-type属性为Subversion的许多目的服务,除了保存一个文件的MIME分类以外,这个svn:mime-type属性值也描述了一些Subversion自己使用的行为特性。" - -#. (title) -#: ../source/book.xml:4609 -msgid "Identifying File Types" -msgstr "识别文件类型" - -#. (para) -#: ../source/book.xml:4611 -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 .txt 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 .png, 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." -msgstr "大多数现代操作系统通过文件名的扩展名推断文件的类型和格式,例如,以.txt为后缀的文件通常被认为是可读的,不需要通过复杂的解码处理就可以被阅读。对于后缀名为.png文件,则被认为是Portable Network Graphics类型—不是可读的格式,只能通过识别PNG格式并且可以将信息转化为光栅的软件使用。" - -#. (para) -#: ../source/book.xml:4636 -msgid "You think that was rough? During that same era, WordPerfect also used .DOC for their proprietary file format's preferred extension!" -msgstr "你认为那样过于粗狂?在同一个时代里,WordPerfect也使用.DOC作为它们私有文件格式的扩展名!" - -#. (para) -#: ../source/book.xml:4624 -msgid "Unfortunately, some of those extensions have changed their meanings over time. When personal computers first appeared, a file named README.DOC would have almost certainly been a plaintext file, just like today's .txt 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 .DOC file. " -msgstr "不幸的是,一些扩展名已经随时间改变了意义。当个人电脑第一次出现时,一个叫做README.DOC的文件一定是一个纯文本文件了,就像现在的.txt文件。但是在九十年代中期,你可以打赌这个文件已经不是文本文件,而变成了微软的私有的、不可读的Word文档格式。但是这个变化不是一夜完成的—在一段时间里一定会有用户在看到一个.DOC时感到困惑。" - -#. (para) -#: ../source/book.xml:4640 -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." -msgstr "计算机网络的普及导致对于文件名和其关联内容的更多混淆,当信息存放在网络上并由服务器脚本动态生成时,会没有文件名。Web服务器,需要使用其他方式告诉浏览器它们所请求内容的信息,这样浏览器才能智能的根据信息作一些事情,或者是使用注册的程序显示数据,或者是提示用户将文件下载到某个地方。" - -#. (para) -#: ../source/book.xml:4651 -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 MIME types—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." -msgstr "最终,一个描述数据流内容的标准出现了。1996年,5个描述MIME的RFC中的第一个RFC2045发布了,这个RFC描述了媒体类型和子类型概念,并且提出了表示这些类型的推荐语法。现在,MIME媒体类型—MIME类型已经广泛应用在电邮应用,Web服务器和其他软件,成为了防止文件内容混淆的标准机制。" - -#. (para) -#: ../source/book.xml:4662 -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 line. So, for versioned files whose svn:mime-type property is set to a non-textual MIME type (generally, something that doesn't begin with text/, 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 .oldrev extension and contains the BASE revision of the file. The other file has a .newrev 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." -msgstr "举个例子,一个好处就是Subversion在更新时通常可以提供基于上下文的行为基础的合并,如果一个文件svn:mime-type属性设置为非文本的MIME类型(通常是那些不是text/开头的类型,但也有例外),Subversion会假定这个文件保存了二进制内容—也就是不可读的数据。一个好处就是Subversion通常在更新工作拷贝时提供了一个前后相关的以行为基础的修改合并,但是对于二进制数据文件,没有的概念,所以对这些文件,Subversion不会在更新时尝试执行合并操作,相反,任何时候你在本地已经修改的一个二进制文件有了更新,你的文件扩展名会修改为.orig,然后Subversion保存一个新的工作拷贝文件来保存更新时得到的修改,但原来的文件名已经不是你自己的本地修改。这个行为模式是用来保护用户在对不可文本合并的文件尝试执行文本的合并时失败的情形。" - -#. (para) -#: ../source/book.xml:4681 -msgid "Also, if the svn:mime-type property is set, then the Subversion Apache module will use its value to populate the Content-type: 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." -msgstr "另外,如果设置了svn:mime-type属性,Subversion的Apache模块会使用这个值来在HTTP头里输入Content-type:,这给了web浏览器如何显示版本库的一个文件提供了至关重要的线索。" - -#. (title) -#: ../source/book.xml:4691 -msgid "File Executability" -msgstr "文件的可执行性" - -#. (para) -#: ../source/book.xml:4693 -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 svn:executable 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." -msgstr "在多数操作系统,执行一个文件或命令的能力是由执行位管理的,这些位缺省是关闭的,必须由用户根据需要显式的指定,但是记住应该为哪些检出的文件设置可执行位会是一件很麻烦的事情,所以Subversion提供了svn:executable这个属性来保持打开执行位,在工作拷贝得到这些文件时设置执行位。" - -#. (para) -#: ../source/book.xml:4708 -msgid "The Windows filesystems use file extensions (such as .EXE, .BAT, and .COM) to denote executable files." -msgstr "Windows文件系统使用文件扩展名(如.EXE.BAT.COM)来标示可执行文件。" - -#. (para) -#: ../source/book.xml:4705 -msgid "This property has no effect on filesystems that have no concept of an executable permission bit, such as FAT32 and NTFS. Also, although it has no defined values, Subversion will force its value to * when setting this property. Finally, this property is valid only on files, not on directories." -msgstr "这个属性对于没有可执行权限位的文件系统无效,如FAT32和NTFS。 也就是说,尽管它没有定义的值,在设置这个属性时,Subversion会强制它的值为*,最后,这个属性只对文件有效,目录无效。" - -#. (title) -#: ../source/book.xml:4720 -msgid "End-of-Line Character Sequences" -msgstr "行结束字符串" - -#. (para) -#: ../source/book.xml:4722 -msgid "Unless otherwise noted using a versioned file's svn:mime-type 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." -msgstr "除非使用版本化文件的svn:mime-type属性注明,Subversion会假定这个文件保存了可读的数据,一般来讲,Subversion只使用这些信息来判断一个文件是否可以用上下文区别的报告,否则,对Subversion来说只是字节。" - -#. (para) -#: ../source/book.xml:4728 -msgid "This means that by default, Subversion doesn't pay any attention to the type of end-of-line (EOL) markers 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 (CR) followed by a line feed (LF). Unix software, however, just uses the LF character to denote the end of a line." -msgstr "这意味着缺省情况下,Subversion不会关注任何行结束标记(end-of-line,EOL),不幸的是不同的操作系统在文本文件使用不同的行结束标志,举个例子,Windows平台下的A编辑工具使用一对ASCII控制字符—回车(CR)和一个换行(LF),而Unix软件,只使用一个LF来表示一个行的结束。" - -#. (para) -#: ../source/book.xml:4739 -msgid "Not all of the various tools on these operating systems understand files that contain line endings in a format that differs from the native line ending style of the operating system on which they are running. So, typically, Unix programs treat the CR character present in Windows files as a regular character (usually rendered as ^M), and Windows programs combine all of the lines of a Unix file into one giant line because no carriage return-linefeed (or CRLF) character combination was found to denote the ends of the lines." -msgstr "并不是所有操作系统的工具准备好了理解与本地行结束样式不一样的行结束格式,一个常见的结果是Unix程序会把Windows文件中的CR当作一个不同的字符(通常表现为^M),而Windows程序会把Unix文件合并为一个非常大的行,因为没有发现标志行结束的回车加换行(或者是CRLF)字符。" - -#. (para) -#: ../source/book.xml:4751 -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." -msgstr "对外来EOL标志的敏感会让在多种操作系统分享文件的人们感到沮丧,例如,考虑有一个源代码文件,开发者会在Windows和Unix系统上编辑这个文件,如果所有的用户使用的工具可以展示文件的行结束,那就没有问题了。" - -#. (para) -#: ../source/book.xml:4758 -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 dos2unix or its companion, unix2dos) 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." -msgstr "但实践中,许多常用的工具不会正确的读取外来的EOL标志,或者只是在保存文件时将文件的行结束符转化为本地的样式,如果是前者,他需要一个外部的转化工具(如dos2unix,或是他的伴侣unix2dos)来准备需要编辑的文件。后一种情况不需要额外的准备工作,两种方法都会造成文件会与原来的文件在每一行上都不一样!在提交之前,用户有两个选择,或者选择用一个转化工具恢复文件的行结束样式,或者是简单的提交文件—包含新的EOL标志。" - -#. (para) -#: ../source/book.xml:4773 -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?" -msgstr "这个情景的结局看起来像是要浪费时间对提交的文件作不必要的修改,浪费时间是痛苦的,但是如果提交修改了文件的每一行,判断文件修改了哪一行会是一件复杂的工作,bug在哪一行修正的?哪一行导致了语法错误?" - -#. (para) -#: ../source/book.xml:4780 -msgid "The solution to this problem is the svn:eol-style 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:" -msgstr "这个问题的解决方案是svn:eol-style属性,当这个属性设置为一个正确的值时,Subversion使用它来判断针对行结束样式执行何种特殊的操作,而不会随着多种操作系统的每次提交而发生剧烈变化,正确的值有:" - -#. (literal) -#: ../source/book.xml:4790 -msgid "native" -msgstr "native" - -#. (para) -#: ../source/book.xml:4793 -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 svn:eol-style property set to native, that file will contain CRLF EOL markers. A Unix user checking out a working copy which contains the same file will see LF EOL markers in his copy of the file." -msgstr "这会导致保存EOL标志的文件使用Subversion运行的操作系统的本地编码,换句话说,如果一个Windows用户取出一个工作拷贝包含的文件设置native的属性为svn:eol-style,这个文件会使用CRLF的EOL标志,一个Unix用户取出相同的文件会看到他的文件使用LF的EOL标志。" - -#. (para) -#: ../source/book.xml:4804 -msgid "Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though." -msgstr "注意Subversion实际上使用LF的EOL标志,而不会考略操作系统,尽管这对用户来说是透明的。" - -#. (literal) -#: ../source/book.xml:4813 -msgid "CRLF" -msgstr "CRLF" - -#. (para) -#: ../source/book.xml:4816 -msgid "This causes the file to contain CRLF sequences for EOL markers, regardless of the operating system in use." -msgstr "这会导致这个文件使用CRLF序列作为EOL标志,不管使用何种操作系统。" - -#. (literal) -#: ../source/book.xml:4823 -msgid "LF" -msgstr "LF" - -#. (para) -#: ../source/book.xml:4826 -msgid "This causes the file to contain LF characters for EOL markers, regardless of the operating system in use." -msgstr "这会导致文件使用LF字符作为EOL标志,不管使用何种操作系统。" - -#. (literal) -#: ../source/book.xml:4833 -msgid "CR" -msgstr "CR" - -#. (para) -#: ../source/book.xml:4836 -msgid "This causes the file to contain CR 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)." -msgstr "这会导致文件使用CR字符作为EOL标志,不管使用何种操作系统。这种行结束样式不是很常见,它用在一些老的苹果机(Subversion不会运行的机器上)上。" - -#. (title) -#: ../source/book.xml:4852 -msgid "Ignoring Unversioned Items" -msgstr "忽略未版本控制的条目" - -#. (para) -#: ../source/book.xml:4854 -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." -msgstr "在任何工作拷贝,将版本化文件和目录与没有也不准备版本化的文件分开会是非常常见的情况。文本编辑器的备份文件会将目录搞乱,代码编译过程中生成的中间文件,甚至最终文件也不是你希望版本化的,用户在见到这些文件和目录(经常是版本控制工作拷贝中)的任何时候都会将他们删除。" - -#. (para) -#: ../source/book.xml:4863 -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 feature 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 svn add and svn import 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 svn status 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." -msgstr "期望让Subversion的工作拷贝摆脱混乱保持干净是可笑的,实际上Subversion将工作拷贝是普通目录作为它的一项特性。但是这些没有版本化的文件和目录会给Subversion用户带来一些烦恼,例如,因为svn addsvn import命令都是会递归执行的,并不知道哪些文件你不希望版本化,很容易意外的添加一些文件。因为svn status会报告工作拷贝中包括未版本化文件和目录的信息,如果这种文件很多,它的输出会变得非常嘈杂。" - -#. (para) -#: ../source/book.xml:4878 -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 ), 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." -msgstr "所以Subversion提供了两种方法让你指明哪些文件可以被漠视,一种方法需要你修改Subversion的运行配置系统(见),这样会使所有的Subversion操作都利用这个配置,通常来说,这是在某一个计算机上的操作,或者是某个计算机某个用户的操作。另一种方法利用了Subversion目录属性支持,与版本化的目录树紧密结合,因而会影响所有拥有这个目录树工作拷贝的人。两种机制都使用文件模式。" - -#. (para) -#: ../source/book.xml:4889 -msgid "The Subversion runtime configuration system provides an option, global-ignores, whose value is a whitespace-delimited collection of file patterns (also known as globs). 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 svn status 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' *~ and .*~ files." -msgstr "Subversion运行配置系统提供一个global-ignores选项,其中的值是空格分开的文件名模式(或glob)。这些模式会应用到可以添加到版本控制的候选者,也就是svn status显示出来的未版本化文件。如果文件名与其中的某个模式匹配,Subversion会当这个文件不存在。这个文件模式最好是全局不期望版本化的模式,例如编辑器Emacs的备份文件*~.*~。" - -#. (para) -#: ../source/book.xml:4902 -msgid "When found on a versioned directory, the svn:ignore 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 global-ignores runtime configuration option, but are instead appended to that list. And it's worth noting again that, unlike the global-ignores option, the patterns found in the svn:ignore property apply only to the directory on which that property is set, and not to any of its subdirectories. The svn:ignore 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." -msgstr "如果是在版本化目录上发现svn:ignore属性,其内容是一列以行分割的文件模式,Subversion用来判断在这个目录下对象是否被忽略。这些模式不会覆盖在运行配置设置的全局忽略,而是向其添加忽略模式。不像全局忽略选项,在svn:ignore属性中设置的值只会应用到其设置的目录,而不会应用到其子目录。svn:ignore属性是告诉Subversion在每个用户的工作拷贝对应目录忽略相同的文件的好方法,例如编译输出或—使用一个本书相关的例子—本书从DocBook XML文件生成的HTML、PDF或PostScript。" - -#. (para) -#: ../source/book.xml:4921 -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 always notices all of its versioned objects." -msgstr "Subversion对于忽略文件模式的支持仅限于将未版本化文件和目录添加到版本控制时,如果一个文件已经在Subversion控制下,忽略模式机制不会再有效果,不要期望Subversion会阻止你提交一个符合忽略条件的修改—Subversion一直认为它是版本化的对象。" - -#. (title) -#: ../source/book.xml:4933 -msgid "Ignore Patterns for CVS Users" -msgstr "CVS 用户的忽略模式" - -#. (para) -#: ../source/book.xml:4935 -msgid "The Subversion svn:ignore property is very similar in syntax and function to the CVS .cvsignore file. In fact, if you are migrating a CVS working copy to Subversion, you can directly migrate the ignore patterns by using the .cvsignore file as input file to the svn propset command:" -msgstr "Subversion的svn:ignore属性与CVS的.cvsignore文件的语法和功能非常类似,实际上,如果你移植一个CVS的工作拷贝到Subversion,你可以直接使用.cvsignore作为svn propset输入文件参数:" - -#. (screen) -#: ../source/book.xml:4942 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:ignore -F .cvsignore .\n" -"property 'svn:ignore' set on '.'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset svn:ignore -F .cvsignore .\n" -"property 'svn:ignore' set on '.'\n" -"$\n" - -#. (para) -#: ../source/book.xml:4947 -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 ! pattern as a reset back to having no ignore patterns at all." -msgstr "但是CVS和Subversion处理忽略模式的方式有一些不同,这两个系统在不同的时候使用忽略模式,忽略模式应用的对象也由微小的不同,另外Subversion不可以使用!模式来去取消忽略模式。" - -#. (para) -#: ../source/book.xml:4955 -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 svn:ignore property and its uses." -msgstr "全局忽略模式只是一种个人喜好,可能更接近于用户的特定工具链,而不是特定工作拷贝的需要,所以余下的小节将关注svn:ignore属性和它的使用。" - -#. (para) -#: ../source/book.xml:4961 -msgid "Say you have the following output from svn status:" -msgstr "假定你的svn status有如下输出:" - -#. (screen) -#: ../source/book.xml:4963 -#, no-wrap -msgid "" -"\n" -"$ svn status calc\n" -" M calc/button.c\n" -"? calc/calculator\n" -"? calc/data.c\n" -"? calc/debug_log\n" -"? calc/debug_log.1\n" -"? calc/debug_log.2.gz\n" -"? calc/debug_log.3.gz\n" -msgstr "" -"\n" -"$ svn status calc\n" -" M calc/button.c\n" -"? calc/calculator\n" -"? calc/data.c\n" -"? calc/debug_log\n" -"? calc/debug_log.1\n" -"? calc/debug_log.2.gz\n" -"? calc/debug_log.3.gz\n" - -#. (para) -#: ../source/book.xml:4981 -msgid "Isn't that the whole point of a build system?" -msgstr "这不是编译系统的基本功能吗?" - -#. (para) -#: ../source/book.xml:4973 -msgid "In this example, you have made some property modifications to button.c, but in your working copy you also have some unversioned files: the latest calculator program that you've compiled from your source code, a source file named data.c, and a set of debugging output log files. Now, you know that your build system always results in the calculator program being generated. 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 svn status, and pretty sure that nobody else is interested in them either. So you use svn propedit svn:ignore calc to add some ignore patterns to the calc directory. For example, you might add this as the new value of the svn:ignore property:" -msgstr "在这个例子里,你对button.c文件作了一些属性修改,但是你的工作拷贝也有一些未版本化的文件:你从源代码编译的最新计算器程序,一系列调试输出日志文件,现在你知道你的编译系统一直会编译生成计算器程序。 而且你知道你的测试组件总是会留下这些调试日志,这对所有的工作拷贝都是一样的,不仅仅是你的。你也知道你不会有兴趣在svn status命令中显示这些信息,所以使用svn propedit svn:ignore calc来为calc目录增加一些忽略模式,举个例子,你或许会添加如下的值作为svn:ignore的属性:" - -#. (programlisting) -#: ../source/book.xml:4992 -#, no-wrap -msgid "" -"\n" -"calculator\n" -"debug_log*\n" -msgstr "" -"\n" -"calculator\n" -"debug_log*\n" - -#. (para) -#: ../source/book.xml:4996 -msgid "After you've added this property, you will now have a local property modification on the calc directory. But notice what else is different about your svn status output:" -msgstr "当你添加完这些属性,你会在calc目录有一个本地修改,但是注意你的svn status输出有什么其他的不同:" - -#. (screen) -#: ../source/book.xml:5000 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -" M calc\n" -" M calc/button.c\n" -"? calc/data.c\n" -msgstr "" -"\n" -"$ svn status\n" -" M calc\n" -" M calc/button.c\n" -"? calc/data.c\n" - -#. (para) -#: ../source/book.xml:5006 -msgid "Now, all that cruft is missing from the output! Of course, your calculator 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 data.c that you probably forgot to add to version control." -msgstr "现在,所有多余的输出不见了!当然,你的计算器程序和所有的日志文件还在工作拷贝中,Subversion仅仅是不再提醒你它们的存在和未版本化。现在所有讨厌的噪音都已经不再显示,只留下了你感兴趣的条目—如你忘记添加到版本控制的源代码文件data.c。" - -#. (para) -#: ../source/book.xml:5014 -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 to Subversion:" -msgstr "当然,不仅仅只有这种简略的工作拷贝状态输出,如果想查看被忽略的文件,可以使用Subversion的选项:" - -#. (screen) -#: ../source/book.xml:5018 -#, no-wrap -msgid "" -"\n" -"$ svn status --no-ignore\n" -" M calc\n" -" M calc/button.c\n" -"I calc/calculator\n" -"? calc/data.c\n" -"I calc/debug_log\n" -"I calc/debug_log.1\n" -"I calc/debug_log.2.gz\n" -"I calc/debug_log.3.gz\n" -msgstr "" -"\n" -"$ svn status --no-ignore\n" -" M calc\n" -" M calc/button.c\n" -"I calc/calculator\n" -"? calc/data.c\n" -"I calc/debug_log\n" -"I calc/debug_log.1\n" -"I calc/debug_log.2.gz\n" -"I calc/debug_log.3.gz\n" - -#. (para) -#: ../source/book.xml:5029 -msgid "As mentioned earlier, the list of file patterns to ignore is also used by svn add and svn import. 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 to tell Subversion ignore its ignores list and operate on all the files and directories present." -msgstr "我们在前面提到过,svn addsvn import也会使用这个忽略模式列表,这两个操作都包括了询问Subversion来开始管理一组文件和目录。比强制用户挑拣目录树中那个文件要纳入版本控制的方式更好,Subversion使用忽略模式来检测那个文件不应该在大的迭代添加和导入操作中进入版本控制系统。再次说明,操作Subversion文件和目录时你可以使用选项忽略这个忽略列表。" - -#. (title) -#: ../source/book.xml:5048 -msgid "Keyword Substitution" -msgstr "关键字替换" - -#. (para) -#: ../source/book.xml:5050 -msgid "Subversion has the ability to substitute keywords—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 after 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." -msgstr "Subversion具备添加关键字的能力—一些有用的,关于版本化的文件动态信息的片断—不必直接添加到文件本身。关键字通常会用来描述文件最后一次修改的一些信息,因为这些信息每次都有改变,更重要的一点,这是在文件修改之后,除了版本控制系统,对于任何企图保持数据最新的过程都是一场混乱,作为人类作者,信息变得陈旧是不可避免的。" - -#. (para) -#: ../source/book.xml:5061 -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 LastChangedDate keyword. You control where the keyword is inserted into your document by placing a keyword anchor at the desired location in the file. This anchor is just a string of text formatted as $KeywordName$." -msgstr "举个例子,你有一个文档希望显示最后修改的日期,你需要麻烦每个作者提交之前做这件事情,也要修改文档的一部分来描述何时作的修改,但是迟早会有人忘记做这件事,不选择简单的告诉Subversion来执行替换LastChangedDate关键字的操作,你通过在目标位置放置一个keyword anchor来控制关键字插入的位置,这个anchor只是一个格式为$KeywordName$字符串。" - -#. (para) -#: ../source/book.xml:5074 -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 svn:keywords property to be case-sensitive too—certain keyword names will be recognized regardless of case, but this behavior is deprecated." -msgstr "所有作为anchor出现在文件里的关键字是大小写敏感的:为了关键字的扩展,你必须使用正确的大写,你必须考虑svn:keywords的属性值也是大小写敏感—特定的关键字名会忽略大小写,但是这个特性已经被废弃了。" - -#. (para) -#: ../source/book.xml:5080 -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:" -msgstr "Subversion定义了用来替换的关键字列表,这个列表保存了如下五个关键字,有一些也包括了可用的别名:" - -#. (literal) -#: ../source/book.xml:5086 -msgid "Date" -msgstr "Date" - -#. (para) -#: ../source/book.xml:5089 -msgid "This keyword describes the last time the file was known to have been changed in the repository, and is of the form $Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $. It may also be specified as LastChangedDate." -msgstr "这个关键字保存了文件最后一次在版本库修改的日期,看起来类似于$Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $,它也可以用LastChangedDate来指定。" - -#. (literal), (para) -#: ../source/book.xml:5099 ../source/book.xml:18944 -msgid "Revision" -msgstr "Revision" - -#. (para) -#: ../source/book.xml:5102 -msgid "This keyword describes the last known revision in which this file changed in the repository, and looks something like $Revision: 144 $. It may also be specified as LastChangedRevision or Rev." -msgstr "这个关键字描述了这个文件最后一次修改的修订版本,看起来像$Revision: 144 $,也可以通过LastChangedRevision或者Rev引用。" - -#. (literal) -#: ../source/book.xml:5112 -msgid "Author" -msgstr "Author" - -#. (para) -#: ../source/book.xml:5115 -msgid "This keyword describes the last known user to change this file in the repository, and looks something like $Author: harry $. It may also be specified as LastChangedBy." -msgstr "这个关键字描述了最后一个修改这个文件的用户,看起来类似$Author: harry $,也可以用LastChangedBy来指定。" - -#. (literal) -#: ../source/book.xml:5124 -msgid "HeadURL" -msgstr "HeadURL" - -#. (para) -#: ../source/book.xml:5127 -msgid "This keyword describes the full URL to the latest version of the file in the repository, and looks something like $HeadURL: http://svn.collab.net/repos/trunk/README $. It may be abbreviated as URL." -msgstr "这个关键字描述了这个文件在版本库最新版本的完全URL,看起来类似$HeadURL: http://svn.collab.net/repos/trunk/README $,可以缩写为URL。" - -#. (literal) -#: ../source/book.xml:5137 -msgid "Id" -msgstr "Id" - -#. (para) -#: ../source/book.xml:5140 -msgid "This keyword is a compressed combination of the other keywords. Its substitution looks something like $Id: calc.c 148 2006-07-28 21:30:43Z sally $, and is interpreted to mean that the file calc.c was last changed in revision 148 on the evening of July 28, 2006 by the user sally." -msgstr "这个关键字是其他关键字一个压缩组合,它看起来就像$Id: calc.c 148 2006-07-28 21:30:43Z sally $,可以解释为文件calc.c上一次修改的修订版本号是148,时间是2006年7月28日,作者是sally。" - -#. (para) -#: ../source/book.xml:5150 -msgid "Several of the previous descriptions use the phrase last known or similar wording. Keep in mind that keyword expansion is a client-side operation, and your client only knows 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." -msgstr "前面的一些描述使用了类似最后已知的短语,请记住关键字扩展是客户端操作,你的客户端只知道在你更新工作拷贝时版本库发生的修改,如果你从不更新工作拷贝,即使文件在版本库里有规律的修改,这些关键字也不会扩展为不同的值。" - -#. (para) -#: ../source/book.xml:5164 -msgid "… or maybe even a section of a book …" -msgstr "… 或者可能是一本书的一个小节 …" - -#. (para) -#: ../source/book.xml:5159 -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 about how to use keywords, and you don't want Subversion to substitute your beautiful examples of un-substituted keyword anchors!" -msgstr "只在你的文件增加关键字anchor不会做什么特别的事情,Subversion不会尝试对你的文件内容执行文本替换,除非明确的被告知这样做,毕竟,你可以撰写一个关于如何使用关键字的文档,你不希望Subversion会替换你漂亮的关于不需要替换的关键字anchor实例!" - -#. (para) -#: ../source/book.xml:5168 -msgid "To tell Subversion whether or not to substitute keywords on a particular file, we again turn to the property-related subcommands. The svn:keywords 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." -msgstr "为了告诉Subversion是否替代某个文件的关键字,我们要再次求助于属性相关的子命令,当svn:keywords属性设置到一个版本化的文件,这些属性控制了哪些关键字将会替换到这个文件,这个属性的值是空格分隔的前面列表的名称或是别名列表。" - -#. (para) -#: ../source/book.xml:5175 -msgid "For example, say you have a versioned file named weather.txt that looks like this:" -msgstr "举个例子,假定你有一个版本化的文件weather.txt,内容如下:" - -#. (programlisting) -#: ../source/book.xml:5178 -#, no-wrap -msgid "" -"\n" -"Here is the latest report from the front lines.\n" -"$LastChangedDate$\n" -"$Rev$\n" -"Cumulus clouds are appearing more frequently as summer approaches.\n" -msgstr "" -"\n" -"Here is the latest report from the front lines.\n" -"$LastChangedDate$\n" -"$Rev$\n" -"Cumulus clouds are appearing more frequently as summer approaches.\n" - -#. (para) -#: ../source/book.xml:5184 -msgid "With no svn:keywords property set on that file, Subversion will do nothing special. Now, let's enable substitution of the LastChangedDate keyword." -msgstr "当没有svn:keywords属性设置到这个文件,Subversion不会有任何特别操作,现在让我们允许LastChangedDate关键字的替换。" - -#. (screen) -#: ../source/book.xml:5188 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:keywords \"Date Author\" weather.txt\n" -"property 'svn:keywords' set on 'weather.txt'\n" -"$\n" -msgstr "" -"\n" -"$ svn propset svn:keywords \"Date Author\" weather.txt\n" -"property 'svn:keywords' set on 'weather.txt'\n" -"$\n" - -#. (para) -#: ../source/book.xml:5193 -msgid "Now you have made a local property modification on the weather.txt 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 Rev 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 svn:keywords property value." -msgstr "现在你已经对weather.txt的属性作了修改,你会看到文件的内容没有改变(除非你之前做了一些属性设置),注意这个文件包含了Rev的关键字anchor,但我们没有在属性值中包括这个关键字,Subversion会高兴的忽略替换这个文件中的关键字,也不会替换svn:keywords属性中没有出现的关键字。" - -#. (para) -#: ../source/book.xml:5203 -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 $LastChangedDate$, you'll see its substituted result. That result also contains the name of the keyword, and continues to be bounded by the dollar sign ($) characters. And as we predicted, the Rev keyword was not substituted because we didn't ask for it to be." -msgstr "在你提交了属性修改后,Subversion会立刻更新你的工作文件为新的替代文本,你将无法找到$LastChangedDate$的关键字anchor,你会看到替换的结果,这个结果也保存了关键字的名字,与美元符号($)绑定在一起,而且我们预测的,Rev关键字不会被替换,因为我们没有要求这样做。" - -#. (para) -#: ../source/book.xml:5212 -msgid "Note also that we set the svn:keywords property to Date Author yet the keyword anchor used the alias $LastChangedDate$ and still expanded correctly." -msgstr "注意我们设置svn:keywords属性为Date Author,关键字anchor使用别名$LastChangedDate$并且正确的扩展。" - -#. (screen) -#: ../source/book.xml:5216 -#, no-wrap -msgid "" -"\n" -"Here is the latest report from the front lines.\n" -"$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $\n" -"$Rev$\n" -"Cumulus clouds are appearing more frequently as summer approaches.\n" -msgstr "" -"\n" -"Here is the latest report from the front lines.\n" -"$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $\n" -"$Rev$\n" -"Cumulus clouds are appearing more frequently as summer approaches.\n" - -#. (para) -#: ../source/book.xml:5222 -msgid "If someone else now commits a change to weather.txt, 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 weather.txt file will be re-substituted with information that reflects the most recent known commit to that file." -msgstr "如果有其他人提交了weather.txt的修改,你的此文件的拷贝还会显示同样的替换关键字值—直到你更新你的工作拷贝,此时你的weather.txt重的关键字将会被替换来反映最新的提交信息。" - -#. (title) -#: ../source/book.xml:5231 -msgid "Where's $GlobalRev$?" -msgstr "$GlobalRev$? 在哪里?" - -#. (para) -#: ../source/book.xml:5233 -msgid "New users are often confused by how the $Rev$ 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 $Rev$ keyword's value. But $Rev$ expands to show the last revision in which the file changed, 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?" -msgstr "新用户经常为如何使用$Rev$关键字迷惑,自从版本库有了单独的全局增长的修订版本号码,许多人以为$Rev$关键字是反映修订版本号码的,但实际上$Rev$是文件最后修改的修订版本,而不是最后更新的。理解这一点,会减少一些混淆,但是还有一些挫折—如果没有Subversion关键字的支持,你怎么才能在你的文件自动得到全局修订版本号到。" - -#. (para) -#: ../source/book.xml:5245 -msgid "To do this, you need external processing. Subversion ships with a tool called svnversion which was designed for just this purpose. svnversion 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 svnversion, see ." -msgstr "为此你需要外置处理,Subversion中有一个工具svnversion就是为此设计。svnversion遍历你的工作拷贝,然后输出它发现的修订版本,你可以使用这个程序,外加一些工具,将修订版本信息嵌入到你的文件。关于svnversion的更多信息,见。" - -#. (para) -#: ../source/book.xml:5254 -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 (::) 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 (#) character just before the final dollar sign terminator." -msgstr "Subversion 1.2引入了另一种关键字的语法,提供了额外和有用的,尽管是非典型的功能。你现在可以告诉Subversion为替代的关键字维护一个固定长度(从消耗字节的观点),通过在关键字名后使用双冒号(::),然后紧跟一组空格,你就定义了固定宽度。当Subversion使用替代值代替你的关键字,只会替换这些空白字符,保持关键字字段长度保持不变,如果替代值比定义的字段短,会有替代字段后保留空格;如果替代值太长,就会在最后的美元符号终止符前用井号(#)截断。" - -#. (para) -#: ../source/book.xml:5270 -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:" -msgstr "例如,你有一篇文档,其中一段是一些反映Subversion关键字的表格数据,使用原始的Subversion关键字替换语法,你的文件或许像这样:" - -#. (screen) -#: ../source/book.xml:5275 -#, no-wrap -msgid "" -"\n" -"$Rev$: Revision of last commit\n" -"$Author$: Author of last commit\n" -"$Date$: Date of last commit\n" -msgstr "" -"\n" -"$Rev$: Revision of last commit\n" -"$Author$: Author of last commit\n" -"$Date$: Date of last commit\n" - -#. (para) -#: ../source/book.xml:5280 -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:" -msgstr "现在,表格看起来佷漂亮,但是当你提交文件(当然,关键字替换功能已打开),你会看到:" - -#. (screen) -#: ../source/book.xml:5283 -#, no-wrap -msgid "" -"\n" -"$Rev: 12 $: Revision of last commit\n" -"$Author: harry $: Author of last commit\n" -"$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $: Date of last commit\n" -msgstr "" -"\n" -"$Rev: 12 $: Revision of last commit\n" -"$Author: harry $: Author of last commit\n" -"$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $: Date of last commit\n" - -#. (para) -#: ../source/book.xml:5288 -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:" -msgstr "结果并不漂亮,你可能会尝试重新调整文件使之更像一个列表。只有关键字的长度是相同的时候才能保证保持样式,如果进入另一个修订版本(如从99到100),或者是另一个有较长用户名的人提交了文件,表格又会变形。然而,如果你使用Subversion 1.2,你可以使用新的固定长度的关键字语法,定义合适的字段宽度,然后你的文件可能如此:" - -#. (screen) -#: ../source/book.xml:5298 -#, no-wrap -msgid "" -"\n" -"$Rev:: $: Revision of last commit\n" -"$Author:: $: Author of last commit\n" -"$Date:: $: Date of last commit\n" -msgstr "" -"\n" -"$Rev:: $: Revision of last commit\n" -"$Author:: $: Author of last commit\n" -"$Date:: $: Date of last commit\n" - -#. (para) -#: ../source/book.xml:5303 -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 Rev and Author are padded with spaces, and the long Date field is truncated by a hash character:" -msgstr "你提交这个文件的修改,这一次Subversion注意到了新的固定长度的关键字语法,根据你在双冒号之间指定的空格长度调整格式,并且紧跟一个美元符号。经过替换,字段的长度没有发生变化—RevAuthor多了一些空格,而较长的Date字段被一个分号截断:" - -#. (screen) -#: ../source/book.xml:5312 -#, no-wrap -msgid "" -"\n" -"$Rev:: 13 $: Revision of last commit\n" -"$Author:: harry $: Author of last commit\n" -"$Date:: 2006-03-15 0#$: Date of last commit\n" -msgstr "" -"\n" -"$Rev:: 13 $: Revision of last commit\n" -"$Author:: harry $: Author of last commit\n" -"$Date:: 2006-03-15 0#$: Date of last commit\n" - -#. (para) -#: ../source/book.xml:5317 -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)." -msgstr "固定长度关键字在执行复杂文件格式的替换中非常易用,也可以处理那些很难通过其他程序(例如Microsoft Office文档)进行修改的文件。" - -#. (para) -#: ../source/book.xml:5324 -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." -msgstr "需要意识到,因为关键字字段的长度是以字节为单位,可能会破坏多字节值,例如一个用户名包含多字节的UTF-8字符,可能会遭遇从某个字符中间截断的情况,从字节角度看仅仅是一种截断,但是从UTF-8字符串角度看可能是错误和曲解的,当载入文件时,破坏的UTF-8文本可能导致整个文件的破坏,整个文件无法操作。所以,当限制关键字为固定大小时,需要选择一个可以扩展的大小。" - -#. (title) -#: ../source/book.xml:5346 -msgid "Locking" -msgstr "锁定" - -#. (para) -#: ../source/book.xml:5348 -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 ), 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." -msgstr "Subversion的拷贝-修改-合并版本控制模型的关键是其合并算法,也就是如何处理多个用户修改同时修改一个文件产生冲突时的算法。Subversion本身只提供了一个这样的算法,其三方区别算法可以足够聪明的的行粒度的数据处理,Subversion也支持使用外置比较工具(中有描述),有一些可以做得非常好,或许可以提供以单词或字母粒度的算法。但是,这些工具的共同点是基于文本的,当你讨论非文本文件格式时,这看起来有一点残酷。如果你无法找到一个工具支持这种类型的合并,你的拷贝-修改-合并模型就会遇到麻烦。" - -#. (para) -#: ../source/book.xml:5365 -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." -msgstr "让我们看一个使用这个模型的真实例子,Harry和Sally是同一个项目的图形设计师,汽车技工的间接营销。海报的设计一个小车,需要一些主要部分的工作,使用PNG文件格式。海报的布局几乎完成,Harry和Sally都看上了一个从损坏小车得到的特别照片—一个1967的淡蓝色的Ford Mustang,挡泥板有一些溅迹。" - -#. (para) -#: ../source/book.xml:5375 -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 HEAD, 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 HEAD, 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." -msgstr "现在,作为图像设计的惯例,计划的改变导致车的颜色很重要,所以Sally将工作拷贝更新到HEAD,启动图形编辑软件,修改图像将车的颜色修改为樱桃红,同时Harry那一天特别有灵感,所以决定如果这个车受到更大的撞击可能会有更好的效果。他也更新到HEAD,然后在车挡风玻璃上制作了一些裂痕,他设法在Sally完成前结束修改,因为受到自己不可阻挡天赋的鼓舞,提交了图像。没过多久,Sally结束了她的工作,尝试提交。但是如我们所料,Subversion提交失败,告诉Sally她的图像已经过期了。" - -#. (para) -#: ../source/book.xml:5390 -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!" -msgstr "这里就是麻烦的地方,如果Harry和Sally修改的是文本文件,她只需要简单得更新工作拷贝,接收Harry的修改。在最坏的情况下,他们会修改文件的同一部分,Sally需要人工解决冲突。但是现在不是文本文件—而是二进制图像,没法估计合并的结果会是什么样子的,已存的软件不可能从基线图像分离出Harry和Sally的工作,并组合出一个挡风玻璃坏掉0的红色Mustang。" - -#. (para) -#: ../source/book.xml:5411 -#, fuzzy -msgid "Communication wouldn't have been such bad medicine for Harry and Sally's Hollywood namesakes, either, for that matter." -msgstr "交流不是这样坏的。。。。" - -#. (para) -#: ../source/book.xml:5404 -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 , most of these types of problems go away entirely where perfect communication between Harry and Sally exists. 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 locking feature, which is similar to the reserved checkouts mechanisms of other version control systems." -msgstr "很显然,如果能够将Harry和Sally的工作串行话事情会变得平滑,也就是说Harry可以等到Sally的红车然后再画上破坏的挡风玻璃,或者Sally在破坏之后改变颜色。就像在讨论的,如果Harry和Sally之间有完美的交流,就不会有这种问题发生。但是作为一种版本控制系统,实际上是一种交流的形式,使得软件遵循非并行编辑的串行化也不是一件坏事,这里Subversion实现了锁定-修改-解锁模型,这里我们要讨论Subversion的锁定特性,与其他版本控制系统的保留检出机制类似。" - -#. (para) -#: ../source/book.xml:5423 -msgid "Subversion's locking feature serves two main purposes:" -msgstr "Subversion 的锁定特性为两个主要目的服务:" - -#. (para) -#: ../source/book.xml:5427 -msgid "Serializing access to a versioned object. 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." -msgstr "顺序访问资源。允许用户得到一个排他的修改文件权,这个用户可以确定不可合并的修改不会被浪费—他对这个修改的提交会成功。" - -#. (para) -#: ../source/book.xml:5435 -msgid "Aiding communication. 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." -msgstr "辅助交流。通过要求用户对某个版本化对象串行工作,用户可以知道对象正在被别人修改,这样可以防止浪费精力和时间去修改一个不可合并和提交的对象。" - -#. (para) -#: ../source/book.xml:5447 -msgid "Subversion does not currently allow locks on directories." -msgstr "Subversion目前不允许锁定目录。" - -#. (para) -#: ../source/book.xml:5444 -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 (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." -msgstr "当我们引用Subversion锁定特性时,这是在讨论一个处理版本化文件的行为特性(声明对一个文件排他性修改特权),包括对文件的锁定和解锁(释放排他性修改权限),察看包括文件被谁锁定的报告,以及提醒企图修改锁定文件的用户。在本小节,我们会覆盖锁定特性的大部分内容。" - -#. (title) -#: ../source/book.xml:5456 -msgid "The three meanings of lock" -msgstr "锁定的三种含义" - -#. (para) -#: ../source/book.xml:5458 -msgid "In this section, and almost everywhere in this book, the words lock and locking describe a mechanism for mutual exclusion between users to avoid clashing commits. Unfortunately, there are two other sorts of lock with which Subversion, and therefore this book, sometimes needs to be concerned." -msgstr "在本小节,和几乎本书的每一个地方locklocking描述了一种避免用户之间冲突提交的排他机制,但是佷不幸,Subversion中还有另外两种锁,因此需要在本书格外关心。" - -#. (para) -#: ../source/book.xml:5464 -msgid "The first is working copy locks, 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 L in the third column of svn status output, and removed by the svn cleanup command, as described in ." -msgstr "第一种是工作拷贝锁,Subversion内部用来防止不同客户端同时操作同一份工作拷贝的锁,这种锁使用svn status输出中第三列出现的L表示,可以使用svn cleanup删除,有介绍。" - -#. (para) -#: ../source/book.xml:5471 -msgid "Secondly, there are database locks, 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 wedged, as described in ." -msgstr "第二种,数据库锁,在Berkeley DB后端内部使用,防止多个程序访问数据库发生冲突,一个导致版本库楔住的错误发生后产生,有描述。" - -#. (para) -#: ../source/book.xml:5477 -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, lock means the first sort unless the contrary is either clear from context or explicitly stated." -msgstr "在发生问题之前你完全可以忘记上面两种锁,在本书,锁定意味着第一种锁,除非是在从上下文中十分明确或明确指出的。" - -#. (title) -#: ../source/book.xml:5486 -msgid "Creating locks" -msgstr "创建锁定" - -#. (para) -#: ../source/book.xml:5488 -msgid "In the Subversion repository, a lock is a piece of metadata which grants exclusive access to one user to change a file. This user is said to be the lock owner. Each lock also has a unique identifier, typically a long string of characters, known as the lock token. 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." -msgstr "在Subversion的版本库,一个是一份元数据,可以排它赋予某个用户修改权,这个用户被称作锁的拥有者。每个锁都有一个唯一标识,通常是一长串字符,叫做锁令牌。版本库管理锁,控制着锁的创建,权限控制和删除。如果提交包含了修改或者删除锁" - -#. (para) -#: ../source/book.xml:5503 -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 svn lock command." -msgstr "为了描述锁的产生,我们回到前面那个关于多个图形设计师共同工作的例子,Harry决定修改一个JPEG图像,为了防止其他用户此时提交这个文件的修改(也是警告别人他正在修改它),他使用svn lock命令锁定了版本库中的这个文件:" - -#. (screen) -#: ../source/book.xml:5510 -#, no-wrap -msgid "" -"\n" -"$ svn lock banana.jpg -m \"Editing file for tomorrow's release.\"\n" -"'banana.jpg' locked by user 'harry'.\n" -"$\n" -msgstr "" -"\n" -"$ svn lock banana.jpg -m \"Editing file for tomorrow's release.\"\n" -"'banana.jpg' locked by user 'harry'.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5515 -msgid "There are a number of new things demonstrated in the previous example. First, notice that Harry passed the option to svn lock. Similar to svn commit, the svn lock command can take comments (either via or ) to describe the reason for locking the file. Unlike svn commit, however, svn lock will not demand a message by launching your preferred text editor. Lock comments are optional, but still recommended to aid communication." -msgstr "前一个例子描述了许多新事物,第一,注意Harry在svn lock中使用了选项,类似于svn commitsvn lock命令可以有描述锁定原因的注释(通过)。然而不像svn commitsvn lock不会自动强制启动你喜欢的编辑器,锁定注释是可选的,但是为了方便交流我们还是推荐使用。" - -#. (para) -#: ../source/book.xml:5526 -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 svn update and reattempt the locking command. The locking command would also have failed if the file already been locked by someone else." -msgstr "第二,锁定成功了,这意味着文件没有被别人锁定,Harry的文件是最新的版本。如果Harry的工作拷贝文件不是最新的,版本库会拒绝请求,强制Harry执行svn update并重新运行锁定命令,同样,如果此文件已经被别的用户锁定了,锁定命令也会失败。" - -#. (para) -#: ../source/book.xml:5534 -msgid "As you can see, the svn lock command prints confirmation of the successful lock. At this point, the fact that the file is locked becomes apparent in the output of the svn status and svn info reporting subcommands." -msgstr "就像你看到的,svn lock打印了锁定成功的确认信息。此时,通过svn statussvn info的输出我们可以看到文件已经锁定。" - -#. (screen) -#: ../source/book.xml:5539 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -" K banana.jpg\n" -"\n" -"$ svn info banana.jpg\n" -"Path: banana.jpg\n" -"Name: banana.jpg\n" -"URL: http://svn.example.com/repos/project/banana.jpg\n" -"Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n" -"Revision: 2198\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: frank\n" -"Last Changed Rev: 1950\n" -"Last Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006)\n" -"Text Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n" -"Properties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n" -"Checksum: 3b110d3b10638f5d1f4fe0f436a5a2a5\n" -"Lock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e\n" -"Lock Owner: harry\n" -"Lock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006)\n" -"Lock Comment (1 line):\n" -"Editing file for tomorrow's release.\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svn status\n" -" K banana.jpg\n" -"\n" -"$ svn info banana.jpg\n" -"Path: banana.jpg\n" -"Name: banana.jpg\n" -"URL: http://svn.example.com/repos/project/banana.jpg\n" -"Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n" -"Revision: 2198\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: frank\n" -"Last Changed Rev: 1950\n" -"Last Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006)\n" -"Text Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n" -"Properties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006)\n" -"Checksum: 3b110d3b10638f5d1f4fe0f436a5a2a5\n" -"Lock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e\n" -"Lock Owner: harry\n" -"Lock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006)\n" -"Lock Comment (1 line):\n" -"Editing file for tomorrow's release.\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:5565 -msgid "That the svn info 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 svn status command shows a K next to the file (short for locKed), indicating that the lock token is present." -msgstr "svn info命令不会联系版本库,当对工作拷贝路径应用svn info命令时,可以揭示令牌的一个重要事实—它们缓存在工作拷贝。有锁定令牌是非常重要的,这给了工作拷贝权利利用这个锁的能力。svn status会在文件后面显示一个K(locKed的缩写),表明了拥有锁定令牌。" - -#. (title) -#: ../source/book.xml:5576 -msgid "Regarding lock tokens" -msgstr "关于锁定令牌" - -#. (para) -#: ../source/book.xml:5578 -msgid "A lock token isn't an authentication token, so much as an authorization token. The token isn't a protected secret. In fact, a lock's unique token is discoverable by anyone who runs svn info URL. 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." -msgstr "一个锁不是一个认证令牌,而是一个授权令牌,这个令牌不是一个受保护的秘密,事实上,任何人都可以通过svn info URL发现这个唯一令牌。一个锁定令牌只有在工作拷贝中才有特别的意义,它是锁定建立在这个工作拷贝的证据,而不是其它用户在其他地方,仅仅检验锁定拥有者还不能防止出现意外。" - -#. (para) -#: ../source/book.xml:5587 -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 break the lock and re-lock the file.)" -msgstr "例如,你在办公室电脑上锁定了一个文件,或许修改正在进行中。很有可能在你的家用计算机上的一个工作拷贝(或别的Subversion客户端)里你又不小心修改了同一个文件,仅仅因为检验了你就是锁定的拥有者。换句话说,锁定令牌防止你通过一个Subversion相关软件的工作破坏另一个的工作。(在我们的例子里,如果你真的需要在另一个工作拷贝修改这个文件,你必须打破锁定再重新锁定文件。)" - -#. (para) -#: ../source/book.xml:5599 -msgid "Now that Harry has locked banana.jpg, Sally is unable to change or delete that file:" -msgstr "现在Harry已经锁定了banana.jpg,Sally不能修改或删除这个文件:" - -#. (screen) -#: ../source/book.xml:5601 -#, no-wrap -msgid "" -"\n" -"$ svn delete banana.jpg\n" -"D banana.jpg\n" -"$ svn commit -m \"Delete useless file.\"\n" -"Deleting banana.jpg\n" -"svn: Commit failed (details follow):\n" -"svn: DELETE of\n" -"'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg':\n" -"423 Locked (http://svn.example.com)\n" -"$\n" -msgstr "" -"\n" -"$ svn delete banana.jpg\n" -"D banana.jpg\n" -"$ svn commit -m \"Delete useless file.\"\n" -"Deleting banana.jpg\n" -"svn: Commit failed (details follow):\n" -"svn: DELETE of\n" -"'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg':\n" -"423 Locked (http://svn.example.com)\n" -"$\n" - -#. (para) -#: ../source/book.xml:5612 -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:" -msgstr "但是,当完成了香蕉的黄色渐变,就可以提交文件的修改,因为认证为锁定的拥有者,也因为他的工作拷贝有正确的锁定令牌:" - -#. (screen) -#: ../source/book.xml:5616 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -"M K banana.jpg\n" -"$ svn commit -m \"Make banana more yellow\"\n" -"Sending banana.jpg\n" -"Transmitting file data .\n" -"Committed revision 2201.\n" -"$ svn status\n" -"$\n" -msgstr "" -"\n" -"$ svn status\n" -"M K banana.jpg\n" -"$ svn commit -m \"Make banana more yellow\"\n" -"Sending banana.jpg\n" -"Transmitting file data .\n" -"Committed revision 2201.\n" -"$ svn status\n" -"$\n" - -#. (para) -#: ../source/book.xml:5626 -msgid "Notice that after the commit is finished, svn status shows that the lock token is no longer present in working copy. This is the standard behavior of svn commit—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—even on files that weren't committed. 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 images because he's unsure of which files he needs to change, yet only only changes four of those files, when he runs svn commit images, the process will still release all thirty locks." -msgstr "需要注意到提交之后,svn status显示工作拷贝已经没有锁定令牌了,这是svn commit的标准行为方式—它会遍历工作拷贝(或者从目标列表,如果有列表的话),并且作为提交的一部分发送所有遇到的锁定令牌到服务器。当提交完全成功,前面用到的所有版本库锁定都会被释放—即使是没有提交的文件。这样的原因是不鼓励用户滥用锁定,或者是长时间的保持锁定。例如,假定Harry不小心锁定了images目录的30个文件,因为他不确定要修改什么文件,他最后只修改了四个文件,当他运行svn commit images,会释放所有的30个锁定。" - -#. (para) -#: ../source/book.xml:5643 -msgid "This behavior of automatically releasing locks can be overridden with the option to svn commit. 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 no-unlock runtime configuration option (see )." -msgstr "自动释放锁定的特性可以通过svn commit选项关闭,当你要提交文件,同时期望继续修改而必须保留锁定时非常有用。这个特性也可以半永久性的设定,方法是设置运行中config文件(见)的no-unlock = yes。" - -#. (para) -#: ../source/book.xml:5651 -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 svn unlock command:" -msgstr "当然,锁定一个文件不会强制一个人要提交修改,任何时候都可以通过运行svn unlock命令释放锁定:" - -#. (screen) -#: ../source/book.xml:5654 -#, no-wrap -msgid "" -"\n" -"$ svn unlock banana.c\n" -"'banana.c' unlocked.\n" -msgstr "" -"\n" -"$ svn unlock banana.c\n" -"'banana.c' unlocked.\n" - -#. (title) -#: ../source/book.xml:5662 -msgid "Discovering locks" -msgstr "发现锁定" - -#. (para) -#: ../source/book.xml:5664 -msgid "When a commit fails due to someone else's locks, it's fairly easy to learn about them. The easiest of these is svn status --show-updates:" -msgstr "最明显的方式就是因为锁定而不能提交一个文件,最简单的方式是svn status --show-updates:" - -#. (screen) -#: ../source/book.xml:5667 -#, no-wrap -msgid "" -"\n" -"$ svn status -u\n" -"M 23 bar.c\n" -"M O 32 raisin.jpg\n" -" * 72 foo.h\n" -"Status against revision: 105\n" -"$\n" -msgstr "" -"\n" -"$ svn status -u\n" -"M 23 bar.c\n" -"M O 32 raisin.jpg\n" -" * 72 foo.h\n" -"Status against revision: 105\n" -"$\n" - -#. (para) -#: ../source/book.xml:5675 -msgid "In this example, Sally can see not only that her copy of foo.h is out-of-date, but that one of the two modified files she plans to commit is locked in the repository. The O symbol stands for Other, meaning that a lock exists on the file, and was created by somebody else. If she were to attempt a commit, the lock on raisin.jpg would prevent it. Sally is left wondering who made the lock, when, and why. Once again, svn info has the answers:" -msgstr "在这个例子里,Sally可以见到不仅她的foo.h是过期的,而且发现两个计划要提交的文件被锁定了。O符号表示其他人所订了文件。如果她尝试提交,raisin.jpg的锁定会阻止她,Sally会纳闷谁锁定了文件,什么时候,为什么。再一次,svn info拥有答案:" - -#. (screen) -#: ../source/book.xml:5685 -#, no-wrap -msgid "" -"\n" -"$ svn info http://svn.example.com/repos/project/raisin.jpg\n" -"Path: raisin.jpg\n" -"Name: raisin.jpg\n" -"URL: http://svn.example.com/repos/project/raisin.jpg\n" -"Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n" -"Revision: 105\n" -"Node Kind: file\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 32\n" -"Last Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006)\n" -"Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Lock Owner: harry\n" -"Lock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n" -"Lock Comment (1 line):\n" -"Need to make a quick tweak to this image.\n" -"$\n" -msgstr "" -"\n" -"$ svn info http://svn.example.com/repos/project/raisin.jpg\n" -"Path: raisin.jpg\n" -"Name: raisin.jpg\n" -"URL: http://svn.example.com/repos/project/raisin.jpg\n" -"Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec\n" -"Revision: 105\n" -"Node Kind: file\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 32\n" -"Last Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006)\n" -"Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Lock Owner: harry\n" -"Lock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n" -"Lock Comment (1 line):\n" -"Need to make a quick tweak to this image.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5703 -msgid "Just as svn info 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 svn info 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, svn info on a working copy path will show no lock information at all). If the main argument to svn info 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." -msgstr "就像svn info可以检验工作拷贝的对象,它也可以检验版本库的对象,如果svn info的主要参数是工作拷贝路径,所有工作拷贝的缓存信息都会显示,发现了锁定就意味着工作拷贝拥有锁定令牌(如果一个文件被另一个用户在另一个工作拷贝锁定,工作拷贝路径上运行svn info不会显示锁定信息)。如果svn info的主参数是URL,就会反映版本库中最新版本的对象信息,任何对锁定的提及描述了当前对象的锁定。" - -#. (para) -#: ../source/book.xml:5716 -msgid "So in this particular example, Sally can see that Harry locked the file on February 16th to make a quick tweak. 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." -msgstr "所以在这个特定的例子里,Sally可以看到Harry在二月十六日为了做修改而锁定了这个文件,现在已经六月了,她怀疑他可能是忘记了这个锁定,她会打电话给Harry去询问他应该释放这个锁定,如果他不再,她就要自己强制解除这个锁定或者是找管理员去做。" - -#. (title) -#: ../source/book.xml:5727 -msgid "Breaking and stealing locks" -msgstr "解除和偷窃锁定" - -#. (para) -#: ../source/book.xml:5729 -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 breaking the lock." -msgstr "版本库锁定并不是神圣不可侵犯的,在Subversion的缺省配置状态,不只是创建者可以释放锁定,任何人都可以。当有其他人期望消灭锁定时,我们称之为打破锁定。" - -#. (para) -#: ../source/book.xml:5735 -msgid "From the administrator's chair, it's simple to break locks. The svnlook and svnadmin programs have the ability to display and remove locks directly from the repository. (For more information about these tools, see .)" -msgstr "从管理员的位子上很容易打破锁定,svnlooksvnadmin程序都有能力从版本库直接显示和删除锁定。(关于这些工具的信息可以看。)" - -#. (screen) -#: ../source/book.xml:5741 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin lslocks /var/svn/repos\n" -"Path: /project2/images/banana.jpg\n" -"UUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923\n" -"Owner: frank\n" -"Created: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006)\n" -"Expires: \n" -"Comment (1 line):\n" -"Still improving the yellow color.\n" -"\n" -"Path: /project/raisin.jpg\n" -"UUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Owner: harry\n" -"Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n" -"Expires: \n" -"Comment (1 line):\n" -"Need to make a quick tweak to this image.\n" -"\n" -"$ svnadmin rmlocks /var/svn/repos /project/raisin.jpg\n" -"Removed lock on '/project/raisin.jpg'.\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin lslocks /usr/local/svn/repos\n" -"Path: /project2/images/banana.jpg\n" -"UUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923\n" -"Owner: frank\n" -"Created: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006)\n" -"Expires: \n" -"Comment (1 line):\n" -"Still improving the yellow color.\n" -"\n" -"Path: /project/raisin.jpg\n" -"UUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Owner: harry\n" -"Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006)\n" -"Expires: \n" -"Comment (1 line):\n" -"Need to make a quick tweak to this image.\n" -"\n" -"$ svnadmin rmlocks /usr/local/svn/repos /project/raisin.jpg\n" -"Removed lock on '/project/raisin.jpg'.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5763 -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 to the unlock command:" -msgstr "更有趣的选项是允许用户互相打破锁定,为此,Sally只需要使用unlock命令的选项:" - -#. (screen) -#: ../source/book.xml:5767 -#, no-wrap -msgid "" -"\n" -"$ svn status -u\n" -"M 23 bar.c\n" -"M O 32 raisin.jpg\n" -" * 72 foo.h\n" -"Status against revision: 105\n" -"$ svn unlock raisin.jpg\n" -"svn: 'raisin.jpg' is not locked in this working copy\n" -"$ svn info raisin.jpg | grep URL\n" -"URL: http://svn.example.com/repos/project/raisin.jpg\n" -"$ svn unlock http://svn.example.com/repos/project/raisin.jpg\n" -"svn: Unlock request failed: 403 Forbidden (http://svn.example.com)\n" -"$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg\n" -"'raisin.jpg' unlocked.\n" -"$\n" -msgstr "" -"\n" -"$ svn status -u\n" -"M 23 bar.c\n" -"M O 32 raisin.jpg\n" -" * 72 foo.h\n" -"Status against revision: 105\n" -"$ svn unlock raisin.jpg\n" -"svn: 'raisin.jpg' is not locked in this working copy\n" -"$ svn info raisin.jpg | grep URL\n" -"URL: http://svn.example.com/repos/project/raisin.jpg\n" -"$ svn unlock http://svn.example.com/repos/project/raisin.jpg\n" -"svn: Unlock request failed: 403 Forbidden (http://svn.example.com)\n" -"$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg\n" -"'raisin.jpg' unlocked.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5783 -msgid "Now, Sally's initial attempt to unlock failed because she ran svn unlock 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 svn unlock. 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 , the authentication and authorization requirements are ignored, and the remote lock is broken." -msgstr "Sally初始的unlock命令失败了,因为她直接在自己的工作拷贝上运行了svn unlock,而这里没有锁定令牌。为了直接从版本库删除锁定,她需要给svn unlock传递URL参数,她的这一次尝试又失败了,因为她不是锁定的拥有者(也没有锁定令牌)。当她使用了选项后,认证和授权的要求被忽略了,远程的锁定被打破了。" - -#. (para) -#: ../source/book.xml:5793 -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 svn unlock --force and then svn lock 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 steal the lock, which involves breaking and re-locking the file all in one atomic step. To do this, Sally passes the option to svn lock:" -msgstr "当然,简单的打破锁定也许还不够,在这个例子里,Sally不仅想要打破Harry遗忘的锁定,她也希望自己重新锁定。她可以通过运行svn unlock --force紧接着svn lock,但是有可能有人在这两次命令之间锁定了文件,最简单的方式是窃取这个锁定,将打破和重新锁定变成一种原子操作,为此需要运行svn lock选项:" - -#. (screen) -#: ../source/book.xml:5804 -#, no-wrap -msgid "" -"\n" -"$ svn lock raisin.jpg\n" -"svn: Lock request failed: 423 Locked (http://svn.example.com)\n" -"$ svn lock --force raisin.jpg\n" -"'raisin.jpg' locked by user 'sally'.\n" -"$\n" -msgstr "" -"\n" -"$ svn lock raisin.jpg\n" -"svn: Lock request failed: 423 Locked (http://svn.example.com)\n" -"$ svn lock --force raisin.jpg\n" -"'raisin.jpg' locked by user 'sally'.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5811 -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 defunct. 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 svn status to contact the repository:" -msgstr "在任何情况下,无论锁定被打破还是窃取,Harry都会感到惊讶。Harry的工作拷贝还保留有原来的锁定令牌,但是锁定已经不存在了,锁定令牌可以说已经死掉了。锁定令牌指代的锁定被打破(版本库中不再存在)或者是窃取了(被另一个锁定代替了),任何一种情况下,Harry都可以使用svn status询问版本库:" - -#. (screen) -#: ../source/book.xml:5820 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -" K raisin.jpg\n" -"$ svn status -u\n" -" B 32 raisin.jpg\n" -"$ svn update\n" -" B raisin.jpg\n" -"$ svn status\n" -"$\n" -msgstr "" -"\n" -"$ svn status\n" -" K raisin.jpg\n" -"$ svn status -u\n" -" B 32 raisin.jpg\n" -"$ svn update\n" -" B raisin.jpg\n" -"$ svn status\n" -"$\n" - -#. (para) -#: ../source/book.xml:5830 -msgid "If the repository lock was broken, then svn status --show-updates displays a B (Broken) symbol next to the file. If a new lock exists in place of the old one, then a T (sTolen) symbol is shown. Finally, svn update notices any defunct lock tokens and removes them from the working copy." -msgstr "如果版本库锁定被打破了,svn status --show-updates会在文件旁边显示一个B (Broken)。如果有一个新的锁,就会显示一个T (sTolen)符号。最终,svn update会注意到所有死掉的锁定并且把它们从工作拷贝中删除掉。" - -#. (title) -#: ../source/book.xml:5839 -msgid "Locking Policies" -msgstr "锁定策略" - -#. (para) -#: ../source/book.xml:5841 -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." -msgstr "不同的系统有不同的锁定限制程度的观念。有些人认为锁定必须不顾任何代价的严格执行,只有原始的创建者和管理员可以释放。他们认为如果有人打破了锁定,混乱就会放任,锁定就完全失去了意义。另外一些人认为锁定是第一个和最首要的交流工具,如果用户经常的打破别人的锁定,代表了团队的文化失败和软件之外的问题。" - -#. (para) -#: ../source/book.xml:5851 -msgid "Subversion defaults to the softer approach, but still allows administrators to create stricter enforcement policies through the use of hook scripts. In particular, the pre-lock and pre-unlock 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 post-lock and post-unlock hooks are also available, and can be used to send email after locking actions. To learn more about repository hooks, see ." -msgstr "Subversion缺省是比较宽松的方式,但也允许管理员创建钩子脚本来建立严格的控制策略。具体来说,pre-lockpre-unlock钩子允许管理员决定什么时候创建和释放锁定。根据锁定是否已经存在,这两个钩子脚本可以决定是否允许特定用户打破或窃取锁定。也有post-lockpost-unlock钩子,可以用来发送锁定动作的通知邮件。关于版本库钩子的更多信息可以看。" - -#. (title) -#: ../source/book.xml:5869 -msgid "Lock Communication" -msgstr "锁定交流" - -#. (para) -#: ../source/book.xml:5871 -msgid "We've seen how svn lock and svn unlock 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?" -msgstr "我们已经见到了如何利用svn locksvn unlock来创建、释放、打破和窃取锁定,这就满足了顺序访问文件的要求,但是浪费时间这个大问题该如何呢?" - -#. (para) -#: ../source/book.xml:5876 -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 svn status --show-updates, 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." -msgstr "例如,假定Harry锁定了一个图片,并开始编辑。同时,几英里之外的Sally希望做同样的工作,她没想到运行svn status --show-updates,她不知道Harry已经锁定了文件。她花费了数小时来修改文件,当她真被提交时发现文件已经被锁定或者是她的文件已经过期了。她的修改不能和Harry的合并,他们中的一人需要抛弃自己的工作,许多时间被浪费了。" - -#. (para) -#: ../source/book.xml:5886 -msgid "Subversion's solution to this problem is to provide a mechanism to remind users that a file ought to be locked before the editing begins. The mechanism is a special property, svn:needs-lock. 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 svn lock), the file becomes read-write. When the lock is released, the file becomes read-only again." -msgstr "Subversion针对此问题的解决方案是提供一种机制,提醒用户在开始编辑以前必须锁定这个文件,这个机制就是提供一种特别的属性--svn:needs-lock。当有这个值时,除非用户锁定这个文件,否则文件一直是只读的。当得到一个锁定令牌(运行svn lock的结果),文件变成可读写,当释放这个锁后,文件又变成只读。" - -#. (para) -#: ../source/book.xml:5898 -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:" -msgstr "根据这个原理,如果一个图像文件有这个属性,Sally打开编辑文件就会立刻注意到有些特别,大多数程序会在打开只读文件时立刻警告,至少所有的程序会防止她保存修改,这提醒了她编辑之前需要锁定文件,这样她就发现了原来存在的锁定:" - -#. (screen) -#: ../source/book.xml:5906 -#, no-wrap -msgid "" -"\n" -"$ /usr/local/bin/gimp raisin.jpg\n" -"gimp: error: file is read-only!\n" -"$ ls -l raisin.jpg\n" -"-r--r--r-- 1 sally sally 215589 Jun 8 19:23 raisin.jpg\n" -"$ svn lock raisin.jpg\n" -"svn: Lock request failed: 423 Locked (http://svn.example.com)\n" -"$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock\n" -"Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Lock Owner: harry\n" -"Lock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006)\n" -"Lock Comment (1 line):\n" -"Making some tweaks. Locking for the next two hours.\n" -"$\n" -msgstr "" -"\n" -"$ /usr/local/bin/gimp raisin.jpg\n" -"gimp: error: file is read-only!\n" -"$ ls -l raisin.jpg\n" -"-r--r--r-- 1 sally sally 215589 Jun 8 19:23 raisin.jpg\n" -"$ svn lock raisin.jpg\n" -"svn: Lock request failed: 423 Locked (http://svn.example.com)\n" -"$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock\n" -"Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b\n" -"Lock Owner: harry\n" -"Lock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006)\n" -"Lock Comment (1 line):\n" -"Making some tweaks. Locking for the next two hours.\n" -"$\n" - -#. (para) -#: ../source/book.xml:5922 -msgid "Users and administrators alike are encouraged to attach the svn:needs-lock property to any file which cannot be contextually merged. This is the primary technique for encouraging good locking habits and preventing wasted effort." -msgstr "我们鼓励用户和管理员都应该给不能根据上下文的文件添加svn:needs-lock属性,这是鼓励好的锁定习惯和防止浪费的主要技术手段。" - -#. (para) -#: ../source/book.xml:5928 -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." -msgstr "需要注意到这个属性是依赖于锁定系统的交流工具,不管是否有这个属性,文件都可以锁定。相反的,无论有没有这个属性,并不会要求提交需要首先锁定文件。" - -#. (para) -#: ../source/book.xml:5942 -#, fuzzy -msgid "Except, perhaps, a classic Vulcan mind-meld." -msgstr "?" - -#. (para) -#: ../source/book.xml:5934 -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 hijack 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. " -msgstr "这个系统并不是毫无瑕疵,即使有这个属性,只读提醒也有可能失效。有些程序偷偷的篡改了文件的只读属性,悄无声息的允许用户编辑和保存文件,不幸的是,Subversion对此无能为力—即时到了现今,还是没有任何工具能够代替人与人的良好交流。" - -#. (title) -#: ../source/book.xml:5951 -msgid "Externals Definitions" -msgstr "外部定义" - -#. (para) -#: ../source/book.xml:5953 -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 svn checkout 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." -msgstr "有时候创建一个由多个不同检出得到的工作拷贝是非常有用的,举个例子,你或许希望不同的子目录来自不同的版本库位置,或者是不同的版本库。你可以手工设置这样一个工作拷贝—使用svn checkout来创建这种你需要的嵌套的工作拷贝结构。但是如果这个结构对所有的用户是很重要的,每个用户需要执行同样的检出操作。" - -#. (para) -#: ../source/book.xml:5963 -msgid "Fortunately, Subversion provides support for externals definitions. 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 svn:externals property. You can create or modify this property using svn propset or svn propedit (see ). 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." -msgstr "很幸运,Subversion提供了外部定义的支持,一个外部定义是一个本地路经到URL的影射—也有可能一个特定的修订版本—一些版本化的资源。在Subversion你可以使用svn:externals属性来定义外部定义,你可以用svn propsetsvn propedit(见)创建和修改这个属性。它可以设置到任何版本化的路经,它的值是一个多行的子目录,可选的修订版本标记和完全有效的Subversion版本库URL的列表(相对于设置属性的版本化目录)。" - -#. (screen) -#: ../source/book.xml:5976 -#, no-wrap -msgid "" -"\n" -"$ svn propget svn:externals calc\n" -"third-party/sounds http://sounds.red-bean.com/repos\n" -"third-party/skins http://skins.red-bean.com/repositories/skinproj\n" -"third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker\n" -msgstr "" -"\n" -"$ svn propget svn:externals calc\n" -"third-party/sounds http://sounds.red-bean.com/repos\n" -"third-party/skins http://skins.red-bean.com/repositories/skinproj\n" -"third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker\n" - -#. (para) -#: ../source/book.xml:5982 -msgid "The convenience of the svn:externals 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." -msgstr "svn:externals的方便之处是这个属性设置到版本化的路径后,任何人可以从那个目录取出一个工作拷贝,同样得到外部定义的好处。换句话说,一旦一个人努力来定义这些嵌套的工作拷贝检出,其他任何人不需要再麻烦了—Subversion会在原先的工作拷贝检出之后,也会检出外部工作拷贝。" - -#. (para) -#: ../source/book.xml:5991 -msgid "The relative target subdirectories of externals definitions must not already exist on your or other users' systems—Subversion will create them when it checks out the external working copy." -msgstr "外部定义的相对目标子目录不需要存在于你的或其它用户的系统中—Subversion会在检出工作拷贝时创建这些文件。实际上,你一定不要使用外部定义来产生已经在版本控制路径。" - -#. (para) -#: ../source/book.xml:5996 -msgid "Note the previous externals definition example. When someone checks out a working copy of the calc directory, Subversion also continues to check out the items found in its externals definition." -msgstr "注意前一个外部定义实例,当有人取出了一个calc目录的工作拷贝,Subversion会继续来取出外部定义的项目。" - -#. (screen) -#: ../source/book.xml:6000 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc\n" -"A calc\n" -"A calc/Makefile\n" -"A calc/integer.c\n" -"A calc/button.c\n" -"Checked out revision 148.\n" -"\n" -"Fetching external item into calc/third-party/sounds\n" -"A calc/third-party/sounds/ding.ogg\n" -"A calc/third-party/sounds/dong.ogg\n" -"A calc/third-party/sounds/clang.ogg\n" -"…\n" -"A calc/third-party/sounds/bang.ogg\n" -"A calc/third-party/sounds/twang.ogg\n" -"Checked out revision 14.\n" -"\n" -"Fetching external item into calc/third-party/skins\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc\n" -"A calc\n" -"A calc/Makefile\n" -"A calc/integer.c\n" -"A calc/button.c\n" -"Checked out revision 148.\n" -"\n" -"Fetching external item into calc/third-party/sounds\n" -"A calc/third-party/sounds/ding.ogg\n" -"A calc/third-party/sounds/dong.ogg\n" -"A calc/third-party/sounds/clang.ogg\n" -"…\n" -"A calc/third-party/sounds/bang.ogg\n" -"A calc/third-party/sounds/twang.ogg\n" -"Checked out revision 14.\n" -"\n" -"Fetching external item into calc/third-party/skins\n" -"…\n" - -#. (para) -#: ../source/book.xml:6020 -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 svn:externals property, Subversion will synchronize the checked-out items against the changed externals definition when you next run svn update. The same thing will happen when others update their working copies and receive your changes to the externals definition." -msgstr "如果你希望修改外部定义,你可以使用普通的属性修改子命令,当你提交一个svn:externals属性修改后,当你运行svn update时,Subversion会根据修改的外部定义同步检出的项目,同样的事情也会发生在别人更新他们的工作拷贝接受你的外部定义修改时。" - -#. (para) -#: ../source/book.xml:6029 -msgid "Because the svn:externals property has a multiline value, we strongly recommend that you use svn propedit instead of svn propset." -msgstr "因为svn:externals的值是多行的,所以我们强烈建议使用svn propedit,而不是使用svn propset。" - -#. (para) -#: ../source/book.xml:6035 -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 they 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." -msgstr "你一定要要考虑在所有的外部定义中使用明确的修订版本,这样做意味着你已经决定了何时拖出外部信息不同的快照,和精确的拖出哪个快照。除了不会受到第三方版本库的意外修改的影响以外,当你的工作拷贝回溯到以前的版本库时,使用明确的修订版本号会让外部定义回到以前的那个修订版本,也意味着外部定义的工作拷贝更新会匹配以前修订版本的样子。对于软件项目,这可能是编译复杂代码基的老快照成功和失败的区别。" - -#. (para) -#: ../source/book.xml:6051 -msgid "The svn status command also recognizes externals definitions, displaying a status code of X 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." -msgstr "svn status命令也认识外部定义,会为外部定义的子目录显示X状态码,然后迭代这些子目录来显示外部项目的子目录状态信息。" - -#. (para) -#: ../source/book.xml:6057 -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 ../../skins/myskin). Third, the working copies created via the externals definition support are still disconnected from the primary working copy (on whose versioned directories the svn:externals 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 svn commit explicitly on those working copies—committing on the primary working copy will not recurse into any external ones." -msgstr "Subversion目前对外部定义的支持可能会引起误导,首先,一个外部定义只可以指向目录,而不是文件。第二,外部定义不可以指向相对路径(如../../skins/myskin)。第三,通过外部定义创建的工作拷贝与主工作拷贝没有连接(设置svn:externals属性的工作拷贝的版本库),所以Subversion会以不关联的工作拷贝操作。所以举个例子,如果你希望提交一个或多个外部定义的拷贝,你必须在这些工作拷贝显示的运行svn commit—对主工作拷贝的提交不会迭代到外部定义的部分。" - -#. (para) -#: ../source/book.xml:6072 -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 my-project, and you've created an externals definition on one of its subdirectories (my-project/some-dir) which tracks the latest revision of another of its subdirectories (my-project/external-dir)." -msgstr "另外,因为定义本身使用绝对路径,移动和拷贝路径他们附着的路径不会影响他们作为外部的检出(尽管相对的本地目标子目录会这样,当然,根据重命名的目录)。在特定情形下这看起来有些迷惑—甚至让人沮丧。举个例子,你的顶级目录叫作my-project,你在它的子目录(filename moreinfo=\"none\">my-project/some-dir)创建了一个外部定义,而这个外部定义指向的是另一个子目录(my-project/external-dir)的最新版本。" - -#. (screen) -#: ../source/book.xml:6084 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.example.com/projects .\n" -"A my-project\n" -"A my-project/some-dir\n" -"A my-project/external-dir\n" -"…\n" -"Fetching external item into 'my-project/some-dir/subdir'\n" -"Checked out external at revision 11.\n" -"\n" -"Checked out revision 11.\n" -"$ svn propget svn:externals my-project/some-dir\n" -"subdir http://svn.example.com/projects/my-project/external-dir\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svn checkout http://svn.example.com/projects .\n" -"A my-project\n" -"A my-project/some-dir\n" -"A my-project/external-dir\n" -"…\n" -"Fetching external item into 'my-project/some-dir/subdir'\n" -"Checked out external at revision 11.\n" -"\n" -"Checked out revision 11.\n" -"$ svn propget svn:externals my-project/some-dir\n" -"subdir http://svn.example.com/projects/my-project/external-dir\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:6099 -msgid "Now you use svn move to rename the my-project directory. At this point, your externals definition will still refer to a path under the my-project directory, even though that directory no longer exists." -msgstr "现在你使用svn move将目录my-project改名,此刻,你的外部定义还是指向my-project目录,即使这个目录已经不存在了。" - -#. (screen) -#: ../source/book.xml:6104 -#, no-wrap -msgid "" -"\n" -"$ svn move -q my-project renamed-project\n" -"$ svn commit -m \"Rename my-project to renamed-project.\"\n" -"Deleting my-project\n" -"Adding my-renamed-project\n" -"\n" -"Committed revision 12.\n" -"$ svn update\n" -"\n" -"Fetching external item into 'renamed-project/some-dir/subdir'\n" -"svn: Target path does not exist\n" -"$\n" -msgstr "" -"\n" -"$ svn move -q my-project renamed-project\n" -"$ svn commit -m \"Rename my-project to renamed-project.\"\n" -"Deleting my-project\n" -"Adding my-renamed-project\n" -"\n" -"Committed revision 12.\n" -"$ svn update\n" -"\n" -"Fetching external item into 'renamed-project/some-dir/subdir'\n" -"svn: Target path does not exist\n" -"$\n" - -#. (para) -#: ../source/book.xml:6117 -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 http:// or https://, but only allow commits to come in via https://, you have an interesting problem on your hands. If your externals definitions use the http:// 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 https:// form of the URLs, anyone who might be checking out via http:// because their client doesn't support https:// will be unable to fetch the external items. Be aware, too, that if you need to re-parent your working copy (using svn switch --relocate), externals definitions will not also be re-parented." -msgstr "当然,如果版本库存在多种URL模式时,使用绝对URL来引用外部定义会导致问题。例如,如果你的Subversion服务器已经配置为任何用户可以使用http://https://检出,但是只能通过https://提交,你现在有了一个很有趣的问题。如果你的外部定义使用http://形式,则你不能从这个工作拷贝提交任何内容。另一方面,如果他们使用https://方式的URL,任何因为不支持https://的客户使用http://检出的工作拷贝不能得到外部项目。也需要意识到,如果你需要重定位你的工作拷贝(使用svn switch --relocate),外部定义不会重新定位。" - -#. (para) -#: ../source/book.xml:6135 -msgid "Finally, there might be times when you would prefer that svn subcommands would not recognize, or otherwise operate upon, the external working copies. In those instances, you can pass the option to the subcommand." -msgstr "最后,你或许经常希望svn子命令不会识别或其它作为外部定义处理的结果的外部工作拷贝上的操作,在这种情况下,你可以对子命令使用选项。" - -#. (title) -#: ../source/book.xml:6146 -msgid "Peg and Operative Revisions" -msgstr "Peg 算法和版本" - -#. (para) -#: ../source/book.xml:6148 -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." -msgstr "文件和目录的拷贝、改名和移动能力使你可以创建一个项目,然后删除它,然后在同一个位置添加一个新的—这是在我们的计算机中经常发生的操作,而你的版本控制系统不应该成为你这样操作的障碍。Subversion的文件管理操作是这样的开放,提供了几乎和普通文件一样的操作版本化文件的灵活性,但是灵活意味着在整个版本库的生命周期中,一个给定的版本化的资源可能会出现在许多不同的路径,一个给定的路径会展示给我们许多完全不同的版本化资源。当然这些功能也增加了你与这些路径和资源交互的难度。" - -#. (para) -#: ../source/book.xml:6161 -msgid "Subversion is pretty smart about noticing when an object's version history includes such changes of address. 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." -msgstr "Subversion可以非常聪明的注意到一个对象的包括一个地址改变历史变化,举个例子,如果你询问一个曾经上周改过名的文件的所有的日志信息,Subversion会很高兴提供所有的日志—重命名发生的修订版本,外加相关版本之前和之后的修订版本日志,所以大多数时间里,你不需要考虑这些事情,但是偶尔,Subversion会需要你的帮助来清除混淆。" - -#. (para) -#: ../source/book.xml:6170 -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, /trunk/object for example. What, then, does it mean to ask Subversion about the history of /trunk/object? 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 all the objects that have ever lived at that path? Clearly, Subversion needs a hint about what you really want." -msgstr "这个最简单的例子发生在当一个目录或者文件从版本控制中删除时,然后一个新的同样名字目录或者文件添加到版本控制,显然你删除的和你后来添加的不是同样的东西,它们仅仅是有同样的路径,例如/trunk/object。什么,这意味着询问Subversion来查看/trunk/object的历史?你是询问当前这个位置的东西还是你在这个位置删除的那个对象?你是希望询问对这个对象的所有操作还是这个路径的所有对象?很明显,Subversion需要线索知道你真实的想法。" - -#. (para) -#: ../source/book.xml:6190 -msgid "You're not supposed to name it. Once you name it, you start getting attached to it.—Mike Wazowski" -msgstr "你不是被期望去命名它,一旦你取了名字,你开始与之联系在一起。 — Mike Wazowski" - -#. (para) -#: ../source/book.xml:6183 -msgid "And thanks to moves, versioned object history can get far more twisted than that, even. For example, you might have a directory named concept, 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. 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 concept is renamed to frabnaggilywort. Life goes on, Frabnaggilywort releases a 1.0 version, and is downloaded and used daily by hordes of people aiming to improve their lives." -msgstr "由于移动,版本化对象的历史会变得非常扭曲。举个例子,你会有一个目录叫做concept,保存了一些你用来试验的初生的软件项目,最终,这个项目变得足够成熟,说明这个注意确实需要一些翅膀了,所以你决定给这个项目一个名字。 假定你叫你的软件为Frabnaggilywort,此刻,把你的目录命名为反映项目名称的名字是有意义的,所以concept改名为frabnaggilywort。生活还在继续,Frabnaggilywort发布了1.0版本,并且被许多希望改进他们生活的分散用户天天使用。" - -#. (para) -#: ../source/book.xml:6200 -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, concept, and the cycle begins again. In fact, the cycle begins again many times over the years, each time starting with that old concept 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 concept to something else for a while, but later rename the thing back to concept for some reason." -msgstr "这是一个美好的故事,但是没有在这里结束,作为主办人,你一定想到了另一件事,所以你创建了一个目录叫做concept,周期重新开始。实际上,这个循环在几年里开始了多次,每一个想法从使用旧的concept目录开始,然后有时在想法成熟之后重新命名,有时你放弃了这个注意而删除了这个目录。或者更加变态一点,或许你把concept改成其他名字之后又因为一些原因重新改回concept。" - -#. (para) -#: ../source/book.xml:6212 -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 Main Street 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." -msgstr "当这样的情景发生时,指导Subversion工作在重新使用的路径上的尝试就像指导一个芝加哥西郊的乘客驾车到东面的罗斯福路并且左转到主大道。仅仅20分钟,你可以穿过惠顿、格伦埃林何朗伯德的主大道,但是它们不是一样的街道,我们的乘客—和我们的Subversion—需要更多的细节来做正确的事情。" - -#. (para) -#: ../source/book.xml:6220 -msgid "In version 1.1, Subversion introduced a way for you to tell it exactly which Main Street you meant. It's called the peg revision, 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 at syntax, so called because the syntax involves appending an at sign (@) and the peg revision to the end of the path with which the revision is associated." -msgstr "在1.1版本,Subversion提供了一种方法来说明你所指是哪一个街道,叫做peg修订版本,通过这个修订版本我们可以为以确定一条历史线路,因为一个版本化的文件会在任何时间占用某个路径—路径和peg修订版本的合并是可以指定一个历史的特定线路。Peg修订版本可以在Subversion命令行客户端中用at语法指定,之所以使用这个名称是因为会在关联的修订版本的路径后面追加一个at符号@)。" - -#. (para) -#: ../source/book.xml:6242 -msgid "606 N. Main Street, Wheaton, Illinois, is the home of the Wheaton History Center. Get it—History Center? It seemed appropriate…." -msgstr "伊利诺伊州惠顿主大道606号市惠顿离市中心,让它作为—历史中心?看起来是恰当的…。" - -#. (para) -#: ../source/book.xml:6233 -msgid "But what of the of which we've spoken so much in this book? That revision (or set of revisions) is called the operative revision (or operative revision range). 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, we can think of Main Street as our path and Wheaton 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 606 N. as our operative revision, of sorts, and we know exactly where to go." -msgstr "但是我们在本书多次提到的到底是什么?修订版本(或者是修订版本集)叫做实施的修订版本(或者叫做实施的修订版本范围),一旦一个特定历史线路通过一个路径和peg修订版本指定,Subversion会使用实施的修订版本执行要求的操作。类似的,为了指出这个到我们芝加哥的道路,如果我们被告知到惠顿主大道606号, 我们可以把主大道看作路径,把惠顿当作我们的peg修订版本。这两段信息确认了我们可以旅行(主大道的北方或南方)的唯一路径,也会保持我们不会在前前后后寻找目标时走到错误的主大道。现在我们把606 N.作为我们实施的修订版本,我们精确的知道到哪里。" - -#. (title) -#: ../source/book.xml:6255 -msgid "The peg revision algorithm" -msgstr "Peg 版本算法" - -#. (para) -#: ../source/book.xml:6257 -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:" -msgstr "Subversion命令行在解决路径和修订版本混淆时需要peg修订版本算法,这里是一个用以说明的例子:" - -#. (replaceable) -#: ../source/book.xml:6262 -msgid "command" -msgstr "command" - -#. (replaceable) -#: ../source/book.xml:6262 -msgid "OPERATIVE-REV" -msgstr "OPERATIVE-REV" - -#. (replaceable) -#: ../source/book.xml:6262 -msgid "PEG-REV" -msgstr "PEG-REV" - -#. (screen) -#: ../source/book.xml:6261 -#, no-wrap -msgid "" -"\n" -"$ svn -r item@\n" -msgstr "" -"\n" -"$ svn -r item@\n" - -#. (para) -#: ../source/book.xml:6264 -msgid "If OPERATIVE-REV is older than PEG-REV, then the algorithm is as follows:" -msgstr "如果OPERATIVE-REVPEG-REV更老,则算法如下:" - -#. (para) -#: ../source/book.xml:6269 -msgid "Locate item in the revision identified by PEG-REV. There can be only one such object." -msgstr "来到修订版本PEG-REV,找到item,在版本库定位到一个唯一的对象。" - -#. (para) -#: ../source/book.xml:6274 -msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision OPERATIVE-REV." -msgstr "追踪对象的历史背景(通过任何可能的改名)来到修订版本OPERATIVE-REV的祖先。" - -#. (para) -#: ../source/book.xml:6279 -msgid "Perform the requested action on that ancestor, wherever it is located, or whatever its name might be or have been at that time." -msgstr "对那个祖先执行请求的动作,无论它的位置,无论它是什么名字,无论当时是否存在。" - -#. (para) -#: ../source/book.xml:6284 -msgid "But what if OPERATIVE-REV is younger than PEG-REV? Well, that adds some complexity to the theoretical problem of locating the path in OPERATIVE-REV, because the path's history could have forked multiple times (thanks to copy operations) between PEG-REV and OPERATIVE-REV. 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:" -msgstr "但是如果OPERATIVE-REVPEG-REV更年轻时会怎么样?这为定位OPERATIVE-REV中的路径的理论问题增加了一些复杂性,因为在PEG-REVOPERATIVE-REV之间,路径在历史中可以出现多次(由于拷贝操作),而且那还不是全部—Subversion不会保存向前跟踪历史的足够信息,所以算法会有一点不同:" - -#. (para) -#: ../source/book.xml:6297 -msgid "Locate item in the revision identified by OPERATIVE-REV. There can be only one such object." -msgstr "来到修订版本PEG-REV,找到item,在版本库定位到一个唯一的对象。" - -#. (para) -#: ../source/book.xml:6302 -msgid "Trace the object's history backwards (through any possible renames) to its ancestor in the revision PEG-REV." -msgstr "追踪对象的历史背景(通过任何可能的改名)来到修订版本PEG-REV的祖先。" - -#. (para) -#: ../source/book.xml:6307 -msgid "Verify that the object's location (path-wise) in PEG-REV is the same as it is in OPERATIVE-REV. 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 OPERATIVE-REV. 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.)" -msgstr "在PEG-REV中检验对象的位置(顺序)与在OPERATIVE-REV中相同,如果那是问题,则至少两个位置是直接关联的,所以在OPERATIVE-REV的位置执行请求动作。否则,关联没有建立,所以会报告没有可用位置的错误。(有一天,我们希望Subversion可以更灵活和优雅的处理这种场景。)" - -#. (para) -#: ../source/book.xml:6320 -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 BASE for working copy items and HEAD for repository URLs. And when no operative revision is provided, it defaults to being the same revision as the peg revision." -msgstr "注意,即使你没有明确提供peg修订版本或操作修订版本,他们依然是存在的。为了使用的简便,对于工作拷贝项目的缺省peg修订版本是BASE,而版本库URL的缺省值是HEAD。当没有提供操作修订版本时,缺省是与peg修订版本一样。" - -#. (para) -#: ../source/book.xml:6328 -msgid "Say that long ago we created our repository, and in revision 1 added our first concept directory, plus an IDEA 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 frabnaggilywort. By revision 27, we had a new concept, a new concept directory to hold it, and a new IDEA file to describe it. And then five years and twenty thousand revisions flew by, just like they would in any good romance story." -msgstr "也就是说很久以前我们创建了我们的版本库,在修订版本1添加我们第一个concept目录,并且在这个目录增加一个IDEA文件与concept相关,在几个修订版本之后,真实的代码被添加和修改,我们在修订版本20,修改这个目录为frabnaggilywort。通过修订版本27,我们有了一个新的概念,所以一个新的concept目录用来保存这些东西,一个新的IDEA文件来描述这个概念,然后经过5年20000个修订版本,就像他们都有一个非常浪漫的历史。" - -#. (para) -#: ../source/book.xml:6338 -msgid "Now, years later, we wonder what the IDEA file looked like back in revision 1. But Subversion needs to know if we are asking about how the current file looked back in revision 1, or if we are asking for the contents of whatever file lived at concepts/IDEA 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 IDEA file looked in that old revision, you run:" -msgstr "现在,一年之后,我们想知道IDEA在修订版本1时是什么样子,但是Subversion需要知道我们是想询问当前文件在修订版本1时的样子,还是希望知道concepts/IDEA在修订版本1时的那个文件?确定这些问题有不同的答案,并且因为peg修订版本,你可以用两种方式询问。为了知道当前的IDEA文件在旧版本的样子,我们可以运行:" - -#. (screen) -#: ../source/book.xml:6348 -#, no-wrap -msgid "" -"\n" -"$ svn cat -r 1 concept/IDEA \n" -"svn: Unable to find repository location for 'concept/IDEA' in revision 1\n" -msgstr "" -"\n" -"$ svn cat -r 1 concept/IDEA \n" -"svn: Unable to find repository location for 'concept/IDEA' in revision 1\n" - -#. (para) -#: ../source/book.xml:6352 -msgid "Of course, in this example, the current IDEA 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:" -msgstr "当然,在这个例子里,当前的IDEA文件在修订版本1中并不存在,所以Subversion给出一个错误,这个上面的命令是长的peg修订版本命令一个缩写,扩展的写法是:" - -#. (screen) -#: ../source/book.xml:6357 -#, no-wrap -msgid "" -"\n" -"$ svn cat -r 1 concept/IDEA@BASE\n" -"svn: Unable to find repository location for 'concept/IDEA' in revision 1\n" -msgstr "" -"\n" -"$ svn cat -r 1 concept/IDEA@BASE\n" -"svn: Unable to find repository location for 'concept/IDEA' in revision 1\n" - -#. (para) -#: ../source/book.xml:6361 -msgid "And when executed, it has the expected results." -msgstr "当执行时,它包含期望的结果。" - -#. (para) -#: ../source/book.xml:6362 -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 svn know whether news@11 is the name of a directory in my tree, or just a syntax for revision 11 of news? Thankfully, while svn 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 news@11@. svn 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 filename@@ to talk about a file named filename@." -msgstr "如果工作拷贝路径或URL中确实有一个at记号,peg修订版本语法是否会导致问题?深刻理解的读者可能会产生这样的疑问。毕竟,svn是如何知道news@11是我的目录树中的一个目录,还是修订版本11的news文件?幸好,svn会一直假定后者。你只需要在路径最后添加一个at符号,例如news@11@svn只关心最后一个at标记,如果遗漏了最后的修订版本号,不会认为不合法。这个法则甚至可以应用到以at结尾的路径—你可以使用filename@@来引用filename@。" - -#. (para) -#: ../source/book.xml:6378 -msgid "Let's ask the other question, then—in revision 1, what were the contents of whatever file occupied the address concepts/IDEA at the time? We'll use an explicit peg revision to help us out." -msgstr "然后让我们询问另一个问题—在修订版本1 ,占据concepts/IDEA路径的文件的内容到底是什么?我们会使用一个明确的peg修订版本来帮助我们完成。" - -#. (screen) -#: ../source/book.xml:6382 -#, no-wrap -msgid "" -"\n" -"$ svn cat concept/IDEA@1\n" -"The idea behind this project is to come up with a piece of software\n" -"that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"business, and doing it incorrectly can have serious ramifications, so\n" -"we need to employ over-the-top input validation and data verification\n" -"mechanisms.\n" -msgstr "" -"\n" -"$ svn cat concept/IDEA@1\n" -"The idea behind this project is to come up with a piece of software\n" -"that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"business, and doing it incorrectly can have serious ramifications, so\n" -"we need to employ over-the-top input validation and data verification\n" -"mechanisms.\n" - -#. (para) -#: ../source/book.xml:6390 -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." -msgstr "注意我们这一次没有提供操作修订版本,那是因为如果没有指定操作修订版本,Subversion假定缺省的操作修订版本是peg修订版本。" - -#. (para) -#: ../source/book.xml:6394 -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 HEAD, the Frabnaggilywort project is located in the frabnaggilywort directory. So we specify that we want to see how the line of history identified in HEAD as the path frabnaggilywort/IDEA looked in revision 1." -msgstr "正像你看到的,这看起来是正确的输出,这些文本甚至提到“frabbing naggily worts”,所以这就是现在叫做Frabnaggilywort项目的那个文件,实际上,我们可以使用显示的peg修订版本和实施修订版本的组合核实这一点。我们知道在HEAD,Frabnaggilywort项目坐落在frabnaggilywort目录,所以我们指定我们希望看到HEADfrabnaggilywort/IDEA路经在历史上的修订版本1的内容。" - -#. (screen) -#: ../source/book.xml:6406 -#, no-wrap -msgid "" -"\n" -"$ svn cat -r 1 frabnaggilywort/IDEA@HEAD\n" -"The idea behind this project is to come up with a piece of software\n" -"that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"business, and doing it incorrectly can have serious ramifications, so\n" -"we need to employ over-the-top input validation and data verification\n" -"mechanisms.\n" -msgstr "" -"\n" -"$ svn cat -r 1 frabnaggilywort/IDEA@HEAD\n" -"The idea behind this project is to come up with a piece of software\n" -"that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"business, and doing it incorrectly can have serious ramifications, so\n" -"we need to employ over-the-top input validation and data verification\n" -"mechanisms.\n" - -#. (para) -#: ../source/book.xml:6414 -msgid "And the peg and operative revisions need not be so trivial, either. For example, say frabnaggilywort had been deleted from HEAD, but we know it existed in revision 20, and we want to see the diffs for its IDEA file between revisions 4 and 10. We can use the peg revision 20 in conjunction with the URL that would have held Frabnaggilywort's IDEA file in revision 20, and then use 4 and 10 as our operative revision range." -msgstr "而且peg修订版本和实施修订版本也不需要这样琐碎,举个例子,我们的frabnaggilywort已经在HEAD删除,但我们知道在修订版本20它是存在的,我们希望知道IDEA从修订版本4到10的区别,我们可以使用peg修订版本20和IDEA文件的修订版本20的URL的组合,然后使用4到10作为我们的实施修订版本范围。" - -#. (screen) -#: ../source/book.xml:6423 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20\n" -"Index: frabnaggilywort/IDEA\n" -"===================================================================\n" -"--- frabnaggilywort/IDEA\t(revision 4)\n" -"+++ frabnaggilywort/IDEA\t(revision 10)\n" -"@@ -1,5 +1,5 @@\n" -"-The idea behind this project is to come up with a piece of software\n" -"-that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"-business, and doing it incorrectly can have serious ramifications, so\n" -"-we need to employ over-the-top input validation and data verification\n" -"-mechanisms.\n" -"+The idea behind this project is to come up with a piece of\n" -"+client-server software that can remotely frab a naggily wort.\n" -"+Frabbing naggily worts is tricky business, and doing it incorrectly\n" -"+can have serious ramifications, so we need to employ over-the-top\n" -"+input validation and data verification mechanisms.\n" -msgstr "" -"\n" -"$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20\n" -"Index: frabnaggilywort/IDEA\n" -"===================================================================\n" -"--- frabnaggilywort/IDEA\t(revision 4)\n" -"+++ frabnaggilywort/IDEA\t(revision 10)\n" -"@@ -1,5 +1,5 @@\n" -"-The idea behind this project is to come up with a piece of software\n" -"-that can frab a naggily wort. Frabbing naggily worts is tricky\n" -"-business, and doing it incorrectly can have serious ramifications, so\n" -"-we need to employ over-the-top input validation and data verification\n" -"-mechanisms.\n" -"+The idea behind this project is to come up with a piece of\n" -"+client-server software that can remotely frab a naggily wort.\n" -"+Frabbing naggily worts is tricky business, and doing it incorrectly\n" -"+can have serious ramifications, so we need to employ over-the-top\n" -"+input validation and data verification mechanisms.\n" - -#. (para) -#: ../source/book.xml:6441 -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." -msgstr "幸运的是,几乎所有的人不会面临如此复杂的情形,但是如果是,记住peg修订版本是帮助Subversion清除混淆的额外提示。" - -#. (title) -#: ../source/book.xml:6450 -msgid "Network Model" -msgstr "网络模型" - -#. (para) -#: ../source/book.xml:6452 -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 (http://) with the Apache HTTP Server or speaking the custom Subversion protocol (svn://) with svnserve, 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." -msgstr "在某些情况下,你需要理解Subversion客户端如何与服务器通讯。Subversion网络层是抽象的,意味着Subversion客户端不管其操作的对象都会使用相同的行为方式,不管是使用HTTP协议(http://)与Apache HTTP服务器通讯或是使用自定义Subversion协议(svn://)与svnserve通讯,基本的网络模型是相同的。在本小节,我们要解释网络模型基础,包括Subversion如何管理认证和授权信息。" - -#. (title) -#: ../source/book.xml:6467 -msgid "Requests and Responses" -msgstr "请求和响应" - -#. (para) -#: ../source/book.xml:6469 -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 )." -msgstr "Subversion客户端花费大量的时间来管理工作拷贝,当它需要远程版本库的信息,它会做一个网络请求,然后服务器给一个恰当的回答,具体的网络协议细节对用户不可见,客户端尝试去访问一个URL,根据URL模式的不同,会使用特定的协议与服务器联系(见)。" - -#. (para) -#: ../source/book.xml:6477 -msgid "Run svn --version to see which URL schemes and protocols the client knows how to use." -msgstr "用户可以运行svn --version来查看客户端可以使用的URL模式和协议。" - -#. (para) -#: ../source/book.xml:6481 -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 credentials 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 (logs in) to the server before ever making a request. In Subversion, the server pulls credentials by challenging the client at the appropriate moment, rather than the client pushing 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 svn checkout." -msgstr "当服务器处理一个客户端请求,它通常会要求客户端确定它自己的身份,它会发出一个认证请求给客户端,而客户端通过提供凭证给服务器作为响应,一旦认证结束,服务器会响应客户端最初请求的信息。注意这个系统与CVS之类的系统不一样,它们会在请求之前,预先提供凭证(logs in)给服务器,在Subversion里,服务器通过请求客户端适时地拖入凭证,而不是客户端出,这使得这种操作更加的优雅。例如,如果一个服务器配置为世界上的任何人都可以读取版本库,在客户使用svn checkout时,服务器永远不会发起一个认证请求。" - -#. (para) -#: ../source/book.xml:6497 -msgid "If the particular network requests issued by the client result in a new revision being created in the repository, (e.g. svn commit), 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 svn:author property on the new revision (see ). If the client was not authenticated (in other words, the server never issued an authentication challenge), then the revision's svn:author property is empty." -msgstr "如果客户端的请求会在版本库创建新的修订版本(例如svn commit),Subversion就会使用认证过的用户名作为此次提交的作者。也就是说经过认证的用户名作为svn:author属性的值保存到新的修订本里(见)。如果客户端没有经过认证(换句话说,服务器没有发起过认证请求),这时修订本的svn:author的值是空的。" - -#. (title) -#: ../source/book.xml:6513 -msgid "Client Credentials Caching" -msgstr "客户端凭证缓存" - -#. (para) -#: ../source/book.xml:6515 -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 (~/.subversion/auth/ on Unix-like systems or %APPDATA%/Subversion/auth/ on Windows; see 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." -msgstr "许多服务器配置为每次请求要求认证,对被强制每次输入用户名密码,许多用户会感到很讨厌。幸运的是,Subversion客户端对此有一个修补—存在一个在磁盘上保存认证凭证缓存的系统,缺省情况下,当一个命令行客户端成功的响应了服务器的认证请求,它会保存一个认证文件到用户的私有运行配置区(类Unix系统下会在~/.subversion/auth/,Windows下在%APPDATA%/Subversion/auth/,运行配置系统在会有更多细节描述)。成功的凭证会缓存在磁盘,以主机名、端口和认证域的组合作为唯一性区别。" - -#. (para) -#: ../source/book.xml:6530 -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." -msgstr "当客户端接收到一个认证请求,它会首先查找用户磁盘中的认证凭证缓存,如果没有发现,或者是缓存的凭证认证失败,客户端会提示用户提供需要的信息。" - -#. (para) -#: ../source/book.xml:6536 -msgid "The security-conscious reader will suspect immediately that there is reason for concern here. Caching passwords on disk? That's terrible! You should never do that!" -msgstr "十分关心安全的人们一定会想把密码缓存在磁盘?太可怕了,永远不要这样做!" - -#. (para) -#: ../source/book.xml:6540 -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:" -msgstr "Subversion开发者认识到这种关注的正确性,所以Subversion使用操作系统和环境提供的机制来减少泄露这些信息的风险,下面是在大多数平台上这种含义的列表:" - -#. (para) -#: ../source/book.xml:6548 -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.)" -msgstr "在Windows 2000或更新的系统上,Subversion客户端使用标准Windows加密服务来加密磁盘上的密码。因为加密密钥是Windows管理的,与用户的登陆凭证相关,只有用户可以解密密码。(注意:如果用户的Windows账户密码被管理员重置,所有的缓存密码就不可以解密了,此时Subversion客户端就会当它们根本不存在,在需要时继续询问密码。)" - -#. (para) -#: ../source/book.xml:6560 -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." -msgstr "类似的,在Mac OS X,Subversion客户端在登陆keyring(使用Keychain管理)保存了所有的版本库密码,使用户用帐号密码保护。用户选择的设置可以强加额外的政策,例如在需要用户密码时要求输入用户帐号密码。" - -#. (para) -#: ../source/book.xml:6569 -msgid "For other Unix-like operating systems, no standard keychain services exist. However, the auth/ 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." -msgstr "对于其他类Unix系统,没有标准的加密服务。然而auth/缓存区只有用户(拥有者)可以访问,而不是全世界都可以,操作系统的访问许可可以保护密码文件。" - -#. (para) -#: ../source/book.xml:6577 -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." -msgstr "当然,对于真正的妄想狂,没有任何机制是完美的。这类人希望用无限的安全来牺牲便利性,Subversion提供了各种方法来完全关闭凭证缓存。" - -#. (para) -#: ../source/book.xml:6582 -msgid "To disable caching for a single command, pass the option:" -msgstr "你可以关闭凭证缓存,只需要一个简单的命令,使用参数:" - -#. (screen) -#: ../source/book.xml:6584 -#, no-wrap -msgid "" -"\n" -"$ svn commit -F log_msg.txt --no-auth-cache\n" -"Authentication realm: <svn://host.example.com:3690> example realm\n" -"Username: joe\n" -"Password for 'joe':\n" -"\n" -"Adding newfile\n" -"Transmitting file data .\n" -"Committed revision 2324.\n" -"\n" -"# password was not cached, so a second commit still prompts us\n" -"\n" -"$ svn delete newfile\n" -"$ svn commit -F new_msg.txt\n" -"Authentication realm: <svn://host.example.com:3690> example realm\n" -"Username: joe\n" -"…\n" -msgstr "" -"\n" -"$ svn commit -F log_msg.txt --no-auth-cache\n" -"Authentication realm: <svn://host.example.com:3690> example realm\n" -"Username: joe\n" -"Password for 'joe':\n" -"\n" -"Adding newfile\n" -"Transmitting file data .\n" -"Committed revision 2324.\n" -"\n" -"# password was not cached, so a second commit still prompts us\n" -"\n" -"$ svn delete newfile\n" -"$ svn commit -F new_msg.txt\n" -"Authentication realm: <svn://host.example.com:3690> example realm\n" -"Username: joe\n" -"…\n" - -#. (para) -#: ../source/book.xml:6602 -msgid "Or, if you want to disable credential caching permanently, you can edit the config file in your runtime configuration area, and set the option to no. 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 )." -msgstr "或许,你希望永远关闭凭证缓存,你可以编辑你的运行运行配置区的config文件,只需要把store-auth-creds设置为no,这样在影响的主机上的Subversion操作就不会有凭证缓存在磁盘。通过修改系统级的运行配置区,这个功能也会影响到本机的所有用户(详细内容见)。" - -#. (screen) -#: ../source/book.xml:6611 -#, no-wrap -msgid "" -"\n" -"[auth]\n" -"store-auth-creds = no\n" -msgstr "" -"\n" -"[auth]\n" -"store-auth-creds = no\n" - -#. (para) -#: ../source/book.xml:6615 -msgid "Sometimes users will want to remove specific credentials from the disk cache. To do this, you need to navigate into the auth/ 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 svn:realmstring key describes the particular server realm that the file is associated with:" -msgstr "有时候,用户希望从磁盘缓存删除特定的凭证,为此你可以浏览到auth/区域,删除特定的缓存文件,凭证都是作为一个单独的文件缓存,如果你打开每一个文件,你会看到键和值,svn:realmstring描述了这个文件关联的特定服务器的域:" - -#. (screen) -#: ../source/book.xml:6623 -#, no-wrap -msgid "" -"\n" -"$ ls ~/.subversion/auth/svn.simple/\n" -"5671adf2865e267db74f09ba6f872c28\n" -"3893ed123b39500bca8a0b382839198e\n" -"5c3c22968347b390f349ff340196ed39\n" -"\n" -"$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28\n" -"\n" -"K 8\n" -"username\n" -"V 3\n" -"joe\n" -"K 8\n" -"password\n" -"V 4\n" -"blah\n" -"K 15\n" -"svn:realmstring\n" -"V 45\n" -"<https://svn.domain.com:443> Joe's repository\n" -"END\n" -msgstr "" -"\n" -"$ ls ~/.subversion/auth/svn.simple/\n" -"5671adf2865e267db74f09ba6f872c28\n" -"3893ed123b39500bca8a0b382839198e\n" -"5c3c22968347b390f349ff340196ed39\n" -"\n" -"$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28\n" -"\n" -"K 8\n" -"username\n" -"V 3\n" -"joe\n" -"K 8\n" -"password\n" -"V 4\n" -"blah\n" -"K 15\n" -"svn:realmstring\n" -"V 45\n" -"<https://svn.domain.com:443> Joe's repository\n" -"END\n" - -#. (para) -#: ../source/book.xml:6645 -msgid "Once you have located the proper cache file, just delete it." -msgstr "一旦你定位了正确的缓存文件,只需要删除它。" - -#. (para) -#: ../source/book.xml:6658 -msgid "Again, a common mistake is to misconfigure a server so that it never issues an authentication challenge. When users pass and 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!" -msgstr "再次重申,一个常见的错误是把服务器配置为从不会请求认证,当用户传递给客户端时,他们惊奇的发现它们没有被使用,如新的修订版本看起来始终是由匿名用户提交的!" - -#. (para) -#: ../source/book.xml:6647 -msgid "One last word about svn's authentication behavior, specifically regarding the and options. Many client subcommands accept these options, but it is important to understand using these options does not automatically send credentials to the server. As discussed earlier, the server pulls credentials from the client when it deems necessary; the client cannot push 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. 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 svn from a script)." -msgstr "svn--username和选项的一点说明,许多客户端和子命令接受这个选项,但是要明白使用这个选项不会主动地发送凭证信息到服务器,就像前面讨论过的,服务器会在需要的时候才会从客户端入凭证,客户端不会随意出。如果一个用户名和/或密码作为选项传入,它们只会在服务器需要时才展现给服务器。通常,只有在使用非缺省用户(例如系统登陆名)进行认证,或者是为了防止交互式输入(例如在脚本里调用svn)时,才会使用这些选项。" - -#. (para) -#: ../source/book.xml:6671 -msgid "Here is a final summary that describes how a Subversion client behaves when it receives an authentication challenge." -msgstr "这里是Subversion客户端在收到认证请求的时候的行为方式最终总结:" - -#. (para) -#: ../source/book.xml:6676 -msgid "First, the client checks whether the user specified any credentials as command-line options ( and/or ). If not, or if these options fail to authenticate successfully, then" -msgstr "首先,检查用户是否通过命令选项(和/或)指定了任何凭证信息,如果没有,或者这些选项没有认证成功,然后" - -#. (para) -#: ../source/book.xml:6683 -msgid "the client looks up the server's hostname, port, and realm in the runtime auth/ area, to see if the user already has the appropriate credentials cached. If not, or if the cached credentials fail to authenticate, then" -msgstr "查找运行中的auth/区域保存的服务器名,端口和认证域信息,来确定用户是否已经有了恰当的认证缓存,如果没有,或者缓存凭证认证失败,然后" - -#. (para) -#: ../source/book.xml:6690 -msgid "finally, the client resorts to prompting the user (unless instructed not to do so via the option or its client-specific equivalents)." -msgstr "最终,客户端返回要求用户(除非使用选项或客户端对等的方式)。" - -#. (para) -#: ../source/book.xml:6696 -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)." -msgstr "如果客户端通过以上的任何一种方式成功认证,它会尝试在磁盘缓存凭证(除非用户已经关闭了这种行为方式,在前面提到过。)" - -#. (title) -#: ../source/book.xml:6710 -msgid "Branching and Merging" -msgstr "分支与合并" - -#. (attribution) -#: ../source/book.xml:6713 -msgid "Confucius" -msgstr "孔子" - -#. (quote) -#: ../source/book.xml:6715 -msgid "君子务本 (It is upon the Trunk that a gentleman works.)" -msgstr "君子务本" - -#. (para) -#: ../source/book.xml:6719 -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." -msgstr "分支、标签和合并是所有版本控制系统的共同概念,如果你并不熟悉这些概念,我们会在这一章里很好的介绍,如果你很熟悉,非常希望你有兴趣知道Subversion是怎样实现这些概念的。" - -#. (para) -#: ../source/book.xml:6724 -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 ()." -msgstr "分支是版本控制的基础组成部分,如果你允许Subversion来管理你的数据,这个特性将是你所必须依赖的 ,这一章假定你已经熟悉了Subversion的基本概念()。" - -#. (title) -#: ../source/book.xml:6734 -msgid "What's a Branch?" -msgstr "什么是分支?" - -#. (para) -#: ../source/book.xml:6736 -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 tweaked for them, since they do things slightly differently." -msgstr "假设你的工作是维护本公司一个部门的手册文档,一天,另一个部门问你要相同的手册,但一些地方会有区别,因为他们有不同的需要。" - -#. (para) -#: ../source/book.xml:6741 -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." -msgstr "这种情况下你会怎样做?显而易见的方法是:作一个版本的拷贝,然后分别维护两个版本,只要任何一个部门告诉要做一些小修改,你必须选择在对应的版本进行更改。" - -#. (para) -#: ../source/book.xml:6746 -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." -msgstr "你也许希望在两个版本同时作修改,举个例子,你在第一个版本发现了一个拼写错误,很显然这个错误也会出现在第二个版本里。两份文档几乎相同,毕竟,只有许多特定的微小区别。" - -#. (para) -#: ../source/book.xml:6751 -msgid "This is the basic concept of a branch—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 )." -msgstr "这是分支的基本概念—正如它的名字,开发的一条线独立于另一条线,如果回顾历史,可以发现两条线分享共同的历史,一个分支总是从一个备份开始的,从那里开始,发展自己独有的历史(见 )。" - -#. (title) -#: ../source/book.xml:6759 -msgid "Branches of development" -msgstr "分支与开发" - -#. (para) -#: ../source/book.xml:6767 -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 mix and match different lines of development in your daily work." -msgstr "Subversion允许你并行的维护文件和目录的分支,它允许你通过拷贝数据建立分支,记住,分支互相联系,它也帮助你从一个分支复制修改到另一个分支。最终,它可以让你的工作拷贝反映到不同的分支上,所以你在日常工作可以混合和比较不同的开发线。" - -#. (title) -#: ../source/book.xml:6781 -msgid "Using Branches" -msgstr "使用分支" - -#. (para) -#: ../source/book.xml:6783 -msgid "At this point, you should understand how each commit creates an entire new filesystem tree (called a revision) in the repository. If not, go back and read about revisions in ." -msgstr "在这一点上,你必须理解每一次提交是怎样建立整个新的文件系统树(叫做修订版本)的,如果没有,可以回头去读。" - -#. (para) -#: ../source/book.xml:6787 -msgid "For this chapter, we'll go back to the same example from . Remember that you and your collaborator, Sally, are sharing a repository that contains two projects, paint and calc. Notice that in , however, each project directory now contains subdirectories named trunk and branches. The reason for this will soon become clear." -msgstr "对于本章节,我们会回到的同一个例子,还记得你和你的合作者Sally分享一个包含两个项目的版本库,paintcalc。注意,然而,现在每个项目的都有一个trunkbranches子目录,它们存在的理由很快就会清晰起来。" - -#. (title) -#: ../source/book.xml:6797 -msgid "Starting repository layout" -msgstr "开始规划版本库" - -#. (para) -#: ../source/book.xml:6805 -msgid "As before, assume that Sally and you both have working copies of the calc project. Specifically, you each have a working copy of /calc/trunk. All the files for the project are in this subdirectory rather than in /calc itself, because your team has decided that /calc/trunk is where the main line of development is going to take place." -msgstr "像以前一样,假定Sally和你都有calc项目的一份拷贝,更准确地说,你有一份/calc/trunk的工作拷贝,这个项目的所有的文件在这个子目录里,而不是在/calc下,因为你的小组决定使用/calc/trunk作为开发使用的主线。" - -#. (para) -#: ../source/book.xml:6813 -#, fuzzy -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 /calc/trunk) 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.)" -msgstr "假定你有一个任务,将要对项目做基本的重新组织,这需要花费大量时间来完成,会影响项目的所有文件,问题是你不会希望打扰Sally,她正在处理这样或那样的程序小Bug,一直使用整个项目(/calc/trunk)的最新版本,如果你一点一点的提交你的修改,你一定会干扰Sally的工作。" - -#. (para) -#: ../source/book.xml:6822 -#, fuzzy -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 /calc/trunk 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 best practice 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 svn update after weeks of isolation." -msgstr "一种策略是自己闭门造车:你和Sally可以停止一个到两个星期的共享,也就是说,开始作出本质上的修改和重新组织工作拷贝的文件,但是在完成这个任务之前不做提交和更新。这样会有很多问题,首先,这样并不安全,许多人习惯频繁的保存修改到版本库,工作拷贝一定有许多意外的修改。第二,这样并不灵活,如果你的工作在不同的计算机(或许你在不同的机器有两份/calc/trunk的工作拷贝),你需要手工的来回拷贝修改,或者只在一个计算机上工作,这时很难做到共享你即时的修改,一项软件开发的最佳实践就是允许审核你做过的工作,如果没有人看到你的提交,你失去了潜在的反馈。最后,当你完成了公司主干代码的修改工作,你会发现合并你的工作拷贝和公司的主干代码会是一件非常困难的事情,Sally(或者其他人)也许已经对版本库做了许多修改,已经很难和你的工作拷贝结合—当你单独工作几周后运行svn update时就会发现这一点。" - -#. (para) -#: ../source/book.xml:6847 -#, fuzzy -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." -msgstr "最佳方案是创建你自己的分支,或者是版本库的开发线。这允许你保存破坏了一半的工作而不打扰别人,尽管你仍可以选择性的同你的合作者分享信息,你将会看到这是怎样工作的。" - -#. (title) -#: ../source/book.xml:6856 -msgid "Creating a Branch" -msgstr "创建分支" - -#. (para) -#: ../source/book.xml:6858 -msgid "Creating a branch is very simple—you make a copy of the project in the repository using the svn copy 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 /calc/trunk 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 /calc/branches area of the repository, and you want to name your branch my-calc-branch. You'll want to create a new directory, /calc/branches/my-calc-branch, which begins its life as a copy of /calc/trunk." -msgstr "建立分支非常的简单—使用svn copy命令给你的工程做个拷贝,Subversion不仅可以拷贝单个文件,也可以拷贝整个目录,在目前情况下,你希望作/calc/trunk的拷贝,新的拷贝应该在哪里?在你希望的任何地方—它只是在于项目的政策,我们假设你们项目的政策是在/calc/branches建立分支,并且你希望把你的分支叫做my-calc-branch,你希望建立一个新的目录/calc/branches/my-calc-branch,作为/calc/trunk的拷贝开始它的生命周期。" - -#. (para) -#: ../source/book.xml:6873 -msgid "At this point, you might have seen svn copy used to copy one file to another within a working copy. But it can also be used to do a remote copy entirely within the repository. Just copy one URL to another:" -msgstr "" - -#. (screen) -#: ../source/book.xml:6878 -#, no-wrap -msgid "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" -m \"Creating a private branch of /calc/trunk.\"\n" -"\n" -"Committed revision 341.\n" -msgstr "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" -m \"Creating a private branch of /calc/trunk.\"\n" -"\n" -"Committed revision 341.\n" - -#. (para) -#: ../source/book.xml:6890 -msgid "Subversion does not support copying between different repositories. When using URLs with svn copy or svn move, you can only copy items within the same repository." -msgstr "Subversion不支持跨版本库的拷贝,当使用svn copy或者svn move直接操作URL时你只能在同一个版本库内操作。" - -#. (para) -#: ../source/book.xml:6885 -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 /calc/trunk. This is shown in . While it's also possible to create a branch by using svn copy 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." -msgstr "" - -#. (title) -#: ../source/book.xml:6906 -msgid "Repository with new copy" -msgstr "版本库与复制" - -#. (title) -#: ../source/book.xml:6916 -msgid "Cheap Copies" -msgstr "廉价复制" - -#. (para) -#: ../source/book.xml:6918 -#, fuzzy -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 existing 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." -msgstr "Subversion的版本库有特殊的设计,当你复制一个目录,你不需要担心版本库会变得十分巨大—Subversion并不是拷贝所有的数据,相反,它建立了一个已存在目录树的入口,如果你是Unix用户,可以把它理解成硬链接,在对拷贝的文件和目录操作之前,Subversion还仅仅把它当作硬链接,只有为了区分不同版本的对象时才会复制数据。" - -#. (para) -#: ../source/book.xml:6929 -#, fuzzy -msgid "This is why you'll often hear Subversion users talk about cheap copies. 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 cheap copy of the previous revision, with a few items lazily changed within. (To read more about this, visit Subversion's website and read about the bubble up method in Subversion's design documents.)" -msgstr "这就是为什么经常听到Subversion用户谈论廉价的拷贝,与目录的大小无关—这个操作会使用很少的时间,事实上,这个特性是Subversion提交工作的基础:每一次版本都是前一个版本的一个廉价的拷贝,只有少数项目修改了。(要阅读更多关于这部分的内容,访问Subversion网站并且阅读设计文档中的bubble up方法)。" - -#. (para) -#: ../source/book.xml:6939 -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 svn copy URL1 URL2), it's a quick, constant-time operation. Make branches as often as you want." -msgstr "当然,拷贝与分享的内部机制对用户来讲是不可见的,用户只是看到拷贝树,这里的要点是拷贝的时间与空间代价很小。如果你完全在版本库里创建分支(通过运行svn copy URL1 URL2),这是一个快速的,时间基本固定的操作,只要你希望,可以随意创建分支。" - -#. (title) -#: ../source/book.xml:6951 -msgid "Working with Your Branch" -msgstr "在分支上工作" - -#. (para) -#: ../source/book.xml:6953 -msgid "Now that you've created a branch of the project, you can check out a new working copy to start using it:" -msgstr "现在你已经在项目里建立分支了,你可以取出一个新的工作拷贝来开始使用:" - -#. (screen) -#: ../source/book.xml:6955 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"A my-calc-branch/Makefile\n" -"A my-calc-branch/integer.c\n" -"A my-calc-branch/button.c\n" -"Checked out revision 341.\n" -msgstr "" -"\n" -"$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"A my-calc-branch/Makefile\n" -"A my-calc-branch/integer.c\n" -"A my-calc-branch/button.c\n" -"Checked out revision 341.\n" - -#. (para) -#: ../source/book.xml:6962 -#, fuzzy -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 /calc/trunk. (Be sure to read later in this chapter: the svn switch command is an alternate way of creating a working copy of a branch.)" -msgstr "这一份工作拷贝没有什么特别的,它只是版本库另一个目录的一个镜像罢了,当你提交修改时,Sally在更新时不会看到改变,她是/calc/trunk的工作拷贝。(确定要读本章后面的svn switch命令是建立分支工作拷贝的另一个选择。)" - -#. (para) -#: ../source/book.xml:6969 -msgid "Let's pretend that a week goes by, and the following commits happen:" -msgstr "我们假定本周就要过去了,如下的提交发生:" - -#. (para) -#: ../source/book.xml:6973 -msgid "You make a change to /calc/branches/my-calc-branch/button.c, which creates revision 342." -msgstr "你修改了/calc/branches/my-calc-branch/button.c,生成修订版本342。" - -#. (para) -#: ../source/book.xml:6979 -msgid "You make a change to /calc/branches/my-calc-branch/integer.c, which creates revision 343." -msgstr "你修改了/calc/branches/my-calc-branch/integer.c,生成修订版本343。" - -#. (para) -#: ../source/book.xml:6985 -msgid "Sally makes a change to /calc/trunk/integer.c, which creates revision 344." -msgstr "Sally修改了/calc/trunk/integer.c,生成了修订版本344。" - -#. (para) -#: ../source/book.xml:6991 -msgid "There are now two independent lines of development, shown in , happening on integer.c." -msgstr "现在有两个独立开发线,显示了integer.c的历史。" - -#. (title) -#: ../source/book.xml:6996 -msgid "The branching of one file's history" -msgstr "一个文件的分支历史" - -#. (para) -#: ../source/book.xml:7004 -msgid "Things get interesting when you look at the history of changes made to your copy of integer.c:" -msgstr "当你看到integer.c的改变时,你会发现很有趣:" - -#. (screen) -#: ../source/book.xml:7007 -#, no-wrap -msgid "" -"\n" -"$ pwd\n" -"/home/user/my-calc-branch\n" -"\n" -"$ svn log -v integer.c\n" -"------------------------------------------------------------------------\n" -"r343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/branches/my-calc-branch/integer.c\n" -"\n" -"* integer.c: frozzled the wazjub.\n" -"\n" -"------------------------------------------------------------------------\n" -"r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" A /calc/branches/my-calc-branch (from /calc/trunk:340)\n" -"\n" -"Creating a private branch of /calc/trunk.\n" -"\n" -"------------------------------------------------------------------------\n" -"r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: changed a docstring.\n" -"\n" -"------------------------------------------------------------------------\n" -"r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: adding this file to the project.\n" -"\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ pwd\n" -"/home/user/my-calc-branch\n" -"\n" -"$ svn log -v integer.c\n" -"------------------------------------------------------------------------\n" -"r343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/branches/my-calc-branch/integer.c\n" -"\n" -"* integer.c: frozzled the wazjub.\n" -"\n" -"------------------------------------------------------------------------\n" -"r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" A /calc/branches/my-calc-branch (from /calc/trunk:340)\n" -"\n" -"Creating a private branch of /calc/trunk.\n" -"\n" -"------------------------------------------------------------------------\n" -"r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: changed a docstring.\n" -"\n" -"------------------------------------------------------------------------\n" -"r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: adding this file to the project.\n" -"\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:7042 -msgid "Notice that Subversion is tracing the history of your branch's integer.c 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 integer.c was implicitly copied when all of /calc/trunk/ was copied. Now look what happens when Sally runs the same command on her copy of the file:" -msgstr "注意,Subversion追踪分支上的integer.c的历史,包括所有的操作,甚至追踪到拷贝之前。这表示了建立分支也是历史中的一次事件,因为在拷贝整个/calc/trunk/时已经拷贝了一份integer.c。现在看Sally在她的工作拷贝运行同样的命令:" - -#. (screen) -#: ../source/book.xml:7050 -#, no-wrap -msgid "" -"\n" -"$ pwd\n" -"/home/sally/calc\n" -"\n" -"$ svn log -v integer.c\n" -"------------------------------------------------------------------------\n" -"r344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: fix a bunch of spelling errors.\n" -"\n" -"------------------------------------------------------------------------\n" -"r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: changed a docstring.\n" -"\n" -"------------------------------------------------------------------------\n" -"r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: adding this file to the project.\n" -"\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ pwd\n" -"/home/sally/calc\n" -"\n" -"$ svn log -v integer.c\n" -"------------------------------------------------------------------------\n" -"r344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: fix a bunch of spelling errors.\n" -"\n" -"------------------------------------------------------------------------\n" -"r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: changed a docstring.\n" -"\n" -"------------------------------------------------------------------------\n" -"r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines\n" -"Changed paths:\n" -" M /calc/trunk/integer.c\n" -"\n" -"* integer.c: adding this file to the project.\n" -"\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:7078 -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 does 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." -msgstr "sally看到她自己的344修订,你做的343修改她看不到,从Subversion看来,两次提交只是影响版本库中不同位置上的两个文件。然而,Subversion显示了两个文件有共同的历史,在分支拷贝之前,他们使用同一个文件,所以你和Sally都看到版本号303到98的修改。" - -#. (title) -#: ../source/book.xml:7090 -#, fuzzy -msgid "The Key Concepts Behind Branching" -msgstr "分支背后的关键概念" - -#. (para) -#: ../source/book.xml:7092 -#, fuzzy -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 branch because you 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." -msgstr "在本节,你需要记住两件重要的课程。首先,Subversion并没有内在的分支概念—只有拷贝,当你拷贝一个目录,这个结果目录就是一个分支,只是因为你给了它这样一个含义而已。你可以换一种角度考虑,或者特别对待,但是对于Subversion它只是一个普通的拷贝,只不过碰巧包含了一些额外的历史信息。第二,因为拷贝机制,Subversion的分支是以普通文件系统目录存在的,这与其他版本控制系统不同,它们都为分支定义了另一维度的标签。" - -#. (para) -#: ../source/book.xml:7101 -msgid "Second, because of this copy mechanism, Subversion's branches exist as normal filesystem directories in the repository. This is different from other version control systems, where branches are typically defined by adding extra-dimensional labels 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 /branches directory, but you're free to invent any policy you wish." -msgstr "" - -#. (title) -#: ../source/book.xml:7118 -#, fuzzy -msgid "Basic Merging" -msgstr "分支与合并" - -#. (para) -#: ../source/book.xml:7120 -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 trunk, or main line of development." -msgstr "现在你与Sally在同一个项目的并行分支上工作:你在私有分支上,而Sally在主干(trunk)或者叫做开发主线上。" - -#. (para) -#: ../source/book.xml:7124 -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." -msgstr "由于有众多的人参与项目,大多数人拥有主干拷贝是很正常的,任何人如果进行一个长周期的修改会使得主干陷入混乱,所以通常的做法是建立一个私有分支,提交修改到自己的分支,直到这阶段工作结束。" - -#. (para) -#: ../source/book.xml:7130 -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 too far apart. Remember that one of the problems with the crawl in a hole 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." -msgstr "所以,好消息就是你和Sally不会互相打扰,坏消息是有时候分离会远。记住闭门造车策略的问题,当你完成你的分支后,可能因为太多冲突,已经无法轻易合并你的分支和主干的修改。" - -#. (para) -#: ../source/book.xml:7137 -#, fuzzy -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 copy 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 merging, and is performed using various invocations of the svn merge command." -msgstr "相反,在你工作的时候你和Sally仍然可以继续分享修改,这依赖于你决定什么值得分享,Subversion给你在分支间选择性拷贝修改的能力,当你完成了分支上的所有工作,所有的分支修改可以被拷贝回到主干。" - -#. (para) -#: ../source/book.xml:7147 -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 manual methods to achieve similar results. (See .)" -msgstr "" - -#. (title) -#: ../source/book.xml:7157 -#, fuzzy -msgid "Keeping a Branch in Sync" -msgstr "创建分支" - -#. (para) -#: ../source/book.xml:7159 -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 /trunk. 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 surprise conflicts when it comes time for you to fold your changes back into the trunk." -msgstr "" - -#. (para) -#: ../source/book.xml:7171 -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:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7175 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ pwd\n" -"/home/user/my-calc-branch\n" -"\n" -"$ svn merge http://svn.example.com/repos/calc/trunk\n" -"--- Merging r345 through r356 into '.':\n" -"U button.c\n" -"U integer.c\n" -msgstr "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" - -#. (para) -#: ../source/book.xml:7184 -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:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7188 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn status\n" -"M button.c\n" -"M integer.c\n" -msgstr "" -"\n" -"$ svn status\n" -"M foo.c\n" -"M bar/baz.c\n" - -#. (para) -#: ../source/book.xml:7193 -msgid "At this point, the wise thing to do is look at the changes carefully with svn diff, then build and test your branch. You might need to resolve some conflicts (just as you do with svn update), or possibly make some small edits to get things working properly. (Remember, just because there are no syntactic conflicts doesn't mean there aren't any semantic conflicts!) If you encounter serious problems, you can always abort the local changes by running svn revert and start a long what's going on? discussion with your collaborators. If things look good, however, then you can submit your changes into the repository:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7206 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn commit -m \"Merged /trunk to /my-calc-branch.\"\n" -"Sending button.c\n" -"Sending integer.c\n" -"Transmitting file data ..\n" -"Committed revision 357.\n" -msgstr "" -"\n" -"$ svn commit button.c -m \"Fixed a typo in button.c.\"\n" -"Sending button.c\n" -"Transmitting file data .\n" -"Committed revision 57.\n" - -#. (para) -#: ../source/book.xml:7213 -msgid "At this point, your private branch is now in sync with the trunk, so you can rest easier knowing that as you continue to work in isolation, you're not drifting too far away from what everyone else is doing." -msgstr "" - -#. (title) -#: ../source/book.xml:7220 -msgid "Why Not Use Patches Instead?" -msgstr "为什么不使用补丁?" - -#. (para) -#: ../source/book.xml:7222 -msgid "A question may be on your mind, especially if you're a Unix user: why bother to use svn merge at all? Why not simply use the operating system's patch command to accomplish the same job? For example:" -msgstr "也许你的脑中会出现一个问题,特别如果你是Unix用户,为什么非要使用svn merge?为什么不简单的使用操作系统的patch命令来进行相同的工作?例如:" - -#. (screen) -#: ../source/book.xml:7227 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ cd my-calc-branch\n" -"$ svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk > patchfile\n" -"$ patch -p0 < patchfile\n" -"Patching file integer.c using Plan A...\n" -"Hunk #1 succeeded at 147.\n" -"Hunk #2 succeeded at 164.\n" -"Hunk #3 succeeded at 241.\n" -"Hunk #4 succeeded at 249.\n" -"done\n" -msgstr "" -"\n" -"$ svn diff -c 344 http://svn.example.com/repos/calc/trunk > patchfile\n" -"$ patch -p0 < patchfile\n" -"Patching file integer.c using Plan A...\n" -"Hunk #1 succeeded at 147.\n" -"Hunk #2 succeeded at 164.\n" -"Hunk #3 succeeded at 241.\n" -"Hunk #4 succeeded at 249.\n" -"done\n" - -#. (para) -#: ../source/book.xml:7238 -#, fuzzy -msgid "In this particular case, yes, there really is no difference. But svn merge has special abilities that surpass the patch program. The file format used by patch is quite limited; it's only able to tweak file contents. There's no way to represent changes to trees, such as the addition, removal, or renaming of files and directories. Nor can the patch program notice changes to properties. If Sally's change had, say, added a new directory, the output of svn diff wouldn't have mentioned it at all. svn diff only outputs the limited patch-format, so there are some ideas it simply can't express." -msgstr "在这种情况下,确实没有区别,但是svn merge有超越patch的特别能力,使用patch对文件格式有一定的限制,它只能针对文件内容,没有方法表现目录树的修改,例如添加、删除或是改名。如果Sally的修改包括增加一个新的目录,svn diff不会注意到这些,svn diff只会输出有限的补丁格式,所以有些问题无法表达。 但是svn merge命令会通过直接作用你的工作拷贝来表示目录树的结构和属性变化。" - -#. (para) -#: ../source/book.xml:7252 -msgid "The svn merge 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 .) 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." -msgstr "" - -#. (para) -#: ../source/book.xml:7264 -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!" -msgstr "" - -#. (screen) -#: ../source/book.xml:7270 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn merge http://svn.example.com/repos/calc/trunk\n" -"--- Merging r357 through r380 into '.':\n" -"U integer.c\n" -"U Makefile\n" -"A README\n" -msgstr "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" - -#. (para) -#: ../source/book.xml:7277 -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 svn commit the local modifications to your branch." -msgstr "" - -#. (para) -#: ../source/book.xml:7282 -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:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7288 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn merge http://svn.example.com/repos/calc/trunk\n" -"--- Merging r381 through r385 into '.':\n" -"U button.c\n" -"U README\n" -"\n" -"$ # build, test, ...\n" -"\n" -"$ svn commit -m \"Final merge of trunk changes to my-calc-branch.\"\n" -"Sending button.c\n" -"Sending README\n" -"Transmitting file data ..\n" -"Committed revision 390.\n" -msgstr "" -"\n" -"$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"\n" -"$ svn diff\n" -"…\n" -"# verify that the change is removed\n" -"…\n" -"\n" -"$ svn commit -m \"Undoing change committed in r303.\"\n" -"Sending integer.c\n" -"Transmitting file data .\n" -"Committed revision 350.\n" - -#. (para) -#: ../source/book.xml:7302 -msgid "Now, you use svn merge to replicate your branch changes back into the trunk. To do this, you'll need a working copy of /trunk. You can do this by either doing an svn checkout, dredging up an old trunk working copy from somewhere on your disk, or by using svn switch (see .) Then invoke svn merge within your trunk working copy:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7311 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ pwd\n" -"/home/user/calc-trunk\n" -"\n" -"$ svn merge http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"--- Merging r341 through r390 into '.':\n" -"U button.c\n" -"U integer.c\n" -"U Makefile\n" -"\n" -"$ # build, test, verify, ...\n" -"\n" -"$ svn commit -m \"Merge my-calc-branch back into trunk!\"\n" -"Sending button.c\n" -"Sending integer.c\n" -"Sending Makefile\n" -"Transmitting file data ..\n" -"Committed revision 391.\n" -msgstr "" -"\n" -"$ cd calc/trunk\n" -"$ svn update\n" -"At revision 405.\n" -"\n" -"$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"M button.c\n" -"M Makefile\n" -"\n" -"# ...examine the diffs, compile, test, etc...\n" -"\n" -"$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n" -"Sending integer.c\n" -"Sending button.c\n" -"Sending Makefile\n" -"Transmitting file data ...\n" -"Committed revision 406.\n" - -#. (para) -#: ../source/book.xml:7330 -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:" -msgstr "" - -#. (screen) -#: ../source/book.xml:7334 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"Committed revision 392.\n" -msgstr "" -"\n" -"$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" -m \"Removing obsolete branch of calc project.\"\n" -"\n" -"Committed revision 375.\n" - -#. (para) -#: ../source/book.xml:7338 -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 /branches directory, its existence is still an immutable part of the repository's history. A simple svn log command on the /branches URL will show the entire history of your branch. Your branch can even be resurrected at some point, should you desire. (See .)" -msgstr "" - -#. (title) -#: ../source/book.xml:7353 -msgid "Basic Merge Tracking" -msgstr "" - -#. (para) -#: ../source/book.xml:7355 -msgid "###TODO: set expectations on what gets tracked and what doesn't." -msgstr "" - -#. (title) -#: ../source/book.xml:7360 -#, fuzzy -msgid "Mergeinfo" -msgstr "合并" - -#. (para) -#: ../source/book.xml:7362 -msgid "###TODO: explain svn:mergeinfo prop and 'svn mergeinfo' command, so users get a general sense of how the system is tracking changes." -msgstr "" - -#. (title) -#: ../source/book.xml:7369 -msgid "Previewing Merges" -msgstr "预览合并" - -#. (para) -#: ../source/book.xml:7371 -#, fuzzy -msgid "It's a best practice to do your merge into a working copy that has no local edits and has been recently updated. If your working copy isn't clean in these ways, you can run into some headaches." -msgstr "首先,一定要记住合并的工作拷贝没有本地更改,并且最近已更新过。如果你的工作拷贝用这样的方法清理,你会发现一些头痛的事情。" - -#. (para) -#: ../source/book.xml:7376 -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 svn revert the changes and try again." -msgstr "因为合并只是导致本地修改,它不是一个高风险的操作,如果你在第一次操作错误,你可以运行svn revert来再试一次。" - -#. (para) -#: ../source/book.xml:7380 -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 svn revert is no longer an option. The two sets of changes may be impossible to separate." -msgstr "有时候你的工作拷贝很可能已经改变了,合并会针对存在的那一个文件,这时运行svn revert不会恢复你在本地作的修改,两部分的修改无法识别出来。" - -#. (para) -#: ../source/book.xml:7385 -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 svn diff with the same arguments you plan to pass to svn merge, as we already showed in our first example of merging. Another method of previewing is to pass the option to the merge command:" -msgstr "在这个情况下,人们很乐意能够在合并之前预测一下,一个简单的方法是使用运行svn merge同样的参数运行svn diff,另一种方式是传递选项给merge命令来预览:" - -#. (screen) -#: ../source/book.xml:7393 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn merge --dry-run http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"# nothing printed, working copy is still unchanged.\n" -msgstr "" -"\n" -"$ svn merge --dry-run -c 344 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"# nothing printed, working copy is still unchanged.\n" - -#. (para) -#: ../source/book.xml:7400 -msgid "The option doesn't actually apply any local changes to the working copy. It only shows status codes that would be printed in a real merge. It's useful for getting a high level preview of the potential merge, for those times when running svn diff gives too much detail." -msgstr "选项实际上并不修改本地拷贝,它只是显示实际合并时的状态信息,对于得到潜在合并的整体预览,这个命令很有用,因为svn diff包括太多细节。" - -#. (title) -#: ../source/book.xml:7411 -msgid "Multi-Layered Merges" -msgstr "" - -#. (para) -#: ../source/book.xml:7413 -msgid "###TODO: explain how a merge can apply successive patches, and that any intermediate conflicts *must* be resolved (for now, at least.)" -msgstr "" - -#. (title) -#: ../source/book.xml:7424 -#, fuzzy -msgid "Advanced Merging" -msgstr "高级用户" - -#. (para) -#: ../source/book.xml:7426 -msgid "###TODO: Intro: talk about how and why advanced users can pass specific revision numbers to 'svn merge'." -msgstr "" - -#. (title) -#: ../source/book.xml:7431 -msgid "Copying Specific Changes" -msgstr "复制特定的修改" - -#. (para) -#: ../source/book.xml:7433 -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:" -msgstr "" - -#. (para) -#: ../source/book.xml:7437 -#, fuzzy -msgid "Assume you get word that Sally made an interesting change to integer.c 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, before you start working too heavily in the same places." -msgstr "在上一章节,我们提到你和Sally对integer.c在不同的分支上做过修改,如果你看了Sally的344版本的日志信息,你会知道她修正了一些拼写错误,毋庸置疑,你的拷贝的文件也一定存在这些拼写错误,所以你以后的对这个文件修改也会保留这些拼写错误,所以你会在将来合并时得到许多冲突。最好是现在接收Sally的修改,而不是作了许多工作之后才来做。" - -#. (screen) -#: ../source/book.xml:7448 -#, no-wrap -msgid "" -"\n" -"$ svn diff -c 344 http://svn.example.com/repos/calc/trunk\n" -"\n" -"Index: integer.c\n" -"===================================================================\n" -"--- integer.c\t(revision 343)\n" -"+++ integer.c\t(revision 344)\n" -"@@ -147,7 +147,7 @@\n" -" case 6: sprintf(info->operating_system, \"HPFS (OS/2 or NT)\"); break;\n" -" case 7: sprintf(info->operating_system, \"Macintosh\"); break;\n" -" case 8: sprintf(info->operating_system, \"Z-System\"); break;\n" -"- case 9: sprintf(info->operating_system, \"CPM\"); break;\n" -"+ case 9: sprintf(info->operating_system, \"CP/M\"); break;\n" -" case 10: sprintf(info->operating_system, \"TOPS-20\"); break;\n" -" case 11: sprintf(info->operating_system, \"NTFS (Windows NT)\"); break;\n" -" case 12: sprintf(info->operating_system, \"QDOS\"); break;\n" -"@@ -164,7 +164,7 @@\n" -" low = (unsigned short) read_byte(gzfile); /* read LSB */\n" -" high = (unsigned short) read_byte(gzfile); /* read MSB */\n" -" high = high << 8; /* interpret MSB correctly */\n" -"- total = low + high; /* add them togethe for correct total */\n" -"+ total = low + high; /* add them together for correct total */\n" -"\n" -" info->extra_header = (unsigned char *) my_malloc(total);\n" -" fread(info->extra_header, total, 1, gzfile);\n" -"@@ -241,7 +241,7 @@\n" -" Store the offset with ftell() ! */\n" -"\n" -" if ((info->data_offset = ftell(gzfile))== -1) {\n" -"- printf(\"error: ftell() retturned -1.\\n\");\n" -"+ printf(\"error: ftell() returned -1.\\n\");\n" -" exit(1);\n" -" }\n" -"\n" -"@@ -249,7 +249,7 @@\n" -" printf(\"I believe start of compressed data is %u\\n\", info->data_offset);\n" -" #endif\n" -"\n" -"- /* Set postion eight bytes from the end of the file. */\n" -"+ /* Set position eight bytes from the end of the file. */\n" -"\n" -" if (fseek(gzfile, -8, SEEK_END)) {\n" -" printf(\"error: fseek() returned non-zero\\n\");\n" -msgstr "" -"\n" -"$ svn diff -c 344 http://svn.example.com/repos/calc/trunk\n" -"\n" -"Index: integer.c\n" -"===================================================================\n" -"--- integer.c\t(revision 343)\n" -"+++ integer.c\t(revision 344)\n" -"@@ -147,7 +147,7 @@\n" -" case 6: sprintf(info->operating_system, \"HPFS (OS/2 or NT)\"); break;\n" -" case 7: sprintf(info->operating_system, \"Macintosh\"); break;\n" -" case 8: sprintf(info->operating_system, \"Z-System\"); break;\n" -"- case 9: sprintf(info->operating_system, \"CPM\"); break;\n" -"+ case 9: sprintf(info->operating_system, \"CP/M\"); break;\n" -" case 10: sprintf(info->operating_system, \"TOPS-20\"); break;\n" -" case 11: sprintf(info->operating_system, \"NTFS (Windows NT)\"); break;\n" -" case 12: sprintf(info->operating_system, \"QDOS\"); break;\n" -"@@ -164,7 +164,7 @@\n" -" low = (unsigned short) read_byte(gzfile); /* read LSB */\n" -" high = (unsigned short) read_byte(gzfile); /* read MSB */\n" -" high = high << 8; /* interpret MSB correctly */\n" -"- total = low + high; /* add them togethe for correct total */\n" -"+ total = low + high; /* add them together for correct total */\n" -"\n" -" info->extra_header = (unsigned char *) my_malloc(total);\n" -" fread(info->extra_header, total, 1, gzfile);\n" -"@@ -241,7 +241,7 @@\n" -" Store the offset with ftell() ! */\n" -"\n" -" if ((info->data_offset = ftell(gzfile))== -1) {\n" -"- printf(\"error: ftell() retturned -1.\\n\");\n" -"+ printf(\"error: ftell() returned -1.\\n\");\n" -" exit(1);\n" -" }\n" -"\n" -"@@ -249,7 +249,7 @@\n" -" printf(\"I believe start of compressed data is %u\\n\", info->data_offset);\n" -" #endif\n" -"\n" -"- /* Set postion eight bytes from the end of the file. */\n" -"+ /* Set position eight bytes from the end of the file. */\n" -"\n" -" if (fseek(gzfile, -8, SEEK_END)) {\n" -" printf(\"error: fseek() returned non-zero\\n\");\n" - -#. (para) -#: ../source/book.xml:7492 -msgid "The svn merge command is almost exactly the same. Instead of printing the differences to your terminal, however, it applies them directly to your working copy as local modifications:" -msgstr "svn merge命令几乎完全相同,但不是打印区别到你的终端,它会直接作为本地修改作用到你的本地拷贝:" - -#. (screen) -#: ../source/book.xml:7496 -#, no-wrap -msgid "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" -msgstr "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" - -#. (para) -#: ../source/book.xml:7503 -msgid "The output of svn merge shows that your copy of integer.c was patched. It now contains Sally's change—the change has been copied 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." -msgstr "svn merge的输出告诉你的integer.c文件已经作了补丁(patched),现在已经保留了Sally修改—修改从主干拷贝到你的私有分支的工作拷贝,现在作为一个本地修改,在这种情况下,要靠你审查本地的修改来确定它们工作正常。" - -#. (para) -#: ../source/book.xml:7510 -msgid "In another scenario, it's possible that things may not have gone so well, and that integer.c may have entered a conflicted state. You might need to resolve the conflict using standard procedures (see ), or if you decide that the merge was a bad idea altogether, simply give up and svn revert the local change." -msgstr "在另一种情境下,事情并不会运行得这样正常,也许integer.c也许会进入冲突状态,你必须使用标准过程(见)来解决这种状态,或者你认为合并是一个错误的决定,你只需要运行svn revert放弃本地修改。" - -#. (para) -#: ../source/book.xml:7516 -msgid "But assuming that you've reviewed the merged change, you can svn commit 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 porting changes." -msgstr "但是当你审查过你的合并结果后,你可以使用svn commit提交修改,在那一刻,修改已经合并到你的分支上了,在版本控制术语中,这种在分支之间拷贝修改的行为叫做搬运修改。" - -#. (para) -#: ../source/book.xml:7522 -#, fuzzy -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:" -msgstr "当你提交你的修改时,确定你的日志信息中说明你是从某一版本搬运了修改,举个例子:" - -#. (screen) -#: ../source/book.xml:7525 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"integer.c: ported r344 (spelling fixes) from trunk.\"\n" -"Sending integer.c\n" -"Transmitting file data .\n" -"Committed revision 360.\n" -msgstr "" -"\n" -"$ svn commit -m \"integer.c: ported r344 (spelling fixes) from trunk.\"\n" -"Sending integer.c\n" -"Transmitting file data .\n" -"Committed revision 360.\n" - -#. (para) -#: ../source/book.xml:7531 -msgid "A word of warning: while svn diff and svn merge are very similar in concept, they do have different syntax in many cases. Be sure to read about them in for details, or ask svn help. For example, svn merge 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:" -msgstr "一个警告:为什么svn diffsvn merge在概念上是很接近,但语法上有许多不同,一定阅读来查看其细节或者使用svn help查看帮助。举个例子,svn merge需要一个工作拷贝作为目标,就是一个地方来施展目录树修改,如果一个目标都没有指定,它会假定你要做以下某个普通的操作:" - -#. (para) -#: ../source/book.xml:7542 -msgid "You want to merge directory changes into your current working directory." -msgstr "你希望合并目录修改到工作拷贝的当前目录。" - -#. (para) -#: ../source/book.xml:7546 -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." -msgstr "你希望合并修改到你的当前工作目录的相同文件名的文件。" - -#. (para) -#: ../source/book.xml:7551 -msgid "If you are merging a directory and haven't specified a target path, svn merge 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, svn merge assumes the second case and tries to apply the changes to a local file with the same name." -msgstr "如果你合并一个目录而没有指定特定的目标,svn merge假定第一种情况,在你的当前目录应用修改。如果你合并一个文件,而这个文件(或是一个有相同的名字文件)在你的当前工作目录存在,svn merge假定第二种情况,你想对这个同名文件使用合并。" - -#. (para) -#: ../source/book.xml:7558 -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:" -msgstr "如果你希望修改应用到别的目录,你需要说出来。举个例子,你在工作拷贝的父目录,你需要指定目标目录:" - -#. (screen) -#: ../source/book.xml:7562 -#, no-wrap -msgid "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n" -"U my-calc-branch/integer.c\n" -msgstr "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n" -"U my-calc-branch/integer.c\n" - -#. (title) -#: ../source/book.xml:7570 -#, fuzzy -msgid "Advanced Merge Syntax" -msgstr "高级用户" - -#. (para) -#: ../source/book.xml:7572 -#, fuzzy -msgid "You've now seen some examples of the svn merge 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 svn merge behaves." -msgstr "你已经看到了svn merge命令的例子,你将会看到更多,如果你对合并是如何工作的感到迷惑,这并不奇怪,很多人和你一样。许多新用户(特别是对版本控制很陌生的用户)会对这个命令的正确语法感到不知所措,不知道怎样和什么时候使用这个特性,不要害怕,这个命令实际上比你想象的简单!有一个简单的技巧来帮助你理解svn merge的行为。" - -#. (para) -#: ../source/book.xml:7582 -msgid "The main source of confusion is the name of the command. The term merge 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 svn diff-and-apply, because that's all that happens: two repository trees are compared, and the differences are applied to a working copy." -msgstr "迷惑的主要原因是这个命令的名称,术语合并不知什么原因被用来表明分支的组合,或者是其他什么神奇的数据混合,这不是事实,一个更好的名称应该是svn diff-and-apply,这是发生的所有事件:首先两个版本库树比较,然后将区别应用到本地拷贝。" - -#. (para) -#: ../source/book.xml:7591 -msgid "If you're using svn merge to do basic copying of changes between branches, it will generally do the right thing automatically. For example, a command like" -msgstr "" - -#. (screen) -#: ../source/book.xml:7594 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn merge http://svn.example.com/repos/calc/some-branch\n" -msgstr "" -"\n" -"$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch\n" -"U my-calc-branch/integer.c\n" - -#. (para) -#: ../source/book.xml:7597 -msgid "... will attempt to duplicate any changes made on some-branch 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 newest branch changes that happened since you last merged." -msgstr "" - -#. (para) -#: ../source/book.xml:7605 -msgid "If you choose to use the svn merge command in all its full glory by giving it specific revision ranges to duplicate, then the command takes three main arguments:" -msgstr "" - -#. (para) -#: ../source/book.xml:7611 -msgid "An initial repository tree (often called the left side of the comparison)," -msgstr "初始的版本树(通常叫做比较的左边)," - -#. (para) -#: ../source/book.xml:7616 -msgid "A final repository tree (often called the right side of the comparison)," -msgstr "最终的版本树(通常叫做比较的右边)," - -#. (para) -#: ../source/book.xml:7621 -msgid "A working copy to accept the differences as local changes (often called the target of the merge)." -msgstr "一个接收区别的工作拷贝(通常叫做合并的目标)。" - -#. (para) -#: ../source/book.xml:7626 -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 svn add or svn delete commands yourself. If you like the results, you can commit them. If you don't like the results, you can simply svn revert all of the changes." -msgstr "一旦这三个参数指定以后,两个目录树将要做比较,比较结果将会作为本地修改应用到目标工作拷贝,当命令结束后,结果同你手工修改或者是使用svn addsvn delete没有什么区别,如果你喜欢这结果,你可以提交,如果不喜欢,你可以使用svn revert恢复修改。" - -#. (para) -#: ../source/book.xml:7635 -msgid "The syntax of svn merge allows you to specify the three necessary arguments rather flexibly. Here are some examples:" -msgstr "svn merge的语法允许非常灵活的指定三个必要的参数,如下是一些例子:" - -#. (screen) -#: ../source/book.xml:7638 -#, no-wrap -msgid "" -"\n" -"$ svn merge http://svn.example.com/repos/branch1@150 \\\n" -" http://svn.example.com/repos/branch2@212 \\\n" -" my-working-copy\n" -"\n" -"$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy\n" -"\n" -"$ svn merge -r 100:200 http://svn.example.com/repos/trunk\n" -msgstr "" -"\n" -"$ svn merge http://svn.example.com/repos/branch1@150 \\\n" -" http://svn.example.com/repos/branch2@212 \\\n" -" my-working-copy\n" -"\n" -"$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy\n" -"\n" -"$ svn merge -r 100:200 http://svn.example.com/repos/trunk\n" - -#. (para) -#: ../source/book.xml:7647 -msgid "The first syntax lays out all three arguments explicitly, naming each tree in the form URL@REV 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." -msgstr "第一种语法使用URL@REV的形式直接列出了所有参数,第二种语法可以用来作为比较同一个URL的不同版本的简略写法,最后一种语法表示工作拷贝是可选的,如果省略,默认是当前目录。" - -#. (title) -#: ../source/book.xml:7658 -msgid "Undoing Changes" -msgstr "取消修改" - -#. (para) -#: ../source/book.xml:7660 -msgid "Another common use for svn merge is to roll back a change that has already been committed. Suppose you're working away happily on a working copy of /calc/trunk, and you discover that the change made way back in revision 303, which changed integer.c, is completely wrong. It never should have been committed. You can use svn merge to undo the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying , or by an equivalent .)" -msgstr "svn merge另一个常用的做法是取消已经做得提交,假设你愉快的在/calc/trunk工作,你发现303版本对integer.c的修改完全错了,它不应该被提交,你可以使用svn merge取消这个工作拷贝上所作的操作,然后提交本地修改到版本库,你要做得只是指定一个相反的区别。(你可以通过指定完成。)" - -#. (screen) -#: ../source/book.xml:7673 -#, no-wrap -msgid "" -"\n" -"$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"\n" -"$ svn diff\n" -"…\n" -"# verify that the change is removed\n" -"…\n" -"\n" -"$ svn commit -m \"Undoing change committed in r303.\"\n" -"Sending integer.c\n" -"Transmitting file data .\n" -"Committed revision 350.\n" -msgstr "" -"\n" -"$ svn merge -c -303 http://svn.example.com/repos/calc/trunk\n" -"U integer.c\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"\n" -"$ svn diff\n" -"…\n" -"# verify that the change is removed\n" -"…\n" -"\n" -"$ svn commit -m \"Undoing change committed in r303.\"\n" -"Sending integer.c\n" -"Transmitting file data .\n" -"Committed revision 350.\n" - -#. (para) -#: ../source/book.xml:7690 -msgid "One way to think about a repository revision is as a specific group of changes (some version control systems call these changesets). By using the option, you can ask svn merge to apply a changeset, or whole range of changesets, to your working copy. In our case of undoing a change, we're asking svn merge to apply changeset #303 to our working copy backwards." -msgstr "我们可以把版本库修订版本想象成一组修改(一些版本控制系统叫做修改集),通过选项,你可以告诉svn merge来应用修改集或是一个修改集范围到你的工作拷贝,在我们的情况例子里,我们使用svn merge合并修改集#303到工作拷贝。" - -#. (title) -#: ../source/book.xml:7701 -msgid "Subversion and Changesets" -msgstr "Subversion 与修改集" - -#. (para) -#: ../source/book.xml:7703 -msgid "Everyone seems to have a slightly different definition of changeset, or at least a different expectation of what it means for a version control system to have changeset features. 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." -msgstr "每一个人对于修改集的概念都有些不一样,至少对于版本控制系统的修改集特性这一概念有着不同的期望,根据我们的用途,可以说修改集只是一个有唯一名字的一系列修改集合,修改也许包括文件内容的修改,目录树结构的修改,或是元数据的调整,更通常的说法,一个修改集就是我们可以引用的有名字的补丁。" - -#. (para) -#: ../source/book.xml:7712 -#, fuzzy -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 revision N 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, this issue was fixed by revision 9238.. Somebody can then run svn log -r9238 to read about the exact changeset which fixed the bug, and run svn diff -c 9238 to see the patch itself. And Subversion's merge command also uses revision numbers. You can merge specific changesets from one branch to another by naming them in the merge arguments: svn merge -c 9238 would merge changeset #9238 into your working copy." -msgstr "在Subversion里,一个全局的修订版本号N标示一个版本库中的树:它代表版本库在N次提交后的样子,它也是一个修改集的隐含名称:如果你比较树N与树N-1,你可以得到你提交的补丁。出于这个原因,想象版本N并不只是一棵树,也是一个修改集。如果你使用一个问题追踪工具来管理bug,你可以使用版本号来表示特定的补丁修正了bug—举个例子,这个问题是在版本9238修正的,然后其他人可以运行svn log -r9238来查看修正这个bug的修改集,或者使用svn diff -r9237:9238来看补丁本身。Subversion的合并命令也使用版本号作为参数,可以将特定修改集从一个分支合到另一个分支:svn merge -r9237:9238将会合并修改集#9238到本地拷贝。" - -#. (para) -#: ../source/book.xml:7731 -msgid "Keep in mind that rolling back a change like this is just like any other svn merge operation, so you should use svn status and svn diff to confirm that your work is in the state you want it to be in, and then use svn commit to send the final version to the repository. After committing, this particular changeset is no longer reflected in the HEAD revision." -msgstr "记住回滚修改和任何一个svn merge命令都一样,所以你应该使用svn status或是svn diff来确定你的工作处于期望的状态中,然后使用svn commit来提交,提交之后,这个特定修改集不会反映到HEAD版本了。" - -#. (para) -#: ../source/book.xml:7739 -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 calc project between revisions 303 and 349, they'll still see the bad change, right?" -msgstr "继续,你也许会想:好吧,这不是真的取消提交吧!是吧?版本303还依然存在着修改,如果任何人取出calc的303-349版本,他还会得到错误的修改,对吧?" - -#. (para) -#: ../source/book.xml:7759 -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 for a possible workaround." -msgstr "Subversion项目有计划,不管用什么方式,会有一天要实现svnadmin obliterate命令来进行永久删除操作,而此时可以看找到可行的方案。" - -#. (para) -#: ../source/book.xml:7744 -msgid "Yes, that's true. When we talk about removing a change, we're really talking about removing it from HEAD. 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 HEAD 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. " -msgstr "是的,这是对的。当我们说删除一个修改时,我们只是说从HEAD删除,原始的修改还保存在版本库历史中,在多数情况下,这是足够好的。大多数人只是对追踪HEAD版本感兴趣,在一些特定情况下,你也许希望毁掉所有提交的证据(或许某个人提交了一个秘密文件),这不是很容易的,因为Subversion设计用来不丢失任何信息,每个修订版本都是依赖其它修订版本的不可变目录树 ,从历史删除一个版本会导致多米诺效应,会在后面的版本导致混乱甚至会影响所有的工作拷贝。 " - -#. (title) -#: ../source/book.xml:7769 -msgid "Resurrecting Deleted Items" -msgstr "找回删除的项目" - -#. (para) -#: ../source/book.xml:7771 -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 HEAD revision, but the object still exists in earlier revisions. One of the most common questions new users ask is, How do I get my old file or directory back?." -msgstr "版本控制系统非常重要的一个特性就是它的信息从不丢失,即使当你删除了文件或目录,它也许从HEAD版本消失了 ,但这个对象依然存在于历史的早期版本 ,一个新手经常问到的问题是怎样找回我的文件和目录?。" - -#. (para) -#: ../source/book.xml:7777 -msgid "The first step is to define exactly which 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 peg revision syntax—foo.c@224 —mentioned back in .)" -msgstr "第一步首先要知道需要拯救的项目是什么,这里有个很有用的比喻:你可以认为任何存在于版本库的对象生活在一个二维的坐标系统里,第一维是一个特定的版本树,第二维是在树中的路径,所以你的文件或目录的任何版本可以通过这样一对坐标定义。(记住常见的peg修订版本语法— foo.c@224 — 在前面的提到过。 )" - -#. (para) -#: ../source/book.xml:7788 -msgid "First, you might need to use svn log to discover the exact coordinate pair you wish to resurrect. A good strategy is to run svn log --verbose in a directory which used to contain your deleted item. The 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 grep, or perhaps via an incremental search in an editor)." -msgstr "首先,你需要svn log来察看你需要找回的坐标对,一个好的策略是使用svn log --verbose来察看包含删除项目的目录,--verbose选项显示所有改变的项目的每一个版本 ,你只需要找出你删除文件或目录的那一个版本。你可以通过目测找出这个版本,也可以使用另一种工具来检查日志的输出 (通过grep或是在编辑器里增量查找)。" - -#. (screen) -#: ../source/book.xml:7798 -#, no-wrap -msgid "" -"\n" -"$ cd parent-dir\n" -"$ svn log -v\n" -"…\n" -"------------------------------------------------------------------------\n" -"r808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines\n" -"Changed paths:\n" -" D /calc/trunk/real.c\n" -" M /calc/trunk/integer.c\n" -"\n" -"Added fast fourier transform functions to integer.c.\n" -"Removed real.c because code now in double.c.\n" -"…\n" -msgstr "" -"\n" -"$ cd parent-dir\n" -"$ svn log -v\n" -"…\n" -"------------------------------------------------------------------------\n" -"r808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines\n" -"Changed paths:\n" -" D /calc/trunk/real.c\n" -" M /calc/trunk/integer.c\n" -"\n" -"Added fast fourier transform functions to integer.c.\n" -"Removed real.c because code now in double.c.\n" -"…\n" - -#. (para) -#: ../source/book.xml:7812 -msgid "In the example, we're assuming that you're looking for a deleted file real.c. 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 /calc/trunk/real.c from revision 807." -msgstr "在这个例子里,你可以假定你正在找已经删除了的文件real.c,通过查找父目录的历史 ,你知道这个文件在808版本被删除,所以存在这个对象的版本在此之前 。结论:你想从版本807找回/calc/trunk/real.c。" - -#. (para) -#: ../source/book.xml:7820 -msgid "That was the hard part—the research. Now that you know what you want to restore, you have two different choices." -msgstr "以上是最重要的部分—重新找到你需要恢复的对象。现在你已经知道该恢复的文件,而你有两种选择。" - -#. (para) -#: ../source/book.xml:7823 -#, fuzzy -msgid "One option is to use svn merge to apply revision 808 in reverse. (We've already discussed how to undo changes, see .) This would have the effect of re-adding real.c as a local modification. The file would be scheduled for addition, and after a commit, the file would again exist in HEAD." -msgstr "一种是对版本反向使用svn merge到808(我们已经学会了如何取消修改,见),这样会重新添加real.c,这个文件会列入增加的计划,经过一次提交,这个文件重新回到HEAD。" - -#. (para) -#: ../source/book.xml:7831 -msgid "In this particular example, however, this is probably not the best strategy. Reverse-applying revision 808 would not only schedule real.c for addition, but the log message indicates that it would also undo certain changes to integer.c, which you don't want. Certainly, you could reverse-merge revision 808 and then svn revert the local modifications to integer.c, but this technique doesn't scale well. What if there were 90 files changed in revision 808?" -msgstr "在这个例子里,这不是一个好的策略,这样做不仅把real.c加入添加到计划,也取消了对integer.c的修改,而这不是你期望的。确实,你可以恢复到版本808,然后对integer.c执行取消svn revert操作,但这样的操作无法扩大使用,因为如果从版本808修改了90个文件怎么办?" - -#. (para) -#: ../source/book.xml:7841 -msgid "A second, more targeted strategy is not to use svn merge at all, but rather the svn copy command. Simply copy the exact revision and path coordinate pair from the repository to your working copy:" -msgstr "所以第二个方法不是使用svn merge,而是使用svn copy命令,精确的拷贝版本和路径坐标对到你的工作拷贝:" - -#. (screen) -#: ../source/book.xml:7846 -#, no-wrap -msgid "" -"\n" -"$ svn copy -r 807 \\\n" -" http://svn.example.com/repos/calc/trunk/real.c ./real.c\n" -"\n" -"$ svn status\n" -"A + real.c\n" -"\n" -"$ svn commit -m \"Resurrected real.c from revision 807, /calc/trunk/real.c.\"\n" -"Adding real.c\n" -"Transmitting file data .\n" -"Committed revision 1390.\n" -msgstr "" -"\n" -"$ svn copy -r 807 \\\n" -" http://svn.example.com/repos/calc/trunk/real.c ./real.c\n" -"\n" -"$ svn status\n" -"A + real.c\n" -"\n" -"$ svn commit -m \"Resurrected real.c from revision 807, /calc/trunk/real.c.\"\n" -"Adding real.c\n" -"Transmitting file data .\n" -"Committed revision 1390.\n" - -#. (para) -#: ../source/book.xml:7858 -msgid "The plus sign in the status output indicates that the item isn't merely scheduled for addition, but scheduled for addition with history. Subversion remembers where it was copied from. In the future, running svn log 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 real.c isn't really new; it's a direct descendant of the original, deleted file." -msgstr "加号标志表明这个项目不仅仅是计划增加中,而且还包含了历史,Subversion记住了它是从哪个拷贝过来的。在将来,对这个文件运行svn log会看到这个文件在版本807之前的历史,换句话说,real.c不是新的,而是原先删除的那一个的后代。" - -#. (para) -#: ../source/book.xml:7867 -msgid "Although our example shows us resurrecting a file, note that these same techniques work just as well for resurrecting deleted directories." -msgstr "尽管我们的例子告诉我们如何找回文件,对于恢复删除的目录也是一样的。" - -#. (title) -#: ../source/book.xml:7874 -#, fuzzy -msgid "Manually Merging a Branch" -msgstr "创建分支" - -#. (para) -#: ../source/book.xml:7876 -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:" -msgstr "" - -#. (para) -#: ../source/book.xml:7880 -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." -msgstr "为了完成这个例子,我们将时间往前推进,假定已经过了几天,在主干和你的分支上都有许多更改,假定你完成了分支上的工作,已经完成了特性或bug修正,你想合并所有分支的修改到主干上,让别人也可以使用。" - -#. (para) -#: ../source/book.xml:7887 -msgid "So how do we use svn merge 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 /calc/trunk." -msgstr "这种场景下如何使用svn merge?记住这个命令比较两个目录树,然后应用比较结果到工作拷贝,所以要接受这种变化,你需要主干的工作拷贝,我们假设你有一个最初的主干工作拷贝(完全更新),或者是你最近取出了/calc/trunk的一个干净的工作拷贝。" - -#. (para) -#: ../source/book.xml:7894 -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 wrong, and has burned many a new user! Since svn merge operates like svn diff, comparing the latest trunk and branch trees will not 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 removal of trunk changes that never happened on your branch." -msgstr "但是要哪两个树进行比较呢?乍一看,回答很明确,只要比较最新的主干与分支。但是你要意识到—这个想法是错误的,伤害了许多新用户!因为svn merge的操作很像svn diff,比较最新的主干和分支树不仅仅会描述你在分支上所作的修改,这样的比较会展示太多的不同,不仅包括分支上的增加,也包括了主干上的删除操作,而这些删除根本就没有在分支上发生过。" - -#. (para) -#: ../source/book.xml:7905 -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 svn log 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 HEAD revision. That means you want to compare revisions 341 and HEAD of your branch directory, and apply those differences to a working copy of the trunk." -msgstr "为了表示你的分支上的修改,你只需要比较分支的初始状态与最终状态,在你的分支上使用svn log命令,你可以看到你的分支在341版本建立,你的分支最终的状态用HEAD版本表示,这意味着你希望能够比较版本341和HEAD的分支目录,然后应用这些分支的修改到主干目录的工作拷贝。" - -#. (para) -#: ../source/book.xml:7915 -msgid "A nice way of finding the revision in which a branch was created (the base of the branch) is to use the option to svn log. 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 will halt log output as soon as svn log detects that its target was copied or renamed." -msgstr "查找分支产生的版本(分支的基准)的最好方法是在svn log中使用选项,log子命令通常会显示所有关于分支的变化,包括创建分支的过程,就好像你在主干上一样,会在svn log检测到目标拷贝或者改名时中止日志输出。" - -#. (para) -#: ../source/book.xml:7925 -msgid "So in our continuing example," -msgstr "所以,在我们的例子里," - -#. (screen) -#: ../source/book.xml:7926 -#, no-wrap -msgid "" -"\n" -"$ svn log -v --stop-on-copy \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"…\n" -"------------------------------------------------------------------------\n" -"r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" A /calc/branches/my-calc-branch (from /calc/trunk:340)\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svn log -v --stop-on-copy \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"…\n" -"------------------------------------------------------------------------\n" -"r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines\n" -"Changed paths:\n" -" A /calc/branches/my-calc-branch (from /calc/trunk:340)\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:7937 -msgid "As expected, the final revision printed by this command is the revision in which my-calc-branch was created by copying." -msgstr "正如所料,最后打印出的版本正是由my-calc-branch拷贝生成的版本。" - -#. (para) -#: ../source/book.xml:7941 -msgid "Here's the final merging procedure, then:" -msgstr "如下是最终的合并过程,然后:" - -#. (screen) -#: ../source/book.xml:7942 -#, no-wrap -msgid "" -"\n" -"$ cd calc/trunk\n" -"$ svn update\n" -"At revision 405.\n" -"\n" -"$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"M button.c\n" -"M Makefile\n" -"\n" -"# ...examine the diffs, compile, test, etc...\n" -"\n" -"$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n" -"Sending integer.c\n" -"Sending button.c\n" -"Sending Makefile\n" -"Transmitting file data ...\n" -"Committed revision 406.\n" -msgstr "" -"\n" -"$ cd calc/trunk\n" -"$ svn update\n" -"At revision 405.\n" -"\n" -"$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"\n" -"$ svn status\n" -"M integer.c\n" -"M button.c\n" -"M Makefile\n" -"\n" -"# ...examine the diffs, compile, test, etc...\n" -"\n" -"$ svn commit -m \"Merged my-calc-branch changes r341:405 into the trunk.\"\n" -"Sending integer.c\n" -"Sending button.c\n" -"Sending Makefile\n" -"Transmitting file data ...\n" -"Committed revision 406.\n" - -#. (para) -#: ../source/book.xml:7966 -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." -msgstr "再次说明,日志信息中详细描述了合并到主干的的修改范围,记住一定要这么做,这是你以后需要的重要信息。" - -#. (para) -#: ../source/book.xml:7970 -#, fuzzy -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 HEAD 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 new on your branch since the last time you merged. The trick is to figure out what's new." -msgstr "举个例子,你希望在分支上继续工作一周,来进一步加强你的修正,这时版本库的HEAD版本是480,你准备好了另一次合并,但是我们在提到过,你不想合并已经合并的内容,你只想合并新的东西,技巧就是指出什么是的。" - -#. (para) -#: ../source/book.xml:7979 -msgid "The first step is to run svn log on the trunk, and look for a log message about the last time you merged from the branch:" -msgstr "第一步是在主干上运行svn log察看最后一次与分支合并的日志信息:" - -#. (screen) -#: ../source/book.xml:7982 -#, no-wrap -msgid "" -"\n" -"$ cd calc/trunk\n" -"$ svn log\n" -"…\n" -"------------------------------------------------------------------------\n" -"r406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line\n" -"\n" -"Merged my-calc-branch changes r341:405 into the trunk.\n" -"------------------------------------------------------------------------\n" -"…\n" -msgstr "" -"\n" -"$ cd calc/trunk\n" -"$ svn log\n" -"…\n" -"------------------------------------------------------------------------\n" -"r406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line\n" -"\n" -"Merged my-calc-branch changes r341:405 into the trunk.\n" -"------------------------------------------------------------------------\n" -"…\n" - -#. (para) -#: ../source/book.xml:7993 -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 HEAD." -msgstr "阿哈!因为分支上341到405之间的所有修改已经在版本406合并了,现在你只需要合并分支在此之后的修改—通过比较406和HEAD。" - -#. (screen) -#: ../source/book.xml:7998 -#, no-wrap -msgid "" -"\n" -"$ cd calc/trunk\n" -"$ svn update\n" -"At revision 480.\n" -"\n" -"# We notice that HEAD is currently 480, so we use it to do the merge:\n" -"\n" -"$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"\n" -"$ svn commit -m \"Merged my-calc-branch changes r406:480 into the trunk.\"\n" -"Sending integer.c\n" -"Sending button.c\n" -"Sending Makefile\n" -"Transmitting file data ...\n" -"Committed revision 481.\n" -msgstr "" -"\n" -"$ cd calc/trunk\n" -"$ svn update\n" -"At revision 480.\n" -"\n" -"# We notice that HEAD is currently 480, so we use it to do the merge:\n" -"\n" -"$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"\n" -"$ svn commit -m \"Merged my-calc-branch changes r406:480 into the trunk.\"\n" -"Sending integer.c\n" -"Sending button.c\n" -"Sending Makefile\n" -"Transmitting file data ...\n" -"Committed revision 481.\n" - -#. (para) -#: ../source/book.xml:8017 -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." -msgstr "现在主干有了分支上第二波修改的完全结果,此刻,你可以删除你的分支(我们会在以后讨论),或是继续在你分支上工作,重复这个步骤。" - -#. (title) -#: ../source/book.xml:8026 -msgid "Merge Conflicts" -msgstr "合并冲突" - -#. (para) -#: ../source/book.xml:8028 -msgid "Just like the svn update command, svn merge applies changes to your working copy. And therefore it's also capable of creating conflicts. The conflicts produced by svn merge, however, are sometimes different, and this section explains those differences." -msgstr "就像svn update命令,svn merge会把修改应用到工作拷贝,因此它也会造成冲突,因为svn merge造成的冲突有时候会有些不同,本小节会解释这些区别。" - -#. (para) -#: ../source/book.xml:8034 -msgid "To begin with, assume that your working copy has no local edits. When you svn update to a particular revision, the changes sent by the server will always apply cleanly 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." -msgstr "作为开始,我们假定本地没有修改,当你svn update到一个特定修订版本时,修改会干净的应用到工作拷贝,服务器产生比较两树的增量数据:一个工作拷贝和你关注的版本树的虚拟快照,因为比较的左边同你拥有的完全相同,增量数据确保你把工作拷贝转化到右边的树。" - -#. (para) -#: ../source/book.xml:8044 -#, fuzzy -msgid "But svn merge has no such guarantees and can be much more chaotic: the advanced user can ask the server to compare any 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. svn merge will do its best to apply as much of the delta as possible, but some parts may be impossible. Just as the Unix patch command sometimes complains about failed hunks, svn merge will complain about skipped targets:" -msgstr "但是svn merge没有这样的保证,会导致很多的混乱:用户可以询问服务器比较任何两个树,即使一个与工作拷贝毫不相关的!这意味着有潜在的人为错误,用户有时候会比较两个错误的树,创建的增量数据不会干净的应用,svn merge会尽力应用更多的增量数据,但是有一些部分也许会难以完成,就像Unix下patch命令有时候会报告failed hunks错误,svn merge会报告skipped targets:" - -#. (screen) -#: ../source/book.xml:8056 -#, fuzzy, no-wrap -msgid "" -"\n" -" $ svn merge -r 1288:1351 http://svn.example.com/repos/branch\n" -" U foo.c\n" -" U bar.c\n" -" Skipped missing target: 'baz.c'\n" -" U glub.c\n" -" C glorb.h\n" -"\n" -" $\n" -" " -msgstr "" -"\n" -"$ svn merge -r 1288:1351 http://svn.example.com/repos/branch\n" -"U foo.c\n" -"U bar.c\n" -"Skipped missing target: 'baz.c'\n" -"U glub.c\n" -"C glorb.h\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:8066 -msgid "In the previous example it might be the case that baz.c 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 skipped 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 (svn revert --recursive), delete any unversioned files or directories left behind after the revert, and re-run svn merge with different arguments." -msgstr "在前一个例子中,baz.c也许会存在于比较的两个分支快照里,但工作拷贝里不存在,比较的增量数据要应用到这个文件,这种情况下会发生什么?skipped信息意味着用户可能是在比较错误的两棵树,这是经典的用户错误,当发生这种情况,可以使用迭代恢复(svn revert --recursive)合并所作的修改,删除恢复后留下的所有未版本化的文件和目录,并且使用另外的参数运行svn merge。" - -#. (para) -#: ../source/book.xml:8079 -msgid "Also notice that the previous example shows a conflict happening on glorb.h. We already stated that the working copy has no local edits: how can a conflict possibly happen? Again, because the user can use svn merge 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." -msgstr "也应当注意前一个例子显示glorb.h发生了冲突,我们已经规定本地拷贝没有修改:冲突怎么会发生呢?因为用户可以使用svn merge将过去的任何变化应用到当前工作拷贝,变化包含的文本修改也许并不能干净的应用到工作拷贝文件,即使这些文件没有本地修改。" - -#. (para) -#: ../source/book.xml:8087 -msgid "Another small difference between svn update and svn merge are the names of the full-text files created when a conflict happens. In , we saw that an update produces files named filename.mine, filename.rOLDREV, and filename.rNEWREV. When svn merge produces a conflict, though, it creates three files named filename.working, filename.left, and filename.right. In this case, the terms left and right 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." -msgstr "另一个svn updatesvn merge的小区别是冲突产生的文件的名字不同,在,我们看到过更新产生的文件名字为filename.minefilename.rOLDREVfilename.rNEWREV,当svn merge产生冲突时,它产生的三个文件分别为 filename.workingfilename.leftfilename.right。在这种情况下,术语leftright表示了两棵树比较时的两边,在两种情况下,不同的名字会帮助你区分冲突是因为更新造成的还是合并造成的。" - -#. (title) -#: ../source/book.xml:8109 -#, fuzzy -msgid "Blocking Changes" -msgstr "取消修改" - -#. (para) -#: ../source/book.xml:8111 -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." -msgstr "" - -#. (title) -#: ../source/book.xml:8121 -msgid "Logging and Blaming" -msgstr "" - -#. (para) -#: ../source/book.xml:8123 -msgid "###TODO: demonstrate 'svn log -g' and 'svn blame -g', and explain why they're useful." -msgstr "" - -#. (title) -#: ../source/book.xml:8129 -msgid "Noticing or Ignoring Ancestry" -msgstr "关注还是忽视祖先" - -#. (para) -#: ../source/book.xml:8131 -msgid "When conversing with a Subversion developer, you might very likely hear reference to the term ancestry. 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." -msgstr "当与Subversion开发者交谈时你一定会听到提及术语祖先,这个词是用来描述两个对象的关系:如果他们互相关联,一个对象就是另一个的祖先,或者相反。" - -#. (para) -#: ../source/book.xml:8137 -msgid "For example, suppose you commit revision 100, which includes a change to a file foo.c. Then foo.c@99 is an ancestor of foo.c@100. On the other hand, suppose you commit the deletion of foo.c in revision 101, and then add a new file by the same name in revision 102. In this case, foo.c@99 and foo.c@102 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 ancestry." -msgstr "举个例子,假设你提交版本100,包括对foo.c的修改,则foo.c@99是foo.c@100的一个祖先,另一方面,假设你在版本101删除这个文件,而在102版本提交一个同名的文件,在这个情况下,foo.c@99foo.c@102看起来是关联的(有同样的路径),但是事实上他们是完全不同的对象,它们并不共享同一个历史或者说祖先。" - -#. (para) -#: ../source/book.xml:8149 -msgid "The reason for bringing this up is to point out an important difference between svn diff and svn merge. The former command ignores ancestry, while the latter command is quite sensitive to it. For example, if you asked svn diff to compare revisions 99 and 102 of foo.c, you would see line-based diffs; the diff command is blindly comparing two paths. But if you asked svn merge 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:" -msgstr "指出svn diffsvn merge区别的重要性在于,前一个命令忽略祖先,如果你询问svn diff来比较文件foo.c的版本99和102,你会看到行为基础的区别,diff命令只是盲目的比较两条路径,但是如果你使用svn merge是比较同样的两个对象,它会注意到他们是不关联的,而且首先尝试删除旧文件,然后添加新文件,输出会是一个删除紧接着一个增加:" - -#. (screen) -#: ../source/book.xml:8161 -#, fuzzy, no-wrap -msgid "" -"\n" -" D foo.c\n" -" A foo.c\n" -" " -msgstr "" -"\n" -"$ svn add foo.c \n" -"A foo.c\n" - -#. (para) -#: ../source/book.xml:8165 -msgid "Most merges involve comparing trees that are ancestrally related to one another, and therefore svn merge defaults to this behavior. Occasionally, however, you may want the merge 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 ). If you asked svn merge 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 svn merge to do a path-based comparison only, ignoring any relations between files and directories. Add the option to your merge command, and it will behave just like svn diff. (And conversely, the option will cause svn diff to behave like the merge command.)" -msgstr "大多数合并包括比较包括祖先关联的两条树,因此svn merge这样运作,然而,你也许会希望merge命令能够比较两个不相关的目录树,举个例子,你有两个目录树分别代表了卖主软件项目的不同版本(见),如果你使用svn merge进行比较,你会看到第一个目录树被删除,而第二个树添加上!在这个情况下,你仅仅是希望svn merge以路径为基础比较两棵树,而忽略文件和目录的不相关性,当为合并命令添加选项时,就会像svn diff一样工作。(相反,会导致svn diffmerge命令一样工作。)" - -#. (title) -#: ../source/book.xml:8187 -msgid "Merges and Moves" -msgstr "合并和移动" - -#. (para) -#: ../source/book.xml:8189 -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?" -msgstr "一个普遍的愿望是重构源程序,特别是Java软件项目。在改名中文件和目录变乱,通常导致每个项目成员的极大破坏。听起来好像应该使用分支,不是吗?只是创建分支,变乱事情,然后合并回主干,不对吗?" - -#. (para) -#: ../source/book.xml:8196 -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 update command isn't as robust as it should be, particularly when dealing with copy and move operations." -msgstr "唉,这个场景下这样并不正确,可以看作Subversion当前的弱点,这个问题是因为Subversion的update还不是足够的强壮,特别是针对拷贝和移动操作。" - -#. (para) -#: ../source/book.xml:8201 -msgid "When you use svn copy 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 svn update or svn merge. Instead of telling the client, Copy that file you already have to this new location, 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 true renames—the svn move command is nothing more than an aggregation of svn copy and svn delete." -msgstr "当你使用svn copy复制文件时,版本库会记住新文件的出处,但是它不能将这个信息传递给使用svn updatesvn merge的客户端,不是告诉客户端 将文件拷贝到新的位置,而是传递一整个新文件。这样会导致问题,特别是因为这件事也发生在改名的文件。 一个鲜为人知的事实是Subversion缺乏真正的重命名—svn move命令只是一个svn copysvn delete的组合。" - -#. (para) -#: ../source/book.xml:8214 -msgid "For example, suppose that while working on your private branch, you rename integer.c to whole.c. 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 trunk, Sally has committed some improvements to integer.c. Now you decide to merge your branch to the trunk:" -msgstr "例如,假定我们在一个私有分支工作,你将integer.c改名为whole.c,你这是在分支上创建了原来文件的一个拷贝,并且删除了原来的文件。同时,回到trunk,Sally提交了一些integer.c的修改,所以你需要将分支合并到主干:" - -#. (screen) -#: ../source/book.xml:8222 -#, fuzzy, no-wrap -msgid "" -"\n" -" $ cd calc/trunk\n" -"\n" -" $ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -" D integer.c\n" -" A whole.c\n" -" " -msgstr "" -"\n" -"$ cd calc/trunk\n" -"\n" -"$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"D integer.c\n" -"A whole.c\n" - -#. (para) -#: ../source/book.xml:8229 -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 integer.c file (the one containing Sally's latest changes), and blindly added your new whole.c file—which is a duplicate of the older version of integer.c. The net effect is that merging your rename to the branch has removed Sally's recent changes from the latest revision!" -msgstr "第一眼看起来不是很差,但是很可能这不是你和Sally希望的,合并操作已经删除了最新版本的integer.c(包含了Sally最新的修改),而且盲目的添加了你的whole.c文件—是旧版本的integer.c复制品。最终的结果是将你的rename合并到分支,并且从最新修订版本删除了Sally最近的修改。" - -#. (para) -#: ../source/book.xml:8239 -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." -msgstr "这不是真的数据丢失;Sally的修改还在版本库的历史中,但是。在Subversion改进之前,最好小心对分支进行合并和改名。" - -#. (title) -#: ../source/book.xml:8249 -#, fuzzy -msgid "Blocking Pre-1.5 Clients" -msgstr "锁定策略" - -#. (para) -#: ../source/book.xml:8251 -msgid "###TODO: Why you might want to do this. (How did we decide to do this??)" -msgstr "" - -#. (title) -#: ../source/book.xml:8260 -msgid "Common Branching Patterns" -msgstr "常用分支模式" - -#. (para) -#: ../source/book.xml:8262 -msgid "There are many different uses for branching and svn merge, and this section describes the most common ones you're likely to run into." -msgstr "分支和svn merge有很多不同的用法,这个小节描述了最常见的用法。" - -#. (para) -#: ../source/book.xml:8265 -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." -msgstr "版本控制在软件开发中广泛使用,这里是团队里程序员最常用的两种分支/合并模式的介绍,如果你不是使用Subversion软件开发,可随意跳过本小节,如果你是第一次使用版本控制的软件开发者,请更加注意,以下模式被许多老兵当作最佳实践,这个过程并不只是针对Subversion,在任何版本控制系统中都一样,但是在这里使用Subversion术语会感觉更方便一点。" - -#. (title) -#: ../source/book.xml:8279 -msgid "Release Branches" -msgstr "发布分支" - -#. (para) -#: ../source/book.xml:8281 -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." -msgstr "大多数软件存在这样一个生命周期:编码、测试、发布,然后重复。这样有两个问题,第一,开发者需要在质量保证小组测试假定稳定版本时继续开发新特性,新工作在软件测试时不可以中断,第二,小组必须一直支持老的发布版本和软件;如果一个bug在最新的代码中发现,它一定也存在已发布的版本中,客户希望立刻得到错误修正而不必等到新版本发布。" - -#. (para) -#: ../source/book.xml:8292 -msgid "Here's where version control can help. The typical procedure looks like this:" -msgstr "这是版本控制可以做的帮助,典型的过程如下:" - -#. (para) -#: ../source/book.xml:8296 -msgid "Developers commit all new work to the trunk. Day-to-day changes are committed to /trunk: new features, bugfixes, and so on." -msgstr "开发者提交所有的新特性到主干。 每日的修改提交到/trunk:新特性,bug修正和其他。" - -#. (para) -#: ../source/book.xml:8304 -msgid "The trunk is copied to a release branch. When the team thinks the software is ready for release (say, a 1.0 release), then /trunk might be copied to /branches/1.0." -msgstr "这个主干被拷贝到发布分支。 当小组认为软件已经做好发布的准备(如,版本1.0)然后/trunk会被拷贝到/branches/1.0。" - -#. (para) -#: ../source/book.xml:8313 -msgid "Teams continue to work in parallel. One team begins rigorous testing of the release branch, while another team continues new work (say, for version 2.0) on /trunk. 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 frozen for final testing right before a release." -msgstr "项目组继续并行工作,一个小组开始对分支进行严酷的测试,同时另一个小组在/trunk继续新的工作(如,准备2.0),如果一个bug在任何一个位置被发现,错误修正需要来回运送。然而这个过程有时候也会结束,例如分支已经为发布前的最终测试停滞了。" - -#. (para) -#: ../source/book.xml:8324 -msgid "The branch is tagged and released. When testing is complete, /branches/1.0 is copied to /tags/1.0.0 as a reference snapshot. The tag is packaged and released to customers." -msgstr "分支已经作了标签并且发布,当测试结束,/branches/1.0作为引用快照已经拷贝到/tags/1.0.0,这个标签被打包发布给客户。" - -#. (para) -#: ../source/book.xml:8333 -msgid "The branch is maintained over time. While work continues on /trunk for version 2.0, bugfixes continue to be ported from /trunk to /branches/1.0. When enough bugfixes have accumulated, management may decide to do a 1.0.1 release: /branches/1.0 is copied to /tags/1.0.1, and the tag is packaged and released." -msgstr "分支多次维护。当继续在/trunk上为版本2.0工作,bug修正继续从/trunk运送到/branches/1.0,如果积累了足够的bug修正,管理部门决定发布1.0.1版本:拷贝/branches/1.0/tags/1.0.1,标签被打包发布。" - -#. (para) -#: ../source/book.xml:8345 -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 maintenance mode, and a number of tags representing final shipped versions." -msgstr "整个过程随着软件的成熟不断重复:当2.0完成,一个新的2.0分支被创建,测试、打标签和最终发布,经过许多年,版本库结束了许多版本发布,进入了维护模式,许多标签代表了最终的发布版本。" - -#. (title) -#: ../source/book.xml:8355 -msgid "Feature Branches" -msgstr "特性分支" - -#. (para) -#: ../source/book.xml:8357 -msgid "A feature branch 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 /trunk. It's a temporary branch created to work on a complex change without interfering with the stability of /trunk. 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." -msgstr "一个特性分支是本章中那个重要例子中的分支,你正在那个分支上工作,而Sally还在/trunk继续工作,这是一个临时分支,用来作复杂的修改而不会干扰/trunk的稳定性,不象发布分支(也许要永远支持),特性分支出生,使用了一段时间,合并到主干,然后最终被删除掉,它们在有限的时间里有用。" - -#. (para) -#: ../source/book.xml:8367 -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 /trunk 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 ever 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." -msgstr "还有,关于是否创建特性分支的项目政策也变化广泛,一些项目永远不使用特性分支:大家都可以提交到/trunk,好处是系统的简单—没有人需要知道分支和合并,坏处是主干会经常不稳定或者不可用,另外一些项目使用分支达到极限:没有修改曾经直接提交到主干,即使最细小的修改都要创建短暂的分支,然后小心的审核合并到主干,然后删除分支,这样系统保持主干一直稳定和可用,但是造成了巨大的负担。" - -#. (para) -#: ../source/book.xml:8381 -msgid "Most projects take a middle-of-the-road approach. They commonly insist that /trunk 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 /trunk were never destabilized), would it be too large a change to review? If the answer to that question is yes, 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." -msgstr "许多项目采用折中的方式,坚持每次编译/trunk并进行回归测试,只有需要多次不稳定提交时才需要一个特性分支,这个规则可以用这样一个问题检验:如果开发者在好几天里独立工作,一次提交大量修改(这样/trunk就不会不稳定。),是否会有太多的修改要来回顾?如果答案是,这些修改应该在特性分支上进行,因为开发者增量的提交修改,你可以容易的回头检查。" - -#. (para) -#: ../source/book.xml:8394 -msgid "Finally, there's the issue of how to best keep a feature branch in sync 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." -msgstr "最终,有一个问题就是怎样保持一个特性分支同步于工作中的主干,在前面提到过,在一个分支上工作数周或几个月是很有风险的,主干的修改也许会持续涌入,因为这一点,两条线的开发会区别巨大,合并分支回到主干会成为一个噩梦。" - -#. (para) -#: ../source/book.xml:8401 -#, fuzzy -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." -msgstr "这种情况最好通过有规律的将主干合并到分支来避免,制定这样一个政策:每周将上周的修改合并到分支,注意这样做时需要小心,需要手工记录合并的过程,以避免重复的合并(在描述过),你需要小心的撰写合并的日志信息,精确的描述合并包括的范围(在中描述过),这看起来像是胁迫,可是实际上是容易做到的。" - -#. (para) -#: ../source/book.xml:8409 -msgid "At some point, you'll be ready to merge the synchronized 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:" -msgstr "在一些时候,你已经准备好了将同步的特性分支合并回到主干,为此,开始做一次将主干最新修改和分支的最终合并,这样以后,除了你的分支修改的部分,最新的分支和主干将会绝对一致,所以在这个特别的例子里,你会通过直接比较分支和主干来进行合并:" - -#. (para) -#: ../source/book.xml:8416 -msgid "###TODO: SIMPLIFY THIS EXAMPLE TO SHOW MERGE-TRACKING" -msgstr "" - -#. (screen) -#: ../source/book.xml:8417 -#, fuzzy, no-wrap -msgid "" -"\n" -" $ cd trunk-working-copy\n" -"\n" -" $ svn update\n" -" At revision 1910.\n" -"\n" -" $ svn merge http://svn.example.com/repos/calc/trunk@1910 \\\n" -" http://svn.example.com/repos/calc/branches/mybranch@1910\n" -" U real.c\n" -" U integer.c\n" -" A newdirectory\n" -" A newdirectory/newfile\n" -" …\n" -" " -msgstr "" -"\n" -"$ cd trunk-working-copy\n" -"\n" -"$ svn update\n" -"At revision 1910.\n" -"\n" -"$ svn merge http://svn.example.com/repos/calc/trunk@1910 \\\n" -" http://svn.example.com/repos/calc/branches/mybranch@1910\n" -"U real.c\n" -"U integer.c\n" -"A newdirectory\n" -"A newdirectory/newfile\n" -"…\n" - -#. (para) -#: ../source/book.xml:8431 -msgid "By comparing the HEAD revision of the trunk with the HEAD 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." -msgstr "通过比较HEAD修订版本的主干和HEAD修订版本的分支,你确定了只在分支上的增量信息,两条开发线都有了分枝的修改。" - -#. (para) -#: ../source/book.xml:8436 -msgid "Another way of thinking about this pattern is that your weekly sync of trunk to branch is analogous to running svn update in a working copy, while the final merge step is analogous to running svn commit from a working copy. After all, what else is a working copy but a very shallow private branch? It's a branch that's only capable of storing one change at a time." -msgstr "可以用另一种考虑这种模式,你每周按时同步分支到主干,类似于在工作拷贝执行svn update的命令,最终的合并操作类似于在工作拷贝运行svn commit,毕竟,工作拷贝不就是一个非常浅的分支吗?只是它一次只可以保存一个修改。" - -#. (title) -#: ../source/book.xml:8451 -msgid "Traversing Branches" -msgstr "使用分支" - -#. (para) -#: ../source/book.xml:8453 -msgid "The svn switch 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 /calc/trunk to mirror the new branch location:" -msgstr "svn switch命令改变存在的工作拷贝到另一个分支,然而这个命令在分支上工作时不是严格必要的,它只是提供了一个快捷方式。在前面的例子里,完成了私有分支的建立,你取出了新目录的工作拷贝,相反,你可以简单的告诉Subversion改变你的/calc/trunk的工作拷贝到分支的路径:" - -#. (screen) -#: ../source/book.xml:8462 -#, no-wrap -msgid "" -"\n" -"$ cd calc\n" -"\n" -"$ svn info | grep URL\n" -"URL: http://svn.example.com/repos/calc/trunk\n" -"\n" -"$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"Updated to revision 341.\n" -"\n" -"$ svn info | grep URL\n" -"URL: http://svn.example.com/repos/calc/branches/my-calc-branch\n" -msgstr "" -"\n" -"$ cd calc\n" -"\n" -"$ svn info | grep URL\n" -"URL: http://svn.example.com/repos/calc/trunk\n" -"\n" -"$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"U integer.c\n" -"U button.c\n" -"U Makefile\n" -"Updated to revision 341.\n" -"\n" -"$ svn info | grep URL\n" -"URL: http://svn.example.com/repos/calc/branches/my-calc-branch\n" - -#. (para) -#: ../source/book.xml:8477 -msgid "After switching 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." -msgstr "完成了到分支的跳转,你的目录与直接取出一个干净的版本没有什么不同。这样会更有效率,因为分支只有很小的区别,服务器只是发送修改的部分来使你的工作拷贝反映分支。" - -#. (para) -#: ../source/book.xml:8484 -msgid "The svn switch command also takes a () option, so you need not always move your working copy to the HEAD of the branch." -msgstr "svn switch命令也可以带)参数,所以你不需要一直移动你的工作拷贝到分支的HEAD。" - -#. (para) -#: ../source/book.xml:8488 -msgid "Of course, most projects are more complicated than our calc example, containing multiple subdirectories. Subversion users often follow a specific algorithm when using branches:" -msgstr "当然,许多项目比我们的calc要复杂的多,有更多的子目录,Subversion用户通常用如下的法则使用分支:" - -#. (para) -#: ../source/book.xml:8494 -msgid "Copy the project's entire trunk to a new branch directory." -msgstr "拷贝整个项目的trunk目录到一个新的分支目录。" - -#. (para) -#: ../source/book.xml:8498 -msgid "Switch only part of the trunk working copy to mirror the branch." -msgstr "只是转换工作拷贝的部分目录到分支。" - -#. (para) -#: ../source/book.xml:8502 -msgid "In other words, if a user knows that the branch-work only needs to happen on a specific subdirectory, they use svn switch 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 trunk 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 mixed working copy—not only can working copies contain a mixture of working revisions, but a mixture of repository locations as well." -msgstr "换句话说,如果一个用户知道分支工作只发生在部分子目录,我们使用svn switch来跳转部分目录(有时候只是单个文件),这样的话,他们依然可以继续得到普通的trunk主干的更新,但是已经跳转的部分则被免去了更新(除非分支上有更新)。这个特性给混合工作拷贝概念添加了新的维度—不仅工作拷贝的版本可以混合,在版本库中的位置也可以混合。" - -#. (para) -#: ../source/book.xml:8514 -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." -msgstr "如果你的工作拷贝包含许多来自不同版本库目录跳转的子树,它会工作如常。当你更新时,你会得到每一个目录适当的补丁,当你提交时,你的本地修改会一直作为一个单独的原子修改提交到版本库。" - -#. (para) -#: ../source/book.xml:8525 -msgid "You can, however, use svn switch with the option if the URL of your server changes and you don't want to abandon an existing working copy. See for more information and an example." -msgstr "如果你不希望抛弃已存在的工作拷贝,你可以使用带选项的svn switch命令转换URL,更多信息和例子可以看。" - -#. (para) -#: ../source/book.xml:8519 -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 same repository. Subversion repositories aren't yet able to communicate with one another; that's a feature planned for the future. " -msgstr "注意,因为你的工作拷贝可以在混合位置的情况下工作正常,但是所有的位置必须在同一个版本库,Subversion的版本库不能互相通信,这个特性还不在Subversion未来的计划里。" - -#. (title) -#: ../source/book.xml:8532 -msgid "Switches and Updates" -msgstr "切换和更新" - -#. (para) -#: ../source/book.xml:8534 -msgid "Have you noticed that the output of svn switch and svn update look the same? The switch command is actually a superset of the update command." -msgstr "你注意到svn switchsvn update的输出很像?switch命令只是update命令的一个超集。" - -#. (para) -#: ../source/book.xml:8538 -msgid "When you run svn update, 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 svn switch and svn update is that the update command always compares two identical paths." -msgstr "当你运行svn update时,你会告诉版本库比较两个目录树,版本库这样做,并且返回给客户区别的描述,svn switchsvn update两个命令唯一区别就是update会一直比较同一路径。" - -#. (para) -#: ../source/book.xml:8545 -msgid "That is, if your working copy is a mirror of /calc/trunk, then svn update will automatically compare your working copy of /calc/trunk to /calc/trunk in the HEAD revision. If you're switching your working copy to a branch, then svn switch will compare your working copy of /calc/trunk to some other branch-directory in the HEAD revision." -msgstr "也就是了,如果你的工作拷贝是/calc/trunk的一个镜像,当运行svn update时会自动地比较你的工作拷贝的/calc/trunk与HEAD版本的/calc/trunk。如果你使用svn switch跳转工作拷贝到分支,则会比较你的工作拷贝的/calc/trunk与相应分支目录的HEAD版本。" - -#. (para) -#: ../source/book.xml:8556 -msgid "In other words, an update moves your working copy through time. A switch moves your working copy through time and space." -msgstr "换句话说,一个更新通过时间移动你的工作拷贝,一个转换通过时间和空间移动工作拷贝。" - -#. (para) -#: ../source/book.xml:8560 -msgid "Because svn switch is essentially a variant of svn update, 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." -msgstr "因为svn switchsvn update的一个变种,具有相同的行为,当新的数据到达时,任何工作拷贝的已经完成的本地修改会被保存,这里允许你作各种聪明的把戏。" - -#. (para) -#: ../source/book.xml:8565 -msgid "For example, suppose you have a working copy of /calc/trunk 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 svn switch your working copy to the branch, the local changes will remain. You can then test and commit them to the branch." -msgstr "举个例子,你的工作拷贝目录是/calc/trunk,你已经做了很多修改,然后你突然发现应该在分支上修改更好,没问题!你可以使用svn switch,而你本地修改还会保留,你可以测试并提交它们到分支。" - -#. (title) -#: ../source/book.xml:8578 -msgid "Tags" -msgstr "标签" - -#. (para) -#: ../source/book.xml:8580 -msgid "Another common version control concept is a tag. A tag is just a snapshot 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." -msgstr "另一个常见的版本控制系统概念是标­¾(tag),一个标签只是一个项目某一时间的快照,在Subversion里这个概念无处不在—每一次提交的修订版本都是一个精确的快照。" - -#. (para) -#: ../source/book.xml:8586 -msgid "However, people often want to give more human-friendly names to tags, like release-1.0. 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." -msgstr "然而人们希望更人性化的标签名称,像release-1.0。他们也希望可以对一个子目录快照,毕竟,记住release-1.0是修订版本4822的某一小部分不是件很容易的事。" - -#. (title) -#: ../source/book.xml:8595 -msgid "Creating a Simple Tag" -msgstr "建立简单标签" - -#. (para) -#: ../source/book.xml:8597 -msgid "Once again, svn copy comes to the rescue. If you want to create a snapshot of /calc/trunk exactly as it looks in the HEAD revision, then make a copy of it:" -msgstr "svn copy再次登场,你希望建立一个/calc/trunk的一个快照,就像HEAD修订版本,建立这样一个拷贝:" - -#. (screen) -#: ../source/book.xml:8601 -#, no-wrap -msgid "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/tags/release-1.0 \\\n" -" -m \"Tagging the 1.0 release of the 'calc' project.\"\n" -"\n" -"Committed revision 351.\n" -msgstr "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/tags/release-1.0 \\\n" -" -m \"Tagging the 1.0 release of the 'calc' project.\"\n" -"\n" -"Committed revision 351.\n" - -#. (para) -#: ../source/book.xml:8608 -msgid "This example assumes that a /calc/tags directory already exists. (If it doesn't, you can create it using svn mkdir.) After the copy completes, the new release-1.0 directory is forever a snapshot of how the project looked in the HEAD 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 /calc/trunk is exactly the snapshot you want, you can specify it by passing to the svn copy command." -msgstr "这个例子假定/calc/tags目录已经存在(如果不是,可以使用svn mkdir创建。),拷贝完成之后,一个表示当时HEAD版本的/calc/trunk目录的镜像已经永久的拷贝到release-1.0目录。当然,你会希望更精确一点,以防其他人在你不注意的时候提交修改,所以,如果你知道/calc/trunk的版本350是你想要的快照,你可以使用svn copy加参数 。" - -#. (para) -#: ../source/book.xml:8622 -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 tag is because humans 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." -msgstr "但是等一下:标签的产生过程与建立分支是一样的?是的,实际上在Subversion中标签与分支没有区别,都是普通的目录,通过copy命令得到,与分支一样,一个目录之所以是标签只是人们决定这样使用它,只要没有人提交这个目录,它永远是一个快照,但如果人们开始提交,它就变成了分支。" - -#. (para) -#: ../source/book.xml:8632 -msgid "If you are administering a repository, there are two approaches you can take to managing tags. The first approach is hands off: 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 .) 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." -msgstr "如果你管理一个版本库,你有两种方式管理标签,第一种方法是禁止命令:作为项目的政策,我们要决定标签所在的位置,确定所有用户知道如何处理拷贝的目录(也就是确保他们不会提交他们),第二种方法看来很过分:使用访问控制脚本来阻止任何想对标签目录做的非拷贝的操作(见)这种方法通常是不必要的,如果一个人不小心提交了到标签目录一个修改,你可以简单的取消,毕竟这是版本控制啊。" - -#. (title) -#: ../source/book.xml:8650 -msgid "Creating a Complex Tag" -msgstr "建立复杂标签" - -#. (para) -#: ../source/book.xml:8652 -msgid "Sometimes you may want your snapshot to be more complicated than a single directory at a single revision." -msgstr "有时候你希望你的快照能够很复杂,而不只是一个单独修订版本的一个单独目录。" - -#. (para) -#: ../source/book.xml:8655 -msgid "For example, pretend your project is much larger than our calc 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 svn update -r liberally), or by switching files and directories to particular branches (making use of svn switch). 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." -msgstr "举个例子,假定你的项目比我们的的例子calc大的多:假设它保存了一组子目录和许多文件,在你工作时,你或许决定创建一个包括特定特性和Bug修正的工作拷贝,你可以通过选择性的回溯文件和目录到特定修订版本(使用svn update -r)来实现,或者转换文件和目录到特定分支(使用svn switch),这样做之后,你的工作拷贝成为版本库不同版本和分支的司令部,但是经过测试,你会知道这是你需要的一种精确数据组合。" - -#. (para) -#: ../source/book.xml:8668 -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, svn copy actually has four different uses (which you can read about in ), including the ability to copy a working-copy tree to the repository:" -msgstr "是时候进行快照了,拷贝URL在这里不能工作,在这个例子里,你希望把本地拷贝的布局做镜像并且保存到版本库中,幸运的是,svn copy包括四种不同的使用方式(在可以详细阅读),包括拷贝工作拷贝到版本库:" - -#. (screen) -#: ../source/book.xml:8674 -#, no-wrap -msgid "" -"\n" -"$ ls\n" -"my-working-copy/\n" -"\n" -"$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag\n" -"\n" -"Committed revision 352.\n" -msgstr "" -"\n" -"$ ls\n" -"my-working-copy/\n" -"\n" -"$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag\n" -"\n" -"Committed revision 352.\n" - -#. (para) -#: ../source/book.xml:8682 -msgid "Now there is a new directory in the repository, /calc/tags/mytag, which is an exact snapshot of your working copy—mixed revisions, URLs, and all." -msgstr "现在在版本库有一个新的目录/calc/tags/mytag,这是你的本地拷贝的一个快照—混合了修订版本,URL等等。" - -#. (para) -#: ../source/book.xml:8686 -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 svn diff and sending a patch file (which won't capture tree changes, symlink changes or changes in properties), you can instead use svn copy to upload 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 svn merge to receive your exact changes." -msgstr "一些人也发现这一特性一些有趣的使用方式,有些时候本地拷贝有一组本地修改,你希望你的协作者看到这些,不使用svn diff并发送一个补定文件(不会捕捉到目录、符号链和属性的修改),而是使用svn copy上传你的工作拷贝到一个版本库的私有区域,你的协作者可以选择完整的取出你的工作拷贝,或使用svn merge来接受你的精确修改。" - -#. (para) -#: ../source/book.xml:8697 -msgid "While this is a nice method for uploading a quick snapshot of your working copy, note that this is not 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." -msgstr "虽然这是上传快速工作拷贝快照的一个好方法,但这不是初始创建分支的好方法。分支创建必须是它本身的事件,而这个方法创建的分支包含了额外修改,都包含在一个单独修订版本里。这让我们很难识别分支点的单个修订版本号码。" - -#. (para) -#: ../source/book.xml:8705 -msgid "Have you ever found yourself making some complex edits (in your /trunk working copy) and suddenly realized, hey, these changes ought to be in their own branch? A great technique to do this can be summarized in two steps:" -msgstr "你是否发现你做出了复杂的修改(在/trunk的工作拷贝),并突然发现,这些修改必须在它们自己的分支?处理这个问题的技术可以总结为两步:" - -#. (screen) -#: ../source/book.xml:8710 -#, no-wrap -msgid "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/newbranch\n" -"Committed revision 353.\n" -"\n" -"$ svn switch http://svn.example.com/repos/calc/branches/newbranch\n" -"At revision 353.\n" -msgstr "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/newbranch\n" -"Committed revision 353.\n" -"\n" -"$ svn switch http://svn.example.com/repos/calc/branches/newbranch\n" -"At revision 353.\n" - -#. (para) -#: ../source/book.xml:8718 -msgid "The svn switch command, like svn update, preserves your local edits. At this point, your working copy is now a reflection of the newly created branch, and your next svn commit invocation will send your changes there." -msgstr "就像svn update命令,svn switch会保留工作拷贝的本地修改,此刻,你的工作拷贝反映到新建的分支上,而你的下一次svn commit会发送修改到服务器。" - -#. (title) -#: ../source/book.xml:8732 -msgid "Branch Maintenance" -msgstr "分支维护" - -#. (para) -#: ../source/book.xml:8734 -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 too flexible. In this section, we'll offer some suggestions for arranging and managing your data over time." -msgstr "你一定注意到了Subversion极度的灵活性,因为它用相同的底层机制(目录拷贝)实现了分支和标签,因为分支和标签是作为普通的文件系统出现,会让人们感到害怕,因为它灵活了,在这个小节里,我们会提供安排和管理数据的一些建议。" - -#. (title) -#: ../source/book.xml:8744 -msgid "Repository Layout" -msgstr "版本库布局" - -#. (para) -#: ../source/book.xml:8746 -msgid "There are some standard, recommended ways to organize a repository. Most people create a trunk directory to hold the main line of development, a branches directory to contain branch copies, and a tags directory to contain tag copies. If a repository holds only one project, then often people create these top-level directories:" -msgstr "有一些标准的,推荐的组织版本库的方式,许多人创建一个trunk目录来保存开发的主线,一个branches目录存放分支拷贝,一个tags目录保存标签拷贝,如果一个版本库只是存放一个项目,人们会在顶级目录创建这些目录:" - -#. (screen) -#: ../source/book.xml:8753 -#, no-wrap -msgid "" -"\n" -"/trunk\n" -"/branches\n" -"/tags\n" -msgstr "" -"\n" -"/trunk\n" -"/branches\n" -"/tags\n" - -#. (para) -#: ../source/book.xml:8758 -msgid "If a repository contains multiple projects, admins typically index their layout by project (see to read more about project roots):" -msgstr "如果一个版本库保存了多个项目,管理员会通过项目来布局(见关于项目根目录):" - -#. (screen) -#: ../source/book.xml:8761 -#, no-wrap -msgid "" -"\n" -"/paint/trunk\n" -"/paint/branches\n" -"/paint/tags\n" -"/calc/trunk\n" -"/calc/branches\n" -"/calc/tags\n" -msgstr "" -"\n" -"/paint/trunk\n" -"/paint/branches\n" -"/paint/tags\n" -"/calc/trunk\n" -"/calc/branches\n" -"/calc/tags\n" - -#. (para) -#: ../source/book.xml:8769 -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 svn move 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." -msgstr "当然,你可以自由的忽略这些通常的布局方式,你可以创建任意的变化,只要是对你和你的项目有益,记住无论你选择什么,这不会是一种永久的承诺,你可以随时重新组织你的版本库。因为分支和标签都是普通的目录,svn move命令可以任意的改名和移动它们,从一种布局到另一种大概只是一系列服务器端的移动,如果你不喜欢版本库的组织方式,你可以任意修改目录结构。" - -#. (para) -#: ../source/book.xml:8779 -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 svn move operation might remove the path from the latest revision. When the user next runs svn update, she will be told that her working copy represents a path that no longer exists, and the user will be forced to svn switch to the new location." -msgstr "记住,尽管移动目录非常容易,你必须体谅你的用户,你的修改会让你的用户感到迷惑,如果一个用户的拥有一个版本库目录的工作拷贝,你的svn move命令也许会删除最新的版本的这个路径,当用户运行svn update,会被告知这个工作拷贝引用的路径已经不再存在,用户需要强制使用svn switch转到新的位置。" - -#. (title) -#: ../source/book.xml:8794 -msgid "Data Lifetimes" -msgstr "数据的生命周期" - -#. (para) -#: ../source/book.xml:8796 -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 calc project. After merging all of your changes back into /calc/trunk, there's no need for your private branch directory to stick around anymore:" -msgstr "另一个Subversion模型的可爱特性是分支和标签可以有有限的生命周期,就像其它的版本化的项目,举个例子,假定你最终完成了calc项目你的个人分支上的所有工作,在合并了你的所有修改到/calc/trunk后,没有必要继续保留你的私有分支目录:" - -#. (screen) -#: ../source/book.xml:8804 -#, no-wrap -msgid "" -"\n" -"$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" -m \"Removing obsolete branch of calc project.\"\n" -"\n" -"Committed revision 375.\n" -msgstr "" -"\n" -"$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" -m \"Removing obsolete branch of calc project.\"\n" -"\n" -"Committed revision 375.\n" - -#. (para) -#: ../source/book.xml:8810 -msgid "And now your branch is gone. Of course it's not really gone: the directory is simply missing from the HEAD revision, no longer distracting anyone. If you use svn checkout, svn switch, or svn list to examine an earlier revision, you'll still be able to see your old branch." -msgstr "你的分支已经消失了,当然不是真的消失了:这个目录只是在HEAD修订版本里消失了,如果你使用svn checkoutsvn switch或者svn list来检查一个旧的版本,你仍会见到这个旧的分支。" - -#. (para) -#: ../source/book.xml:8817 -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 HEAD, simply use svn copy -r to copy it from the old revision:" -msgstr "如果浏览你删除的目录还不足够,你可以把它找回来,恢复数据对Subversion来说很简单,如果你希望恢复一个已经删除的目录(或文件)到HEAD,仅需要使用svn copy -r来从旧的版本拷贝出来:" - -#. (screen) -#: ../source/book.xml:8823 -#, no-wrap -msgid "" -"\n" -"$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"\n" -"Committed revision 376.\n" -msgstr "" -"\n" -"$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \\\n" -" http://svn.example.com/repos/calc/branches/my-calc-branch\n" -"\n" -"Committed revision 376.\n" - -#. (para) -#: ../source/book.xml:8829 -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 main branches running side-by-side for very long periods. For example, suppose it's time to release a stable version of the calc 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 stable branch of the software that won't change much:" -msgstr "在我们的例子里,你的个人分支只有一个相对短的生命周期:你会为修复一个Bug或实现一个小的特性来创建它,当任务完成,分支也该结束了。在软件开发过程中,有两个主要的分支一直存在很长的时间也是很常见的情况,举个例子,假定我们是发布一个稳定的calc项目的时候了,但我们仍会需要几个月的时间来修复Bug,你不希望添加新的特性,但你不希望告诉开发者停止开发,所以作为替代,你为软件创建了一个分支,这个分支更改不会很多:" - -#. (screen) -#: ../source/book.xml:8842 -#, no-wrap -msgid "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/stable-1.0 \\\n" -" -m \"Creating stable branch of calc project.\"\n" -"\n" -"Committed revision 377.\n" -msgstr "" -"\n" -"$ svn copy http://svn.example.com/repos/calc/trunk \\\n" -" http://svn.example.com/repos/calc/branches/stable-1.0 \\\n" -" -m \"Creating stable branch of calc project.\"\n" -"\n" -"Committed revision 377.\n" - -#. (para) -#: ../source/book.xml:8849 -msgid "And now developers are free to continue adding cutting-edge (or experimental) features to /calc/trunk, and you can declare a project policy that only bug fixes are to be committed to /calc/branches/stable-1.0. 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." -msgstr "而且开发者可以自由的继续添加新的(试验的)特性到/calc/trunk,你可以宣布这样一种政策,只有bug修正提交到/calc/branches/stable-1.0,这样的话,人们继续在主干上工作,某个人会选择在稳定分支上做出一些Bug修正,甚至在稳定版本发布之后。你或许会在这个维护分支上工作很长时间—也就是说,你会一直继续为客户提供这个版本的支持。" - -#. (title) -#: ../source/book.xml:8866 -msgid "Vendor branches" -msgstr "卖主分支" - -#. (para) -#: ../source/book.xml:8868 -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." -msgstr "当开发软件时有这样一个情况,你版本控制的数据可能关联于或者是依赖于其他人的数据,通常来讲,你的项目的需要会要求你自己的项目对外部实体提供的数据保持尽可能最新的版本,同时不会牺牲稳定性,这种情况总是会出现—只要某个小组的信息对另一个小组的信息有直接的影响。" - -#. (para) -#: ../source/book.xml:8877 -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 ). 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 bleeding edge 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." -msgstr "举个例子,软件开发者会工作在一个使用第三方库的应用,Subversion恰好是和Apache的Portable Runtime library(见)有这样一个关系。Subversion源代码依赖于APR库来实现可移植需求。在Subversion的早期开发阶段,项目紧密地追踪APR的API修改,经常在库代码的流血的边缘粘住,现在APR和Subversion都已经成熟了,Subversion只尝试同步APR的经过良好测试的,稳定的API库。" - -#. (para) -#: ../source/book.xml:8888 -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 pin down specific versions of that information to some location in your own working copy directory (see )." -msgstr "现在,如果你的项目依赖于其他人的信息,有许多方法可以用来尝试同步你的信息,最痛苦的,你可以为项目所有的贡献者发布口头或书写的指导,告诉他们确信他们拥有你们的项目需要的特定版本的第三方信息。如果第三方信息是用Subversion版本库维护,你可以使用Subversion的外部定义来有效的强制特定的版本的信息在你的工作拷贝的的位置(见)。" - -#. (para) -#: ../source/book.xml:8899 -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." -msgstr "但是有时候,你希望在你自己的版本控制系统维护一个针对第三方数据的自定义修改,回到软件开发的例子,程序员为了他们自己的目的会需要修改第三方库,这些修改会包括新的功能和bug修正,在成为第三方工具官方发布之前,只是内部维护。或者这些修改永远不会传给库的维护者,只是作为满足软件开发需要的单独的自定义修改存在。" - -#. (para) -#: ../source/book.xml:8909 -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." -msgstr "现在你会面对一个有趣的情形,你的项目可以用某种脱节的样式保持它关于第三方数据自己的修改,如使用补丁文件或者是完全的可选版本的文件和目录。但是这很快会成为维护的头痛的事情,需要一种机制来应用你对第三方数据的自定义修改,并且迫使在第三方数据的后续版本重建这些修改。" - -#. (para) -#: ../source/book.xml:8917 -msgid "The solution to this problem is to use vendor branches. 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 vendor drop." -msgstr "这个问题的解决方案是使用卖主分支,一个卖主分支是一个目录树保存了第三方实体或卖主的信息,每一个卖主数据的版本吸收到你的项目叫做卖主drop。" - -#. (para) -#: ../source/book.xml:8923 -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." -msgstr "卖主分支提供了两个关键的益处,第一,通过在我们的版本控制系统保存现在支持的卖主drop,你项目的成员不需要指导他们是否有了正确版本的卖主数据,他们只需要作为不同工作拷贝更新的一部份,简单的接受正确的版本就可以了。第二,因为数据存在于你自己的Subversion版本库,你可以在恰当的位置保存你的自定义修改—你不需要一个自动的(或者是更坏,手工的)方法来交换你的自定义行为。" - -#. (title) -#: ../source/book.xml:8935 -msgid "General Vendor Branch Management Procedure" -msgstr "常规的卖主分支管理过程" - -#. (para) -#: ../source/book.xml:8937 -msgid "Managing vendor branches generally works like this. You create a top-level directory (such as /vendor) 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, /trunk) 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 /trunk, resolving whatever conflicts occur between your local changes and the upstream changes." -msgstr "管理卖主分支通常会像这个样子,你创建一个顶级的目录(如/vendor)来保存卖主分支,然后你导入第三方的代码到你的子目录。然后你将拷贝这个子目录到主要的开发分支(例如/trunk)的适当位置。你一直在你的主要开发分支上做本地修改,当你的追踪的代码有了新版本,你会把带到卖主分支并且把它合并到你的/trunk,解决任何你的本地修改和他们的修改的冲突。" - -#. (para) -#: ../source/book.xml:8950 -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 libcomplex, and our code drops will go into a subdirectory of our vendor branch called current. And since svn import creates all the intermediate parent directories it needs, we can actually accomplish both of these steps with a single command." -msgstr "也许一个例子有助于我们阐述这个算法,我们会使用这样一个场景,我们的开发团队正在开发一个计算器程序,与一个第三方的复杂数字运算库libcomplex关联。我们从卖主分支的初始创建开始,并且导入卖主drop,我们会把每株分支目录叫做libcomplex,我们的代码drop会进入到卖主分支的子目录current,并且因为svn import创建所有的需要的中间父目录,我们可以使用一个命令完成这一步。" - -#. (screen) -#: ../source/book.xml:8962 -#, no-wrap -msgid "" -"\n" -"$ svn import /path/to/libcomplex-1.0 \\\n" -" http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" -m 'importing initial 1.0 vendor drop'\n" -"…\n" -msgstr "" -"\n" -"$ svn import /path/to/libcomplex-1.0 \\\n" -" http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" -m 'importing initial 1.0 vendor drop'\n" -"…\n" - -#. (para) -#: ../source/book.xml:8968 -msgid "We now have the current version of the libcomplex source code in /vendor/libcomplex/current. Now, we tag that version (see ) and then copy it into the main development branch. Our copy will create a new directory called libcomplex in our existing calc project directory. It is in this copied version of the vendor data that we will make our customizations." -msgstr "我们现在在/vendor/libcomplex/current有了libcomplex当前版本的代码,现在我们为那个版本作标签(见),然后拷贝它到主要开发分支,我们的拷贝会在calc项目目录创建一个新的目录libcomplex,它是这个我们将要进行自定义的卖主数据的拷贝版本。" - -#. (screen) -#: ../source/book.xml:8977 -#, no-wrap -msgid "" -"\n" -"$ svn copy http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" -m 'tagging libcomplex-1.0'\n" -"…\n" -"$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" http://svn.example.com/repos/calc/libcomplex \\\n" -" -m 'bringing libcomplex-1.0 into the main branch'\n" -"…\n" -msgstr "" -"\n" -"$ svn copy http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" -m 'tagging libcomplex-1.0'\n" -"…\n" -"$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" http://svn.example.com/repos/calc/libcomplex \\\n" -" -m 'bringing libcomplex-1.0 into the main branch'\n" -"…\n" - -#. (para) -#: ../source/book.xml:8992 -msgid "And entirely bug-free, of course!" -msgstr "而且完全没有bug,当然!" - -#. (para) -#: ../source/book.xml:8987 -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. " -msgstr "我们取出我们项目的主分支—现在包括了第一个卖主释放的拷贝—我们开始自定义libcomplex的代码,在我们知道之前,我们的libcomplex修改版本是已经与我们的计算器程序完全集成了。 " - -#. (para) -#: ../source/book.xml:8994 -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." -msgstr "几周之后,libcomplex得开发者发布了一个新的版本—版本1.1—包括了我们很需要的一些特性和功能。我们很希望升级到这个版本,但不希望失去在当前版本所作的修改。我们本质上会希望把我们当前基线版本是的libcomplex1.0的拷贝替换为libcomplex 1.1,然后把前面自定义的修改应用到新的版本。但是实际上我们通过一个相反的方向解决这个问题,应用libcomplex从版本1.0到1.1的修改到我们修改的拷贝。" - -#. (para) -#: ../source/book.xml:9006 -msgid "To perform this upgrade, we check out a copy of our vendor branch, and replace the code in the current 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 current 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." -msgstr "为了执行这个升级,我们取出一个我们卖主分支的拷贝,替换current目录为新的libcomplex 1.1的代码,我们只是拷贝新文件到存在的文件上,或者是解压缩libcomplex 1.1的打包文件到我们存在的文件和目录。此时的目标是让我们的current目录只保留libcomplex 1.1的代码,并且保证所有的代码在版本控制之下,哦,我们希望在最小的版本控制历史扰动下完成这件事。" - -#. (para) -#: ../source/book.xml:9017 -msgid "After replacing the 1.0 code with 1.1 code, svn status 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 svn add 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 svn delete. Finally, once our current working copy contains only the libcomplex 1.1 code, we commit the changes we made to get it looking that way." -msgstr "完成了这个从1.0到1.1的代码替换,svn status会显示文件的本地修改,或许也包括了一些未版本化或者丢失的文件,如果我们做了我们应该做的事情,未版本化的文件应该都是libcomplex在1.1新引入的文件—我们运行svn add来将它们加入到版本控制。丢失的文件是存在于1.1但是不是在1.1,在这些路径我们运行svn delete。最终一旦我们的current工作拷贝只是包括了libcomplex1.1的代码,我们可以提交这些改变目录和文件的修改。" - -#. (para) -#: ../source/book.xml:9029 -msgid "Our current 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." -msgstr "我们的current分支现在保存了新的卖主drop,我们为这个新的版本创建一个新的标签(就像我们为1.0版本drop所作的),然后合并这从个标签前一个版本的区别到主要开发分支。" - -#. (screen) -#: ../source/book.xml:9035 -#, no-wrap -msgid "" -"\n" -"$ cd working-copies/calc\n" -"$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" libcomplex\n" -"… # resolve all the conflicts between their changes and our changes\n" -"$ svn commit -m 'merging libcomplex-1.1 into the main branch'\n" -"…\n" -msgstr "" -"\n" -"$ cd working-copies/calc\n" -"$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0 \\\n" -" http://svn.example.com/repos/vendor/libcomplex/current \\\n" -" libcomplex\n" -"… # resolve all the conflicts between their changes and our changes\n" -"$ svn commit -m 'merging libcomplex-1.1 into the main branch'\n" -"…\n" - -#. (para) -#: ../source/book.xml:9044 -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." -msgstr "在这个琐碎的用例里,第三方工具的新版本会从一个文件和目录的角度来看,就像前一个版本。没有任何libcomplex源文件会被删除、被改名或是移动到别的位置—新的版本只会保存针对上一个版本的文本修改。在完美世界,我们对呢修改会干净得应用到库的新版本,不会产生任何并发和冲突。" - -#. (para) -#: ../source/book.xml:9053 -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." -msgstr "但是事情总不是这样简单,实际上源文件在不同的版本间的移动是很常见的,这种过程复杂性可以确保我们的修改会一直对新的版本代码有效,可以很快使形势退化到我们需要在新版本手工的重新创建我们的自定义修改。一旦Subversion知道了给定文件的历史—包括了所有以前的位置—合并到新版本的进程就会很简单,但是我们需要负责告诉Subversion卖主drop之间源文件布局的改变。" - -#. (command) -#: ../source/book.xml:9074 -msgid "svn_load_dirs.pl" -msgstr "svn_load_dirs.pl" - -#. (para) -#: ../source/book.xml:9077 -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 svn_load_dirs.pl 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 svn_load_dirs.pl can help you more quickly and easily arrive at that stage." -msgstr "不仅仅包含一些删除、添加和移动的卖主drops使得升级第三方数据后续版本的过程变得复杂,所以Subversion提供了一个svn_load_dirs.pl脚本来辅助这个过程,这个脚本自动进行我们前面提到的常规卖主分支管理过程的导入步骤,从而使得错误最小化。你仍要负责使用合并命令合并第三方的新 版本数据合并到主要开发分支,但是svn_load_dirs.pl帮助你快速到达这一步骤。" - -#. (para) -#: ../source/book.xml:9089 -msgid "In short, svn_load_dirs.pl is an enhancement to svn import that has several important characteristics:" -msgstr "一句话,svn_load_dirs.pl是一个增强的svn import,具备了许多重要的特性:" - -#. (para) -#: ../source/book.xml:9094 -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." -msgstr "它可以在任何有一个存在的版本库目录与一个外部的目录匹配时执行,会执行所有必要的添加和删除并且可以选则执行移动。" - -#. (para) -#: ../source/book.xml:9100 -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." -msgstr "它可以用来操作一系列复杂的操作,如那些需要一个中间媒介的提交—如在操作之前重命名一个文件或者目录两次。" - -#. (para) -#: ../source/book.xml:9105 -msgid "It will optionally tag the newly imported directory." -msgstr "它可以随意的为新导入目录打上标签。" - -#. (para) -#: ../source/book.xml:9108 -msgid "It will optionally add arbitrary properties to files and directories that match a regular expression." -msgstr "它可以随意为符合正则表达式的文件和目录添加任意的属性。" - -#. (para) -#: ../source/book.xml:9112 -msgid "svn_load_dirs.pl 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 svn_load_dirs.pl might look like:" -msgstr "svn_load_dirs.pl利用三个强制的参数,第一个参数是Subversion工作的基本目录URL,第二个参数在URL之后—相对于第一个参数—指向当前的卖主分支将会导入的目录,最后,第三个参数是一个需要导入的本地目录,使用前面的例子,一个典型的svn_load_dirs.pl调用看起来如下:" - -#. (screen) -#: ../source/book.xml:9120 -#, no-wrap -msgid "" -"\n" -"$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \\\n" -" current \\\n" -" /path/to/libcomplex-1.1\n" -"…\n" -msgstr "" -"\n" -"$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \\\n" -" current \\\n" -" /path/to/libcomplex-1.1\n" -"…\n" - -#. (para) -#: ../source/book.xml:9126 -msgid "You can indicate that you'd like svn_load_dirs.pl to tag the new vendor drop by passing the command-line option and specifying a tag name. This tag is another URL relative to the first program argument." -msgstr "你可以说明你会希望svn_load_dirs.pl同时打上标签,这使用命令行选项,需要指定一个标签名,这个标签是第一个参数的一个相对URL。" - -#. (screen) -#: ../source/book.xml:9131 -#, no-wrap -msgid "" -"\n" -"$ svn_load_dirs.pl -t libcomplex-1.1 \\\n" -" http://svn.example.com/repos/vendor/libcomplex \\\n" -" current \\\n" -" /path/to/libcomplex-1.1\n" -"…\n" -msgstr "" -"\n" -"$ svn_load_dirs.pl -t libcomplex-1.1 \\\n" -" http://svn.example.com/repos/vendor/libcomplex \\\n" -" current \\\n" -" /path/to/libcomplex-1.1\n" -"…\n" - -#. (para) -#: ../source/book.xml:9138 -msgid "When you run svn_load_dirs.pl, it examines the contents of your existing current 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, svn_load_dirs.pl 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 math.c in version 1.0 of libcomplex was renamed to arithmetic.c in libcomplex 1.1. Any discrepancies not explained by moves are treated as regular additions and deletions." -msgstr "当你运行svn_load_dirs.pl,它会检验你的存在的current卖主drop,并且与提议的新卖主drop比较,在这个琐碎的例子里,没有文件只出现在一个版本里,脚本执行新的导入而不会发生意外。然而如果版本之间有了文件布局的区别,svn_load_dirs.pl会询问你如何解决这个区别,例如你会有机会告诉脚本libcomplex版本1.0的math.c文件在1.1已经重命名为arithmetic.c,任何没有解释为移动的差异都会被看作是常规的添加和删除。" - -#. (para) -#: ../source/book.xml:9152 -msgid "The script also accepts a separate configuration file for setting properties on files and directories matching a regular expression that are added to the repository. This configuration file is specified to svn_load_dirs.pl using the 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 break or cont), and then optionally a property name and value." -msgstr "这个脚本也接受单独配置文件用来为添加到版本库的文件和目录设置匹配正则表达式的属性。配置文件通过svn_load_dirs.pl命令行选项指定,这个配置文件的每一行都是一个空白分割的两列或者四列值:一个Perl样式的正则表达式来匹配添加的路径、一个控制关键字(break或者是cont)和可选的属性名和值。" - -#. (screen) -#: ../source/book.xml:9163 -#, no-wrap -msgid "" -"\n" -"\\.png$ break svn:mime-type image/png\n" -"\\.jpe?g$ break svn:mime-type image/jpeg\n" -"\\.m3u$ cont svn:mime-type audio/x-mpegurl\n" -"\\.m3u$ break svn:eol-style LF\n" -".* break svn:eol-style native\n" -msgstr "" -"\n" -"\\.png$ break svn:mime-type image/png\n" -"\\.jpe?g$ break svn:mime-type image/jpeg\n" -"\\.m3u$ cont svn:mime-type audio/x-mpegurl\n" -"\\.m3u$ break svn:eol-style LF\n" -".* break svn:eol-style native\n" - -#. (para) -#: ../source/book.xml:9170 -msgid "For each added path, the configured property changes whose regular expression matches the path are applied in order, unless the control specification is break (which means that no more property changes should be applied to that path). If the control specification is cont—an abbreviation for continue—then matching will continue with the next line of the configuration file." -msgstr "对每一个添加的路径,会按照顺序为匹配正则表达式的文件配置属性,除非控制标志是break(意味着不需要更多的路径匹配应用到这个路径)。如果控制说明是contcontinue的缩写—然后匹配工作会继续到配置文件的下一行。" - -#. (para) -#: ../source/book.xml:9178 -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 (\\) 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." -msgstr "任何正则表达式,属性名或者属性值的空格必须使用单引号或者双引号环绕,你可以使用反斜杠(\\)换码符来回避引号,反斜杠只会在解析配置文件时回避引号,所以不能保护必要正则表达式字符之外的的其它字符。" - -#. (para) -#: ../source/book.xml:9195 -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 svn copy command. We've shown how to use svn merge to copy changes from one branch to another, or roll back bad changes. We've gone over the use of svn switch to create mixed-location working copies. And we've talked about how one might manage the organization and lifetimes of branches in a repository." -msgstr "我们已经在本章覆盖了许多基础知识,我们讨论了标签和分支的概念,然后描述了Subversion怎样用svn copy命令拷贝目录实现了这些概念,我们也已经展示了怎样使用svn merge命令来在分支之间拷贝修改,或是撤销错误的修改。我们仔细研究了使用svn switch来创建混合位置的工作拷贝,然后我们也讨论了怎样管理和组织版本库中分支的生命周期。" - -#. (para) -#: ../source/book.xml:9205 -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." -msgstr "记住Subversion的颂歌:分支和标签是廉价的,所以可以自由的使用!在同一时间,不要忘记使用好的合并习惯,廉价的拷贝只在你小心的跟踪你的合并操作时有用。" - -#. (title) -#: ../source/book.xml:9218 -msgid "Repository Administration" -msgstr "版本库管理" - -#. (para) -#: ../source/book.xml:9220 -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." -msgstr "Subversion版本库是保存任意数量项目版本化数据的中央仓库,因此,版本库成为管理员关注的对象。版本库的维护一般并不需要太多的关注,但为了避免一些潜在的问题和解决一些实际问题,理解怎样适当的配置和维护还是非常重要的。" - -#. (para) -#: ../source/book.xml:9227 -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 svnlook and svnadmin 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." -msgstr "在这一章里,我们将讨论如何建立和配置一个Subversion版本库,还会讨论版本库的维护,包括svnlooksvnadmin工具的使用实例。我们将说明一些常见的问题和错误,并提供一些安排版本库数据的建议。" - -#. (para) -#: ../source/book.xml:9239 -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." -msgstr "这可能听起来很崇高, 但我们所指的只是那些对管理别人工作拷贝数据之外的神秘领域感兴趣的人。" - -#. (para) -#: ../source/book.xml:9234 -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, this chapter is for you." -msgstr "如果您只是以普通用户的身份访问版本库对数据进行版本控制(就是说通过Subversion客户端),您完全可以跳过本章。但是如果您已经是或打算成为Subversion版本库的管理员,您一定要关注一下本章的内容。" - -#. (title) -#: ../source/book.xml:9249 -msgid "The Subversion Repository, Defined" -msgstr "Subversion 版本库的定义" - -#. (para) -#: ../source/book.xml:9251 -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 inside the repository." -msgstr "在进入版本库管理这块宽泛的主题之前,让我们进一步确定一下版本库的定义,它是怎样工作的?让人有什么感觉?它希望茶是热的还是冰的,加糖或柠檬吗?作为一名管理员,你应该既能够从物理具体细节的视角-版本库如何响应一个非Subversion的工具,也能够从逻辑视角-数据在版本库中如何展示。" - -#. (para) -#: ../source/book.xml:9260 -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:" -msgstr "通过典型的文件浏览器应用程序或命令行为基础的文件系统浏览工具查看,Subversion版本库只是另一个目录。也有一些子目录下包含可读的数据文件,也有一些子目录包含不可读的数据文件。Subversion设计的其他地方,模块化被认真考虑,等级化的组织可以减少混乱,所以脱离细节粗略看一下典型的版本库可以有效地揭示版本库的基本组件。" - -#. (screen) -#: ../source/book.xml:9271 -#, no-wrap -msgid "" -"\n" -"$ ls repos\n" -"conf/ dav/ db/ format hooks/ locks/ README.txt\n" -msgstr "" -"\n" -"$ ls repos\n" -"conf/ dav/ db/ format hooks/ locks/ README.txt\n" - -#. (para) -#: ../source/book.xml:9275 -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.)" -msgstr "下面是一个你看到列出目录的快速总揽。(不要因为术语陷入困境—这些组件的细节介绍可以从本章或其他章节找到。)" - -#. (term) -#: ../source/book.xml:9281 -msgid "conf" -msgstr "conf" - -#. (para) -#: ../source/book.xml:9283 -msgid "A directory containing repository configuration files." -msgstr "一个存储版本库配置文件的目录。" - -#. (term) -#: ../source/book.xml:9287 -msgid "dav" -msgstr "dav" - -#. (para) -#: ../source/book.xml:9289 -msgid "A directory provided to mod_dav_svn for its private housekeeping data." -msgstr "提供给Apache和mod_dav_svn的目录,让它们存储自己的数据。" - -#. (term) -#: ../source/book.xml:9294 -msgid "db" -msgstr "db" - -#. (para) -#: ../source/book.xml:9296 -msgid "The data store for all of your versioned data." -msgstr "你的版本化数据的数据存储方式。" - -#. (term) -#: ../source/book.xml:9300 -msgid "format" -msgstr "format" - -#. (para) -#: ../source/book.xml:9302 -msgid "A file that contains a single integer that indicates the version number of the repository layout." -msgstr "包含了一个用来表示版本库布局版本号整数的文件。" - -#. (term), (secondary) -#: ../source/book.xml:9307 ../source/book.xml:24037 ../source/book.xml:24084 -#: ../source/book.xml:24133 ../source/book.xml:24179 ../source/book.xml:24242 -#: ../source/book.xml:24304 ../source/book.xml:24355 ../source/book.xml:24401 -#: ../source/book.xml:24454 -msgid "hooks" -msgstr "hooks" - -#. (para) -#: ../source/book.xml:9309 -msgid "A directory full of hook script templates (and hook scripts themselves, once you've installed some)." -msgstr "一个存储钩子脚本模版的目录(还有钩子脚本本身, 如果你安装了的话)。" - -#. (term) -#: ../source/book.xml:9314 -msgid "locks" -msgstr "locks" - -#. (para) -#: ../source/book.xml:9316 -msgid "A directory for Subversion's repository lock files, used for tracking accessors to the repository." -msgstr "一个存储Subversion版本库锁定文件的目录,被用来追踪对版本库的访问。" - -#. (term) -#: ../source/book.xml:9321 -msgid "README.txt" -msgstr "README.txt" - -#. (para) -#: ../source/book.xml:9323 -msgid "A file whose contents merely inform its readers that they are looking at a Subversion repository." -msgstr "这个文件只是用来告诉它的阅读者,他现在看的是 Subversion 的版本库。" - -#. (para) -#: ../source/book.xml:9328 -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." -msgstr "当然,当通过Subversion库访问时,这些平常的文件和目录立刻变成了虚拟文件系统的实现,由自定义的事件触发完成。这个文件系统的目录和文件都有自己的概念,与真实的文件系统(例如NTFS、FAT32、ext3等等)很类似,但是也有特别的地方—它在修订版本间锁定目录和文件,保持你的所有修改可以永远访问的,这是你的所有版本化数据存放的地方。" - -#. (title) -#: ../source/book.xml:9345 -msgid "Strategies for Repository Deployment" -msgstr "版本库开发策略" - -#. (para) -#: ../source/book.xml:9347 -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." -msgstr "因为Subversion版本库本身和所依赖技术设计的简单性,创建和配置版本库是一件相对直接的任务。需要做一些的预备决定,但是设置Subversion版本库的实际工作非常直接,在做过几次之后就会发现不必费太多心思去做这件事。" - -#. (para) -#: ../source/book.xml:9355 -msgid "Some things you'll want to consider up front, though, are:" -msgstr "下面是一些你需要预先考虑的事情:" - -#. (para) -#: ../source/book.xml:9358 -msgid "What data do you expect to live in your repository (or repositories), and how will that data be organized?" -msgstr "你的版本库将要存放什么数据(或多个版本库),这些数据如何组织?" - -#. (para) -#: ../source/book.xml:9362 -msgid "Where will your repository live, and how will it be accessed?" -msgstr "版本库存放在哪里,如何被访问?" - -#. (para) -#: ../source/book.xml:9366 -msgid "What types of access control and repository event reporting do you need?" -msgstr "你需要什么类型的访问控制和版本库事件报告?" - -#. (para) -#: ../source/book.xml:9370 -msgid "Which of the available types of data store do you want to use?" -msgstr "你希望使用哪种数据存储方式?" - -#. (para) -#: ../source/book.xml:9374 -msgid "In this section, we'll try to help you answer those questions." -msgstr "在本节,我们要尝试帮你回答这些问题。" - -#. (title) -#: ../source/book.xml:9379 -msgid "Planning Your Repository Organization" -msgstr "规划你的版本库结构" - -#. (para) -#: ../source/book.xml:9381 -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 laying out your repository or repositories and their versioned contents ahead of time, you can prevent many future headaches." -msgstr "在Subversion版本库中,移动版本化的文件和目录不会损失任何信息,甚至也可以将版本库的的一组数据无损历史的移植到另一个版本库,但是这样一来那些经常访问版本库并且以为文件总是在同一个路径的用户可能会受到干扰。为将来着想,最好预先对你的版本库布局进行规划。以一种高效的布局开始项目,可以减少将来很多不必要的麻烦。" - -#. (para) -#: ../source/book.xml:9392 -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." -msgstr "假如你是一个版本库管理员,需要向多个项目提供版本控制支持。那么,你首先要决定的是,用一个版本库支持多个项目,还是为每个项目建立一个版本库,还是两种方法的混合方式。" - -#. (para) -#: ../source/book.xml:9398 -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." -msgstr "使用一个版本库支持多个项目有很多好处,最明显的无过于不需要维护好几个版本库。单一版本库就意味着只有一个钩子程序,只需要备份一个数据库,当Subversion进行不兼容升级时,只需要一次转储和装载操作,等等。还有,你可以轻易的在项目之间移动数据,还不会损失任何历史版本信息。" - -#. (para) -#: ../source/book.xml:9422 -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 not the kind of thing you should weigh when deciding how to arrange your projects and repositories." -msgstr "无论是在忽略情况下建立或很少考虑过如何产生正确的软件开发矩阵,都不应该愚蠢的担心全局的修订版本号码,这不应该成为安排项目和版本库的理由。" - -#. (para) -#: ../source/book.xml:9406 -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. " -msgstr "单一版本库的缺点是,不同的项目通常都有不同的版本库触发事件需求,例如需要发送提交通知邮件到不同的邮件列表,需要不同的鉴定提交是否合法的定义。这些都不是不可逾越的问题,当然—之需要你的钩子程序能够察看版本库的布局,而不是假定整个版本库与同一组人关联。还有,别忘了Subversion的修订版本号是针对整个版本库的,这些号码没有任何魔力。即使最近没有对某个项目作出修改,版本库的修订版本号还是会因为其它项目的修改而不停的提升,许多人并不喜欢这样的事实。" - -#. (para) -#: ../source/book.xml:9429 -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." -msgstr "可以采用折中的办法。比如,可以把许多项目按照彼此之间的关联程度划分为几个组合,然后为每一个项目组合建立一个版本库。这样,在相关项目之间共享数据依旧很简单,而如果修订版本号有了变化,至少开发人员知道,改变的东西多少和他们有些关系。" - -#. (para) -#: ../source/book.xml:9454 -msgid "The trunk, tags, and branches trio are sometimes referred to as the TTB directories." -msgstr "trunktagsbranches可以使用TTB目录来表示。" - -#. (para) -#: ../source/book.xml:9437 -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 ), the Subversion community recommends that you choose a repository location for each project root—the top-most directory which contains data related to that project—and then create three subdirectories beneath that root: trunk, meaning the directory under which the main project development occurs; branches, which is a directory in which to create various named branches of the main development line; tags, which is a collection of tree snapshots that are created, and perhaps destroyed, but never changed. " -msgstr "在决定了如何用版本库组织项目以后,就该决定如何设置版本库的目录层次了。由于Subversion按普通的目录复制方式完成分支和标签操作(参见),Subversion社区建议为每一个项目建立一个项目根目录—项目的顶级目录—然后在根目录下建立三个子目录:trunk,保存项目的开发主线;branches,保存项目的各种开发分支;tags,保存项目的标签,也就是创建后永远不会修改的分支(可能会删除)。 " - -#. (para) -#: ../source/book.xml:9458 -msgid "For example, your repository might look like:" -msgstr "举个例子,一个版本库可能会有如下的布局:" - -#. (screen) -#: ../source/book.xml:9459 -#, no-wrap -msgid "" -"\n" -"/\n" -" calc/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" calendar/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" spreadsheet/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" -msgstr "" -"\n" -"/\n" -" calc/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" calendar/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" spreadsheet/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" - -#. (para) -#: ../source/book.xml:9475 -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:" -msgstr "项目在版本库中的根目录地址并不重要。如果每个版本库中只有一个项目,那么就可以认为项目的根目录就是版本库的根目录。如果版本库中包含多个项目,那么可以将这些项目划分成不同的组合(按照项目的目标或者是否需要共享代码甚至是字母顺序)保存在不同子目录中,下面的例子给出了一个类似的布局:" - -#. (screen) -#: ../source/book.xml:9484 -#, no-wrap -msgid "" -"\n" -"/\n" -" utils/\n" -" calc/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" calendar/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" -" office/\n" -" spreadsheet/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" -msgstr "" -"\n" -"/\n" -" utils/\n" -" calc/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" calendar/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" -" office/\n" -" spreadsheet/\n" -" trunk/\n" -" tags/\n" -" branches/\n" -" …\n" - -#. (para) -#: ../source/book.xml:9503 -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." -msgstr "按照你认为合适的方式安排版本库的布局,Subversion自身并不强制或者偏好某一种布局形式,对于Subversion来说,目录就是目录。最后,在设计版本库布局的时候,不要忘了考虑一下项目参与者们的意见。" - -#. (para) -#: ../source/book.xml:9509 -msgid "In the name of full disclosure, though, we'll mention another very common layout. In this layout, the trunk, tags, and branches directories live in the root directory of your repository, and your projects are in subdirectories beneath those, like:" -msgstr "为了完整性,我们需要提一下另一种常见的布局,在这种布局中trunktagsbranches都在根目录下,而你的项目在各个子目录下,例如:" - -#. (screen) -#: ../source/book.xml:9515 -#, no-wrap -msgid "" -"\n" -"/\n" -" trunk/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" -" tags/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" -" branches/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" -msgstr "" -"\n" -"/\n" -" trunk/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" -" tags/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" -" branches/\n" -" calc/\n" -" calendar/\n" -" spreadsheet/\n" -" …\n" - -#. (para) -#: ../source/book.xml:9533 -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." -msgstr "这种布局没有什么不对的,但是它只是或不是你的用户的直觉。特别是在大的,有许多用户的多项目情况下,用户可能只熟悉版本库中一两个项目。但是项目作为分支的方式可以鼓励项目的个性和将注意力集中在一个单独的实体。尽管这也是一个社会问题,因为实践的原因,我们很愿意对安排提出一些建议—当一个项目的历史都在一个目录里时,很容易查询(或是修改、移植)单个项目的历史—过去、现在、标签和分支—单独为那个项目。" - -#. (title) -#: ../source/book.xml:9551 -msgid "Deciding Where and How to Host Your Repository" -msgstr "决定在哪里与如何部署你的版本库" - -#. (para) -#: ../source/book.xml:9553 -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." -msgstr "在创建Subversion版本库之前,一个明显的问题是所有的东西要存放在什么地方,这与很多问题关联,包括版本库如何访问(通过Subversion服务器或直接访问)、被谁访问(防火墙后的用户或全部是在Internet上)、你将围绕Subversion提供哪些服务(版本库浏览接口,e-mail为基础的提交通知等)、你的数据备份策略,等等。" - -#. (para) -#: ../source/book.xml:9563 -msgid "We cover server choice and configuration in , 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." -msgstr "我们在覆盖了服务器的选择和配置,我们也提供一些可能会使你必须决定使用某种服务器的问题的答案。例如,特定的部署策略可能会需要从多个计算机通过远程文件系统访问版本库,这个情况下(下一小节会读到)要求你不能选择一种版本库后端数据存储方式,因为只有一种后端在这种场景下可以工作。" - -#. (para) -#: ../source/book.xml:9573 -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." -msgstr "列出所有的Subversion可能的部署方法是不可能的,超出了本书的范围,我们只是简单的鼓励你使用这部分内容和参考材料验证你的想法,并往前计划。" - -#. (title) -#: ../source/book.xml:9582 -msgid "Choosing a Data Store" -msgstr "选择数据存储格式" - -#. (para) -#: ../source/book.xml:9595 -msgid "Often pronounced fuzz-fuzz, if Jack Repenning has anything to say about it. (This book, however, assumes that the reader is thinking eff-ess-eff-ess.)" -msgstr "通常读作fuzz-fuzz, 如果Jack Repenning说起这个问题。(本书,假定读者认为是eff-ess-eff-ess。)" - -#. (para) -#: ../source/book.xml:9584 -msgid "As of version 1.1, Subversion provides two options for the type of underlying data store—often referred to as the back-end or, somewhat confusingly, the (versioned) filesystem—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 BDB-backed. 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 FSFS —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." -msgstr "在Subversion1.1中,版本库中有两种数据存储方式—通常叫做后端或其他容易混淆的名字,如(版本化的) 文件系统,每一个版本库都会使用一种。一种是在Berkeley DB数据库中存储数据,我们称之为BDB后端;另一种是使用普通的文件,自定义格式,Subversion开发者根据习惯称之为FSFS —一种使用本地操作系统文件存储数据的版本化文件系统直接实现—而不是通过某个数据库层或其他抽象层来保存数据。" - -#. (para) -#: ../source/book.xml:9602 -msgid " gives a comparative overview of Berkeley DB and FSFS repositories." -msgstr "从总体上比较了Berkeley DB和FSFS版本库。" - -#. (title) -#: ../source/book.xml:9607 -msgid "Repository Data Store Comparison" -msgstr "版本库数据存储对照表" - -#. (entry) -#: ../source/book.xml:9612 -msgid "Category" -msgstr "分类" - -#. (entry) -#: ../source/book.xml:9613 ../source/book.xml:11968 -msgid "Feature" -msgstr "特性" - -#. (entry), (title) -#: ../source/book.xml:9614 ../source/book.xml:9715 -msgid "Berkeley DB" -msgstr "Berkeley DB" - -#. (entry), (title) -#: ../source/book.xml:9615 ../source/book.xml:9831 -msgid "FSFS" -msgstr "FSFS" - -#. (entry) -#: ../source/book.xml:9620 -msgid "Reliability" -msgstr "可靠性" - -#. (entry) -#: ../source/book.xml:9621 -msgid "Data integrity" -msgstr "数据完整性" - -#. (entry) -#: ../source/book.xml:9622 -msgid "when properly deployed, extremely reliable; Berkeley DB 4.4 brings auto-recovery" -msgstr "当正确部署,非常可靠;Berkeley DB 4.4支持自动恢复" - -#. (entry) -#: ../source/book.xml:9624 -msgid "older versions had some rarely demonstrated, but data-destroying bugs" -msgstr "较老的版本较少被描述,但是有数据毁坏bug" - -#. (entry) -#: ../source/book.xml:9628 -msgid "Sensitivity to interruptions" -msgstr "对操作中断的敏感" - -#. (quote) -#: ../source/book.xml:9630 -msgid "wedged" -msgstr "塞住" - -#. (entry) -#: ../source/book.xml:9629 -msgid "very; crashes and permission problems can leave the database , requiring journaled recovery procedures" -msgstr "很敏感;系统崩溃或者权限问题会导致数据库,需要定期进行恢复。" - -#. (entry) -#: ../source/book.xml:9632 -msgid "quite insensitive" -msgstr "十分敏感" - -#. (entry) -#: ../source/book.xml:9635 -msgid "Accessibility" -msgstr "可用性" - -#. (entry) -#: ../source/book.xml:9636 -msgid "Usable from a read-only mount" -msgstr "可只读加载" - -#. (entry) -#: ../source/book.xml:9637 ../source/book.xml:9642 -msgid "no" -msgstr "不能" - -#. (entry) -#: ../source/book.xml:9638 ../source/book.xml:9643 ../source/book.xml:9648 -msgid "yes" -msgstr "可以" - -#. (entry) -#: ../source/book.xml:9641 -msgid "Platform-independent storage" -msgstr "存储平台无关" - -#. (entry) -#: ../source/book.xml:9646 -msgid "Usable over network filesystems" -msgstr "可从网络文件系统访问" - -#. (entry) -#: ../source/book.xml:9647 -msgid "generally, no" -msgstr "通常,不" - -#. (entry) -#: ../source/book.xml:9651 -msgid "Group permissions handling" -msgstr "组访问权处理" - -#. (entry) -#: ../source/book.xml:9652 -msgid "sensitive to user umask problems; best if accessed by only one user" -msgstr "对于用户的umask设置十分敏感,最好只由一个用户访问。" - -#. (entry) -#: ../source/book.xml:9654 -msgid "works around umask problems" -msgstr "对umask设置不敏感" - -#. (entry) -#: ../source/book.xml:9657 -msgid "Scalability" -msgstr "伸缩性" - -#. (entry) -#: ../source/book.xml:9658 -msgid "Repository disk usage" -msgstr "版本库磁盘使用情况" - -#. (entry) -#: ../source/book.xml:9659 -msgid "larger (especially if logfiles aren't purged)" -msgstr "较大(特别是没有清除日志时)" - -#. (entry) -#: ../source/book.xml:9660 -msgid "smaller" -msgstr "较小" - -#. (entry) -#: ../source/book.xml:9663 -msgid "Number of revision trees" -msgstr "修订版本树的数量" - -#. (entry) -#: ../source/book.xml:9664 -msgid "database; no problems" -msgstr "数据库,没有限制" - -#. (entry) -#: ../source/book.xml:9665 -msgid "some older native filesystems don't scale well with thousands of entries in a single directory" -msgstr "许多古老的本地文件系统在处理单一目录包含上千个条目时出现问题。" - -#. (entry) -#: ../source/book.xml:9669 -msgid "Directories with many files" -msgstr "有很多文件的目录" - -#. (entry) -#: ../source/book.xml:9670 -msgid "slower" -msgstr "较慢" - -#. (entry) -#: ../source/book.xml:9671 -msgid "faster" -msgstr "较快" - -#. (entry) -#: ../source/book.xml:9674 -msgid "Performance" -msgstr "性能" - -#. (entry) -#: ../source/book.xml:9675 -msgid "Checking out latest revision" -msgstr "检出最新的代码" - -#. (entry) -#: ../source/book.xml:9676 ../source/book.xml:9677 -msgid "no meaningful difference" -msgstr "没有有意义的区别" - -#. (entry) -#: ../source/book.xml:9680 -msgid "Large commits" -msgstr "大的提交" - -#. (entry) -#: ../source/book.xml:9681 -msgid "slower overall, but cost is amortized across the lifetime of the commit" -msgstr "整体较慢,但是在整个提交周期中消耗被分摊" - -#. (entry) -#: ../source/book.xml:9683 -msgid "faster overall, but finalization delay may cause client timeouts" -msgstr "较快,但是最后较长的延时可能会导致客户端操作超时" - -#. (para) -#: ../source/book.xml:9689 -msgid "There are advantages and disadvantages to each of these two back-end types. Neither of them is more official 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 , 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." -msgstr "两种后端都有优点和缺点,没有一种更加正式,尽管新的FSFS在Subversion1.2成为缺省数据存储,两者用来存储版本化数据都是可靠的。但是就象你在看到的,FSFS后端在部署场景中提供了更多的灵活性,更灵活意味着你很难错误的配置。那些原因—加上不使用Berkeley DB意味着在这个系统有更少的组件—这就是为什么今天几乎所有的人都使用FSFS来创建新的版本库。" - -#. (para) -#: ../source/book.xml:9702 -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." -msgstr "幸运的是,大多数访问Subversion的程序不会在意其所用的后端数据存储。而且你不必一定要使用你最初的数据存储方法—如果后来你改变了主意,Subversion提供了移植版本库数据到另一个版本库的方法,我们会在后面详细讨论。" - -#. (para) -#: ../source/book.xml:9710 -msgid "The following subsections provide a more detailed look at the available data store types." -msgstr "下面的小节提供了数据存储类型更加详细的介绍。" - -#. (para) -#: ../source/book.xml:9717 -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." -msgstr "在Subversion的初始设计阶段,开发者因为多种原因而决定采用Berkeley DB,比如它的开源协议、事务支持、可靠性、性能、简单的API、线程安全、支持游标等。" - -#. (para) -#: ../source/book.xml:9723 -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." -msgstr "Berkeley DB提供了真正的事务支持-这或许是它最强大的特性,访问你的Subversion版本库的多个进程不必担心偶尔会破坏其他进程的数据。事务系统提供的隔离对于任何给定的操作,Subversion版本库代码看到的只是数据库的静态视图-而不是一个在其他进程影响不断变化的数据库-并能够根据该视图作出决定。如果该决定正好同其他进程所做操作冲突,整个操作会回滚,就像什么都没有发生一样,并且Subversion会优雅的再次对更新的静态视图进行操作。" - -#. (para) -#: ../source/book.xml:9737 -msgid "Another great feature of Berkeley DB is hot backups—the ability to backup the database environment without taking it offline. We'll discuss how to backup your repository in , but the benefits of being able to make fully functional copies of your repositories without any downtime should be obvious." -msgstr "Berkeley DB另一个强大的特性是热备份-不必脱机就可以备份数据库环境的能力。我们将会在讨论如何备份你的版本库,能够不停止系统对版本库做全面备份的好处是显而易见的。" - -#. (para) -#: ../source/book.xml:9743 -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 checkpoint—a location in the log files known not to be corrupt—and replay transactions until the data is restored to a usable state. See for more about Berkeley DB log files." -msgstr "Berkeley DB同时是一个可信赖的数据库系统。Subversion利用了Berkeley DB可以记日志的便利,这意味着数据库先在磁盘上写一个日志文件,描述它将要做的修改,然后再做这些修改。这是为了确保如果如果任何地方出了差错,数据库系统能恢复到先前的检查点—一个日志文件认为没有错误的位置,重新开始事务直到数据恢复为一个可用的状态。关于Berkeley DB日志文件的更多信息请查看。" - -#. (para) -#: ../source/book.xml:9755 -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." -msgstr "但是每朵玫瑰都有刺,我们也必须记录一些Berkeley DB已知的缺陷。首先,Berkeley DB环境不是跨平台的。你不能简单的拷贝一个在Unix上创建的Subversion版本库到一个Windows系统并期望它能够正常工作。尽管Berkeley DB数据库的大部分格式是不受架构约束的,但环境还是有一些方面没有独立出来。其次,使用Berkeley DB的Subversion不能在95/98系统上运行—如果你需要将版本库建在一个Windows机器上,请装到Windows2000或WindowsXP上。" - -#. (para) -#: ../source/book.xml:9768 -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." -msgstr "Berkeley DB需要底层的文件系统实现严格的POSIX锁定语法,更重要的是,将文件直接映射到内存的能力。" - -#. (para) -#: ../source/book.xml:9766 -msgid "While Berkeley DB promises to behave correctly on network shares that meet a particular set of specifications, most networked filesystem types and appliances do not 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)." -msgstr "然而Berkeley DB对于在网络共享上工作提出了一组规范,大多数网络文件系统和应用没有实现这个要求,所以不能允许在网络共享上的BDB后端版本库被多个客户端同时访问(首先要知道版本库存放在网络共享上是非常普遍的)。" - -#. (para) -#: ../source/book.xml:9780 -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." -msgstr "如果你尝试在不顺从的远程文件系统上使用Berkeley DB,结果是不可预知的—你会立刻看到神秘的错误,或者是在发生隐含错误之后几个月之后才发现。你必须认真考虑在网络共享情况下使用FSFS数据存储。" - -#. (para) -#: ../source/book.xml:9788 -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 wedge besides crashed processes, such as programs conflicting over ownership and permissions on the database files." -msgstr "最后,因为Berkeley DB的库直接链接到了Subversion中,它对于中断比典型的关系型数据库系统更为敏感。大多数SQL系统,举例来说,有一个主服务进程来协调对数据库表的访问。如果一个访问数据库的程序因为某种原因出现问题,数据库守护进程察觉到连接中断会做一些清理。因为数据库守护进程是唯一访问数据库表的进程,应用程序不需要担心访问许可的冲突。但是,这些情况与Berkeley DB不同。Subversion(和使用Subversion库的程序)直接访问数据库的表,这意味着如果有一个程序崩溃,就会使数据库处于一个暂时的不一致、不可访问的状态。当这种情况发生时,管理员需要让Berkeley DB恢复到一个检查点,这的确有点讨厌。除了崩溃的进程,还有一些情况能让版本库出现异常,比如程序在数据库文件的所有权或访问权限上发生冲突。" - -#. (para) -#: ../source/book.xml:9808 -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." -msgstr "Berkeley DB 4.4(对应Subversion 1.4和更高)提供了在需要恢复时自动恢复Berkeley DB环境的能力,当Subversion进程发现任何以前进程未清理的连接,就会执行所有可能的恢复,然后就当什么都没有发生一样继续执行。这样不会完全消除版本库楔住的可能,但是大大减少了人工干预恢复的数量。" - -#. (para) -#: ../source/book.xml:9820 -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 httpd or svnserve (see )—rather than accessing it as many different users via file:// or svn+ssh:// URLs. If using a Berkeley DB repository directly as multiple users, be sure to read ." -msgstr "因为Berkeley DB是这样快速和可伸缩,最好是使用某种单用户单服务进程方式处理—例如Apache的httpdsvnserve(见)—而最好不要使用许多不同的用户通过file://svn+ssh://的URL访问的方法。如果使用多个用户直接访问Berkeley DB版本库的,请确定要读。" - -#. (para) -#: ../source/book.xml:9833 -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 hot, just like a BDB-backed repository." -msgstr "在2004年中期,另一种版本库存储系统慢慢形成了:一种不需要数据库的存储系统。FSFS版本库在单一文件中存储修订版本树,所以版本库中所有的修订版本都在一个子文件夹中有限的几个文件里。事务在单独的子目录中被创建,创建完成后,一个单独的事务文件被创建并移动到修订版本目录,这保证提交是原子性的。因为一个修订版本文件是持久不可改变的,版本库也可以做到备份,就象Berkeley DB版本库一样。" - -#. (para) -#: ../source/book.xml:9846 -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." -msgstr "修订版本文件格式代表了一个修订版本的目录结构,文件内容,和其它修订版本树中相关信息。不像Berkeley DB数据库,这种存储格式可跨平台并且与CPU架构无关。因为没有日志或用到共享内存的文件,数据库能被网络文件系统安全的访问和在只读环境下检查。缺少数据库花消同时也意味着版本库的总体体积可以稍小一点。" - -#. (para) -#: ../source/book.xml:9856 -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." -msgstr "FSFS也有一种不同的性能特性。当提交大量文件时,FSFS可以更快的追加条目。另一方面,FSFS通过写入与上一个版本比较的变化来记录新版本,这也意味着获取最新修订版本时会比Berkeley DB慢一点,提交时FSFS也会有一个更长的延迟,在某些极端情况下会导致客护端在等待回应时超时。" - -#. (para) -#: ../source/book.xml:9866 -msgid "The most important distinction, however, is FSFS's imperviousness to wedging 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." -msgstr "最重要的区别是当出现错误时FSFS不会楔住的能力。如果使用Berkeley DB的进程发生许可错误或突然崩溃,数据库会一直无法使用,直到管理员恢复。假如在应用FSFS版本库时发生同样的情况,版本库不会受到任何干扰,最坏情况下也就是会留下一些事务数据。" - -#. (para) -#: ../source/book.xml:9878 -msgid "Oracle bought Sleepycat and its flagship software, Berkeley DB, on Valentine's Day in 2006." -msgstr "Oracle在2006情人节购买了Sleepycat和它的旗舰软件Berkeley DB。" - -#. (para) -#: ../source/book.xml:9874 -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, 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." -msgstr "FSFS的唯一真实的争议是其相对于Berkeley DB的不成熟,不像Berkeley DB有着多年历史的,而且有专门的开发团队,强大的Oracle会提供支持。FSFS在工程上更新一点,在Subversion1.4之前,我们还未一些确实很严重的数据一致性问题颤抖,尽管只在非常罕见的情况下发生,然而还是发生了。但是,FSFS还是很快被一些最大的开放和私有Subversion版本库所采用,并且承诺了在跨平台时的有较少的麻烦。" - -#. (title) -#: ../source/book.xml:9895 -msgid "Creating and Configuring Your Repository" -msgstr "创建和配置你的版本库" - -#. (para) -#: ../source/book.xml:9897 -msgid "In , 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." -msgstr "在,我们我们看了一些在创建和配置Subversion版本库之前需要做的重要决定,现在我们最终要干活了!在本小节,我们要看看如何真实的创建一个Subversion版本库,并配置它在特定版本库事件执行自定义动作。" - -#. (title) -#: ../source/book.xml:9907 -msgid "Creating the Repository" -msgstr "创建版本库" - -#. (para) -#: ../source/book.xml:9909 -msgid "Subversion repository creation is an incredibly simple task. The svnadmin utility that comes with Subversion provides a subcommand (create) for doing just that." -msgstr "创建一个 Subversion 版本库出乎寻常的简单。 Subversion 提供的svnadmin 工具,有一个执行这个功能的子命令(create)。" - -#. (screen) -#: ../source/book.xml:9913 ../source/book.xml:21457 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin create /var/svn/repos\n" -msgstr "" -"\n" -"$ svnadmin create /usr/local/svn/repos\n" - -#. (para) -#: ../source/book.xml:9916 -#, fuzzy -msgid "This creates a new repository in the directory /var/svn/repos, 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 argument, which accepts as a parameter either fsfs or bdb." -msgstr " 这样在目录/path/to/repos使用默认数据存储方式创建了一个新的版本库。在Subversion 1.2之前,缺省值是Berkeley DB;而现在是FSFS。你可以通过参数明确地指定文件系统类型,可选的值包括fsfsbdb。" - -#. (screen) -#: ../source/book.xml:9924 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ # Create an FSFS-backed repository\n" -"$ svnadmin create --fs-type fsfs /var/svn/repos\n" -"$\n" -msgstr "" -"\n" -"$ # Create an FSFS-backed repository\n" -"$ svnadmin create --fs-type fsfs /path/to/repos\n" -"$\n" - -#. (screen) -#: ../source/book.xml:9929 -#, fuzzy, no-wrap -msgid "" -"\n" -"# Create a Berkeley-DB-backed repository\n" -"$ svnadmin create --fs-type bdb /var/svn/repos\n" -"$\n" -msgstr "" -"\n" -"# Create a Berkeley-DB-backed repository\n" -"$ svnadmin create --fs-type bdb /path/to/repos\n" -"$\n" - -#. (para) -#: ../source/book.xml:9934 -msgid "After running this simple command, you have a Subversion repository." -msgstr "运行这个命令之后,你有了一个Subversion版本库。" - -#. (para) -#: ../source/book.xml:9937 -msgid "The path argument to svnadmin is just a regular filesystem path and not a URL like the svn client program uses when referring to repositories. Both svnadmin and svnlook 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 localfile:// ones) to these two programs." -msgstr "你可能已经注意到了,svnadmin命令的路径参数只是一个普通的文件系统路径,而不是一个svn客户端程序访问版本库时使用的URL。svnadminsvnlook都被认为是服务器端工具—它们在版本库所在的机器上使用,用来检查或修改版本库,不能通过网络来执行任务。一个Subversion的新手通常会犯的错误,就是试图将URL(甚至本地file:路径)传给这两个程序。" - -#. (para) -#: ../source/book.xml:9949 -msgid "Present in the db/ 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 (/) directory. Initially, revision 0 also has a single revision property, svn:date, set to the time at which the repository was created." -msgstr "这个命令在目录/path/to/repos创建了一个新的版本库。这个新的版本库会以修订版本版本0开始其生命周期,里面除了最上层的根目录(/),什么都没有。刚开始,修订版本0有一个修订版本属性svn:date,设置为版本库创建的时间。" - -#. (para) -#: ../source/book.xml:9957 -msgid "Now that you have a repository, it's time to customize it." -msgstr "现在你有了一个版本库,可以用户化了。" - -#. (para) -#: ../source/book.xml:9960 -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 by hand. The svnadmin 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 not attempt manual manipulation of your version control history by poking and prodding around in your repository's data store files!" -msgstr "一般来说,版本库除了一小部分—例如配置文件和钩子脚本,你不要(也不需要)手动干预版本库。svnadmin工具应该足以用来处理对版本库的任何修改,或者你也可以使用第三方工具(比如Berkeley DB的工具包)来调整部分版本库。要尝试通过处理版本库数据存储文件手工修改版本控制历史," - -#. (title) -#: ../source/book.xml:9977 -msgid "Implementing Repository Hooks" -msgstr "实现版本库钩子" - -#. (para) -#: ../source/book.xml:9979 -msgid "A hook 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 pre hooks) 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 post hooks) 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." -msgstr "钩子是通过版本库事件触发,例如新版本的创建或一个未版本化属性的修改。一些钩子(叫做pre hooks)在事件发生前运行,可以用来报告发生了什么以及防止它发生。还有一些钩子(post hooks)在版本库事件之后发生,只是用来报告。每个钩子能够获得事件的足够信息,例如提出的(或完成的)版本库修改细节,还有触发事件的用户名。" - -#. (para) -#: ../source/book.xml:9992 -msgid "The hooks subdirectory is, by default, filled with templates for various repository hooks." -msgstr "默认情况下,hooks子目录中包含各种版本库钩子模板。" - -#. (screen) -#: ../source/book.xml:9995 -#, no-wrap -msgid "" -"\n" -"$ ls repos/hooks/\n" -"post-commit.tmpl\t post-unlock.tmpl pre-revprop-change.tmpl\n" -"post-lock.tmpl\t\t pre-commit.tmpl pre-unlock.tmpl\n" -"post-revprop-change.tmpl pre-lock.tmpl start-commit.tmpl\n" -msgstr "" -"\n" -"$ ls repos/hooks/\n" -"post-commit.tmpl\t post-unlock.tmpl pre-revprop-change.tmpl\n" -"post-lock.tmpl\t\t pre-commit.tmpl pre-unlock.tmpl\n" -"post-revprop-change.tmpl pre-lock.tmpl start-commit.tmpl\n" - -#. (para) -#: ../source/book.xml:10001 -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 repos/hooks directory which can be executed as the name (like start-commit or post-commit) of the hook." -msgstr "对每种Subversion版本库支持的钩子的都有一个模板,通过查看这些脚本的内容,你能看到是什么事件触发了脚本及如何给传脚本传递数据。同时,这些模版也是如何使用这些脚本,结合Subversion支持的工具来完成有用任务的例子。要实际安装一个可用的钩子,你需要在repos/hooks目录下安装一些与钩子同名(如 start-commit或者post-commit)的可执行程序或脚本。" - -#. (para) -#: ../source/book.xml:10013 -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 .tmpl 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 .exe for programs, and .bat for batch files." -msgstr "在Unix平台上,这意味着要提供一个与钩子同名的脚本或程序(可能是shell 脚本,Python 程序,编译过的c语言二进制文件或其他东西)。当然,脚本模板文件不仅仅是展示了一些信息—在Unix下安装钩子最简单的办法就是拷贝这些模板,并且去掉.tmpl扩展名,然后自定义钩子的内容,确定脚本是可运行的。Windows用文件的扩展名来决定一个程序是否可运行,所以你要使程序的基本名与钩子同名,同时,它的扩展名是Windows系统所能辨认的,例如execom和批处理的bat。" - -#. (para) -#: ../source/book.xml:10030 -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 $PATH (or %PATH%, 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." -msgstr "由于安全原因,Subversion版本库在一个空环境中执行钩子脚本—就是没有设置任何环境变量,甚至没有$PATH%PATH%。由于这个原因,许多管理员会感到很困惑,它们的钩子脚本手工运行时正常,可在Subversion中却不能运行。要注意,必须在你的钩子中设置好环境变量或为你的程序指定好绝对路径。" - -#. (para) -#: ../source/book.xml:10040 -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." -msgstr "Subversion会试图以当前访问版本库的用户身份执行钩子。通常,对版本库的访问总是通过Apache HTTP服务器和mod_dav_svn进行,因此,执行钩子的用户就是运行Apache的用户。钩子本身需要具有操作系统级的访问许可,用户可以运行它。另外,其它被钩子直接或间接使用的文件或程序(包括Subversion版本库本身)也要被同一个用户访问。换句话说,要注意潜在的访问控制问题,它可能会让你的钩子无法按照你的目的顺利执行。" - -#. (para) -#: ../source/book.xml:10052 -msgid "There are nine hooks implemented by the Subversion repository, and you can get details about each of them in . 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." -msgstr "Subversion版本库有9种钩子实现,你可以在获得每个的信息。作为一个版本库管理员,你需要决定你要实现的钩子(通过提供家当名称和执行许可的程序)类型和方法,这种决策需要对版本库的部署非常熟悉。例如,如果你使用服务器配置方式,通过版本库检测用户名称和权限,你不需要通过钩子系统实现访问控制。" - -#. (para) -#: ../source/book.xml:10064 -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 for discussion of some of the most commonly used hook programs. Or, if you wish to write your own, see ." -msgstr "在Subversion社区和其他地方都不缺Subversion钩子,这些脚本覆盖了广泛的工具—基本的访问控制,政策相关检查,问题追踪集成,email或提交通知等等。关于最常用的钩子程序的讨论,可以看,如果你希望写你自己的,可以看。" - -#. (para) -#: ../source/book.xml:10073 -msgid "While hook scripts can do almost anything, there is one dimension in which hook script authors should show restraint: do not 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 validate the transaction in the pre-commit 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." -msgstr "尽管经过调整钩子脚本可以作任何事情,但钩子脚本的作者仍会受到一些限制:不要修改使用钩子脚本修改提交事务,因为使用钩子脚本自动修改错误或提交文件的政策违例的尝试会导致问题。Subversion会在客户端缓存对应的版本库数据,如果你这样修改了提交事务,这些缓存就进入了未知的状态,这种不一致会导致令人吃惊和预想不到的行为。作为对事物修改的替换,你可以简单的在pre-commit确认事物信息并且拒绝提交,如果这样满足不了需求,作为额外的奖赏,你的用户会学会小心顺从的工作习惯。" - -#. (title) -#: ../source/book.xml:10095 -msgid "Berkeley DB Configuration" -msgstr "Berkeley DB 配置" - -#. (para) -#: ../source/book.xml:10097 -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." -msgstr "Berkeley DB环境是对一个或多个数据库、日志文件、区域文件和配置文件的封装。Berkeley DB环境对许多参数有自己的缺省值,例如任何时间里可用的数据库锁定数目、日志文件的最大值等。Subversion文件系统会使用Berkeley DB的默认值。 不过,有时候你的特定版本库与它独特的数据集合和访问类型,可能需要不同的配置选项。" - -#. (para) -#: ../source/book.xml:10108 -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 DB_CONFIG in the environment directory (namely, the repository's db 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 DB_CONFIG 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 DB_CONFIG won't take effect until you recover the database environment (using svnadmin recover)." -msgstr "你的版本库的Berkeley配置文件位于db目录的db/DB_CONFIG, Subversion在创建版本库时自己创建了这个文件。这个文件初始时包含了一些默认选项,也包含了Berkeley DB在线文档,使你能够了解这些选项是做什么的。当然,你也可以为你的DB_CONFIG 文件添加任何Berkeley DB支持的选项。需要注意到,虽然Subversion不会尝试读取并解析这个文件,或使用其中的设置,你一定要避免会导致Berkeley DB按照Subversion代码不习惯的方式工作的修改。另外,DB_CONFIG的修改在复原数据库环境(用svnadmin recover)之前不会产生任何效果。" - -#. (title) -#: ../source/book.xml:10137 -msgid "Repository Maintenance" -msgstr "版本库维护" - -#. (para) -#: ../source/book.xml:10139 -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." -msgstr "维护一个Subversion版本库是一项令人沮丧的工作,主要因为有数据库后端与生俱来的复杂性。做好这项工作需要知道一些工具——它们是什么,什么时候用以及如何使用。这一节将会向你介绍Subversion自带的版本库管理工具,以及如何使用它们来完成诸如版本库移植、升级、备份和整理之类的任务。" - -#. (title) -#: ../source/book.xml:10150 -msgid "An Administrator's Toolkit" -msgstr "管理员的工具箱" - -#. (para) -#: ../source/book.xml:10152 -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." -msgstr "Subversion提供了一些用来创建、查看、修改和修复版本库的工具。让我们首先详细了解一下每个工具,然后,我们再看一下仅在Berkeley DB后端分发版本中提供的版本数据库工具。" - -#. (para) -#: ../source/book.xml:10164 -msgid "The svnadmin 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 svnadmin is similar to that of other Subversion command-line programs:" -msgstr "svnadmin程序是版本库管理员最好的朋友。除了提供创建Subversion版本库的功能,这个程序使你可以维护这些版本库。svnadmin的语法同其他Subversion命令类似:" - -#. (screen) -#: ../source/book.xml:10171 -#, no-wrap -msgid "" -"\n" -"$ svnadmin help\n" -"general usage: svnadmin SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\n" -"Type 'svnadmin help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnadmin --version' to see the program version and FS modules.\n" -"\n" -"Available subcommands:\n" -" crashtest\n" -" create\n" -" deltify\n" -"…\n" -msgstr "" -"\n" -"$ svnadmin help\n" -"general usage: svnadmin SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\n" -"Type 'svnadmin help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnadmin --version' to see the program version and FS modules.\n" -"\n" -"Available subcommands:\n" -" crashtest\n" -" create\n" -" deltify\n" -"…\n" - -#. (para) -#: ../source/book.xml:10183 -msgid "We've already mentioned svnadmin's create subcommand (see ). Most of the others we will cover later in this chapter. And you can consult for a full rundown of subcommands and what each of them offers." -msgstr "我们已经讨论了svnadmincreate子命令(参照),本章后面我们会详细讲解大多数其他的子命令,关于所有的子命令你可以参考。" - -#. (para) -#: ../source/book.xml:10194 -msgid "svnlook is a tool provided by Subversion for examining the various revisions and transactions (which are revisions in-the-making) in a repository. No part of this program attempts to change the repository. svnlook is typically used by the repository hooks for reporting the changes that are about to be committed (in the case of the pre-commit hook) or that were just committed (in the case of the post-commit hook) to the repository. A repository administrator may use this tool for diagnostic purposes." -msgstr "svnlook是Subversion提供的用来查看版本库中不同的修订版本和事务(正在产生的修订版本)。这个程序不会修改版本库内容-这是个只读的工具。svnlook通常用在版本库钩子程序中,用来记录版本库即将提交(用在pre-commit钩子时)或者已经提交的(用在post-commit钩子时)修改。版本库管理员可以将这个工具用于诊断。" - -#. (para) -#: ../source/book.xml:10205 -msgid "svnlook has a straightforward syntax:" -msgstr "svnlook的语法很直接:" - -#. (screen) -#: ../source/book.xml:10207 -#, no-wrap -msgid "" -"\n" -"$ svnlook help\n" -"general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\n" -"Note: any subcommand which takes the '--revision' and '--transaction'\n" -" options will, if invoked without one of those options, act on\n" -" the repository's youngest revision.\n" -"Type 'svnlook help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnlook --version' to see the program version and FS modules.\n" -"…\n" -msgstr "" -"\n" -"$ svnlook help\n" -"general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]\n" -"Note: any subcommand which takes the '--revision' and '--transaction'\n" -" options will, if invoked without one of those options, act on\n" -" the repository's youngest revision.\n" -"Type 'svnlook help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnlook --version' to see the program version and FS modules.\n" -"…\n" - -#. (para) -#: ../source/book.xml:10217 -#, fuzzy -msgid "Nearly every one of svnlook'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 and options to specify which revision or transaction, respectively, to examine. In the absence of both the and options, svnlook will examine the youngest (or HEAD) 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 /var/svn/repos:" -msgstr "几乎svnlook的每一个子命令都能操作修订版本或事务树,显示树本身的信息,或是它与版本库中上一个修订版本的不同。你可以用选项指定要查看的修订版本或事务。如果没有指定选项,svnlook会检查版本库最新的(或者说HEAD)修订版本。所以当19是位于/path/to/repos的版本库的最新版本时,如下的两个名字起到相同的效果:" - -#. (screen) -#: ../source/book.xml:10231 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook info /var/svn/repos\n" -"$ svnlook info /var/svn/repos -r 19\n" -msgstr "" -"\n" -"$ svnlook info /path/to/repos\n" -"$ svnlook info /path/to/repos -r 19\n" - -#. (para) -#: ../source/book.xml:10235 -msgid "The only exception to these rules about subcommands is the svnlook youngest subcommand, which takes no options, and simply prints out the repository's youngest revision number." -msgstr "这些子命令的唯一例外是svnlook youngest,它不需要任何选项,只会打印出版本库的最新修订版本号。" - -#. (screen) -#: ../source/book.xml:10239 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook youngest /var/svn/repos\n" -"19\n" -msgstr "" -"\n" -"$ svnlook youngest /path/to/repos\n" -"19\n" - -#. (para) -#: ../source/book.xml:10244 -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) or aborted and removed." -msgstr "请记住只能浏览未提交的事物,大多数版本库没有这样的事物,因为事物要么是已经提交的(也就是你可以访问的修订版本),要么是退出的和删除的。" - -#. (para) -#: ../source/book.xml:10251 -msgid "Output from svnlook is designed to be both human- and machine-parsable. Take as an example the output of the info subcommand:" -msgstr "svnlook的输出被设计为人和机器都易理解,拿info子命令举例来说:" - -#. (screen) -#: ../source/book.xml:10254 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook info /var/svn/repos\n" -"sally\n" -"2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002)\n" -"27\n" -"Added the usual\n" -"Greek tree.\n" -msgstr "" -"\n" -"$ svnlook info /path/to/repos\n" -"sally\n" -"2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002)\n" -"27\n" -"Added the usual\n" -"Greek tree.\n" - -#. (para) -#: ../source/book.xml:10262 -msgid "The output of the info subcommand is defined as:" -msgstr "info子命令的输出定义如下:" - -#. (para) -#: ../source/book.xml:10266 -msgid "The author, followed by a newline." -msgstr "作者,后接换行。" - -#. (para) -#: ../source/book.xml:10269 -msgid "The date, followed by a newline." -msgstr "日期,后接换行。" - -#. (para) -#: ../source/book.xml:10272 -msgid "The number of characters in the log message, followed by a newline." -msgstr "日志消息的字数,后接换行。" - -#. (para) -#: ../source/book.xml:10276 -msgid "The log message itself, followed by a newline." -msgstr "日志信息本身, 后接换行。" - -#. (para) -#: ../source/book.xml:10279 -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, svnlook 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." -msgstr "这种输出是人可阅读的,像是时间戳这种有意义的条目,使用文本表示,而不是其他比较晦涩的方式(例如许多无聊的人推荐的十亿分之一秒的数量)。这种输出也是机器可读的—因为日志信息可以有多行,没有长度的限制,svnlook在日志消息之前提供了消息的长度,这使得脚本或者其他这个命令的封装器能够针对日志信息做出许多职能的决定,或仅仅是在这个输出成为最后一个字节之前应该略过多少字节。" - -#. (para) -#: ../source/book.xml:10292 -msgid "svnlook 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 for a full reference of svnlook's features." -msgstr "svnlook还可以做很多别的查询:显示我们先前提到的信息的一些子集,递归显示版本目录树,报告指定的修订版本或事务中哪些路径曾经被修改过,显示对文件和目录做过的文本和属性的修改,等等。svnlook命令能接受子命令的完全特性参考。" - -#. (para) -#: ../source/book.xml:10306 -msgid "While it won't be the most commonly used tool at the administrator's disposal, svndumpfilter 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." -msgstr "虽然在管理员的日常工作中并不会经常使用,不过svndumpfilter提供了一项特别有用的功能—可以简单快速的作为Subversion版本库历史的以路径为基础的过滤器。" - -#. (para) -#: ../source/book.xml:10312 -msgid "The syntax of svndumpfilter is as follows:" -msgstr "svndumpfilter的语法如下:" - -#. (screen) -#: ../source/book.xml:10314 -#, no-wrap -msgid "" -"\n" -"$ svndumpfilter help\n" -"general usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...]\n" -"Type \"svndumpfilter help <subcommand>\" for help on a specific subcommand.\n" -"Type 'svndumpfilter --version' to see the program version.\n" -" \n" -"Available subcommands:\n" -" exclude\n" -" include\n" -" help (?, h)\n" -msgstr "" -"\n" -"$ svndumpfilter help\n" -"general usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...]\n" -"Type \"svndumpfilter help <subcommand>\" for help on a specific subcommand.\n" -"Type 'svndumpfilter --version' to see the program version.\n" -" \n" -"Available subcommands:\n" -" exclude\n" -" include\n" -" help (?, h)\n" - -#. (para) -#: ../source/book.xml:10325 -msgid "There are only two interesting subcommands. They allow you to make the choice between explicit or implicit inclusion of paths in the stream:" -msgstr "有意义的子命令只有两个。你可以使用这两个子命令说明你希望保留和不希望保留的路径:" - -#. (literal) -#: ../source/book.xml:10331 -msgid "exclude" -msgstr "exclude" - -#. (para) -#: ../source/book.xml:10334 -msgid "Filter out a set of paths from the dump data stream." -msgstr "将指定路径的数据从转储数据流中排除。" - -#. (literal) -#: ../source/book.xml:10340 -msgid "include" -msgstr "include" - -#. (para) -#: ../source/book.xml:10343 -msgid "Allow only the requested set of paths to pass through the dump data stream." -msgstr "将指定路径的数据添加到转储数据流中。" - -#. (para) -#: ../source/book.xml:10348 -msgid "You can learn more about these subcommands and svndumpfilter's unique purpose in ." -msgstr "关于这些子命令和svndumpfilter的唯一目的的,可以见。" - -#. (para) -#: ../source/book.xml:10365 -msgid "Or is that, the sync?" -msgstr "或者是, sync ?" - -#. (para) -#: ../source/book.xml:10356 -msgid "The svnsync 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 source and sink repositories may be on different computers from each other and from svnsync itself." -msgstr "svnsync程序是Subversion 1.4版的新特性,提供了维护一个只读版本库镜像的全部功能。这个程序只有一个工作—将一个版本库的历史转移到另一个,尽管有几种方法,但这种方法的主要特点是可以远程操作—目标版本库以及svnsync程序可能在不同的计算机上。" - -#. (para) -#: ../source/book.xml:10368 -msgid "As you might expect, svnsync has a syntax that looks very much like every other program we've mentioned in this chapter:" -msgstr "就像你期望的,svnsync的语法与本节提到的其他命令非常类似。" - -#. (screen) -#: ../source/book.xml:10371 -#, no-wrap -msgid "" -"\n" -"$ svnsync help\n" -"general usage: svnsync SUBCOMMAND DEST_URL [ARGS & OPTIONS ...]\n" -"Type 'svnsync help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnsync --version' to see the program version and RA modules.\n" -"\n" -"Available subcommands:\n" -" initialize (init)\n" -" synchronize (sync)\n" -" copy-revprops\n" -" help (?, h)\n" -"$\n" -msgstr "" -"\n" -"$ svnsync help\n" -"general usage: svnsync SUBCOMMAND DEST_URL [ARGS & OPTIONS ...]\n" -"Type 'svnsync help <subcommand>' for help on a specific subcommand.\n" -"Type 'svnsync --version' to see the program version and RA modules.\n" -"\n" -"Available subcommands:\n" -" initialize (init)\n" -" synchronize (sync)\n" -" copy-revprops\n" -" help (?, h)\n" -"$\n" - -#. (para) -#: ../source/book.xml:10384 -msgid "We talk more about replication repositories with svnsync in ." -msgstr "我们会在详细讨论使用svnsync实现版本库复制。" - -#. (title) -#: ../source/book.xml:10390 -msgid "Berkeley DB Utilities" -msgstr "Berkeley DB 工具" - -#. (para) -#: ../source/book.xml:10392 -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 db/ 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." -msgstr "如果你使用Berkeley DB版本库,那么所有纳入版本控制的文件系统结构和数据都储存在一系列数据库的表中,而这个目录就是版本库的db/。这个子目录是一个标准的Berkeley DB环境目录,可以应用任何Berkeley数据库工具进行操作,通常这些工具随Berkeley DB发布。" - -#. (para) -#: ../source/book.xml:10400 -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 svnadmin tool. For example, svnadmin list-unused-dblogs and svnadmin list-dblogs perform a subset of what is provided by the Berkeley db_archive command, and svnadmin recover reflects the common use cases of the db_recover utility." -msgstr "对于Subversion的日常使用来说,这些工具并没有什么用处。大多数Subversion版本库必须的数据库操作都集成到svnadmin工具中。比如,svnadmin list-unused-dblogssvnadmin list-dblogs实现了Berkeley db_archive命令功能的一个子集,而svnadmin recover则起到了db_recover工具的作用。" - -#. (para) -#: ../source/book.xml:10410 -msgid "However, there are still a few Berkeley DB utilities that you might find useful. The db_dump and db_load 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 svnadmin dump and svnadmin load for similar purposes, but db_dump and db_load 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 db_stat utility can provide useful information about the status of your Berkeley DB environment, including detailed statistics about the locking and storage subsystems." -msgstr "当然,还有一些Berkeley DB工具有时是有用的。db_loaddb_dump分别将Berkeley DB数据库中的键值对以特定的格式读写文件。Berkeley数据库本身不支持跨平台转移,这两个工具在这样的情况下就可以实现在平台间转移数据库的功能,而无需关心操作系统或机器架构。就像我们以前描述的,你可以使用svnadmin dumpsvnadmin load实现类似的目的,但是db_dumpdb_load可以更快一点,它们也可以协助Berkeley DB的hacker来篡改BDB后端的数据,这是Subversion工具不允许的。此外,db_stat工具能够提供关于Berkeley DB环境的许多有用信息,包括详细的锁定和存储子系统的统计信息。" - -#. (para) -#: ../source/book.xml:10430 -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 http://www.oracle.com/technology/documentation/berkeley-db/db/." -msgstr "关于Berkeley DB工具的更多信息,可以访问Oracle网站的Berkeley DB文档部分,在http://www.oracle.com/technology/documentation/berkeley-db/db/。" - -#. (title) -#: ../source/book.xml:10438 -msgid "Commit Log Message Correction" -msgstr "修正提交消息" - -#. (para) -#: ../source/book.xml:10440 -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 pre-revprop-change hook; see ) to accept changes to this log message after the commit is finished, then the user can fix her log message remotely using the svn program's propset command (see ). 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." -msgstr "有时用户输入的日志信息有错误(比如拼写错误或者内容错误)。如果配置版本库时设置了(使用pre-revprop-changepost-revprop-change钩子;参见)允许用户在提交后修改日志信息的选项,那么用户可以使用svn程序的propset命令(参见修正日志信息中的错误。不过为了避免永远丢失信息,Subversion版本库通常设置为仅能由管理员修改非版本化属性(这也是默认的选项)。" - -#. (para) -#: ../source/book.xml:10452 -msgid "If a log message needs to be changed by an administrator, this can be done using svnadmin setlog. This command changes the log message (the svn:log property) on a given revision of a repository, reading the new value from a provided file." -msgstr "如果管理员想要修改日志信息,那么可以使用svnadmin setlog命令。这个命令从指定的文件中读取信息,取代版本库中某个修订版本的日志信息(svn:log属性)。" - -#. (screen) -#: ../source/book.xml:10457 -#, no-wrap -msgid "" -"\n" -"$ echo \"Here is the new, correct log message\" > newlog.txt\n" -"$ svnadmin setlog myrepos newlog.txt -r 388\n" -msgstr "" -"\n" -"$ echo \"Here is the new, correct log message\" > newlog.txt\n" -"$ svnadmin setlog myrepos newlog.txt -r 388\n" - -#. (para) -#: ../source/book.xml:10461 -msgid "The svnadmin setlog command, by default, is still bound by the same protections against modifying unversioned properties as a remote client is—the pre- and post-revprop-change 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 to the svnadmin setlog command." -msgstr "即使是svnadmin setlog命令也受到限制。pre-post-revprop-change钩子同样会被触发,因此必须进行相应的设置才能允许修改非版本化属性。不过管理员可以使用svnadmin setlog命令的选项跳过钩子。" - -#. (para) -#: ../source/book.xml:10472 -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." -msgstr "不过需要注意的是,一旦跳过钩子也就跳过了钩子所提供的所有功能,比如邮件通知(通知属性有改动)、系统备份(可以用来跟踪非版本化的属性变更)等等。换句话说,要留心你所作出的修改,以及你作出修改的方式。" - -#. (title) -#: ../source/book.xml:10483 -msgid "Managing Disk Space" -msgstr "管理磁盘空间" - -#. (para) -#: ../source/book.xml:10485 -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." -msgstr "虽然存储器的价格在过去的几年里以让人难以致信的速度滑落,但是对于那些需要对大量数据进行版本管理的管理员们来说,磁盘空间的消耗依然是一个重要的因素。版本库每增加一个字节都意味着需要多一个字节的磁盘空间进行备份,对于多重备份来说,就需要消耗更多的磁盘空间。Berkeley DB版本库的主要存储机制是基于一个复杂的数据库系统建立的,因此了解一些数据性质是有意义的,比如哪些数据必须保持在线,哪些数据需要备份、哪些数据可以安全的删除等等。" - -#. (title) -#: ../source/book.xml:10497 -msgid "How Subversion saves disk space" -msgstr "Subversion 如何节约磁盘空间" - -#. (para) -#: ../source/book.xml:10499 -msgid "To keep the repository small, Subversion uses deltification (or, deltified storage) 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, I look just like this other piece of data over here, except for the following couple of changes. 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 fulltext 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." -msgstr "为了尽可能减小版本库的体积,Subversion在版本库中采用了增量化技术(或称为增量存储技术)。增量化技术可以将一组数据表示为相对于另一组数据的不同。如果这两组数据十分相似,增量化技术就可以仅保存其中一组数据以及两组数据的差别,而不需要同时保存两组数据,从而节省了磁盘空间。每次一个文件的新版本提交到版本库,版本库就会将之前的版本(之前的多个版本)相对于新版本做增量化处理。采用了这项技术,版本库的数据量大小基本上是可以估算出来的—主要是版本化的文件的大小—并且远小于全文保存所需的数据量。而Subversion 1.4以后,空间存储变得更为节省—现在文件内容的全文本身都是压缩的了。" - -#. (para) -#: ../source/book.xml:10519 -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." -msgstr "由于Subversion版本库的增量化数据保存在单一Berkeley DB数据库文件中,减少数据的体积并不一定能够减小数据库文件的大小。但是,Berkeley DB会在内部记录未使用的数据库文件区域,并且在增加数据库文件大小之前会首先使用这些未使用的区域。因此,即使增量化技术不能立杆见影的节省磁盘空间,也可以极大的减慢数据库的膨胀速度。" - -#. (title) -#: ../source/book.xml:10534 -msgid "Removing dead transactions" -msgstr "删除终止的事务" - -#. (para) -#: ../source/book.xml:10536 -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." -msgstr "尽管不太常见,Subversion的提交进程也有失败,同时留下将要生成的修订版本—未提交的事物和所有随之的文件和目录修改。出现这种情况可能有以下原因:客户端的用户粗暴的结束了操作,操作过程中出现网络故障,等等。不管是什么原因,死亡的事务总是有可能会出现。这类事务不会产生什么负面影响,仅仅是消耗了一点点磁盘空间。不过,严厉的管理员总是希望能够将它们清除出去。" - -#. (para) -#: ../source/book.xml:10548 -msgid "You can use svnadmin's lstxns command to list the names of the currently outstanding transactions." -msgstr "可以使用svnadminlstxns 命令列出当前的事务名。" - -#. (screen) -#: ../source/book.xml:10551 -#, no-wrap -msgid "" -"\n" -"$ svnadmin lstxns myrepos\n" -"19\n" -"3a1\n" -"a45\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin lstxns myrepos\n" -"19\n" -"3a1\n" -"a45\n" -"$\n" - -#. (para) -#: ../source/book.xml:10558 -msgid "Each item in the resultant output can then be used with svnlook (and its 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 svnadmin rmtxns, which will perform the cleanup of the transaction. In fact, the rmtxns subcommand can take its input directly from the output of lstxns!" -msgstr "将输出的结果条目作为svnlook(设置选项)的参数,就可以获得事务的详细信息,如事务的创建者、创建时间,事务已作出的更改类型,由这些信息可以判断出是否可以将这个事务安全的删除。如果可以安全删除,那么只需将事务名作为参数输入到svnadmin rmtxns,就可以将事务清除掉了。其实rmtxns子命令可以直接以lstxns的输出作为输入进行清理。" - -#. (screen) -#: ../source/book.xml:10571 -#, no-wrap -msgid "" -"\n" -"$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos`\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos`\n" -"$\n" - -#. (para) -#: ../source/book.xml:10575 -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. contains a bit of shell-scripting that can quickly generate information about each outstanding transaction in your repository." -msgstr "在按照上面例子中的方法清理版本库之前,你或许应该暂时关闭版本库和客户端的连接。这样在你开始清理之前,不会有正常的事务进入版本库。中的shell脚本可以用来迅速获得版本库中异常事务的信息。" - -#. (title) -#: ../source/book.xml:10584 -msgid "txn-info.sh (Reporting Outstanding Transactions)" -msgstr "txn-info.sh(报告异常事务)" - -#. (programlisting) -#: ../source/book.xml:10586 -#, no-wrap -msgid "" -"\n" -"#!/bin/sh\n" -"\n" -"### Generate informational output for all outstanding transactions in\n" -"### a Subversion repository.\n" -"\n" -"REPOS=\"${1}\"\n" -"if [ \"x$REPOS\" = x ] ; then\n" -" echo \"usage: $0 REPOS_PATH\"\n" -" exit\n" -"fi\n" -"\n" -"for TXN in `svnadmin lstxns ${REPOS}`; do \n" -" echo \"---[ Transaction ${TXN} ]-------------------------------------------\"\n" -" svnlook info \"${REPOS}\" -t \"${TXN}\"\n" -"done\n" -msgstr "" -"\n" -"#!/bin/sh\n" -"\n" -"### Generate informational output for all outstanding transactions in\n" -"### a Subversion repository.\n" -"\n" -"REPOS=\"${1}\"\n" -"if [ \"x$REPOS\" = x ] ; then\n" -" echo \"usage: $0 REPOS_PATH\"\n" -" exit\n" -"fi\n" -"\n" -"for TXN in `svnadmin lstxns ${REPOS}`; do \n" -" echo \"---[ Transaction ${TXN} ]-------------------------------------------\"\n" -" svnlook info \"${REPOS}\" -t \"${TXN}\"\n" -"done\n" - -#. (para) -#: ../source/book.xml:10604 -msgid "The output of the script is basically a concatenation of several chunks of svnlook info output (see ), and will look something like:" -msgstr "该命令的输出主要由多个svnlook info(参见)的输出组成,类似于下面的例子:" - -#. (screen) -#: ../source/book.xml:10608 -#, no-wrap -msgid "" -"\n" -"$ txn-info.sh myrepos\n" -"---[ Transaction 19 ]-------------------------------------------\n" -"sally\n" -"2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001)\n" -"0\n" -"---[ Transaction 3a1 ]-------------------------------------------\n" -"harry\n" -"2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001)\n" -"39\n" -"Trying to commit over a faulty network.\n" -"---[ Transaction a45 ]-------------------------------------------\n" -"sally\n" -"2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001)\n" -"0\n" -"$\n" -msgstr "" -"\n" -"$ txn-info.sh myrepos\n" -"---[ Transaction 19 ]-------------------------------------------\n" -"sally\n" -"2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001)\n" -"0\n" -"---[ Transaction 3a1 ]-------------------------------------------\n" -"harry\n" -"2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001)\n" -"39\n" -"Trying to commit over a faulty network.\n" -"---[ Transaction a45 ]-------------------------------------------\n" -"sally\n" -"2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001)\n" -"0\n" -"$\n" - -#. (para) -#: ../source/book.xml:10625 -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?" -msgstr "一个废弃了很长时间的事务通常是提交错误或异常中断的结果。事务的时间戳可以提供给我们一些有趣的信息,比如一个进行了9个月的操作居然还是活动的等等。" - -#. (para) -#: ../source/book.xml:10630 -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." -msgstr "简言之,作出事务清理的决定前应该仔细考虑一下。许多信息源—比如Apache的错误和访问日志,已成功完成的Subversion提交日志等等—都可以作为决策的参考。当然,管理员还可以直接和那些似乎已经死亡事务的提交者直接交流(比如通过邮件),来确认该事务确实已经死亡了。" - -#. (title) -#: ../source/book.xml:10642 -msgid "Purging unused Berkeley DB logfiles" -msgstr "删除不使用的 Berkeley DB 日志文件" - -#. (para) -#: ../source/book.xml:10644 -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 between states. Thus, they can grow and accumulate quite rapidly." -msgstr "目前为止,Subversion版本库中耗费磁盘空间的最大凶手是日志文件,每次Berkeley DB在修改真正的数据文件之前都会进行预写入(pre-writes)操作。这些文件记录了数据库从一个状态变化到另一个状态的所有动作——数据库文件反映了特定时刻数据库的状态,而日志文件则记录了所有状态变化的信息。因此,日志文件会以很快的速度膨胀起来。" - -#. (para) -#: ../source/book.xml:10654 -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 svnadmin 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 to the svnadmin create command. If you forget to do this, or change your mind at a later time, simply edit the DB_CONFIG file found in your repository's db directory, comment out the line which contains the set_flags DB_LOG_AUTOREMOVE directive, and then run svnadmin recover on your repository to force the configuration changes to take effect. See for more information about database configuration." -msgstr "幸运的是,从版本4.2开始,Berkeley DB的数据库环境无需额外的操作即可删除无用的日志文件。如果编译svnadmin时使用了高于4.2版本的Berkeley DB,那么由此svnadmin程序创建的版本库就具备了自动清除日志文件的功能。如果想屏蔽这个功能,只需设置svnadmin create命令的选项即可。如果创建版本库以后想要修改关于此功能的设置,只需编辑版本库中db目录下的DB_CONFIG文件,注释掉包含set_flags DB_LOG_AUTOREMOVE内容的这一行,然后运行svnadmin recover强制设置生效就行了。查阅获得更多关于数据库配置的帮助信息。" - -#. (para) -#: ../source/book.xml:10671 -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 svnadmin list-unused-dblogs command to list the unused log files:" -msgstr "如果不自动删除日志文件,那么日志文件会随着版本库的使用逐渐增加。这多少应该算是数据库系统的特性,通过这些日志文件可以在数据库严重损坏时恢复整个数据库的内容。但是一般情况下,最好是能够将无用的日志文件收集起来并删除,这样就可以节省磁盘空间。使用svnadmin list-unused-dblogs命令可以列出无用的日志文件:" - -#. (screen) -#: ../source/book.xml:10682 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin list-unused-dblogs /var/svn/repos\n" -"/var/svn/repos/log.0000000031\n" -"/var/svn/repos/log.0000000032\n" -"/var/svn/repos/log.0000000033\n" -"…\n" -"$ rm `svnadmin list-unused-dblogs /var/svn/repos`\n" -"## disk space reclaimed!\n" -msgstr "" -"\n" -"$ svnadmin list-unused-dblogs /path/to/repos\n" -"/path/to/repos/log.0000000031\n" -"/path/to/repos/log.0000000032\n" -"/path/to/repos/log.0000000033\n" -"…\n" -"$ rm `svnadmin list-unused-dblogs /path/to/repos`\n" -"## disk space reclaimed!\n" - -#. (para) -#: ../source/book.xml:10692 -msgid "BDB-backed repositories whose log files are used as part of a backup or disaster recovery plan should not make use of the log file autoremoval feature. Reconstruction of a repository's data from log files can only be accomplished when all 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." -msgstr "BDB后端的版本库的日志文件如果是用来作为备份或容灾恢复计划时,不要使用日志文件的自动删除特性。从日志文件重新构建版本库数据只有在所有的日志文件都存在时才能完成,如果有一些文件在别的程序将其拷贝之前就已经被删除了,不完整的备份日志文件就没有用了。" - -#. (title) -#: ../source/book.xml:10707 -msgid "Berkeley DB Recovery" -msgstr "Berkeley DB 恢复" - -#. (para) -#: ../source/book.xml:10709 -msgid "As mentioned in , 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." -msgstr "就像在提到的,如果没有正确的关闭,Berkeley DB版本库有时候会进入冻结的状态。当发生这种情况时,管理员需要恢复版本库进入一致的状态。当然这种情况只发生在BDB版本库,FSFS版本库不会有这种情况。对于使用Subversion 1.4和Berkeley DB 4.4或更新版本的用户,你一定发现Subversion对于这种情况已经更富弹性,但是Berkeley DB楔住的情况还是会发生,管理员需要知道如何安全的处理种情况。" - -#. (para) -#: ../source/book.xml:10720 -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 .)" -msgstr "Berkeley DB使用一种锁机制保护版本库中的数据。锁机制确保数据库不会同时被多个访问进程修改,也就保证了从数据库中读取到的数据始终是稳定而且正确的。当一个进程需要修改数据库中的数据时,首先必须检查目标数据是否已经上锁。如果目标数据没有上锁,进程就将它锁上,然后作出修改,最后再将锁解除。而其它进程则必须等待锁解除后才能继续访问数据库中的相关内容。(你对这种锁无能为力,作为一个用户,可以应用版本库的版本化文件;我们会在讨论因为术语冲突导致的概念混淆。)" - -#. (para) -#: ../source/book.xml:10735 -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 wedged. 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)." -msgstr "在操作Subversion版本库的过程中,致命错误(如内存或硬盘空间不足)或异常中断可能会导致某个进程没能及时将锁解除。结果就是后端的数据库系统被塞住了。一旦发生这种情况,任何访问版本库的进程都会挂起(每个访问进程都在等待锁被解除,但是锁已经无法解除了)。" - -#. (para) -#: ../source/book.xml:10747 -msgid "E.g.: hard drive + huge electromagnet = disaster." -msgstr "比如:硬盘 + 大号电磁铁 = 毁灭。" - -#. (para) -#: ../source/book.xml:10743 -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 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." -msgstr "如果你的版本库出现这种情况,没什么好惊慌的。Berkeley DB的文件系统采用了数据库事务、检查点以及预写入日志等技术来确保只有灾难性的事件才能永久性的破坏数据库环境。所以虽然一个过于稳重的版本库管理员通常都会按照某种方案进行大量的版本库离线备份,不过不要急着通知你的管理员进行恢复。" - -#. (para) -#: ../source/book.xml:10752 -msgid "Instead, use the following recipe to attempt to unwedge your repository:" -msgstr "然后,使用下面的方法试着恢复你的版本库:" - -#. (para) -#: ../source/book.xml:10756 -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." -msgstr "确保没有其它进程访问(或者试图访问)版本库。对于网络版本库,这意味着关闭Apache HTTP Server或svnserve。" - -#. (para) -#: ../source/book.xml:10762 -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 unwedged." -msgstr "成为版本库的拥有者和管理员。这一点很重要,如果以其它用户的身份恢复版本库,可能会改变版本库文件的访问权限,导致在版本库恢复后依旧无法访问。" - -#. (para) -#: ../source/book.xml:10770 -#, fuzzy -msgid "Run the command svnadmin recover /var/svn/repos. You should see output like this:" -msgstr "运行命令svnadmin recover /path/to/repos。 输出如下:" - -#. (screen) -#: ../source/book.xml:10773 -#, no-wrap -msgid "" -"\n" -"Repository lock acquired.\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 19.\n" -msgstr "" -"\n" -"Repository lock acquired。\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 19.\n" - -#. (para) -#: ../source/book.xml:10780 -msgid "This command may take many minutes to complete." -msgstr "此命令可能需要数分钟才能完成。" - -#. (para) -#: ../source/book.xml:10783 -msgid "Restart the server process." -msgstr "重新启动服务进程。" - -#. (para) -#: ../source/book.xml:10786 -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 root. Part of the recovery process might involve recreating from scratch various database files (shared memory regions, for example). Recovering as root will create those files such that they are owned by root, which means that even after you restore connectivity to your repository, regular users will be unable to access it." -msgstr "这个方法能修复几乎所有版本库锁住的问题。记住,要以数据库的拥有者和管理员的身份运行这个命令,而不一定是root用户。恢复过程中可能会使用其它数据存储区(例如共享内存区)重建一些数据库文件。如果以root用户身份恢复版本库,这些重建的文件拥有者将变成root用户,也就是说,即使恢复了到版本库的连接,一般的用户也无权访问这些文件。" - -#. (para) -#: ../source/book.xml:10796 -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 repos.BROKEN) and then restore your latest backup of it. Then, send an email to the Subversion user list (at users@subversion.tigris.org) describing your problem in detail. Data integrity is an extremely high priority to the Subversion developers." -msgstr "如果因为某些原因,上面的方法没能成功的恢复版本库,那么你可以做两件事。首先,将破损的版本库保存到其它地方,然后从最新的备份中恢复版本库。然后,发送一封邮件到Subversion用户列表(地址是:users@subversion.tigris.org),写清你所遇到的问题。对于Subversion的开发者来说,数据安全是最重要的问题。" - -#. (title) -#: ../source/book.xml:10809 -msgid "Migrating Repository Data Elsewhere" -msgstr "版本库数据的移植" - -#. (para) -#: ../source/book.xml:10811 -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." -msgstr "Subversion文件系统将数据保存在许多数据库表中,而这些表的结构只有Subversion开发者们才了解(也只有他们才感兴趣),不过,有些时候我们会想到把所有或一部分数据转移到另一个版本库。" - -#. (para) -#: ../source/book.xml:10817 -msgid "Subversion provides such functionality by way of repository dump streams. A repository dump stream (often referred to as a dumpfile 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 svnadmin dump and svnadmin load subcommands, respectively." -msgstr "Subversion提供了转储版本库的功能,一个版本库转储流(当存放在磁盘上叫做dumpfile)是一种可移植的,普通文件格式,可以用来描述版本库的不同版本—什么发生了修改,谁做的,何时等等。这种转储流是解析版本化历史的主要机制—全部或部分,包含或部包含修改—在版本库之间。Subversion也提供了创建和加载这些转储流的工具—对应的svnadmin dumpsvnadmin load子命令。" - -#. (para) -#: ../source/book.xml:10830 -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 not 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." -msgstr "虽然Subversion版本库转储格式包含了人可读的部分和熟悉的结构(类似RFC-822格式,大多数邮件使用的),它不是纯文本的格式,这种格式必须作为二进制文件格式处理,对修改高度敏感。例如,许多文本编辑器会破坏这种文件的内容,通常是因为自动换行符替换。" - -#. (para) -#: ../source/book.xml:10838 -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 ) purging versioned data from repository history." -msgstr "有很多导出和加载Subversion版本库数据的方法,在Subversion的早期阶段,最主要的原因是Subversion本身的进化。随着Subversion的成熟,对于数据后端模式的改变会导致更多的兼容性问题,所以用户需要使用旧版本的Subversion将版本库数据导出,然后用新版的版本库加载内容到新建的版本库。目前,这种类型的模式修改从Subversion 1.0版本还没有发生,而且Subversion开发者也许诺不会强制用户在小版本(如1.3到1.4)升级之间导入和导出版本库。但是也有一些其它原因导出和导入,包括重新部署Berkeley DB到版本库到新的OS或CPU架构,在Berkeley DB和FSFS后端之间切换,或者(我们会在覆盖)从版本库历史中清理文件。" - -#. (para) -#: ../source/book.xml:10856 -msgid "Whatever your reason for migrating repository history, using the svnadmin dump and svnadmin load subcommands is straightforward. svnadmin dump 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:" -msgstr "无论你是什么原因需要移植版本库历史,都可以直接使用svnadmin dumpsvnadmin loadsvnadmin dump命令会将版本库中的修订版本数据按照特定的格式输出到转储流中,转储数据会输出到标准输出,而提示信息会输出到标准错误。这就是说,可以将转储数据存储到文件中,而同时在终端窗口中监视运行状态,例如:" - -#. (screen) -#: ../source/book.xml:10867 -#, no-wrap -msgid "" -"\n" -"$ svnlook youngest myrepos\n" -"26\n" -"$ svnadmin dump myrepos > dumpfile\n" -"* Dumped revision 0.\n" -"* Dumped revision 1.\n" -"* Dumped revision 2.\n" -"…\n" -"* Dumped revision 25.\n" -"* Dumped revision 26.\n" -msgstr "" -"\n" -"$ svnlook youngest myrepos\n" -"26\n" -"$ svnadmin dump myrepos > dumpfile\n" -"* Dumped revision 0.\n" -"* Dumped revision 1.\n" -"* Dumped revision 2.\n" -"…\n" -"* Dumped revision 25.\n" -"* Dumped revision 26.\n" - -#. (para) -#: ../source/book.xml:10878 -msgid "At the end of the process, you will have a single file (dumpfile in the previous example) that contains all the data stored in your repository in the requested range of revisions. Note that svnadmin dump is reading revision trees from the repository just like any other reader process would (svn checkout, for example), so it's safe to run this command at any time." -msgstr "最后,版本库中的指定的修订版本数据被转储到一个独立的文件中(在上面的例子中是dumpfile)。注意,svnadmin dump从版本库中读取修订版本树与其它读者(比如svn checkout)的过程相同,所以可以在任何时候安全的运行这个命令。" - -#. (para) -#: ../source/book.xml:10886 -msgid "The other subcommand in the pair, svnadmin load, 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:" -msgstr "另一个命令,svnadmin load,从标准输入流中读取Subversion转储数据,并且高效的将数据转载到目标版本库中。这个命令的提示信息输出到标准输出流中:" - -#. (screen) -#: ../source/book.xml:10892 -#, no-wrap -msgid "" -"\n" -"$ svnadmin load newrepos < dumpfile\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : A ... done.\n" -" * adding path : A/B ... done.\n" -" …\n" -"------- Committed new rev 1 (loaded from original rev 1) >>>\n" -"\n" -"<<< Started new txn, based on original revision 2\n" -" * editing path : A/mu ... done.\n" -" * editing path : A/D/G/rho ... done.\n" -"\n" -"------- Committed new rev 2 (loaded from original rev 2) >>>\n" -"\n" -"…\n" -"\n" -"<<< Started new txn, based on original revision 25\n" -" * editing path : A/D/gamma ... done.\n" -"\n" -"------- Committed new rev 25 (loaded from original rev 25) >>>\n" -"\n" -"<<< Started new txn, based on original revision 26\n" -" * adding path : A/Z/zeta ... done.\n" -" * editing path : A/mu ... done.\n" -"\n" -"------- Committed new rev 26 (loaded from original rev 26) >>>\n" -"\n" -msgstr "" -"\n" -"$ svnadmin load newrepos < dumpfile\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : A ... done.\n" -" * adding path : A/B ... done.\n" -" …\n" -"------- Committed new rev 1 (loaded from original rev 1) >>>\n" -"\n" -"<<< Started new txn, based on original revision 2\n" -" * editing path : A/mu ... done.\n" -" * editing path : A/D/G/rho ... done.\n" -"\n" -"------- Committed new rev 2 (loaded from original rev 2) >>>\n" -"\n" -"…\n" -"\n" -"<<< Started new txn, based on original revision 25\n" -" * editing path : A/D/gamma ... done.\n" -"\n" -"------- Committed new rev 25 (loaded from original rev 25) >>>\n" -"\n" -"<<< Started new txn, based on original revision 26\n" -" * adding path : A/Z/zeta ... done.\n" -" * editing path : A/mu ... done.\n" -"\n" -"------- Committed new rev 26 (loaded from original rev 26) >>>\n" -"\n" - -#. (para) -#: ../source/book.xml:10920 -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 and options to svnadmin load, 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 ." -msgstr "load命令的结果就是添加一些新的修订版本—与使用普通Subversion客户端直接提交到版本库相同。正像一次简单的提交,你也可以使用钩子脚本在每次load的开始和结束执行一些操作。通过传递选项给svnadmin load,你可以告诉Subversion的对每一个加载修订版本执行pre-commit和post-commit钩子脚本,可以利用这个选项确保这种提交也能通过一般提交的检验。当然,你要小心使用这个选项,你一定不想接受一大堆提交邮件。你可以查看来得到更多相关信息。" - -#. (para) -#: ../source/book.xml:10938 -msgid "Note that because svnadmin 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 svnadmin on each side of the pipe):" -msgstr "既然svnadmin使用标准输入流和标准输出流作为转储和装载的输入和输出,那么更漂亮的用法是(管道两端可以是不同版本的svnadmin:" - -#. (screen) -#: ../source/book.xml:10943 -#, no-wrap -msgid "" -"\n" -"$ svnadmin create newrepos\n" -"$ svnadmin dump oldrepos | svnadmin load newrepos\n" -msgstr "" -"\n" -"$ svnadmin create newrepos\n" -"$ svnadmin dump oldrepos | svnadmin load newrepos\n" - -#. (para) -#: ../source/book.xml:10947 -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. 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." -msgstr "默认情况下,转储文件的体积可能会相当庞大——比版本库自身大很多。这是因为在转储文件中,每个文件的每个版本都以完整的文本形式保存下来。这种方法速度很快,而且很简单,尤其是直接将转储数据通过管道输入到其它进程中时(比如一个压缩程序,过滤程序,或者一个装载进程)。不过如果要长期保存转储文件,那么可以使用选项来节省磁盘空间。设置这个选项,同一个文件的数个连续修订版本会以增量式的方式保存—就像储存在版本库中一样。这个方法较慢,但是转储文件的体积则基本上与版本库的体积相当。" - -#. (para) -#: ../source/book.xml:10961 -msgid "We mentioned previously that svnadmin dump outputs a range of revisions. Use the 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." -msgstr "之前我们提到svnadmin dump输出指定范围内的修订版本,使用选项可以指定一个单独的修订版本,或者一个修订版本的范围。如果忽略这个选项,所有版本库中的修订版本都会被转储。" - -#. (screen) -#: ../source/book.xml:10967 -#, no-wrap -msgid "" -"\n" -"$ svnadmin dump myrepos -r 23 > rev-23.dumpfile\n" -"$ svnadmin dump myrepos -r 100:200 > revs-100-200.dumpfile\n" -msgstr "" -"\n" -"$ svnadmin dump myrepos -r 23 > rev-23.dumpfile\n" -"$ svnadmin dump myrepos -r 100:200 > revs-100-200.dumpfile\n" - -#. (para) -#: ../source/book.xml:10971 -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 svnadmin dump command." -msgstr "Subversion在转储修订版本时,仅会输出与前一个修订版本之间的差异,通过这些差异足以从前一个修订版本中重建当前的修订版本。换句话说,在转储文件中的每一个修订版本仅包含这个修订版本作出的修改。这个规则的唯一一个例外是当前svnadmin dump转储的第一个修订版本。" - -#. (para) -#: ../source/book.xml:10979 -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 svnadmin dump 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." -msgstr "默认情况下,Subversion不会把转储的第一个修订版本看作对前一个修订版本的更改。 首先,转储文件中没有比第一个修订版本更靠前的修订版本了!其次,Subversion不知道装载转储数据时(如果真的需要装载的话)的版本库是什么样的情况。为了保证每次运行svnadmin dump都能得到一个独立的结果,第一个转储的修订版本默认情况下会完整的保存目录、文件以及属性等数据。" - -#. (para) -#: ../source/book.xml:10989 -msgid "However, you can change this default behavior. If you add the option when you dump your repository, svnadmin 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:" -msgstr "不过,这些都是可以改变的。如果转储时设置了选项,svnadmin会比较第一个转储的修订版本和版本库中前一个修订版本,就像对待其它转储的修订版本一样。转储时也是一样,转储文件中将仅包含第一个转储的修订版本的增量信息。这样的好处是,可以创建几个连续的小体积的转储文件代替一个大文件,比如:" - -#. (screen) -#: ../source/book.xml:11000 -#, no-wrap -msgid "" -"\n" -"$ svnadmin dump myrepos -r 0:1000 > dumpfile1\n" -"$ svnadmin dump myrepos -r 1001:2000 --incremental > dumpfile2\n" -"$ svnadmin dump myrepos -r 2001:3000 --incremental > dumpfile3\n" -msgstr "" -"\n" -"$ svnadmin dump myrepos -r 0:1000 > dumpfile1\n" -"$ svnadmin dump myrepos -r 1001:2000 --incremental > dumpfile2\n" -"$ svnadmin dump myrepos -r 2001:3000 --incremental > dumpfile3\n" - -#. (para) -#: ../source/book.xml:11005 -msgid "These dump files could be loaded into a new repository with the following command sequence:" -msgstr "这些转储文件可以使用下列命令装载到一个新的版本库中:" - -#. (screen) -#: ../source/book.xml:11007 -#, no-wrap -msgid "" -"\n" -"$ svnadmin load newrepos < dumpfile1\n" -"$ svnadmin load newrepos < dumpfile2\n" -"$ svnadmin load newrepos < dumpfile3\n" -msgstr "" -"\n" -"$ svnadmin load newrepos < dumpfile1\n" -"$ svnadmin load newrepos < dumpfile2\n" -"$ svnadmin load newrepos < dumpfile3\n" - -#. (para) -#: ../source/book.xml:11012 -msgid "Another neat trick you can perform with this option involves appending to an existing dump file a new range of dumped revisions. For example, you might have a post-commit 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, svnadmin dump can be one way to back up changes to your repository over time in case of a system crash or some other catastrophic event." -msgstr "另一个有关的技巧是,可以使用选项在一个转储文件中增加新的转储修订版本。举个例子,可以使用post-commit钩子在每次新的修订版本提交后将其转储到文件中。或者,可以编写一个脚本,在每天夜里将所有新增的修订版本转储到文件中。这样,svnadmin dump命令就变成了很好的版本库备份工具,以防万一出现系统崩溃或其它灾难性事件。" - -#. (para) -#: ../source/book.xml:11023 -msgid "The dump format can also be used to merge the contents of several different repositories into a single repository. By using the option of svnadmin load, you can specify a new virtual root directory for the load process. That means if you have dump files for three repositories, say calc-dumpfile, cal-dumpfile, and ss-dumpfile, you can first create a new repository to hold them all:" -msgstr "转储还可以用来将几个独立的版本库合并为一个版本库。使用svnadmin load选项,可以在装载的时候指定根目录。也就是说,如果有三个不同版本库的转储文件,比如calc-dumpfilecal-dumpfile,和ss-dumpfile,可以在一个新的版本库中保存所有三个转储文件中的数据:" - -#. (screen) -#: ../source/book.xml:11033 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin create /var/svn/projects\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin create /path/to/projects\n" -"$\n" - -#. (para) -#: ../source/book.xml:11037 -msgid "Then, make new directories in the repository which will encapsulate the contents of each of the three previous repositories:" -msgstr "然后在版本库中创建三个目录分别保存来自三个不同版本库的数据:" - -#. (screen) -#: ../source/book.xml:11040 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn mkdir -m \"Initial project roots\" \\\n" -" file:///var/svn/projects/calc \\\n" -" file:///var/svn/projects/calendar \\\n" -" file:///var/svn/projects/spreadsheet\n" -"Committed revision 1.\n" -"$ \n" -msgstr "" -"\n" -"$ svn mkdir -m \"Initial project roots\" \\\n" -" file:///path/to/projects/calc \\\n" -" file:///path/to/projects/calendar \\\n" -" file:///path/to/projects/spreadsheet\n" -"Committed revision 1.\n" -"$ \n" - -#. (para) -#: ../source/book.xml:11048 -msgid "Lastly, load the individual dump files into their respective locations in the new repository:" -msgstr "最后,将转储文件分别装载到各自的目录中:" - -#. (screen) -#: ../source/book.xml:11050 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin load /var/svn/projects --parent-dir calc < calc-dumpfile\n" -"…\n" -"$ svnadmin load /var/svn/projects --parent-dir calendar < cal-dumpfile\n" -"…\n" -"$ svnadmin load /var/svn/projects --parent-dir spreadsheet < ss-dumpfile\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin load /path/to/projects --parent-dir calc < calc-dumpfile\n" -"…\n" -"$ svnadmin load /path/to/projects --parent-dir calendar < cal-dumpfile\n" -"…\n" -"$ svnadmin load /path/to/projects --parent-dir spreadsheet < ss-dumpfile\n" -"…\n" -"$\n" - -#. (para) -#: ../source/book.xml:11059 -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 cvs2svn utility (see ) uses the dump format to represent the contents of a CVS repository so that those contents can be copied into a Subversion repository." -msgstr "我们再介绍一下Subversion版本库转储数据的最后一种用途——在不同的存储机制或版本控制系统之间转换。因为转储数据的格式的大部分是可以阅读的,所以使用这种格式描述变更集(每个变更集对应一个新的修订版本)会相对容易一些。事实上,cvs2svn工具(参见 )正是将CVS版本库的内容转换为转储数据格式,如此才能将CVS版本库的数据导入Subversion版本库之中。" - -#. (title) -#: ../source/book.xml:11073 -msgid "Filtering Repository History" -msgstr "过滤版本库历史" - -#. (para) -#: ../source/book.xml:11082 -msgid "That's rather the reason you use version control at all, right?" -msgstr "那就是你是用版本控制的原因,对吗?" - -#. (para) -#: ../source/book.xml:11089 -msgid "Conscious, cautious removal of certain bits of versioned data is actually supported by real use-cases. That's why an obliterate feature has been one of the most highly requested Subversion features, and one which the Subversion developers hope to soon provide." -msgstr "故意小心的删除部分版本化数据确实是真实的需求,这就是为什么永久删除特性是Subversion要求最多的一个特性,也是Subversion开发者希望立刻提供的。" - -#. (para) -#: ../source/book.xml:11075 -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. 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). 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." -msgstr "因为Subversion使用底层的二进制区别和压缩算法(也可以选择完全非透明数据库系统)储存各类数据,手工调整是不明智的,即使这样做并不困难,我们也不鼓励这样做。何况,一旦你的数据存进了版本库,Subversion没有提供删除数据的简单办法。但是不可避免的,总会有些时候你需要处理版本库的历史数据。你也许想把一个不应该出现的文件从版本库中彻底清除(无论任何原因不应该在那个位置出现)。或者,你曾经用一个版本库管理多个工程,现在又想把它们分开。要完成这样的工作,管理员们需要更易于管理和扩展的方法表示版本库中的数据,Subversion版本库转储文件格式就是一个很好的选择。" - -#. (para) -#: ../source/book.xml:11101 -msgid "As we described in , 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 svnadmin dump command to generate the dump data, and svnadmin load to populate a new repository with it (see ). 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." -msgstr "就像我们在中说的,Subversion版本库转储文件记录了所有版本数据的变更信息,而且以易于阅读的格式保存。可以使用svnadmin dump命令生成转储文件,然后用svnadmin load命令生成一个新的版本库。(参见 )。转储文件易于阅读意味着你可以查看和修改它。当然,问题是如果你有一个运行了三年的版本库,那么生成的转储文件会很庞大,阅读和手工修改起来都会花费很多时间。" - -#. (para) -#: ../source/book.xml:11115 -msgid "That's where svndumpfilter 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." -msgstr "这正是svndumpfilter发挥作用的地方,这个程序可以对版本库转储流进行特定路径的过滤。这是一个独特而很有意义的用法,可以帮助你快速方便的修改转储的数据。使用时,只需提供一个你想要保留的(或者不想保留的)路径列表,然后把你的版本库转储文件送进这个过滤器。最后你就可以得到一个仅包含你想保留路径(明确的或含蓄的)的转储数据流。" - -#. (para) -#: ../source/book.xml:11123 -msgid "Let's look a realistic example of how you might use this program. We discuss elsewhere (see ) 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." -msgstr "现在我来演示如何使用这个命令。我们会在其它章节(参见 )讨论关于如何选择设定版本库布局的问题,比如应该使用一个版本库管理多个项目还是使用一个版本库管理一个项目,或者如何在版本库中安排数据等等。不过,有些时候,即使在项目已经展开以后,你还是希望对版本库的布局做一些调整。最常见的情况是,把原来存放在同一个版本库中的几个项目分开,各自成家。" - -#. (para) -#: ../source/book.xml:11133 -msgid "Our imaginary repository contains three projects: calc, calendar, and spreadsheet. They have been living side-by-side in a layout like this:" -msgstr "假设有一个包含三个项目的版本库: calccalendar,和 spreadsheet。它们在版本库中的布局如下:" - -#. (screen) -#: ../source/book.xml:11137 -#, no-wrap -msgid "" -"\n" -"/\n" -" calc/\n" -" trunk/\n" -" branches/\n" -" tags/\n" -" calendar/\n" -" trunk/\n" -" branches/\n" -" tags/\n" -" spreadsheet/\n" -" trunk/\n" -" branches/\n" -" tags/\n" -msgstr "" -"\n" -"/\n" -" calc/\n" -" trunk/\n" -" branches/\n" -" tags/\n" -" calendar/\n" -" trunk/\n" -" branches/\n" -" tags/\n" -" spreadsheet/\n" -" trunk/\n" -" branches/\n" -" tags/\n" - -#. (para) -#: ../source/book.xml:11152 -msgid "To get these three projects into their own repositories, we first dump the whole repository:" -msgstr "现在要把这三个项目转移到三个独立的版本库中。首先,转储整个版本库:" - -#. (screen) -#: ../source/book.xml:11154 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin dump /var/svn/repos > repos-dumpfile\n" -"* Dumped revision 0.\n" -"* Dumped revision 1.\n" -"* Dumped revision 2.\n" -"* Dumped revision 3.\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin dump /path/to/repos > repos-dumpfile\n" -"* Dumped revision 0.\n" -"* Dumped revision 1.\n" -"* Dumped revision 2.\n" -"* Dumped revision 3.\n" -"…\n" -"$\n" - -#. (para) -#: ../source/book.xml:11163 -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:" -msgstr "然后,将转储文件三次送入过滤器,每次仅保留一个顶级目录,就可以得到三个转储文件:" - -#. (screen) -#: ../source/book.xml:11166 -#, no-wrap -msgid "" -"\n" -"$ svndumpfilter include calc < repos-dumpfile > calc-dumpfile\n" -"…\n" -"$ svndumpfilter include calendar < repos-dumpfile > cal-dumpfile\n" -"…\n" -"$ svndumpfilter include spreadsheet < repos-dumpfile > ss-dumpfile\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svndumpfilter include calc < repos-dumpfile > calc-dumpfile\n" -"…\n" -"$ svndumpfilter include calendar < repos-dumpfile > cal-dumpfile\n" -"…\n" -"$ svndumpfilter include spreadsheet < repos-dumpfile > ss-dumpfile\n" -"…\n" -"$\n" - -#. (para) -#: ../source/book.xml:11175 -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 calc project, that repository would still have a top-level directory named calc. If you want your trunk, tags, and branches directories to live in the root of your repository, you might wish to edit your dump files, tweaking the Node-path and Node-copyfrom-path headers to no longer have that first calc/ path component. Also, you'll want to remove the section of dump data that creates the calc directory. It will look something like:" -msgstr "现在你必须要作出一个决定了。这三个转储文件中,每个都可以用来创建一个可用的版本库,不过它们保留了原版本库的精确路径结构。也就是说,虽然项目calc现在独占了一个版本库,但版本库中还保留着名为calc的顶级目录。如果希望trunktagsbranches这三个目录直接位于版本库的根路径下,你可能需要编辑转储文件,调整Node-pathCopyfrom-path头参数,将路径calc/删除。同时,你还要删除转储数据中创建calc目录的部分。一般来说,就是如下的一些内容:" - -#. (screen) -#: ../source/book.xml:11191 -#, no-wrap -msgid "" -"\n" -"Node-path: calc\n" -"Node-action: add\n" -"Node-kind: dir\n" -"Content-length: 0\n" -" \n" -msgstr "" -"\n" -"Node-path: calc\n" -"Node-action: add\n" -"Node-kind: dir\n" -"Content-length: 0\n" -" \n" - -#. (para) -#: ../source/book.xml:11199 -#, fuzzy -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." -msgstr "如果你打算通过手工编辑转储文件来移除一个顶级目录,注意不要让你的编辑器将换行符转换为本地格式(比如将\\r\\n转换为\\n)。否则文件的内容就与所需的格式不相符,这个转储文件也就失效了。" - -#. (para) -#: ../source/book.xml:11206 -msgid "All that remains now is to create your three new repositories, and load each dump file into the right repository:" -msgstr "剩下的工作就是创建三个新的版本库,然后将三个转储文件分别导入:" - -#. (screen) -#: ../source/book.xml:11209 -#, no-wrap -msgid "" -"\n" -"$ svnadmin create calc; svnadmin load calc < calc-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : button.c ... done.\n" -"…\n" -"$ svnadmin create calendar; svnadmin load calendar < cal-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : cal.c ... done.\n" -"…\n" -"$ svnadmin create spreadsheet; svnadmin load spreadsheet < ss-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : ss.c ... done.\n" -"…\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin create calc; svnadmin load calc < calc-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : button.c ... done.\n" -"…\n" -"$ svnadmin create calendar; svnadmin load calendar < cal-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : cal.c ... done.\n" -"…\n" -"$ svnadmin create spreadsheet; svnadmin load spreadsheet < ss-dumpfile\n" -"<<< Started new transaction, based on original revision 1\n" -" * adding path : Makefile ... done.\n" -" * adding path : ss.c ... done.\n" -"…\n" -"$\n" - -#. (para) -#: ../source/book.xml:11227 -msgid "Both of svndumpfilter's subcommands accept options for deciding how to deal with empty 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, svndumpfilter provides the following command-line options:" -msgstr "svndumpfilter的两个子命令都可以通过选项设定如何处理修订版本。如果某个指定的修订版本仅包含路径的更改,过滤器就会将它删除,因为当前为空的修订版本通常是无用的甚至是让人讨厌的。为了让用户有选择的处理这些修订版本,svndumpfilter提供了以下命令行选项:" - -#. (option) -#: ../source/book.xml:11238 -msgid "--drop-empty-revs" -msgstr "--drop-empty-revs" - -#. (para) -#: ../source/book.xml:11241 -msgid "Do not generate empty revisions at all—just omit them." -msgstr "不生成任何空修订版本,忽略它们。" - -#. (option) -#: ../source/book.xml:11247 -msgid "--renumber-revs" -msgstr "--renumber-revs" - -#. (para) -#: ../source/book.xml:11250 -msgid "If empty revisions are dropped (using the option), change the revision numbers of the remaining revisions so that there are no gaps in the numeric sequence." -msgstr "如果空修订版本被剔除(通过使用选项),依次修改其它修订版本的编号,确保编号序列是连续的。" - -#. (option) -#: ../source/book.xml:11258 -msgid "--preserve-revprops" -msgstr "--preserve-revprops" - -#. (para) -#: ../source/book.xml:11261 -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 svndumpfilter." -msgstr "如果空修订版本被保留,保持这些空修订版本的属性(日志信息,作者,日期,自定义属性,等等)。如果不设定这个选项,空修订版本将仅保留初始时间戳,以及一个自动生成的日志信息,表明此修订版本由svndumpfilter处理过。" - -#. (para) -#: ../source/book.xml:11271 -msgid "While svndumpfilter 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 Node-path and Node-copyfrom-path headers." -msgstr "尽管svndumpfilter十分有用,能节省大量的时间,但它却是把不折不扣的双刃剑。首先,这个工具对路径语义极为敏感。仔细检查转储文件中的路径是不是以斜线开头。也许Node-pathCopyfrom-path这两个头参数对你有些帮助。" - -#. (screen) -#: ../source/book.xml:11278 -#, no-wrap -msgid "" -"\n" -"…\n" -"Node-path: spreadsheet/Makefile\n" -"…\n" -msgstr "" -"\n" -"…\n" -"Node-path: spreadsheet/Makefile\n" -"…\n" - -#. (para) -#: ../source/book.xml:11289 -msgid "While svnadmin dump has a consistent leading slash policy—to not include them—other programs which generate dump data might not be so consistent." -msgstr "尽管svnadmin dump对是否以斜线作为路径的开头有统一的规定——这个规定就是不以斜线作为路径的开头——其它生成转储文件的程序不一定会遵守这个规定。" - -#. (para) -#: ../source/book.xml:11283 -msgid "If the paths have leading slashes, you should include leading slashes in the paths you pass to svndumpfilter include and svndumpfilter exclude (and if they don't, you shouldn't). Further, if your dump file has an inconsistent usage of leading slashes for some reason, you should probably normalize those paths so they all have, or lack, leading slashes." -msgstr "如果这些路径以斜线开头,那么你传递给svndumpfilter includesvndumpfilter exclude的路径也必须以斜线开头(反之亦然)。如果因为某些原因转储文件中的路径没有统一使用或不使用斜线开头,也许需要修正这些路径,统一使用斜线开头或不使用斜线开头。" - -#. (para) -#: ../source/book.xml:11295 -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 svndumpfilter is excluding, to a location that it is including. In order to make the dump data self-sufficient, svndumpfilter 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." -msgstr "此外,复制操作生成的路径也会带来麻烦。Subversion支持在版本库中进行复制操作,也就是复制一个存在的路径,生成一个新的路径。问题是,svndumpfilter保留的某个文件或目录可能是由某个svndumpfilter排除的文件或目录复制而来的。也就是说,为了确保转储数据的完整性,svndumpfilter需要切断这些复制自被排除路径的文件与源文件的关系,还要将这些文件的内容以新建的方式添加到转储数据中。但是由于Subversion版本库转储文件格式中仅包含了修订版本的更改信息,因此源文件的内容基本上无法获得。如果你不能确定版本库中是否存在类似的情况,最好重新考虑一下到底保留/排除哪些路径。" - -#. (para) -#: ../source/book.xml:11315 -msgid "Finally, svndumpfilter takes path filtering quite literally. If you are trying to copy the history of a project rooted at trunk/my-project and move it into a repository of its own, you would, of course, use the svndumpfilter include command to keep all the changes in and under trunk/my-project. 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 trunk/my-project directory, but it will not contain directives which would create the trunk directory itself (because trunk 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." -msgstr "最后,svndumpfilter就是字面上的意思,如果你尝试将目录trunk/my-project中的内容迁移到其自己版本库,你可以使用svndumpfilter include命令保持trunk/my-project目录下的所有修改。但是结果转储文件对于将要被加载入的版本库没有任何假定,特别的,目录trunk/my-project可能从创建这个目录的修订版本开始,而它不会包含以自己创建trunk目录的指示(因为trunk没有匹配include过滤)。在尝试将转储流存放到版本库之前,你需要确定任何转储流将要存在的目录必须存在于目标版本库。" - -#. (title) -#: ../source/book.xml:11338 -msgid "Repository Replication" -msgstr "版本库复制" - -#. (para) -#: ../source/book.xml:11340 -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." -msgstr "有许多场景下会存在一个Subversion版本库的版本历史与另一个完全相同。或许最明显的就是在主版本库因为硬件故障或网络已出或其他原因而不可用时,维护一个简单的备份版本库。其他的场景包括,部署一个镜像版本库来分流压力,作为软升级机制等等。" - -#. (para) -#: ../source/book.xml:11349 -msgid "As of version 1.4, Subversion provides a program for managing scenarios like these—svnsync. svnsync works by essentially asking the Subversion server to replay 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 svnsync 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." -msgstr "Subversion 1.4提供了管理这种场景的工具—svnsyncsvnsync实质上就是通知版本库重放修订版本,一次一个,然后将修订版本信息模拟提交到另一个版本库。svnsync运行不需要能够本地访问版本库—它的参数是版本库URL,所有的工作是通过Subversion版本库访问层(RA)接口实现的,所有要做的就是读源版本库,然后读写访问目标版本库。" - -#. (para) -#: ../source/book.xml:11363 -msgid "When using svnsync against a remote source repository, the Subversion server for that repository must be running Subversion version 1.4 or better." -msgstr "当对远程源版本库使用svnsync时,Subversion版本库的服务器必须是Subversion1.4或更高的版本。" - -#. (para) -#: ../source/book.xml:11379 -msgid "In fact, it can't truly be read-only, or svnsync itself would have a tough time copying revision history into it." -msgstr "实际上,它不是真的完全只读,或者svnsync本身有时间将版本库历史拷入。" - -#. (para) -#: ../source/book.xml:11367 -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 ), but it must not yet have any version history in it. The protocol via which svnsync communicates revision information is highly sensitive to mismatches between the versioned histories contained in the source and target repositories. For this reason, while svnsync cannot demand that the target repository be read-only, allowing the revision history in the target repository to change by any mechanism other than the mirroring process is a recipe for disaster." -msgstr "假定你已经有了一个希望镜像的源版本库,下一步就是你要有一个作为镜像的目标版本库。目标版本库可以使用任意文件系统数据存储后端(见),但是其中一定不能有历史版本。svnsync的通讯议对于源和目标版本库版本历史的不一致非常敏感,因此,虽然svnsync无法要求目标版本库是只读的,最好的办法就是只允许镜像进程修改目标版本库内容。" - -#. (para) -#: ../source/book.xml:11386 -msgid "Do not 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 svnsync tool." -msgstr "不要做出会对镜像版本库产生版本库历史偏移的修改,所有提交和版本库的属性修改必须是由svnsync执行的。" - -#. (para) -#: ../source/book.xml:11393 -msgid "Another requirement of the target repository is that the svnsync process be allowed to modify certain revision properties. svnsync stores its bookkeeping information in special revision properties on revision 0 of the destination repository. Because svnsync works within the framework of that repository's hook system, the default state of the repository (which is to disallow revision property changes; see ) is insufficient. You'll need to explicitly implement the pre-revprop-change hook, and your script must allow svnsync to set and change its special properties. With those provisions in place, you are ready to start mirroring repository revisions." -msgstr "对于目标版本库的另一种需求是svnsync可以修改特定版本化属性。svnsync在目标版本库的修订版本0的特别属性上记录了簿记信息,因为svnsync在版本库的钩子系统的框架下工作的,版本库缺省的状态(关闭了版本库属性修改;见)是不够的。你会需要明确的实现pre-revprop-change钩子,而且你的脚本必须允许svnsync设置它的特别属性,有了这些准备工作,你就可以开始镜像版本库修订版本了。" - -#. (para) -#: ../source/book.xml:11408 -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." -msgstr "实现授权措施允许复制进程的操作,同时防止其他用户修改镜像版本库内容是一个好主意。" - -#. (para) -#: ../source/book.xml:11413 -msgid "Let's walk through the use of svnsync 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." -msgstr "让我们在一个典型的镜像场景中浏览一下svnsync的使用,我们急着讨论实践推荐,但是如果你们不需要或者感到不适合你们的环境,你可以不必去关注。" - -#. (para) -#: ../source/book.xml:11418 -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 .) 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." -msgstr "作为开发者喜欢的版本控制系统的一个服务,我们会Subversion的源代码版本库镜像到Internet,存放在不同的主机上,而不仅仅只有最初的Subversion版本库。远程主机的全局设置允许匿名用户读取版本库的信息,但是需要认证的用户才能修改版本库。(请原谅我们在此刻这里曲解Subversion服务器配置的细节—这些内容在。)因为没有更多的理由来建立更有趣的例子,我们会在第三个机器上创建复制进程,我们正在使用的一个例子。" - -#. (para) -#: ../source/book.xml:11432 -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." -msgstr "首先,我们会创建一个作为镜像的版本库,下面两步需要我们能够通过shell访问镜像版本库的机器。一旦版本库配置完成,我们不必再直接碰它了。" - -#. (screen) -#: ../source/book.xml:11437 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ ssh admin@svn.example.com \\\n" -" \"svnadmin create /var/svn/svn-mirror\"\n" -"admin@svn.example.com's password: ********\n" -"$\n" -msgstr "" -"\n" -"$ ssh admin@svn.example.com \\\n" -" \"svnadmin create /path/to/repositories/svn-mirror\"\n" -"admin@svn.example.com's password: ********\n" -"$\n" - -#. (para) -#: ../source/book.xml:11443 -msgid "At this point, we have our repository, and due to our server's configuration, that repository is now live 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 syncuser will be allowed." -msgstr "此刻,我们有了我们的版本库,因为我们服务器的配置,这个版本库现在存在于Internet。现在,因为除了复制进程我们不希望任何其他修改,我们需要将这个进程同其他可能的提交者区分开来。为此,我们的进程使用专用的用户,只有特定用户syncuser的提交和属性修改可以被执行。" - -#. (para) -#: ../source/book.xml:11452 -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 pre-revprop-change hook script is found in , and basically verifies that the user attempting the property changes is our syncuser user. If so, the change is allowed; otherwise, it is denied." -msgstr "我们会使用版本库的钩子系统来允许复制进程完成我们的任务,我们通过实现两个版本库事件钩子pre-revprop-change和start-commit来强制这个过程。我们的pre-revprop-change钩子脚本可以在找到,只是验证尝试修改属性的用户是syncuser,如果是,则允许修改;否则,拒绝修改。" - -#. (title) -#: ../source/book.xml:11463 -msgid "Mirror repository's pre-revprop-change hook script" -msgstr "镜像版本库的 pre-revprop-change 钩子" - -#. (programlisting) -#: ../source/book.xml:11465 -#, no-wrap -msgid "" -"\n" -"#!/bin/sh \n" -"\n" -"USER=\"$3\"\n" -"\n" -"if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n" -"\n" -"echo \"Only the syncuser user may change revision properties\" >&2\n" -"exit 1\n" -msgstr "" -"\n" -"#!/bin/sh \n" -"\n" -"USER=\"$3\"\n" -"\n" -"if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n" -"\n" -"echo \"Only the syncuser user may change revision properties\" >&2\n" -"exit 1\n" - -#. (para) -#: ../source/book.xml:11476 -msgid "That covers revision property changes. Now we need to ensure that only the syncuser user is permitted to commit new revisions to the repository. We do this using a start-commit hook scripts like the one in ." -msgstr "这里覆盖了修订版本属性修改,我们现在需要来确认只有用户syncuser允许提交新版本到版本库,我们使用了一个像start-commit钩子。" - -#. (title) -#: ../source/book.xml:11483 -msgid "Mirror repository's start-commit hook script" -msgstr "镜像版本库的 start-commit 钩子" - -#. (programlisting) -#: ../source/book.xml:11485 -#, no-wrap -msgid "" -"\n" -"#!/bin/sh \n" -"\n" -"USER=\"$2\"\n" -"\n" -"if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n" -"\n" -"echo \"Only the syncuser user may commit new revisions\" >&2\n" -"exit 1\n" -msgstr "" -"\n" -"#!/bin/sh \n" -"\n" -"USER=\"$2\"\n" -"\n" -"if [ \"$USER\" = \"syncuser\" ]; then exit 0; fi\n" -"\n" -"echo \"Only the syncuser user may commit new revisions\" >&2\n" -"exit 1\n" - -#. (para) -#: ../source/book.xml:11496 -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." -msgstr "在安装了我们的钩子脚本和确定它们可以被Subversion服务器执行后,我们完成了镜像版本库的配置,现在我们开始实际的镜像。" - -#. (para) -#: ../source/book.xml:11500 -msgid "The first thing we need to do with svnsync is to register in our target repository the fact that it will be a mirror of the source repository. We do this using the svnsync initialize subcommand. Note that the various svnsync subcommands provide several of the same authentication-related options that svn does: , , , , and ." -msgstr "对于svnsync,我们首先需要在目标版本库上注册源版本库,我们通过svnsync initialize实现这一步。注意,svnsync子命令提供了许多类似svn认证相关的选项,包括:。" - -#. (screen) -#: ../source/book.xml:11512 -#, no-wrap -msgid "" -"\n" -"$ svnsync help init\n" -"initialize (init): usage: svnsync initialize DEST_URL SOURCE_URL\n" -"\n" -"Initialize a destination repository for synchronization from\n" -"another repository.\n" -"\n" -"The destination URL must point to the root of a repository with\n" -"no committed revisions. The destination repository must allow\n" -"revision property changes.\n" -"\n" -"You should not commit to, or make revision property changes in,\n" -"the destination repository by any method other than 'svnsync'.\n" -"In other words, the destination repository should be a read-only\n" -"mirror of the source repository.\n" -"\n" -"Valid options:\n" -" --non-interactive : do no interactive prompting\n" -" --no-auth-cache : do not cache authentication tokens\n" -" --username arg : specify a username ARG\n" -" --password arg : specify a password ARG\n" -" --config-dir arg : read user configuration files from directory ARG\n" -"\n" -"$ svnsync initialize http://svn.example.com/svn-mirror \\\n" -" http://svn.collab.net/repos/svn \\\n" -" --username syncuser --password syncpass\n" -"Copied properties for revision 0.\n" -"$\n" -msgstr "" -"\n" -"$ svnsync help init\n" -"initialize (init): usage: svnsync initialize DEST_URL SOURCE_URL\n" -"\n" -"Initialize a destination repository for synchronization from\n" -"another repository.\n" -"\n" -"The destination URL must point to the root of a repository with\n" -"no committed revisions. The destination repository must allow\n" -"revision property changes.\n" -"\n" -"You should not commit to, or make revision property changes in,\n" -"the destination repository by any method other than 'svnsync'.\n" -"In other words, the destination repository should be a read-only\n" -"mirror of the source repository.\n" -"\n" -"Valid options:\n" -" --non-interactive : do no interactive prompting\n" -" --no-auth-cache : do not cache authentication tokens\n" -" --username arg : specify a username ARG\n" -" --password arg : specify a password ARG\n" -" --config-dir arg : read user configuration files from directory ARG\n" -"\n" -"$ svnsync initialize http://svn.example.com/svn-mirror \\\n" -" http://svn.collab.net/repos/svn \\\n" -" --username syncuser --password syncpass\n" -"Copied properties for revision 0.\n" -"$\n" - -#. (para) -#: ../source/book.xml:11541 -#, fuzzy -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 svnsync—that was required by the pre-revprop-change hook on our mirror repository." -msgstr "我们的目标版本库现在记住了它是Subversion公共源代码版本库的镜像,注意我们在svnsync提供了一个用户名和密码—这是我们的镜像版本库pre-revprop-change钩子的要求。" - -#. (para) -#: ../source/book.xml:11547 -#, fuzzy -msgid "The URLs provided to svnsync must point to the root directories of the target and source repositories, respectively. The tool does not handle mirroring of repository subtrees." -msgstr "提供给svnsync的URL必须是指向目标和源版本库的根目录,这个工具不支持对版本库子树的处理。" - -#. (para) -#: ../source/book.xml:11553 -#, fuzzy -msgid "The initial release of svnsync (in Subversion 1.4) has a small shortcoming—the values given to the and 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 svnsync in non-interactive mode (with the option) might experience problems." -msgstr "svnsync的最初版本(在Subversion 1.4)有一些缺陷—用来认证的命令行参数同时作用于源和目标版本库。显然,我们无法保证同步的用户认证信息是相同的,如果不一样,用户使用非交互模式(选项)来运行svnsync时会遇到这个问题。" - -#. (para) -#: ../source/book.xml:11569 -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." -msgstr "要预先警告一下,尽管对于普通读者只需要几秒钟就可以理解下面的输出,而对于整个镜像过程花费的时间可能会非常长。" - -#. (para) -#: ../source/book.xml:11565 -#, fuzzy -msgid "And now comes the fun part. With a single subcommand, we can tell svnsync to copy all the as-yet-unmirrored revisions from the source repository to the target. The svnsync synchronize 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 svnsync get the resulting response from the source repository's server, it begins forwarding those revisions to the target repository's server as new commits." -msgstr "现在有趣的部分开始了,通过一个单独的子命令,我们可以告诉svnsync将所有未镜像的修订版本从源版本库拷贝到目标版本库。svnsync synchronize子命令会查看目标版本库特定修订版本的属性,并且检测同步的版本库是哪一个,以及最新镜像的修订版本是0。然后它会查询源版本库,检测其最新的修订版本。最后,它会询问源版本库服务器来开始重演从修订版本0到最新修订版本。svnsync从源版本库服务器得到返回的结果,然后将其作为新的提交转发到目标版本库服务器。" - -#. (screen) -#: ../source/book.xml:11586 -#, no-wrap -msgid "" -"\n" -"$ svnsync help synchronize\n" -"synchronize (sync): usage: svnsync synchronize DEST_URL\n" -"\n" -"Transfer all pending revisions from source to destination.\n" -"…\n" -"$ svnsync synchronize http://svn.example.com/svn-mirror \\\n" -" --username syncuser --password syncpass\n" -"Committed revision 1.\n" -"Copied properties for revision 1.\n" -"Committed revision 2.\n" -"Copied properties for revision 2.\n" -"Committed revision 3.\n" -"Copied properties for revision 3.\n" -"…\n" -"Committed revision 23406.\n" -"Copied properties for revision 23406.\n" -"Committed revision 23407.\n" -"Copied properties for revision 23407.\n" -"Committed revision 23408.\n" -"Copied properties for revision 23408.\n" -msgstr "" -"\n" -"$ svnsync help synchronize\n" -"synchronize (sync): usage: svnsync synchronize DEST_URL\n" -"\n" -"Transfer all pending revisions from source to destination.\n" -"…\n" -"$ svnsync synchronize http://svn.example.com/svn-mirror \\\n" -" --username syncuser --password syncpass\n" -"Committed revision 1.\n" -"Copied properties for revision 1.\n" -"Committed revision 2.\n" -"Copied properties for revision 2.\n" -"Committed revision 3.\n" -"Copied properties for revision 3.\n" -"…\n" -"Committed revision 23406.\n" -"Copied properties for revision 23406.\n" -"Committed revision 23407.\n" -"Copied properties for revision 23407.\n" -"Committed revision 23408.\n" -"Copied properties for revision 23408.\n" - -#. (para) -#: ../source/book.xml:11608 -#, fuzzy -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 syncuser, 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 svnsync 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." -msgstr "镜像修订版本有一点特别有趣,首先是到目标版本库的修订版本提交,然后跟着属性修改。这是因为最初的提交是通过用户syncuser执行的,而时间戳是提交的时间,而且Subversion底层的版本库访问接口不允许在提交时任意修改修订版本属性,所以svnsync会立即使用属性修改,将源版本库发现的所有修订版本属性拷贝到目标版本库,这其中就包括了修改作者和时间戳使之与源版本库一致的效果。" - -#. (para) -#: ../source/book.xml:11622 -#, fuzzy -msgid "Also noteworthy is that svnsync 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 svnsync synchronize 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." -msgstr "值得注意的是svnsync会小心簿记所有的操作,可以安全的中断并重新开始,而不必破坏镜像数据的完整性。如果在svnsync synchronize时出现网络故障,只需要重新运行svnsync synchronize,她会从中断处开始。实际上,随着新的修订版本在源版本库出现,这样就可以保证你的镜像不会过时。" - -#. (para) -#: ../source/book.xml:11631 -#, fuzzy -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, svnsync 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 svnsync copy-revprops subcommand, which simply re-replicates all the revision properties for a particular revision." -msgstr "然而,这个进程还有一点不雅的地方,因为Subversion属性修改可以发生在整个生命周期的任何时候,不会留下任何审计痕迹来说明所作的修改,扶植进程需要对此额外关注。如果你已经镜像了某个版本库的15个修订版本,而某个人修改了修订版本12的属性,你需要告诉它手工使用(或一些额外的工具)svnsync copy-revprops子命令,只是简单的重新复制某个特定修订版本的属性。" - -#. (screen) -#: ../source/book.xml:11644 -#, no-wrap -msgid "" -"\n" -"$ svnsync help copy-revprops\n" -"copy-revprops: usage: svnsync copy-revprops DEST_URL REV\n" -"\n" -"Copy all revision properties for revision REV from source to\n" -"destination.\n" -"…\n" -"$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \\\n" -" --username syncuser --password syncpass\n" -"Copied properties for revision 12.\n" -"$\n" -msgstr "" -"\n" -"$ svnsync help copy-revprops\n" -"copy-revprops: usage: svnsync copy-revprops DEST_URL REV\n" -"\n" -"Copy all revision properties for revision REV from source to\n" -"destination.\n" -"…\n" -"$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \\\n" -" --username syncuser --password syncpass\n" -"Copied properties for revision 12.\n" -"$\n" - -#. (para) -#: ../source/book.xml:11656 -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." -msgstr "版本库复制只是一个壳,你一定会希望利用这个进程的自动化。例如,如果我们的例子是一个“拖和推”设置,你或许希望在post-commit和post-revprop-change钩子实现中从你的主版本库将修改推倒一个或多个镜像,这样就可以近乎实时的保持镜像的时效性。" - -#. (para) -#: ../source/book.xml:11664 -#, fuzzy -msgid "Also, while it isn't very commonplace to do so, svnsync 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." -msgstr "而且,这样做并不平凡,在人证用户只有部分读权限时svnsync也会优雅的镜像,它只会拷贝允许查看的版本库内容,显然这种镜像不适合备份方案。" - -#. (para) -#: ../source/book.xml:11670 -msgid "As far as user interaction with repositories and mirrors goes, it is 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:" -msgstr "只要用户与版本库和镜像的交互继续,是可以有一个工作拷贝直接与这两个版本库交互。但是你需要跳出几个圈子才能做到这样。第一,你需要保证主和镜像版本库有相同的UUID(通常缺省不是相同),你可以加载一个包含住版本库的UUID转储文件来设置镜像版本库的UUID。" - -#. (screen) -#: ../source/book.xml:11679 -#, no-wrap -msgid "" -"\n" -"$ cat - <<EOF | svnadmin load --force-uuid dest\n" -"SVN-fs-dump-format-version: 2\n" -"\n" -"UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e\n" -"EOF\n" -"$\n" -msgstr "" -"\n" -"$ cat - <<EOF | svnadmin load --force-uuid dest\n" -"SVN-fs-dump-format-version: 2\n" -"\n" -"UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e\n" -"EOF\n" -"$\n" - -#. (para) -#: ../source/book.xml:11687 -#, fuzzy -msgid "Now that the two repositories have the same UUID, you can use svn switch --relocate to point your working copy to whichever of the repositories you wish to operate against, a process which is described in . 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." -msgstr "现在两个版本库有了相同的UUID,你可以使用svn switch --relocate指向任何你希望操作的版本库,详细方法见。这里也可能有危险,尽管如果主和镜像版本库没有同步的关闭,一个工作拷贝对于主版本库没有过时,而重定位的镜像却是过时的,显然期望存在的修订版本缺失会造成困惑。" - -#. (para) -#: ../source/book.xml:11702 -#, fuzzy -msgid "Finally, be aware that the revision-based replication provided by svnsync 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." -msgstr "最后我们需要意识到,svnsync只支持修订版本为基础的复制,它没有包括诸如钩子实现,版本库或服务器配置数据,未提交事务或关于用户锁定版本库路径的信息,只有Subversion版本库转储文件格式在复制时包含这些信息。" - -#. (title) -#: ../source/book.xml:11714 -msgid "Repository Backup" -msgstr "版本库备份" - -#. (para) -#: ../source/book.xml:11716 -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." -msgstr "尽管现代计算机的诞生带来了许多便利,但有一件事听起来是完全正确的—有时候,事情变的糟糕,很糟糕,动力损耗、网络中断、坏掉的内存和损坏的硬盘都是对魔鬼的一种体验,即使对于最尽职的管理员,命运也早已注定。所以我们来到了这个最重要的主题—怎样备份你的版本库数据。" - -#. (para) -#: ../source/book.xml:11725 -#, fuzzy -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." -msgstr "Subversion版本库管理有两种备份方法—完全和增量。一个完全的版本库备份包含了在重大灾难后重建版本库所需的所有信息,通常,这意味着对版本库目录(包括Berkeley DB或FSFS环境)的完全复制,增量备份的内容要少一些,只包含在上次备份后改变的部分。" - -#. (para) -#: ../source/book.xml:11736 -#, fuzzy -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 svnadmin hotcopy command takes care of the minutia involved in making a hot backup of your repository. And its invocation is as trivial as Unix's cp or Windows' copy operations:" -msgstr "随着完全备份的使用,这种幼稚的方法或许看起来有点不够健全,但是除非你临时关闭所有访问版本库的进程,否则这种递归的拷贝目录会有产生错误拷贝的风险。Berkeley DB的情况下,其文档中记述了按照什么顺序拷贝可以保证正确的备份拷贝,FSFS也有类似的顺序。但是你不必自己实现这种算法,因为Subversion的开发团队已经这样做了。svnadmin hotcopy关注了在热拷贝版本库时的所有细节,它的调用就像Unix的cp或Windows的copy一样琐碎:" - -#. (screen) -#: ../source/book.xml:11750 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin hotcopy /var/svn/repos /var/svn/repos-backup\n" -msgstr "" -"\n" -"$ svnadmin hotcopy /path/to/repos /path/to/repos-backup\n" - -#. (para) -#: ../source/book.xml:11753 -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." -msgstr "作为结果的备份是一个完全功能的版本库,当发生严重错误时可以作为你的活动版本库的替换。" - -#. (para) -#: ../source/book.xml:11756 -#, fuzzy -msgid "When making copies of a Berkeley DB repository, you can even instruct svnadmin hotcopy to purge any unused Berkeley DB logfiles (see ) from the original repository upon completion of the copy. Simply provide the option on the command-line." -msgstr "当进行Berkeley DB版本库的备份时,你可以指导svnadmin hotcopy清理源版本库中无用的Berkeley DB日志文件(见),只需要简单的在命令行里提供。" - -#. (screen) -#: ../source/book.xml:11762 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin hotcopy --clean-logs /var/svn/bdb-repos /var/svn/bdb-repos-backup\n" -msgstr "" -"\n" -"$ svnadmin hotcopy --clean-logs /path/to/bdb-repos /path/to/bdb-repos-backup\n" - -#. (para) -#: ../source/book.xml:11765 -#, fuzzy -msgid "Additional tooling around this command is available, too. The tools/backup/ directory of the Subversion source distribution holds the hot-backup.py script. This script adds a bit of backup management atop svnadmin hotcopy, 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 rotate off 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 hot-backup.py from a program scheduler (such as cron on Unix systems) which will cause it to run nightly (or at whatever granularity of Time you deem safe)." -msgstr "还有一些附加的加工命令,Subversion源程序中的tools/backup/目录包含了hot-backup.py脚本,这个脚本在hot-backup.py之上增加了备份管理功能,你可以保存每个版本库最近的配置号码。为了防止与以前的备份冲突,它会自动管理备份版本库目录名字,循环利用备份名,删除掉旧的,保存新的。即使你也有一个增量的备份,你还是会希望有规律的运行这个程序。例如,你会在一个调度程序(例如Unix系统的cron)中调用hot-backup.py会导致它在半夜执行(或者是任何你认为安全的时间间隔)。" - -#. (para) -#: ../source/book.xml:11782 -#, fuzzy -msgid "Some administrators use a different backup mechanism built around generating and storing repository dump data. We described in how to use svnadmin dump --incremental 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 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." -msgstr "一些管理员使用不同的备份机制,通过生成和保存版本库转储数据。我们在中描述如何使用svnadmin dump --incremental来对一个修订版本或一个修订版本范围执行增量备份。当然,通过取消选项可以得到完整的备份。在备份信息中方法的值非常灵活—不会与特定平台,版本化的文件系统类型或Subversion和Berkeley DB的版本绑定。但是灵活带来了代价,数据恢复会占用更长的时间—比每个新版本提交更长。此外,在非完全的量转储生成时,对已经备份修订版本的修订版本属性的修改不会被采纳,因为这些原因,我们不建议你单独依赖转储为基础的备份方法。" - -#. (para) -#: ../source/book.xml:11801 -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." -msgstr "如你所见,几种备份方式都有各自的优点,最简单的方式是完全热备份,将会每次建立版本库的完美复制品,这意味着如果当你的活动版本库发生了什么事情,你可以用备份恢复。但不幸的是,如果你维护多个备份,每个完全的备份会吞噬掉和你的活动版本库同样的空间。与之相对照的是增量备份,能够快速生成小的备份,但是恢复过程将会很痛苦,通常要包括多个增量拷贝的应用。其他方法都有自己的特点,管理员需要在创建拷贝和恢复的代价之间寻求平衡。" - -#. (para) -#: ../source/book.xml:11816 -#, fuzzy -msgid "The svnsync program (see ) 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 inside the repository's virtual versioned filesystem are not handled by svnsync." -msgstr "svnsync实际上提供了一种更易实施的妥协方法,如果你有规律的同步镜像版本库,则在必要时,镜像版本库就成了主版本库发生问题时的一个合适替代者。这个方法最大的缺点是只有版本化的数据得到了同步—版本库的配置信息,用户指定的路径锁定和其它以物理形式存在于版本库路径而不存在于版本库虚拟文件系统的项目不会被svnsync处理。" - -#. (para) -#: ../source/book.xml:11834 -#, fuzzy -msgid "svnadmin setlog can be called in a way that bypasses the hook interface altogether." -msgstr "svnadmin setlog可以被绕过钩子程序被调用。" - -#. (para) -#: ../source/book.xml:11828 -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. 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." -msgstr "在每一种备份情境下,版本库管理员需要意识到对未版本化的修订版本属性的修改对备份的影响,因为这些修改本身不会产生新的修订版本,所以不会触发post-commit的钩子程序,也不会触发pre-revprop-change和post-revprop-change的钩子。 而且因为你可以改变修订版本的属性,而不需要遵照时间顺序—你可在任何时刻修改任何修订版本的属性—因此最新版本的增量备份不会捕捉到以前特定修订版本的属性修改。" - -#. (para) -#: ../source/book.xml:11842 -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." -msgstr "通常说来,在每次提交时,只有妄想狂才会备份整个版本库,然而,假设一个给定的版本库拥有一些恰当粒度的冗余机制(如每次提交的邮件)。版本库管理员也许会希望将版本库的热备份引入到系统级的每夜备份,对大多数版本库,归档的提交邮件为保存资源提供了足够的冗余措施,至少对于最近的提交。但是它是你的数据—你喜欢怎样保护都可以。" - -#. (para) -#: ../source/book.xml:11865 -msgid "You know—the collective term for all of her fickle fingers." -msgstr "你知道的—只是对各种变化莫测的问题的统称。" - -#. (para) -#: ../source/book.xml:11851 -#, fuzzy -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 hot-backup.py and an offsite rsync 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 svnsync. 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, it should certainly help you recover from those trying times." -msgstr "通常情况下,最好的版本库备份方式是混合的,你可以平衡完全和增量备份,另外配合提交邮件的归档。Subversion开发者,举个例子,使用hot-backup.py对Subversion版本库进行完全备份并使用rsync同步这些备份;同时保存所有的提交日至和修改通知邮件;并且使用许多志愿者维护的svnsync镜像版本库。你们的解决方案可能非常类似,但是要实现满足需要和便利性的平衡。无论你做了什么,你需要一次次的验证你的备份—就像要检查备用轮胎是否有个窟窿?当然,所有做的事情都无法回避我们的硬件来自钢铁的命运,它将帮助你从艰难的时光恢复过来。" - -#. (para) -#: ../source/book.xml:11878 -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." -msgstr "现在,你应该已经对如何创建、配置以及维护Subversion版本库有了个基本的认识。我们向您介绍了几个可以帮助您工作的工具。通过这一章,我们说明了一些常见的管理误区,并提出了避免陷入误区的建议。" - -#. (para) -#: ../source/book.xml:11884 -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." -msgstr "剩下的,就是由你决定在你的版本库中存放一些什么有趣的资料,并最终通过网络获得这些资料。下一章是关于网络的内容。" - -#. (title) -#: ../source/book.xml:11896 -msgid "Server Configuration" -msgstr "服务配置" - -#. (para) -#: ../source/book.xml:11898 -#, fuzzy -msgid "A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides using the file:// 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." -msgstr "一个Subversion的版本库可以和客户端同时运行在同一个机器上,使用file:///访问,但是一个典型的Subversion设置应该包括一个单独的服务器,可以被办公室的所有客户端访问—或者有可能是整个世界。" - -#. (para) -#: ../source/book.xml:11904 -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." -msgstr "本小节描述了怎样将一个Subversion的版本库暴露给远程客户端,我们会覆盖Subversion已存在的服务器机制,讨论各种方式的配置和使用。经过阅读本小节,你可以决定你需要哪种网络设置,并且明白怎样在你的主机上进行配置。" - -#. (title) -#: ../source/book.xml:11916 -msgid "Overview" -msgstr "概述" - -#. (para) -#: ../source/book.xml:11918 -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 repository access 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." -msgstr "Subversion的设计包括一个抽象的网络层,这意味着版本库可以通过各种服务器进程访问,而且客户端版本库访问的API允许程序员写出相关协议的插件,理论上讲,Subversion可以使用无限数量的网络协议实现,目前实践中只有两种服务器。" - -#. (para) -#: ../source/book.xml:11925 -#, fuzzy -msgid "Apache is an extremely popular webserver; using the mod_dav_svn 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 for free, such as encrypted SSL communication, logging, integration with a number of third-party authentication systems, and limited built-in web browsing of repositories." -msgstr "Apache是最流行的web服务器,通过使用mod_dav_svn模块,Apache可以访问版本库,并且可以使客户端使用HTTP的扩展协议WebDAV/DeltaV进行访问,因为Apache是一个非常易于扩展的web服务器,它提供了许多易于获取的特性,例如加密的SSL通讯,日志和与第三方工具的集成,以及内置的版本库web浏览功能。" - -#. (para) -#: ../source/book.xml:11934 -#, fuzzy -msgid "In the other corner is svnserve: 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." -msgstr "在另一个角落是svnserve:一个更小,轻型的服务器程序,同客户端使用自定义的协议。因为协议是为Subversion专门设计的,并且是有状态的(不像HTTP),它提供了更快的网络操作—但也有一些代价。它只理解CRAM-MD5的认证,然而它非常易于配置,是开始使用Subversion的小团队的最佳选择。" - -#. (para) -#: ../source/book.xml:11944 -#, fuzzy -msgid "A third option is to use svnserve tunneled over an SSH connection. Even though this scenario still uses svnserve, it differs quite a bit in features from a traditional svnserve 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 svnserve, which has its own private user accounts.) Finally, because this setup requires that each user spawn a private, temporary svnserve process, it's equivalent (from a permissions point of view) to allowing a group of local users to all access the repository via file:// URLs. Path-based access control has no meaning, since each user is accessing the repository database files directly." -msgstr "第三个选择是使用SSH连接包裹的svnserve,尽管这个场景依然使用svnserve,它与传统的svnserve部署非常不同,SSH在多所有的通讯中使用加密方式,SSH也使用排他的认证,所以在服务器主机(svnserve与之不同,它包含了自己的私有用户帐号)上必须要有真实的系统帐户。最后,因为这些配置需要每个用户发起一个私有的临时svnserve进程,这与允许一组本地用户通过file://协议访问等同(从访问许可的视点)。因此路径为基础的访问控制变得没有意义,因为每个用户都可以直接访问版本库。" - -#. (para) -#: ../source/book.xml:11959 -msgid "Here's a quick summary of the three typical server deployments." -msgstr "下面是三种典型服务器部署的总结。" - -#. (title) -#: ../source/book.xml:11963 -msgid "Comparison of Subversion Server Options" -msgstr "Subversion 服务器选项比较" - -#. (entry) -#: ../source/book.xml:11969 -msgid "Apache + mod_dav_svn" -msgstr "Apache + mod_dav_svn" - -#. (entry) -#: ../source/book.xml:11971 -msgid "svnserve over SSH" -msgstr "svnserve over SSH" - -#. (entry) -#: ../source/book.xml:11976 -msgid "Authentication options" -msgstr "认证选项" - -#. (entry) -#: ../source/book.xml:11977 -msgid "HTTP(S) basic auth, X.509 certificates, LDAP, NTLM, or any other mechanism available to Apache httpd" -msgstr "HTTP(S) basic auth、X.509 certificates、LDAP、NTLM或任何Apache httpd已经具备的方式" - -#. (entry) -#: ../source/book.xml:11979 -#, fuzzy -msgid "CRAM-MD5 by default; LDAP, NTLM, or any other mechanism available to SASL" -msgstr "HTTP(S) basic auth、X.509 certificates、LDAP、NTLM或任何Apache httpd已经具备的方式" - -#. (entry) -#: ../source/book.xml:11981 -msgid "SSH" -msgstr "SSH" - -#. (entry) -#: ../source/book.xml:11984 -msgid "User account options" -msgstr "用户帐号选项" - -#. (entry) -#: ../source/book.xml:11985 -msgid "private 'users' file, or other mechanisms available to Apache httpd (LDAP, SQL, etc.)" -msgstr "" - -#. (entry) -#: ../source/book.xml:11987 -msgid "private 'users' file, or other mechanisms available to SASL (LDAP, SQL, etc.)" -msgstr "" - -#. (entry) -#: ../source/book.xml:11989 -msgid "system accounts" -msgstr "系统帐号" - -#. (entry) -#: ../source/book.xml:11992 -msgid "Authorization options" -msgstr "授权选项" - -#. (entry) -#: ../source/book.xml:11993 ../source/book.xml:11995 -msgid "read/write access can be granted over whole repository, or specified per-path." -msgstr "可以授予整个版本库的读/写权限,也可以指定目录的。" - -#. (entry) -#: ../source/book.xml:11997 -msgid "read/write access only grantable over whole repository" -msgstr "只能对版本库整体赋予读/写权限" - -#. (entry) -#: ../source/book.xml:12001 -msgid "Encryption" -msgstr "加密" - -#. (entry) -#: ../source/book.xml:12002 -msgid "via optional SSL" -msgstr "通过可选的 SSL" - -#. (entry) -#: ../source/book.xml:12003 -#, fuzzy -msgid "via optional SASL features" -msgstr "通过可选的 SSL" - -#. (entry) -#: ../source/book.xml:12004 -msgid "SSH tunneled" -msgstr "SSH通道的" - -#. (entry) -#: ../source/book.xml:12007 -msgid "Logging" -msgstr "Logging" - -#. (quote) -#: ../source/book.xml:12009 -msgid "high-level" -msgstr "高级" - -#. (entry) -#: ../source/book.xml:12008 -msgid "full Apache logs of each HTTP request, with optional logging of general client operations" -msgstr "对每个HTTP请求记录完全的Apache日志,通过选项记录普通的客户端操作。" - -#. (entry) -#: ../source/book.xml:12011 ../source/book.xml:12012 -msgid "no logging" -msgstr "no logging" - -#. (entry) -#: ../source/book.xml:12015 -msgid "Interoperability" -msgstr "交互性" - -#. (entry) -#: ../source/book.xml:12016 -msgid "partially usable by other WebDAV clients" -msgstr "可以部分的被其他WebDAV客户端使用" - -#. (entry) -#: ../source/book.xml:12017 ../source/book.xml:12018 -msgid "only talks to svn clients" -msgstr "只同svn客户端通讯" - -#. (entry) -#: ../source/book.xml:12021 -msgid "Web viewing" -msgstr "Web浏览能力" - -#. (entry) -#: ../source/book.xml:12022 -msgid "limited built-in support, or via 3rd-party tools such as ViewVC" -msgstr "有限的内置支持,或者通过第三方工具,如ViewVC" - -#. (entry) -#: ../source/book.xml:12024 ../source/book.xml:12025 -msgid "only via 3rd-party tools such as ViewVC" -msgstr "只有通过第三方工具,如 ViewVC" - -#. (entry) -#: ../source/book.xml:12028 -msgid "Speed" -msgstr "速度" - -#. (entry) -#: ../source/book.xml:12029 -msgid "somewhat slower" -msgstr "有些慢" - -#. (entry) -#: ../source/book.xml:12030 ../source/book.xml:12031 -msgid "somewhat faster" -msgstr "快一点" - -#. (entry), (title) -#: ../source/book.xml:12034 ../source/book.xml:13044 -msgid "Initial setup" -msgstr "初始设置" - -#. (entry) -#: ../source/book.xml:12035 -msgid "somewhat complex" -msgstr "有些复杂" - -#. (entry) -#: ../source/book.xml:12036 -msgid "extremely simple" -msgstr "极为简单" - -#. (entry) -#: ../source/book.xml:12037 -msgid "moderately simple" -msgstr "相当简单" - -#. (title) -#: ../source/book.xml:12045 -msgid "Choosing a Server Configuration" -msgstr "选择一个服务器配置" - -#. (para) -#: ../source/book.xml:12047 -msgid "So, which server should you use? Which is best?" -msgstr "那你应该用什么服务器?什么最好?" - -#. (para) -#: ../source/book.xml:12048 -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 official than another." -msgstr "显然,对这个问题没有正确的答案,每个团队都有不同的需要,不同的服务器都有各自的代价。Subversion项目没有更加认可哪种服务,或认为哪个服务更加正式一点。" - -#. (para) -#: ../source/book.xml:12053 -msgid "Here are some reasons why you might choose one deployment over another, as well as reasons you might not choose one." -msgstr "下面是你选择或者不选择某一个部署方式的原因。" - -#. (title) -#: ../source/book.xml:12058 -#, fuzzy -msgid "The svnserve Server" -msgstr "svnserve 服务器" - -#. (term) -#: ../source/book.xml:12062 ../source/book.xml:12115 ../source/book.xml:12164 -msgid "Why you might want to use it:" -msgstr "为什么你会希望使用它:" - -#. (para) -#: ../source/book.xml:12066 -msgid "Quick and easy to set up." -msgstr "设置快速简单。" - -#. (para) -#: ../source/book.xml:12070 ../source/book.xml:12119 -msgid "Network protocol is stateful and noticeably faster than WebDAV." -msgstr "网络协议是有状态的,比WebDAV快很多。" - -#. (para) -#: ../source/book.xml:12074 ../source/book.xml:12173 -msgid "No need to create system accounts on server." -msgstr "不需要在服务器创建系统帐号。" - -#. (para) -#: ../source/book.xml:12078 -msgid "Password is not passed over the network." -msgstr "不会在网络传输密码。" - -#. (term) -#: ../source/book.xml:12085 ../source/book.xml:12134 ../source/book.xml:12200 -msgid "Why you might want to avoid it:" -msgstr "为什么你会希望避免它:" - -#. (para) -#: ../source/book.xml:12089 -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.)" -msgstr "" - -#. (para) -#: ../source/book.xml:12096 ../source/book.xml:12142 -msgid "No logging of any kind, not even errors." -msgstr "没有任何类型的日志,甚至是错误。" - -#. (para) -#: ../source/book.xml:12100 -msgid "No built-in web browsing. (You'd have to install a separate web server and some CGI software to add this.)" -msgstr "" - -#. (title) -#: ../source/book.xml:12111 -#, fuzzy -msgid "svnserve over SSH" -msgstr "svnserve 使用 SSH 隧道" - -#. (para) -#: ../source/book.xml:12123 -msgid "You can take advantage of existing ssh accounts and user infrastructure." -msgstr "你可以利用现有的ssh帐号和用户基础。" - -#. (para) -#: ../source/book.xml:12127 -msgid "All network traffic is encrypted." -msgstr "所有网络传输是加密的。" - -#. (para) -#: ../source/book.xml:12138 -msgid "Only one choice of authentication method." -msgstr "只有一个认证方法选择。" - -#. (para) -#: ../source/book.xml:12146 -msgid "Requires users to be in same system group, or use a shared ssh key." -msgstr "需要用户在同一个系统组,使用共享ssh密钥。" - -#. (para) -#: ../source/book.xml:12150 -#, fuzzy -msgid "If used improperly, can lead to file permissions problems." -msgstr "会导致文件许可问题。" - -#. (title) -#: ../source/book.xml:12160 -msgid "The Apache HTTP Server" -msgstr "Apache 的 HTTP 服务器" - -#. (para) -#: ../source/book.xml:12168 -msgid "Allows Subversion to use any of the numerous authentication systems already integrated with Apache." -msgstr "允许Subversion使用大量已经集成到Apache的用户认证系统。" - -#. (para) -#: ../source/book.xml:12177 -msgid "Full Apache logging." -msgstr "完全的Apache日志。" - -#. (para) -#: ../source/book.xml:12180 -msgid "Network traffic can be encrypted via SSL." -msgstr "网络传输可以通过SSL加密。" - -#. (para) -#: ../source/book.xml:12184 -msgid "HTTP(S) can usually go through corporate firewalls." -msgstr "HTTP(S) 通常可以穿越公司防火墙。" - -#. (para) -#: ../source/book.xml:12188 -msgid "Built-in repository browsing via web browser." -msgstr "通过web浏览器访问内置的版本库浏览。" - -#. (para) -#: ../source/book.xml:12192 -msgid "Repository can be mounted as a network drive for transparent version control. (See .)" -msgstr "版本库可以作为网络驱动器加载,实现透明的版本控制,见。" - -#. (para) -#: ../source/book.xml:12204 -msgid "Noticeably slower than svnserve, because HTTP is a stateless protocol and requires more turnarounds." -msgstr "比svnserve慢很多,因为HTTP是无状态的协议,需要更多的传递。" - -#. (para) -#: ../source/book.xml:12209 -msgid "Initial setup can be complex." -msgstr "初始设置可能复杂" - -#. (title) -#: ../source/book.xml:12218 -msgid "Recommendations" -msgstr "推荐" - -#. (para) -#: ../source/book.xml:12220 -#, fuzzy -msgid "In general, the authors of this book recommend a vanilla svnserve 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." -msgstr "通常,本书的作者推荐希望尝试开始使用Subversion的小团队使用svnserve;这是设置最简单,维护最少的方法,而当你的需求改变时,你可以转换到复杂的部署方式。" - -#. (para) -#: ../source/book.xml:12226 -msgid "Here are some general recommendations and tips, based on years of supporting users:" -msgstr "下面是一些常见的建议和小技巧,基于多年对用户的支持:" - -#. (para) -#: ../source/book.xml:12230 -#, fuzzy -msgid "If you're trying to set up the simplest possible server for your group, then a vanilla svnserve 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." -msgstr "如果你尝试为你的团队建立最简单的服务器,安装svnserve是最简单的,最快速的方法。注意,无论如何,如果你的整个部署都是在局域网或者VPN中,版本库数据可以在网络上没有限制的传递。如果版本库部署在internet,你会希望确定版本库的内容不是敏感的(例如只包含开源代码。)。" - -#. (para) -#: ../source/book.xml:12244 -#, fuzzy -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 svnserve 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." -msgstr "如果你希望与现有的认证系统(LDAP、Active Directory、NTLM、X.509等)集成,你你只能选择Apache服务器,同样的,如果你绝对需要服务器端的日志(服务日志或客户端活动),也需要Apache服务器。" - -#. (para) -#: ../source/book.xml:12253 -#, fuzzy -msgid "If you've decided to use either Apache or stock svnserve, create a single svn user on your system and run the server process as that user. Be sure to make the repository directory wholly owned by the svn 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." -msgstr "如果你已经决定使用Apache或svnserve,应该单独创建一个运行服务器进程的svn用户,也需要确定版本库目录属于svn用户。从安全的角度,这样很好的利用了操作系统的文件系统许可保护了版本库数据,只有Subversion服务进程可以修改其内容。" - -#. (para) -#: ../source/book.xml:12265 -#, fuzzy -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 svnserve 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 svnserve with SASL encryption instead." -msgstr "如果你有一个严重依赖于SSH帐号的基础,而且你的用户已经在服务器上有了帐号,那建立一个通过ssh的svnserve方案就非常有意义,否则,我们不会建议这种方案。通常还是通过svnserve或Apache管理的用户访问版本库比较安全,而不是使用完全的系统帐户。如果你很希望加密的通讯,那可能还是需要选择这个方案,但我们更加推荐SSL的Apache方案。" - -#. (para) -#: ../source/book.xml:12280 -#, fuzzy -msgid "Do not be seduced by the simple idea of having all of your users access a repository directly via file:// 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 .) Note that this is also one of the reasons we warn against accessing repositories via svn+ssh:// URLs—from a security standpoint, it's effectively the same as local users accessing via file://, and can entail all the same problems if the administrator isn't careful." -msgstr "不要被简单的让所有用户使用file://的URL访问版本库的方案诱惑,即使,版本库版本库已经对网络共享的所有用户可见,这也不是一个好方案。这样删除了用户和版本库之间的所有保护层:用户可能会偶然(或有意的)毁坏版本库数据库,这样也很难在检查或升级时将版本库脱机,而且这样会造成曾混乱的文件许可问题(见。),注意那就是我们警告使用svn+ssh://的原因—从安全角度讲,这样与作为本地用户访问file://是一样的,如果管理员不小心,会造成同样的问题。" - -#. (title) -#: ../source/book.xml:12306 -msgid "svnserve, a custom server" -msgstr "svnserve,一个定制的服务器" - -#. (para) -#: ../source/book.xml:12308 -#, fuzzy -msgid "The svnserve program is a lightweight server, capable of speaking to clients over TCP/IP using a custom, stateful protocol. Clients contact an svnserve server by using URLs that begin with the svn:// or svn+ssh:// scheme. This section will explain the different ways of running svnserve, how clients authenticate themselves to the server, and how to configure appropriate access control to your repositories." -msgstr "svnserve是一个轻型的服务器,可以同客户端通过在TCP/IP基础上的自定义有状态协议通讯,客户端通过使用开头为svn://或者svn+ssh://svnserve的URL来访问一个svnserve服务器。这一小节将会解释运行svnserve的不同方式,客户端怎样实现服务器的认证,怎样配置版本库恰当的访问控制。" - -#. (title) -#: ../source/book.xml:12320 -msgid "Invoking the Server" -msgstr "调用服务器" - -#. (para) -#: ../source/book.xml:12322 -#, fuzzy -msgid "There are a few different ways to run the svnserve program:" -msgstr "有许多不同方法运行svnserve:" - -#. (para) -#: ../source/book.xml:12326 -#, fuzzy -msgid "Run svnserve as a standalone daemon, listening for requests." -msgstr "作为一个独立守护进程启动svnserve,监听请求。" - -#. (para) -#: ../source/book.xml:12331 -#, fuzzy -msgid "Have the Unix inetd daemon temporarily spawn svnserve whenever a request comes in on a certain port." -msgstr "当特定端口收到一个请求,就会使UNIX的inetd守护进程临时调用svnserve处理。" - -#. (para) -#: ../source/book.xml:12336 -#, fuzzy -msgid "Have SSH invoke a temporary svnserve over an encrypted tunnel." -msgstr "使用SSH在加密通道发起临时svnserve服务。" - -#. (para) -#: ../source/book.xml:12341 -#, fuzzy -msgid "Run svnserve as a Microsoft Windows service." -msgstr "以Windows service服务方式运行svnserve。" - -#. (title) -#: ../source/book.xml:12348 -#, fuzzy -msgid "svnserve as Daemon" -msgstr "svnserve 作为后台程序" - -#. (para) -#: ../source/book.xml:12350 -#, fuzzy -msgid "The easiest option is to run svnserve as a standalone daemon process. Use the option for this:" -msgstr "执行svnserve最简单的选项是作为独立守护进程,使用选项:" - -#. (screen) -#: ../source/book.xml:12353 -#, no-wrap -msgid "" -"\n" -"$ svnserve -d\n" -"$ # svnserve is now running, listening on port 3690\n" -msgstr "" -"\n" -"$ svnserve -d\n" -"$ # svnserve is now running, listening on port 3690\n" - -#. (para) -#: ../source/book.xml:12357 -#, fuzzy -msgid "When running svnserve in daemon mode, you can use the and options to customize the exact port and hostname to bind to." -msgstr "当以守护模式运行svnserve时,你可以使用选项来自定义绑定的端口和主机名。" - -#. (para) -#: ../source/book.xml:12361 -#, fuzzy -msgid "Once we successfully start svnserve as above, it makes every repository on your system available to the network. A client needs to specify an absolute path in the repository URL. For example, if a repository is located at /var/svn/project1, then a client would reach it via svn://host.example.com/var/svn/project1. To increase security, you can pass the option to svnserve, which restricts it to exporting only repositories below that path. For example:" -msgstr "一旦svnserve已经运行,它会将你系统中所有版本库发布到网络,一个客户端需要指定版本库在URL中的绝对路径,举个例子,如果一个版本库是位于/usr/local/repositories/project1,则一个客户端可以使用svn://host.example.com/usr/local/repositories/project1 来进行访问,为了提高安全性,你可以使用svnserve选项,这样会限制只输出指定路径下的版本库,例如:" - -#. (screen) -#: ../source/book.xml:12373 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnserve -d -r /var/svn\n" -"…\n" -msgstr "" -"\n" -"$ svnserve -d -r /usr/local/repositories\n" -"…\n" - -#. (para) -#: ../source/book.xml:12377 -msgid "Using the 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:" -msgstr "使用可以有效地改变文件系统的根位置,客户端可以使用去掉前半部分的路径,留下的要短一些的(更加有提示性)URL:" - -#. (screen) -#: ../source/book.xml:12382 -#, no-wrap -msgid "" -"\n" -"$ svn checkout svn://host.example.com/project1\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout svn://host.example.com/project1\n" -"…\n" - -#. (title) -#: ../source/book.xml:12390 -#, fuzzy -msgid "svnserve via inetd" -msgstr "使用 svnserve 通过 inetd" - -#. (para) -#: ../source/book.xml:12392 -msgid "If you want inetd to launch the process, then you need to pass the () option. In the example, we've shown the output from running svnserve -i 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 inetd to start svnserve." -msgstr "如果你希望inetd启动进程,你需要使用)选项,在这个例子里,我们显示了在命令行中运行svnserve -i的输出,但是请注意这不是如何实际启动daemon; 请继续阅读例子后的文章,学习如何配置inetd启动svnserve。" - -#. (screen) -#: ../source/book.xml:12400 -#, no-wrap -msgid "" -"\n" -"$ svnserve -i\n" -"( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )\n" -msgstr "" -"\n" -"$ svnserve -i\n" -"( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) )\n" - -#. (para) -#: ../source/book.xml:12404 -#, fuzzy -msgid "When invoked with the option, svnserve attempts to speak with a Subversion client via stdin and stdout using a custom protocol. This is the standard behavior for a program being run via inetd. The IANA has reserved port 3690 for the Subversion protocol, so on a Unix-like system you can add lines to /etc/services like these (if they don't already exist):" -msgstr "当用参数调用时,svnserve会尝试使用自定义协议通过stdinstdout来与Subversion客户端通话,这是使用inetd工作的标准方式,IANA为Subversion协议保留3690端口,所以在类Unix系统你可以在/etc/services添加如下的几行(如果他们还不存在):" - -#. (screen) -#: ../source/book.xml:12413 -#, no-wrap -msgid "" -"\n" -"svn 3690/tcp # Subversion\n" -"svn 3690/udp # Subversion\n" -msgstr "" -"\n" -"svn 3690/tcp # Subversion\n" -"svn 3690/udp # Subversion\n" - -#. (para) -#: ../source/book.xml:12417 -#, fuzzy -msgid "And if your system is using a classic Unix-like inetd daemon, you can add this line to /etc/inetd.conf:" -msgstr "如果系统是使用经典的类Unix的inetd守护进程,你可以在/etc/inetd.conf添加这几行:" - -#. (screen) -#: ../source/book.xml:12420 -#, no-wrap -msgid "" -"\n" -"svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i\n" -msgstr "" -"\n" -"svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i\n" - -#. (para) -#: ../source/book.xml:12423 -#, fuzzy -msgid "Make sure svnowner is a user which has appropriate permissions to access your repositories. Now, when a client connection comes into your server on port 3690, inetd will spawn an svnserve process to service it. Of course, you may also want to add to the configuration line as well, to restrict which repositories are exported." -msgstr "确定svnowner用户拥有访问版本库的适当权限,现在如果一个客户连接来到你的服务器的端口3690,inetd会产生一个svnserve进程来做服务。当然,你也可以添加到命令行,限制暴露出的版本库。" - -#. (title) -#: ../source/book.xml:12435 -#, fuzzy -msgid "svnserve over a Tunnel" -msgstr "通过隧道 svnserve" - -#. (para) -#: ../source/book.xml:12437 -#, fuzzy -msgid "A third way to invoke svnserve is in tunnel mode, with the option. This mode assumes that a remote-service program such as RSH or SSH has successfully authenticated a user and is now invoking a private svnserve process as that user. (Note that you, the user, will rarely, if ever, have reason to invoke svnserve with the at the command line; instead, the SSH daemon does so for you.) The svnserve program behaves normally (communicating via stdin and stdout), and assumes that the traffic is being automatically redirected over some sort of tunnel back to the client. When svnserve 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 file:// URLs." -msgstr "也一直有第三种方式,使用选项的管道模式,这个模式假定一个分布式服务程序如RSHSSH已经验证了一个用户,并且以这个用户调用了一个私有svnserve进程,svnserve运作如常(通过stdinstdout通讯),并且可以设想通讯是自动转向到一种通道传递回客户端,当svnserve被这样的通道代理调用,确定认证用户对版本数据库有完全的读写权限,这与本地用户通过file:///URl访问版本库同样重要。" - -#. (para) -#: ../source/book.xml:12457 -msgid "This option is described in much more detail in ." -msgstr "这个选项将在详细讨论。" - -#. (title) -#: ../source/book.xml:12463 -#, fuzzy -msgid "svnserve as Windows Service" -msgstr "svnserve 作为 Windows 服务" - -#. (para) -#: ../source/book.xml:12465 -#, fuzzy -msgid "If your Windows system is a descendant of Windows NT (2000, 2003, XP, Vista), then you can run svnserve as a standard Windows service. This is typically a much nicer experience than running it as a standalone daemon with the 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." -msgstr "如果你的Windows系统是Windows NT (2000, 2003, XP, Vista)的后代,你可以将svnserve作为Windows服务运行,这是比使用选项直接运行守护进程感觉更好。使用守护进程模式,需要打开命令行窗口,输入命令,然后保持命令行窗口不关闭,而作为Windows服务时,在后台运行,可以在启动时自动执行,并且可以使用同其他Windows服务一致的管理界面启动和停止服务。" - -#. (para) -#: ../source/book.xml:12477 -#, fuzzy -msgid "You'll need to define the new service using the command-line tool SC.EXE. Much like the inetd configuration line, you must specify an exact invocation of svnserve for Windows to run at start-up time:" -msgstr "你需要使用命令行工具SC.EXE定义新的服务,就像inetd的配置行,你必须在Windows启动时指明svnserve的调用。" - -#. (screen) -#: ../source/book.xml:12482 -#, no-wrap -msgid "" -"\n" -"C:\\> sc create svn\n" -" binpath= \"C:\\svn\\bin\\svnserve.exe --service -r C:\\repos\"\n" -" displayname= \"Subversion Server\"\n" -" depend= Tcpip\n" -" start= auto\n" -msgstr "" -"\n" -"C:\\> sc create svn\n" -" binpath= \"C:\\svn\\bin\\svnserve.exe --service -r C:\\repos\"\n" -" displayname= \"Subversion Server\"\n" -" depend= Tcpip\n" -" start= auto\n" - -#. (para) -#: ../source/book.xml:12489 -#, fuzzy -msgid "This defines a new Windows service named svn, and which executes a particular svnserve.exe command when started (in this case, rooted at C:\\repos.) There are a number of caveats in the prior example, however." -msgstr "这样定义了一个新的Windows服务,叫做svn,会在启动时(在这个例子里,根目录是C:\\repos。)执行特定的svnserve.exe,可是前面这个例子产生了一些错误。" - -#. (para) -#: ../source/book.xml:12495 -#, fuzzy -msgid "First, notice that the svnserve.exe program must always be invoked with the option. Any other options to svnserve must then be specified on the same line, but you cannot add conflicting options such as , , or . Options such as or are fine, though. Second, be careful about spaces when invoking the SC.EXE command: the key= value patterns must have no spaces between key= and exactly one space before the value. 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 binpath in double-quotes, by escaping them:" -msgstr "首先,必须注意svnserve.exe使用选项启动。svnserve的其它选项必须在同一行上指定,但你不能使用冲突的选项,例如,而选项都没有问题。第二,调用SC.EXE时必须注意空格:key= value的模式中key=之间必须没有空格,而且在与value之间只能有一个空格。最后,必须注意执行的命令行中的空格,如果目录名中包含了空格(或其它需要回避的字符),为了回避这些字符,请将整个binpath值放在双引号中:" - -#. (screen) -#: ../source/book.xml:12514 -#, no-wrap -msgid "" -"\n" -"C:\\> sc create svn\n" -" binpath= \"\\\"C:\\program files\\svn\\bin\\svnserve.exe\\\" --service -r C:\\repos\"\n" -" displayname= \"Subversion Server\"\n" -" depend= Tcpip\n" -" start= auto\n" -msgstr "" -"\n" -"C:\\> sc create svn\n" -" binpath= \"\\\"C:\\program files\\svn\\bin\\svnserve.exe\\\" --service -r C:\\repos\"\n" -" displayname= \"Subversion Server\"\n" -" depend= Tcpip\n" -" start= auto\n" - -#. (para) -#: ../source/book.xml:12521 -msgid "Also note that the word binpath is misleading—its value is a command line, not the path to an executable. That's why you need to surround it with quote marks if it contains embedded spaces." -msgstr "也需要注意单词binpath会造成误解—它的值是一个命令行,而不是可执行的路径,所以我们为了防止有嵌入的空格而使用了引号围绕。" - -#. (para) -#: ../source/book.xml:12526 -#, fuzzy -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:" -msgstr "一旦定义了服务,就可以使用标准GUI工具(服务管理控制面板)进行停止、启动和查询,或者是通过命令行:" - -#. (screen) -#: ../source/book.xml:12530 -#, no-wrap -msgid "" -"\n" -"C:\\> net stop svn\n" -"C:\\> net start svn\n" -msgstr "" -"\n" -"C:\\> net stop svn\n" -"C:\\> net start svn\n" - -#. (para) -#: ../source/book.xml:12534 -#, fuzzy -msgid "The service can also be uninstalled (i.e. undefined) by deleting its definition: sc delete svn. Just be sure to stop the service first! The SC.EXE program has many other subcommands and options; run sc /? to learn more about it." -msgstr "也可以通过删除其定义删除服务:sc delete svn,只需要确定首先停止服务,SC.EXE有许多子命令和选项,更多信息可以运行sc /?查看。" - -#. (title) -#: ../source/book.xml:12545 -msgid "Built-in authentication and authorization" -msgstr "内置的认证和授权" - -#. (para) -#: ../source/book.xml:12547 -#, fuzzy -msgid "When a client connects to an svnserve process, the following things happen:" -msgstr "如果一个客户端连接到svnserve进程,如下事情会发生:" - -#. (para) -#: ../source/book.xml:12551 -msgid "The client selects a specific repository." -msgstr "客户端选择特定的版本库。" - -#. (para) -#: ../source/book.xml:12555 -#, fuzzy -msgid "The server processes the repository's conf/svnserve.conf file, and begins to enforce any authentication and authorization policies it describes." -msgstr "服务器处理版本库的conf/svnserve.conf文件,并且执行里面定义的所有认证和授权政策。" - -#. (para) -#: ../source/book.xml:12561 -#, fuzzy -msgid "Depending on the defined policies," -msgstr "依赖于位置和授权政策," - -#. (para) -#: ../source/book.xml:12564 -msgid "the client may be allowed to make requests anonymously, without ever receiving an authentication challenge, OR" -msgstr "如果没有收到认证请求,客户端可能被允许匿名访问,或者" - -#. (para) -#: ../source/book.xml:12569 -msgid "the client may be challenged for authentication at any time, OR" -msgstr "客户端收到认证请求,或者" - -#. (para) -#: ../source/book.xml:12573 -#, fuzzy -msgid "if operating in tunnel mode, the client will declare itself to be already externally authenticated (typically by SSH)." -msgstr "如果操作在通道模式,客户端会宣布自己已经在外部得到认证。" - -#. (para) -#: ../source/book.xml:12582 -msgid "See RFC 2195." -msgstr "见RFC 2195。" - -#. (para) -#: ../source/book.xml:12581 -#, fuzzy -msgid "The svnserve server, by default, only knows how to send a CRAM-MD5 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. At no point does the actual password travel over the network." -msgstr "在撰写本文时,服务器还只知道怎样发送CRAM-MD5认证请求,本质上讲,就是服务器发送一些数据到客户端,客户端使用MD5哈希算法创建这些数据组合密码的指纹,然后返回指纹,服务器执行同样的计算并且来计算结果的一致性,真正的密码并没有在互联网上传递。" - -#. (para) -#: ../source/book.xml:12591 -msgid "If your svnserve 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 to configure SASL authentication and encryption." -msgstr "" - -#. (para) -#: ../source/book.xml:12597 -#, fuzzy -msgid "It's also possible, of course, for the client to be externally authenticated via a tunnel agent, such as SSH. 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 ." -msgstr "当然也有可能,如果客户端在外部通过通道代理认证,如SSH,在那种情况下,服务器简单的检验作为那个用户的运行,然后使用它作为认证用户名,更多信息请看。" - -#. (para) -#: ../source/book.xml:12602 -#, fuzzy -msgid "As you've already guessed, a repository's svnserve.conf file is the central mechanism for controlling authentication and authorization policies. The file has the same format as other configuration files (see ): section names are marked by square brackets ([ and ]), comments begin with hashes (#), and each section contains specific variables that can be set (variable = value). Let's walk through these files and learn how to use them." -msgstr "像你已经猜测到的,版本库的svnserve.conf文件是控制认证和授权政策的中央机构,这文件与其它配置文件格式相同(见):小节名称使用方括号标记([]),注释以井号(#)开始,每一小节都有一些参数可以设置(variable = value),让我们浏览这个文件并且学习怎样使用它们。" - -#. (title) -#: ../source/book.xml:12616 -msgid "Create a 'users' file and realm" -msgstr "创建一个用户文件和认证域" - -#. (para) -#: ../source/book.xml:12618 -#, fuzzy -msgid "For now, the [general] section of the svnserve.conf 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:" -msgstr "此时,svnserve.conf文件的[general]部分包括所有你需要的变量,开始先定义一个保存用户名和密码的文件和一个认证域:" - -#. (screen) -#: ../source/book.xml:12623 -#, no-wrap -msgid "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -msgstr "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" - -#. (para) -#: ../source/book.xml:12628 -#, fuzzy -msgid "The realm is a name that you define. It tells clients which sort of authentication namespace 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 ). The password-db variable points to a separate file that contains a list of usernames and passwords, using the same familiar format. For example:" -msgstr "realm是你定义的名称,这告诉客户端连接的认证命名空间,Subversion会在认证提示里显示,并且作为凭证缓存(见。)的关键字(还有服务器的主机名和端口),password-db参数指出了保存用户和密码列表文件,这个文件使用同样熟悉的格式,举个例子:" - -#. (screen) -#: ../source/book.xml:12637 -#, no-wrap -msgid "" -"\n" -"[users]\n" -"harry = foopassword\n" -"sally = barpassword\n" -msgstr "" -"\n" -"[users]\n" -"harry = foopassword\n" -"sally = barpassword\n" - -#. (para) -#: ../source/book.xml:12642 -#, fuzzy -msgid "The value of password-db can be an absolute or relative path to the users file. For many admins, it's easy to keep the file right in the conf/ area of the repository, alongside svnserve.conf. 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) svnserve will run as, restrict read access to the user file as necessary." -msgstr "password-db的值可以是用户文件的绝对或相对路径,对许多管理员来说,把文件保存在版本库conf/下的svnserve.conf旁边是一个简单的方法。另一方面,可能你的多个版本库使用同一个用户文件,此时,这个文件应该在更公开的地方,版本库分享用户文件时必须配置为相同的域,因为用户列表本质上定义了一个认证域,无论这个文件在哪里,必须设置好文件的读写权限,如果你知道运行svnserve的用户,限定这个用户对这个文件有读权限是必须的。" - -#. (title) -#: ../source/book.xml:12660 -msgid "Set access controls" -msgstr "设置访问控制" - -#. (para) -#: ../source/book.xml:12662 -#, fuzzy -msgid "There are two more variables to set in the svnserve.conf file: they determine what unauthenticated (anonymous) and authenticated users are allowed to do. The variables anon-access and auth-access can be set to the values none, read, or write. Setting the value to none prohibits both reading and writing; read allows read-only access to the repository, and write allows complete read/write access to the repository. For example:" -msgstr "svnserve.conf有两个或多个参数需要设置:它们确定未认证(匿名)和认证用户可以做的事情,参数anon-accessauth-access可以设置为noneread或者write,设置为none会限制所有方式的访问,read允许只读访问,而write允许对版本库完全的读/写权限:" - -#. (screen) -#: ../source/book.xml:12673 -#, no-wrap -msgid "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# anonymous users can only read the repository\n" -"anon-access = read\n" -"\n" -"# authenticated users can both read and write\n" -"auth-access = write\n" -msgstr "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# anonymous users can only read the repository\n" -"anon-access = read\n" -"\n" -"# authenticated users can both read and write\n" -"auth-access = write\n" - -#. (para) -#: ../source/book.xml:12684 -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:" -msgstr "实例中的设置实际上是参数的缺省值,你一定不要忘了设置它们,如果你希望更保守一点,你可以完全封锁匿名访问:" - -#. (screen) -#: ../source/book.xml:12688 -#, no-wrap -msgid "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# anonymous users aren't allowed\n" -"anon-access = none\n" -"\n" -"# authenticated users can both read and write\n" -"auth-access = write\n" -msgstr "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# anonymous users aren't allowed\n" -"anon-access = none\n" -"\n" -"# authenticated users can both read and write\n" -"auth-access = write\n" - -#. (para) -#: ../source/book.xml:12699 -#, fuzzy -msgid "The server process not only understands these blanket 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 authz-db variable to point to it:" -msgstr "服务进程不仅仅理解对版本库的整体访问控制,也可以细粒度的控制版本库某个文件或目录的访问,为了使用这个特性,你需要定一个包含详细规则的文件,并将变量authz-db指向到这个文件。" - -#. (screen) -#: ../source/book.xml:12706 -#, no-wrap -msgid "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# Specific access rules for specific locations\n" -"authz-db = authzfile\n" -msgstr "" -"\n" -"[general]\n" -"password-db = userfile\n" -"realm = example realm\n" -"\n" -"# Specific access rules for specific locations\n" -"authz-db = authzfile\n" - -#. (para) -#: ../source/book.xml:12714 -#, fuzzy -msgid "The syntax of the authzfile file is discussed in detail in . Note that the authz-db variable isn't mutually exclusive with the anon-access and auth-access variables; if all the variables are defined at once, then all of the rules must be satisfied before access is allowed." -msgstr "authzfile得语法会在讨论,注意变量authz-db并不比anon-accessauth-access更高级,如果定义了所有的变量,要想被允许访问必须满足所有的规则。" - -#. (title) -#: ../source/book.xml:12727 -#, fuzzy -msgid "Using svnserve with SASL" -msgstr "svnserve 使用 SSH 隧道" - -#. (para) -#: ../source/book.xml:12729 -msgid "For many teams, the built-in CRAM-MD5 authentication is all they need from svnserve. 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." -msgstr "" - -#. (title) -#: ../source/book.xml:12737 -#, fuzzy -msgid "What is SASL?" -msgstr "什么是 WebDAV ?" - -#. (para) -#: ../source/book.xml:12739 -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 svnserve server and svn 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." -msgstr "" - -#. (para) -#: ../source/book.xml:12758 -msgid "You can download Cyrus SASL (both code and documentation) from http://asg.web.cmu.edu/sasl/sasl-library.html." -msgstr "" - -#. (para) -#: ../source/book.xml:12762 -msgid "Normally, when a subversion client connects to svnserve, 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 ). 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." -msgstr "" - -#. (title) -#: ../source/book.xml:12780 -#, fuzzy -msgid "Authenticating with SASL" -msgstr "认证" - -#. (para) -#: ../source/book.xml:12782 -msgid "To activate specific SASL mechanisms on the server, you'll need to do two things. First, create a [sasl] section in your repository's svnserve.conf file, with this key-value pair:" -msgstr "" - -#. (screen) -#: ../source/book.xml:12787 -#, no-wrap -msgid "" -"\n" -" use-sasl = true\n" -msgstr "" - -#. (para) -#: ../source/book.xml:12790 -msgid "Second, create a file called subversion.conf 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 /usr/lib/sasl2/ or /etc/sasl2/. (Note that this is not the svnserve.conf file that lives within a repository!)" -msgstr "" - -#. (para) -#: ../source/book.xml:12800 -msgid "On a Windows server, you'll have to also edit the registry (using a tool like regedit) to tell SASL where to find things. Create a registry key named [HKEY_LOCAL_MACHINE\\SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library], and place two keys inside it: a key called SearchPath (whose value is a path containing the SASL .dll plugins), and a key called ConfFile (whose value is a path containing the subversion.conf file.)" -msgstr "" - -#. (para) -#: ../source/book.xml:12811 -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 doc/ 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 subversion.conf contains:" -msgstr "" - -#. (screen) -#: ../source/book.xml:12823 -#, no-wrap -msgid "" -"\n" -"pwcheck_method: auxprop\n" -"auxprop_plugin: sasldb\n" -"mech_list: DIGEST-MD5\n" -msgstr "" - -#. (para) -#: ../source/book.xml:12828 -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 /etc/sasldb2). A system administrator can then use the saslpasswd2 program to add or modify usernames and passwords in the database:" -msgstr "" - -#. (screen) -#: ../source/book.xml:12835 -#, no-wrap -msgid "" -"\n" -"$ saslpasswd2 -c -u realm username\n" -msgstr "" - -#. (para) -#: ../source/book.xml:12838 -msgid "A few words of warning: first, make sure that the \"realm\" argument to saslpasswd2 matches the same \"realm\" you've defined in your repository's svnserve.conf 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 svnserve program has read access to the file (and possibly write access as well, if you're using a mechanism such as OTP.)" -msgstr "" - -#. (para) -#: ../source/book.xml:12849 -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." -msgstr "" - -#. (para) -#: ../source/book.xml:12853 -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 (my clients must all use Kerberos!). 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." -msgstr "" - -#. (title) -#: ../source/book.xml:12867 -#, fuzzy -msgid "SASL Encryption" -msgstr "加密" - -#. (para) -#: ../source/book.xml:12869 -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 svnserve.conf file:" -msgstr "" - -#. (screen) -#: ../source/book.xml:12876 -#, no-wrap -msgid "" -"\n" -"[sasl]\n" -"use-sasl = true\n" -"min-encryption = 128\n" -"max-encryption = 256\n" -msgstr "" - -#. (para) -#: ../source/book.xml:12882 -msgid "The min-encryption and max-encryption 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." -msgstr "" - -#. (title) -#: ../source/book.xml:12900 -msgid "Tunneling over SSH" -msgstr "SSH 隧道" - -#. (para) -#: ../source/book.xml:12902 -#, fuzzy -msgid "svnserve'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 SSH into the server machine." -msgstr "svnserve的内置认证会非常容易得到,因为它避免了创建真实的系统帐号,另一方面,一些管理员已经创建好了SSH认证框架,在这种情况下,所有的项目用户已经拥有了系统帐号和有能力SSH到服务器。" - -#. (para) -#: ../source/book.xml:12909 -#, fuzzy -msgid "It's easy to use SSH in conjunction with svnserve. The client simply uses the svn+ssh:// URL scheme to connect:" -msgstr "SSH与svnserve结合很简单,客户端只需要使用svn+ssh://的URL模式来连接:" - -#. (screen) -#: ../source/book.xml:12912 -#, no-wrap -msgid "" -"\n" -"$ whoami\n" -"harry\n" -"\n" -"$ svn list svn+ssh://host.example.com/repos/project\n" -"harry@host.example.com's password: *****\n" -"\n" -"foo\n" -"bar\n" -"baz\n" -"…\n" -msgstr "" -"\n" -"$ whoami\n" -"harry\n" -"\n" -"$ svn list svn+ssh://host.example.com/repos/project\n" -"harry@host.example.com's password: *****\n" -"\n" -"foo\n" -"bar\n" -"baz\n" -"…\n" - -#. (para) -#: ../source/book.xml:12924 -#, fuzzy -msgid "In this example, the Subversion client is invoking a local ssh process, connecting to host.example.com, authenticating as the user harry, then spawning a private svnserve process on the remote machine running as the user harry. The svnserve command is being invoked in tunnel mode () and its network protocol is being tunneled over the encrypted connection by ssh, the tunnel-agent. svnserve is aware that it's running as the user harry, and if the client performs a commit, the authenticated username will be used as the author of the new revision." -msgstr "在这个例子里,Subversion客户端会调用一个ssh进程,连接到host.example.com,使用用户harry认证,然后会有一个svnserve私有进程以用户harry运行。svnserve是以管道模式调用的(),它的网络协议是通过ssh封装的,被管道代理的svnserve会知道程序是以用户harry运行的,如果客户执行一个提交,认证的用户名会作为版本的参数保存到新的修订本。" - -#. (para) -#: ../source/book.xml:12938 -#, fuzzy -msgid "The important thing to understand here is that the Subversion client is not connecting to a running svnserve daemon. This method of access doesn't require a daemon, nor does it notice one if present. It relies wholly on the ability of ssh to spawn a temporary svnserve process, which then terminates when the network connection is closed." -msgstr "这里要理解的最重要的事情是Subversion客户端是连接到运行中的svnserve守护进程,这种访问方法不需要一个运行的守护进程,也不需要在必要时唤醒一个,它依赖于ssh来发起一个svnserve进程,然后网络断开后终止进程。" - -#. (para) -#: ../source/book.xml:12946 -#, fuzzy -msgid "When using svn+ssh:// URLs to access a repository, remember that it's the ssh program prompting for authentication, and not the svn client program. That means there's no automatic password caching going on (see ). 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 svn+ssh:// URLs, however, users may be annoyed by ssh repeatedly asking for a password for every outbound connection. The solution is to use a separate SSH password-caching tool like ssh-agent on a Unix-like system, or pageant on Windows." -msgstr "当使用svn+ssh://的URL访问版本库时,记住是ssh提示请求认证,而svn客户端程序。这意味着密码不会有自动缓存(见),Subversion客户端通常会建立多个版本库的连接,但用户通常会因为密码缓存特性而没有注意到这一点,当使用svn+ssh://的URL时,用户会为ssh在每次建立连接时重复的询问密码感到讨厌,解决方案是用一个独立的SSH密码缓存工具,像类Unix系统的ssh-agent或者是Windows下的pageant。" - -#. (para) -#: ../source/book.xml:12973 -#, fuzzy -msgid "Note that using any sort of svnserve-enforced access control at all is a bit pointless; the user already has direct access to the repository database." -msgstr "请注意,使用svnserve的访问控制进行权限控制将会失去意义,因为用户已经直接访问到了版本库数据。" - -#. (para) -#: ../source/book.xml:12961 -#, fuzzy -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 file:// 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 .) But even in the case of tunneling, the svnserve.conf file can still be used to block access, by simply setting auth-access = read or auth-access = none. " -msgstr "当在一个管道上运行时,认证通常是基于操作系统对版本库数据库文件的访问控制,这同Harry直接通过file:///的URL直接访问版本库非常类似,如果有多个系统用户要直接访问版本库,你会希望将他们放到一个常见的组里,你应该小心的使用umasks。(确定要阅读)但是即使是在管道模式时,文件svnserve.conf还是可以阻止用户访问,如设置auth-access = readauth-access = none" - -#. (para) -#: ../source/book.xml:12982 -msgid "We don't actually recommend this, since RSH is notably less secure than SSH." -msgstr "我们实际上不支持这个,因为RSH在安全性上显著不如SSH。" - -#. (para) -#: ../source/book.xml:12978 -#, fuzzy -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 config file (see ). For example, suppose you want to use RSH instead of SSH. In the [tunnels] section of your config file, simply define it like this:" -msgstr "你会认为SSH管道的故事该结束了,但还不是,Subversion允许你在运行配置文件config(见)创建一个自定义的管道行为方式,举个例子,假定你希望使用RSH而不是SSH,在config文件的[tunnels]部分作如下定义:" - -#. (screen) -#: ../source/book.xml:12988 -#, no-wrap -msgid "" -"\n" -"[tunnels]\n" -"rsh = rsh\n" -msgstr "" -"\n" -"[tunnels]\n" -"rsh = rsh\n" - -#. (para) -#: ../source/book.xml:12992 -#, fuzzy -msgid "And now, you can use this new tunnel definition by using a URL scheme that matches the name of your new variable: svn+rsh://host/path. When using the new URL scheme, the Subversion client will actually be running the command rsh host svnserve -t behind the scenes. If you include a username in the URL (for example, svn+rsh://username@host/path) the client will also include that in its command (rsh username@host svnserve -t). But you can define new tunneling schemes to be much more clever than that:" -msgstr "现在你可以通过指定与定义匹配的URL模式来使用新的管道定义:svn+rsh://host/path。当使用新的URL模式时,Subversion客户端实际上会在后台运行rsh host svnserve -t这个命令,如果你在URL中包括一个用户名(例如,svn+rsh://username@host/path),客户端也会在自己的命令中包含这部分(rsh username@host svnserve -t),但是你可以定义比这个更加智能的新的管道模式:" - -#. (screen) -#: ../source/book.xml:13002 -#, no-wrap -msgid "" -"\n" -"[tunnels]\n" -"joessh = $JOESSH /opt/alternate/ssh -p 29934\n" -msgstr "" -"\n" -"[tunnels]\n" -"joessh = $JOESSH /opt/alternate/ssh -p 29934\n" - -#. (para) -#: ../source/book.xml:13006 -#, fuzzy -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 /opt/alternate/ssh) with specific options. In this case, accessing a svn+joessh:// URL would invoke the particular SSH binary with as arguments—useful if you want the tunnel program to connect to a non-standard port." -msgstr "这个例子里论证了一些事情,首先,它展现了如何让Subversion客户端启动一个特定的管道程序(这个在/opt/alternate/ssh),在这个例子里,使用svn+joessh://的URL会以参数调用特定的SSH程序—对连接到非标准端口的程序非常有用。" - -#. (para) -#: ../source/book.xml:13015 -#, fuzzy -msgid "Second, it shows how to define a custom environment variable that can override the name of the tunneling program. Setting the SVN_SSH 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 JOESSH environment variable, its value would override the entire value of the tunnel variable—$JOESSH would be executed instead of /opt/alternate/ssh -p 29934." -msgstr "第二点,它展示了怎样定义一个自定义的环境变量来覆盖管道程序中的名字,设置SVN_SSH环境变量是覆盖缺省的SSH管道的一种简便方法,但是如果你需要为多个服务器做出多个不同的覆盖,或许每一个都联系不同的端口或传递不同的SSH选项,你可以使用本例论述的机制。现在如果我们设置JOESSH环境变量,它的值会覆盖管道中的变量值—会执行$JOESSH而不是/opt/alternate/ssh -p 29934。" - -#. (title) -#: ../source/book.xml:13032 -msgid "SSH configuration tricks" -msgstr "SSH 配置技巧" - -#. (para) -#: ../source/book.xml:13034 -#, fuzzy -msgid "It's not only possible to control the way in which the client invokes ssh, but also to control the behavior of sshd on your server machine. In this section, we'll show how to control the exact svnserve command executed by sshd, as well as how to have multiple users share a single system account." -msgstr "不仅仅是可以控制客户端调用ssh方式,也可以控制服务器中的sshd的行为方式,在本小节,我们会展示怎样控制sshd执行svnserve,包括如何让多个用户分享同一个系统帐户。" - -#. (para) -#: ../source/book.xml:13046 -#, fuzzy -msgid "To begin, locate the home directory of the account you'll be using to launch svnserve. 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 authorized_keys file." -msgstr "作为开始,定位到你启动svnserve的帐号的主目录,确定这个账户已经安装了一套SSH公开/私有密钥对,用户可以通过公开密钥认证,因为所有如下的技巧围绕着使用SSHauthorized_keys文件,密码认证在这里不会工作。" - -#. (para) -#: ../source/book.xml:13053 -#, fuzzy -msgid "If it doesn't already exist, create the authorized_keys file (on Unix, typically ~/.ssh/authorized_keys). Each line in this file describes a public key that is allowed to connect. The lines are typically of the form:" -msgstr "如果这个文件还不存在,创建一个authorized_keys文件(在UNIX下通常是~/.ssh/authorized_keys),这个文件的每一行描述了一个允许连接的公钥,这些行通常是下面的形式:" - -#. (screen) -#: ../source/book.xml:13059 -#, no-wrap -msgid "" -"\n" -" ssh-dsa AAAABtce9euch… user@example.com\n" -msgstr "" -"\n" -" ssh-dsa AAAABtce9euch.... user@example.com\n" - -#. (para) -#: ../source/book.xml:13062 -#, fuzzy -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 command field:" -msgstr "第一个字段描述了密钥的类型,第二个字段是未加密的密钥本身,第三个字段是注释。然而,这是一个很少人知道的事实,可以使用一个command来处理整行:" - -#. (screen) -#: ../source/book.xml:13067 -#, no-wrap -msgid "" -"\n" -" command=\"program\" ssh-dsa AAAABtce9euch… user@example.com\n" -msgstr "" -"\n" -" command=\"program\" ssh-dsa AAAABtce9euch.... user@example.com\n" - -#. (para) -#: ../source/book.xml:13070 -#, fuzzy -msgid "When the command field is set, the SSH daemon will run the named program instead of the typical svnserve -t 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:" -msgstr "当command字段设置后,SSH守护进程运行命名的程序而不是通常Subversion客户端询问的svnserve -t。这为实施许多服务器端技巧开启了大门,在下面的例子里,我们简写了文件的这些行:" - -#. (screen) -#: ../source/book.xml:13076 -#, no-wrap -msgid "" -"\n" -" command=\"program\" TYPE KEY COMMENT\n" -msgstr "" -"\n" -" command=\"program\" TYPE KEY COMMENT\n" - -#. (title) -#: ../source/book.xml:13083 -msgid "Controlling the invoked command" -msgstr "控制调用的命令" - -#. (para) -#: ../source/book.xml:13085 -#, fuzzy -msgid "Because we can specify the executed server-side command, it's easy to name a specific svnserve binary to run and to pass it extra arguments:" -msgstr "因为我们可以指定服务器端执行的命令,我们很容易来选择运行一个特定的svnserve程序来并且传递给它额外的参数:" - -#. (screen) -#: ../source/book.xml:13088 -#, no-wrap -msgid "" -"\n" -" command=\"/path/to/svnserve -t -r /virtual/root\" TYPE KEY COMMENT\n" -msgstr "" -"\n" -" command=\"/path/to/svnserve -t -r /virtual/root\" TYPE KEY COMMENT\n" - -#. (para) -#: ../source/book.xml:13091 -#, fuzzy -msgid "In this example, /path/to/svnserve might be a custom wrapper script around svnserve which sets the umask (see ). It also shows how to anchor svnserve in a virtual root directory, just as one often does when running svnserve 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 svn+ssh:// URL." -msgstr "在这个例子里,/path/to/svnserve也许会是一个svnserve程序的包裹脚本,会来设置umask(见)。它也展示了怎样在虚拟根目录定位一个svnserve,就像我们经常在使用守护进程模式下运行svnserve一样。这样做不仅可以把访问限制在系统的一部分,也可以使用户不需要在svn+ssh://URL里输入绝对路径。" - -#. (para) -#: ../source/book.xml:13102 -#, fuzzy -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 authorized_users file, one per line, and use the option:" -msgstr "多个用户也可以共享同一个帐号,作为为每个用户创建系统帐户的替代,我们创建一个公开/私有密钥对,然后在authorized_users文件里放置各自的公钥,一个用户一行,使用选项:" - -#. (screen) -#: ../source/book.xml:13109 -#, no-wrap -msgid "" -"\n" -" command=\"svnserve -t --tunnel-user=harry\" TYPE1 KEY1 harry@example.com\n" -" command=\"svnserve -t --tunnel-user=sally\" TYPE2 KEY2 sally@example.com\n" -msgstr "" -"\n" -" command=\"svnserve -t --tunnel-user=harry\" TYPE1 KEY1 harry@example.com\n" -" command=\"svnserve -t --tunnel-user=sally\" TYPE2 KEY2 sally@example.com\n" - -#. (para) -#: ../source/book.xml:13113 -#, fuzzy -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 tells svnserve -t to assume that the named argument is the authenticated user. Without , it would appear as though all commits were coming from the one shared system account." -msgstr "这个例子允许Harry和Sally通过公钥认证连接同一个的账户,每个人自定义的命令将会执行。选项告诉svnserve -t命令采用命名的参数作为经过认证的用户,如果没有,所有的提交会作为共享的系统帐户提交。" - -#. (para) -#: ../source/book.xml:13122 -#, fuzzy -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 command value in authorized_keys. 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 command:" -msgstr "最后要小心:设定通过公钥共享账户进行用户访问时还会允许其它形式的SSH访问,即使你设置了authorized_keyscommand值,举个例子,用户仍然可以通过SSH得到shell访问,或者是通过服务器执行X11或者是端口转发。为了给用户尽可能少的访问权限,你或许希望在command命令之后指定一些限制选项:" - -#. (screen) -#: ../source/book.xml:13132 -#, no-wrap -msgid "" -"\n" -" command=\"svnserve -t --tunnel-user=harry\",no-port-forwarding,\\\n" -" no-agent-forwarding,no-X11-forwarding,no-pty \\\n" -" TYPE1 KEY1 harry@example.com\n" -msgstr "" -"\n" -" command=\"svnserve -t --tunnel-user=harry\",no-port-forwarding,\\\n" -" no-agent-forwarding,no-X11-forwarding,no-pty \\\n" -" TYPE1 KEY1 harry@example.com\n" - -#. (title) -#: ../source/book.xml:13145 -msgid "httpd, the Apache HTTP server" -msgstr "httpd,Apache 的 HTTP 服务器" - -#. (para) -#: ../source/book.xml:13160 -msgid "They really hate doing that." -msgstr "他们讨厌这样做。" - -#. (para) -#: ../source/book.xml:13147 -#, fuzzy -msgid "The Apache HTTP Server is a heavy duty network server that Subversion can leverage. Via a custom module, httpd makes Subversion repositories available to clients via the WebDAV/DeltaV protocol, which is an extension to HTTP 1.1 (see http://www.webdav.org/ 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. While an Apache-Subversion server has more features than svnserve, it's also a bit more difficult to set up. With flexibility often comes more complexity." -msgstr "Apache的HTTP服务器是一个Subversion可以利用的重型网络服务器,通过一个自定义模块,httpd可以让Subversion版本库通过WebDAV/DeltaV协议在客户端前可见,WebDAV/DeltaV协议是HTTP 1.1的扩展(见来查看详细信息)。这个协议利用了无处不在的HTTP协议是广域网的核心这一点,添加了写能力—更明确一点,版本化的写—能力。结果就是这样一个标准化的健壮的系统,作为Apache 2.0软件的一部分打包,被许多操作系统和第三方产品支持,网络管理员也不需要打开另一个自定义端口。 这样一个Apache-Subversion服务器具备了许多svnserve没有的特性,但是也有一点难于配置,灵活通常会带来复杂性。" - -#. (para) -#: ../source/book.xml:13164 -#, fuzzy -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 http://httpd.apache.org. For example, a general reference for the configuration directives is located at http://httpd.apache.org/docs-2.0/mod/directives.html." -msgstr "下面的讨论包括了对Apache配置指示的引用,给了一些使用这些指示的例子,详细地描述不在本章的范围之内,Apache小组维护了完美的文档,公开存放在他们的站点。例如,一个一般的配置参考位于。" - -#. (para) -#: ../source/book.xml:13171 -#, fuzzy -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 httpd.conf file are directives that specify the on-disk locations of the access and error logs generated by Apache (the CustomLog and ErrorLog 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." -msgstr "同样,当你修改你的Apache设置,很有可能会出现一些错误,如果你还不熟悉Apache的日志子系统,你一定需要认识到这一点。在你的文件httpd.conf里会指定Apache生成的访问和错误日志(CustomLogErrorLog指示)的磁盘位置。Subversion的mod_dav_svn使用Apache的错误日志接口,你可以浏览这个文件的内容查看信息来查找难于发现的问题根源。" - -#. (title) -#: ../source/book.xml:13185 -msgid "Why Apache 2?" -msgstr "为什么是 Apache 2?" - -#. (para) -#: ../source/book.xml:13187 -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." -msgstr "如果你系统管理员,很有可能是你已经运行了Apache服务器,并且有一些高级经验。写本文的时候,Apache 1.3是Apache最流行的版本,这个世界因为许多原因而放缓升级到2.X系列:如人们害怕改变,特别是像web服务器这种重要的变化,有些人需要一些在Apache 1.3 API下工作的插件模块,在等待2.X的版本。无论什么原因,许多人会在首次发现Subversion的Apache模块只是为Apache 2 API写的后开始担心。" - -#. (para) -#: ../source/book.xml:13198 -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:" -msgstr "对此问题的适当反应是:不需要担心,同时运行Apache 1.3和Apache 2非常简单,只需要安装到不同的位置,用Apache 2作为Subversion的专用服务器,并且不使用80端口,客户端可以访问版本库时在URL里指定端口:" - -#. (screen) -#: ../source/book.xml:13204 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://host.example.com:7382/repos/project\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout http://host.example.com:7382/repos/project\n" -"…\n" - -#. (title) -#: ../source/book.xml:13212 -msgid "Prerequisites" -msgstr "先决条件" - -#. (para) -#: ../source/book.xml:13214 -#, fuzzy -msgid "To network your repository over HTTP, you basically need four components, available in two packages. You'll need Apache httpd 2.0, the mod_dav DAV module that comes with it, Subversion, and the mod_dav_svn filesystem provider module distributed with Subversion. Once you have all of those components, the process of networking your repository is as simple as:" -msgstr "为了让你的版本库使用HTTP网络,你基本上需要两个包里的四个部分。你需要Apache httpd 2.0和包括的mod_dav DAV模块,Subversion和与之一同分发的mod_dav_svn文件系统提供者模块,如果你有了这些组件,网络化你的版本库将非常简单,如:" - -#. (para) -#: ../source/book.xml:13224 -msgid "getting httpd 2.0 up and running with the mod_dav module," -msgstr "配置好httpd 2.0,并且使用mod_dav启动," - -#. (para) -#: ../source/book.xml:13228 -msgid "installing the mod_dav_svn plugin to mod_dav, which uses Subversion's libraries to access the repository, and" -msgstr "为mod_dav安装mod_dav_svn插件,它会使用Subversion的库访问版本库,并且" - -#. (para) -#: ../source/book.xml:13233 -#, fuzzy -msgid "configuring your httpd.conf file to export (or expose) the repository." -msgstr "配置你的httpd.conf来输出(或者说暴露)版本库。" - -#. (para) -#: ../source/book.xml:13237 -#, fuzzy -msgid "You can accomplish the first two items either by compiling httpd 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 INSTALL file in the top level of the Subversion source code tree." -msgstr "你可以通过从源代码编译httpd和Subversion来完成前两个项目,也可以通过你的系统上的已经编译好的二进制包来安装。最新的使用Apache HTTP的Subversion的编译方法和Apache的配置方式可以看Subversion源代码树根目录的INSTALL文件。" - -#. (title) -#: ../source/book.xml:13249 -msgid "Basic Apache Configuration" -msgstr "基本的 Apache 配置" - -#. (para) -#: ../source/book.xml:13251 -#, fuzzy -msgid "Once you have all the necessary components installed on your system, all that remains is the configuration of Apache via its httpd.conf file. Instruct Apache to load the mod_dav_svn module using the LoadModule directive. This directive must precede any other Subversion-related configuration items. If your Apache was installed using the default layout, your mod_dav_svn module should have been installed in the modules subdirectory of the Apache install location (often /usr/local/apache2). The LoadModule directive has a simple syntax, mapping a named module to the location of a shared library on disk:" -msgstr "一旦你安装了必须的组件,剩下的工作就是在httpd.conf里配置Apache,使用LoadModule来加载mod_dav_svn模块,这个指示必须先与其它Subversion相关的其它配置出现,如果你的Apache使用缺省布局安装,你的mod_dav_svn模块一定在Apache安装目录(通常是在/usr/local/apache2)的modules子目录,LoadModule指示的语法很简单,影射一个名字到它的共享库的物理位置:" - -#. (screen) -#: ../source/book.xml:13265 -#, no-wrap -msgid "" -"\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" -msgstr "" -"\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" - -#. (para) -#: ../source/book.xml:13268 -#, fuzzy -msgid "Note that if mod_dav was compiled as a shared object (instead of statically linked directly to the httpd binary), you'll need a similar LoadModule statement for it, too. Be sure that it comes before the mod_dav_svn line:" -msgstr "注意,如果mod_dav是作为共享对象编译(而不是静态链接到httpd程序),你需要为它使用使用LoadModule语句,一定确定它在mod_dav_svn之前:" - -#. (screen) -#: ../source/book.xml:13273 -#, no-wrap -msgid "" -"\n" -"LoadModule dav_module modules/mod_dav.so\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" -msgstr "" -"\n" -"LoadModule dav_module modules/mod_dav.so\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" - -#. (para) -#: ../source/book.xml:13277 -#, fuzzy -msgid "At a later location in your configuration file, you now need to tell Apache where you keep your Subversion repository (or repositories). The Location 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 Location 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 /repos/ to a DAV provider whose repository is located at /var/svn/repository using the following httpd.conf syntax:" -msgstr "在你的配置文件后面的位置,你需要告诉Apache你在什么地方保存Subversion版本库(也许是多个),位置指示有一个很像XML的符号,开始于一个开始标签,以一个结束标签结束,配合中间许多的其它配置。Location指示的目的是告诉Apache在特定的URL以及子URL下需要特殊的处理,如果是为Subversion准备的,你希望可以通过告诉Apache特定URL是指向版本化的资源,从而把支持转交给DAV层,你可以告诉Apache将所有路径部分(URL中服务器名称和端口之后的部分)以/repos/开头的URL交由DAV服务提供者处理。一个DAV服务提供者的版本库位于/absolute/path/to/repository,可以使用如下的httpd.conf语法:" - -#. (screen) -#: ../source/book.xml:13295 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /var/svn/repository\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /absolute/path/to/repository\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13301 -#, fuzzy -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 SVNParentPath directive, to indicate that common parent directory. For example, if you know you will be creating multiple Subversion repositories in a directory /var/svn that would be accessed via URLs like http://my.server.com/svn/repos1, http://my.server.com/svn/repos2, and so on, you could use the httpd.conf configuration syntax in the following example:" -msgstr "如果你计划支持多个具备相同父目录的Subversion版本库,你有另外的选择,SVNParentPath指示,来表示共同的父目录。举个例子,如果你知道会在/usr/local/svn下创建多个Subversion版本库,并且通过类似http://my.server.com/svn/repos1http://my.server.com/svn/repos2的URL访问,你可以用后面例子中的httpd.conf配置语法:" - -#. (screen) -#: ../source/book.xml:13312 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -"\n" -" # any \"/svn/foo\" URL will map to a repository /var/svn/foo\n" -" SVNParentPath /var/svn\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -"\n" -" # any \"/svn/foo\" URL will map to a repository /usr/local/svn/foo\n" -" SVNParentPath /usr/local/svn\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13320 -#, fuzzy -msgid "Using the previous syntax, Apache will delegate the handling of all URLs whose path portions begin with /svn/ to the Subversion DAV provider, which will then assume that any items in the directory specified by the SVNParentPath directive are actually Subversion repositories. This is a particularly convenient syntax in that, unlike the use of the SVNPath directive, you don't have to restart Apache in order to create and network new repositories." -msgstr "使用上面的语法,Apache会代理所有URL路径部分为/svn/的请求到Subversion的DAV提供者,Subversion会认为SVNParentPath指定的目录下的所有项目是真实的Subversion版本库,这通常是一个便利的语法,不像是用SVNPath指示,我们在此不必为创建新的版本库而重启Apache。" - -#. (para) -#: ../source/book.xml:13330 -#, fuzzy -msgid "Be sure that when you define your new Location, it doesn't overlap with other exported Locations. For example, if your main DocumentRoot is exported to /www, do not export a Subversion repository in <Location /www/repos>. If a request comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a file repos/foo.c in the DocumentRoot, or whether to delegate mod_dav_svn to return foo.c from the Subversion repository. The result is often an error from the server of the form 301 Moved Permanently." -msgstr "请确定当你定义新的Location,不会与其它输出的位置重叠。例如你的主要DocumentRoot/www,不要把Subversion版本库输出到<Location /www/repos>,如果一个请求的URI是/www/repos/foo.c,Apache不知道是直接到repos/foo.c访问这个文件还是让mod_dav_svn代理从Subversion版本库返回foo.c。" - -#. (title) -#: ../source/book.xml:13346 -msgid "Server Names and the COPY Request" -msgstr "服务器名称和复制请求" - -#. (para) -#: ../source/book.xml:13348 -#, fuzzy -msgid "Subversion makes use of the COPY 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 ServerName directive in httpd.conf to accomplish this." -msgstr "Subversion利用COPY请求类型来执行服务器端的文件和目录拷贝,作为一个健全的Apache模块的一部分,拷贝源和拷贝的目标通常坐落在同一个机器上,为了满足这个需求,你或许需要告诉mod_dav服务器主机的名称,通常你可以使用httpd.confServerName指示来完成此目的。" - -#. (screen) -#: ../source/book.xml:13357 -#, no-wrap -msgid "" -"\n" -"ServerName svn.example.com\n" -msgstr "" -"\n" -"ServerName svn.example.com\n" - -#. (para) -#: ../source/book.xml:13360 -#, fuzzy -msgid "If you are using Apache's virtual hosting support via the NameVirtualHost directive, you may need to use the ServerAlias directive to specify additional names that your server is known by. Again, refer to the Apache documentation for full details." -msgstr "如果你通过NameVirtualHost指示使用Apache的虚拟主机,你或许需要ServerAlias指示来指定额外的名称,再说一次,可以查看Apache文档的来得到更多细节。" - -#. (para) -#: ../source/book.xml:13367 -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." -msgstr "在本阶段,你一定要考虑访问权限问题,如果你已经作为普通的web服务器运行过Apache,你一定有了一些内容—网页、脚本和其他。这些项目已经配置了许多在Apache下可以工作的访问许可,或者更准确一点,允许Apache与这些文件一起工作。Apache当作为Subversion服务器运行时,同样需要正确的访问许可来读写你的Subversion版本库。" - -#. (para) -#: ../source/book.xml:13377 -#, fuzzy -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 User and Group directives in httpd.conf 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." -msgstr "你会需要检验权限系统的设置满足Subversion的需求,同时不会把以前的页面和脚本搞乱。这或许意味着修改Subversion的访问许可来配合Apache服务器已经使用的工具,或者可能意味着需要使用httpd.confUserGroup指示来指定Apache作为运行的用户和Subversion版本库的组。并不是只有一条正确的方式来设置许可,每个管理员都有不同的原因来以特定的方式操作,只需要意识到许可关联的问题经常在为Apache配置Subversion版本库的过程中被疏忽。" - -#. (title) -#: ../source/book.xml:13396 -msgid "Authentication Options" -msgstr "认证选项" - -#. (para) -#: ../source/book.xml:13398 -#, fuzzy -msgid "At this point, if you configured httpd.conf to contain something like" -msgstr "此时,如果你配置的httpd.conf保存如下的内容" - -#. (screen) -#: ../source/book.xml:13400 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13406 -#, fuzzy -msgid "…then your repository is anonymously accessible to the world. Until you configure some authentication and authorization policies, the Subversion repositories you make available via the Location directive will be generally accessible to everyone. In other words," -msgstr "这样你的版本库对全世界是可以匿名访问的,直到你配置了一些认证授权政策,你通过Location指示来使Subversion版本库可以被任何人访问,换句话说," - -#. (para) -#: ../source/book.xml:13414 -#, fuzzy -msgid "anyone can use their Subversion client to check out a working copy of a repository URL (or any of its subdirectories)," -msgstr "任何人可以使用Subversion客户端来从版本库URL取出一个工作拷贝(或者是它的子目录)," - -#. (para) -#: ../source/book.xml:13419 -msgid "anyone can interactively browse the repository's latest revision simply by pointing their web browser to the repository URL, and" -msgstr "任何人可以在浏览器输入版本库URL交互浏览的方式来查看版本库的最新修订版本,并且" - -#. (para) -#: ../source/book.xml:13424 -msgid "anyone can commit to the repository." -msgstr "任何人可以提交到版本库。" - -#. (para) -#: ../source/book.xml:13427 -#, fuzzy -msgid "Of course, you might have already set up a pre-commit hook script to prevent commits (see ). 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." -msgstr "当然,你也许已经设置了pre-commit钩子来防止提交(见),但是就像你读到的,也可以使用Apache内置的方法来限制访问。" - -#. (title) -#: ../source/book.xml:13436 -msgid "Basic HTTP Authentication" -msgstr "基本 HTTP 认证" - -#. (para) -#: ../source/book.xml:13438 -#, fuzzy -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 htpasswd 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." -msgstr "最简单的客户端认证方式是通过HTTP基本认证机制,简单的使用用户名和密码来验证一个用户所自称的身份,Apache提供了一个htpasswd工具来管理可接受的用户名和密码,这些就是你希望赋予Subversion特别权限的用户,让我们给Sally和Harry赋予提交权限,首先,我们需要添加他们到密码文件。" - -#. (screen) -#: ../source/book.xml:13446 -#, no-wrap -msgid "" -"\n" -"$ ### First time: use -c to create the file\n" -"$ ### Use -m to use MD5 encryption of the password, which is more secure\n" -"$ htpasswd -cm /etc/svn-auth-file harry\n" -"New password: *****\n" -"Re-type new password: *****\n" -"Adding password for user harry\n" -"$ htpasswd -m /etc/svn-auth-file sally\n" -"New password: *******\n" -"Re-type new password: *******\n" -"Adding password for user sally\n" -"$\n" -msgstr "" -"\n" -"$ ### First time: use -c to create the file\n" -"$ ### Use -m to use MD5 encryption of the password, which is more secure\n" -"$ htpasswd -cm /etc/svn-auth-file harry\n" -"New password: *****\n" -"Re-type new password: *****\n" -"Adding password for user harry\n" -"$ htpasswd -m /etc/svn-auth-file sally\n" -"New password: *******\n" -"Re-type new password: *******\n" -"Adding password for user sally\n" -"$\n" - -#. (para) -#: ../source/book.xml:13459 -#, fuzzy -msgid "Next, you need to add some more httpd.conf directives inside your Location block to tell Apache what to do with your new password file. The AuthType directive specifies the type of authentication system to use. In this case, we want to specify the Basic authentication system. AuthName 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 AuthUserFile directive to specify the location of the password file you created using htpasswd." -msgstr "下一步,你需要在httpd.confLocation区里添加一些指示来告诉Apache如何来使用这些密码文件,AuthType指示指定系统使用的认证类型,这种情况下,我们需要指定Basic认证系统,AuthName是你提供给认证域一个任意名称,大多数浏览器会在向用户询问名称和密码的弹出窗口里显示这个名称,最终,使用AuthUserFile指示来指定使用htpasswd创建的密码文件的位置。" - -#. (para) -#: ../source/book.xml:13473 -#, fuzzy -msgid "After adding these three directives, your <Location> block should look something like this:" -msgstr "添加完这三个指示,你的<Location>区块一定像这个样子:" - -#. (screen) -#: ../source/book.xml:13476 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /etc/svn-auth-file\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /etc/svn-auth-file\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13485 -#, fuzzy -msgid "This <Location> 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 which 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 Require valid-user tells Apache that all requests require an authenticated user:" -msgstr "这个<Location>区块还没有结束,还不能做任何有用的事情,它只是告诉Apache当需要授权时,要去向Subversion客户端索要用户名和密码。我们这里遗漏的,是一些告诉Apache什么样客户端需要授权的指示。哪里需要授权,Apache就会在哪里要求认证,最简单的方式是保护所有的请求,添加Require valid-user来告诉Apache任何请求需要认证的用户:" - -#. (screen) -#: ../source/book.xml:13497 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /etc/svn-auth-file\n" -" Require valid-user\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /etc/svn-auth-file\n" -" Require valid-user\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13507 -#, fuzzy -msgid "Be sure to read the next section () for more detail on the Require directive and other ways to set authorization policies." -msgstr "一定要阅读后面的部分()来得到Require的细节,和授权政策的其他设置方法。" - -#. (para) -#: ../source/book.xml:13518 -#, fuzzy -msgid "While self-signed server certificates are still vulnerable to a man in the middle attack, such an attack is much more difficult for a casual observer to pull off, compared to sniffing unprotected passwords." -msgstr "当使用自签名的服务器时仍会遭受中间人攻击,但是与偷取未保护的密码相比,这样的攻击比一个偶然的获取要艰难许多。" - -#. (para) -#: ../source/book.xml:13510 -#, fuzzy -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 https:// instead of http://; at a bare minimum, you can configure Apache to use a self-signed server certificate. Consult Apache's documentation (and OpenSSL documentation) about how to do that." -msgstr "需要警惕:HTTP基本认证的密码是用明文传输,因此非常不可靠的,如果你担心密码偷窥,最好是使用某种SSL加密,所以客户端认证使用https://而不是http://,为了方便,你可以配置Apache为自签名认证。 参考Apache的文档(和OpenSSL文档)来查看怎样做。" - -#. (title) -#: ../source/book.xml:13529 -msgid "SSL Certificate Management" -msgstr "SSL 证书管理" - -#. (para) -#: ../source/book.xml:13531 -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 sniffing their network traffic. SSL makes that kind of unwanted attention less likely to result in sensitive data leaks." -msgstr "商业应用需要越过公司防火墙的版本库访问,防火墙需要小心的考虑非认证用户吸取他们的网络流量的情况,SSL让那种形式的关注更不容易导致敏感数据泄露。" - -#. (para) -#: ../source/book.xml:13537 -#, fuzzy -msgid "If a Subversion client is compiled to use OpenSSL, then it gains the ability to speak to an Apache server via https:// 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." -msgstr "如果Subversion使用OpenSSL编译,它就会具备与Subversion服务器使用https://的URL通讯的能力,Subversion客户端使用的Neon库不仅仅可以用来验证服务器证书,也可以必要时提供客户端证书,如果客户端和服务器交换了SSL证书并且成功地互相认证,所有剩下的交流都会通过一个会话关键字加密。" - -#. (para) -#: ../source/book.xml:13545 -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 can be covered here is how to manage server and client certificates from an ordinary Subversion client." -msgstr "怎样产生客户端和服务器端证书以及怎样使用它们已经超出了本书的范围,许多书籍,包括Apache自己的文档,描述这个任务,现在我们可以覆盖的是普通的客户端怎样来管理服务器与客户端证书。" - -#. (para) -#: ../source/book.xml:13552 -#, fuzzy -msgid "When speaking to Apache via https://, a Subversion client can receive two different types of information:" -msgstr "当通过https://与Apache通讯时,一个Subversion客户端可以接收两种类型的信息:" - -#. (para) -#: ../source/book.xml:13557 -msgid "a server certificate" -msgstr "一个服务器证书" - -#. (para) -#: ../source/book.xml:13560 -msgid "a demand for a client certificate" -msgstr "一个客户端证书的要求" - -#. (para) -#: ../source/book.xml:13563 -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 certifying authority (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:" -msgstr "如果客户端接收了一个服务器证书,它需要去验证它是可以相信的:这个服务器是它自称的那一个吗?OpenSSL库会去检验服务器证书的签名人或者是核证机构(CA)。如果OpenSSL不可以自动信任这个CA,或者是一些其他的问题(如证书过期或者是主机名不匹配),Subversion命令行客户端会询问你是否愿意仍然信任这个证书:" - -#. (screen) -#: ../source/book.xml:13573 -#, no-wrap -msgid "" -"\n" -"$ svn list https://host.example.com/repos/project\n" -"\n" -"Error validating server certificate for 'https://host.example.com:443':\n" -" - The certificate is not issued by a trusted authority. Use the\n" -" fingerprint to validate the certificate manually!\n" -"Certificate information:\n" -" - Hostname: host.example.com\n" -" - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT\n" -" - Issuer: CA, example.com, Sometown, California, US\n" -" - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b\n" -"\n" -"(R)eject, accept (t)emporarily or accept (p)ermanently?\n" -msgstr "" -"\n" -"$ svn list https://host.example.com/repos/project\n" -"\n" -"Error validating server certificate for 'https://host.example.com:443':\n" -" - The certificate is not issued by a trusted authority. Use the\n" -" fingerprint to validate the certificate manually!\n" -"Certificate information:\n" -" - Hostname: host.example.com\n" -" - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT\n" -" - Issuer: CA, example.com, Sometown, California, US\n" -" - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b\n" -"\n" -"(R)eject, accept (t)emporarily or accept (p)ermanently?\n" - -#. (para) -#: ../source/book.xml:13587 -#, fuzzy -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 auth/ area in just the same way your username and password are cached (see ). If cached, Subversion will automatically trust this certificate in future negotiations." -msgstr "这个对话看起来很熟悉,这是你会在web浏览器(另一种HTTP客户端,就像Subversion)经常看到的问题,如果你选择(p)ermanent选项,服务器证书会存放在你存放那个用户名和密码缓存(见。)的私有运行区auth/中,缓存后,Subversion会自动记住在以后的交流中信任这个证书。" - -#. (para) -#: ../source/book.xml:13596 -#, fuzzy -msgid "Your run-time servers 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 ssl-authority-files variable to a semicolon-separated list of PEM-encoded CA certificates:" -msgstr "你的运行中servers文件也会给你能力可以让Subversion客户端自动信任特定的CA,包括全局的或是每主机为基础的,只需要设置ssl-authority-files为一组逗号隔开的PEM加密的CA证书列表:" - -#. (screen) -#: ../source/book.xml:13602 -#, no-wrap -msgid "" -"\n" -"[global]\n" -"ssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem\n" -msgstr "" -"\n" -"[global]\n" -"ssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem\n" - -#. (para) -#: ../source/book.xml:13606 -#, fuzzy -msgid "Many OpenSSL installations also have a pre-defined set of default CAs that are nearly universally trusted. To make the Subversion client automatically trust these standard authorities, set the ssl-trust-default-ca variable to true." -msgstr "许多OpenSSL安装包括一些预先定义好的可以普遍信任的缺省的CA,为了让Subversion客户端自动信任这些标准权威,设置ssl-trust-default-catrue。" - -#. (para) -#: ../source/book.xml:13612 -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:" -msgstr "当与Apache通话时,Subversion客户端也会收到一个证书的要求,Apache是询问客户端来证明自己的身份:这个客户端是否是他所说的那一个?如果一切正常,Subversion客户端会发送回一个通过Apache信任的CA签名的私有证书,一个客户端证书通常会以加密方式存放在磁盘,使用本地密码保护,当Subversion收到这个要求,它会询问你证书的路径和保护用的密码:" - -#. (screen) -#: ../source/book.xml:13622 -#, no-wrap -msgid "" -"\n" -"$ svn list https://host.example.com/repos/project\n" -"\n" -"Authentication realm: https://host.example.com:443\n" -"Client certificate filename: /path/to/my/cert.p12\n" -"Passphrase for '/path/to/my/cert.p12': ********\n" -"…\n" -msgstr "" -"\n" -"$ svn list https://host.example.com/repos/project\n" -"\n" -"Authentication realm: https://host.example.com:443\n" -"Client certificate filename: /path/to/my/cert.p12\n" -"Passphrase for '/path/to/my/cert.p12': ********\n" -"…\n" - -#. (para) -#: ../source/book.xml:13630 -msgid "Notice that the client certificate is a p12 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." -msgstr "注意这个客户端证书是一个p12文件,为了让Subversion使用客户端证书,它必须是运输标准的PKCS#12格式,大多数浏览器可以导入和导出这种格式的证书,另一个选择是用OpenSSL命令行工具来转化存在的证书为PKCS#12格式。" - -#. (para) -#: ../source/book.xml:13637 -#, fuzzy -msgid "Again, the runtime servers file allows you to automate this challenge on a per-host basis. Either or both pieces of information can be described in runtime variables:" -msgstr "再次,运行中servers文件允许你为每个主机自动响应这种要求,单个或两条信息可以用运行参数来描述:" - -#. (screen) -#: ../source/book.xml:13641 -#, no-wrap -msgid "" -"\n" -"[groups]\n" -"examplehost = host.example.com\n" -"\n" -"[examplehost]\n" -"ssl-client-cert-file = /path/to/my/cert.p12\n" -"ssl-client-cert-password = somepassword\n" -msgstr "" -"\n" -"[groups]\n" -"examplehost = host.example.com\n" -"\n" -"[examplehost]\n" -"ssl-client-cert-file = /path/to/my/cert.p12\n" -"ssl-client-cert-password = somepassword\n" - -#. (para) -#: ../source/book.xml:13654 -#, fuzzy -msgid "More security-conscious folk might not want to store the client certificate password in the runtime servers file." -msgstr "更多有安全意识的人不会希望在运行中servers文件保存客户端证书密码。" - -#. (para) -#: ../source/book.xml:13649 -#, fuzzy -msgid "Once you've set the ssl-client-cert-file and ssl-client-cert-password variables, the Subversion client can automatically respond to a client certificate challenge without prompting you. " -msgstr "一旦你设置了ssl-client-cert-filessl-client-cert-password参数,Subversion客户端可以自动响应客户端证书请求而不会打扰你。" - -#. (title) -#: ../source/book.xml:13663 -msgid "Authorization Options" -msgstr "授权选项" - -#. (para) -#: ../source/book.xml:13665 -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." -msgstr "此刻,你已经配置了认证,但是没有配置授权,Apache可以要求用户认证并且确定身份,但是并没有说明这个身份的怎样允许和限制,这个部分描述了两种控制访问版本库的策略。" - -#. (title) -#: ../source/book.xml:13674 -msgid "Blanket Access Control" -msgstr "整体访问控制" - -#. (para) -#: ../source/book.xml:13676 -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." -msgstr "最简单的访问控制形式是授权特定用户为只读版本库访问或者是读/写访问版本库。" - -#. (para) -#: ../source/book.xml:13679 -#, fuzzy -msgid "You can restrict access on all repository operations by adding the Require valid-user directive to your <Location> block. Using our previous example, this would mean that only clients that claimed to be either harry or sally, and provided the correct password for their respective username, would be allowed to do anything with the Subversion repository:" -msgstr "你可以通过在<Location>区块添加Require valid-user指示来限制所有的版本库操作,使用我们前面的例子,这意味着只有客户端只可以是harry或者sally,而且他们必须提供正确的用户名及对应密码,这样允许对Subversion版本库做任何事:" - -#. (screen) -#: ../source/book.xml:13687 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"\n" -" # only authenticated users may access the repository\n" -" Require valid-user\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"\n" -" # only authenticated users may access the repository\n" -" Require valid-user\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13701 -#, fuzzy -msgid "Sometimes you don't need to run such a tight ship. For example, Subversion's own source code repository at http://svn.collab.net/repos/svn 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 Limit and LimitExcept configuration directives. Like the Location directive, these blocks have starting and ending tags, and you would nest them inside your <Location> block." -msgstr "有时候,你不需要这样严密,举个例子,Subversion自己在的源代码允许全世界的人执行版本库的只读操作(例如检出我们的工作拷贝和使用浏览器浏览版本库),但是限定只有认证用户可以执行写操作。为了执行特定的限制,你可以使用LimitLimitExcept配置指示,就像Location指示,这个区块有开始和结束标签,你需要在<Location>中添加这个指示。" - -#. (para) -#: ../source/book.xml:13714 -#, fuzzy -msgid "The parameters present on the Limit and LimitExcept 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 LimitExcept directive, passing the GET, PROPFIND, OPTIONS, and REPORT request type parameters. Then the previously mentioned Require valid-user directive would be placed inside the <LimitExcept> block instead of just inside the <Location> block." -msgstr "在LimitLimitExcept中使用的参数是可以被这个区块影响的HTTP请求类型,举个例子,如果你希望禁止所有的版本库访问,只是保留当前支持的只读操作,你可以使用LimitExcept指示,并且使用GETPROPFINDOPTIONSREPORT请求类型参数,然后前面提到过的Require valid-user指示将会在<LimitExcept>区块中而不是在<Location>区块。" - -#. (screen) -#: ../source/book.xml:13727 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"\n" -" # For any operations other than these, require an authenticated user.\n" -" <LimitExcept GET PROPFIND OPTIONS REPORT>\n" -" Require valid-user\n" -" </LimitExcept>\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"\n" -" # For any operations other than these, require an authenticated user.\n" -" <LimitExcept GET PROPFIND OPTIONS REPORT>\n" -" Require valid-user\n" -" </LimitExcept>\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:13743 -#, fuzzy -msgid "These are only a few simple examples. For more in-depth information about Apache access control and the Require directive, take a look at the Security section of the Apache documentation's tutorials collection at http://httpd.apache.org/docs-2.0/misc/tutorials.html." -msgstr "这里只是一些简单的例子,想看关于Apache访问控制Require指示的更深入信息,可以查看Apache文档中的教程集中的Security部分。" - -#. (title) -#: ../source/book.xml:13752 -msgid "Per-Directory Access Control" -msgstr "每目录访问控制" - -#. (para) -#: ../source/book.xml:13754 -#, fuzzy -msgid "It's possible to set up finer-grained permissions using a second Apache httpd module, mod_authz_svn. This module grabs the various opaque URLs passing from client to server, asks mod_dav_svn to decode them, and then possibly vetoes requests based on access policies defined in a configuration file." -msgstr "也可以使用Apache的httpd模块mod_authz_svn更加细致的设置访问权限,这个模块收集客户端传递过来的不同的晦涩的URL信息,询问mod_dav_svn来解码,然后根据在配置文件定义的访问政策来裁决请求。" - -#. (para) -#: ../source/book.xml:13761 -#, fuzzy -msgid "If you've built Subversion from source code, mod_authz_svn is automatically built and installed alongside mod_dav_svn. Many binary distributions install it automatically as well. To verify that it's installed correctly, make sure it comes right after mod_dav_svn's LoadModule directive in httpd.conf:" -msgstr "如果你从源代码创建Subversion,mod_authz_svn会自动附加到mod_dav_svn,许多二进制分发版本也会自动安装,为了验证它是安装正确,确定它是在httpd.confLoadModule指示中的mod_dav_svn后面:" - -#. (screen) -#: ../source/book.xml:13769 -#, no-wrap -msgid "" -"\n" -"LoadModule dav_module modules/mod_dav.so\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" -"LoadModule authz_svn_module modules/mod_authz_svn.so\n" -msgstr "" -"\n" -"LoadModule dav_module modules/mod_dav.so\n" -"LoadModule dav_svn_module modules/mod_dav_svn.so\n" -"LoadModule authz_svn_module modules/mod_authz_svn.so\n" - -#. (para) -#: ../source/book.xml:13774 -#, fuzzy -msgid "To activate this module, you need to configure your Location block to use the AuthzSVNAccessFile 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.)" -msgstr "为了激活这个模块,你需要配置你的Location区块的AuthzSVNAccessFile指示,指定保存路径中的版本库访问政策的文件。(一会儿我们将会讨论这个文件的格式。)" - -#. (para) -#: ../source/book.xml:13780 -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.)" -msgstr "Apache非常的灵活,你可以从三种模式里选择一种来配置你的区块,作为开始,你选择一种基本的配置模式。(下面的例子非常简单;见Apache自己的文档中的认证和授权选项来查看更多的细节。)" - -#. (para) -#: ../source/book.xml:13786 -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 anonymous." -msgstr "最简单的区块是允许任何人可以访问,在这个场景里,Apache决不会发送认证请求,所有的用户作为匿名对待。" - -#. (title) -#: ../source/book.xml:13792 -msgid "A sample configuration for anonymous access." -msgstr "匿名访问的配置实例。" - -#. (programlisting) -#: ../source/book.xml:13794 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"</Location>\n" -" " -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"</Location>\n" -" " - -#. (para) -#: ../source/book.xml:13804 -#, fuzzy -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 Require valid-user directive, and defines a means to authenticate." -msgstr "在另一个极端,你可以配置为拒绝所有人的认证,所有客户端必须提供证明自己身份的证书,你通过Require valid-user指示来阻止无条件的认证,并且定义一种认证的手段。" - -#. (title) -#: ../source/book.xml:13812 -msgid "A sample configuration for authenticated access." -msgstr "一个认证访问的配置实例。" - -#. (programlisting) -#: ../source/book.xml:13814 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"\n" -" # only authenticated users may access the repository\n" -" Require valid-user\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"</Location>\n" -" " -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"\n" -" # only authenticated users may access the repository\n" -" Require valid-user\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"</Location>\n" -" " - -#. (para) -#: ../source/book.xml:13832 -#, fuzzy -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 Satisfy Any and Require valid-user directives together." -msgstr "第三种流行的模式是允许认证和匿名用户的组合,举个例子,许多管理员希望允许匿名用户读取特定的版本库路径,但希望只有认证用户可以读(或者写)更多敏感的区域,在这个设置里,所有的用户开始时用匿名用户访问版本库,如果你的访问控制策略在任何时候要求一个真实的用户名,Apache将会要求认证客户端,为­¤,你可以同时使用Satisfy AnyRequire valid-user指示。" - -#. (title) -#: ../source/book.xml:13845 -msgid "A sample configuration for mixed authenticated/anonymous access." -msgstr "一个混合认证/匿名访问的配置实例。" - -#. (programlisting) -#: ../source/book.xml:13848 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"\n" -" # try anonymous access first, resort to real\n" -" # authentication if necessary.\n" -" Satisfy Any\n" -" Require valid-user\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"</Location>\n" -" " -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" # our access control policy\n" -" AuthzSVNAccessFile /path/to/access/file\n" -"\n" -" # try anonymous access first, resort to real\n" -" # authentication if necessary.\n" -" Satisfy Any\n" -" Require valid-user\n" -"\n" -" # how to authenticate a user\n" -" AuthType Basic\n" -" AuthName \"Subversion repository\"\n" -" AuthUserFile /path/to/users/file\n" -"</Location>\n" -" " - -#. (para) -#: ../source/book.xml:13868 -#, fuzzy -msgid "Once you've settled on one of these three basic httpd.conf templates, you need to create your file containing access rules for particular paths within the repository. This is described in ." -msgstr "一旦你已经设置了httpd.conf模版之一,你需要在对应的路径创建包含访问规则的文件,在中有描述。" - -#. (title) -#: ../source/book.xml:13877 -msgid "Disabling Path-based Checks" -msgstr "禁用基于路径的检查" - -#. (para) -#: ../source/book.xml:13879 -#, fuzzy -msgid "The mod_dav_svn module goes through a lot of work to make sure that data you've marked unreadable doesn't get accidentally leaked. This means that it needs to closely monitor all of the paths and file-contents returned by commands like svn checkout or svn update 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 svn cat -r OLD foo.c 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." -msgstr "mod_dav_svn模块做了许多工作来确定你标记为不可读的数据不会因意外而泄露,这意味着需要紧密监控通过svn checkout或是svn update返回的路径和文件内容,如果这些命令遇到一些根据认证策略不是可读的路径,这个路径通常会被一起忽略,在历史或者重命名操作时—例如运行一个类似svn cat -r OLD foo.c的命令来操作一个很久以前改过名字的文件 — 如果一个对象的以前的名字检测到是只读的,重命令追踪就会终止。" - -#. (para) -#: ../source/book.xml:13893 -#, fuzzy -msgid "All of this path-checking can sometimes be quite expensive, especially in the case of svn log. 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), 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 mod_authz_svn at all, the mod_dav_svn module is still asking Apache httpd to run authorization checks on every path. The mod_dav_svn module has no idea what authorization modules have been installed, so all it can do is ask Apache to invoke whatever might be present." -msgstr "所有的路径检查在有时会非常昂贵,特别是svn log的情况。当检索一列修订版本时,服务器会查看所有修订版本修改的路径,并且检查可读性,如果发现了一个不可读路径,它会从修订版本的修改路径中忽略(通常可以使用选项查看),并且整个的日志信息会被禁止,不必多说,这种影响大量文件修订版本的操作会非常耗时。这是安全的代价:即使你并没有配置mod_authz_svn模块,mod_dav_svn还是会询问httpd来对所有路径运行认证检查,mod_dav_svn模块没有办法知道那个认证模块被安装,所以只能要求Apache调用时提供的内容。" - -#. (para) -#: ../source/book.xml:13911 -#, fuzzy -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 mod_authz_svn or similar module), then you can disable all of this path-checking. In your httpd.conf file, use the SVNPathAuthz directive:" -msgstr "在另一方面,也有一个安全舱门允许你用安全特性来交换速度,如果你不是坚持要求有每目录授权(如不使用 mod_authz_svn和类似的模块),你就可以关闭所有的路径检查,在你的httpd.conf文件,使用SVNPathAuthz指示:" - -#. (title) -#: ../source/book.xml:13921 -msgid "Disabling path checks altogether" -msgstr "禁用所有的路径检查" - -#. (programlisting) -#: ../source/book.xml:13923 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -"\n" -" SVNPathAuthz off\n" -"</Location>\n" -" " -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -"\n" -" SVNPathAuthz off\n" -"</Location>\n" -" " - -#. (para) -#: ../source/book.xml:13932 -#, fuzzy -msgid "The SVNPathAuthz directive is on by default. When set off, all path-based authorization checking is disabled; mod_dav_svn stops invoking authorization checks on every path it discovers." -msgstr "SVNPathAuthz指示缺省是on,当设置为off时,所有的路径为基础的授权都会关闭;mod_dav_svn停止对每个目录调用授权检查。" - -#. (title) -#: ../source/book.xml:13942 -msgid "Extra Goodies" -msgstr "额外的糖果" - -#. (para) -#: ../source/book.xml:13944 -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." -msgstr "我们已经覆盖了关于认证和授权的Apache和mod_dav_svn的大多数选项,但是Apache还提供了许多很好的特性。" - -#. (title) -#: ../source/book.xml:13950 -msgid "Repository Browsing" -msgstr "版本库浏览" - -#. (para) -#: ../source/book.xml:13952 -#, fuzzy -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 GET 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." -msgstr "使用Apache/WebDAV配置Subversion版本库时一个非常有用的好处是可以用普通的浏览器察看最新的版本库文件,因为Subversion使用URL来鉴别版本库版本化的资源,版本库使用的HTTP为基础的URL也可以直接输入到Web浏览器中,你的浏览器会发送一个GET请求到URL,根据访问的URL是指向一个版本化的目录还是文件,mod_dav_svn会负责列出目录列表或者是文件内容。" - -#. (para) -#: ../source/book.xml:13963 -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." -msgstr "因为URL不能确定你所希望看到的资源的版本,mod_dav_svn会一直返回最新的版本,这样会有一些美妙的副作用,你可以直接把Subversion的URL传递给文档作为引用,这些URL会一直指向文档最新的材料,当然,你也可以在别的网站作为超链使用这些URL。" - -#. (title) -#: ../source/book.xml:13973 -msgid "Can I view older revisions?" -msgstr "我可以看到老的修订版本吗?" - -#. (para) -#: ../source/book.xml:13975 -#, fuzzy -msgid "With an ordinary web browser? In one word: nope. At least, not with mod_dav_svn as your only tool." -msgstr "通过一个普通的浏览器?一句话:不可以,至少是当你只使用mod_dav_svn作为唯一的工具时。" - -#. (para) -#: ../source/book.xml:13978 -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 discover 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." -msgstr "你的Web浏览器只会说普通的HTTP,也就是说它只会GET公共的URL,这个URL代表了最新版本的文件和目录,根据WebDAV/DeltaV规范,每种服务器定义了一种私有的URL语法来代表老的资源的版本,这个语法对客户端是不透明的,为了得到老的版本,一个客户端必须通过一种规范过程来发现正确的URL;这个过程包括执行一系列WebDAV PROPFIND请求和理解DeltaV概念,这些事情一般是你的web浏览器做不了的。" - -#. (para) -#: ../source/book.xml:13999 -msgid "Back then, it was called ViewCVS." -msgstr "之前叫做ViewCVS。" - -#. (para) -#: ../source/book.xml:13989 -#, fuzzy -msgid "So to answer the question, one obvious way to see older revisions of files and directories is by passing the argument to the svn list and svn cat commands. To browse old revisions with your web browser, however, you can use third-party software. A good example of this is ViewVC (http://viewvc.tigris.org/). ViewVC was originally written to display CVS repositories through the web, and the latest releases are able to understand Subversion repositories as well." -msgstr "为了回答这些问题,一个明显的看老版本文件和目录的方式是带参数的svn listsvn cat命令,为了在浏览器里察看老版本,你可以使用第三方的软件,一个好的例子是ViewVC(),ViewVC最初写出来是为了在web显示CVS版本库,最新的版本也已经可以理解Subversion版本库了。" - -#. (title) -#: ../source/book.xml:14005 -msgid "Proper MIME Type" -msgstr "正确的文件类型" - -#. (para) -#: ../source/book.xml:14007 -#, fuzzy -msgid "When browsing a Subversion repository, the web browser gets a clue about how to render a file's contents by looking at the Content-Type: header returned in Apache's response to the HTTP GET 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 default MIME type, typically text/plain. 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 foo.html file in the repository actually render as HTML when browsing." -msgstr "当浏览Subversion版本库时,web浏览器通过从Apache的HTTP GET返回内容中查看Content-Type:头可以知道如何渲染文件的线索,这个值是一种MIME类型。默认情况下,Apache告诉浏览器所有的版本库文件都是缺省的MIME类型,通常是text/plain,这样有时候会让人沮丧,如果一个用户希望版本库文件能够更有意义的渲染—例如一个foo.html,在浏览时最好能够按照HTML方式渲染。" - -#. (para) -#: ../source/book.xml:14021 -#, fuzzy -msgid "To make this happen, you only need to make sure that your files have the proper svn:mime-type set. This is discussed in more detail in , and you can even configure your client to automatically attach proper svn:mime-type properties to files entering the repository for the first time; see ." -msgstr "为了生效,我们只需要确认你的文件有正确的svn:mime-type设置,这将在详细讨论,你可以设置的你的客户端在文件首次添加到版本库时自动附加svn:mime-type属性;见。" - -#. (para) -#: ../source/book.xml:14030 -#, fuzzy -msgid "So in our example, if one were to set the svn:mime-type property to text/html on file foo.html, then Apache would properly tell your web browser to render the file as HTML. One could also attach proper image/* 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." -msgstr "所以在我们的例子中,如果一个人对foo.htmlsvn:mime-type设置为text/html,Apache就会告知浏览器使用HTML方式渲染文件,也可以给图片文件设置合适的image/*类型,这样最终可以使整个web站点直接从版本库浏览,这样做通常没有问题,只要你的站点不包含动态生成的内容。" - -#. (title) -#: ../source/book.xml:14045 -msgid "Customizing the Look" -msgstr "定制外观" - -#. (para) -#: ../source/book.xml:14047 -#, fuzzy -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 SVNIndexXSLT directive in your repository's Location block of httpd.conf will instruct mod_dav_svn to generate XML output when displaying a directory listing, and to reference the XSLT stylesheet of your choice:" -msgstr "你通常会在版本化的文件的URL之外得到更多地用处—毕竟那里是有趣的内容存在的地方,但是你会偶尔浏览一个Subversion的目录列表,你会很快发现展示列表生成的HTML非常基本,并且一定没有在外观上(或者是有趣上)下功夫,为了自定义这些目录显示,Subversion提供了一个XML目录特性,一个单独的SVNIndexXSLT指示在你的httpd.conf文件版本库的Location块里,它将会指导mod_dav_svn在显示目录列表的时候生成XML输出,并且引用你选择的XSLT样式表文件:" - -#. (screen) -#: ../source/book.xml:14062 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -" SVNIndexXSLT \"/svnindex.xsl\"\n" -" …\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -" SVNIndexXSLT \"/svnindex.xsl\"\n" -" …\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:14070 -#, fuzzy -msgid "Using the SVNIndexXSLT 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 tools/xslt/ directory. Keep in mind that the path provided to the SVNIndexXSLT directory is actually a URL path—browsers need to be able to read your stylesheets in order to make use of them!" -msgstr "使用SVNIndexXSLT指示和创建一个XSLT样式表,你可以让你的目录列表的颜色模式与你的网站的其它部分匹配,否则,如果你愿意,你可以使用Subversion源分发版本中的tools/xslt/目录下的样例样式表。记住提供给SVNIndexXSLT 指示的路径是一个URL路径—浏览器需要阅读你的样式表来利用它们!" - -#. (title) -#: ../source/book.xml:14083 -msgid "Listing Repositories" -msgstr "版本库列表" - -#. (para) -#: ../source/book.xml:14085 -#, fuzzy -msgid "If you're serving a collection of repositories from a single URL via the SVNParentPath directive, then it's also possible to have Apache display all available repositories to a web browser. Just activate the SVNListParentPath directive:" -msgstr "如果你通过 SVNParentPath指示从一个URL维护一组版本库,也可以让Apache在浏览器显示所有存在的版本库,只需要通过SVNListParentPath指示激活:" - -#. (screen) -#: ../source/book.xml:14091 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /var/svn\n" -" SVNListParentPath on\n" -" …\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" SVNParentPath /usr/local/svn\n" -" SVNListParentPath on\n" -" …\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:14099 -#, fuzzy -msgid "If a user now points her web browser to the URL http://host.example.com/svn/, she'll see list of all Subversion repositories sitting in /var/svn. Obviously, this can be a security problem, so this feature is turned off by default." -msgstr "如果一个用户将浏览器指向http://host.example.com/svn/,她一定会看到/usr/local/svn下所有的Subversion版本库,很明显这是一件安全问题,所以这个特性默认是关闭的。" - -#. (title) -#: ../source/book.xml:14110 -msgid "Apache Logging" -msgstr "Apache 日志" - -#. (para) -#: ../source/book.xml:14112 -#, fuzzy -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 httpd.conf file will cause Apache to produce two logs: error_log and access_log. 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 /usr/local/apache2/logs/.)" -msgstr "因为Apache的核心是一个HTTP服务器,它包含了梦幻般灵活的日志特性。各种配置日志的方式可以超出了本书的范围,但是我们必须指出,即使是最原始的文件httpd.conf也可以让Apache产生两个日志:error_logaccess_log。这些日志会出现在不同的地方,但通常是创建在Apache安装的日志区。(在Unix下,这个目录是/usr/local/apache2/logs/。)" - -#. (para) -#: ../source/book.xml:14124 -#, fuzzy -msgid "The error_log describes any internal errors that Apache runs into as it works. The access_log 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." -msgstr "error_log描述了所有Apache运行中的内部错误,access_log记录了Apache接收到的所有HTTP请求,这个日志很容易查看,例如包括Subversion客户端的IP地址,哪些用户正确认证和请求成功还是失败。" - -#. (para) -#: ../source/book.xml:14132 -#, fuzzy -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 access_log and deduce what the client was doing—most operations look like a series of cryptic PROPPATCH, GET, PUT, and REPORT requests. To make things worse, many client operations send nearly-identical series of requests, so it's even harder to tell them apart." -msgstr "不幸的是,因为HTTP是无状态协议,即使最简单的Subversion客户端操作会产生多个网络请求,很难通过查看access_log来确定用户的操作—大多数操作看起来像是一系列神秘的PROPPATCHGETPUTREPORT请求。更糟糕的是,许多客户段操作会发送几乎完全相同的一系列请求,所以更加难以解析。" - -#. (para) -#: ../source/book.xml:14142 -#, fuzzy -msgid "mod_dav_svn, however, can come to your aid. By activating an operational logging feature, you can ask mod_dav_svn to create a separate log file describing what sort of high-level operations your clients are performing." -msgstr "mod_dav_svn会成为一个辅助,通过激活operational logging属性,你可以告诉mod_dav_svn创建另外的日志文件,来描述你的客户度uan做了哪些高级操作。" - -#. (para) -#: ../source/book.xml:14148 -#, fuzzy -msgid "To do this, you need to make use of Apache's CustomLog directive (which is explained in more detail in Apache's own documentation). Be sure to invoke this directive outside of your Subversion Location block:" -msgstr "为此,你需要利用Apache的CustomLog指示(在Apache自己的文档里有详细解释)指示,请确定在Subversion的Location指示之外配置这个指示。" - -#. (screen) -#: ../source/book.xml:14154 -#, no-wrap -msgid "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" …\n" -"</Location>\n" -"\n" -"CustomLog logs/svn_logfile \"%t %u %{SVN-ACTION}e\" env=SVN-ACTION\n" -msgstr "" -"\n" -"<Location /svn>\n" -" DAV svn\n" -" …\n" -"</Location>\n" -"\n" -"CustomLog logs/svn_logfile \"%t %u %{SVN-ACTION}e\" env=SVN-ACTION\n" - -#. (para) -#: ../source/book.xml:14162 -#, fuzzy -msgid "In this example, we're asking Apache to create a special logfile svn_logfile in the standard Apache logs directory. The %t and %u variables are replaced by the time and username of the request, respectively. The really important part are the two instances of SVN-ACTION. When Apache sees that variable, it substitutes the value of the SVN-ACTION environment variable, which is automatically set by mod_dav_svn whenever it detects a high-level client action." -msgstr "在这个例子里,我们告诉Apache在标准的Apachelogs目录创建一个svn_logfile日志文件,%t%u变量会被请求的时间和用户名代替,关键的部分是SVN-ACTION的两个实例,当Apache看到变量,会将变量的值替代为环境变量SVN-ACTION,这个环境变量的值是mod_dav_svn在检测到高级客户段操作时自动设置的。" - -#. (para) -#: ../source/book.xml:14173 -#, fuzzy -msgid "So instead of having to interpret a traditional access_log like this:" -msgstr "所以我们不选择下面的传统access_log文件:" - -#. (screen) -#: ../source/book.xml:14176 -#, no-wrap -msgid "" -"\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1\" 207 398\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1\" 207 449\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc HTTP/1.1\" 207 647\n" -"[26/Jan/2007:22:25:29 -0600] \"REPORT /svn/calc/!svn/vcc/default HTTP/1.1\" 200 607\n" -"[26/Jan/2007:22:25:31 -0600] \"OPTIONS /svn/calc HTTP/1.1\" 200 188\n" -"[26/Jan/2007:22:25:31 -0600] \"MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1\" 201 227\n" -"…\n" -msgstr "" -"\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1\" 207 398\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1\" 207 449\n" -"[26/Jan/2007:22:25:29 -0600] \"PROPFIND /svn/calc HTTP/1.1\" 207 647\n" -"[26/Jan/2007:22:25:29 -0600] \"REPORT /svn/calc/!svn/vcc/default HTTP/1.1\" 200 607\n" -"[26/Jan/2007:22:25:31 -0600] \"OPTIONS /svn/calc HTTP/1.1\" 200 188\n" -"[26/Jan/2007:22:25:31 -0600] \"MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1\" 201 227\n" -"…\n" - -#. (para) -#: ../source/book.xml:14185 -#, fuzzy -msgid "… you can instead peruse a much more intelligible svn_logfile like this:" -msgstr "… 你可以细读一个更加智能的svn_logfile文件:" - -#. (screen) -#: ../source/book.xml:14187 -#, no-wrap -msgid "" -"\n" -"[26/Jan/2007:22:24:20 -0600] - list-dir '/'\n" -"[26/Jan/2007:22:24:27 -0600] - update '/'\n" -"[26/Jan/2007:22:25:29 -0600] - remote-status '/'\n" -"[26/Jan/2007:22:25:31 -0600] sally commit r60\n" -msgstr "" -"\n" -"[26/Jan/2007:22:24:20 -0600] - list-dir '/'\n" -"[26/Jan/2007:22:24:27 -0600] - update '/'\n" -"[26/Jan/2007:22:25:29 -0600] - remote-status '/'\n" -"[26/Jan/2007:22:25:31 -0600] sally commit r60\n" - -#. (title) -#: ../source/book.xml:14197 -msgid "Other Features" -msgstr "其它特性" - -#. (para) -#: ../source/book.xml:14199 -#, fuzzy -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 https://." -msgstr "Apache作为一个健壮的Web服务器的许多特性也可以用来增加Subversion的功能性和安全性,Subversion使用Neon与Apache通讯,这是一种一般的HTTP/WebDAV库,可以支持SSL(Secure Socket Layer,将在后面讨论)。如果你的Subversion是以支持SSL编译,则你可以使用https://访问Apache服务器。" - -#. (para) -#: ../source/book.xml:14208 -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." -msgstr "同样有用的是Apache和Subversion关系的一些特性,像可以指定自定义的端口(而不是缺省的HTTP的80)或者是一个Subversion可以被访问的虚拟主机名,或者是通过HTTP代理服务器访问的能力,这些特性都是Neon所支持的,所以Subversion轻易得到这些支持。" - -#. (para) -#: ../source/book.xml:14215 -#, fuzzy -msgid "Finally, because mod_dav_svn 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 ." -msgstr "最后,因为mod_dav_svn是使用一个半完成的WebDAV/DeltaV方言,所以通过第三方的DAV客户端访问也是可能的,几乎所有的现代操作系统(Win32、OS X和Linux)都有把DAV服务器影射为普通的网络共享的内置能力,这是一个复杂的主题;察看来得到更多细节。" - -#. (title) -#: ../source/book.xml:14230 -msgid "Path-Based Authorization" -msgstr "基于路径的授权" - -#. (para) -#: ../source/book.xml:14232 -#, fuzzy -msgid "Both Apache and svnserve 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." -msgstr "Apache和svnserve都可以给用户赋予(或拒绝)访问许可,通常是对整个版本库:一个用户可以读版本库(或不),而且他可以写版本库(或不)。如果可能,也可以定义细粒度的访问规则。一组用户可以有版本库的一个目录的读写权限,但是没有其它的;另一个目录可以是只对一少部分用户可读。" - -#. (para) -#: ../source/book.xml:14241 -#, fuzzy -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 mod_authz_svn module and then add the AuthzSVNAccessFile directive (within the httpd.conf file) pointing to your own rules-file. (For a full explanation, see .) If you're using svnserve, then you need to make the authz-db variable (within svnserve.conf) point to your rules-file." -msgstr "两种服务器都使用同样的文件格式描述路径为基础的规则,如果是Apache,需要加载mod_authz_svn模块,然后添加AuthzSVNAccessFile指示(在文件httpd.conf中)指明你的规则文件。(完全解释可以看。)如果你在使用svnserve,你需要让你的authz-db变量(在svnserve.conf中)指向规则文件。" - -#. (title) -#: ../source/book.xml:14254 -msgid "Do you really need path-based access control?" -msgstr "你真的需要基于路径的访问控制吗?" - -#. (para) -#: ../source/book.xml:14256 -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." -msgstr "许多第一次设置Subversion的管理员会在未经太多的思考的情况下轻易选择使用路径为基础的访问控制,管理员通常知道团队的成员工作在哪个项目,所以很容易确定赋予哪些团队访问哪些目录,不能访问哪些目录。这看起来是很自然的事情,它满足了管理员紧密控制版本库访问的愿望。" - -#. (para) -#: ../source/book.xml:14264 -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 shouldn't 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." -msgstr "注意,这个特性通常有一些看不见(和可见的)代价。可见的,需要更多的工作来确信用户对某个路径有读写权限;在一些情况下,会是非常大的性能损失。不可见的,考虑你创建的文化,大多数情况下,因为特定用户不能够在特定目录提交修改,所以社会契约不必通过技术来加强。团队有时候可以自然的互相协作;一些人会通过为他人提交不能正常工作目录的内容的方法帮助别人,你设置了一种不期望交流的障碍。你也要建立一套项目开发、新人加入等活动的规则,还有很多额外的工作。" - -#. (para) -#: ../source/book.xml:14282 -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." -msgstr "记住这是一个版本控制系统,即使一些人不小心提交了一些不该提交的东西,很容易回退修改。如果一个用户故意提交到了错误的位置,这是一个社会问题,需要在Subversion之外解决。" - -#. (para) -#: ../source/book.xml:14294 -msgid "A common theme in this book!" -msgstr "本书的共同主题!" - -#. (para) -#: ../source/book.xml:14288 -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 sounds good 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.." -msgstr "所以在开始限制用户的访问权限之前,你要问你自己是否有一个真正的、正直的需要,或仅仅是为了对一个管理员来说这样听起来不错。决定是否值得影响服务器的速度,必须记住只有很小的风险;依靠技术手段解决社会问题并不好。。" - -#. (para) -#: ../source/book.xml:14296 -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 are 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." -msgstr "作为一个思考的例子,考虑Subversion项目本身有允许某个用户可以在那个目录提交的设置,而只是通过社交方式规定。这是一个社区信任的好模型,特别是对开源项目。当然,有时候需要正统的路径为基础的访问控制;在公司中,例如,只有部分数据是敏感的,只允许以小组人可以访问。" - -#. (para) -#: ../source/book.xml:14306 -msgid "Once your server knows where to find your rules-file, it's time to define the rules." -msgstr "当你的服务器知道去查找规则文件时,就是需要定义规则的时候了。" - -#. (para) -#: ../source/book.xml:14308 -#, fuzzy -msgid "The syntax of the file is the same familiar one used by svnserve.conf and the runtime configuration files. Lines that start with a hash (#) 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 r (read-only) or rw (read-write). If the user is not mentioned at all, no access is allowed." -msgstr "访问文件的语法与svnserve.conf和运行中配置文件非常相似,以(#)开头的行会被忽略,在它的简单形式里,每一小节命名一个版本库和一个里面的路径,认证用户名是在每个小节中的选项名,每个选项的值描述了用户访问版本库的级别:r(只读)或者rw(读写),如果用户没有提到,访问是不允许的。" - -#. (para) -#: ../source/book.xml:14319 -#, fuzzy -msgid "To be more specific: the value of the section-names are either of the form [repos-name:path] or the form [path]. If you're using the SVNParentPath directive, then it's important to specify the repository names in your sections. If you omit them, then a section like [/some/dir] will match the path /some/dir in every repository. If you're using the SVNPath directive, however, then it's fine to only define paths in your sections—after all, there's only one repository." -msgstr "具体一点:这个小节的名称是[repos-name:path]或者[path]的形式,如果你使用SVNParentPath指示,指定版本库的名字是很重要的,如果你漏掉了他们,[/some/dir]部分就会与/some/dir的所有版本库匹配,如果你使用SVNPath指示,因此在你的小节中只是定义路径也很好—毕竟只有一个版本库。" - -#. (screen) -#: ../source/book.xml:14330 -#, no-wrap -msgid "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" -msgstr "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" - -#. (para) -#: ../source/book.xml:14335 -#, fuzzy -msgid "In this first example, the user harry has full read and write access on the /branches/calc/bug-142 directory in the calc repository, but the user sally has read-only access. Any other users are blocked from accessing this directory." -msgstr "在第一个例子里,用户harrycalc版本库中/branches/calc/bug-142具备完全的读写权利,但是用户sally只有读权利,任何其他用户禁止访问这个目录。" - -#. (para) -#: ../source/book.xml:14341 -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:" -msgstr "当然,访问控制是父目录传递给子目录的,这意味着我们可以为Sally指定一个子目录的不同访问策略:" - -#. (screen) -#: ../source/book.xml:14344 -#, no-wrap -msgid "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" -"\n" -"# give sally write access only to the 'testing' subdir\n" -"[calc:/branches/calc/bug-142/testing]\n" -"sally = rw\n" -msgstr "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" -"\n" -"# give sally write access only to the 'testing' subdir\n" -"[calc:/branches/calc/bug-142/testing]\n" -"sally = rw\n" - -#. (para) -#: ../source/book.xml:14353 -#, fuzzy -msgid "Now Sally can write to the testing subdirectory of the branch, but can still only read other parts. Harry, meanwhile, continues to have complete read-write access to the whole branch." -msgstr "现在Sally可以读取分支的testing子目录,但对其他部分还是只可以读,同时,Harry对整个分支还继续有完全的读写权限。" - -#. (para) -#: ../source/book.xml:14357 -msgid "It's also possible to explicitly deny permission to someone via inheritance rules, by setting the username variable to nothing:" -msgstr "也可以通过继承规则明确的的拒绝某人的访问,只需要设置用户名参数为空:" - -#. (screen) -#: ../source/book.xml:14360 -#, no-wrap -msgid "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" -"\n" -"[calc:/branches/calc/bug-142/secret]\n" -"harry =\n" -msgstr "" -"\n" -"[calc:/branches/calc/bug-142]\n" -"harry = rw\n" -"sally = r\n" -"\n" -"[calc:/branches/calc/bug-142/secret]\n" -"harry =\n" - -#. (para) -#: ../source/book.xml:14368 -#, fuzzy -msgid "In this example, Harry has read-write access to the entire bug-142 tree, but has absolutely no access at all to the secret subdirectory within it." -msgstr "在这个例子里,Harry对bug-142目录树有完全的读写权限,但是对secret子目录没有任何访问权利。" - -#. (para) -#: ../source/book.xml:14372 -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." -msgstr "需要记住的是最详细的的路径会被匹配,服务器首先找到匹配自己的目录,然后父目录,然后父目录的父目录,就这样继续下去,更具体的路径控制会覆盖所有继承下来的访问控制。" - -#. (para) -#: ../source/book.xml:14378 -#, fuzzy -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 (*), which means all users:" -msgstr "缺省情况下,没有人对版本库有任何访问,这意味着如果你已经从一个空文件开始,你会希望给所有用户对版本库根目录具备读权限,你可以使用*实现,用来代表所有用户:" - -#. (screen) -#: ../source/book.xml:14384 -#, no-wrap -msgid "" -"\n" -"[/]\n" -"* = r\n" -msgstr "" -"\n" -"[/]\n" -"* = r\n" - -#. (para) -#: ../source/book.xml:14388 -#, fuzzy -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 rw permission to certain users on specific subdirectories within specific repositories." -msgstr "这是一个普通的设置;注意在小节名中没有提到版本库名称,这让所有版本库对所有的用户可读。当所有用户对版本库有了读权利,你可以赋予特定用户对特定子目录的rw权限。" - -#. (para) -#: ../source/book.xml:14394 -#, fuzzy -msgid "The asterisk variable (*) is also worth special mention here: it's the only 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 * value defined for the path being accessed; if it can't find one, then it demands real authentication from the client." -msgstr "星号(*)参数需要在这里详细强调:这是匹配匿名用户的唯一模式,如果你已经配置了你的Location区块允许匿名和认证用户的混合访问,所有用户作为Apache匿名用户开始访问,mod_authz_svn会在要访问路径的定义中查找*值;如果找不到,Apache就会要求真实的客户端认证。" - -#. (para) -#: ../source/book.xml:14403 -#, fuzzy -msgid "The access file also allows you to define whole groups of users, much like the Unix /etc/group file:" -msgstr "访问文件也允许你定义一组的用户,很像Unix的/etc/group文件:" - -#. (screen) -#: ../source/book.xml:14406 -#, no-wrap -msgid "" -"\n" -"[groups]\n" -"calc-developers = harry, sally, joe\n" -"paint-developers = frank, sally, jane\n" -"everyone = harry, sally, joe, frank, sally, jane\n" -msgstr "" -"\n" -"[groups]\n" -"calc-developers = harry, sally, joe\n" -"paint-developers = frank, sally, jane\n" -"everyone = harry, sally, joe, frank, sally, jane\n" - -#. (para) -#: ../source/book.xml:14412 -#, fuzzy -msgid "Groups can be granted access control just like users. Distinguish them with an at (@) prefix:" -msgstr "组可以被赋予通用户一样的访问权限,使用at@)前缀来加以区别:" - -#. (screen) -#: ../source/book.xml:14415 -#, no-wrap -msgid "" -"\n" -"[calc:/projects/calc]\n" -"@calc-developers = rw\n" -"\n" -"[paint:/projects/paint]\n" -"@paint-developers = rw\n" -"jane = r\n" -msgstr "" -"\n" -"[calc:/projects/calc]\n" -"@calc-developers = rw\n" -"\n" -"[paint:/projects/paint]\n" -"@paint-developers = rw\n" -"jane = r\n" - -#. (para) -#: ../source/book.xml:14423 -msgid "Groups can also be defined to contain other groups:" -msgstr "组中也可以定义为包含其它的组:" - -#. (screen) -#: ../source/book.xml:14424 -#, no-wrap -msgid "" -"\n" -"[groups]\n" -"calc-developers = harry, sally, joe\n" -"paint-developers = frank, sally, jane\n" -"everyone = @calc-developers, @paint-developers\n" -msgstr "" -"\n" -"[groups]\n" -"calc-developers = harry, sally, joe\n" -"paint-developers = frank, sally, jane\n" -"everyone = @calc-developers, @paint-developers\n" - -#. (title) -#: ../source/book.xml:14435 -msgid "Partial Readability and Checkouts" -msgstr "部分可读性和检出" - -#. (para) -#: ../source/book.xml:14437 -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 svn checkout." -msgstr "如果你使用Apache作为Subversion服务器,并让版本库的某些子目录对特定用户不可读,然后你需要知道svn checkout会有一个不理想的执行方式。" - -#. (para) -#: ../source/book.xml:14442 -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 only 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." -msgstr "当客户端通过HTTP请求检出或更新时,它会做出一个单独的服务器请求,并接收一个单独的(通常很大)服务器响应,当服务器接收到请求,这是Apache服务器要求用户认证的唯一机会,这有一些副作用。例如,如果版本库的一个特定子目录只对用户Sally可读,用户Harry检出父目录,他的客户端会在收到认证要求时返回用户名Harry,因为服务器生成的响应很大,无法在达到特别子目录时重新发送认证请求;因此子目录会被一起略过,而不会询问用户是否使用Sally重新认证。如果版本库是匿名可访问的,则整个检出将不需要认证—再一次,略过不可读的目录,而不会中途要求认证。" - -#. (title) -#: ../source/book.xml:14466 -msgid "Supporting Multiple Repository Access Methods" -msgstr "支持多种版本库访问方法" - -#. (para) -#: ../source/book.xml:14468 -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." -msgstr "你已经看到了一个版本库可以用多种方式访问,但是可以—或者说安全的—用几种方式同时并行的访问你的版本库吗?回答是可以,倘若你有一些深谋远虑的使用。" - -#. (para) -#: ../source/book.xml:14472 -msgid "At any given time, these processes may require read and write access to your repository:" -msgstr "在任何给定的时间,这些进程会要求读或者写访问你的版本库:" - -#. (para) -#: ../source/book.xml:14476 -#, fuzzy -msgid "regular system users using a Subversion client (as themselves) to access the repository directly via file:// URLs;" -msgstr "常规的系统用户使用Subversion客户端(客户端程序本身)通过file:///URL直接访问版本库;" - -#. (para) -#: ../source/book.xml:14481 -#, fuzzy -msgid "regular system users connecting to SSH-spawned private svnserve processes (running as themselves) which access the repository;" -msgstr "常规的系统用户连接使用SSH调用的访问版本库的svnserve进程(以它们自己运行);" - -#. (para) -#: ../source/book.xml:14486 -#, fuzzy -msgid "an svnserve process—either a daemon or one launched by inetd—running as a particular fixed user;" -msgstr "一个svnserve进程—是一个守护进程或是通过inetd启动的—作为一个固定的用户运行;" - -#. (para) -#: ../source/book.xml:14492 -#, fuzzy -msgid "an Apache httpd process, running as a particular fixed user." -msgstr "一个Apache httpd进程,以一个固定用户运行。" - -#. (para) -#: ../source/book.xml:14496 -#, fuzzy -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 svn 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." -msgstr "最通常的一个问题是管理进入到版本库的所有权和访问许可,是前面例子的所有进程 (或者说是用户)都有读写Berkeley DB的权限?假定你有一个类Unix的操作系统,一个直接的办法是在新的svn组添加所有潜在的用户,然后让这个组完全拥有版本库,但这样还不足够,因为一个进程会使用不友好的umask来写数据库文件—用来防止别的用户的访问。" - -#. (para) -#: ../source/book.xml:14506 -#, fuzzy -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 svn program into a wrapper script that first sets umask 002 and then runs the real svn client program. You can write a similar wrapper script for the svnserve program, and add a umask 002 command to Apache's own startup script, apachectl. For example:" -msgstr "所以下一步我们不选择为每个版本库用户设置一个共同的组的方法,而是强制每个版本库访问进程使用一个健全的umask。对直接访问版本库的用户,你可以使用svn的包裹脚本来首先设置umask 002,然后运行真实的svn客户端程序,你可以为svnserve写相同的脚本,并且增加umask 002命令到Apache自己的启动脚本apachectl中。例如:" - -#. (screen) -#: ../source/book.xml:14516 -#, no-wrap -msgid "" -"\n" -"$ cat /usr/bin/svn\n" -"\n" -"#!/bin/sh\n" -"\n" -"umask 002\n" -"/usr/bin/svn-real \"$@\"\n" -"\n" -msgstr "" -"\n" -"$ cat /usr/bin/svn\n" -"\n" -"#!/bin/sh\n" -"\n" -"umask 002\n" -"/usr/bin/svn-real \"$@\"\n" -"\n" - -#. (para) -#: ../source/book.xml:14525 -#, fuzzy -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 svn 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 db directory. This causes all newly-created log files to have the same group owner as the parent directory." -msgstr "另一个在类Unix系统下常见的问题是,当版本库在使用时,BerkeleyDB有时候创建一个新的日志文件来记录它的东西,即使这个版本库是完全由svn组拥有,这个新创建的文件不是必须被同一个组拥有,这给你的用户造成了更多地许可问题。一个好的工作区应该设置组的SUID字节到版本库的db目录,这会导致所有新创建的日志文件拥有同父目录相同的组拥有者。" - -#. (para) -#: ../source/book.xml:14535 -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." -msgstr "一旦你跳过了这些障碍,你的版本库一定是可以通过各种可能的手段访问了,这看起来有点凌乱和复杂,但是这个让多个用户分享对一个文件的写权限的问题是一个经典问题,并且经常是没有优雅的解决。" - -#. (para) -#: ../source/book.xml:14540 -#, fuzzy -msgid "Fortunately, most repository administrators will never need to have such a complex configuration. Users who wish to access repositories that live on the same machine are not limited to using file:// access URLs—they can typically contact the Apache HTTP server or svnserve using localhost for the server name in their http:// or svn:// 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!" -msgstr "幸运的是,大多数版本库管理员不需要这样复杂的配置,用户如果希望访问本机的版本库,并不是一定要通过file://的URL—他们可以用localhost机器名联系Apache的HTTP服务器或者是svnserve,协议分别是http://svn://。为你的Subversion版本库维护多个服务器进程,版本库会变得超出需要的头痛,我们建议你选择最符合你的需要的版本库,并且坚持使用!" - -#. (title) -#: ../source/book.xml:14554 -msgid "The svn+ssh:// server checklist" -msgstr "svn+ssh 服务器检查列表" - -#. (para) -#: ../source/book.xml:14556 -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:" -msgstr "让一些用户通过存在的SSH帐户来共享版本库而没有访问许可问题是一件很有技巧的事情,如果你为自己需要在(作为一个管理员)类Unix系统上做的事情感到迷惑,这里是一些快速的检查列表,总结了本小节讨论的事情:" - -#. (para) -#: ../source/book.xml:14564 -#, fuzzy -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." -msgstr "所有的SSH用户需要能够读写版本库,把所有的SSH用户放到同一个组里,让版本库完全属于这个组,设置组的权限是读/写。" - -#. (para) -#: ../source/book.xml:14569 -msgid "Make the repository wholly owned by that group." -msgstr "让那个组拥有整个版本库。" - -#. (para) -#: ../source/book.xml:14574 -#, fuzzy -msgid "Set the group permissions to read/write." -msgstr "组访问权处理" - -#. (para) -#: ../source/book.xml:14577 -#, fuzzy -msgid "Your users need to use a sane umask when accessing the repository, so: make sure that svnserve (/usr/bin/svnserve, or wherever it lives in $PATH) is actually a wrapper script which sets umask 002 and executes the real svnserve binary." -msgstr "你的用户在访问版本库时需要使用一个健全的umask,确定svnserve/usr/bin/svnserve或者是任何一个$PATH说明的位置)是一个设置了umask 002和执行真正的svnserve程序的包裹脚本,对svnlooksvnadmin使用相同的措施,或者是使用一个健全的umask运行或者是使用上面说明的包裹。" - -#. (para) -#: ../source/book.xml:14586 -#, fuzzy -msgid "Take similar measures when using svnlook and svnadmin. Either run them with a sane umask, or wrap them as described above." -msgstr "像svnservesvnversion没有子命令,只有选项。" - -#. (title) -#: ../source/book.xml:14602 -msgid "Customizing Your Subversion Experience" -msgstr "定制你的 Subversion 用法" - -#. (para) -#: ../source/book.xml:14604 -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." -msgstr "版本控制可以成为复杂的主题,和科学一样充满艺术性,为解决事情能提供了无数的方法。贯穿这本书,你已经阅读许多Subversion命令行子命令,以及可以改变运行方式的选项,在本章我们要查看一些自定义Subversion工作的方法—设置Subversion运行配置,使用外置帮助程序,Subversion与操作系统配置的地区交互等等。" - -#. (title) -#: ../source/book.xml:14623 -msgid "Runtime Configuration Area" -msgstr "运行配置区" - -#. (para) -#: ../source/book.xml:14625 -#, fuzzy -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." -msgstr "Subversion提供了许多用户可以控制的可选行为方式,许多是用户希望添加到所有的Subversion操作中的选项,为了避免强制用户记住命令行参数并且在每个命令中使用,Subversion使用配置文件,并且将配置文件保存在独立的Subversion配置区。" - -#. (para) -#: ../source/book.xml:14632 -msgid "The Subversion configuration area is a two-tiered hierarchy of option names and their values. Usually, this boils down to a special directory that contains configuration files (the first tier), which are just text files in standard INI format (with sections 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." -msgstr "Subversion配置区是一个双层结构,保存了可选项的名称和值。通常,Subversion配置区是一个保存配置文件的特殊目录(第一层结构),目录中保存了一些标准INI格式的文本文件(文件中的section形成第二层结构)。这些文件可以简单用你喜欢的文本编辑器编辑(如Emacs或vi),而且保存了客户端可以读取的指示,用来指导用户的一些行为选项。" - -#. (title) -#: ../source/book.xml:14645 -msgid "Configuration Area Layout" -msgstr "配置区布局" - -#. (para) -#: ../source/book.xml:14658 -#, fuzzy -msgid "The APPDATA environment variable points to the Application Data area, so you can always refer to this folder as %APPDATA%\\Subversion." -msgstr "APPDATA环境变量指向Application Data目录,所以你可以通过%APPDATA%\\Subversion引用用户配置区目录。" - -#. (para) -#: ../source/book.xml:14647 -#, fuzzy -msgid "The first time that the svn command-line client is executed, it creates a per-user configuration area. On Unix-like systems, this area appears as a directory named .subversion in the user's home directory. On Win32 systems, Subversion creates a folder named Subversion, typically inside the Application Data 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. We will refer to the per-user configuration area using its Unix name, .subversion." -msgstr "svn命令行客户端第一次执行时,会创建一个用户配置区,在类Unix系统中,配置区位于用户主目录中,名为.subversion。在Win32系统,Subversion创建一个名为Subversion的目录,这个目录通常位于用户配置目录(顺便说一句,通常是一个隐藏目录)的Application Data子目录下。然而,在Win32平台上,此目录的具体位置在不同的系统上是不一样的,由Windows注册表决定。 我们以Unix下的名字.subversion来表示用户配置区。" - -#. (para) -#: ../source/book.xml:14664 -#, fuzzy -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 svn program have the final word on behavior. On Unix-like platforms, the system-wide configuration area is expected to be the /etc/subversion directory; on Windows machines, it looks for a Subversion directory inside the common Application Data location (again, as specified by the Windows Registry). Unlike the per-user case, the svn program does not attempt to create the system-wide configuration area." -msgstr "除了用户配置区,Subversion也提供了系统配置区,通过系统配置区,系统管理员可以为某个机器的所有用户建立缺省配置值。注意系统配置区不会规定强制性的策略—每个用户配置区都可以覆盖系统配置区中的配置项,而svn的命令行参数决定了最后的行为。在类Unix的平台上,系统配置区位于/etc/subversion目录下,在Windows平台上,系统配置区位于Application Data(再说一次,是由Windows注册表决定的)的Subversion目录中。与用户配置区不同,svn不会试图创建系统配置区。" - -#. (para) -#: ../source/book.xml:14681 -#, fuzzy -msgid "The per-user configuration area currently contains three files—two configuration files (config and servers), and a README.txt 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 svn command, such as svn --version. A new configuration directory with the default contents will be created." -msgstr "目前,Subversion的配置区包含三个文件—两个配置文件(configservers),和一个INI文件格式的README.txt描述文件。配置文件创建的时候,Subversion的选项都设置为默认值。配置文件中的选项都按功能划分成组,大多数选项还有详细的文字描述注释,说明这些选项的值对Subversion的主要影响。要修改选项,只需用文本编辑器打开并编辑配置文件。如果想要恢复缺省的配置,可以直接删除(或者重命名)配置目录,并且运行一些如svn --version之类的无关紧要的svn命令,一个包含缺省值的新配置目录就会创建起来。" - -#. (para) -#: ../source/book.xml:14697 -#, fuzzy -msgid "The per-user configuration area also contains a cache of authentication data. The auth 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." -msgstr "用户配置区也缓存了认证信息,auth目录下的子目录中缓存了一些Subversion支持的各种认证方法的信息,这个目录需要相应的用户权限才可以访问。" - -#. (title) -#: ../source/book.xml:14708 -msgid "Configuration and the Windows Registry" -msgstr "配置和 Windows 注册表" - -#. (para) -#: ../source/book.xml:14710 -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 file/section 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." -msgstr "除了基于INI文件的配置区,运行在Windows平台的Subversion客户端也可以使用Windows注册表来保存配置数据。注册表中保存的选项名称和值的含义与INI文件中相同,file/section在注册表中表现为注册表键树的层级,使得双层结构得以保留下来。" - -#. (para) -#: ../source/book.xml:14718 -#, fuzzy -msgid "Subversion looks for system-wide configuration values under the HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion key. For example, the global-ignores option, which is in the miscellany section of the config file, would be found at HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Config\\Miscellany\\global-ignores. Per-user configuration values should be stored under HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion." -msgstr "Subversion的系统配置值保存在键HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion下。举个例子,global-ignores选项位于config文件的miscellany小节,在Windows注册表中,则位于HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Config\\Miscellany\\global-ignores。用户配置值存放在HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion下。" - -#. (para) -#: ../source/book.xml:14728 -#, fuzzy -msgid "Registry-based configuration options are parsed before 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:" -msgstr "基于注册表的配置项在基于文件的配置项之前解析,所以其配置项的值会被配置文件中相同配置项的值覆盖,换句话说,在Windows系统下配置项的优先级是:" - -#. (para) -#: ../source/book.xml:14736 -msgid "Command-line options" -msgstr "命令行选项" - -#. (para) -#: ../source/book.xml:14739 -msgid "The per-user INI files" -msgstr "用户INI配置文件" - -#. (para) -#: ../source/book.xml:14742 -msgid "The per-user Registry values" -msgstr "用户注册表值" - -#. (para) -#: ../source/book.xml:14745 -msgid "The system-wide INI files" -msgstr "系统INI配置文件" - -#. (para) -#: ../source/book.xml:14748 -msgid "The system-wide Registry values" -msgstr "系统注册表值" - -#. (para) -#: ../source/book.xml:14751 -#, fuzzy -msgid "Also, the Windows Registry doesn't really support the notion of something being commented out. However, Subversion will ignore any option key whose name begins with a hash (#) 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." -msgstr "此外,虽然Windows注册表不支持注释掉这种概念,但是Subversion会忽略所有以井号(#)开始的字符,这允许你快速的取消一个选项而不需要删除整个注册表键,明显简化了恢复选项的过程。" - -#. (para) -#: ../source/book.xml:14758 -#, fuzzy -msgid "The svn 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 REGEDIT program. Alternatively, you can create a .reg file, and then double-click on that file from the Explorer shell, which will cause the data to be merged into your registry." -msgstr "svn命令行客户端不会尝试写Windows注册表,也不会在注册表中创建默认配置区。不过可以使用REGEDIT创建所需的键。此外,还可以创建一个.reg文件,并在文件浏览器中双击这个文件,文件中的数据就会合并到注册表中。" - -#. (title) -#: ../source/book.xml:14768 -msgid "Sample Registration Entries (.reg) File." -msgstr "注册表条目(.reg)样本文件。" - -#. (programlisting) -#: ../source/book.xml:14770 -#, no-wrap -msgid "" -"\n" -"REGEDIT4\n" -"\n" -"[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\groups]\n" -"\n" -"[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\global]\n" -"\"#http-proxy-host\"=\"\"\n" -"\"#http-proxy-port\"=\"\"\n" -"\"#http-proxy-username\"=\"\"\n" -"\"#http-proxy-password\"=\"\"\n" -"\"#http-proxy-exceptions\"=\"\"\n" -"\"#http-timeout\"=\"0\"\n" -"\"#http-compression\"=\"yes\"\n" -"\"#neon-debug-mask\"=\"\"\n" -"\"#ssl-authority-files\"=\"\"\n" -"\"#ssl-trust-default-ca\"=\"\"\n" -"\"#ssl-client-cert-file\"=\"\"\n" -"\"#ssl-client-cert-password\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auth]\n" -"\"#store-passwords\"=\"yes\"\n" -"\"#store-auth-creds\"=\"yes\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\helpers]\n" -"\"#editor-cmd\"=\"notepad\"\n" -"\"#diff-cmd\"=\"\"\n" -"\"#diff3-cmd\"=\"\"\n" -"\"#diff3-has-program-arg\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\tunnels]\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\miscellany]\n" -"\"#global-ignores\"=\"*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store\"\n" -"\"#log-encoding\"=\"\"\n" -"\"#use-commit-times\"=\"\"\n" -"\"#no-unlock\"=\"\"\n" -"\"#enable-auto-props\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auto-props]\n" -"\n" -msgstr "" -"\n" -"REGEDIT4\n" -"\n" -"[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\groups]\n" -"\n" -"[HKEY_LOCAL_MACHINE\\Software\\Tigris.org\\Subversion\\Servers\\global]\n" -"\"#http-proxy-host\"=\"\"\n" -"\"#http-proxy-port\"=\"\"\n" -"\"#http-proxy-username\"=\"\"\n" -"\"#http-proxy-password\"=\"\"\n" -"\"#http-proxy-exceptions\"=\"\"\n" -"\"#http-timeout\"=\"0\"\n" -"\"#http-compression\"=\"yes\"\n" -"\"#neon-debug-mask\"=\"\"\n" -"\"#ssl-authority-files\"=\"\"\n" -"\"#ssl-trust-default-ca\"=\"\"\n" -"\"#ssl-client-cert-file\"=\"\"\n" -"\"#ssl-client-cert-password\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auth]\n" -"\"#store-passwords\"=\"yes\"\n" -"\"#store-auth-creds\"=\"yes\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\helpers]\n" -"\"#editor-cmd\"=\"notepad\"\n" -"\"#diff-cmd\"=\"\"\n" -"\"#diff3-cmd\"=\"\"\n" -"\"#diff3-has-program-arg\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\tunnels]\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\miscellany]\n" -"\"#global-ignores\"=\"*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store\"\n" -"\"#log-encoding\"=\"\"\n" -"\"#use-commit-times\"=\"\"\n" -"\"#no-unlock\"=\"\"\n" -"\"#enable-auto-props\"=\"\"\n" -"\n" -"[HKEY_CURRENT_USER\\Software\\Tigris.org\\Subversion\\Config\\auto-props]\n" -"\n" - -#. (para) -#: ../source/book.xml:14812 -#, fuzzy -msgid "The previous example shows the contents of a .reg 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 (#) character from the beginning of the option names, and set the values as you desire." -msgstr "上面例子里显示的.reg文件中,包含了一些最常用的配置选项和它们的缺省值。注意,上面的例子中不仅包含了系统设置(关于网络代理相关的选项),也包含了用户设置(指定的编辑器程序,是否保存密码,以及其它选项)。同时要注意的是,所有选项都注释掉了,要启用其中的选项,只需删除该选项名称前面的井号(#),然后设置相应的值就可以了。" - -#. (title) -#: ../source/book.xml:14826 -msgid "Configuration Options" -msgstr "配置选项" - -#. TODO(cmpilato): Rework and move this section to the Reference -#. (para) -#: ../source/book.xml:14829 -msgid "In this section, we will discuss the specific run-time configuration options that are currently supported by Subversion." -msgstr "本节我们会详细讨论Subversion目前支持的运行配置选项。" - -#. (title) -#: ../source/book.xml:14835 -msgid "Servers" -msgstr "服务器" - -#. (para) -#: ../source/book.xml:14837 -#, fuzzy -msgid "The servers file contains Subversion configuration options related to the network layers. There are two special section names in this file—groups and global. The groups section is essentially a cross-reference table. The keys in this section are the names of other sections in the file; their values are globs—textual tokens which possibly contain wildcard characters—that are compared against the hostnames of the machine to which Subversion requests are sent." -msgstr "servers文件保存了Subversion关于网络层的配置选项,这个文件有两个特别的小节:groupsglobalgroups小节是一个交叉引用表,其中的关键字是servers文件中其它小节的名字,值则是一个可以包含通配符的字符序列,对应于接收Subversion请求的主机名,称为glob。" - -#. (programlisting) -#: ../source/book.xml:14848 -#, no-wrap -msgid "" -"\n" -"[groups]\n" -"beanie-babies = *.red-bean.com\n" -"collabnet = svn.collab.net\n" -"\n" -"[beanie-babies]\n" -"…\n" -"\n" -"[collabnet]\n" -"…\n" -msgstr "" -"\n" -"[groups]\n" -"beanie-babies = *.red-bean.com\n" -"collabnet = svn.collab.net\n" -"\n" -"[beanie-babies]\n" -"…\n" -"\n" -"[collabnet]\n" -"…\n" - -#. (para) -#: ../source/book.xml:14859 -#, fuzzy -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 groups section. If a match is made, Subversion then looks for a section in the servers file whose name is the matched group's name. From that section it reads the actual network configuration settings." -msgstr "当通过网络访问Subversion服务器时,客户端会设法匹配正在尝试连接的服务器名字和groups小节中的glob名称,如果发现匹配,Subversion会在servers文件中查找对应于这个glob名称的小节,并从该小节中去读取真实的网络配置设置。" - -#. (para) -#: ../source/book.xml:14866 -#, fuzzy -msgid "The global section contains the settings that are meant for all of the servers not matched by one of the globs under the groups 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 groups section), and are as follows:" -msgstr "如果没有能够匹配到groups中的glob名称,global小节中的选项就会发生作用。global小节中的选项与其他小节一样(当然是除了groups小节),这些选项是:" - -#. (literal) -#: ../source/book.xml:14877 -#, fuzzy -msgid "http-proxy-exceptions" -msgstr "http-proxy-host" - -#. (para) -#: ../source/book.xml:14880 -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." -msgstr "这里指定了一组逗号分割的列表,其内容是无须代理服务器可以直接访问的版本库主机名模式,模式语法与Unix的shell中的文件名相同,其中任何匹配的版本库主机不会通过代理访问。" - -#. (literal) -#: ../source/book.xml:14890 -msgid "http-proxy-host" -msgstr "http-proxy-host" - -#. (para) -#: ../source/book.xml:14893 -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." -msgstr "代理服务器的详细主机名,是HTTP为基础的Subversion请求必须通过的,缺省值为空,意味着Subversion不会尝试通过代理服务器进行HTTP请求,而会尝试直接连接目标机器。" - -#. (literal) -#: ../source/book.xml:14903 -msgid "http-proxy-port" -msgstr "http-proxy-port" - -#. (para) -#: ../source/book.xml:14906 -msgid "This specifies the port number on the proxy host to use. It defaults to an empty value." -msgstr "代理服务器的详细端口,缺省值为空。" - -#. (literal) -#: ../source/book.xml:14912 -msgid "http-proxy-username" -msgstr "http-proxy-username" - -#. (para) -#: ../source/book.xml:14915 -msgid "This specifies the username to supply to the proxy machine. It defaults to an empty value." -msgstr "代理服务器的用户名,缺省值为空。" - -#. (literal) -#: ../source/book.xml:14921 -msgid "http-proxy-password" -msgstr "http-proxy-password" - -#. (para) -#: ../source/book.xml:14924 -msgid "This specifies the password to supply to the proxy machine. It defaults to an empty value." -msgstr "代理服务器的密码,缺省为空。" - -#. (literal) -#: ../source/book.xml:14930 -msgid "http-timeout" -msgstr "http-timeout" - -#. (para) -#: ../source/book.xml:14933 -#, fuzzy -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 0, which instructs the underlying HTTP library, Neon, to use its default timeout setting." -msgstr "等待服务器响应的时间,以秒为单位,如果你的网络速度较慢,导致Subversion的操作超时,你可以加大这个数值,缺省值是0,意思是让HTTP库Neon使用自己的缺省值。" - -#. (literal) -#: ../source/book.xml:14945 -msgid "http-compression" -msgstr "http-compression" - -#. (para) -#: ../source/book.xml:14948 -#, fuzzy -msgid "This specifies whether or not Subversion should attempt to compress network requests made to DAV-ready servers. The default value is yes (though compression will only occur if that capability is compiled into the network layer). Set this to no to disable compression, such as when debugging network transmissions." -msgstr "这说明是否在与设置好DAV的服务器通讯时使用网络压缩请求,缺省值是yes(尽管只有在这个功能编译到网络层时压缩才会有效),设置no来关闭压缩,如调试网络传输时。" - -#. (literal) -#: ../source/book.xml:14959 -msgid "neon-debug-mask" -msgstr "neon-debug-mask" - -#. (para) -#: ../source/book.xml:14962 -#, fuzzy -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 0, which will silence all debugging output. For more information about how Subversion makes use of Neon, see ." -msgstr "只是一个整形的掩码,底层的HTTP库Neon用来选择产生调试的输出,缺省值是0,意思是关闭所有的调试输出,关于Subversion使用Neon的详细信息,见。" - -#. (literal) -#: ../source/book.xml:14972 -msgid "ssl-authority-files" -msgstr "ssl-authority-files" - -#. (para) -#: ../source/book.xml:14975 -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." -msgstr "这是一个分号分割的路径和文件列表,这些文件包含了Subversion客户端在用HTTPS访问时可以接受的认证授权(或者CA)证书。" - -#. (literal) -#: ../source/book.xml:14984 -msgid "ssl-trust-default-ca" -msgstr "ssl-trust-default-ca" - -#. (para) -#: ../source/book.xml:14987 -#, fuzzy -msgid "Set this variable to yes if you want Subversion to automatically trust the set of default CAs that ship with OpenSSL." -msgstr "如果你希望Subversion可以自动相信OpenSSL携带的缺省的CA,可以设置为yes。" - -#. (literal) -#: ../source/book.xml:14994 -msgid "ssl-client-cert-file" -msgstr "ssl-client-cert-file" - -#. (para) -#: ../source/book.xml:14997 -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." -msgstr "如果一个主机(或是一些主机)需要一个SSL客户端证书,你会收到一个提示说需要证书的路径。通过设置这个路径你的Subversion客户端可以自动找到你的证书而不会打扰你。没有标准的存放位置;Subversion会从任何你指定的路径得到这个文件。" - -#. (literal) -#: ../source/book.xml:15009 -msgid "ssl-client-cert-password" -msgstr "ssl-client-cert-password" - -#. (para) -#: ../source/book.xml:15012 -#, fuzzy -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 servers file), then you can set this variable to the certificate's passphrase. You won't be prompted anymore." -msgstr "如果你的SSL客户端证书文件是用密码加密的,Subversion会在每次使用证书时请你输入密码,如果你发现这很讨厌(并且不介意把密码存放在servers文件中),你可以设置这个参数为证书的密码,这样就不会再收到密码输入提示了。" - -#. (title) -#: ../source/book.xml:15026 -msgid "Config" -msgstr "配置" - -#. (para) -#: ../source/book.xml:15028 -#, fuzzy -msgid "The config 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." -msgstr "其它的Subversion运行选项保存在config文件中,这些运行选项与网络连接无关,只是一些正在使用的选项,但是为了应对未来的扩展,也按小节划分成组。" - -#. (para) -#: ../source/book.xml:15033 -#, fuzzy -msgid "The auth section contains settings related to Subversion's authentication and authorization against the repository. It contains:" -msgstr "auth小节保存了Subversion相关的认证和授权的设置,它包括:" - -#. (literal) -#: ../source/book.xml:15039 -msgid "store-passwords" -msgstr "store-passwords" - -#. (para) -#: ../source/book.xml:15042 -#, fuzzy -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 yes. Set this to no to disable this on-disk password caching. You can override this option for a single instance of the svn command using the command-line parameter (for those subcommands that support it). For more information, see ." -msgstr "这告诉Subversion是否缓存服务器认证要求时用户提供的密码,缺省值是yes。设置为no可以关闭在存盘的密码缓存,你可以通过svn命令行参数(那些支持这个参数的子命令)来覆盖这个设置,详细信息请见。" - -#. (literal) -#: ../source/book.xml:15056 -msgid "store-auth-creds" -msgstr "store-auth-creds" - -#. (para) -#: ../source/book.xml:15059 -#, fuzzy -msgid "This setting is the same as store-passwords, except that it enables or disables disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials." -msgstr "这个设置与store-passwords相似,不过设置了这个选项将会保存所有认证信息,如用户名、密码、服务器证书,以及其他任何类型的可以缓存的凭证。" - -#. (para) -#: ../source/book.xml:15068 -#, fuzzy -msgid "The helpers section controls which external applications Subversion uses to accomplish its tasks. Valid options in this section are:" -msgstr "helpers小节控制完成Subversion任务的外部程序,正确的选项包括:" - -#. (literal) -#: ../source/book.xml:15074 -msgid "editor-cmd" -msgstr "editor-cmd" - -#. (para) -#: ../source/book.xml:15077 -#, fuzzy -msgid "This specifies the program Subversion will use to query the user for a log message during a commit operation, such as when using svn commit without either the () or () options. This program is also used with the svn propedit 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 ). 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:" -msgstr "Subversion在提交操作时用来询问用户日志信息的程序,例如使用svn commit而没有指定)或者)选项。这个程序也会与svn propedit一起使用—一个临时文件跳出来包含已经存在的用户希望编辑的属性,然后用户可以对这个属性进行编辑(见),这个选项的缺省值为空,检测编辑器的顺序如下:" - -#. (para) -#: ../source/book.xml:15093 -#, fuzzy -msgid "Command-line option --editor-cmd" -msgstr "命令行选项--editor-cmd" - -#. (para) -#: ../source/book.xml:15096 -#, fuzzy -msgid "Environment variable SVN_EDITOR" -msgstr "环境变量SVN_EDITOR" - -#. (para) -#: ../source/book.xml:15099 -#, fuzzy -msgid "Configuration option editor-cmd" -msgstr "配置选项editor-cmd" - -#. (para) -#: ../source/book.xml:15102 -#, fuzzy -msgid "Environment variable VISUAL" -msgstr "环境变量VISUAL" - -#. (para) -#: ../source/book.xml:15105 -#, fuzzy -msgid "Environment variable EDITOR" -msgstr "环境变量EDITOR" - -#. (para) -#: ../source/book.xml:15108 -msgid "Possibly, a default value built in to Subversion (not present in the official builds)" -msgstr "也有可能Subversion会有一个内置的缺省值(官方编译版本不是如此)" - -#. (para) -#: ../source/book.xml:15112 -#, fuzzy -msgid "The value of any of these options or variables is (unlike diff-cmd) 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." -msgstr "所有这些选项和变量(不像diff-cmd)的值的开头都是shell中要执行的命令行,Subversion会追加一个空格和一个需要编辑的临时文件,编辑器必须修改临时文件,并且返回一个0来表明成功。" - -#. (literal) -#: ../source/book.xml:15122 -msgid "diff-cmd" -msgstr "diff-cmd" - -#. (para) -#: ../source/book.xml:15125 -#, fuzzy -msgid "This specifies the absolute path of a differencing program, used when Subversion generates diff output (such as when using the svn diff command). By default Subversion uses an internal differencing library—setting this option will cause it to perform this task using an external program. See for more details on using such programs." -msgstr "这个命令是比较程序的绝对路径,当Subversion生成了diff输出时(例如当使用svn diff命令)就会使用,缺省Subversion会使用一个内置的比较库—设置这个参数会强制它使用外部程序执行这个任务,此类程序的更多信息见。" - -#. (literal) -#: ../source/book.xml:15138 -msgid "diff3-cmd" -msgstr "diff3-cmd" - -#. (para) -#: ../source/book.xml:15141 -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 for more details on using such programs." -msgstr "这指定了一个三向的比较程序,Subversion使用这个程序来合并用户和从版本库接受的修改,缺省Subversion会使用一个内置的比较库—设置这个参数会导致它会使用外部程序执行这个任务,此类程序的更多信息见。" - -#. (literal) -#: ../source/book.xml:15153 -msgid "diff3-has-program-arg" -msgstr "diff3-has-program-arg" - -#. (para) -#: ../source/book.xml:15156 -#, fuzzy -msgid "This flag should be set to true if the program specified by the diff3-cmd option accepts a command-line parameter." -msgstr "如果diff3-cmd选项设置的程序接受一个命令行参数,这个标记必须设置为true。" - -#. (para) -#: ../source/book.xml:15164 -#, fuzzy -msgid "The tunnels section allows you to define new tunnel schemes for use with svnserve and svn:// client connections. For more details, see ." -msgstr "tunnels小节允许你定义一个svnservesvn://客户端连接使用的管道模式,更多细节见。" - -#. (para) -#: ../source/book.xml:15170 -msgid "Anyone for potluck dinner?" -msgstr "就是一个大杂烩?" - -#. (para) -#: ../source/book.xml:15168 -#, fuzzy -msgid "The miscellany section is where everything that doesn't belong elsewhere winds up. In this section, you can find:" -msgstr "miscellany小节是一些没法归到别处的选项。 在本小节,你会找到:" - -#. (literal) -#: ../source/book.xml:15175 -msgid "global-ignores" -msgstr "global-ignores" - -#. (para) -#: ../source/book.xml:15178 -#, fuzzy -msgid "When running the svn status command, Subversion lists unversioned files and directories along with the versioned ones, annotating them with a ? character (see ). 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 global-ignores 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 *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store." -msgstr "当运行svn status命令时,Subversion会和版本化的文件一样列出未版本化的文件和目录,并使用?字符(见see )标记,有时候察看无关的未版本化文件会很讨厌—比如程序编译产生的对象文件—的显示出来。global-ignores选项是一个空格分隔的列表,用来描述Subversion在它们版本化之前不想显示的文件和目录,缺省值是*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store。" - -#. (para) -#: ../source/book.xml:15191 -#, fuzzy -msgid "As well as svn status, the svn add and svn import 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 command-line flag." -msgstr "就像svn statussvn addsvn import命令也会忽略匹配这个列表的文件,你可以用单个的命令行参数来覆盖这个选项,关于更加细致的控制忽略的项目,见。" - -#. (para) -#: ../source/book.xml:15198 -msgid "For information on more fine-grained control of ignored items, see ." -msgstr "For information on more fine-grained control of ignored items, see ." - -#. (literal) -#: ../source/book.xml:15204 -msgid "enable-auto-props" -msgstr "enable-auto-props" - -#. (para) -#: ../source/book.xml:15207 -#, fuzzy -msgid "This instructs Subversion to automatically set properties on newly added or imported files. The default value is no, so set this to yes to enable Auto-props. The auto-props section of this file specifies which properties are to be set on which files." -msgstr "这里指示Subversion自动对新加的或者导入的文件设置属性,缺省值是no,可以设置为yes来开启自动添加属性,这个文件的auto-props小节会说明哪些属性会被设置到哪些文件。" - -#. (literal) -#: ../source/book.xml:15217 -msgid "log-encoding" -msgstr "log-encoding" - -#. (para) -#: ../source/book.xml:15220 -msgid "This variable sets the default character set encoding for commit log messages. It's a permanent form of the option (see ). 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." -msgstr "这个变量设置提交日志缺省的字符集,是选项(见)的永久形式,Subversion版本库保存了一些UTF-8的日志信息,并且假定你的日志信息是用操作系统的本地编码,如果你提交的信息使用别的编码方式,你一定要指定不同的编码。" - -#. (literal) -#: ../source/book.xml:15233 -msgid "use-commit-times" -msgstr "use-commit-times" - -#. (para) -#: ../source/book.xml:15236 -#, fuzzy -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 svn 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." -msgstr "通常你的工作拷贝文件会有最后一次被进程访问的时间戳,不管是你自己的编辑器还是用svn子命令。这通常对人们开发软件提供了便利,因为编译系统通常会通过查看时间戳来决定那些文件需要重新编译。" - -#. (para) -#: ../source/book.xml:15243 -#, fuzzy -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 svn export command always places these last-commit timestamps on trees that it produces. By setting this config variable to yes, the svn checkout, svn update, svn switch, and svn revert commands will also set last-commit timestamps on files that they touch." -msgstr "在其他情形,有时候如果工作拷贝的文件时间戳反映了上一次在版本库中更改的时间会非常好,svn export命令会一直放置这些上次提交的时间戳放到它创建的目录树。通过设置这个config参数为yessvn checkoutsvn updatesvn switchsvn revert命令也会为它们操作的文件设置上次提交的时间戳。" - -#. (para) -#: ../source/book.xml:15260 -#, fuzzy -msgid "The auto-props 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 PATTERN = PROPNAME=PROPVALUE where PATTERN 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 override another. You can find several examples of auto-props usage in the config file. Lastly, don't forget to set enable-auto-props to yes in the miscellany section if you want to enable auto-props." -msgstr "auto-props小节控制Subversion客户端自动设置提交和导入的文件的属性的能力,它可以包含任意数量的键-值对,格式是PATTERN = PROPNAME=PROPVALUE,其中PATTERN是一个文件模式,匹配一系列文件名,此行其它两项为属性和值。如果一个文件匹配多次,会导致有多个属性集;然而,没有手段保障自动属性不会按照配置文件中的顺序应用,所以你可以一个规则覆盖另一个。你可以在config文件找到许多自动属性的用法实例。最后,如果你希望开启自动属性,不要忘了设置miscellany小节的enable-auto-propsyes。" - -#. (title) -#: ../source/book.xml:15286 -msgid "Localization" -msgstr "本地化" - -#. (para) -#: ../source/book.xml:15288 -msgid "Localization 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 localized. This section describes steps Subversion has made towards localization." -msgstr "本地化是让程序按照地区特定方式运行的行为,如果一个程序的格式、数字或者是日期是你的本地方式,或者是打印的信息(或者是接受的输入)是你本地的语言,这个程序被叫做已经本地化了,这部分描述了针对本地化的Subversion的步骤。" - -#. (title) -#: ../source/book.xml:15298 -msgid "Understanding locales" -msgstr "理解地区" - -#. (para) -#: ../source/book.xml:15300 -msgid "Most modern operating systems have a notion of the current locale—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." -msgstr "许多现代操作系统都有一个当前地区的概念—也就是本地化习惯服务的国家和地区。这些习惯—通常是被一些运行配置机制选择—影响程序展现数据的方式,也有接受用户输入的方式。" - -#. (para) -#: ../source/book.xml:15307 -#, fuzzy -msgid "On most Unix-like systems, you can check the values of the locale-related runtime configuration options by running the locale command:" -msgstr "在类Unix的系统,你可以运行locale命令来检查本地关联的运行配置的选项值:" - -#. (screen) -#: ../source/book.xml:15310 -#, no-wrap -msgid "" -"\n" -"$ locale\n" -"LANG=\n" -"LC_COLLATE=\"C\"\n" -"LC_CTYPE=\"C\"\n" -"LC_MESSAGES=\"C\"\n" -"LC_MONETARY=\"C\"\n" -"LC_NUMERIC=\"C\"\n" -"LC_TIME=\"C\"\n" -"LC_ALL=\"C\"\n" -msgstr "" -"\n" -"$ locale\n" -"LANG=\n" -"LC_COLLATE=\"C\"\n" -"LC_CTYPE=\"C\"\n" -"LC_MESSAGES=\"C\"\n" -"LC_MONETARY=\"C\"\n" -"LC_NUMERIC=\"C\"\n" -"LC_TIME=\"C\"\n" -"LC_ALL=\"C\"\n" - -#. (para) -#: ../source/book.xml:15321 -#, fuzzy -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 C locale, but users can set these variables to specific country/language code combinations. For example, if one were to set the LC_TIME variable to fr_CA, 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 LC_MESSAGES variable to zh_TW, then programs would know to present human-readable messages in Traditional Chinese. Setting the LC_ALL variable has the effect of changing every locale variable to the same value. The value of LANG 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 locale -a." -msgstr "输出是一个本地相关的环境变量和它们的值,在这个例子里,所有的变量设置为缺省的C地区,但是用户可以设置这些变量为特定的国家/语言代码组合。举个例子,如果有人设置LC_TIME变量为fr_CA,然后程序会知道使用讲法语的加拿大期望的格式来显示时间和日期信息。如果一个人会设置LC_MESSAGES变量为zh_TW,程序会知道使用繁体中文显示可读信息。如果设置LC_ALL的效果同分别设置所有的位置变量为同一个值有相同的效果。LANG用来作为没有设置地区变量的缺省值,为了查看Unix系统所有的地区列表,运行locale -a命令。" - -#. (para) -#: ../source/book.xml:15339 -msgid "On Windows, locale configuration is done via the Regional and Language Options 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." -msgstr "在Windows,地区配置是通过地区和语言选项控制面板管理的,可以从已存在的地区查看选择,甚至可以自定义(会是个很讨厌的复杂事情)许多显示格式习惯。" - -#. (title) -#: ../source/book.xml:15349 -msgid "Subversion's use of locales" -msgstr "Subversion 对地区的支持" - -#. (para) -#: ../source/book.xml:15351 -#, fuzzy -msgid "The Subversion client, svn, honors the current locale configuration in two ways. First, it notices the value of the LC_MESSAGES variable and attempts to print all messages in the specified language. For example:" -msgstr "Subversion客户端,svn通过两种方式支持当前的地区配置。首先,它会注意LC_MESSAGES的值,然后尝试使用特定的语言打印所有的信息,例如:" - -#. (screen) -#: ../source/book.xml:15356 -#, no-wrap -msgid "" -"\n" -"$ export LC_MESSAGES=de_DE\n" -"$ svn help cat\n" -"cat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.\n" -"Aufruf: cat ZIEL[@REV]...\n" -"…\n" -msgstr "" -"\n" -"$ export LC_MESSAGES=de_DE\n" -"$ svn help cat\n" -"cat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.\n" -"Aufruf: cat ZIEL[@REV]...\n" -"…\n" - -#. (para) -#: ../source/book.xml:15363 -#, fuzzy -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 .mo filename extension. For example, the German translation file is named de.mo. These translation files are installed somewhere on your system. On Unix, they typically live in /usr/share/locale/, while on Windows they're often found in the \\share\\locale\\ folder in Subversion's installation area. Once installed, a module is named after the program it provides translations for. For example, the de.mo file may ultimately end up installed as /usr/share/locale/de/LC_MESSAGES/subversion.mo. By browsing the installed .mo files, you can see which languages the Subversion client is able to speak." -msgstr "这个行为在Unix和Windows上同样工作,注意,尽管有时你的操作系统支持某个地区,Subversion客户端可能不能讲特定的语言。为了制作本地化信息,志愿者可以提供各种语言的翻译。翻译使用GNU gettext包编写,相关的翻译模块使用.mo作为后缀名。举个例子,德国翻译文件为de.mo。翻译文件安装到你的系统的某个位置,在Unix它们会在/usr/share/locale/,而在Windows它们通常会在Subversion安装的\\share\\locale\\目录。一旦安装,一个命名在程序后面的模块会为此提供翻译。举个例子,de.mo会最终安装到/usr/share/locale/de/LC_MESSAGES/subversion.mo,通过查看安装的.mo文件,我们可以看到Subversion支持的语言。" - -#. (para) -#: ../source/book.xml:15385 -#, fuzzy -msgid "The second way in which the locale is honored involves how svn interprets your input. The repository stores all paths, filenames, and log messages in Unicode, encoded as UTF-8. In that sense, the repository is internationalized—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." -msgstr "第二种支持地区设置的方式包括svn怎样解释你的输入,版本库使用UTF-8保存了所有的路径,文件名和日志信息。在这种情况下,版本库是国际化的—也就是版本库准备接受任何人类的语言。这意味着,无论如何Subversion客户端要负责发送UTF-8的文件名和日志信息到版本库,为此,必须将数据从本地位置转化为UTF-8。" - -#. (para) -#: ../source/book.xml:15395 -#, fuzzy -msgid "For example, suppose you create a file named caffè.txt, and then when committing the file, you write the log message as Adesso il caffè è più forte. Both the filename and log message contain non-ASCII characters, but because your locale is set to it_IT, 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." -msgstr "举个例子,你创建了一个文件叫做caffè.txt,然后提交了这个文件,你写的日志信息是Adesso il caffè è più forte,文件名和日志信息都包含非ASCII字符,但是因为你的位置设置为it_IT,Subversion知道把它们作为意大利语解释,在发送到版本库之前,它用意大利字符集转化数据为UTF-8。" - -#. (para) -#: ../source/book.xml:15404 -msgid "Note that while the repository demands UTF-8 filenames and log messages, it does not 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." -msgstr "注意当版本库要求UTF-8文件名和日志信息时,它不会注意到文件的内容,Subversion会把文件内容看作字节串,没有任何客户端和服务器会尝试理解或是编码这些内容。" - -#. (title) -#: ../source/book.xml:15412 -msgid "Character set conversion errors" -msgstr "字符集转换错误" - -#. (para) -#: ../source/book.xml:15414 -msgid "While using Subversion, you might get hit with an error related to character set conversions:" -msgstr "当使用Subversion,你或许会碰到一个字符集转化关联的错误:" - -#. (screen) -#: ../source/book.xml:15416 -#, no-wrap -msgid "" -"\n" -"svn: Can't convert string from native encoding to 'UTF-8':\n" -"…\n" -"svn: Can't convert string from 'UTF-8' to native encoding:\n" -"…\n" -msgstr "" -"\n" -"svn: Can't convert string from native encoding to 'UTF-8':\n" -"…\n" -"svn: Can't convert string from 'UTF-8' to native encoding:\n" -"…\n" - -#. (para) -#: ../source/book.xml:15422 -#, fuzzy -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 en_US but a collaborator has committed a Japanese filename, you're likely to see this error when you receive the file during an svn update." -msgstr "这个错误信息通常会发生在Subversion客户端从版本库接收到一个UTF-8串,但字符不能转化为当前的地区文字时,举个例子,如果你的地区设置是en_US,但是一个写作者使用日本文件名提交,你会在svn update接受文件时会看到这个错误。" - -#. (para) -#: ../source/book.xml:15430 -msgid "The solution is either to set your locale to something which can 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.)" -msgstr "解决方案或者是设置你的地区为可以表示即将到来的UTF-8数据,或者是修改版本库的文件名或信息。(不要忘记和你的合作者拍拍手—项目必须首先决定通用的语言,这样所有的参与者会使用相同的地区设置。)" - -#. (title) -#: ../source/book.xml:15445 -msgid "Using External Differencing Tools" -msgstr "使用外置比较工具" - -#. (para) -#: ../source/book.xml:15447 -msgid "The presence of and options, and similarly named runtime configuration parameters (see ), can lead to a false notion of how easy it is to use external differencing (or diff) 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." -msgstr "选项的形式相似,也有类似名称的运行配置参数(见),这会导致一个错误的观念,也就是在Subversion中使用外置的比较(或diff)和合并工具会非常的容易,虽然Subversion可以使用大多数类似的工具,但是设置这些工具绝非易事。" - -#. (para) -#: ../source/book.xml:15465 -msgid "Subversion developers are good, but even the best make mistakes." -msgstr "Subversion的开发者很好,但最好的也会发生错误。" - -#. (para) -#: ../source/book.xml:15455 -#, fuzzy -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 diff and diff3 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, the and 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." -msgstr "Subversion和外置比较和合并工具的接口可以追溯到很久以前,当时Subversion的唯一文本比较能力是建立在GNU的工具链之上,特别是diffdiff3工具,为了得到Subversion需要的方式,它使用非常复杂的选项和参数调用这些工具,而这些选项和参数都是工具特定的,渐渐的,Subversion发展了自己的比较区别库作为备份机制。选项是添加到Subversion的命令行客户端,所以用户可以更加容易的指明他们最喜欢的使用的GNU diff和diff3工具,而不是新奇的内置比较库,如果使用了这些选项,Subversion会忽略内置的比较库,转而使用外置程序,使用冗长的参数列表,目前还是这种情况。" - -#. (para) -#: ../source/book.xml:15475 -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." -msgstr "人们很快意识到使用简单的配置机制必须使Subversion使用位于特定位置的GNU diff和diff3工具,毕竟,Subversion并不验证其被告之要执行的程序是否是GNU的工具链的比较工具。唯一可以配置的方面是外置工具在系统的位置—而不是选项集,参数顺序等等。Subversion一直将这些GNU工具选项发给你的外置比较工具,而不管程序是否可以理解那些选项,那不是所有用户直觉的方式。" - -#. (para) -#: ../source/book.xml:15488 -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." -msgstr "使用外置比较和合并工具的关键是使用包裹脚本将Subversion的输出转化为你的脚本程序可以理解的形式,然后将这些比较工具的输出转化为你的Subversion期望的格式—GNU工具可能使用的格式,下面的小节覆盖了那些期望格式的细节。" - -#. (para) -#: ../source/book.xml:15497 -#, fuzzy -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 svn:mime-type 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 application/msword). For more about MIME type settings, see " -msgstr "何时启动文本比较或合并的决定完全是Subversion的决定,而这个决定是根据文件的svn:mime-type属性作出的,这意味着,例如,即使你有一个可以识别Microsoft Word格式的比较或合并工具,当你对一个Word文件设置为非人工可读(例如application/msword)时,依然不会调用这个识别Word的工具。关于MIME type的设定,可以见。" - -#. (title) -#: ../source/book.xml:15514 -msgid "External diff" -msgstr "外置 diff" - -#. (para) -#: ../source/book.xml:15530 -msgid "The GNU diff manual page puts it this way: An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble." -msgstr "GNU的diff手册这样说的:返回0意味着没有区别,1是有有区别,其它值意味着出现问题。" - -#. (para) -#: ../source/book.xml:15516 -#, fuzzy -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 backgrounded), 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. " -msgstr "Subversion可以调用适合GNU参数的diff工具,并期望外置程序能够返回成功的错误代码。对于大多数可用的diff程序,只有第6、7参数,diff两边文件的路径。需要注意Subversion对于每个修改的文件都要以异步方式(或后台)运行diff程序,你会得到许多并行的实例。最后,Subversion期望你的程序在发现区别时返回错误代码1,没有区别则返回0—任何其他的返回值都被认为是严重错误。 " - -#. (para) -#: ../source/book.xml:15534 -msgid " and are templates for external diff tool wrappers in the Bourne shell and Windows batch scripting languages, respectively." -msgstr "分别是Bourne shell和Windows批处理外置diff工具的包裹器模版。" - -#. (title) -#: ../source/book.xml:15541 -msgid "diffwrap.sh" -msgstr "diffwrap.sh" - -#. (programlisting) -#: ../source/book.xml:15543 -#, no-wrap -msgid "" -"\n" -"#!/bin/sh\n" -"\n" -"# Configure your favorite diff program here.\n" -"DIFF=\"/usr/local/bin/my-diff-tool\"\n" -"\n" -"# Subversion provides the paths we need as the sixth and seventh \n" -"# parameters.\n" -"LEFT=${6}\n" -"RIGHT=${7}\n" -"\n" -"# Call the diff command (change the following line to make sense for\n" -"# your merge program).\n" -"$DIFF --left $LEFT --right $RIGHT\n" -"\n" -"# Return an errorcode of 0 if no differences were detected, 1 if some were.\n" -"# Any other errorcode will be treated as fatal.\n" -msgstr "" -"\n" -"#!/bin/sh\n" -"\n" -"# Configure your favorite diff program here.\n" -"DIFF=\"/usr/local/bin/my-diff-tool\"\n" -"\n" -"# Subversion provides the paths we need as the sixth and seventh \n" -"# parameters.\n" -"LEFT=${6}\n" -"RIGHT=${7}\n" -"\n" -"# Call the diff command (change the following line to make sense for\n" -"# your merge program).\n" -"$DIFF --left $LEFT --right $RIGHT\n" -"\n" -"# Return an errorcode of 0 if no differences were detected, 1 if some were.\n" -"# Any other errorcode will be treated as fatal.\n" - -#. (title) -#: ../source/book.xml:15564 -msgid "diffwrap.bat" -msgstr "diffwrap.bat" - -#. (programlisting) -#: ../source/book.xml:15566 -#, no-wrap -msgid "" -"\n" -"@ECHO OFF\n" -"\n" -"REM Configure your favorite diff program here.\n" -"SET DIFF=\"C:\\Program Files\\Funky Stuff\\My Diff Tool.exe\"\n" -"\n" -"REM Subversion provides the paths we need as the sixth and seventh \n" -"REM parameters.\n" -"SET LEFT=%6\n" -"SET RIGHT=%7\n" -"\n" -"REM Call the diff command (change the following line to make sense for\n" -"REM your merge program).\n" -"%DIFF% --left %LEFT% --right %RIGHT%\n" -"\n" -"REM Return an errorcode of 0 if no differences were detected, 1 if some were.\n" -"REM Any other errorcode will be treated as fatal.\n" -msgstr "" -"\n" -"@ECHO OFF\n" -"\n" -"REM Configure your favorite diff program here.\n" -"SET DIFF=\"C:\\Program Files\\Funky Stuff\\My Diff Tool.exe\"\n" -"\n" -"REM Subversion provides the paths we need as the sixth and seventh \n" -"REM parameters.\n" -"SET LEFT=%6\n" -"SET RIGHT=%7\n" -"\n" -"REM Call the diff command (change the following line to make sense for\n" -"REM your merge program).\n" -"%DIFF% --left %LEFT% --right %RIGHT%\n" -"\n" -"REM Return an errorcode of 0 if no differences were detected, 1 if some were.\n" -"REM Any other errorcode will be treated as fatal.\n" - -#. (title) -#: ../source/book.xml:15589 -msgid "External diff3" -msgstr "外置 diff3" - -#. (para) -#: ../source/book.xml:15591 -#, fuzzy -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 mine, older, and yours 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." -msgstr "Subversion按照符合GNU的diff3的参数调用合并程序,期望外置程序会返回成功的错误代码,并且完整合并的文件结果打印到标准输出(这样Subversion可以重定向这些东西到适当的版本控制下的文件)。对于大多数可选的合并程序,只有第9、10和11参数,分别代表mineolderyours的路径。需要注意,因为Subversion依赖于你的合并程序的输出,你的包裹脚本在输出发送到Subversion之前不要退出。当最终退出,如果合并成功返回0,如果有为解决的冲突则返回1—其它返回值都是严重错误。" - -#. (para) -#: ../source/book.xml:15608 -msgid " and are templates for external merge tool wrappers in the Bourne shell and Windows batch scripting languages, respectively." -msgstr "分别是Bourne shell和Windows批处理外置diff工具的包裹器模版。" - -#. (title) -#: ../source/book.xml:15614 -msgid "diff3wrap.sh" -msgstr "diff3wrap.sh" - -#. (programlisting) -#: ../source/book.xml:15616 -#, no-wrap -msgid "" -"\n" -"#!/bin/sh\n" -"\n" -"# Configure your favorite diff3/merge program here.\n" -"DIFF3=\"/usr/local/bin/my-merge-tool\"\n" -"\n" -"# Subversion provides the paths we need as the ninth, tenth, and eleventh \n" -"# parameters.\n" -"MINE=${9}\n" -"OLDER=${10}\n" -"YOURS=${11}\n" -"\n" -"# Call the merge command (change the following line to make sense for\n" -"# your merge program).\n" -"$DIFF3 --older $OLDER --mine $MINE --yours $YOURS\n" -"\n" -"# After performing the merge, this script needs to print the contents\n" -"# of the merged file to stdout. Do that in whatever way you see fit.\n" -"# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n" -"# remain in the result. Any other errorcode will be treated as fatal.\n" -msgstr "" -"\n" -"#!/bin/sh\n" -"\n" -"# Configure your favorite diff3/merge program here.\n" -"DIFF3=\"/usr/local/bin/my-merge-tool\"\n" -"\n" -"# Subversion provides the paths we need as the ninth, tenth, and eleventh \n" -"# parameters.\n" -"MINE=${9}\n" -"OLDER=${10}\n" -"YOURS=${11}\n" -"\n" -"# Call the merge command (change the following line to make sense for\n" -"# your merge program).\n" -"$DIFF3 --older $OLDER --mine $MINE --yours $YOURS\n" -"\n" -"# After performing the merge, this script needs to print the contents\n" -"# of the merged file to stdout. Do that in whatever way you see fit.\n" -"# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n" -"# remain in the result. Any other errorcode will be treated as fatal.\n" - -#. (title) -#: ../source/book.xml:15640 -msgid "diff3wrap.bat" -msgstr "diff3wrap.bat" - -#. (programlisting) -#: ../source/book.xml:15642 -#, no-wrap -msgid "" -"\n" -"@ECHO OFF\n" -"\n" -"REM Configure your favorite diff3/merge program here.\n" -"SET DIFF3=\"C:\\Program Files\\Funky Stuff\\My Merge Tool.exe\"\n" -"\n" -"REM Subversion provides the paths we need as the ninth, tenth, and eleventh \n" -"REM parameters. But we only have access to nine parameters at a time, so we\n" -"REM shift our nine-parameter window twice to let us get to what we need.\n" -"SHIFT\n" -"SHIFT\n" -"SET MINE=%7\n" -"SET OLDER=%8\n" -"SET YOURS=%9\n" -"\n" -"REM Call the merge command (change the following line to make sense for\n" -"REM your merge program).\n" -"%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%\n" -"\n" -"REM After performing the merge, this script needs to print the contents\n" -"REM of the merged file to stdout. Do that in whatever way you see fit.\n" -"REM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n" -"REM remain in the result. Any other errorcode will be treated as fatal.\n" -msgstr "" -"\n" -"@ECHO OFF\n" -"\n" -"REM Configure your favorite diff3/merge program here.\n" -"SET DIFF3=\"C:\\Program Files\\Funky Stuff\\My Merge Tool.exe\"\n" -"\n" -"REM Subversion provides the paths we need as the ninth, tenth, and eleventh \n" -"REM parameters. But we only have access to nine parameters at a time, so we\n" -"REM shift our nine-parameter window twice to let us get to what we need.\n" -"SHIFT\n" -"SHIFT\n" -"SET MINE=%7\n" -"SET OLDER=%8\n" -"SET YOURS=%9\n" -"\n" -"REM Call the merge command (change the following line to make sense for\n" -"REM your merge program).\n" -"%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%\n" -"\n" -"REM After performing the merge, this script needs to print the contents\n" -"REM of the merged file to stdout. Do that in whatever way you see fit.\n" -"REM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts\n" -"REM remain in the result. Any other errorcode will be treated as fatal.\n" - -#. (title) -#: ../source/book.xml:15677 -msgid "Embedding Subversion" -msgstr "嵌入 Subversion" - -#. (para) -#: ../source/book.xml:15679 -#, fuzzy -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." -msgstr "Subversion有一个模块化的设计,以库的形式由C编写和实现。每个库都有一个定义良好的目的和API,而且这些接口不仅仅为了Subversion本身使用,也可以为任何希望嵌入编程方式控制Subversion的软件。此外,Subversion的API不仅仅可以为C程序使用,也可以使用如Ptyhon、Perl、Java或Ruby等高级语言调用。" - -#. (para) -#: ../source/book.xml:15688 -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." -msgstr "本章是为那些希望编写代码或其他语言绑定与Subversion交互的人准备的。如果" - -#. (title) -#: ../source/book.xml:15704 -msgid "Layered Library Design" -msgstr "分层的库设计" - -#. (para) -#: ../source/book.xml:15706 -#, fuzzy -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 ). 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.)." -msgstr "每个Subversion核心模块都属于三层中的某一层—版本库层、版本库访问(RA)层或是客户端层。我们很快就会考察这些层,但首先让我们看一下Subversion库的摘要目录,为了一致性,我们将通过它们的无扩展Unix库名(例如libsvn_fs、libsvn_wc和mod_dav_svn)来引用它们。" - -#. (term) -#: ../source/book.xml:15715 -msgid "libsvn_client" -msgstr "libsvn_client" - -#. (para) -#: ../source/book.xml:15717 -msgid "Primary interface for client programs" -msgstr "客户端程序的主要接口" - -#. (term) -#: ../source/book.xml:15722 -msgid "libsvn_delta" -msgstr "libsvn_delta" - -#. (para) -#: ../source/book.xml:15724 -msgid "Tree and byte-stream differencing routines" -msgstr "目录树和文本区别程序" - -#. (term) -#: ../source/book.xml:15729 -msgid "libsvn_diff" -msgstr "libsvn_diff" - -#. (para) -#: ../source/book.xml:15731 -msgid "Contextual differencing and merging routines" -msgstr "上下文区别和合并例程" - -#. (term) -#: ../source/book.xml:15736 -msgid "libsvn_fs" -msgstr "libsvn_fs" - -#. (para) -#: ../source/book.xml:15738 -msgid "Filesystem commons and module loader" -msgstr "Subversion文件系统库和模块加载器" - -#. (term) -#: ../source/book.xml:15743 -msgid "libsvn_fs_base" -msgstr "libsvn_fs_base" - -#. (para) -#: ../source/book.xml:15745 -msgid "The Berkeley DB filesystem back-end" -msgstr "Berkeley DB文件系统后端" - -#. (term) -#: ../source/book.xml:15750 -msgid "libsvn_fs_fs" -msgstr "libsvn_fs_fs" - -#. (para) -#: ../source/book.xml:15752 -msgid "The native filesystem (FSFS) back-end" -msgstr "本地文件系统(FSFS)后端" - -#. (term) -#: ../source/book.xml:15757 -msgid "libsvn_ra" -msgstr "libsvn_ra" - -#. (para) -#: ../source/book.xml:15759 -msgid "Repository Access commons and module loader" -msgstr "版本库访问通用组件和模块装载器" - -#. (term) -#: ../source/book.xml:15764 -msgid "libsvn_ra_dav" -msgstr "libsvn_ra_dav" - -#. (para) -#: ../source/book.xml:15766 -msgid "The WebDAV Repository Access module" -msgstr "WebDAV版本库访问模块" - -#. (term) -#: ../source/book.xml:15771 -msgid "libsvn_ra_local" -msgstr "libsvn_ra_local" - -#. (para) -#: ../source/book.xml:15773 -msgid "The local Repository Access module" -msgstr "本地版本库访问模块" - -#. (term) -#: ../source/book.xml:15778 -msgid "libsvn_ra_serf" -msgstr "libsvn_ra_serf" - -#. (para) -#: ../source/book.xml:15780 -msgid "Another (experimental) WebDAV Repository Access module" -msgstr "另一个(实验性的) WebDAV 版本库访问模块" - -#. (term) -#: ../source/book.xml:15785 -msgid "libsvn_ra_svn" -msgstr "libsvn_ra_svn" - -#. (para) -#: ../source/book.xml:15787 -msgid "The custom protocol Repository Access module" -msgstr "一个自定义版本库访问模块" - -#. (term) -#: ../source/book.xml:15792 -msgid "libsvn_repos" -msgstr "libsvn_repos" - -#. (para) -#: ../source/book.xml:15794 -msgid "Repository interface" -msgstr "版本库接口" - -#. (term) -#: ../source/book.xml:15798 -msgid "libsvn_subr" -msgstr "libsvn_subr" - -#. (para) -#: ../source/book.xml:15800 -msgid "Miscellaneous helpful subroutines" -msgstr "各色各样的有用的子程序" - -#. (term) -#: ../source/book.xml:15805 -msgid "libsvn_wc" -msgstr "libsvn_wc" - -#. (para) -#: ../source/book.xml:15807 -msgid "The working copy management library" -msgstr "工作拷贝管理库" - -#. (term) -#: ../source/book.xml:15812 -msgid "mod_authz_svn" -msgstr "mod_authz_svn" - -#. (para) -#: ../source/book.xml:15814 -msgid "Apache authorization module for Subversion repositories access via WebDAV" -msgstr "使用WebDAV访问Subversion版本库的Apache授权模块" - -#. (para) -#: ../source/book.xml:15821 -msgid "Apache module for mapping WebDAV operations to Subversion ones" -msgstr "影射WebDAV操作为Subversion操作的Apache模块" - -#. (para) -#: ../source/book.xml:15826 -#, fuzzy -msgid "The fact that the word miscellaneous 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 big picture that allows you to pinpoint the location of certain pieces of functionality with relative ease." -msgstr "单词各色各样的只在列表中出现过一次是一个好的迹象。Subversion开发团队非常注意将功能归入合适的层和库,或许模块化设计最大的好处就是从开发者的角度看减少了复杂性。作为一个开发者,你可以很快就描画出一副大图像,以便于你更精确地,也相对容易地找出某一功能所在的位置。" - -#. (para) -#: ../source/book.xml:15835 -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." -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库连接。" - -#. (para) -#: ../source/book.xml:15847 -#, fuzzy -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 ). So while the Subversion distribution provides only the svn 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." -msgstr "客户端本身也得益于Subversion设计的模块化,Subversion的libsvn_client库提供了设计一个Subversion工作客户端(见)的绝大多数功能。所以尽管Subversion的发布版只有svn命令行客户端程序,依然有许多第三方的程序提供了各种形式的图形化客户端UI。这些GUI使用的API与命令行客户端完全相同。模块化类型的API的促使了大量Subversion客户端和IDE集成插件使用Subversion本身。" - -#. (title) -#: ../source/book.xml:15862 -msgid "Repository Layer" -msgstr "版本库层" - -#. (para) -#: ../source/book.xml:15864 -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 other end of the line." -msgstr "当提到Subversion版本库层时,我们通常会讨论两个基本概念—版本化文件系统实现(通过libsvn_fs访问,libsvn_fs_base和libsvn_fs_fs支持),和包装在外的(以libsvn_repos实现)版本库逻辑。这些库提供了版本控制数据的存储和报告机制,这些层通过版本库访问层连接客户端层,从Subversion用户的角度,这些事情在整个过程的另一端。" - -#. (para) -#: ../source/book.xml:15875 -#, fuzzy -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 files and directories 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 .) 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." -msgstr "Subversion文件系统通过libsvn_fs API来访问,它并不是一个安装在操作系统之上的内核级的文件系统(例如Linux ext2或NTFS),而是一个虚拟文件系统。它并未将文件目录保存为真实的文件和目录(也就是用你熟知的shell程序可以浏览的那种),而是采用了一种抽象的后端存储方式,这个后端存储方式有两种—一个是Berkeley DB数据库环境,另一个是普通文件表示。(要了解更多关于版本库后端的信息,请看)。除此之外,开发社区也非常有兴趣考虑在Subversion的未来版本 中提供某种使用其它后端数据库系统的能力,也许是开放式数据库连接(ODBC)的机制。实际上,Google在2006中期启动Google Code主机服务项目之前做了一些类似的事情,它的部分开源项目组成员编写了新的Subversion文件系统,使用了他们的扩展性极好的Bigtable数据存储。" - -#. (para) -#: ../source/book.xml:15893 -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 (properties) 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." -msgstr "libsvn_fs支持的文件系统API包含了所有其他文件系统的功能:你可以创建和删除文件和目录、拷贝和移动、修改文件内容等等。它也包含了一些不太常用的特性,如对任意文件和目录添加、修改和删除元数据(properties)的能力。此外,Subversion文件系统是一个版本化的文件系统,意味着你修改你的目录树时,Subversion会记住修改以前的样子。也可以回到所有初始化版本库之后(且仅仅之后)的版本。" - -#. (para) -#: ../source/book.xml:15907 -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:" -msgstr "所有你对目录树的修改包含在Subversion事务的上下文中,下面描述了修改文件系统的例程:" - -#. (para) -#: ../source/book.xml:15913 -msgid "Begin a Subversion commit transaction." -msgstr "开始 Subversion 的提交事务。" - -#. (para) -#: ../source/book.xml:15916 -msgid "Make your changes (adds, deletes, property modifications, etc.)." -msgstr "作出修改(添加、删除、属性修改等等。)。" - -#. (para) -#: ../source/book.xml:15920 -msgid "Commit your transaction." -msgstr "提交事务。" - -#. (para) -#: ../source/book.xml:15923 -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 the way things were." -msgstr "一旦你提交了你的事务,你的文件系统修改就会永久的作为历史保存起来,每个这样的周期会产生一个新的树,所有的修订版本都是永远可以访问的一个不变的快照。" - -#. (title) -#: ../source/book.xml:15930 -msgid "The Transaction Distraction" -msgstr "事务的其它信息" - -#. (para) -#: ../source/book.xml:15932 -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 none of them ever happened—and in a way that does not interfere with other processes acting on the data." -msgstr "Subversion的事务概念,特别是在libsvn_fs中的数据库附近的代码,很容易与低层提供支持的数据库事务混淆。两种类型事务都提供了原子和隔离操作,换句话说,事务给你能力可以用全部或者没有样式执行一系列的动作—所有的动作都完全成功,或者是所有的没有发生—而且不会干扰别人操作数据。" - -#. (para) -#: ../source/book.xml:15944 -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)!" -msgstr "数据库事务通常围绕着一些对数据库本身的数据修改相关的小操作(如修改表行的内容),Subversion是更大范围的事务,围绕着一些高一级的操作,如下一个修订版本文件系统的一组文件和目录的修改。如果这还不是很混乱,考虑这个:Subversion在创建Subversion事务(所以如果Subversion创建事务失败,数据库会看起来我们从来没有尝试创建)时会使用一个数据库事务!" - -#. (para) -#: ../source/book.xml:15957 -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)." -msgstr "很幸运的是用户的文件系统API,数据库提供的事务支持本身几乎完全从外表隐藏(也是一个完全模块化的模式所应该的)。只有当你开始研究文件系统本身的实现时,这些事情才可见(或者是开始感兴趣)。" - -#. (para) -#: ../source/book.xml:15965 -#, fuzzy -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 /foo/bar, 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." -msgstr "大多数文件系统接口提供的功能作为一个动作发生在一个文件系统路径上,也就是,从文件系统的外部,描述和访问文件和目录独立版本的主要机制是经过如/foo/bar的路径,就像你在喜欢的shell程序中定位文件和目录。你通过传递它们的路径到相应的API功能来添加新的文件和目录,查询这些信息也是同样的机制。" - -#. (para) -#: ../source/book.xml:15975 -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. shows a typical representation of a tree as exactly that." -msgstr "然而,不像大多数文件系统,一个单独的路径不足以在Subversion定位一个文件或目录,可以把目录树看作一个二维的系统,一个节点的兄弟代表了一种从左到右的动作,并且递减到子目录是一个向下的动作,展示了一个典型的树的形式。" - -#. (title) -#: ../source/book.xml:15984 -msgid "Files and directories in two dimensions" -msgstr "二维的文件和目录" - -#. (para) -#: ../source/book.xml:15995 -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 fourth dimension, and we apologize for any emotional trauma induced by our assertion of a different theory." -msgstr "我们理解这一定会给科幻小说迷带来一个震撼,他们认为时间是第四维的,我们要为提出这样一个不同理论的断言而伤害了他们的作出道歉。" - -#. (para) -#: ../source/book.xml:15992 -#, fuzzy -msgid "The difference here is that the Subversion filesystem has a nifty third dimension that most filesystems do not have—Time! In the filesystem interface, nearly every function that has a path argument also expects a root 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 /foo/bar in revision 32, and the same path as it exists in revision 98. shows revision history as an added dimension to the Subversion filesystem universe." -msgstr "当然,Subversion文件系统有一个其它文件系统所没有的第三维—时间!在一个文件系统接口,几乎所有的功能都有个路径参数,也期望一个root参数。svn_fs_root_t参数不仅描述了一个修订版本或一个Subversion事务(通常正好是一个修订版本),而且提供了用来区分修订版本32的/foo/bar和修订版本98在同样路径的三维上下文环境。展示了修订版本历史作为添加的纬度进入到Subversion文件系统领域。" - -#. (title) -#: ../source/book.xml:16013 -msgid "Versioning time—the third dimension!" -msgstr "版本时间—第三维!" - -#. (para) -#: ../source/book.xml:16021 -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." -msgstr "像之前我们提到的,libsvn_fs的API感觉像是其它文件系统,只是有一个美妙的版本化能力。它设计为为所有对版本化的文件系统有兴趣的程序使用,不是巧合,Subversion本身也对这个功能很有兴趣。但是虽然文件系统API一定必须对基本的文件和目录版本化提供足够的支持,Subversion需要的更多—这是libsvn_repos到来的地方。" - -#. (para) -#: ../source/book.xml:16030 -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." -msgstr "Subversion版本库库(libsvn_repos)建立在(逻辑上讲)libsvn_fs的API之上,不仅仅提供了版本化文件系统的功能,它没有包裹所有的文件系统功能—只有文件系统常规周期中的主要事件使用版本库接口包裹,如包括Subversion事务的创建和提交,修订版本属性的修改。这些特别的事件使用版本库库包裹是因为它们有一些关联的钩子。版本库钩子系统并没有与与版本化文件系统的紧密关联,所以它们存在于版本库的包裹库。" - -#. (para) -#: ../source/book.xml:16043 -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:" -msgstr "钩子机制需求是从文件系统代码的其它部分中抽象出单独的版本库库的一个原因,libsvn_repos的API提供了许多其他有用的工具,它们可以做到:" - -#. (para) -#: ../source/book.xml:16050 -msgid "create, open, destroy, and perform recovery steps on a Subversion repository and the filesystem included in that repository." -msgstr "在Subversion版本库和版本库包括的文件系统的上创建、打开、销毁和执行恢复步骤。" - -#. (para) -#: ../source/book.xml:16055 -msgid "describe the differences between two filesystem trees." -msgstr "描述两个文件系统树的区别。" - -#. (para) -#: ../source/book.xml:16059 -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." -msgstr "关于所有(或者部分)修订版本中的文件系统中的一组文件的提交日志信息的查询" - -#. (para) -#: ../source/book.xml:16064 -msgid "generate a human-readable dump of the filesystem, a complete representation of the revisions in the filesystem." -msgstr "产生可读的文件系统导出,一个文件系统修订版本的完整展现。" - -#. (para) -#: ../source/book.xml:16069 -msgid "parse that dump format, loading the dumped revisions into a different Subversion repository." -msgstr "解析导出格式,加载导出的版本到一个不同的Subversion版本库。" - -#. (para) -#: ../source/book.xml:16073 -msgid "As Subversion continues to evolve, the repository library will grow with the filesystem library to offer increased functionality and configurable option support." -msgstr "伴随着Subversion的发展,版本库库会随着文件系统提供更多的功能和配置选项而不断成长。" - -#. (title) -#: ../source/book.xml:16080 -msgid "Repository Access Layer" -msgstr "版本库访问层" - -#. (para) -#: ../source/book.xml:16082 -#, fuzzy -msgid "If the Subversion Repository Layer is at the other end of the line, 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, svnserve)." -msgstr "如果说Subversion版本库层是在这条线的另一端,那版本库访问层就是这条线。负责在客户端库和版本库之间编码数据,这一层包括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的服务器,svnserve。" - -#. (para) -#: ../source/book.xml:16092 -#, fuzzy -msgid "Since Subversion uses URLs to identify its repository resources, the protocol portion of the URL scheme (usually file://, http://, https://, svn://, or svn+ssh://) is used to determine which RA module will handle the communications. Each module registers a list of the protocols it knows how to speak 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 svn --version:" -msgstr "因为Subversion使用URL来识别版本库资源,URL模式的协议部分(通常是file:http:https:svn:)用来监测那个RA模块用来处理通讯。每个模块注册一组它们知道如何说话的协议,所以RA加载器可以在运行中监测在手边的任务中使用哪个模块。通过运行svn --version,你可以监测Subversion命令行客户端所支持的RA模块和它们声明支持的协议:" - -#. (screen) -#: ../source/book.xml:16104 -#, no-wrap -msgid "" -"\n" -"$ svn --version\n" -"svn, version 1.4.3 (r23084)\n" -" compiled Jan 18 2007, 07:47:40\n" -"\n" -"Copyright (C) 2000-2006 CollabNet.\n" -"Subversion is open source software, see http://subversion.tigris.org/\n" -"This product includes software developed by CollabNet (http://www.Collab.Net/).\n" -"\n" -"The following repository access (RA) modules are available:\n" -"\n" -"* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.\n" -" - handles 'http' scheme\n" -" - handles 'https' scheme\n" -"* ra_svn : Module for accessing a repository using the svn network protocol.\n" -" - handles 'svn' scheme\n" -"* ra_local : Module for accessing a repository on local disk.\n" -" - handles 'file' scheme\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svn --version\n" -"svn, version 1.4.3 (r23084)\n" -" compiled Jan 18 2007, 07:47:40\n" -"\n" -"Copyright (C) 2000-2006 CollabNet.\n" -"Subversion is open source software, see http://subversion.tigris.org/\n" -"This product includes software developed by CollabNet (http://www.Collab.Net/).\n" -"\n" -"The following repository access (RA) modules are available:\n" -"\n" -"* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.\n" -" - handles 'http' scheme\n" -" - handles 'https' scheme\n" -"* ra_svn : Module for accessing a repository using the svn network protocol.\n" -" - handles 'svn' scheme\n" -"* ra_local : Module for accessing a repository on local disk.\n" -" - handles 'file' scheme\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:16125 -#, fuzzy -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 svnserve program; and so on." -msgstr "RA层导出的API包含了发送和接收版本化数据的必要功能,并且每一个存在的RA插件可以使用特定协议执行任务—libsvn_ra_dav同配置了mod_dav_svn模块的Apache HTTP服务器使用HTTP/WebDAV(可选SSL加密)通讯,libsvn_ra_svn同svnserve使用自定义网络协议通讯。" - -#. (para) -#: ../source/book.xml:16134 -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." -msgstr "对那些一直希望使用另一个协议来访问Subversion版本库的人,正好是为什么版本库访问层是模块化的!开发者可以简单的编写一个新的库来在一侧实现RA接口并且与另一侧的版本库通讯。你的新库可以使用存在的网络协议,或者发明你自己的。你可以使用进程间的通讯调用,或者—让我们发狂,我们会吗?—你甚至可以实现一个电子邮件为基础的协议,Subversion提供了API,你提供创造性。" - -#. (title) -#: ../source/book.xml:16148 -msgid "Client Layer" -msgstr "客户端层" - -#. (para) -#: ../source/book.xml:16150 -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 reflection of one or more repository locations—and propagating changes to and from the Repository Access layer." -msgstr "在客户端这一面,Subversion工作拷贝是所有动作发生的地方。大多数客户端库实现的功能是为了管理工作拷贝的目的实现的—满是文件子目录的目录是一个或多个版本库位置的可编辑的本地影射—从版本库访问层来回传递修改。" - -#. (para) -#: ../source/book.xml:16158 -#, fuzzy -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 .svn, 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 .svn subdirectory is similar in purpose to the CVS administrative directories found in CVS working copies. For more information about the .svn administrative area, see in this chapter." -msgstr "Subversion的工作拷贝库,libsvn_wc直接负责管理工作拷贝的数据,为了完成这一点,库会在工作拷贝的每个目录的特殊子目录中保存关于工作拷贝的管理性信息。这个子目录叫做.svn,出现在所有工作拷贝目录里,保存了各种记录了状态和用来在私有工作区工作的文件和目录。对那些熟悉CVS的用户,.svn子目录与CVS工作拷贝管理目录的作用类似,关于.svn管理区域的更多信息,见本章的。" - -#. (para) -#: ../source/book.xml:16171 -#, fuzzy -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 svn_client_checkout() 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 (.svn directories and all)." -msgstr "Subversion客户端库libsvn_client具备最广泛的职责;它的工作是结合工作拷贝库和版本库访问库的功能,然后为希望普通版本控制的应用提供最高级的API。举个例子,svn_client_checkout()方法是用一个URL作为参数,传递这个URL到RA层然后在特定版本库打开一个会话。然后向版本库要求一个特定的目录树,然后把目录树发送给工作拷贝库,然后把完全的工作拷贝写到磁盘(.svn目录和一切)。" - -#. (para) -#: ../source/book.xml:16184 -#, fuzzy -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 tools/examples/minimal_client.c that exemplifies how to wield the Subversion API to create a simple client program" -msgstr "客户端库是为任何程序使用设计的,尽管Subversion的源代码包括了一个标准的命令行客户端,用客户端库编写GUI客户端也是很简单,Subversion新的GUI(或者任何新的客户端,真的)不需要紧密围绕包含的命令行客户端—他们对具有相同功能、数据和回调机制的libsvn_client的API有完全的访问权利。事实上,Subversion源代码中包含了一段C程序(可以在tools/examples/minimal_client.c)例子,演示了如何利用Subversion客户端创建简单的客户端程序。" - -#. (title) -#: ../source/book.xml:16199 -msgid "Binding Directly—A Word About Correctness" -msgstr "直接绑定—关于正确性" - -#. (para) -#: ../source/book.xml:16201 -#, fuzzy -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." -msgstr "为什么GUI程序要直接访问libsvn_client而不以命令行客户端的包裹运行?除了效率以外,这也关系到潜在的正确性问题。一个命令行客户端程序(如Subversion提供的)如果绑定了客户端库,需要将反馈和请求数据字节从C翻译为可读的输出,这种翻译是有损耗的,程序不能得到API所提供的所有信息,或者是得到紧凑的信息。" - -#. (para) -#: ../source/book.xml:16212 -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 again translate into its 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." -msgstr "如果你已经包裹了这样一个命令行程序,第二个程序只能访问已经经过解释的(如我们提到的,不完全)信息,需要再次转化为它本身的展示格式。由于各层的包裹,原始数据的完整性越来越难以保证,结果很像对喜欢的录音带或录像带反复的拷贝(一个拷贝…)。" - -#. (para) -#: ../source/book.xml:16221 -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." -msgstr "但是关于直接绑定API使用,而不是包裹程序,这是Subversion项目对其API兼容性的承诺。在小版本的变化(如从1.3到1.4)中API的不会有函数原形的改变,简单来说就是你不需要将你程序源代码升级,因为你只是升级到了一个新版本的Subversion。某些方法可能会被废弃,但依然工作,这给你了缓冲时间来最终适应新API。Subversion的命令行输出没有这种兼容性承诺,可能会在每个版本更改。" - -#. (title) -#: ../source/book.xml:16242 -msgid "Inside the Working Copy Administration Area" -msgstr "进入工作拷贝的管理区" - -#. (para) -#: ../source/book.xml:16244 -#, fuzzy -msgid "As we mentioned earlier, each directory of a Subversion working copy contains a special subdirectory called .svn which houses administrative data about that working copy directory. Subversion uses the information in .svn to keep track of things like:" -msgstr "像我们前面提到的,每个Subversion工作拷贝包含了一个特别的子目录叫做.svn,这个目录包含了关于工作拷贝目录的管理数据,Subversion使用.svn中的信息来追踪如下的数据:" - -#. (para) -#: ../source/book.xml:16251 -msgid "Which repository location(s) are represented by the files and subdirectories in the working copy directory." -msgstr "工作拷贝中展示的目录和文件在版本库中的位置。" - -#. (para) -#: ../source/book.xml:16256 -msgid "What revision of each of those files and directories are currently present in the working copy." -msgstr "工作拷贝中当前展示的文件和目录的修订版本。" - -#. (para) -#: ../source/book.xml:16260 -msgid "Any user-defined properties that might be attached to those files and directories." -msgstr "所有附加在文件和目录上的用户定义属性。" - -#. (para) -#: ../source/book.xml:16264 -msgid "Pristine (un-edited) copies of the working copy files." -msgstr "初始(未编辑)的工作拷贝文件的拷贝。" - -#. (para) -#: ../source/book.xml:16268 -#, fuzzy -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." -msgstr "Subversion工作拷贝管理区域的布局和内容主要是考虑的实现细节,不是被人来使用的。开发者被鼓励使用Subversion的API或工具来访问和处理工作拷贝数据,反对直接读写操作组成工作拷贝管理区域的文件。工作拷贝中管理数据采用的文件格式会不断改变—只是公共API成功的隐藏了这种改变。在本小节,我们将会探讨一些实现细节来安抚你们的焦虑。" - -#. (title) -#: ../source/book.xml:16282 -msgid "The Entries File" -msgstr "条目文件" - -#. (para) -#: ../source/book.xml:16284 -#, fuzzy -msgid "Perhaps the single most important file in the .svn directory is the entries 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!" -msgstr "或许.svn目录中最重要的单个文件就是entries了,这个条目文件是一个XML文档,包含了关于工作拷贝中的版本化的资源的大多数管理性信息,这个文件保留了版本库URL、原始修订版本、文件校验数据、可知的最后提交信息(作者、修订版本和时间戳)和本地拷贝历史—实际上是Subversion客户端关于一个版本化(或者是将要版本化的)资源的所有感兴趣的信息!" - -#. (para) -#: ../source/book.xml:16296 -#, fuzzy -msgid "Folks familiar with CVS's administrative directories will have recognized at this point that Subversion's .svn/entries file serves the purposes of, among other things, CVS's CVS/Entries, CVS/Root, and CVS/Repository files combined." -msgstr "熟悉CVS管理目录的人可能会发现,Subversion的.svn/entries实现了CVS的CVS/EntriesCVS/RootCVS/Repository的功能。" - -#. (para) -#: ../source/book.xml:16302 -#, fuzzy -msgid "The format of the .svn/entries 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." -msgstr ".svn/entries的格式曾经多次修改,最初是XML文件,现在使用自定义的—尽管依然是可读的文件格式。早期的Subversion需要频繁调试文件内容,所以选择了XML这种格式,随着Subversion的成熟,频繁调试的需求消失了,而产生了用户对性能的要求。当然,Subversion的工作拷贝库可以从一种格式升级到另一种格式—按照老格式读取,然后按照新格式写。" - -#. (title) -#: ../source/book.xml:16321 -msgid "Pristine Copies and Property Files" -msgstr "原始拷贝和属性文件" - -#. (para) -#: ../source/book.xml:16323 -#, fuzzy -msgid "As mentioned before, the .svn directory also holds the pristine text-base versions of files. Those can be found in .svn/text-base. 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 text-base an option. Ironically though, it is as your versioned files' sizes get larger that the existence of the text-base becomes more crucial—who wants to transmit a huge file across a network just because they want to commit a tiny change to it?" -msgstr "如我们前面提到的,.svn也包含了一些原始的text-base文件版本,可以在.svn/text-base看到。这些原始文件的好处是多方面的—察看本地修改和区别不需要经过网络访问,减少传递修改时的数据—但是随之而来的代价是每个版本化的文件都在磁盘至少保存两次,现在看来这是对大多数文件可以忽略不计的一个惩罚。但是,当你版本控制的文件增多之后形势会变得很严峻,我们已经注意到了应该可以选择使用text-base,但是具有讽刺意味的是,当版本化文件增大时,text-base文件的存在会更加重要—谁会希望在提交一个小修改时在网络上传递一个大文件?" - -#. (para) -#: ../source/book.xml:16341 -#, fuzzy -msgid "Similar in purpose to the text-base files are the property files and their pristine prop-base copies, located in .svn/props and .svn/prop-base respectively. Since directories can have properties, too, there are also .svn/dir-props and .svn/dir-prop-base files." -msgstr "同text-base文件的用途一样的还有属性文件和它们的prop-base拷贝,分别位于.svn/props.svn/prop-base。因为目录也有属性,所以也有.svn/dir-props.svn/dir-prop-base文件。所有的属性文件(workingbase版本)都使用同样的hash-on-disk文件格式来排序属性名称和值。" - -#. (title) -#: ../source/book.xml:16356 -msgid "Using the APIs" -msgstr "使用 API" - -#. (para) -#: ../source/book.xml:16358 -#, fuzzy -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 subversion/include directory of the source tree. These headers are copied into your system locations (for example, /usr/local/include) 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." -msgstr "使用Subversion库API开发应用看起来相当的直接,所有的公共头文件放在源文件的subversion/include目录,从源代码编译和安装Subversion本身,需要这些头文件拷贝到系统位置。这些头文件包括了所有用户和Subversion库可以访问的功能和类型。Subversion开发者社区仔细的确保所有的公共API有完好的文档—直接引用头文件的文档。" - -#. (para) -#: ../source/book.xml:16370 -#, fuzzy -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 svn_, followed by a short code for the library in which the symbol is defined (such as wc, client, fs, etc.), followed by a single underscore (_) 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 (__). Functions that are private to a given source file have no special prefixing, and are declared static. Of course, a compiler isn't interested in these naming conventions, but they help to clarify the scope of a given function or datatype." -msgstr "你首先应该注意Subversion的数据类型和方法是命名空间保护的,每一个公共Subversion对象名以svn_开头,然后紧跟一个这个对象定义(如wcclientfs等等)所在的库的简短编码,然后是一个下划线(_)和后面的对象名称。半公开的方法(库使用,但是但库之外代码不可以使用并且只可以在库自己的目录看到)与这个命名模式不同,并不是库代码之后紧跟一个下划线,他们是用两个下划线(__)。给定源文件的私有方法没有特殊前缀,使用static声明。当然,一个编译器不会关心命名习惯,只是用来区分给定方法或数据类型的应用范围。" - -#. (para) -#: ../source/book.xml:16395 -msgid "After all, Subversion uses Subversion's APIs, too." -msgstr "当然,Subversion使用Subversion的API。" - -#. (para) -#: ../source/book.xml:16388 -#, fuzzy -msgid "Another good source of information about programming against the Subversion APIs is the project's own hacking guidelines, which can be found at http://subversion.tigris.org/hacking.html. 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. " -msgstr "关于Subversion的API编程的另一个好的资源是hacking指南,可以在找到,这个文档包含了有用的信息,同时满足Subversion本身的开发者和将Subversion作为第三方库的开发者。" - -#. (title) -#: ../source/book.xml:16401 -msgid "The Apache Portable Runtime Library" -msgstr "Apache 可移植运行库" - -#. (para) -#: ../source/book.xml:16403 -#, fuzzy -msgid "Along with Subversion's own datatypes, you will see many references to datatypes that begin with apr_—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." -msgstr "伴随Subversion自己的数据类型,你会看到许多apr开头的数据类型引用—来自Apache可移植运行库(APR)的对象。APR是Apache可移植运行库,源自为了服务器代码的多平台性,尝试将不同的操作系统特定字节与操作系统无关代码隔离。结果就提供了一个基础API的库,只有一些适度区别—或者是广泛的—来自各个操作系统。Apache HTTP服务器很明显是APR库的第一个用户,Subversion开发者立刻发现了使用APR库的价值。意味着Subversion没有操作系统特定的代码,也意味着Subversion客户端可以在Server存在的平台编译和运行。当前这个列表包括,各种类型的Unix、Win32、OS/2和Mac OS X。" - -#. (para) -#: ../source/book.xml:16421 -msgid "Subversion uses ANSI system calls and datatypes as much as possible." -msgstr "Subversion使用尽可能多ANSI系统调用和数据类型。" - -#. (para) -#: ../source/book.xml:16432 -msgid "Neon and Berkeley DB are examples of such libraries." -msgstr "Neon和Berkeley DB就是这种库的例子。" - -#. (para) -#: ../source/book.xml:16419 -#, fuzzy -msgid "In addition to providing consistent implementations of system calls that differ across operating systems, 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), and while a person coding against the Subversion APIs is not required to do the same, they are 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 apr_initialize() to initialize the APR subsystem, and then must create and manage pools for use with Subversion API calls, typically by using svn_pool_create(), svn_pool_clear(), and svn_pool_destroy()." -msgstr "除了提供了跨平台一致的系统调用, APR给Subversion对多种数据类型有快速的访问,如动态数组和哈希表。Subversion在代码中广泛使用这些类型,但是Subversion的API原型中最常见的APR类型是apr_pool_t—APR内存池,Subversion使用内部缓冲池用来进行内存分配(除非外部库在API传递参数时需要一个不同的内存管理模式), 而且一个人如果针对Subversion的API编码不需要做同样的事情,他们可以在需要时给API提供缓冲池,这意味着Subversion的API使用者也必须链接到APR,必须调用apr_initialize()来初始化APR子系统,而且在使用Subversion API时必须创建和管理池,通常是使用svn_pool_create()svn_pool_clear()svn_pool_destroy()。" - -#. (title) -#: ../source/book.xml:16445 -msgid "Programming with Memory Pools" -msgstr "使用内存池编程" - -#. (para) -#: ../source/book.xml:16447 -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." -msgstr "几乎每一个使用过C语言的开发者曾经感叹令人畏缩的内存管理,分配足够的内存,并且追踪内存的分配,在不需要时释放内存—这个任务会非常复杂。当然,如果没有正确地做到这一点会导致程序毁掉自己,或者更加严重一点,把电脑搞瘫。" - -#. (para) -#: ../source/book.xml:16457 -msgid "Or at least make it something you only toy with when doing extremely tight program optimization." -msgstr "或仅仅是在紧密地程序优化中玩弄什么东西。" - -#. (para) -#: ../source/book.xml:16455 -#, fuzzy -msgid "Higher-level languages, on the other hand, take the job of memory management away from the developer completely. Languages like Java and Python use garbage collection, allocating memory for objects when needed, and automatically freeing that memory when the object is no longer in use." -msgstr "另一方面高级语言使开发者完全摆脱了内存管理,Java和Python之类的语言使用垃圾收集原理,在需要的时候分配对象内存,在不使用时进行清理。" - -#. (para) -#: ../source/book.xml:16463 -#, fuzzy -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 pool) of memory, instead of per allocated object. Rather than using malloc() 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 all 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." -msgstr "APR提供了一种叫做池基础的中等的内存管理方法,允许开发者以一种低分辨率的方式控制内存—每块(或池)的内存,而不是每个对象。不是使用malloc()和其他按照对象分配内存的方式,你要求APR从内存创建一段内存池,当你结束使用在池中创建的对象,你销毁池,可以有效地取消其中的对象消耗的内存。通过池,你不需要跟踪每个对象的内存释放,你的程序只需要跟踪这些对象,将对象分配到池中,而池的生命周期(池的创建和删除)满足所有对象的需要。" - -#. (title) -#: ../source/book.xml:16484 -msgid "URL and Path Requirements" -msgstr "URL 和路径需求" - -#. (para) -#: ../source/book.xml:16486 -#, fuzzy -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 remote might mean across the office, it could just as well mean across the globe. 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 subversion/include/svn_utf.h) that can be used by any program to do these conversions." -msgstr "因为分布式版本控制操作是Subversion存在的重点,有意义来关注一下国际化(i18n)支持。毕竟,当分布式或许意味着横跨办公室,它也意味着横跨全球。为了更容易一点,Subversion的所有公共接口只接受路径参数,这些参数是传统的,使用UTF-8编码。这意味着,举个例子,任何新的使用libsvn_client接口客户端库,在把这些参数传递给Subversion库前,需要首先将路径从本地代码转化为UTF-8代码,然后将Subversion传递回来的路径转换为本地代码,很幸运,Subversion提供了一组任何程序可以使用的转化方法(见subversion/include/svn_utf.h)。" - -#. (para) -#: ../source/book.xml:16503 -#, fuzzy -msgid "Also, Subversion APIs require all URL parameters to be properly URI-encoded. So, instead of passing file:///home/username/My File.txt as the URL of a file named My File.txt, you need to pass file:///home/username/My%20File.txt. Again, Subversion supplies helper functions that your application can use—svn_path_uri_encode() and svn_path_uri_decode(), for URI encoding and decoding, respectively." -msgstr "同样,Subversion的API需要所有的URL参数是正确的URI编码,所以,我们不会传递file:///home/username/My File.txt作为My File.txt的URL,而会传递file:///home/username/My%20File.txt。再次,Subversion提供了一些你可以使用的助手方法—svn_path_uri_encode()svn_path_uri_decode(),分别用来URI的编码和解码。" - -#. (title) -#: ../source/book.xml:16516 -msgid "Using Languages Other than C and C++" -msgstr "使用 C 和 C++ 以外的语言" - -#. (para) -#: ../source/book.xml:16518 -#, fuzzy -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 subversion/bindings/swig. 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." -msgstr "除C语言以外,如果你对使用其他语言结合Subversion库感兴趣—如Python脚本或是Java应用—Subversion通过简单包裹生成器(SWIG)提供了最初的支持。Subversion的SWIG绑定位于subversion/bindings/swig,并且慢慢的走向成熟进入可用状态。这个绑定允许你直接调用Subversion的API方法,使用包裹器会把脚本数据类型转化为Subversion需要的C语言库类型。" - -#. (para) -#: ../source/book.xml:16528 -#, fuzzy -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 http://www.swig.org/." -msgstr "非常不幸,Subversion的语言绑定缺乏对核心Subversion模块的关注,但是,花了很多力气处理创建针对Python、Perl和Ruby的功能绑定,在一定程度上,在这些接口上的工作量可以在其他语言的SWIG(包括C#、Guile、Java、MzScheme、OCaml、PHP、Tcl等等)接口上得到重用。然而,一些接口仍然需要额外的编程工作,关于SWIG本身的更多信息可以看项目的网站。" - -#. (para) -#: ../source/book.xml:16538 -msgid "Subversion also has language bindings for Java. The JavaJL bindings (located in subversion/bindings/java 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." -msgstr "Subversion也有Java的语言绑定,JavaJL绑定(位于Subversion源目录树的subversion/bindings/java)不是基于SWIG的,而是javah和手写JNI的混合,JavaHL几乎覆盖Subversion客户端的API,目标是作为Java基础的Subversion客户端和集成IDE的实现。" - -#. (para) -#: ../source/book.xml:16546 -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." -msgstr "Subversion的语言绑定缺乏Subversion核心模块的关注,但是通常可以作为一个产品信赖。大量脚本、应用、Subversion的GUI客户端和其他第三方工具现在已经成功地运用了Subversion语言绑定来完成Subversion的集成。" - -#. (para) -#: ../source/book.xml:16553 -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 http://subversion.tigris.org/links.html), but there are a couple of popular ones we feel are especially noteworthy. First, Barry Scott's PySVN bindings (http://pysvn.tigris.org/) 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 (http://svnkit.com/), 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." -msgstr "这里使用其它语言的方法来与Subversion交互没有任何意义:Subversion开发社区没有提供其他的绑定,你可以在Subversion项目链接页里(http://subversion.tigris.org/links.html)找到其他绑定的链接,但是有一些流行的绑定我觉得应该特别留意。首先是Python的流行绑定,Barry Scott的PySVN(http://pysvn.tigris.org/)。PySVN鼓吹它们提供了更多Python样式的接口,而不像Subversion自己的Python绑定的C样式接口。对于希望寻求Subversion纯Java实现的人,可以看看SVNKit(http://svnkit.com/),也就是从头使用Java编写的Subversion。你必须要小心,SVNKit没有采用Subversion的核心库,其行为方式没有确保与Subversion匹配。" - -#. (title) -#: ../source/book.xml:16573 -msgid "Code Samples" -msgstr "代码样例" - -#. (para) -#: ../source/book.xml:16575 -#, fuzzy -msgid " 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 svn_repos_ and svn_fs_ 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)." -msgstr "包含了一段C代码(C编写)描述了我们讨论的概念,它使用了版本库和文件系统接口(可以通过方法名svn_repos_svn_fs_分辨)创建了一个添加目录的修订版本。你可以看到APR库的使用,为了内存分配而传递,这些代码也揭开了一些关于Subversion错误处理的晦涩事实—所有的Subversion错误必须需要明确的处理以防止内存泄露(在某些情况下,应用失败)。" - -#. (title) -#: ../source/book.xml:16590 -msgid "Using the Repository Layer" -msgstr "使用版本库层" - -#. (programlisting) -#: ../source/book.xml:16592 -#, fuzzy, no-wrap -msgid "" -"\n" -"/* Convert a Subversion error into a simple boolean error code.\n" -" *\n" -" * NOTE: Subversion errors must be cleared (using svn_error_clear())\n" -" * because they are allocated from the global pool, else memory\n" -" * leaking occurs.\n" -" */\n" -"#define INT_ERR(expr) \\\n" -" do { \\\n" -" svn_error_t *__temperr = (expr); \\\n" -" if (__temperr) \\\n" -" { \\\n" -" svn_error_clear(__temperr); \\\n" -" return 1; \\\n" -" } \\\n" -" return 0; \\\n" -" } while (0)\n" -"\n" -"/* Create a new directory at the path NEW_DIRECTORY in the Subversion\n" -" * repository located at REPOS_PATH. Perform all memory allocation in\n" -" * POOL. This function will create a new revision for the addition of\n" -" * NEW_DIRECTORY. Return zero if the operation completes\n" -" * successfully, non-zero otherwise.\n" -" */\n" -"static int\n" -"make_new_directory(const char *repos_path,\n" -" const char *new_directory,\n" -" apr_pool_t *pool)\n" -"{\n" -" svn_error_t *err;\n" -" svn_repos_t *repos;\n" -" svn_fs_t *fs;\n" -" svn_revnum_t youngest_rev;\n" -" svn_fs_txn_t *txn;\n" -" svn_fs_root_t *txn_root;\n" -" const char *conflict_str;\n" -"\n" -" /* Open the repository located at REPOS_PATH. \n" -" */\n" -" INT_ERR(svn_repos_open(&repos, repos_path, pool));\n" -"\n" -" /* Get a pointer to the filesystem object that is stored in REPOS. \n" -" */\n" -" fs = svn_repos_fs(repos);\n" -"\n" -" /* Ask the filesystem to tell us the youngest revision that\n" -" * currently exists. \n" -" */\n" -" INT_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));\n" -"\n" -" /* Begin a new transaction that is based on YOUNGEST_REV. We are\n" -" * less likely to have our later commit rejected as conflicting if we\n" -" * always try to make our changes against a copy of the latest snapshot\n" -" * of the filesystem tree. \n" -" */\n" -" INT_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));\n" -"\n" -" /* Now that we have started a new Subversion transaction, get a root\n" -" * object that represents that transaction. \n" -" */\n" -" INT_ERR(svn_fs_txn_root(&txn_root, txn, pool));\n" -" \n" -" /* Create our new directory under the transaction root, at the path\n" -" * NEW_DIRECTORY. \n" -" */\n" -" INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool));\n" -"\n" -" /* Commit the transaction, creating a new revision of the filesystem\n" -" * which includes our added directory path.\n" -" */\n" -" err = svn_repos_fs_commit_txn(&conflict_str, repos, \n" -" &youngest_rev, txn, pool);\n" -" if (! err)\n" -" {\n" -" /* No error? Excellent! Print a brief report of our success.\n" -" */\n" -" printf(\"Directory '%s' was successfully added as new revision \"\n" -" \"'%ld'.\\n\", new_directory, youngest_rev);\n" -" }\n" -" else if (err->apr_err == SVN_ERR_FS_CONFLICT)\n" -" {\n" -" /* Uh-oh. Our commit failed as the result of a conflict\n" -" * (someone else seems to have made changes to the same area \n" -" * of the filesystem that we tried to modify). Print an error\n" -" * message.\n" -" */\n" -" printf(\"A conflict occurred at path '%s' while attempting \"\n" -" \"to add directory '%s' to the repository at '%s'.\\n\", \n" -" conflict_str, new_directory, repos_path);\n" -" }\n" -" else\n" -" {\n" -" /* Some other error has occurred. Print an error message.\n" -" */\n" -" printf(\"An error occurred while attempting to add directory '%s' \"\n" -" \"to the repository at '%s'.\\n\", \n" -" new_directory, repos_path);\n" -" }\n" -"\n" -" INT_ERR(err);\n" -"} \n" -msgstr "" -"\n" -"/* Convert a Subversion error into a simple boolean error code.\n" -" *\n" -" * NOTE: Subversion errors must be consumed because they are allocated\n" -" * from the global pool, else memory leaking occurs.\n" -" */\n" -"#define INT_ERR(expr) \\\n" -" do { \\\n" -" svn_error_t *__temperr = (expr); \\\n" -" if (__temperr) \\\n" -" { \\\n" -" svn_error_clear(__temperr); \\\n" -" return 1; \\\n" -" } \\\n" -" return 0; \\\n" -" } while (0)\n" -"\n" -"/* Create a new directory at the path NEW_DIRECTORY in the Subversion\n" -" * repository located at REPOS_PATH. Perform all memory allocation in\n" -" * POOL. This function will create a new revision for the addition of\n" -" * NEW_DIRECTORY. Return zero if the operation completes\n" -" * successfully, non-zero otherwise.\n" -" */\n" -"static int\n" -"make_new_directory(const char *repos_path,\n" -" const char *new_directory,\n" -" apr_pool_t *pool)\n" -"{\n" -" svn_error_t *err;\n" -" svn_repos_t *repos;\n" -" svn_fs_t *fs;\n" -" svn_revnum_t youngest_rev;\n" -" svn_fs_txn_t *txn;\n" -" svn_fs_root_t *txn_root;\n" -" const char *conflict_str;\n" -"\n" -" /* Open the repository located at REPOS_PATH. \n" -" */\n" -" INT_ERR(svn_repos_open(&repos, repos_path, pool));\n" -"\n" -" /* Get a pointer to the filesystem object that is stored in REPOS. \n" -" */\n" -" fs = svn_repos_fs(repos);\n" -"\n" -" /* Ask the filesystem to tell us the youngest revision that\n" -" * currently exists. \n" -" */\n" -" INT_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));\n" -"\n" -" /* Begin a new transaction that is based on YOUNGEST_REV. We are\n" -" * less likely to have our later commit rejected as conflicting if we\n" -" * always try to make our changes against a copy of the latest snapshot\n" -" * of the filesystem tree. \n" -" */\n" -" INT_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));\n" -"\n" -" /* Now that we have started a new Subversion transaction, get a root\n" -" * object that represents that transaction. \n" -" */\n" -" INT_ERR(svn_fs_txn_root(&txn_root, txn, pool));\n" -" \n" -" /* Create our new directory under the transaction root, at the path\n" -" * NEW_DIRECTORY. \n" -" */\n" -" INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool));\n" -"\n" -" /* Commit the transaction, creating a new revision of the filesystem\n" -" * which includes our added directory path.\n" -" */\n" -" err = svn_repos_fs_commit_txn(&conflict_str, repos, \n" -" &youngest_rev, txn, pool);\n" -" if (! err)\n" -" {\n" -" /* No error? Excellent! Print a brief report of our success.\n" -" */\n" -" printf(\"Directory '%s' was successfully added as new revision \"\n" -" \"'%ld'.\\n\", new_directory, youngest_rev);\n" -" }\n" -" else if (err->apr_err == SVN_ERR_FS_CONFLICT)\n" -" {\n" -" /* Uh-oh. Our commit failed as the result of a conflict\n" -" * (someone else seems to have made changes to the same area \n" -" * of the filesystem that we tried to modify). Print an error\n" -" * message.\n" -" */\n" -" printf(\"A conflict occurred at path '%s' while attempting \"\n" -" \"to add directory '%s' to the repository at '%s'.\\n\", \n" -" conflict_str, new_directory, repos_path);\n" -" }\n" -" else\n" -" {\n" -" /* Some other error has occurred. Print an error message.\n" -" */\n" -" printf(\"An error occurred while attempting to add directory '%s' \"\n" -" \"to the repository at '%s'.\\n\", \n" -" new_directory, repos_path);\n" -" }\n" -"\n" -" INT_ERR(err);\n" -"} \n" - -#. (para) -#: ../source/book.xml:16695 -#, fuzzy -msgid "Note that in , the code could just as easily have committed the transaction using svn_fs_commit_txn(). 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, svn_repos_fs_commit_txn(). (For more information regarding Subversion's repository hooks, see .)" -msgstr "请注意在中,代码可以非常容易使用svn_fs_commit_txn()提交事务。但是文件系统的API对版本库库的钩子一无所知,如果你希望你的Subversion版本库在每次提交一个事务时自动执行一些非Subversion的任务(例如,给开发者邮件组发送一个描述事务修改的邮件),你需要使用libsvn_repos包裹的功能版本—这个功能会实际上首先运行一个如果存在的pre-commit钩子脚本,然后提交事务,最后会运行一个post-commit钩子脚本。钩子提供了一种特别的报告机制,不是真的属于核心文件系统库本身。(关于Subversion版本库钩子的更多信息,见。)" - -#. (para) -#: ../source/book.xml:16708 -msgid "Now let's switch languages. 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." -msgstr "现在我们转换一下语言,使用Subversion SWIG的Python绑定实现了从版本库取得最新的版本,并且打印了取出时访问的目录。" - -#. (title) -#: ../source/book.xml:16714 -msgid "Using the Repository Layer with Python" -msgstr "使用 Python 处理版本库层" - -#. (programlisting) -#: ../source/book.xml:16716 -#, no-wrap -msgid "" -"\n" -"#!/usr/bin/python\n" -"\n" -"\"\"\"Crawl a repository, printing versioned object path names.\"\"\"\n" -"\n" -"import sys\n" -"import os.path\n" -"import svn.fs, svn.core, svn.repos\n" -"\n" -"def crawl_filesystem_dir(root, directory):\n" -" \"\"\"Recursively crawl DIRECTORY under ROOT in the filesystem, and return\n" -" a list of all the paths at or below DIRECTORY.\"\"\"\n" -"\n" -" # Print the name of this path.\n" -" print directory + \"/\"\n" -" \n" -" # Get the directory entries for DIRECTORY.\n" -" entries = svn.fs.svn_fs_dir_entries(root, directory)\n" -"\n" -" # Loop over the entries.\n" -" names = entries.keys()\n" -" for name in names:\n" -" # Calculate the entry's full path.\n" -" full_path = directory + '/' + name\n" -"\n" -" # If the entry is a directory, recurse. The recursion will return\n" -" # a list with the entry and all its children, which we will add to\n" -" # our running list of paths.\n" -" if svn.fs.svn_fs_is_dir(root, full_path):\n" -" crawl_filesystem_dir(root, full_path)\n" -" else:\n" -" # Else it's a file, so print its path here.\n" -" print full_path\n" -"\n" -"def crawl_youngest(repos_path):\n" -" \"\"\"Open the repository at REPOS_PATH, and recursively crawl its\n" -" youngest revision.\"\"\"\n" -" \n" -" # Open the repository at REPOS_PATH, and get a reference to its\n" -" # versioning filesystem.\n" -" repos_obj = svn.repos.svn_repos_open(repos_path)\n" -" fs_obj = svn.repos.svn_repos_fs(repos_obj)\n" -"\n" -" # Query the current youngest revision.\n" -" youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj)\n" -" \n" -" # Open a root object representing the youngest (HEAD) revision.\n" -" root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev)\n" -"\n" -" # Do the recursive crawl.\n" -" crawl_filesystem_dir(root_obj, \"\")\n" -" \n" -"if __name__ == \"__main__\":\n" -" # Check for sane usage.\n" -" if len(sys.argv) != 2:\n" -" sys.stderr.write(\"Usage: %s REPOS_PATH\\n\"\n" -" % (os.path.basename(sys.argv[0])))\n" -" sys.exit(1)\n" -"\n" -" # Canonicalize the repository path.\n" -" repos_path = svn.core.svn_path_canonicalize(sys.argv[1])\n" -"\n" -" # Do the real work.\n" -" crawl_youngest(repos_path)\n" -msgstr "" -"\n" -"#!/usr/bin/python\n" -"\n" -"\"\"\"Crawl a repository, printing versioned object path names.\"\"\"\n" -"\n" -"import sys\n" -"import os.path\n" -"import svn.fs, svn.core, svn.repos\n" -"\n" -"def crawl_filesystem_dir(root, directory):\n" -" \"\"\"Recursively crawl DIRECTORY under ROOT in the filesystem, and return\n" -" a list of all the paths at or below DIRECTORY.\"\"\"\n" -"\n" -" # Print the name of this path.\n" -" print directory + \"/\"\n" -" \n" -" # Get the directory entries for DIRECTORY.\n" -" entries = svn.fs.svn_fs_dir_entries(root, directory)\n" -"\n" -" # Loop over the entries.\n" -" names = entries.keys()\n" -" for name in names:\n" -" # Calculate the entry's full path.\n" -" full_path = directory + '/' + name\n" -"\n" -" # If the entry is a directory, recurse. The recursion will return\n" -" # a list with the entry and all its children, which we will add to\n" -" # our running list of paths.\n" -" if svn.fs.svn_fs_is_dir(root, full_path):\n" -" crawl_filesystem_dir(root, full_path)\n" -" else:\n" -" # Else it's a file, so print its path here.\n" -" print full_path\n" -"\n" -"def crawl_youngest(repos_path):\n" -" \"\"\"Open the repository at REPOS_PATH, and recursively crawl its\n" -" youngest revision.\"\"\"\n" -" \n" -" # Open the repository at REPOS_PATH, and get a reference to its\n" -" # versioning filesystem.\n" -" repos_obj = svn.repos.svn_repos_open(repos_path)\n" -" fs_obj = svn.repos.svn_repos_fs(repos_obj)\n" -"\n" -" # Query the current youngest revision.\n" -" youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj)\n" -" \n" -" # Open a root object representing the youngest (HEAD) revision.\n" -" root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev)\n" -"\n" -" # Do the recursive crawl.\n" -" crawl_filesystem_dir(root_obj, \"\")\n" -" \n" -"if __name__ == \"__main__\":\n" -" # Check for sane usage.\n" -" if len(sys.argv) != 2:\n" -" sys.stderr.write(\"Usage: %s REPOS_PATH\\n\"\n" -" % (os.path.basename(sys.argv[0])))\n" -" sys.exit(1)\n" -"\n" -" # Canonicalize the repository path.\n" -" repos_path = svn.core.svn_path_canonicalize(sys.argv[1])\n" -"\n" -" # Do the real work.\n" -" crawl_youngest(repos_path)\n" - -#. (para) -#: ../source/book.xml:16782 -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 dictionaries) 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." -msgstr "同样的C程序需要处理APR内存池系统,但是Python自己处理内存,Subversion的Python绑定也遵循这种习惯。在C语言中,为表示路径和条目的hash需要处理自定义的数据类型(例如APR提供的库),但是Python有hash(叫做dictionaries),并且是内置数据类型,而且还提供了一系列操作这些类型的函数,所以SWIG(通过Subversion的语言绑定层的自定义帮助)要小心的将这些自定义数据类型映射到目标语言的数据类型,这为目标语言的用户提供了一个更加直观的接口。" - -#. (para) -#: ../source/book.xml:16795 -#, fuzzy -msgid "The Subversion Python bindings can be used for working copy operations, too. In the previous section of this chapter, we mentioned the libsvn_client interface, and how it exists for the sole purpose of simplifying the process of writing a Subversion client. is a brief example of how that library can be accessed via the SWIG Python bindings to recreate a scaled-down version of the svn status command." -msgstr "Subversion的Python绑定也可以用来进行工作拷贝的操作,在本章前面的小节中,我们提到过libsvn_client接口,它存在的目的就是简化编写Subversion客户端的难度,是一个例子,讲的是如何使用SWIG绑定创建一个扩展版本的svn status命令。" - -#. (title) -#: ../source/book.xml:16805 -msgid "A Python Status Crawler" -msgstr "A Python Status Crawler" - -#. (programlisting) -#: ../source/book.xml:16807 -#, no-wrap -msgid "" -"\n" -"#!/usr/bin/env python\n" -"\n" -"\"\"\"Crawl a working copy directory, printing status information.\"\"\"\n" -"\n" -"import sys\n" -"import os.path\n" -"import getopt\n" -"import svn.core, svn.client, svn.wc\n" -"\n" -"def generate_status_code(status):\n" -" \"\"\"Translate a status value into a single-character status code,\n" -" using the same logic as the Subversion command-line client.\"\"\"\n" -" code_map = { svn.wc.svn_wc_status_none : ' ',\n" -" svn.wc.svn_wc_status_normal : ' ',\n" -" svn.wc.svn_wc_status_added : 'A',\n" -" svn.wc.svn_wc_status_missing : '!',\n" -" svn.wc.svn_wc_status_incomplete : '!',\n" -" svn.wc.svn_wc_status_deleted : 'D',\n" -" svn.wc.svn_wc_status_replaced : 'R',\n" -" svn.wc.svn_wc_status_modified : 'M',\n" -" svn.wc.svn_wc_status_merged : 'G',\n" -" svn.wc.svn_wc_status_conflicted : 'C',\n" -" svn.wc.svn_wc_status_obstructed : '~',\n" -" svn.wc.svn_wc_status_ignored : 'I',\n" -" svn.wc.svn_wc_status_external : 'X',\n" -" svn.wc.svn_wc_status_unversioned : '?',\n" -" }\n" -" return code_map.get(status, '?')\n" -"\n" -"def do_status(wc_path, verbose):\n" -" # Calculate the length of the input working copy path.\n" -" wc_path_len = len(wc_path)\n" -"\n" -" # Build a client context baton.\n" -" ctx = svn.client.svn_client_ctx_t()\n" -"\n" -" def _status_callback(path, status, root_path_len=wc_path_len):\n" -" \"\"\"A callback function for svn_client_status.\"\"\"\n" -"\n" -" # Print the path, minus the bit that overlaps with the root of\n" -" # the status crawl\n" -" text_status = generate_status_code(status.text_status)\n" -" prop_status = generate_status_code(status.prop_status)\n" -" print '%s%s %s' % (text_status, prop_status, path[wc_path_len + 1:])\n" -" \n" -" # Do the status crawl, using _status_callback() as our callback function.\n" -" svn.client.svn_client_status(wc_path, None, _status_callback,\n" -" 1, verbose, 0, 0, ctx)\n" -"\n" -"def usage_and_exit(errorcode):\n" -" \"\"\"Print usage message, and exit with ERRORCODE.\"\"\"\n" -" stream = errorcode and sys.stderr or sys.stdout\n" -" stream.write(\"\"\"Usage: %s OPTIONS WC-PATH\n" -"Options:\n" -" --help, -h : Show this usage message\n" -" --verbose, -v : Show all statuses, even uninteresting ones\n" -"\"\"\" % (os.path.basename(sys.argv[0])))\n" -" sys.exit(errorcode)\n" -" \n" -"if __name__ == '__main__':\n" -" # Parse command-line options.\n" -" try:\n" -" opts, args = getopt.getopt(sys.argv[1:], \"hv\", [\"help\", \"verbose\"])\n" -" except getopt.GetoptError:\n" -" usage_and_exit(1)\n" -" verbose = 0\n" -" for opt, arg in opts:\n" -" if opt in (\"-h\", \"--help\"):\n" -" usage_and_exit(0)\n" -" if opt in (\"-v\", \"--verbose\"):\n" -" verbose = 1\n" -" if len(args) != 1:\n" -" usage_and_exit(2)\n" -" \n" -" # Canonicalize the repository path.\n" -" wc_path = svn.core.svn_path_canonicalize(args[0])\n" -"\n" -" # Do the real work.\n" -" try:\n" -" do_status(wc_path, verbose)\n" -" except svn.core.SubversionException, e:\n" -" sys.stderr.write(\"Error (%d): %s\\n\" % (e[1], e[0]))\n" -" sys.exit(1)\n" -msgstr "" -"\n" -"#!/usr/bin/env python\n" -"\n" -"\"\"\"Crawl a working copy directory, printing status information.\"\"\"\n" -"\n" -"import sys\n" -"import os.path\n" -"import getopt\n" -"import svn.core, svn.client, svn.wc\n" -"\n" -"def generate_status_code(status):\n" -" \"\"\"Translate a status value into a single-character status code,\n" -" using the same logic as the Subversion command-line client.\"\"\"\n" -" code_map = { svn.wc.svn_wc_status_none : ' ',\n" -" svn.wc.svn_wc_status_normal : ' ',\n" -" svn.wc.svn_wc_status_added : 'A',\n" -" svn.wc.svn_wc_status_missing : '!',\n" -" svn.wc.svn_wc_status_incomplete : '!',\n" -" svn.wc.svn_wc_status_deleted : 'D',\n" -" svn.wc.svn_wc_status_replaced : 'R',\n" -" svn.wc.svn_wc_status_modified : 'M',\n" -" svn.wc.svn_wc_status_merged : 'G',\n" -" svn.wc.svn_wc_status_conflicted : 'C',\n" -" svn.wc.svn_wc_status_obstructed : '~',\n" -" svn.wc.svn_wc_status_ignored : 'I',\n" -" svn.wc.svn_wc_status_external : 'X',\n" -" svn.wc.svn_wc_status_unversioned : '?',\n" -" }\n" -" return code_map.get(status, '?')\n" -"\n" -"def do_status(wc_path, verbose):\n" -" # Calculate the length of the input working copy path.\n" -" wc_path_len = len(wc_path)\n" -"\n" -" # Build a client context baton.\n" -" ctx = svn.client.svn_client_ctx_t()\n" -"\n" -" def _status_callback(path, status, root_path_len=wc_path_len):\n" -" \"\"\"A callback function for svn_client_status.\"\"\"\n" -"\n" -" # Print the path, minus the bit that overlaps with the root of\n" -" # the status crawl\n" -" text_status = generate_status_code(status.text_status)\n" -" prop_status = generate_status_code(status.prop_status)\n" -" print '%s%s %s' % (text_status, prop_status, path[wc_path_len + 1:])\n" -" \n" -" # Do the status crawl, using _status_callback() as our callback function.\n" -" svn.client.svn_client_status(wc_path, None, _status_callback,\n" -" 1, verbose, 0, 0, ctx)\n" -"\n" -"def usage_and_exit(errorcode):\n" -" \"\"\"Print usage message, and exit with ERRORCODE.\"\"\"\n" -" stream = errorcode and sys.stderr or sys.stdout\n" -" stream.write(\"\"\"Usage: %s OPTIONS WC-PATH\n" -"Options:\n" -" --help, -h : Show this usage message\n" -" --verbose, -v : Show all statuses, even uninteresting ones\n" -"\"\"\" % (os.path.basename(sys.argv[0])))\n" -" sys.exit(errorcode)\n" -" \n" -"if __name__ == '__main__':\n" -" # Parse command-line options.\n" -" try:\n" -" opts, args = getopt.getopt(sys.argv[1:], \"hv\", [\"help\", \"verbose\"])\n" -" except getopt.GetoptError:\n" -" usage_and_exit(1)\n" -" verbose = 0\n" -" for opt, arg in opts:\n" -" if opt in (\"-h\", \"--help\"):\n" -" usage_and_exit(0)\n" -" if opt in (\"-v\", \"--verbose\"):\n" -" verbose = 1\n" -" if len(args) != 1:\n" -" usage_and_exit(2)\n" -" \n" -" # Canonicalize the repository path.\n" -" wc_path = svn.core.svn_path_canonicalize(args[0])\n" -"\n" -" # Do the real work.\n" -" try:\n" -" do_status(wc_path, verbose)\n" -" except svn.core.SubversionException, e:\n" -" sys.stderr.write(\"Error (%d): %s\\n\" % (e[1], e[0]))\n" -" sys.exit(1)\n" - -#. (para) -#: ../source/book.xml:16893 -#, fuzzy -msgid "As was the case in , this program is pool-free and uses, for the most part, normal Python data types. The call to svn_client_ctx_t() 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 svn_path_canonicalize(), because to not 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." -msgstr "就像中的例子,这个程序是池自由的,而且最重要的是使用Python的数据类型。svn_client_ctx_t()是欺骗,因为Subversion的API没有这个方法—这仅仅是SWIG自动语言生成中的一点问题(这是对应复杂C结构的一种工厂方法)。也需要注意传递给程序的路径(象最后一个)是通过 svn_path_canonicalize()执行的,因为要防止触发Subversion底层C库的断言,也就是防止导致程序立刻随意退出。" - -#. (title) -#: ../source/book.xml:16918 -msgid "Subversion Complete Reference" -msgstr "Subversion 完全参考" - -#. (para) -#: ../source/book.xml:16920 -#, fuzzy -msgid "This chapter is intended to be a complete reference to using Subversion. This includes the command line client (svn) and all its subcommands, as well as the repository administration programs (svnadmin and svnlook) and their respective subcommands." -msgstr "本章是使用Subversion的一个完全手册,包括了命令行客户端(svn)和它的所有子命令,也有版本库管理程序(svnadminsvnlook)和它们各自的子命令。" - -#. (title) -#: ../source/book.xml:16931 -#, fuzzy -msgid "The Subversion Command Line Client: svn" -msgstr "Subversion 命令行客户端:svn" - -#. (para) -#: ../source/book.xml:16935 -#, fuzzy -msgid "Yes, yes, you don't need a subcommand to use the option, but we'll get to that in just a minute." -msgstr "是的,使用选项不需要子命令,几分钟后我们会到达那个部分。" - -#. (para) -#: ../source/book.xml:16933 -#, fuzzy -msgid "To use the command line client, you type svn, the subcommand you wish to use , 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 svn status:" -msgstr "为了使用命令行客户端,只需要输入svn和它的子命令以及相关的选项或操作的对象—输入的子命令和选项没有特定的顺序,下面使用svn status的方式都是合法的:" - -#. (screen) -#: ../source/book.xml:16942 -#, no-wrap -msgid "" -"\n" -"$ svn -v status\n" -"$ svn status -v \n" -"$ svn status -v myfile\n" -msgstr "" -"\n" -"$ svn -v status\n" -"$ svn status -v \n" -"$ svn status -v myfile\n" - -#. (para) -#: ../source/book.xml:16947 -msgid "You can find many more examples of how to use most client commands in and commands for managing properties in ." -msgstr "你可以在发现更多使用客户端命令的例子,以及中的管理属性的命令。" - -#. (title) -#: ../source/book.xml:16953 -#, fuzzy -msgid "svn Options" -msgstr "svn 选项" - -#. (para) -#: ../source/book.xml:16955 -#, fuzzy -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, () always means verbose output, regardless of the subcommand you use it with." -msgstr "虽然Subversion的子命令有一些不同的选项,但有的选项是全局的—也就是说,每个选项保证是表示同样的事情,而不管是哪个子命令使用的。举个例子,)一直意味着冗长输出,而不管使用它的命令是什么。" - -#. (option) -#: ../source/book.xml:16965 -msgid "--auto-props" -msgstr "--auto-props" - -#. (para) -#: ../source/book.xml:16968 -#, fuzzy -msgid "Enables auto-props, overriding the enable-auto-props directive in the config file." -msgstr "开启auto-props,覆盖config文件中的enable-auto-props指示。" - -#. (term) -#: ../source/book.xml:16974 -#, fuzzy -msgid " () ARG" -msgstr " () ARG" - -#. (para) -#: ../source/book.xml:16977 -msgid "Used as a means to refer to a specific change (aka a revision), this option is syntactic sugar for -r ARG-1:ARG." -msgstr "作为引用特定修改(也叫做修订版本)的方法,这个选项是-r ARG-1:ARG语法上的甜头。" - -#. (option) -#: ../source/book.xml:16984 ../source/book.xml:23152 -msgid "--config-dir" -msgstr "--config-dir" - -#. (replaceable) -#: ../source/book.xml:16985 ../source/book.xml:21349 ../source/book.xml:23153 -msgid "DIR" -msgstr "DIR" - -#. (para) -#: ../source/book.xml:16988 ../source/book.xml:23156 -#, fuzzy -msgid "Instructs Subversion to read configuration information from the specified directory instead of the default location (.subversion in the user's home directory)." -msgstr "指导Subversion从指定目录而不是默认位置(用户主目录的.subversion)读取配置信息。" - -#. (option) -#: ../source/book.xml:16996 -msgid "--diff-cmd" -msgstr "--diff-cmd" - -#. (replaceable) -#: ../source/book.xml:16997 ../source/book.xml:17015 ../source/book.xml:17034 -msgid "CMD" -msgstr "CMD" - -#. (para) -#: ../source/book.xml:17000 -#, fuzzy -msgid "Specifies an external program to use to show differences between files. When svn diff 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 . You can pass options to the diff program with the option (more on that later in this section)." -msgstr "指定用来表示文件区别的外部程序,当svn diff调用时,会使用Subversion的内置区别引擎,默认会提供统一区别输出,如果你希望使用一个外置区别程序,使用。你可以通过(本小节后面有更多介绍)把选项传递到区别程序。" - -#. (option) -#: ../source/book.xml:17014 -msgid "--diff3-cmd" -msgstr "--diff3-cmd" - -#. (para) -#: ../source/book.xml:17018 -msgid "Specifies an external program to use to merge files." -msgstr "指定一个外置程序用来合并文件。" - -#. (option) -#: ../source/book.xml:17023 -msgid "--dry-run" -msgstr "--dry-run" - -#. (para) -#: ../source/book.xml:17026 -msgid "Goes through all the motions of running a command, but makes no actual changes—either on disk or in the repository." -msgstr "检验运行一个命令的效果,但没有实际的修改—可以用在磁盘和版本库。" - -#. (option) -#: ../source/book.xml:17033 -msgid "--editor-cmd" -msgstr "--editor-cmd" - -#. (para) -#: ../source/book.xml:17037 -#, fuzzy -msgid "Specifies an external program to use to edit a log message or a property value. See the editor-cmd section in for ways to specify a default editor." -msgstr "指定一个外部程序来编辑日志信息或是属性值。如何设定缺省编辑器见editor-cmd小节。" - -#. (option) -#: ../source/book.xml:17045 -msgid "--encoding" -msgstr "--encoding" - -#. (replaceable) -#: ../source/book.xml:17046 -msgid "ENC" -msgstr "ENC" - -#. (para) -#: ../source/book.xml:17049 -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." -msgstr "告诉Subversion你的提交日志信息是通过提供的字符集编码的,缺省时是你的操作系统的本地编码,如果你的提交信息使用其它编码,你一定要指定这个值。" - -#. (term) -#: ../source/book.xml:17057 -msgid " () ARGS" -msgstr " () ARGS" - -#. (para) -#: ../source/book.xml:17060 -#, fuzzy -msgid "Specifies an argument or arguments that Subversion should pass to an external diff command. This option is valid only when used with the svn diff or svn merge commands, with the option. If you wish to pass multiple arguments, you must enclose all of them in quotes (for example, svn diff --diff-cmd /usr/bin/diff -x \"-b -E\")." -msgstr "指定一个或多个Subversion传递给提供文件区别的外部区别程序的参数,如果你要传递多个参数,你一定能够要用引号(例如,svn diff --diff-cmd /usr/bin/diff -x \"-b -E\")括起所有的参数。这个选项只有在使用选项时使用。" - -#. (term) -#: ../source/book.xml:17073 -msgid " () FILENAME" -msgstr " () FILENAME" - -#. (para) -#: ../source/book.xml:17077 -msgid "Uses the contents of the named file for the specified subcommand, though different subcommands do different things with this content. For example, svn commit uses the content as a commit log, whereas svn propset uses it as a property value." -msgstr "为特定子命令使用命名文件的的内容,尽管不同的子命令对这些内容做不同的事情。例如,svn commit使用内容作为提交日志,而svn propset使用它作为属性值。" - -#. (option) -#: ../source/book.xml:17087 -msgid "--force" -msgstr "--force" - -#. (para) -#: ../source/book.xml:17090 -#, fuzzy -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 I know what I'm doing as well as the possible repercussions of doing it, so let me at 'em. 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." -msgstr "强制一个特定的命令或操作运行。Subversion有一些操作防止你做普通的使用,但是你可以传递force选项告诉Subversion我知道我做的事情,也知道这样的结果,所以让我做吧。这个选项在程序上等同于在打开电源的情况下做你自己的电子工作—如果你不知道你在做什么,你很有可能会得到一个威胁的警告。" - -#. (option) -#: ../source/book.xml:17103 -msgid "--force-log" -msgstr "--force-log" - -#. (para) -#: ../source/book.xml:17106 -msgid "Forces a suspicious parameter passed to the () or () 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, 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 to subcommands that accept log messages." -msgstr "将传递给)或者)的可疑参数指定为有效可接受。缺省情况下,如果选项的参数看起来会成为子命令的目标,Subversion会提出一个错误,例如,你传递一个版本化的文件路径给)选项,Subversion会认为出了点错误,认为你将目标对象当成了参数,而你并没有提供其它的—未版本化的文件作为日志信息的文件。为了确认你的意图并且不考虑这类错误,传递选项给命令来接受它作为日志信息。" - -#. (term) -#: ../source/book.xml:17124 -msgid " ( or )" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17128 -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." -msgstr "如果同一个或多个子命令一起使用,会显示每个子命令内置的帮助文本,如果单独使用,它会显示常规的客户端帮助文本。" - -#. (option) -#: ../source/book.xml:17135 -msgid "--ignore-ancestry" -msgstr "--ignore-ancestry" - -#. (para) -#: ../source/book.xml:17138 -msgid "Tells Subversion to ignore ancestry when calculating differences (rely on path contents alone)." -msgstr "告诉Subversion在计算区别(只依赖于路径内容)时忽略祖先。" - -#. (option) -#: ../source/book.xml:17144 -msgid "--ignore-externals" -msgstr "--ignore-externals" - -#. (para) -#: ../source/book.xml:17147 -msgid "Tells Subversion to ignore external definitions and the external working copies managed by them." -msgstr "告诉Subversion忽略外部定义和外部定义管理的工作拷贝。" - -#. (option) -#: ../source/book.xml:17153 ../source/book.xml:21338 -msgid "--incremental" -msgstr "--incremental" - -#. (para) -#: ../source/book.xml:17156 -msgid "Prints output in a format suitable for concatenation." -msgstr "打印适合串联的输出格式。" - -#. (option) -#: ../source/book.xml:17162 -msgid "--limit" -msgstr "--limit" - -#. (replaceable) -#: ../source/book.xml:17163 -msgid "NUM" -msgstr "NUM" - -#. (para) -#: ../source/book.xml:17166 -msgid "Show only the first NUM log messages." -msgstr "只显示第一个NUM日志信息。" - -#. (term) -#: ../source/book.xml:17171 -msgid " () MESSAGE" -msgstr " () MESSAGE" - -#. (para) -#: ../source/book.xml:17175 -#, fuzzy -msgid "Indicates that you will specify a either a log message or a lock comment on the command line, following this option. For example:" -msgstr "表示你会在命令行中指定日志信息,紧跟这个开关,例如:" - -#. (screen) -#: ../source/book.xml:17178 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"They don't make Sunday.\"\n" -msgstr "" -"\n" -"$ svn commit -m \"They don't make Sunday.\"\n" - -#. (option) -#: ../source/book.xml:17185 -msgid "--new" -msgstr "--new" - -#. (replaceable) -#: ../source/book.xml:17186 ../source/book.xml:17283 -msgid "ARG" -msgstr "ARG" - -#. (para) -#: ../source/book.xml:17189 -#, fuzzy -msgid "Uses ARG as the newer target (for use with svn diff)." -msgstr "使用ARG作为新的目标。" - -#. (option) -#: ../source/book.xml:17195 ../source/book.xml:23164 -msgid "--no-auth-cache" -msgstr "--no-auth-cache" - -#. (para) -#: ../source/book.xml:17198 ../source/book.xml:23167 -msgid "Prevents caching of authentication information (e.g. username and password) in the Subversion administrative directories." -msgstr "阻止在Subversion管理区缓存认证信息(如用户名密码)。" - -#. (option) -#: ../source/book.xml:17205 -msgid "--no-auto-props" -msgstr "--no-auto-props" - -#. (para) -#: ../source/book.xml:17208 -#, fuzzy -msgid "Disables auto-props, overriding the enable-auto-props directive in the config file." -msgstr "关闭auto-props,覆盖config文件中的enable-auto-props指示。" - -#. (option) -#: ../source/book.xml:17215 ../source/book.xml:22223 -msgid "--no-diff-deleted" -msgstr "--no-diff-deleted" - -#. (para) -#: ../source/book.xml:17218 -#, fuzzy -msgid "Prevents Subversion from printing differences for deleted files. The default behavior when you remove a file is for svn diff to print the same differences that you would see if you had left the file but removed all the content." -msgstr "防止Subversion打印删除文件的区别信息,缺省的行为方式是当你删除了一个文件后运行svn diff打印的区别与删除文件所有的内容得到的结果一样。" - -#. (option) -#: ../source/book.xml:17227 -msgid "--no-ignore" -msgstr "--no-ignore" - -#. (para) -#: ../source/book.xml:17230 -#, fuzzy -msgid "Shows files in the status listing that would normally be omitted since they match a pattern in the global-ignores configuration option or the svn:ignore property. See and for more information." -msgstr "在状态列表中显示global-ignores配置选项或者是svn:ignore属性忽略的文件。见查看详情。" - -#. (option) -#: ../source/book.xml:17239 -msgid "--no-unlock" -msgstr "--no-unlock" - -#. (para) -#: ../source/book.xml:17242 -msgid "Don't automatically unlock files (the default commit behavior is to unlock all files listed as part of the commit). See for more information." -msgstr "不自动解锁文件(缺省的提交行为是解锁提交列出的所有文件),更多信息见。" - -#. (option) -#: ../source/book.xml:17250 ../source/book.xml:23174 -msgid "--non-interactive" -msgstr "--non-interactive" - -#. (para) -#: ../source/book.xml:17253 ../source/book.xml:23177 -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." -msgstr "如果认证失败,或者是不充分的凭证时,防止出现要求凭证的提示(例如用户名和密码)。这在运行自动脚本时非常有用,只是让Subversion失败而不是提示更多的信息。" - -#. (term) -#: ../source/book.xml:17262 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17264 -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." -msgstr "防止子命令迭代到子目录,大多数子命令缺省是迭代的,但是一些子命令—通常是那些潜在的删除或者是取消本地修改的命令—不是。" - -#. (option) -#: ../source/book.xml:17273 -msgid "--notice-ancestry" -msgstr "--notice-ancestry" - -#. (para) -#: ../source/book.xml:17276 -msgid "Pay attention to ancestry when calculating differences." -msgstr "在计算区别时关注祖先。" - -#. (option) -#: ../source/book.xml:17282 -msgid "--old" -msgstr "--old" - -#. (para) -#: ../source/book.xml:17286 -#, fuzzy -msgid "Uses ARG as the older target (for use with svn diff)." -msgstr "使用ARG作为旧的目标。" - -#. (option) -#: ../source/book.xml:17292 ../source/book.xml:23187 -msgid "--password" -msgstr "--password" - -#. (replaceable) -#: ../source/book.xml:17293 ../source/book.xml:23188 -msgid "PASS" -msgstr "PASS" - -#. (para) -#: ../source/book.xml:17296 ../source/book.xml:23191 -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." -msgstr "指出在命令行中提供你的密码—另外,如果它是需要的,Subversion会提示你输入。" - -#. (term) -#: ../source/book.xml:17303 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17305 -msgid "Requests that the client print only essential information while performing an operation." -msgstr "请求客户端在执行操作时只显示重要信息。" - -#. (term) -#: ../source/book.xml:17310 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17312 -msgid "Makes a subcommand recurse into subdirectories. Most subcommands recurse by default." -msgstr "让子命令迭代到子目录,大多数子命令缺省是迭代的。" - -#. (option) -#: ../source/book.xml:17318 -msgid "--relocate" -msgstr "--relocate" - -#. (replaceable) -#: ../source/book.xml:17319 -msgid "FROM TO [PATH...]" -msgstr "目的路径[PATH...]" - -#. (para) -#: ../source/book.xml:17323 -#, fuzzy -msgid "Used with the svn switch 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 svn switch for an example." -msgstr "svn switch子命令中使用,用来修改你的工作拷贝所引用的版本库位置。当版本库的位置修改了,而你有一个工作拷贝,希望继续使用时非常有用。见svn switch的例子。" - -#. (term) -#: ../source/book.xml:17333 -msgid " () REV" -msgstr " () REV" - -#. (para) -#: ../source/book.xml:17337 -#, fuzzy -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:" -msgstr "指出你将为特定操作提供一个修订版本(或修订版本的范围),你可以提供修订版本号,修订版本关键字或日期(在华括号中)作为修订版本开关的参数。如果你希望提供一个修订版本范围,你可以提供用冒号隔开的两个修订版本,举个例子:" - -#. (screen) -#: ../source/book.xml:17344 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 1729\n" -"$ svn log -r 1729:HEAD\n" -"$ svn log -r 1729:1744\n" -"$ svn log -r {2001-12-04}:{2002-02-17}\n" -"$ svn log -r 1729:{2002-02-17}\n" -msgstr "" -"\n" -"$ svn log -r 1729\n" -"$ svn log -r 1729:HEAD\n" -"$ svn log -r 1729:1744\n" -"$ svn log -r {2001-12-04}:{2002-02-17}\n" -"$ svn log -r 1729:{2002-02-17}\n" - -#. (para) -#: ../source/book.xml:17351 -msgid "See for more information." -msgstr "见查看更多信息。" - -#. (option) -#: ../source/book.xml:17357 ../source/book.xml:22255 -msgid "--revprop" -msgstr "--revprop" - -#. (para) -#: ../source/book.xml:17360 ../source/book.xml:22258 -#, fuzzy -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." -msgstr "操作针对修订版本属性,而不是Subversion文件或目录的属性。这个选项需要你传递 ()参数。" - -#. (term) -#: ../source/book.xml:17368 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17370 -#, fuzzy -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 svn update." -msgstr "导致客户端显示本地拷贝哪些文件已经过期,这不会实际更新你的任何文件—只是显示了如果你运行svn update时更新的文件。" - -#. (option) -#: ../source/book.xml:17380 -msgid "--stop-on-copy" -msgstr "--stop-on-copy" - -#. (para) -#: ../source/book.xml:17383 -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." -msgstr "导致Subversion子命令在传递历史时会在版本化资源拷贝时停止收集历史信息—也就是历史中资源从另一个位置拷贝过来时。" - -#. (option) -#: ../source/book.xml:17393 -msgid "--strict" -msgstr "--strict" - -#. (para) -#: ../source/book.xml:17396 -#, fuzzy -msgid "Causes Subversion to use strict semantics, a notion which is rather vague unless talking about specific subcommands (namely, svn propget)." -msgstr "导致Subversion使用严格的语法,也就是选择含糊,除非谈论特定的子命令。" - -#. (option) -#: ../source/book.xml:17403 -msgid "--targets" -msgstr "--targets" - -#. (replaceable) -#: ../source/book.xml:17404 -msgid "FILENAME" -msgstr "FILENAME" - -#. (para) -#: ../source/book.xml:17407 -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." -msgstr "告诉Subversion从你提供的文件中得到希望操作的文件列表,而不是在命令行列出所有的文件。" - -#. (option) -#: ../source/book.xml:17415 ../source/book.xml:23199 -msgid "--username" -msgstr "--username" - -#. (replaceable) -#: ../source/book.xml:17416 ../source/book.xml:23200 -msgid "NAME" -msgstr "NAME" - -#. (para) -#: ../source/book.xml:17419 ../source/book.xml:23203 -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." -msgstr "表示你要在命令行提供认证的用户名—否则如果需要,Subversion会提示你这一点。" - -#. (term) -#: ../source/book.xml:17426 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:17428 -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." -msgstr "请求客户端在运行子命令打印尽量多的信息,会导致Subversion打印额外的字段,每个文件的细节信息或者是关于动作的附加信息。" - -#. (option) -#: ../source/book.xml:17437 ../source/book.xml:23519 ../source/book.xml:23666 -msgid "--version" -msgstr "--version" - -#. (para) -#: ../source/book.xml:17440 -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 () it prints only the version number in a compact form." -msgstr "打印客户端版本信息,这个信息不仅仅包括客户端的版本号,也有所有客户端可以用来访问Subversion版本库的版本库访问模块列表。" - -#. (option) -#: ../source/book.xml:17451 -msgid "--xml" -msgstr "--xml" - -#. (para) -#: ../source/book.xml:17454 -msgid "Prints output in XML format." -msgstr "使用XML格式打印输出。" - -#. (title) -#: ../source/book.xml:17462 -#, fuzzy -msgid "svn Subcommands" -msgstr "svn 子命令" - -#. (para) -#: ../source/book.xml:17464 ../source/book.xml:23216 -msgid "Here are the various subcommands:" -msgstr "下面是一些子命令:" - -#. (secondary) -#: ../source/book.xml:17468 ../source/book.xml:17571 ../source/book.xml:17675 -#: ../source/book.xml:17760 ../source/book.xml:17891 ../source/book.xml:17967 -#: ../source/book.xml:18095 ../source/book.xml:18274 ../source/book.xml:18384 -#: ../source/book.xml:18637 ../source/book.xml:18749 ../source/book.xml:18802 -#: ../source/book.xml:18906 ../source/book.xml:19107 ../source/book.xml:19225 -#: ../source/book.xml:19319 ../source/book.xml:19543 ../source/book.xml:19665 -#: ../source/book.xml:19750 ../source/book.xml:19870 ../source/book.xml:19949 -#: ../source/book.xml:20028 ../source/book.xml:20109 ../source/book.xml:20197 -#: ../source/book.xml:20322 ../source/book.xml:20411 ../source/book.xml:20517 -#: ../source/book.xml:20862 ../source/book.xml:21024 ../source/book.xml:21111 -#: ../source/book.xml:21405 ../source/book.xml:21473 ../source/book.xml:21512 -#: ../source/book.xml:21615 ../source/book.xml:21648 ../source/book.xml:21694 -#: ../source/book.xml:21726 ../source/book.xml:21772 ../source/book.xml:21835 -#: ../source/book.xml:21881 ../source/book.xml:21919 ../source/book.xml:21996 -#: ../source/book.xml:22040 ../source/book.xml:22088 ../source/book.xml:22145 -#: ../source/book.xml:22292 ../source/book.xml:22336 ../source/book.xml:22391 -#: ../source/book.xml:22481 ../source/book.xml:22525 ../source/book.xml:22594 -#: ../source/book.xml:22639 ../source/book.xml:22671 ../source/book.xml:22734 -#: ../source/book.xml:22782 ../source/book.xml:22831 ../source/book.xml:22875 -#: ../source/book.xml:22928 ../source/book.xml:22990 ../source/book.xml:23043 -#: ../source/book.xml:23081 ../source/book.xml:23220 ../source/book.xml:23286 -#: ../source/book.xml:23357 -msgid "subcommands" -msgstr "子命令" - -#. (tertiary) -#: ../source/book.xml:17469 -msgid "add" -msgstr "add" - -#. (refpurpose) -#: ../source/book.xml:17473 -msgid "Add files, directories, or symbolic links." -msgstr "添加文件、目录或符号链。" - -#. (title) -#: ../source/book.xml:17477 ../source/book.xml:17581 ../source/book.xml:17685 -#: ../source/book.xml:17769 ../source/book.xml:17900 ../source/book.xml:17976 -#: ../source/book.xml:18105 ../source/book.xml:18284 ../source/book.xml:18393 -#: ../source/book.xml:18646 ../source/book.xml:18758 ../source/book.xml:18812 -#: ../source/book.xml:18916 ../source/book.xml:19116 ../source/book.xml:19236 -#: ../source/book.xml:19328 ../source/book.xml:19553 ../source/book.xml:19674 -#: ../source/book.xml:19759 ../source/book.xml:19879 ../source/book.xml:19959 -#: ../source/book.xml:20037 ../source/book.xml:20118 ../source/book.xml:20206 -#: ../source/book.xml:20332 ../source/book.xml:20420 ../source/book.xml:20526 -#: ../source/book.xml:20871 ../source/book.xml:21033 ../source/book.xml:21120 -#: ../source/book.xml:21414 ../source/book.xml:21482 ../source/book.xml:21521 -#: ../source/book.xml:21624 ../source/book.xml:21657 ../source/book.xml:21706 -#: ../source/book.xml:21737 ../source/book.xml:21783 ../source/book.xml:21844 -#: ../source/book.xml:21890 ../source/book.xml:21932 ../source/book.xml:22006 -#: ../source/book.xml:22049 ../source/book.xml:22097 ../source/book.xml:22154 -#: ../source/book.xml:22301 ../source/book.xml:22345 ../source/book.xml:22400 -#: ../source/book.xml:22490 ../source/book.xml:22534 ../source/book.xml:22603 -#: ../source/book.xml:22648 ../source/book.xml:22682 ../source/book.xml:22744 -#: ../source/book.xml:22792 ../source/book.xml:22841 ../source/book.xml:22885 -#: ../source/book.xml:22938 ../source/book.xml:22999 ../source/book.xml:23053 -#: ../source/book.xml:23090 ../source/book.xml:23231 ../source/book.xml:23296 -#: ../source/book.xml:23367 ../source/book.xml:23611 -msgid "Synopsis" -msgstr "概要" - -#. (programlisting) -#: ../source/book.xml:17479 -#, no-wrap -msgid "svn add PATH..." -msgstr "svn add PATH..." - -#. (title), (entry) -#: ../source/book.xml:17483 ../source/book.xml:17587 ../source/book.xml:17691 -#: ../source/book.xml:17775 ../source/book.xml:17906 ../source/book.xml:17982 -#: ../source/book.xml:18111 ../source/book.xml:18291 ../source/book.xml:18401 -#: ../source/book.xml:18653 ../source/book.xml:18764 ../source/book.xml:18818 -#: ../source/book.xml:18922 ../source/book.xml:19122 ../source/book.xml:19242 -#: ../source/book.xml:19336 ../source/book.xml:19561 ../source/book.xml:19681 -#: ../source/book.xml:19765 ../source/book.xml:19886 ../source/book.xml:19966 -#: ../source/book.xml:20044 ../source/book.xml:20125 ../source/book.xml:20213 -#: ../source/book.xml:20338 ../source/book.xml:20426 ../source/book.xml:20532 -#: ../source/book.xml:20878 ../source/book.xml:21039 ../source/book.xml:21126 -#: ../source/book.xml:21420 ../source/book.xml:21488 ../source/book.xml:21527 -#: ../source/book.xml:21630 ../source/book.xml:21663 ../source/book.xml:21712 -#: ../source/book.xml:21743 ../source/book.xml:21789 ../source/book.xml:21850 -#: ../source/book.xml:21896 ../source/book.xml:21938 ../source/book.xml:22012 -#: ../source/book.xml:22055 ../source/book.xml:22103 ../source/book.xml:22160 -#: ../source/book.xml:22307 ../source/book.xml:22351 ../source/book.xml:22406 -#: ../source/book.xml:22496 ../source/book.xml:22540 ../source/book.xml:22609 -#: ../source/book.xml:22654 ../source/book.xml:22688 ../source/book.xml:22750 -#: ../source/book.xml:22798 ../source/book.xml:22847 ../source/book.xml:22891 -#: ../source/book.xml:22944 ../source/book.xml:23005 ../source/book.xml:23059 -#: ../source/book.xml:23096 ../source/book.xml:23237 ../source/book.xml:23302 -#: ../source/book.xml:23373 ../source/book.xml:23617 ../source/book.xml:23747 -#: ../source/book.xml:24046 ../source/book.xml:24093 ../source/book.xml:24142 -#: ../source/book.xml:24189 ../source/book.xml:24252 ../source/book.xml:24313 -#: ../source/book.xml:24364 ../source/book.xml:24410 ../source/book.xml:24463 -#: ../source/book.xml:25476 -msgid "Description" -msgstr "描述" - -#. (para) -#: ../source/book.xml:17485 -#, fuzzy -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 svn revert." -msgstr "添加文件、目录或符号链到你的工作拷贝并且预定添加到版本库。它们会在下次提交上传并添加到版本库,如果你在提交之前改变了主意,你可以使用svn revert取消预定。" - -#. (title) -#: ../source/book.xml:17495 ../source/book.xml:17596 ../source/book.xml:17699 -#: ../source/book.xml:17787 ../source/book.xml:17924 ../source/book.xml:18007 -#: ../source/book.xml:18162 ../source/book.xml:18306 ../source/book.xml:18507 -#: ../source/book.xml:18672 ../source/book.xml:18771 ../source/book.xml:18830 -#: ../source/book.xml:19008 ../source/book.xml:19163 ../source/book.xml:19253 -#: ../source/book.xml:19365 ../source/book.xml:19595 ../source/book.xml:19695 -#: ../source/book.xml:19801 ../source/book.xml:19897 ../source/book.xml:19977 -#: ../source/book.xml:20055 ../source/book.xml:20136 ../source/book.xml:20231 -#: ../source/book.xml:20351 ../source/book.xml:20439 ../source/book.xml:20775 -#: ../source/book.xml:20898 ../source/book.xml:21051 ../source/book.xml:21178 -#: ../source/book.xml:21640 ../source/book.xml:22663 ../source/book.xml:22898 -#: ../source/book.xml:22951 ../source/book.xml:23255 ../source/book.xml:23316 -#: ../source/book.xml:23386 -msgid "Alternate Names" -msgstr "别名" - -#. (para) -#: ../source/book.xml:17497 ../source/book.xml:17701 ../source/book.xml:17926 -#: ../source/book.xml:18674 ../source/book.xml:18832 ../source/book.xml:19010 -#: ../source/book.xml:19255 ../source/book.xml:19367 ../source/book.xml:19597 -#: ../source/book.xml:19697 ../source/book.xml:20353 ../source/book.xml:20441 -#: ../source/book.xml:21053 ../source/book.xml:21858 ../source/book.xml:22020 -#: ../source/book.xml:22809 ../source/book.xml:23257 -msgid "None" -msgstr "无" - -#. (title) -#: ../source/book.xml:17501 ../source/book.xml:17602 ../source/book.xml:17705 -#: ../source/book.xml:17793 ../source/book.xml:17930 ../source/book.xml:18015 -#: ../source/book.xml:18168 ../source/book.xml:18312 ../source/book.xml:18513 -#: ../source/book.xml:18678 ../source/book.xml:18780 ../source/book.xml:18836 -#: ../source/book.xml:19014 ../source/book.xml:19169 ../source/book.xml:19259 -#: ../source/book.xml:19371 ../source/book.xml:19601 ../source/book.xml:19701 -#: ../source/book.xml:19807 ../source/book.xml:19903 ../source/book.xml:19983 -#: ../source/book.xml:20061 ../source/book.xml:20142 ../source/book.xml:20237 -#: ../source/book.xml:20357 ../source/book.xml:20445 ../source/book.xml:20781 -#: ../source/book.xml:20904 ../source/book.xml:21057 ../source/book.xml:21184 -msgid "Changes" -msgstr "改变" - -#. (para) -#: ../source/book.xml:17503 -msgid "Working Copy" -msgstr "工作拷贝" - -#. (title) -#: ../source/book.xml:17507 ../source/book.xml:17608 ../source/book.xml:17711 -#: ../source/book.xml:17799 ../source/book.xml:17936 ../source/book.xml:18021 -#: ../source/book.xml:18175 ../source/book.xml:18319 ../source/book.xml:18519 -#: ../source/book.xml:18684 ../source/book.xml:18786 ../source/book.xml:18842 -#: ../source/book.xml:19020 ../source/book.xml:19175 ../source/book.xml:19265 -#: ../source/book.xml:19377 ../source/book.xml:19607 ../source/book.xml:19707 -#: ../source/book.xml:19813 ../source/book.xml:19909 ../source/book.xml:19989 -#: ../source/book.xml:20067 ../source/book.xml:20148 ../source/book.xml:20243 -#: ../source/book.xml:20363 ../source/book.xml:20451 ../source/book.xml:20787 -#: ../source/book.xml:20910 ../source/book.xml:21063 ../source/book.xml:21190 -msgid "Accesses Repository" -msgstr "是否访问版本库" - -#. (para) -#: ../source/book.xml:17509 ../source/book.xml:17938 ../source/book.xml:18788 -#: ../source/book.xml:20365 ../source/book.xml:20453 -msgid "No" -msgstr "否" - -#. (title) -#: ../source/book.xml:17513 ../source/book.xml:17614 ../source/book.xml:17717 -#: ../source/book.xml:17805 ../source/book.xml:17942 ../source/book.xml:18027 -#: ../source/book.xml:18182 ../source/book.xml:18325 ../source/book.xml:18526 -#: ../source/book.xml:18690 ../source/book.xml:18792 ../source/book.xml:18848 -#: ../source/book.xml:19026 ../source/book.xml:19181 ../source/book.xml:19271 -#: ../source/book.xml:19383 ../source/book.xml:19613 ../source/book.xml:19713 -#: ../source/book.xml:19819 ../source/book.xml:19915 ../source/book.xml:19995 -#: ../source/book.xml:20073 ../source/book.xml:20154 ../source/book.xml:20249 -#: ../source/book.xml:20369 ../source/book.xml:20457 ../source/book.xml:20793 -#: ../source/book.xml:20916 ../source/book.xml:21069 ../source/book.xml:21196 -#: ../source/book.xml:21443 ../source/book.xml:21501 ../source/book.xml:21576 -#: ../source/book.xml:21677 ../source/book.xml:21797 ../source/book.xml:21856 -#: ../source/book.xml:21945 ../source/book.xml:22018 ../source/book.xml:22062 -#: ../source/book.xml:22122 ../source/book.xml:22314 ../source/book.xml:22357 -#: ../source/book.xml:22450 ../source/book.xml:22503 ../source/book.xml:22547 -#: ../source/book.xml:22617 ../source/book.xml:22696 ../source/book.xml:22757 -#: ../source/book.xml:22807 ../source/book.xml:22853 ../source/book.xml:22904 -#: ../source/book.xml:22957 ../source/book.xml:23014 ../source/book.xml:23261 -#: ../source/book.xml:23322 ../source/book.xml:23392 ../source/book.xml:23639 -msgid "Options" -msgstr "选项" - -#. (screen) -#: ../source/book.xml:17515 -#, fuzzy, no-wrap -msgid "" -"\n" -"--targets FILENAME\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--config-dir DIR\n" -"--no-ignore\n" -"--auto-props\n" -"--no-auto-props\n" -"--force\n" -msgstr "" -"\n" -"--targets FILENAME\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--config-dir DIR\n" -"--auto-props\n" -"--no-auto-props\n" -"--force\n" - -#. (title) -#: ../source/book.xml:17528 ../source/book.xml:17654 ../source/book.xml:17730 -#: ../source/book.xml:17821 ../source/book.xml:17951 ../source/book.xml:18047 -#: ../source/book.xml:18201 ../source/book.xml:18345 ../source/book.xml:18550 -#: ../source/book.xml:18708 ../source/book.xml:18870 ../source/book.xml:19043 -#: ../source/book.xml:19198 ../source/book.xml:19289 ../source/book.xml:19403 -#: ../source/book.xml:19634 ../source/book.xml:19731 ../source/book.xml:19839 -#: ../source/book.xml:19931 ../source/book.xml:20011 ../source/book.xml:20089 -#: ../source/book.xml:20171 ../source/book.xml:20269 ../source/book.xml:20380 -#: ../source/book.xml:20468 ../source/book.xml:20811 ../source/book.xml:20933 -#: ../source/book.xml:21083 ../source/book.xml:21215 ../source/book.xml:21454 -#: ../source/book.xml:21587 ../source/book.xml:21755 ../source/book.xml:21905 -#: ../source/book.xml:21953 ../source/book.xml:22070 ../source/book.xml:22131 -#: ../source/book.xml:22176 ../source/book.xml:22323 ../source/book.xml:22366 -#: ../source/book.xml:22459 ../source/book.xml:22512 ../source/book.xml:22558 -#: ../source/book.xml:22626 ../source/book.xml:22705 ../source/book.xml:22766 -#: ../source/book.xml:22813 ../source/book.xml:22862 ../source/book.xml:22914 -#: ../source/book.xml:22968 ../source/book.xml:23024 ../source/book.xml:23070 -#: ../source/book.xml:23102 ../source/book.xml:23273 ../source/book.xml:23334 -#: ../source/book.xml:23404 ../source/book.xml:23677 -msgid "Examples" -msgstr "例子" - -#. (para) -#: ../source/book.xml:17530 -msgid "To add a file to your working copy:" -msgstr "添加一个文件到工作拷贝:" - -#. (screen) -#: ../source/book.xml:17531 -#, no-wrap -msgid "" -"\n" -"$ svn add foo.c \n" -"A foo.c\n" -msgstr "" -"\n" -"$ svn add foo.c \n" -"A foo.c\n" - -#. (para) -#: ../source/book.xml:17535 -#, fuzzy -msgid "When adding a directory, the default behavior of svn add is to recurse:" -msgstr "当添加一个目录,svn add缺省的行为方式是递归的:" - -#. (screen) -#: ../source/book.xml:17537 -#, no-wrap -msgid "" -"\n" -"$ svn add testdir\n" -"A testdir\n" -"A testdir/a\n" -"A testdir/b\n" -"A testdir/c\n" -"A testdir/d\n" -msgstr "" -"\n" -"$ svn add testdir\n" -"A testdir\n" -"A testdir/a\n" -"A testdir/b\n" -"A testdir/c\n" -"A testdir/d\n" - -#. (para) -#: ../source/book.xml:17545 -msgid "You can add a directory without adding its contents:" -msgstr "你可以只添加一个目录而不包括其内容:" - -#. (screen) -#: ../source/book.xml:17547 -#, no-wrap -msgid "" -"\n" -"$ svn add --non-recursive otherdir\n" -"A otherdir\n" -msgstr "" -"\n" -"$ svn add --non-recursive otherdir\n" -"A otherdir\n" - -#. (para) -#: ../source/book.xml:17551 -#, fuzzy -msgid "Normally, the command svn add * 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 makes svn add recurse into versioned directories:" -msgstr "通常情况下,命令svn add *会忽略所有已经在版本控制之下的目录,有时候,你会希望添加所有工作拷贝的未版本化文件,包括那些隐藏在深处的文件,可以使用svn add递归到版本化的目录下:" - -#. (screen) -#: ../source/book.xml:17559 -#, no-wrap -msgid "" -"\n" -"$ svn add * --force\n" -"A foo.c\n" -"A somedir/bar.c\n" -"A otherdir/docs/baz.doc\n" -"…\n" -msgstr "" -"\n" -"$ svn add * --force\n" -"A foo.c\n" -"A somedir/bar.c\n" -"A otherdir/docs/baz.doc\n" -"…\n" - -#. (tertiary) -#: ../source/book.xml:17572 -msgid "blame" -msgstr "blame" - -#. (refname) -#: ../source/book.xml:17575 -msgid "svn blame" -msgstr "svn blame" - -#. (refpurpose) -#: ../source/book.xml:17576 -msgid "Show author and revision information in-line for the specified files or URLs." -msgstr "显示特定文件和URL内嵌的作者和修订版本信息。" - -#. (programlisting) -#: ../source/book.xml:17583 -#, no-wrap -msgid "svn blame TARGET[@REV]..." -msgstr "svn blame TARGET[@REV]..." - -#. (para) -#: ../source/book.xml:17589 -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." -msgstr "显示特定文件和URL内嵌的作者和修订版本信息。每一行文本在开头都放了最后修改的作者(用户名)和修订版本号。" - -#. (para) -#: ../source/book.xml:17598 -msgid "praise, annotate, ann" -msgstr "praise、annotate、ann" - -#. (para) -#: ../source/book.xml:17604 ../source/book.xml:17707 ../source/book.xml:18515 -#: ../source/book.xml:18782 ../source/book.xml:19016 ../source/book.xml:19171 -#: ../source/book.xml:19373 ../source/book.xml:20783 -msgid "Nothing" -msgstr "无2" - -#. (para) -#: ../source/book.xml:17610 ../source/book.xml:17713 ../source/book.xml:17801 -#: ../source/book.xml:18023 ../source/book.xml:18844 ../source/book.xml:19177 -#: ../source/book.xml:19267 ../source/book.xml:19379 ../source/book.xml:20912 -#: ../source/book.xml:21065 ../source/book.xml:21192 -msgid "Yes" -msgstr "是" - -#. (screen) -#: ../source/book.xml:17616 -#, fuzzy, no-wrap -msgid "" -"\n" -"--revision (-r) ARG\n" -"--verbose (-v)\n" -"--incremental\n" -"--xml\n" -"--extensions (-x) ARG\n" -"--force\n" -"--username ARG\n" -"--password ARG\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir ARG\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--verbose (-v)\n" -"--recursive (-R)\n" -"--incremental\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:17656 -#, fuzzy -msgid "If you want to see blame annotated source for readme.txt in your test repository:" -msgstr "如果你希望在测试版本库看到blame标记的readme.txt源代码:" - -#. (screen) -#: ../source/book.xml:17659 -#, no-wrap -msgid "" -"\n" -"$ svn blame http://svn.red-bean.com/repos/test/readme.txt\n" -" 3 sally This is a README file.\n" -" 5 harry You should read this.\n" -msgstr "" -"\n" -"$ svn blame http://svn.red-bean.com/repos/test/readme.txt\n" -" 3 sally This is a README file.\n" -" 5 harry You should read this.\n" - -#. (para) -#: ../source/book.xml:17664 -msgid "Even if svn blame 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 context of the line—he may have just adjusted the whitespace." -msgstr "即使svn blame说明Harry最后在修订版本5被修改,你也需要验证Harry在修订版本修改行的上下文—也许他只是调整了空格。" - -#. (tertiary) -#: ../source/book.xml:17676 ../source/book.xml:22337 -msgid "cat" -msgstr "cat" - -#. (refpurpose) -#: ../source/book.xml:17680 -msgid "Output the contents of the specified files or URLs." -msgstr "输出特定文件或URL的内容。" - -#. (programlisting) -#: ../source/book.xml:17687 -#, no-wrap -msgid "svn cat TARGET[@REV]..." -msgstr "svn cat TARGET[@REV]..." - -#. (para) -#: ../source/book.xml:17693 -#, fuzzy -msgid "Output the contents of the specified files or URLs. For listing the contents of directories, see svn list." -msgstr "输出特定文件或URL的内容。列出目录的内容可以使用svn list。" - -#. (screen) -#: ../source/book.xml:17719 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:17732 -msgid "If you want to view readme.txt in your repository without checking it out:" -msgstr "如果你希望不检出而察看版本库的readme.txt的内容:" - -#. (screen) -#: ../source/book.xml:17734 -#, no-wrap -msgid "" -"\n" -"$ svn cat http://svn.red-bean.com/repos/test/readme.txt\n" -"This is a README file.\n" -"You should read this.\n" -msgstr "" -"\n" -"$ svn cat http://svn.red-bean.com/repos/test/readme.txt\n" -"This is a README file.\n" -"You should read this.\n" - -#. (para) -#: ../source/book.xml:17740 -#, fuzzy -msgid "If your working copy is out of date (or you have local modifications) and you want to see the HEAD revision of a file in your working copy, svn cat -r HEAD will automatically fetch the HEAD revision when you give it a path:" -msgstr "如果你的工作拷贝已经过期(或者你有本地修改),并且希望察看工作拷贝的HEAD修订版本的一个文件,如果你给定一个路径,svn cat会自动取得HEAD的修订版本:" - -#. (screen) -#: ../source/book.xml:17747 -#, no-wrap -msgid "" -"\n" -"$ cat foo.c\n" -"This file is in my local working copy \n" -"and has changes that I've made.\n" -"\n" -"$ svn cat -r HEAD foo.c\n" -"Latest revision fresh from the repository!\n" -msgstr "" -"\n" -"$ cat foo.c\n" -"This file is in my local working copy \n" -"and has changes that I've made.\n" -"\n" -"$ svn cat -r HEAD foo.c\n" -"Latest revision fresh from the repository!\n" - -#. (tertiary) -#: ../source/book.xml:17761 -msgid "checkout" -msgstr "checkout" - -#. (refname) -#: ../source/book.xml:17764 -msgid "svn checkout" -msgstr "svn checkout" - -#. (refpurpose) -#: ../source/book.xml:17765 -msgid "Check out a working copy from a repository." -msgstr "从版本库取出一个工作拷贝。" - -#. (programlisting) -#: ../source/book.xml:17771 -#, no-wrap -msgid "svn checkout URL[@REV]... [PATH]" -msgstr "svn checkout URL[@REV]... [PATH]" - -#. (para) -#: ../source/book.xml:17777 -msgid "Check out a working copy from a repository. If PATH 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 PATH, with the name of the subdirectory being the basename of the URL." -msgstr "从版本库取出一个工作拷贝,如果省略PATH,URL的基名称会作为目标,如果给定多个URL,每一个都会检出到PATH的子目录,使用URL基名称的子目录名称。" - -#. (para) -#: ../source/book.xml:17789 -msgid "co" -msgstr "co" - -#. (para) -#: ../source/book.xml:17795 -msgid "Creates a working copy." -msgstr "创建一个工作拷贝。" - -#. (screen) -#: ../source/book.xml:17807 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--non-recursive (-N)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--ignore-externals\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--non-recursive (-N)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--ignore-externals\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:17823 -#, fuzzy -msgid "Check out a working copy into a directory called mine:" -msgstr "取出一个工作拷贝到mine:" - -#. (screen) -#: ../source/book.xml:17825 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos/test mine\n" -"A mine/a\n" -"A mine/b\n" -"Checked out revision 2.\n" -"$ ls\n" -"mine\n" -msgstr "" -"\n" -"$ svn checkout file:///tmp/repos/test mine\n" -"A mine/a\n" -"A mine/b\n" -"Checked out revision 2.\n" -"$ ls\n" -"mine\n" - -#. (para) -#: ../source/book.xml:17833 -#, fuzzy -msgid "Check out two different directories into two separate working copies:" -msgstr "检出两个目录到两个单独的工作拷贝:" - -#. (screen) -#: ../source/book.xml:17835 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz\n" -"A test/a\n" -"A test/b\n" -"Checked out revision 2.\n" -"A quiz/l\n" -"A quiz/m\n" -"Checked out revision 2.\n" -"$ ls\n" -"quiz test\n" -msgstr "" -"\n" -"$ svn checkout file:///tmp/repos/test file:///tmp/repos/quiz\n" -"A test/a\n" -"A test/b\n" -"Checked out revision 2.\n" -"A quiz/l\n" -"A quiz/m\n" -"Checked out revision 2.\n" -"$ ls\n" -"quiz test\n" - -#. (para) -#: ../source/book.xml:17846 -#, fuzzy -msgid "Check out two different directories into two separate working copies, but place both into a directory called working-copies:" -msgstr "检出两个目录到两个单独的工作拷贝,但是将两个目录都放到working-copies:" - -#. (screen) -#: ../source/book.xml:17849 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz working-copies\n" -"A working-copies/test/a\n" -"A working-copies/test/b\n" -"Checked out revision 2.\n" -"A working-copies/quiz/l\n" -"A working-copies/quiz/m\n" -"Checked out revision 2.\n" -"$ ls\n" -"working-copies\n" -msgstr "" -"\n" -"$ svn checkout file:///tmp/repos/test file:///tmp/repos/quiz working-copies\n" -"A working-copies/test/a\n" -"A working-copies/test/b\n" -"Checked out revision 2.\n" -"A working-copies/quiz/l\n" -"A working-copies/quiz/m\n" -"Checked out revision 2.\n" -"$ ls\n" -"working-copies\n" - -#. (para) -#: ../source/book.xml:17860 -#, fuzzy -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:" -msgstr "如果你打断一个检出(或其它打断检出的事情,如连接失败。),你可以使用同样的命令重新开始或者是更新不完整的工作拷贝:" - -#. (screen) -#: ../source/book.xml:17865 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos/test test\n" -"A test/a\n" -"A test/b\n" -"^C\n" -"svn: The operation was interrupted\n" -"svn: caught SIGINT\n" -"\n" -"$ svn checkout file:///var/svn/repos/test test\n" -"A test/c\n" -"A test/d\n" -"^C\n" -"svn: The operation was interrupted\n" -"svn: caught SIGINT\n" -"\n" -"$ cd test\n" -"$ svn update\n" -"A test/e\n" -"A test/f\n" -"Updated to revision 3.\n" -msgstr "" -"\n" -"$ svn checkout file:///tmp/repos/test test\n" -"A test/a\n" -"A test/b\n" -"^C\n" -"svn: The operation was interrupted\n" -"svn: caught SIGINT\n" -"\n" -"$ svn checkout file:///tmp/repos/test test\n" -"A test/c\n" -"A test/d\n" -"^C\n" -"svn: The operation was interrupted\n" -"svn: caught SIGINT\n" -"\n" -"$ cd test\n" -"$ svn update\n" -"A test/e\n" -"A test/f\n" -"Updated to revision 3.\n" - -#. (tertiary) -#: ../source/book.xml:17892 -msgid "cleanup" -msgstr "cleanup" - -#. (refname) -#: ../source/book.xml:17895 -msgid "svn cleanup" -msgstr "svn cleanup" - -#. (refpurpose) -#: ../source/book.xml:17896 -msgid "Recursively clean up the working copy." -msgstr "递归清理工作拷贝。" - -#. (programlisting) -#: ../source/book.xml:17902 -#, no-wrap -msgid "svn cleanup [PATH...]" -msgstr "svn cleanup [PATH...]" - -#. (para) -#: ../source/book.xml:17908 -msgid "Recursively clean up the working copy, removing working copy locks and resuming unfinished operations. If you ever get a working copy locked error, run this command to remove stale locks and get your working copy into a usable state again." -msgstr "递归清理工作拷贝,删除未完成的工作拷贝锁定,并恢复未完成的操作。如果你得到一个工作拷贝已锁定的错误,运行这个命令可以删除无效的锁定,让你的工作拷贝再次回到可用的状态。" - -#. (para) -#: ../source/book.xml:17913 -#, fuzzy -msgid "If, for some reason, an svn update fails due to a problem running an external diff program (e.g. user input or network failure), pass the to allow cleanup to complete any merging with your external diff program. You can also specify any configuration directory with the option, but you should need these options extremely infrequently." -msgstr "如果,因为一些原因,运行外置的区别程序(例如,用户输入或是网络错误)有时候会导致一个svn update失败,使用选项可以完全清除你的外置区别程序所作的合并,你也可以使用指定任何配置目录,但是你应该不会经常使用这些选项。" - -#. (para) -#: ../source/book.xml:17932 ../source/book.xml:19603 ../source/book.xml:20359 -#: ../source/book.xml:20447 ../source/book.xml:20906 ../source/book.xml:21186 -msgid "Working copy" -msgstr "工作拷贝2" - -#. (screen) -#: ../source/book.xml:17944 -#, no-wrap -msgid "" -"\n" -"--diff3-cmd CMD\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--diff3-cmd CMD\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:17953 -#, fuzzy -msgid "Well, there's not much to the examples here as svn cleanup generates no output. If you pass no PATH, . is used." -msgstr "svn cleanup没有输出,没有太多的例子,如果你没有传递PATH,会使用.。" - -#. (screen) -#: ../source/book.xml:17957 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn cleanup\n" -"\n" -"$ svn cleanup /var/svn/working-copy\n" -msgstr "" -"\n" -"$ svn cleanup\n" -"\n" -"$ svn cleanup /path/to/working-copy\n" - -#. (tertiary) -#: ../source/book.xml:17968 -msgid "commit" -msgstr "commit" - -#. (refpurpose) -#: ../source/book.xml:17972 -msgid "Send changes from your working copy to the repository." -msgstr "将修改从工作拷贝发送到版本库。" - -#. (programlisting) -#: ../source/book.xml:17978 -#, no-wrap -msgid "svn commit [PATH...]" -msgstr "svn commit [PATH...]" - -#. (para) -#: ../source/book.xml:17984 -#, fuzzy -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 or option, svn will launch your editor for you to compose a commit message. See the editor-cmd section in ." -msgstr "将修改从工作拷贝发送到版本库。如果你没有使用提供一个提交日志信息,svn会启动你的编辑器来编写一个提交信息,见editor-cmd小节。" - -#. (para) -#: ../source/book.xml:17991 -#, fuzzy -msgid "svn commit will send any lock tokens that it finds and will release locks on all PATHS committed (recursively), unless is passed." -msgstr "svn commit will send found lock tokens and release locks on all PATHS committed (recursively) unless is passed." - -#. (para) -#: ../source/book.xml:17996 -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." -msgstr "如果你开始一个提交并且Subversion启动了你的编辑器来编辑提交信息,你仍可以退出而不会提交你的修改,如果你希望取消你的提交,只需要退出编辑器而不保存你的提交信息,Subversion会提示你是选择取消提交、空信息继续还是重新编辑信息。" - -#. (para) -#: ../source/book.xml:18009 -msgid "ci (short for check in; not co, which is short for checkout)" -msgstr "ci(check in的缩写;不是checkout的缩写co。)" - -#. (para) -#: ../source/book.xml:18017 -msgid "Working copy, repository" -msgstr "工作拷贝,版本库" - -#. (screen) -#: ../source/book.xml:18029 -#, no-wrap -msgid "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--no-unlock\n" -"--non-recursive (-N)\n" -"--targets FILENAME\n" -"--force-log\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--no-unlock\n" -"--non-recursive (-N)\n" -"--targets FILENAME\n" -"--force-log\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:18049 -#, fuzzy -msgid "Commit a simple modification to a file with the commit message on the command line and an implicit target of your current directory (.):" -msgstr "使用命令行提交一个包含日志信息的文件修改,当前目录(.)是没有说明的目标路径:" - -#. (screen) -#: ../source/book.xml:18053 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"added howto section.\"\n" -"Sending a\n" -"Transmitting file data .\n" -"Committed revision 3.\n" -msgstr "" -"\n" -"$ svn commit -m \"added howto section.\"\n" -"Sending a\n" -"Transmitting file data .\n" -"Committed revision 3.\n" - -#. (para) -#: ../source/book.xml:18059 -#, fuzzy -msgid "Commit a modification to the file foo.c (explicitly specified on the command line) with the commit message in a file named msg:" -msgstr "提交一个修改到foo.c(在命令行明确指明),并且msg文件中保存了提交信息:" - -#. (screen) -#: ../source/book.xml:18063 -#, no-wrap -msgid "" -"\n" -"$ svn commit -F msg foo.c\n" -"Sending foo.c\n" -"Transmitting file data .\n" -"Committed revision 5.\n" -msgstr "" -"\n" -"$ svn commit -F msg foo.c\n" -"Sending foo.c\n" -"Transmitting file data .\n" -"Committed revision 5.\n" - -#. (para) -#: ../source/book.xml:18069 -#, fuzzy -msgid "If you want to use a file that's under version control for your commit message with , you need to pass the option:" -msgstr "如果你希望使用在选项中使用在版本控制之下的文件作为参数,你需要使用选项:" - -#. (screen) -#: ../source/book.xml:18073 -#, no-wrap -msgid "" -"\n" -"$ svn commit --file file_under_vc.txt foo.c\n" -"svn: The log message file is under version control\n" -"svn: Log message file is a versioned file; use '--force-log' to override\n" -"\n" -"$ svn commit --force-log --file file_under_vc.txt foo.c\n" -"Sending foo.c\n" -"Transmitting file data .\n" -"Committed revision 6.\n" -msgstr "" -"\n" -"$ svn commit --file file_under_vc.txt foo.c\n" -"svn: The log message file is under version control\n" -"svn: Log message file is a versioned file; use '--force-log' to override\n" -"\n" -"$ svn commit --force-log --file file_under_vc.txt foo.c\n" -"Sending foo.c\n" -"Transmitting file data .\n" -"Committed revision 6.\n" - -#. (para) -#: ../source/book.xml:18083 -msgid "To commit a file scheduled for deletion:" -msgstr "提交一个已经预定要删除的文件:" - -#. (screen) -#: ../source/book.xml:18084 -#, no-wrap -msgid "" -"\n" -"$ svn commit -m \"removed file 'c'.\"\n" -"Deleting c\n" -"\n" -"Committed revision 7.\n" -msgstr "" -"\n" -"$ svn commit -m \"removed file 'c'.\"\n" -"Deleting c\n" -"\n" -"Committed revision 7.\n" - -#. (tertiary) -#: ../source/book.xml:18096 -msgid "copy" -msgstr "copy" - -#. (refpurpose) -#: ../source/book.xml:18100 -msgid "Copy a file or directory in a working copy or in the repository." -msgstr "拷贝工作拷贝的一个文件或目录到版本库。" - -#. (programlisting) -#: ../source/book.xml:18107 -#, fuzzy, no-wrap -msgid "svn copy SRC[@REV]... DST" -msgstr "svn copy SRC DST" - -#. (para) -#: ../source/book.xml:18113 -#, fuzzy -msgid "Copy one or more files in a working copy or in the repository. SRC and DST can each be either a working copy (WC) path or URL:" -msgstr "拷贝工作拷贝的一个文件或目录到版本库。SRCDST既可以是工作拷贝(WC)路径也可以是URL:" - -#. (term) -#: ../source/book.xml:18119 ../source/book.xml:19785 -msgid "WC -> WC" -msgstr "WC -> WC" - -#. (para) -#: ../source/book.xml:18121 -msgid "Copy and schedule an item for addition (with history)." -msgstr "拷贝并且预定一个添加的项目(包含历史)。" - -#. (term) -#: ../source/book.xml:18126 -msgid "WC -> URL" -msgstr "WC -> URL" - -#. (para) -#: ../source/book.xml:18128 -msgid "Immediately commit a copy of WC to URL." -msgstr "将WC或URL的拷贝立即提交。" - -#. (term) -#: ../source/book.xml:18132 -msgid "URL -> WC" -msgstr "URL -> WC" - -#. (para) -#: ../source/book.xml:18134 -msgid "Check out URL into WC, and schedule it for addition." -msgstr "检出URL到WC,并且加入到添加计划。" - -#. (term) -#: ../source/book.xml:18139 ../source/book.xml:19792 -msgid "URL -> URL" -msgstr "URL -> URL" - -#. (para) -#: ../source/book.xml:18141 -msgid "Complete server-side copy. This is usually used to branch and tag." -msgstr "完全的服务器端拷贝,通常用在分支和标签。" - -#. (para) -#: ../source/book.xml:18146 -msgid "When copying multiple sources, they will be added as children of DST, which must be a directory." -msgstr "" - -#. (para) -#: ../source/book.xml:18149 -msgid "If no peg revision (ie @REV) is supplied, by default the BASE revision will be used for files copied from the working copy, while the HEAD revision will be used for files copied from a URL." -msgstr "" - -#. (para) -#: ../source/book.xml:18156 -msgid "You can only copy files within a single repository. Subversion does not support cross-repository copying." -msgstr "你只可以在单个版本库中拷贝文件,Subversion还不支持跨版本库的拷贝。" - -#. (para) -#: ../source/book.xml:18164 -msgid "cp" -msgstr "cp" - -#. (para) -#: ../source/book.xml:18170 -msgid "Repository if destination is a URL." -msgstr "如果目标是URL则包括版本库。" - -#. (para) -#: ../source/book.xml:18171 -msgid "Working copy if destination is a WC path." -msgstr "如果目标是WC路径,则是工作拷贝。" - -#. (para) -#: ../source/book.xml:18177 -msgid "If source or destination is in the repository, or if needed to look up the source revision number." -msgstr "如果目标是版本库,或者需要查看修订版本号,则会访问版本库。" - -#. (screen) -#: ../source/book.xml:18184 -#, no-wrap -msgid "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--force-log\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--force-log\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:18203 -msgid "Copy an item within your working copy (just schedules the copy—nothing goes into the repository until you commit):" -msgstr "拷贝工作拷贝的一个项目(只是预定要拷贝—在提交之前不会影响版本库):" - -#. (screen) -#: ../source/book.xml:18206 -#, no-wrap -msgid "" -"\n" -"$ svn copy foo.txt bar.txt\n" -"A bar.txt\n" -"$ svn status\n" -"A + bar.txt\n" -msgstr "" -"\n" -"$ svn copy foo.txt bar.txt\n" -"A bar.txt\n" -"$ svn status\n" -"A + bar.txt\n" - -#. (para) -#: ../source/book.xml:18212 -#, fuzzy -msgid "Copy several files in a working copy into a subdirectory:" -msgstr "拷贝工作拷贝的一个文件或目录到版本库。" - -#. (screen) -#: ../source/book.xml:18214 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn cp bat.c baz.c qux.c src\n" -"A src/bat.c\n" -"A src/baz.c\n" -"A src/qux.c\n" -msgstr "" -"\n" -"$ svn add * --force\n" -"A foo.c\n" -"A somedir/bar.c\n" -"A otherdir/docs/baz.doc\n" -"…\n" - -#. (para) -#: ../source/book.xml:18220 -msgid "Copy revision 8 of bat.c into your working copy under a different name:" -msgstr "" - -#. (screen) -#: ../source/book.xml:18222 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn cp bat.c ya-old-bat.c\n" -"A ya-old-bat.c\n" -msgstr "" -"\n" -"$ svn add foo.c \n" -"A foo.c\n" - -#. (para) -#: ../source/book.xml:18226 -msgid "Copy an item in your working copy to a URL in the repository (an immediate commit, so you must supply a commit message):" -msgstr "拷贝你的工作拷贝的一个项目到版本库的URL(直接的提交,所以需要提供一个提交信息):" - -#. (screen) -#: ../source/book.xml:18229 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn copy near.txt file:///var/svn/repos/test/far-away.txt -m \"Remote copy.\"\n" -"\n" -"Committed revision 8.\n" -msgstr "" -"\n" -"$ svn copy near.txt file:///tmp/repos/test/far-away.txt -m \"Remote copy.\"\n" -"\n" -"Committed revision 8.\n" - -#. (para) -#: ../source/book.xml:18234 -msgid "Copy an item from the repository to your working copy (just schedules the copy—nothing goes into the repository until you commit):" -msgstr "拷贝版本库的一个项目到你的工作拷贝(只是预定要拷贝—在提交之前不会影响版本库):" - -#. (para) -#: ../source/book.xml:18238 -msgid "This is the recommended way to resurrect a dead file in your repository!" -msgstr "这是恢复死掉文件的推荐方式!" - -#. (screen) -#: ../source/book.xml:18241 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn copy file:///var/svn/repos/test/far-away near-here\n" -"A near-here\n" -msgstr "" -"\n" -"$ svn copy file:///tmp/repos/test/far-away near-here\n" -"A near-here\n" - -#. (para) -#: ../source/book.xml:18245 -msgid "And finally, copying between two URLs:" -msgstr "最后,是在URL之间拷贝:" - -#. (screen) -#: ../source/book.xml:18246 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn copy file:///var/svn/repos/test/far-away file:///var/svn/repos/test/over-there -m \"remote copy.\"\n" -"\n" -"Committed revision 9.\n" -msgstr "" -"\n" -"$ svn copy file:///tmp/repos/test/far-away file:///tmp/repos/test/over-there -m \"remote copy.\"\n" -"\n" -"Committed revision 9.\n" - -#. (para) -#: ../source/book.xml:18252 -#, fuzzy -msgid "This is the easiest way to tag a revision in your repository—just svn copy that revision (usually HEAD) into your tags directory." -msgstr "这是在版本库里作标签最简单的方法—svn copy那个修订版本(通常是HEAD)到你的tags目录。" - -#. (screen) -#: ../source/book.xml:18257 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn copy file:///var/svn/repos/test/trunk file:///var/svn/repos/test/tags/0.6.32-prerelease -m \"tag tree\"\n" -"\n" -"Committed revision 12.\n" -msgstr "" -"\n" -"$ svn copy file:///tmp/repos/test/trunk file:///tmp/repos/test/tags/0.6.32-prerelease -m \"tag tree\"\n" -"\n" -"Committed revision 12.\n" - -#. (para) -#: ../source/book.xml:18262 -msgid "And don't worry if you forgot to tag—you can always specify an older revision and tag anytime:" -msgstr "不要担心忘记作标签—你可以在以后任何时候给一个旧版本作标签:" - -#. (screen) -#: ../source/book.xml:18264 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ 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" -"\n" -"Committed revision 13.\n" -msgstr "" -"\n" -"$ 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" -"\n" -"Committed revision 13.\n" - -#. (tertiary) -#: ../source/book.xml:18275 -msgid "delete" -msgstr "delete" - -#. (refpurpose) -#: ../source/book.xml:18279 -msgid "Delete an item from a working copy or the repository." -msgstr "从工作拷贝或版本库删除一个项目。" - -#. (programlisting) -#: ../source/book.xml:18286 -#, no-wrap -msgid "svn delete PATH..." -msgstr "svn delete PATH..." - -#. (programlisting) -#: ../source/book.xml:18287 -#, no-wrap -msgid "svn delete URL..." -msgstr "svn delete URL..." - -#. (para) -#: ../source/book.xml:18293 -#, fuzzy -msgid "Items specified by PATH 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 to override this behavior." -msgstr "PATH指定的项目会在下次提交删除,文件(和没有提交的目录)会立即从版本库删除,这个命令不会删除任何未版本化或已经修改的项目;使用选项可以覆盖这种行为方式。" - -#. (para) -#: ../source/book.xml:18300 -msgid "Items specified by URL are deleted from the repository via an immediate commit. Multiple URLs are committed atomically." -msgstr "URL指定的项目会在直接提交中从版本库删除,多个URL的提交是原子操作。" - -#. (para) -#: ../source/book.xml:18308 -msgid "del, remove, rm" -msgstr "del, remove, rm" - -#. (para) -#: ../source/book.xml:18314 -#, fuzzy -msgid "Working copy if operating on files, repository if operating on URLs" -msgstr "如果操作对象是文件则是工作拷贝变化,对象是URL则会影响版本库。" - -#. (para) -#: ../source/book.xml:18321 ../source/book.xml:19022 -msgid "Only if operating on URLs" -msgstr "对URL操作时访问" - -#. (screen) -#: ../source/book.xml:18327 -#, no-wrap -msgid "" -"\n" -"--force\n" -"--force-log\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--targets FILENAME\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--force\n" -"--force-log\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--targets FILENAME\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:18347 -#, fuzzy -msgid "Using svn 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." -msgstr "使用svn从工作拷贝删除文件只是预定要删除,当你提交,文件才会从版本库删除。" - -#. (screen) -#: ../source/book.xml:18352 -#, no-wrap -msgid "" -"\n" -"$ svn delete myfile\n" -"D myfile\n" -"\n" -"$ svn commit -m \"Deleted file 'myfile'.\"\n" -"Deleting myfile\n" -"Transmitting file data .\n" -"Committed revision 14.\n" -msgstr "" -"\n" -"$ svn delete myfile\n" -"D myfile\n" -"\n" -"$ svn commit -m \"Deleted file 'myfile'.\"\n" -"Deleting myfile\n" -"Transmitting file data .\n" -"Committed revision 14.\n" - -#. (para) -#: ../source/book.xml:18361 -msgid "Deleting a URL, however, is immediate, so you have to supply a log message:" -msgstr "然而直接删除一个URL,你需要提供一个日志信息:" - -#. (screen) -#: ../source/book.xml:18363 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn delete -m \"Deleting file 'yourfile'\" file:///var/svn/repos/test/yourfile\n" -"\n" -"Committed revision 15.\n" -msgstr "" -"\n" -"$ svn delete -m \"Deleting file 'yourfile'\" file:///tmp/repos/test/yourfile\n" -"\n" -"Committed revision 15.\n" - -#. (para) -#: ../source/book.xml:18368 -msgid "Here's an example of how to force deletion of a file that has local mods:" -msgstr "如下是强制删除本地已修改文件的例子:" - -#. (screen) -#: ../source/book.xml:18370 -#, no-wrap -msgid "" -"\n" -"$ svn delete over-there \n" -"svn: Attempting restricted operation for modified resource\n" -"svn: Use --force to override this restriction\n" -"svn: 'over-there' has local modifications\n" -"\n" -"$ svn delete --force over-there \n" -"D over-there\n" -msgstr "" -"\n" -"$ svn delete over-there \n" -"svn: Attempting restricted operation for modified resource\n" -"svn: Use --force to override this restriction\n" -"svn: 'over-there' has local modifications\n" -"\n" -"$ svn delete --force over-there \n" -"D over-there\n" - -#. (tertiary) -#: ../source/book.xml:18385 ../source/book.xml:22526 -msgid "diff" -msgstr "diff" - -#. (refpurpose) -#: ../source/book.xml:18389 -#, fuzzy -msgid "Display the differences between two revisions or paths." -msgstr "比较两条路径的区别。" - -#. (programlisting) -#: ../source/book.xml:18395 -#, fuzzy, no-wrap -msgid "diff [-c M | -r N[:M]] [TARGET[@REV]...]" -msgstr "diff [-r N[:M]] [TARGET[@REV]...]" - -#. (programlisting) -#: ../source/book.xml:18396 -#, fuzzy, no-wrap -msgid "diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]" -msgstr "diff [-r N[:M]] --old OLD-TGT[@OLDREV] [--new NEW-TGT[@NEWREV]] [PATH...]" - -#. (programlisting) -#: ../source/book.xml:18397 -#, no-wrap -msgid "diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]" -msgstr "diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]" - -#. (para) -#: ../source/book.xml:18403 -#, fuzzy -msgid "Display the differences between two paths. The ways you can use svn diff are:" -msgstr "显示两条路径的区别,svn diff有三种使用方式:" - -#. (para) -#: ../source/book.xml:18405 -#, fuzzy -msgid "Use just svn diff'to display local modifications in a working copy." -msgstr "运行svn diff以标准差别格式查看修改的内容。" - -#. (para) -#: ../source/book.xml:18407 -msgid "Display the changes made to TARGETs as they are seen in REV between two revisions. TARGETs may be all working copy paths or all URLs. If TARGETs are working copy paths, N defaults to BASE and M to the working copy; if URLs, N must be specified and M defaults to HEAD. The -c M option is equivalent to -r N:M where N = M-1. Using -c -M does the reverse: -r M:N where N = M-1." -msgstr "显示TARGETREV的样子时两个修订版本之间所作的修改,TARGET可以是任何工作拷贝路径或任何URL,如果TARGET是工作拷贝路径,则N缺省是BASE,而M是工作拷贝;如果是URL,则必须指定N,而M缺省是HEAD-c M选项与-r N:M等价,其中N = M-1。使用-c -M则相反:-r M:N的意思是N = M-1。" - -#. (para) -#: ../source/book.xml:18423 -msgid "Display the differences between OLD-TGT as it was seen in OLDREV and NEW-TGT as it was seen ain NEWREV. PATHs, if given, are relative to OLD-TGT and NEW-TGT and restrict the output to differences for those paths. OLD-TGT and NEW-TGT may be working copy paths or URL[@REV]. NEW-TGT defaults to OLD-TGT if not specified. -r N makes OLDREV default to N, -r N:M makes OLDREV default to N and NEWREV default to M." -msgstr "显示在OLDREVOLD-TGTNEWREVNEW-TGT之间的区别。如果提供PATH,则与OLD-TGTNEW-TGT关联,将输出限制在那些路径。OLD-TGTNEW-TGT可能是工作拷贝路经或URL[@REV]。如果没有指定,NEW-TGT缺省是OLD-TGT-r N设置OLDREV缺省为N,而-r N:M设置OLDREV缺省为N,而NEWREV缺省为M。" - -#. (para) -#: ../source/book.xml:18442 -#, fuzzy -msgid "Shorthand for svn diff --old=OLD-URL[@OLDREV] --new=NEW-URL[@NEWREV]" -msgstr "svn diff -r N:M URL is shorthand for svn diff -r N:M --old=URL --new=URL." - -#. (para) -#: ../source/book.xml:18444 -#, fuzzy -msgid "svn diff -r N:M URL is shorthand for svn diff -r N:M --old=URL --new=URL." -msgstr "svn diff -r N:M URL is shorthand for svn diff -r N:M --old=URL --new=URL." - -#. (para) -#: ../source/book.xml:18447 -#, fuzzy -msgid "svn diff [-r N[:M]] URL1[@N] URL2[@M] is shorthand for svn diff [-r N[:M]] --old=URL1 --new=URL2." -msgstr "svn diff [-r N[:M]] URL1[@N] URL2[@M]svn diff [-r N[:M]] --old=URL1 --new=URL2的缩写。" - -#. (para) -#: ../source/book.xml:18450 -msgid "If TARGET is a URL, then revs N and M can be given either via the or by using @ notation as described earlier." -msgstr "TARGET是一个URL,然后可以使用前面提到的@符号来指定N和M。" - -#. (para) -#: ../source/book.xml:18454 -#, fuzzy -msgid "If TARGET is a working copy path, then the option means:" -msgstr "如果TARGET是工作拷贝路径,则选项的含义是:" - -#. (option) -#: ../source/book.xml:18460 -msgid "--revision N:M" -msgstr "--revision N:M" - -#. (para) -#: ../source/book.xml:18463 -msgid "The server compares TARGET@N and TARGET@M." -msgstr "服务器比较 TARGET@NTARGET@M。" - -#. (option) -#: ../source/book.xml:18471 -msgid "--revision N" -msgstr "--revision N" - -#. (para) -#: ../source/book.xml:18474 -msgid "The client compares TARGET@N against working copy." -msgstr "客户端比较TARGET@N和工作拷贝。" - -#. (term) -#: ../source/book.xml:18480 -msgid "(no )" -msgstr "(无)" - -#. (para) -#: ../source/book.xml:18482 -msgid "The client compares base and working copies of TARGET." -msgstr "客户端比较base和 TARGETTARGET。" - -#. (para) -#: ../source/book.xml:18487 -#, fuzzy -msgid "If the alternate syntax is used, the server compares URL1 and URL2 at revisions N and M respectively. If either N or M are omitted, a value of HEAD is assumed." -msgstr "如果使用其他语法,服务器会比较URL1URL2各自的NM。如果省掉NM,会假定为HEAD。" - -#. (para) -#: ../source/book.xml:18495 -#, fuzzy -msgid "By default, svn diff ignores the ancestry of files and merely compares the contents of the two files being compared. If you use , the ancestry of the paths in question will be taken into consideration when comparing revisions (that is, if you run svn diff 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)." -msgstr "缺省情况下,svn diff忽略文件的祖先,只会比较两个文件的内容。如果你使用,比较修订版本(也就是,当你运行svn diff比较两个内容相同,但祖先历史不同的对象会看到所有的内容被删除又再次添加)时就会考虑路径的祖先。" - -#. (para) -#: ../source/book.xml:18509 -msgid "di" -msgstr "di" - -#. (para) -#: ../source/book.xml:18521 -#, fuzzy -msgid "For obtaining differences against anything but BASE revision in your working copy" -msgstr "获得工作拷贝非BASE修订版本的区别时会" - -#. (screen) -#: ../source/book.xml:18528 -#, fuzzy, no-wrap -msgid "" -"\n" -"--revision (-r) ARG\n" -"--change (-c) ARG\n" -"--old ARG\n" -"--new ARG\n" -"--non-recursive (-N)\n" -"--diff-cmd CMD\n" -"--extensions (-x) \"ARGS\"\n" -"--no-diff-deleted\n" -"--notice-ancestry\n" -"--summarize\n" -"--force\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--old OLD-TARGET\n" -"--new NEW-TARGET\n" -"--extensions (-x) \"ARGS\"\n" -"--non-recursive (-N)\n" -"--diff-cmd CMD\n" -"--notice-ancestry\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--no-diff-deleted\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:18552 -#, fuzzy -msgid "Compare BASE and your working copy (one of the most popular uses of svn diff):" -msgstr "比较BASE和你的工作拷贝(svn diff最经常的用法):" - -#. (screen) -#: ../source/book.xml:18555 -#, no-wrap -msgid "" -"\n" -"$ svn diff COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 4404)\n" -"+++ COMMITTERS\t(working copy)\n" -msgstr "" -"\n" -"$ svn diff COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 4404)\n" -"+++ COMMITTERS\t(working copy)\n" - -#. (para) -#: ../source/book.xml:18562 -#, fuzzy -msgid "See what changed in the file COMMITTERS revision 9115:" -msgstr "环境变量EDITOR" - -#. (screen) -#: ../source/book.xml:18564 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn diff -c 9115 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3900)\n" -"+++ COMMITTERS\t(working copy)\n" -msgstr "" -"\n" -"$ svn diff -r 3900 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3900)\n" -"+++ COMMITTERS\t(working copy)\n" - -#. (para) -#: ../source/book.xml:18571 -msgid "See how your working copy's modifications compare against an older revision:" -msgstr "察看你的工作拷贝对旧的修订版本的修改:" - -#. (screen) -#: ../source/book.xml:18573 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3900 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3900)\n" -"+++ COMMITTERS\t(working copy)\n" -msgstr "" -"\n" -"$ svn diff -r 3900 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3900)\n" -"+++ COMMITTERS\t(working copy)\n" - -#. (para) -#: ../source/book.xml:18580 -msgid "Compare revision 3000 to revision 3500 using @ syntax:" -msgstr "使用@语法与修订版本3000和35000比较:" - -#. (screen) -#: ../source/book.xml:18582 -#, no-wrap -msgid "" -"\n" -"$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500\n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" -"…\n" -msgstr "" -"\n" -"$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500\n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" -"…\n" - -#. (para) -#: ../source/book.xml:18590 -msgid "Compare revision 3000 to revision 3500 using range notation (you only pass the one URL in this case):" -msgstr "使用范围符号来比较修订版本3000和3500(在这种情况下只能传递一个URL):" - -#. (screen) -#: ../source/book.xml:18593 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS\n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" -msgstr "" -"\n" -"$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS\n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" - -#. (para) -#: ../source/book.xml:18600 -#, fuzzy -msgid "Compare revision 3000 to revision 3500 of all files in trunk using range notation:" -msgstr "使用范围符号比较修订版本3000和3500trunk中的所有文件:" - -#. (screen) -#: ../source/book.xml:18602 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk\n" -" " -msgstr "" -"\n" -"$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk\n" -" " - -#. (para) -#: ../source/book.xml:18605 -#, fuzzy -msgid "Compare revision 3000 to revision 3500 of only three files in trunk using range notation:" -msgstr "使用范围符号比较修订版本3000和3500trunk中的三个文件:" - -#. (screen) -#: ../source/book.xml:18608 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING\n" -" " -msgstr "" -"\n" -"$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING\n" -" " - -#. (para) -#: ../source/book.xml:18611 -msgid "If you have a working copy, you can obtain the differences without typing in the long URLs:" -msgstr "如果你有工作拷贝,你不必输入这么长的URL:" - -#. (screen) -#: ../source/book.xml:18613 -#, no-wrap -msgid "" -"\n" -"$ svn diff -r 3000:3500 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" -msgstr "" -"\n" -"$ svn diff -r 3000:3500 COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"--- COMMITTERS\t(revision 3000)\n" -"+++ COMMITTERS\t(revision 3500)\n" - -#. (para) -#: ../source/book.xml:18620 -msgid "Use CMD to pass arguments directly to the external diff program" -msgstr "使用CMD来指定外部区别程序" - -#. (screen) -#: ../source/book.xml:18624 -#, no-wrap -msgid "" -"\n" -"$ svn diff --diff-cmd /usr/bin/diff -x \"-i -b\" COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"0a1,2\n" -"> This is a test\n" -"> \n" -msgstr "" -"\n" -"$ svn diff --diff-cmd /usr/bin/diff -x \"-i -b\" COMMITTERS \n" -"Index: COMMITTERS\n" -"===================================================================\n" -"0a1,2\n" -"> This is a test\n" -"> \n" - -#. (tertiary) -#: ../source/book.xml:18638 -msgid "export" -msgstr "export" - -#. (refname) -#: ../source/book.xml:18641 -msgid "svn export" -msgstr "svn export" - -#. (refpurpose) -#: ../source/book.xml:18642 -msgid "Export a clean directory tree." -msgstr "导出一个干净的目录树。" - -#. (programlisting) -#: ../source/book.xml:18648 -#, no-wrap -msgid "svn export [-r REV] URL[@PEGREV] [PATH]" -msgstr "svn export [-r REV] URL[@PEGREV] [PATH]" - -#. (programlisting) -#: ../source/book.xml:18649 -#, no-wrap -msgid "svn export [-r REV] PATH1[@PEGREV] [PATH2]" -msgstr "svn export [-r REV] PATH1[@PEGREV] [PATH2]" - -#. (para) -#: ../source/book.xml:18655 -#, fuzzy -msgid "The first form exports a clean directory tree from the repository specified by URL, at revision REV if it is given, otherwise at HEAD, into PATH. If PATH is omitted, the last component of the URL is used for the local directory name." -msgstr "第一种从版本库导出干净工作目录树的形式是指定URL,如果指定了修订版本REV,会导出相应的版本,如果没有指定修订版本,则会导出HEAD,导出到PATH。如果省略PATHURL的最后一部分会作为本地目录的名字。" - -#. (para) -#: ../source/book.xml:18663 -msgid "The second form exports a clean directory tree from the working copy specified by PATH1 into PATH2. All local changes will be preserved, but files not under version control will not be copied." -msgstr "从工作拷贝导出干净目录树的第二种形式是指定PATH1PATH2,所有的本地修改将会保留,但是不再版本控制下的文件不会拷贝。" - -#. (para) -#: ../source/book.xml:18680 -msgid "Local disk" -msgstr "本地磁盘" - -#. (para) -#: ../source/book.xml:18686 -msgid "Only if exporting from a URL" -msgstr "只有当从URL导出时会访问" - -#. (screen) -#: ../source/book.xml:18692 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--force\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--non-recursive (-N)\n" -"--config-dir DIR\n" -"--native-eol EOL\n" -"--ignore-externals\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--force\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--non-recursive (-N)\n" -"--config-dir DIR\n" -"--native-eol EOL\n" -"--ignore-externals\n" - -#. (para) -#: ../source/book.xml:18710 -msgid "Export from your working copy (doesn't print every file and directory):" -msgstr "从你的工作拷贝导出(不会打印每一个文件和目录):" - -#. (screen) -#: ../source/book.xml:18712 -#, no-wrap -msgid "" -"\n" -"$ svn export a-wc my-export\n" -"Export complete.\n" -msgstr "" -"\n" -"$ svn export a-wc my-export\n" -"Export complete.\n" - -#. (para) -#: ../source/book.xml:18716 -msgid "Export directly from the repository (prints every file and directory):" -msgstr "从版本库导出目录(打印所有的文件和目录):" - -#. (screen) -#: ../source/book.xml:18718 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn export file:///var/svn/repos my-export\n" -"A my-export/test\n" -"A my-export/quiz\n" -"…\n" -"Exported revision 15.\n" -msgstr "" -"\n" -"$ svn export file:///tmp/repos my-export\n" -"A my-export/test\n" -"A my-export/quiz\n" -"…\n" -"Exported revision 15.\n" - -#. (para) -#: ../source/book.xml:18725 -#, fuzzy -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 will do this, but it only affects files that have svn:eol-style = native properties attached to them. For example, to export a tree with all CRLF line endings (possibly for a Windows .zip file distribution):" -msgstr "当使用操作系统特定的分发版本,使用特定的EOL字符作为行结束符号导出一棵树会非常有用。选项会这样做,但是如果影响的文件拥有svn:eol-style = native属性,举个例子,导出一棵使用CRLF作为行结束的树(可能是为了做一个Windows的.zip文件分发版本):" - -#. (screen) -#: ../source/book.xml:18733 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn export file:///var/svn/repos my-export --native-eol CRLF\n" -"A my-export/test\n" -"A my-export/quiz\n" -"…\n" -"Exported revision 15.\n" -msgstr "" -"\n" -"$ svn export file:///tmp/repos my-export --native-eol CRLF\n" -"A my-export/test\n" -"A my-export/quiz\n" -"…\n" -"Exported revision 15.\n" - -#. (para) -#: ../source/book.xml:18740 -#, fuzzy -msgid "You can specify LR, CR, or CRLF as a line ending type with the option." -msgstr "变更描述:A (添加的),D (删除的)或M (修改的)" - -#. (tertiary) -#: ../source/book.xml:18750 ../source/book.xml:21616 ../source/book.xml:22640 -msgid "help" -msgstr "help" - -#. (refname) -#: ../source/book.xml:18753 -msgid "svn help" -msgstr "svn help" - -#. (programlisting) -#: ../source/book.xml:18760 -#, no-wrap -msgid "svn help [SUBCOMMAND...]" -msgstr "svn help [SUBCOMMAND...]" - -#. (para) -#: ../source/book.xml:18766 -msgid "This is your best friend when you're using Subversion and this book isn't within reach!" -msgstr "当手边没有这本书时,这是你使用Subversion最好的朋友!" - -#. (para) -#: ../source/book.xml:18773 ../source/book.xml:21642 ../source/book.xml:22665 -msgid "?, h" -msgstr "?, h" - -#. (para) -#: ../source/book.xml:18774 -#, fuzzy -msgid "The options , and have the same effect as using the help subcommand." -msgstr "不访问" - -#. (screen) -#: ../source/book.xml:18794 -#, fuzzy, no-wrap -msgid "" -"\n" -"--config-dir DIR\n" -msgstr "--config-dir" - -#. (tertiary) -#: ../source/book.xml:18803 -msgid "import" -msgstr "import" - -#. (refpurpose) -#: ../source/book.xml:18807 -msgid "Commit an unversioned file or tree into the repository." -msgstr "递归提交一个路径的拷贝到版本库。" - -#. (programlisting) -#: ../source/book.xml:18814 -#, no-wrap -msgid "svn import [PATH] URL" -msgstr "svn import [PATH] URL" - -#. (para) -#: ../source/book.xml:18820 -#, fuzzy -msgid "Recursively commit a copy of PATH to URL. If PATH is omitted . is assumed. Parent directories are created in the repository as necessary." -msgstr "递归提交一个路径的拷贝到URL。如果省略PATH,默认是.。版本库中对应的父目录必须已经创建。" - -#. (para) -#: ../source/book.xml:18838 -msgid "Repository" -msgstr "版本库" - -#. (screen) -#: ../source/book.xml:18850 -#, no-wrap -msgid "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--non-recursive (-N)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--force-log\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" -"--auto-props\n" -"--no-auto-props\n" -"--ignore-externals\n" -msgstr "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--non-recursive (-N)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--force-log\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--config-dir DIR\n" -"--auto-props\n" -"--no-auto-props\n" -"--ignore-externals\n" - -#. (para) -#: ../source/book.xml:18872 -#, fuzzy -msgid "This imports the local directory myproj into trunk/misc in your repository. The directory trunk/misc need not exist before you import into it—svn import will recursively create directories for you." -msgstr "这将本地目录myproj导入到版本库的trunk/misctrunk/misc在导入之前不需要存在—svn import会递归的为你创建目录:" - -#. (screen) -#: ../source/book.xml:18879 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc\n" -"Adding myproj/sample.txt\n" -"…\n" -"Transmitting file data .........\n" -"Committed revision 16.\n" -msgstr "" -"\n" -"$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/test\n" -"Adding myproj/sample.txt\n" -"…\n" -"Transmitting file data .........\n" -"Committed revision 16.\n" - -#. (para) -#: ../source/book.xml:18886 -#, fuzzy -msgid "Be aware that this will not create a directory named myproj in the repository. If that's what you want, simply add myproj to the end of the URL:" -msgstr "在上一个例子里,将会拷贝目录mytree到版本库的some/project下:" - -#. (screen) -#: ../source/book.xml:18890 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn import -m \"New import\" myproj http://svn.red-bean.com/repos/trunk/misc/myproj\n" -"Adding myproj/sample.txt\n" -"…\n" -"Transmitting file data .........\n" -"Committed revision 16.\n" -msgstr "" -"\n" -"$ svn import -m \"New import\" myproj \\\n" -" http://svn.red-bean.com/repos/test/trunk/misc/myproj\n" -"Adding myproj/sample.txt\n" -"…\n" -"Transmitting file data .........\n" -"Committed revision 19.\n" - -#. (para) -#: ../source/book.xml:18897 -#, fuzzy -msgid "After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree." -msgstr "在导入数据之后,你会发现原先的目录树并没有纳入版本控制,为了开始工作,你还是要运行svn checkout得到一个干净的目录树工作拷贝。" - -#. (tertiary) -#: ../source/book.xml:18907 ../source/book.xml:22735 -msgid "info" -msgstr "info" - -#. (refname) -#: ../source/book.xml:18910 -msgid "svn info" -msgstr "svn info" - -#. (refpurpose) -#: ../source/book.xml:18911 -msgid "Display information about a local or remote item." -msgstr "显示本地或远程条目的信息。" - -#. (programlisting) -#: ../source/book.xml:18918 -#, fuzzy, no-wrap -msgid "svn info [TARGET[@REV]...]" -msgstr "svn list [TARGET[@REV]...]" - -#. (para) -#: ../source/book.xml:18924 -msgid "Print information about the working copy paths or URLs specified. The information shown for both may include:" -msgstr "打印你的工作拷贝路径和URL的信息,包括:" - -#. (para) -#: ../source/book.xml:18929 -msgid "Path" -msgstr "路经" - -#. (para) -#: ../source/book.xml:18932 -msgid "Name" -msgstr "名称" - -#. (para) -#: ../source/book.xml:18935 -msgid "URL" -msgstr "URL" - -#. (para) -#: ../source/book.xml:18938 -msgid "Repository Root" -msgstr "版本库的根" - -#. (para) -#: ../source/book.xml:18941 -msgid "Repository UUID" -msgstr "版本库的UUID" - -#. (para) -#: ../source/book.xml:18947 -msgid "Node Kind" -msgstr "节点类型" - -#. (para) -#: ../source/book.xml:18950 -msgid "Last Changed Author" -msgstr "最后修改的作者" - -#. (para) -#: ../source/book.xml:18953 -msgid "Last Changed Revision" -msgstr "最后修改的修订版本" - -#. (para) -#: ../source/book.xml:18956 -msgid "Last Changed Date" -msgstr "最后修改的日期" - -#. (para) -#: ../source/book.xml:18959 -msgid "Lock Token" -msgstr "锁定令牌" - -#. (para) -#: ../source/book.xml:18962 -msgid "Lock Owner" -msgstr "锁定拥有者" - -#. (para) -#: ../source/book.xml:18965 -msgid "Lock Created (date)" -msgstr "锁定创建时间" - -#. (para) -#: ../source/book.xml:18968 -msgid "Lock Expires (date)" -msgstr "Lock Expires (date)" - -#. (para) -#: ../source/book.xml:18971 -msgid "Additional kinds of information available only for working copy paths are:" -msgstr "Additional kinds of information available only for working copy paths are:" - -#. (para) -#: ../source/book.xml:18975 -msgid "Schedule" -msgstr "Schedule" - -#. (para) -#: ../source/book.xml:18978 -msgid "Copied From URL" -msgstr "Copied From URL" - -#. (para) -#: ../source/book.xml:18981 -msgid "Copied From Rev" -msgstr "Copied From Rev" - -#. (para) -#: ../source/book.xml:18984 -msgid "Text Last Updated" -msgstr "Text Last Updated" - -#. (para) -#: ../source/book.xml:18987 -msgid "Properties Last Updated" -msgstr "Properties Last Updated" - -#. (para) -#: ../source/book.xml:18990 -msgid "Checksum" -msgstr "Checksum" - -#. (para) -#: ../source/book.xml:18993 -msgid "Conflict Previous Base File" -msgstr "Conflict Previous Base File" - -#. (para) -#: ../source/book.xml:18996 -msgid "Conflict Previous Working File" -msgstr "Conflict Previous Working File" - -#. (para) -#: ../source/book.xml:18999 -msgid "Conflict Current Base File" -msgstr "Conflict Current Base File" - -#. (para) -#: ../source/book.xml:19002 -msgid "Conflict Properties File" -msgstr "Conflict Properties File" - -#. (screen) -#: ../source/book.xml:19028 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--recursive (-R)\n" -"--targets FILENAME\n" -"--incremental\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--recursive (-R)\n" -"--targets FILENAME\n" -"--incremental\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19045 -#, fuzzy -msgid "svn info will show you all the useful information that it has for items in your working copy. It will show information for files:" -msgstr "svn info会展示所有项目的所有有用信息,它会显示文件的信息:" - -#. (screen) -#: ../source/book.xml:19048 -#, no-wrap -msgid "" -"\n" -"$ svn info foo.c\n" -"Path: foo.c\n" -"Name: foo.c\n" -"URL: http://svn.red-bean.com/repos/test/foo.c\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 4417\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 20\n" -"Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)\n" -"Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)\n" -"Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)\n" -"Checksum: d6aeb60b0662ccceb6bce4bac344cb66\n" -msgstr "" -"\n" -"$ svn info foo.c\n" -"Path: foo.c\n" -"Name: foo.c\n" -"URL: http://svn.red-bean.com/repos/test/foo.c\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 4417\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 20\n" -"Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)\n" -"Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)\n" -"Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)\n" -"Checksum: /3L38YwzhT93BWvgpdF6Zw==\n" - -#. (para) -#: ../source/book.xml:19065 -msgid "It will also show information for directories:" -msgstr "它也会展示目录的信息:" - -#. (screen) -#: ../source/book.xml:19066 -#, no-wrap -msgid "" -"\n" -"$ svn info vendors\n" -"Path: vendors\n" -"URL: http://svn.red-bean.com/repos/test/vendors\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 19\n" -"Node Kind: directory\n" -"Schedule: normal\n" -"Last Changed Author: harry\n" -"Last Changed Rev: 19\n" -"Last Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003)\n" -"Properties Last Updated: 2003-01-16 23:39:02 -0600 (Thu, 16 Jan 2003)\n" -msgstr "" -"\n" -"$ svn info vendors\n" -"Path: vendors\n" -"URL: http://svn.red-bean.com/repos/test/vendors\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 19\n" -"Node Kind: directory\n" -"Schedule: normal\n" -"Last Changed Author: harry\n" -"Last Changed Rev: 19\n" -"Last Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003)\n" - -#. (para) -#: ../source/book.xml:19080 -#, fuzzy -msgid "svn info also acts on URLs (also note that the file readme.doc in this example is locked, so lock information is also provided):" -msgstr "svn info也可以针对URL操作(另外,可以注意一下例子中的readme.doc文件已经被锁定,所以也会显示锁定信息):" - -#. (screen) -#: ../source/book.xml:19083 -#, no-wrap -msgid "" -"\n" -"$ svn info http://svn.red-bean.com/repos/test/readme.doc\n" -"Path: readme.doc\n" -"Name: readme.doc\n" -"URL: http://svn.red-bean.com/repos/test/readme.doc\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 1\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 42\n" -"Last Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n" -"Lock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2\n" -"Lock Owner: harry\n" -"Lock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003)\n" -"Lock Comment (1 line):\n" -"My test lock comment\n" -msgstr "" -"\n" -"$ svn info http://svn.red-bean.com/repos/test/readme.doc\n" -"Path: readme.doc\n" -"Name: readme.doc\n" -"URL: http://svn.red-bean.com/repos/test/readme.doc\n" -"Repository Root: http://svn.red-bean.com/repos/test\n" -"Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25\n" -"Revision: 1\n" -"Node Kind: file\n" -"Schedule: normal\n" -"Last Changed Author: sally\n" -"Last Changed Rev: 42\n" -"Last Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n" -"Text Last Updated: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003)\n" -"Checksum: d41d8cd98f00b204e9800998ecf8427e\n" -"Lock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2\n" -"Lock Owner: harry\n" -"Lock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003)\n" - -#. (tertiary) -#: ../source/book.xml:19108 -msgid "list" -msgstr "list" - -#. (refpurpose) -#: ../source/book.xml:19112 -msgid "List directory entries in the repository." -msgstr "列出版本库目录的条目。" - -#. (programlisting) -#: ../source/book.xml:19118 -#, no-wrap -msgid "svn list [TARGET[@REV]...]" -msgstr "svn list [TARGET[@REV]...]" - -#. (para) -#: ../source/book.xml:19124 -msgid "List each TARGET file and the contents of each TARGET directory as they exist in the repository. If TARGET is a working copy path, the corresponding repository URL will be used." -msgstr "列出每一个TARGET文件和TARGET目录的内容,如果TARGET是工作拷贝路径,会使用对应的版本库URL。" - -#. (para) -#: ../source/book.xml:19129 -#, fuzzy -msgid "The default TARGET is ., meaning the repository URL of the current working copy directory." -msgstr "缺省的TARGET.,意味着当前工作拷贝的版本库URL。" - -#. (para) -#: ../source/book.xml:19133 -#, fuzzy -msgid "With , svn list shows the following fields for each item:" -msgstr "如果一个客户端连接到svnserve进程,如下事情会发生:" - -#. (para) -#: ../source/book.xml:19138 -msgid "Revision number of the last commit" -msgstr "最后一次提交的修订版本号" - -#. (para) -#: ../source/book.xml:19142 -msgid "Author of the last commit" -msgstr "最后一次提交的作者" - -#. (para) -#: ../source/book.xml:19145 -msgid "If locked, the letter O (See for details)." -msgstr "如果锁定,字符为O(更多细节见)" - -#. (para) -#: ../source/book.xml:19148 -msgid "Size (in bytes)" -msgstr "大小(单位字节)" - -#. (para) -#: ../source/book.xml:19151 -msgid "Date and time of the last commit" -msgstr "最后提交的日期时间" - -#. (para) -#: ../source/book.xml:19155 -msgid "With , output is in XML format (with a header and an enclosing document element unless is also specified). All of the information is present; the option is not accepted." -msgstr "使用选项,输出是XML格式(如果没有指定,会包括一个头和一个围绕的元素)。会展示所有的信息;不接受选项。" - -#. (para) -#: ../source/book.xml:19165 -msgid "ls" -msgstr "ls" - -#. (screen) -#: ../source/book.xml:19183 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--verbose (-v)\n" -"--recursive (-R)\n" -"--incremental\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--verbose (-v)\n" -"--recursive (-R)\n" -"--incremental\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19200 -#, fuzzy -msgid "svn list is most useful if you want to see what files a repository has without downloading a working copy:" -msgstr "如果你希望在没有下载工作拷贝时察看版本库有哪些文件,svn list会非常有用:" - -#. (screen) -#: ../source/book.xml:19203 -#, no-wrap -msgid "" -"\n" -"$ svn list http://svn.red-bean.com/repos/test/support\n" -"README.txt\n" -"INSTALL\n" -"examples/\n" -"…\n" -msgstr "" -"\n" -"$ svn list http://svn.red-bean.com/repos/test/support\n" -"README.txt\n" -"INSTALL\n" -"examples/\n" -"…\n" - -#. (para) -#: ../source/book.xml:19210 -#, fuzzy -msgid "You can pass the option for additional information, rather like the UNIX command ls -l:" -msgstr "你也可以传递选项来得到额外信息,非常类似UNIX的ls -l命令:" - -#. (screen) -#: ../source/book.xml:19213 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn list --verbose file:///var/svn/repos\n" -" 16 sally 28361 Jan 16 23:18 README.txt\n" -" 27 sally 0 Jan 18 15:27 INSTALL\n" -" 24 harry Jan 18 11:27 examples/\n" -msgstr "" -"\n" -"$ svn list --verbose file:///tmp/repos\n" -" 16 sally 28361 Jan 16 23:18 README.txt\n" -" 27 sally 0 Jan 18 15:27 INSTALL\n" -" 24 harry Jan 18 11:27 examples/\n" - -#. (para) -#: ../source/book.xml:19219 -msgid "For further details, see ." -msgstr "更多细节见。" - -#. (tertiary) -#: ../source/book.xml:19226 ../source/book.xml:22783 -msgid "lock" -msgstr "lock" - -#. (refname) -#: ../source/book.xml:19229 -msgid "svn lock" -msgstr "svn lock" - -#. (refpurpose) -#: ../source/book.xml:19230 -msgid "Lock working copy paths or URLs in the repository, so that no other user can commit changes to them." -msgstr "锁定版本库的工作拷贝路径或URL,所以没有其他用户可以提交这些文件的修改。" - -#. (programlisting) -#: ../source/book.xml:19238 -#, no-wrap -msgid "svn lock TARGET..." -msgstr "Synopsis" - -#. (para) -#: ../source/book.xml:19244 -msgid "Lock each TARGET. If any TARGET is already locked by another user, print a warning and continue locking the rest of the TARGETs. Use to steal a lock from another user or working copy." -msgstr "svn lock TARGET..." - -#. (para) -#: ../source/book.xml:19261 ../source/book.xml:21059 -msgid "Working Copy, Repository" -msgstr "锁定每个TARGET。如果任何TARGET已经被另一个用户锁定,则会打印警告信息并且继续锁定剩下的TARGET。可以使用从其它用户来窃取锁定。" - -#. (screen) -#: ../source/book.xml:19273 -#, no-wrap -msgid "" -"\n" -"--targets FILENAME\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--force-log\n" -"--encoding ENC\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--force\n" -msgstr "" -"\n" -"--targets FILENAME\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--force-log\n" -"--encoding ENC\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--force\n" - -#. (para) -#: ../source/book.xml:19291 -msgid "Lock two files in your working copy:" -msgstr "在工作拷贝锁定两个文件:" - -#. (screen) -#: ../source/book.xml:19292 -#, no-wrap -msgid "" -"\n" -"\n" -"$ svn lock tree.jpg house.jpg\n" -"'tree.jpg' locked by user 'harry'.\n" -"'house.jpg' locked by user 'harry'.\n" -msgstr "" -"\n" -"\n" -"$ svn lock tree.jpg house.jpg\n" -"'tree.jpg' locked by user 'harry'.\n" -"'house.jpg' locked by user 'harry'.\n" - -#. (para) -#: ../source/book.xml:19298 -msgid "Lock a file in your working copy that is currently locked by another user:" -msgstr "锁定工作拷贝的一个被其它用户锁定的文件:" - -#. (screen) -#: ../source/book.xml:19300 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn lock tree.jpg\n" -"svn: warning: Path '/tree.jpg is already locked by user 'sally in \\\n" -" filesystem '/var/svn/repos/db'\n" -"\n" -"$ svn lock --force tree.jpg\n" -"'tree.jpg' locked by user 'harry'.\n" -msgstr "" -"\n" -"$ svn lock tree.jpg\n" -"svn: warning: Path '/tree.jpg is already locked by user 'harry in \\\n" -" filesystem '/svn/repos/db'\n" -"\n" -"$ svn lock --force foo\n" -"'tree.jpg' locked by user 'sally'.\n" - -#. (para) -#: ../source/book.xml:19308 -msgid "Lock a file without a working copy:" -msgstr "没有工作拷贝的情况下锁定文件:" - -#. (screen) -#: ../source/book.xml:19309 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn lock http://svn.red-bean.com/repos/test/tree.jpg\n" -"'tree.jpg' locked by user 'harry'.\n" -msgstr "" -"\n" -"$ svn lock http://svn.red-bean.com/repos/test/tree.jpg\n" -"'tree.jpg' locked by user 'sally'.\n" - -#. (para) -#: ../source/book.xml:19313 ../source/book.xml:21105 -msgid "For further details, see ." -msgstr "更多细节见。" - -#. (tertiary) -#: ../source/book.xml:19320 ../source/book.xml:22832 -msgid "log" -msgstr "log" - -#. (refpurpose) -#: ../source/book.xml:19324 -msgid "Display commit log messages." -msgstr "显示提交日志信息。" - -#. (programlisting) -#: ../source/book.xml:19330 -#, no-wrap -msgid "svn log [PATH]" -msgstr "svn log [PATH]" - -#. (programlisting) -#: ../source/book.xml:19331 -#, no-wrap -msgid "svn log URL [PATH...]" -msgstr "svn log URL [PATH...]" - -#. (programlisting) -#: ../source/book.xml:19332 -#, fuzzy, no-wrap -msgid "svn log URL[@REV] [PATH...]" -msgstr "svn log URL [PATH...]" - -#. (para) -#: ../source/book.xml:19338 -#, fuzzy -msgid "Shows log messages from the repository. If no arguments are supplied, svn log 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 BASE:1." -msgstr "缺省目标是你的当前目录的路径,如果没有提供参数,svn log会显示当前目录下的所有文件和目录的日志信息,你可以通过指定路径来精炼结果,一个或多个修订版本,或者是任何两个的组合。对于本地路径的缺省修订版本范围BASE:1。" - -#. (para) -#: ../source/book.xml:19346 -#, fuzzy -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 HEAD:1." -msgstr "如果你只是指定一个URL,就会打印这个URL上所有的日志信息,如果添加部分路径,只有这条路径下的URL信息会被打印,URL缺省的修订版本范围是HEAD:1。" - -#. (para) -#: ../source/book.xml:19351 -#, fuzzy -msgid "With , svn log will also print all affected paths with each log message. With , svn log will not print the log message body itself (this is compatible with )." -msgstr "svn log使用选项也会打印所有影响路径的日志信息,使用选项不会打印日志信息正文本身(这与协调一致)。" - -#. (para) -#: ../source/book.xml:19356 -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 to disable this behavior, which can be useful for determining branch points." -msgstr "每个日志信息只会打印一次,即使是那些明确请求不止一次的路径,日志会跟随在拷贝过程中,使用可以关闭这个特性,可以用来监测分支点。" - -#. (screen) -#: ../source/book.xml:19385 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--verbose (-v)\n" -"--targets FILENAME\n" -"--stop-on-copy\n" -"--incremental\n" -"--limit NUM\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--verbose (-v)\n" -"--targets FILENAME\n" -"--stop-on-copy\n" -"--incremental\n" -"--limit NUM\n" -"--xml\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19405 -#, fuzzy -msgid "You can see the log messages for all the paths that changed in your working copy by running svn log from the top:" -msgstr "你可以在顶级目录运行svn log看到工作拷贝中所有修改的路径的日志信息:" - -#. (screen) -#: ../source/book.xml:19408 -#, no-wrap -msgid "" -"\n" -"$ svn log\n" -"------------------------------------------------------------------------\n" -"r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n" -"\n" -"Tweak.\n" -"------------------------------------------------------------------------\n" -"r17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines\n" -"…\n" -msgstr "" -"\n" -"$ svn log\n" -"------------------------------------------------------------------------\n" -"r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n" -"\n" -"Tweak.\n" -"------------------------------------------------------------------------\n" -"r17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines\n" -"…\n" - -#. (para) -#: ../source/book.xml:19418 -msgid "Examine all log messages for a particular file in your working copy:" -msgstr "检验一个特定文件所有的日志信息:" - -#. (screen) -#: ../source/book.xml:19420 -#, no-wrap -msgid "" -"\n" -"$ svn log foo.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" -msgstr "" -"\n" -"$ svn log foo.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" - -#. (para) -#: ../source/book.xml:19430 -msgid "If you don't have a working copy handy, you can log a URL:" -msgstr "如果你手边没有工作拷贝,你可以查看一个URL的日志:" - -#. (screen) -#: ../source/book.xml:19432 -#, no-wrap -msgid "" -"\n" -"$ svn log http://svn.red-bean.com/repos/test/foo.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" -msgstr "" -"\n" -"$ svn log http://svn.red-bean.com/repos/test/foo.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" - -#. (para) -#: ../source/book.xml:19442 -#, fuzzy -msgid "If you want several distinct paths underneath the same URL, you can use the URL [PATH...] syntax." -msgstr "如果你希望查看某个URL下面不同的多个路径,你可以使用URL [PATH...]语法。" - -#. (screen) -#: ../source/book.xml:19445 -#, no-wrap -msgid "" -"\n" -"$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line\n" -"\n" -"Added new file bar.c\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" -msgstr "" -"\n" -"$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c\n" -"------------------------------------------------------------------------\n" -"r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line\n" -"\n" -"Added defines.\n" -"------------------------------------------------------------------------\n" -"r31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line\n" -"\n" -"Added new file bar.c\n" -"------------------------------------------------------------------------\n" -"r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines\n" -"…\n" - -#. (para) -#: ../source/book.xml:19459 -#, fuzzy -msgid "When you're concatenating the results of multiple calls to the log command, you may want to use the option. svn log 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 svn log on a range of two revisions, you would get this:" -msgstr "当你想¿ž接多个队日志命令的调用结果,你会希望使用选项。svn log通常会在日志信息的开头和每一小段间打印一行虚线,如果你对一段修订版本运行svn log,你会得到下面的结果:" - -#. (screen) -#: ../source/book.xml:19467 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 14:15\n" -"------------------------------------------------------------------------\n" -"r14 | …\n" -"\n" -"------------------------------------------------------------------------\n" -"r15 | …\n" -"\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log -r 14:15\n" -"------------------------------------------------------------------------\n" -"r14 | ...\n" -"\n" -"------------------------------------------------------------------------\n" -"r15 | ...\n" -"\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:19477 -msgid "However, if you wanted to gather 2 non-sequential log messages into a file, you might do something like this:" -msgstr "然而,如果你希望收集两个不连续的日志信息到一个文件,你会这样做:" - -#. (screen) -#: ../source/book.xml:19480 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 14 > mylog\n" -"$ svn log -r 19 >> mylog\n" -"$ svn log -r 27 >> mylog\n" -"$ cat mylog\n" -"------------------------------------------------------------------------\n" -"r14 | …\n" -"\n" -"------------------------------------------------------------------------\n" -"------------------------------------------------------------------------\n" -"r19 | …\n" -"\n" -"------------------------------------------------------------------------\n" -"------------------------------------------------------------------------\n" -"r27 | …\n" -"\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log -r 14 > mylog\n" -"$ svn log -r 19 >> mylog\n" -"$ svn log -r 27 >> mylog\n" -"$ cat mylog\n" -"------------------------------------------------------------------------\n" -"r14 | ...\n" -"\n" -"------------------------------------------------------------------------\n" -"------------------------------------------------------------------------\n" -"r19 | ...\n" -"\n" -"------------------------------------------------------------------------\n" -"------------------------------------------------------------------------\n" -"r27 | ...\n" -"\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:19498 -#, fuzzy -msgid "You can avoid the clutter of the double dashed lines in your output by using the incremental option:" -msgstr "你可以使用incremental选项来避免两行虚线带来的混乱:" - -#. (screen) -#: ../source/book.xml:19500 -#, no-wrap -msgid "" -"\n" -"$ svn log --incremental -r 14 > mylog\n" -"$ svn log --incremental -r 19 >> mylog\n" -"$ svn log --incremental -r 27 >> mylog\n" -"$ cat mylog\n" -"------------------------------------------------------------------------\n" -"r14 | …\n" -"\n" -"------------------------------------------------------------------------\n" -"r19 | …\n" -"\n" -"------------------------------------------------------------------------\n" -"r27 | …\n" -msgstr "" -"\n" -"$ svn log --incremental -r 14 > mylog\n" -"$ svn log --incremental -r 19 >> mylog\n" -"$ svn log --incremental -r 27 >> mylog\n" -"$ cat mylog\n" -"------------------------------------------------------------------------\n" -"r14 | ...\n" -"\n" -"------------------------------------------------------------------------\n" -"r19 | ...\n" -"\n" -"------------------------------------------------------------------------\n" -"r27 | ...\n" - -#. (para) -#: ../source/book.xml:19514 -#, fuzzy -msgid "The option provides similar output control when using the option." -msgstr "选项为提供了一个相似的输出控制。" - -#. (para) -#: ../source/book.xml:19518 -#, fuzzy -msgid "If you run svn log on a specific path and provide a specific revision and get no output at all" -msgstr "如果你在特定路径和修订版本运行svn log,输出结果为空" - -#. (screen) -#: ../source/book.xml:19521 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 20 http://svn.red-bean.com/untouched.txt\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log -r 20 http://svn.red-bean.com/untouched.txt\n" -"------------------------------------------------------------------------\n" - -#. (para) -#: ../source/book.xml:19525 -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:" -msgstr "这只意味着这条路径在那个修订版本没有修改,如果从版本库的顶级目录运行这个命令,或者是你知道那个修订版本修改了那个文件,你可以明确的指定它:" - -#. (screen) -#: ../source/book.xml:19529 -#, no-wrap -msgid "" -"\n" -"$ svn log -r 20 touched.txt \n" -"------------------------------------------------------------------------\n" -"r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n" -"\n" -"Made a change.\n" -"------------------------------------------------------------------------\n" -msgstr "" -"\n" -"$ svn log -r 20 touched.txt \n" -"------------------------------------------------------------------------\n" -"r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line\n" -"\n" -"Made a change.\n" -"------------------------------------------------------------------------\n" - -#. (tertiary) -#: ../source/book.xml:19544 -msgid "merge" -msgstr "merge" - -#. (refname) -#: ../source/book.xml:19547 -msgid "svn merge" -msgstr "svn merge" - -#. (refpurpose) -#: ../source/book.xml:19548 -msgid "Apply the differences between two sources to a working copy path." -msgstr "应用两组源文件的差别到工作拷贝路径。" - -#. (programlisting) -#: ../source/book.xml:19555 -#, fuzzy, no-wrap -msgid "svn merge [-c M | -r N:M] SOURCE[@REV] [WCPATH]" -msgstr "svn merge -r N:M SOURCE[@REV] [WCPATH]" - -#. (programlisting) -#: ../source/book.xml:19556 -#, no-wrap -msgid "svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]" -msgstr "svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]" - -#. (programlisting) -#: ../source/book.xml:19557 -#, no-wrap -msgid "svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]" -msgstr "svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]" - -#. (para) -#: ../source/book.xml:19563 -#, fuzzy -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 N and M. These are the two sources to be compared. The revisions default to HEAD if omitted." -msgstr "第一种和第二种形式里,源路径(第一种是URL,第二种是工作拷贝路径)用修订版本号NM指定,这是要比较的两组源文件,如果省略修订版本号,缺省是HEAD。" - -#. (para) -#: ../source/book.xml:19569 -#, fuzzy -msgid "The -c M option is equivalent to -r N:M where N = M-1. Using -c -M does the reverse: -r M:N where N = M-1." -msgstr "Subversion将CVS的PU合并为U,当合并或冲突发生时,Subversion会简单的打印GC,而不是大段相关内容。" - -#. (para) -#: ../source/book.xml:19574 -msgid "In the third form, SOURCE can be a URL or working copy item, in which case the corresponding URL is used. This URL, at revisions N and M, defines the two sources to be compared." -msgstr "第三种形式,SOURCE可以是URL或者工作拷贝项目,与之对应的URL会被使用。在修订版本号NM的URL定义了要比较的两组源。" - -#. (para) -#: ../source/book.xml:19580 -#, fuzzy -msgid "WCPATH is the working copy path that will receive the changes. If WCPATH is omitted, a default value of . is assumed, unless the sources have identical basenames that match a file within .: in which case, the differences will be applied to that file." -msgstr "WCPATH是接收变化的工作拷贝路径,如果省略WCPATH,会假定缺省值.,除非源有相同基本名称与.中的某一文件名字匹配:在这种情况下,区别会应用到那个文件。" - -#. (para) -#: ../source/book.xml:19587 -#, fuzzy -msgid "Unlike svn diff, 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." -msgstr "不像svn diff,合并操作在执行时会考虑文件的祖先,当你从一个分支合并到另一个分支,而这两个分支有各自重命名的文件时,这一点会非常重要。" - -#. (para) -#: ../source/book.xml:19609 -msgid "Only if working with URLs" -msgstr "只有在对URL操作时会" - -#. (screen) -#: ../source/book.xml:19615 -#, fuzzy, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--change (-c) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--force\n" -"--dry-run\n" -"--diff3-cmd CMD\n" -"--extensions (-x) ARG\n" -"--ignore-ancestry\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--force\n" -"--dry-run\n" -"--diff3-cmd CMD\n" -"--ignore-ancestry\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19636 -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):" -msgstr "将一个分支合并回主干(假定你有一份主干的工作拷贝,分支在修订版本250创建):" - -#. (screen) -#: ../source/book.xml:19639 -#, no-wrap -msgid "" -"\n" -"$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch\n" -"U myproj/tiny.txt\n" -"U myproj/thhgttg.txt\n" -"U myproj/win.txt\n" -"U myproj/flo.txt\n" -msgstr "" -"\n" -"$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch\n" -"U myproj/tiny.txt\n" -"U myproj/thhgttg.txt\n" -"U myproj/win.txt\n" -"U myproj/flo.txt\n" - -#. (para) -#: ../source/book.xml:19646 -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:" -msgstr "如果你的分支在修订版本23,你希望将主干的修改合并到分支,你可以在你的工作拷贝的分支上这样做:" - -#. (screen) -#: ../source/book.xml:19649 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn merge -r 23:30 file:///var/svn/repos/trunk/vendors\n" -"U myproj/thhgttg.txt\n" -"…\n" -msgstr "" -"\n" -"$ svn merge -r 23:30 file:///tmp/repos/trunk/vendors\n" -"U myproj/thhgttg.txt\n" -"…\n" - -#. (para) -#: ../source/book.xml:19654 -msgid "To merge changes to a single file:" -msgstr "合并一个单独文件的修改:" - -#. (screen) -#: ../source/book.xml:19655 -#, no-wrap -msgid "" -"\n" -"$ cd myproj\n" -"$ svn merge -r 30:31 thhgttg.txt \n" -"U thhgttg.txt\n" -msgstr "" -"\n" -"$ cd myproj\n" -"$ svn merge -r 30:31 thhgttg.txt \n" -"U thhgttg.txt\n" - -#. (tertiary) -#: ../source/book.xml:19666 -msgid "mkdir" -msgstr "mkdir" - -#. (refname) -#: ../source/book.xml:19669 -msgid "svn mkdir" -msgstr "svn mkdir" - -#. (refpurpose) -#: ../source/book.xml:19670 -msgid "Create a new directory under version control." -msgstr "创建一个纳入版本控制的新目录。" - -#. (programlisting) -#: ../source/book.xml:19676 -#, no-wrap -msgid "svn mkdir PATH..." -msgstr "svn mkdir PATH..." - -#. (programlisting) -#: ../source/book.xml:19677 -#, no-wrap -msgid "svn mkdir URL..." -msgstr "svn mkdir URL..." - -#. (para) -#: ../source/book.xml:19683 -msgid "Create a directory with a name given by the final component of the PATH or URL. A directory specified by a working copy PATH 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." -msgstr "创建一个目录,名字是提供的PATH或者URL的最后一部分,工作拷贝PATH指定的目录会预定要添加,而通过URL指定的目录会作为一次立即提交在版本库建立。多个目录URL的提交是原子操作,在两种情况下,中介目录必须已经存在。" - -#. (para) -#: ../source/book.xml:19703 ../source/book.xml:19809 -msgid "Working copy, repository if operating on a URL" -msgstr "如果是对URL操作则会影响版本库,否则是工作拷贝" - -#. (para) -#: ../source/book.xml:19709 ../source/book.xml:19815 ../source/book.xml:19911 -#: ../source/book.xml:19991 ../source/book.xml:20069 ../source/book.xml:20150 -#: ../source/book.xml:20245 -msgid "Only if operating on a URL" -msgstr "只有在对URl操作时会" - -#. (screen) -#: ../source/book.xml:19715 -#, no-wrap -msgid "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--force-log\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--force-log\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19733 -msgid "Create a directory in your working copy:" -msgstr "在工作拷贝创建一个目录:" - -#. (screen) -#: ../source/book.xml:19734 -#, no-wrap -msgid "" -"\n" -"$ svn mkdir newdir\n" -"A newdir\n" -msgstr "" -"\n" -"$ svn mkdir newdir\n" -"A newdir\n" - -#. (para) -#: ../source/book.xml:19738 -msgid "Create one in the repository (instant commit, so a log message is required):" -msgstr "在版本库创建一个目录(立即提交,所以需要日志信息):" - -#. (screen) -#: ../source/book.xml:19740 -#, no-wrap -msgid "" -"\n" -"$ svn mkdir -m \"Making a new dir.\" http://svn.red-bean.com/repos/newdir\n" -"\n" -"Committed revision 26.\n" -msgstr "" -"\n" -"$ svn mkdir -m \"Making a new dir.\" http://svn.red-bean.com/repos/newdir\n" -"\n" -"Committed revision 26.\n" - -#. (tertiary) -#: ../source/book.xml:19751 -msgid "move" -msgstr "move" - -#. (refpurpose) -#: ../source/book.xml:19755 -msgid "Move a file or directory." -msgstr "移动一个文件或目录。" - -#. (programlisting) -#: ../source/book.xml:19761 -#, fuzzy, no-wrap -msgid "svn move SRC... DST" -msgstr "svn move SRC DST" - -#. (para) -#: ../source/book.xml:19767 -#, fuzzy -msgid "This command moves files or directories in your working copy or in the repository." -msgstr "这个命令移动文件或目录到你的工作拷贝或者是版本库。" - -#. (para) -#: ../source/book.xml:19770 -#, fuzzy -msgid "This command is equivalent to an svn copy followed by svn delete." -msgstr "这个命令同svn copy加一个svn delete等同。" - -#. (para) -#: ../source/book.xml:19774 -msgid "When moving multiple sources, they will be added as children of DST, which must be a directory." -msgstr "" - -#. (para) -#: ../source/book.xml:19778 -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." -msgstr "Subversion不支持在工作拷贝和URL之间拷贝,此外,你只可以一个版本库内移动文件—Subversion不支持跨版本库的移动。" - -#. (para) -#: ../source/book.xml:19787 -msgid "Move and schedule a file or directory for addition (with history)." -msgstr "移动和预订一个文件或目录将要添加(包含历史)。" - -#. (para) -#: ../source/book.xml:19794 -msgid "Complete server-side rename." -msgstr "完全服务器端的重命名。" - -#. (para) -#: ../source/book.xml:19803 -msgid "mv, rename, ren" -msgstr "mv, rename, ren" - -#. (emphasis) -#: ../source/book.xml:19824 -#, fuzzy -msgid "Deprecated" -msgstr "删除" - -#. (screen) -#: ../source/book.xml:19821 -#, fuzzy, no-wrap -msgid "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--revision (-r) REV ()\n" -"--quiet (-q)\n" -"--force\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--force-log\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--message (-m) TEXT\n" -"--file (-F) FILE\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--force\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--editor-cmd EDITOR\n" -"--encoding ENC\n" -"--force-log\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19841 -msgid "Move a file in your working copy:" -msgstr "移动工作拷bede一个文件:" - -#. (screen) -#: ../source/book.xml:19842 -#, no-wrap -msgid "" -"\n" -"$ svn move foo.c bar.c\n" -"A bar.c\n" -"D foo.c\n" -msgstr "" -"\n" -"$ svn move foo.c bar.c\n" -"A bar.c\n" -"D foo.c\n" - -#. (para) -#: ../source/book.xml:19847 -#, fuzzy -msgid "Move several files in your working copy into a subdirectory:" -msgstr "移动工作拷bede一个文件:" - -#. (screen) -#: ../source/book.xml:19848 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn move baz.c bat.c qux.c src\n" -"A src/baz.c\n" -"D baz.c\n" -"A src/bat.c\n" -"D bat.c\n" -"A src/qux.c\n" -"D qux.c\n" -msgstr "" -"\n" -"$ svn add testdir\n" -"A testdir\n" -"A testdir/a\n" -"A testdir/b\n" -"A testdir/c\n" -"A testdir/d\n" - -#. (para) -#: ../source/book.xml:19857 -msgid "Move a file in the repository (an immediate commit, so it requires a commit message):" -msgstr "移动版本库中的一个文件(一个立即提交,所以需要提交信息):" - -#. (screen) -#: ../source/book.xml:19859 -#, no-wrap -msgid "" -"\n" -"$ svn move -m \"Move a file\" http://svn.red-bean.com/repos/foo.c \\\n" -" http://svn.red-bean.com/repos/bar.c\n" -"\n" -"Committed revision 27.\n" -msgstr "" -"\n" -"$ svn move -m \"Move a file\" http://svn.red-bean.com/repos/foo.c \\\n" -" http://svn.red-bean.com/repos/bar.c\n" -"\n" -"Committed revision 27.\n" - -#. (tertiary) -#: ../source/book.xml:19871 -msgid "propdel" -msgstr "propdel" - -#. (refname) -#: ../source/book.xml:19874 -msgid "svn propdel" -msgstr "svn propdel" - -#. (refpurpose) -#: ../source/book.xml:19875 -msgid "Remove a property from an item." -msgstr "删除一个项目的一个属性。" - -#. (programlisting) -#: ../source/book.xml:19881 -#, no-wrap -msgid "svn propdel PROPNAME [PATH...]" -msgstr "svn propdel PROPNAME [PATH...]" - -#. (programlisting) -#: ../source/book.xml:19882 -#, fuzzy, no-wrap -msgid "svn propdel PROPNAME --revprop -r REV [TARGET]" -msgstr "svn propdel PROPNAME --revprop -r REV [URL]" - -#. (para) -#: ../source/book.xml:19888 -#, fuzzy -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 (TARGET only determines which repository to access)." -msgstr "这会删除文件、目录或修订版本的属性。第一种形式是在工作拷贝删除版本化属性,第二种是在一个版本库修订版本中删除未版本化的属性。" - -#. (para) -#: ../source/book.xml:19899 -msgid "pdel, pd" -msgstr "pdel, pd" - -#. (para) -#: ../source/book.xml:19905 ../source/book.xml:19985 ../source/book.xml:20063 -#: ../source/book.xml:20144 ../source/book.xml:20239 -msgid "Working copy, repository only if operating on a URL" -msgstr "只有在对URL操作时会 2" - -#. (screen) -#: ../source/book.xml:19917 -#, no-wrap -msgid "" -"\n" -"--quiet (-q)\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--quiet (-q)\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:19933 -msgid "Delete a property from a file in your working copy" -msgstr "删除你的工作拷贝中一个文件的一个属性" - -#. (screen) -#: ../source/book.xml:19935 -#, no-wrap -msgid "" -"\n" -"$ svn propdel svn:mime-type some-script\n" -"property 'svn:mime-type' deleted from 'some-script'.\n" -msgstr "" -"\n" -"$ svn propdel svn:mime-type some-script\n" -"property 'svn:mime-type' deleted from 'some-script'.\n" - -#. (para) -#: ../source/book.xml:19939 -msgid "Delete a revision property:" -msgstr "删除一个修订版本的属性:" - -#. (screen) -#: ../source/book.xml:19940 -#, no-wrap -msgid "" -"\n" -"$ svn propdel --revprop -r 26 release-date \n" -"property 'release-date' deleted from repository revision '26'\n" -msgstr "" -"\n" -"$ svn propdel --revprop -r 26 release-date \n" -"property 'release-date' deleted from repository revision '26'\n" - -#. (tertiary) -#: ../source/book.xml:19950 -msgid "propedit" -msgstr "propedit" - -#. (refname) -#: ../source/book.xml:19953 -msgid "svn propedit" -msgstr "svn propedit" - -#. (refpurpose) -#: ../source/book.xml:19954 -msgid "Edit the property of one or more items under version control." -msgstr "修改一个或多个版本控制之下文件的属性。" - -#. (programlisting) -#: ../source/book.xml:19961 -#, no-wrap -msgid "svn propedit PROPNAME PATH..." -msgstr "svn propedit PROPNAME PATH..." - -#. (programlisting) -#: ../source/book.xml:19962 -#, fuzzy, no-wrap -msgid "svn propedit PROPNAME --revprop -r REV [TARGET]" -msgstr "svn propedit PROPNAME --revprop -r REV [URL]" - -#. (para) -#: ../source/book.xml:19968 -#, fuzzy -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 (TARGET only determines which repository to access)." -msgstr "使用喜欢的编辑器编辑一个或多个属性,第一种形式是在工作拷贝编辑版本化的属性,第二种形式是远程编辑未版本化的版本库修订版本属性。" - -#. (para) -#: ../source/book.xml:19979 -msgid "pedit, pe" -msgstr "pedit, pe" - -#. (screen) -#: ../source/book.xml:19997 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--editor-cmd EDITOR\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--editor-cmd EDITOR\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20013 -#, fuzzy -msgid "svn propedit makes it easy to modify properties that have multiple values:" -msgstr "svn propedit对修改多个值的属性非常简单:" - -#. (screen) -#: ../source/book.xml:20015 -#, no-wrap -msgid "" -"\n" -"$ svn propedit svn:keywords foo.c \n" -" <svn will launch your favorite editor here, with a buffer open\n" -" containing the current contents of the svn:keywords property. You\n" -" can add multiple values to a property easily here by entering one\n" -" value per line.>\n" -"Set new value for property 'svn:keywords' on 'foo.c'\n" -msgstr "" -"\n" -"$ svn propedit svn:keywords foo.c \n" -" <svn will launch your favorite editor here, with a buffer open\n" -" containing the current contents of the svn:keywords property. You\n" -" can add multiple values to a property easily here by entering one\n" -" value per line.>\n" -"Set new value for property 'svn:keywords' on 'foo.c'\n" - -#. (tertiary) -#: ../source/book.xml:20029 ../source/book.xml:22876 -msgid "propget" -msgstr "propget" - -#. (refname) -#: ../source/book.xml:20032 -msgid "svn propget" -msgstr "svn propget" - -#. (refpurpose) -#: ../source/book.xml:20033 -msgid "Print the value of a property." -msgstr "打印一个属性的值。" - -#. (programlisting) -#: ../source/book.xml:20039 -#, no-wrap -msgid "svn propget PROPNAME [TARGET[@REV]...]" -msgstr "svn propget PROPNAME [TARGET[@REV]...]" - -#. (programlisting) -#: ../source/book.xml:20040 -#, no-wrap -msgid "svn propget PROPNAME --revprop -r REV [URL]" -msgstr "svn propget PROPNAME --revprop -r REV [URL]" - -#. (para) -#: ../source/book.xml:20046 -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 for more information on properties." -msgstr "打印一个文件、目录或修订版本的一个属性的值,第一种形式是打印工作拷贝中一个或多个项目的版本化的属性,第二种形式是远程打印版本库修订版本的未版本化的属性。属性的详情见。" - -#. (para) -#: ../source/book.xml:20057 -msgid "pget, pg" -msgstr "pget, pg" - -#. (screen) -#: ../source/book.xml:20075 -#, no-wrap -msgid "" -"\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--revprop\n" -"--strict\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--revprop\n" -"--strict\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20091 -msgid "Examine a property of a file in your working copy:" -msgstr "检查工作拷贝的一个文件的一个属性:" - -#. (screen) -#: ../source/book.xml:20093 -#, no-wrap -msgid "" -"\n" -"$ svn propget svn:keywords foo.c\n" -"Author\n" -"Date\n" -"Rev\n" -msgstr "" -"\n" -"$ svn propget svn:keywords foo.c\n" -"Author\n" -"Date\n" -"Rev\n" - -#. (para) -#: ../source/book.xml:20099 -msgid "The same goes for a revision property:" -msgstr "对于修订版本属性相同:" - -#. (screen) -#: ../source/book.xml:20100 -#, no-wrap -msgid "" -"\n" -"$ svn propget svn:log --revprop -r 20 \n" -"Began journal.\n" -msgstr "" -"\n" -"$ svn propget svn:log --revprop -r 20 \n" -"Began journal.\n" - -#. (tertiary) -#: ../source/book.xml:20110 ../source/book.xml:22929 -msgid "proplist" -msgstr "proplist" - -#. (refname) -#: ../source/book.xml:20113 -msgid "svn proplist" -msgstr "svn proplist" - -#. (refpurpose) -#: ../source/book.xml:20114 -msgid "List all properties." -msgstr "列出所有的属性。" - -#. (programlisting) -#: ../source/book.xml:20120 -#, no-wrap -msgid "svn proplist [TARGET[@REV]...]" -msgstr "svn proplist [TARGET[@REV]...]" - -#. (programlisting) -#: ../source/book.xml:20121 -#, fuzzy, no-wrap -msgid "svn proplist --revprop -r REV [TARGET]" -msgstr "svn proplist --revprop -r REV [URL]" - -#. (para) -#: ../source/book.xml:20127 -#, fuzzy -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 (TARGET only determines which repository to access)." -msgstr "列出文件、目录或修订版本的属性,第一种形式是列出工作拷贝的所有版本化的属性,第二种形式是列出版本库修订版本的未版本化的属性。" - -#. (para) -#: ../source/book.xml:20138 -msgid "plist, pl" -msgstr "plist, pl" - -#. (screen) -#: ../source/book.xml:20156 -#, no-wrap -msgid "" -"\n" -"--verbose (-v)\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--verbose (-v)\n" -"--recursive (-R)\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20173 -msgid "You can use proplist to see the properties on an item in your working copy:" -msgstr "你可以使用proplist察看你的工作拷贝的一个项目的属性:" - -#. (screen) -#: ../source/book.xml:20175 -#, no-wrap -msgid "" -"\n" -"$ svn proplist foo.c\n" -"Properties on 'foo.c':\n" -" svn:mime-type\n" -" svn:keywords\n" -" owner\n" -msgstr "" -"\n" -"$ svn proplist foo.c\n" -"Properties on 'foo.c':\n" -" svn:mime-type\n" -" svn:keywords\n" -" owner\n" - -#. (para) -#: ../source/book.xml:20182 -msgid "But with the flag, svn proplist is extremely handy as it also shows you the values for the properties:" -msgstr "通过选项,svn proplist也可以非常便利的显示属性的值:" - -#. (screen) -#: ../source/book.xml:20185 -#, no-wrap -msgid "" -"\n" -"$ svn proplist --verbose foo.c\n" -"Properties on 'foo.c':\n" -" svn:mime-type : text/plain\n" -" svn:keywords : Author Date Rev\n" -" owner : sally\n" -msgstr "" -"\n" -"$ svn proplist --verbose foo.c\n" -"Properties on 'foo.c':\n" -" svn:mime-type : text/plain\n" -" svn:keywords : Author Date Rev\n" -" owner : sally\n" - -#. (tertiary) -#: ../source/book.xml:20198 -msgid "propset" -msgstr "propset" - -#. (refname) -#: ../source/book.xml:20201 -msgid "svn propset" -msgstr "svn propset" - -#. (refpurpose) -#: ../source/book.xml:20202 -msgid "Set PROPNAME to PROPVAL on files, directories, or revisions." -msgstr "设置文件、目录或者修订版本的属性PROPNAME为PROPVAL。" - -#. (programlisting) -#: ../source/book.xml:20208 -#, no-wrap -msgid "svn propset PROPNAME [PROPVAL | -F VALFILE] PATH..." -msgstr "svn propset PROPNAME [PROPVAL | -F VALFILE] PATH..." - -#. (programlisting) -#: ../source/book.xml:20209 -#, fuzzy, no-wrap -msgid "svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET]" -msgstr "svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [URL]" - -#. (para) -#: ../source/book.xml:20215 -#, fuzzy -msgid "Set PROPNAME to PROPVAL 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 (TARGET only determines which repository to access)." -msgstr "设置文件、目录或者修订版本的属性PROPNAMEPROPVAL。第一个例子在工作拷贝创建了一个版本化的本地属性修改,第二个例子创建了一个未版本化的远程的对版本库修订版本的属性修改。" - -#. (para) -#: ../source/book.xml:20224 -msgid "Subversion has a number of special properties that affect its behavior. See for more on these properties." -msgstr "Subversion有一系列特殊的影响行为方式的属性,关于这些属性的详情请见。" - -#. (para) -#: ../source/book.xml:20233 -msgid "pset, ps" -msgstr "pset, ps" - -#. (screen) -#: ../source/book.xml:20251 -#, no-wrap -msgid "" -"\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--revision (-r) REV\n" -"--targets FILENAME\n" -"--recursive (-R)\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--force\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--file (-F) FILE\n" -"--quiet (-q)\n" -"--revision (-r) REV\n" -"--targets FILENAME\n" -"--recursive (-R)\n" -"--revprop\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--encoding ENC\n" -"--force\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20271 -#, fuzzy -msgid "Set the mime type on a file:" -msgstr "设置文件的mimetype:" - -#. (screen) -#: ../source/book.xml:20272 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:mime-type image/jpeg foo.jpg \n" -"property 'svn:mime-type' set on 'foo.jpg'\n" -msgstr "" -"\n" -"$ svn propset svn:mime-type image/jpeg foo.jpg \n" -"property 'svn:mime-type' set on 'foo.jpg'\n" - -#. (para) -#: ../source/book.xml:20276 -msgid "On a UNIX system, if you want a file to have the executable permission set:" -msgstr "在UNIX系统,如果你希望一个文件设置执行权限:" - -#. (screen) -#: ../source/book.xml:20278 -#, no-wrap -msgid "" -"\n" -"$ svn propset svn:executable ON somescript\n" -"property 'svn:executable' set on 'somescript'\n" -msgstr "" -"\n" -"$ svn propset svn:executable ON somescript\n" -"property 'svn:executable' set on 'somescript'\n" - -#. (para) -#: ../source/book.xml:20282 -msgid "Perhaps you have an internal policy to set certain properties for the benefit of your coworkers:" -msgstr "或许为了合作者的利益你有一个内部的属性设置:" - -#. (screen) -#: ../source/book.xml:20284 -#, no-wrap -msgid "" -"\n" -"$ svn propset owner sally foo.c\n" -"property 'owner' set on 'foo.c'\n" -msgstr "" -"\n" -"$ svn propset owner sally foo.c\n" -"property 'owner' set on 'foo.c'\n" - -#. (para) -#: ../source/book.xml:20288 -#, fuzzy -msgid "If you made a mistake in a log message for a particular revision and want to change it, use and set svn:log to the new log message:" -msgstr "如果你在特定修订版本的日志信息里有一些错误,并且希望修改,可以使用设置svn:log为新的日志信息:" - -#. (screen) -#: ../source/book.xml:20292 -#, no-wrap -msgid "" -"\n" -"$ svn propset --revprop -r 25 svn:log \"Journaled about trip to New York.\"\n" -"property 'svn:log' set on repository revision '25'\n" -msgstr "" -"\n" -"$ svn propset --revprop -r 25 svn:log \"Journaled about trip to New York.\"\n" -"property 'svn:log' set on repository revision '25'\n" - -#. (para) -#: ../source/book.xml:20296 -msgid "Or, if you don't have a working copy, you can provide a URL." -msgstr "或者,你没有工作拷贝,你可以提供一个URL。" - -#. (screen) -#: ../source/book.xml:20298 -#, no-wrap -msgid "" -"\n" -"$ svn propset --revprop -r 26 svn:log \"Document nap.\" http://svn.red-bean.com/repos\n" -"property 'svn:log' set on repository revision '25'\n" -msgstr "" -"\n" -"$ svn propset --revprop -r 26 svn:log \"Document nap.\" http://svn.red-bean.com/repos\n" -"property 'svn:log' set on repository revision '25'\n" - -#. (para) -#: ../source/book.xml:20302 -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:" -msgstr "最后,你可以告诉propset从一个文件得到输入,你甚至可以使用这个方式来设置一个属性为二进制内容:" - -#. (screen) -#: ../source/book.xml:20305 -#, no-wrap -msgid "" -"\n" -"$ svn propset owner-pic -F sally.jpg moo.c \n" -"property 'owner-pic' set on 'moo.c'\n" -msgstr "" -"\n" -"$ svn propset owner-pic -F sally.jpg moo.c \n" -"property 'owner-pic' set on 'moo.c'\n" - -#. (para) -#: ../source/book.xml:20310 -#, fuzzy -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 pre-revprop-change. See for more information on hook scripts." -msgstr "缺省,你不可以在Subversion版本库修改修订版本属性,你的版本库管理员必须显示的通过创建一个名字为pre-revprop-change的钩子来允许修订版本属性修改,关于钩子脚本的详情请见。" - -#. (tertiary) -#: ../source/book.xml:20323 -msgid "resolved" -msgstr "resolved" - -#. (quote) -#: ../source/book.xml:20327 -msgid "conflicted" -msgstr "冲突" - -#. (refpurpose) -#: ../source/book.xml:20327 -msgid "Remove state on working copy files or directories." -msgstr "删除工作拷贝文件或目录的状态。" - -#. (programlisting) -#: ../source/book.xml:20334 -#, no-wrap -msgid "svn resolved PATH..." -msgstr "svn resolved PATH..." - -#. (para) -#: ../source/book.xml:20340 -msgid "Remove conflicted state on working copy files or directories. This routine does not semantically resolve conflict markers; it merely removes conflict-related artifact files and allows PATH to be committed again; that is, it tells Subversion that the conflicts have been resolved. See for an in-depth look at resolving conflicts." -msgstr "删除工作拷贝文件或目录的conflicted状态。这个程序不是语义上的改变冲突标志,它只是删除冲突相关的人造文件,从而重新允许PATH提交;也就是说,它告诉Subversion冲突已经解决了。关于解决冲突更深入的考虑可以查看。" - -#. (screen) -#: ../source/book.xml:20371 ../source/book.xml:20459 -#, no-wrap -msgid "" -"\n" -"--targets FILENAME\n" -"--recursive (-R)\n" -"--quiet (-q)\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--targets FILENAME\n" -"--recursive (-R)\n" -"--quiet (-q)\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20382 -msgid "If you get a conflict on an update, your working copy will sprout three new files:" -msgstr "如果你在更新时得到冲突,你的工作拷贝会产生三个新的文件:" - -#. (screen) -#: ../source/book.xml:20384 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"C foo.c\n" -"Updated to revision 31.\n" -"$ ls\n" -"foo.c\n" -"foo.c.mine\n" -"foo.c.r30\n" -"foo.c.r31\n" -msgstr "" -"\n" -"$ svn update\n" -"C foo.c\n" -"Updated to revision 31.\n" -"$ ls\n" -"foo.c\n" -"foo.c.mine\n" -"foo.c.r30\n" -"foo.c.r31\n" - -#. (para) -#: ../source/book.xml:20394 -#, fuzzy -msgid "Once you've resolved the conflict and foo.c is ready to be committed, run svn resolved to let your working copy know you've taken care of everything." -msgstr "当你解决了foo.c的冲突,并且准备提交,运行svn resolved让你的工作拷贝知道你已经完成了所有事情。" - -#. (para) -#: ../source/book.xml:20399 -#, fuzzy -msgid "You can just remove the conflict files and commit, but svn resolved 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." -msgstr "你可以仅仅删除冲突的文件并且提交,但是svn resolved除了删除冲突文件,还修正了一些记录在工作拷贝管理区域的记录数据,所以我们推荐你使用这个命令。" - -#. (tertiary) -#: ../source/book.xml:20412 -msgid "revert" -msgstr "revert" - -#. (refpurpose) -#: ../source/book.xml:20416 -msgid "Undo all local edits." -msgstr "取消所有的本地编辑。" - -#. (programlisting) -#: ../source/book.xml:20422 -#, no-wrap -msgid "svn revert PATH..." -msgstr "svn revert PATH..." - -#. (para) -#: ../source/book.xml:20428 -#, fuzzy -msgid "Reverts any local changes to a file or directory and resolves any conflicted states. svn revert 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 unscheduled)." -msgstr "恢复所有对文件和目录的修改,并且解决所有的冲突状态。svn revert不会只是恢复工作拷贝中一个项目的内容,也包括了对属性修改的恢复。最终,你可以使用它来取消所有已经做过的预定操作(例如,文件预定要添加或删除可以恢复)。" - -#. (para) -#: ../source/book.xml:20470 -msgid "Discard changes to a file:" -msgstr "丢弃对一个文件的修改:" - -#. (screen) -#: ../source/book.xml:20471 -#, no-wrap -msgid "" -"\n" -"$ svn revert foo.c\n" -"Reverted foo.c\n" -msgstr "" -"\n" -"$ svn revert foo.c\n" -"Reverted foo.c\n" - -#. (para) -#: ../source/book.xml:20475 -msgid "If you want to revert a whole directory of files, use the flag:" -msgstr "如果你希望恢复一整个目录的文件,可以使用选项:" - -#. (screen) -#: ../source/book.xml:20477 -#, no-wrap -msgid "" -"\n" -"$ svn revert --recursive .\n" -"Reverted newdir/afile\n" -"Reverted foo.c\n" -"Reverted bar.txt\n" -msgstr "" -"\n" -"$ svn revert --recursive .\n" -"Reverted newdir/afile\n" -"Reverted foo.c\n" -"Reverted bar.txt\n" - -#. (para) -#: ../source/book.xml:20483 -msgid "Lastly, you can undo any scheduling operations:" -msgstr "最后,你可以取消预定的操作:" - -#. (screen) -#: ../source/book.xml:20485 -#, no-wrap -msgid "" -"\n" -"$ svn add mistake.txt whoops\n" -"A mistake.txt\n" -"A whoops\n" -"A whoops/oopsie.c\n" -"\n" -"$ svn revert mistake.txt whoops\n" -"Reverted mistake.txt\n" -"Reverted whoops\n" -"\n" -"$ svn status\n" -"? mistake.txt\n" -"? whoops\n" -msgstr "" -"\n" -"$ svn add mistake.txt whoops\n" -"A mistake.txt\n" -"A whoops\n" -"A whoops/oopsie.c\n" -"\n" -"$ svn revert mistake.txt whoops\n" -"Reverted mistake.txt\n" -"Reverted whoops\n" -"\n" -"$ svn status\n" -"? mistake.txt\n" -"? whoops\n" - -#. (para) -#: ../source/book.xml:20500 -msgid "svn revert is inherently dangerous, since its entire purpose is to throw away data—namely, your uncommitted changes. Once you've reverted, Subversion provides no way to get back those uncommitted changes." -msgstr "svn revert本身有固有的危险,因为它的目的是放弃数据—未提交的修改。一旦你选择了恢复,Subversion没有方法找回未提交的修改。" - -#. (para) -#: ../source/book.xml:20506 -#, fuzzy -msgid "If you provide no targets to svn revert, it will do nothing—to protect you from accidentally losing changes in your working copy, svn revert requires you to provide at least one target." -msgstr "如果你没有给svn revert提供了目标,它不会做任何事情—为了保护你不小心失去对工作拷贝的修改,svn revert需要你提供至少一个目标。" - -#. (tertiary) -#: ../source/book.xml:20518 -msgid "status" -msgstr "status" - -#. (refpurpose) -#: ../source/book.xml:20522 -msgid "Print the status of working copy files and directories." -msgstr "打印工作拷贝文件和目录的状态。" - -#. (programlisting) -#: ../source/book.xml:20528 -#, no-wrap -msgid "svn status [PATH...]" -msgstr "svn status [PATH...]" - -#. (para) -#: ../source/book.xml:20534 -#, fuzzy -msgid "Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access). With , it adds working revision and server out-of-date information. With , it prints full revision information on every item." -msgstr "打印工作拷贝文件和目录的状态。如果没有参数,只会打印本地修改的项目(不会访问版本库),使用选项,会添加工作修订版本和服务器过期信息。使用会打印每个项目的完全修订版本信息。" - -#. (para) -#: ../source/book.xml:20541 -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." -msgstr "输出的前六列都是一个字符宽,每一列给出了工作拷贝项目的每一方面的信息。" - -#. (para) -#: ../source/book.xml:20544 -msgid "The first column indicates that an item was added, deleted, or otherwise changed." -msgstr "第一列指出一个项目的是添加、删除还是其它的修改。" - -#. (term) -#: ../source/book.xml:20548 ../source/book.xml:20629 ../source/book.xml:20655 -#: ../source/book.xml:20671 ../source/book.xml:20687 ../source/book.xml:20702 -#: ../source/book.xml:20750 -msgid "' '" -msgstr "' '" - -#. (para) -#: ../source/book.xml:20550 ../source/book.xml:20631 -msgid "No modifications." -msgstr "没有修改。" - -#. (term) -#: ../source/book.xml:20554 -msgid "'A'" -msgstr "'A'" - -#. (para) -#: ../source/book.xml:20556 -msgid "Item is scheduled for Addition." -msgstr "预定要添加的项目。" - -#. (term) -#: ../source/book.xml:20560 -msgid "'D'" -msgstr "'D'" - -#. (para) -#: ../source/book.xml:20562 -msgid "Item is scheduled for Deletion." -msgstr "预定要删除的项目。" - -#. (term) -#: ../source/book.xml:20566 ../source/book.xml:20635 -msgid "'M'" -msgstr "'M'" - -#. (para) -#: ../source/book.xml:20568 -msgid "Item has been modified." -msgstr "项目已经修改了。" - -#. (term) -#: ../source/book.xml:20572 -msgid "'R'" -msgstr "'R'" - -#. (para) -#: ../source/book.xml:20574 -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." -msgstr "项目在工作拷贝中已经被替换了。这意味着文件预定要删除,然后有一个同样名称的文件要在同一个位置替换它。" - -#. (term) -#: ../source/book.xml:20581 ../source/book.xml:20642 -msgid "'C'" -msgstr "'C'" - -#. (para) -#: ../source/book.xml:20583 -msgid "The contents (as opposed to the properties) of the item conflict with updates received from the repository." -msgstr "项目的内容(相对于属性)与更新得到的数据冲突了。" - -#. (term) -#: ../source/book.xml:20589 -msgid "'X'" -msgstr "'X'" - -#. (para) -#: ../source/book.xml:20591 -#, fuzzy -msgid "Item is present because of an externals definition." -msgstr "项目与外部定义相关。" - -#. (term) -#: ../source/book.xml:20595 -msgid "'I'" -msgstr "'I'" - -#. (para) -#: ../source/book.xml:20597 -#, fuzzy -msgid "Item is being ignored (e.g. with the svn:ignore property)." -msgstr "项目被忽略(例如使用svn:ignore属性)。" - -#. (term) -#: ../source/book.xml:20602 -msgid "'?'" -msgstr "'?'" - -#. (para) -#: ../source/book.xml:20604 -msgid "Item is not under version control." -msgstr "项目不在版本控制之下。" - -#. (term) -#: ../source/book.xml:20608 -msgid "'!'" -msgstr "'!'" - -#. (para) -#: ../source/book.xml:20610 -#, fuzzy -msgid "Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted)." -msgstr "项目已经丢失(例如,你使用svn移动或者删除了它)。这也说明了一个目录不是完整的(一个检出或更新中断)。" - -#. (term) -#: ../source/book.xml:20617 -msgid "'~'" -msgstr "'~'" - -#. (para) -#: ../source/book.xml:20619 -msgid "Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object." -msgstr "项目作为一种对象(文件、目录或链接)纳入版本控制,但是已经被另一种对象替代。" - -#. (para) -#: ../source/book.xml:20625 -msgid "The second column tells the status of a file's or directory's properties." -msgstr "第二列告诉一个文件或目录的属性的状态。" - -#. (para) -#: ../source/book.xml:20637 -msgid "Properties for this item have been modified." -msgstr "这个项目的属性已经修改。" - -#. (para) -#: ../source/book.xml:20644 -msgid "Properties for this item are in conflict with property updates received from the repository." -msgstr "这个项目的属性与从版本库得到的更新有冲突。" - -#. (para) -#: ../source/book.xml:20650 -msgid "The third column is populated only if the working copy directory is locked. (See .)" -msgstr "第三列只在工作拷贝锁定时才会出现。(见。)" - -#. (para) -#: ../source/book.xml:20657 -msgid "Item is not locked." -msgstr "项目没有锁定。" - -#. (term) -#: ../source/book.xml:20661 -msgid "'L'" -msgstr "'L'" - -#. (para) -#: ../source/book.xml:20663 -msgid "Item is locked." -msgstr "项目已经锁定。" - -#. (para) -#: ../source/book.xml:20667 -msgid "The fourth column is populated only if the item is scheduled for addition-with-history." -msgstr "第四列只在预定包含历史添加的项目出现。" - -#. (para) -#: ../source/book.xml:20673 -msgid "No history scheduled with commit." -msgstr "没有历史预定要提交。" - -#. (term) -#: ../source/book.xml:20677 -msgid "'+'" -msgstr "'+'" - -#. (para) -#: ../source/book.xml:20679 -msgid "History scheduled with commit." -msgstr "历史预定要伴随提交。" - -#. (para) -#: ../source/book.xml:20683 -msgid "The fifth column is populated only if the item is switched relative to its parent (see )." -msgstr "第五列只在项目跳转到相对于它的父目录时出现(见)。" - -#. (para) -#: ../source/book.xml:20689 -msgid "Item is a child of its parent directory." -msgstr "项目是它的父目录的孩子。" - -#. (term) -#: ../source/book.xml:20693 -msgid "'S'" -msgstr "'S'" - -#. (para) -#: ../source/book.xml:20695 -msgid "Item is switched." -msgstr "项目已经转换。" - -#. (para) -#: ../source/book.xml:20699 -msgid "The sixth column is populated with lock information." -msgstr "第六列显示锁定信息。" - -#. (para) -#: ../source/book.xml:20704 -msgid "When is used, the file is not locked. If is not used, this merely means that the file is not locked in this working copy." -msgstr "当使用,文件没有锁定。如果使用,这意味着文件在工作拷贝被锁定。" - -#. (term) -#: ../source/book.xml:20712 -msgid "K" -msgstr "K" - -#. (para) -#: ../source/book.xml:20714 -msgid "File is locked in this working copy." -msgstr "文件锁定在工作拷贝。" - -#. (term) -#: ../source/book.xml:20718 -msgid "O" -msgstr "O" - -#. (para) -#: ../source/book.xml:20720 -msgid "File is locked either by another user or in another working copy. This only appears when is used." -msgstr "文件被另一个工作拷贝的另一个用户锁定,只有在使用时显示。" - -#. (term) -#: ../source/book.xml:20726 -msgid "T" -msgstr "T" - -#. (para) -#: ../source/book.xml:20728 -#, fuzzy -msgid "File was locked in this working copy, but the lock has been stolen and is invalid. The file is currently locked in the repository. This only appears when is used." -msgstr "文件锁定在工作拷贝,但是锁定被窃取而不可用。文件当前锁定在版本库,只有在使用时显示。" - -#. (term) -#: ../source/book.xml:20736 -msgid "B" -msgstr "B" - -#. (para) -#: ../source/book.xml:20738 -#, fuzzy -msgid "File was locked in this working copy, but the lock has been broken and is invalid. The file is no longer locked This only appears when is used." -msgstr "文件锁定在工作拷贝,但是锁定被破坏而不可用。文件当前锁定在版本库,只有在使用时显示。" - -#. (para) -#: ../source/book.xml:20745 -#, fuzzy -msgid "The out-of-date information appears in the seventh column (only if you pass the option)." -msgstr "过期信息出现在第七列(只在使用选项时出现)。" - -#. (para) -#: ../source/book.xml:20752 -msgid "The item in your working copy is up-to-date." -msgstr "这个项目在工作拷贝是最新的。" - -#. (term) -#: ../source/book.xml:20756 -msgid "'*'" -msgstr "'*'" - -#. (para) -#: ../source/book.xml:20758 -msgid "A newer revision of the item exists on the server." -msgstr "在服务器这个项目有了新的修订版本。" - -#. (para) -#: ../source/book.xml:20763 -#, fuzzy -msgid "The remaining fields are variable width and delimited by spaces. The working revision is the next field if the or options are passed." -msgstr "余下的字段是可变得宽度且使用空格分隔,如果使用选项,工作修订版本是下一个字段。" - -#. (para) -#: ../source/book.xml:20767 -#, fuzzy -msgid "If the option is passed, the last committed revision and last committed author are displayed next." -msgstr "如果传递选项,最后提交的修订版本和最后的提交作者会在后面显示。" - -#. (para) -#: ../source/book.xml:20770 -msgid "The working copy path is always the final field, so it can include spaces." -msgstr "工作拷贝路径永远是最后一个字段,所以它可以包括空格。" - -#. (para) -#: ../source/book.xml:20777 -msgid "stat, st" -msgstr "stat, st" - -#. (para) -#: ../source/book.xml:20789 -msgid "Only if using " -msgstr "只有使用时会访问" - -#. (screen) -#: ../source/book.xml:20795 -#, no-wrap -msgid "" -"\n" -"--show-updates (-u)\n" -"--verbose (-v)\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--no-ignore\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--ignore-externals\n" -msgstr "" -"\n" -"--show-updates (-u)\n" -"--verbose (-v)\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--no-ignore\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--ignore-externals\n" - -#. (para) -#: ../source/book.xml:20813 -msgid "This is the easiest way to find out what changes you have made to your working copy:" -msgstr "这是查看你在工作拷贝所做的修改的最简单的方法。" - -#. (screen) -#: ../source/book.xml:20815 -#, no-wrap -msgid "" -"\n" -"$ svn status wc\n" -" M wc/bar.c\n" -"A + wc/qax.c\n" -msgstr "" -"\n" -"$ svn status wc\n" -" M wc/bar.c\n" -"A + wc/qax.c\n" - -#. (para) -#: ../source/book.xml:20820 -#, fuzzy -msgid "If you want to find out what files in your working copy are out-of-date, pass the option (this will not make any changes to your working copy). Here you can see that wc/foo.c has changed in the repository since we last updated our working copy:" -msgstr "如果你希望找出工作拷贝哪些文件是最新的,使用选项(这不会对工作拷贝有任何修改)。这里你会看到wc/foo.c在上次更新后有了修改:" - -#. (screen) -#: ../source/book.xml:20828 -#, no-wrap -msgid "" -"\n" -"$ svn status --show-updates wc\n" -" M 965 wc/bar.c\n" -" * 965 wc/foo.c\n" -"A + 965 wc/qax.c\n" -"Status against revision: 981\n" -msgstr "" -"\n" -"$ svn status --show-updates wc\n" -" M 965 wc/bar.c\n" -" * 965 wc/foo.c\n" -"A + 965 wc/qax.c\n" -"Status against revision: 981\n" - -#. (para) -#: ../source/book.xml:20836 -#, fuzzy -msgid "only places an asterisk next to items that are out of date (that is, items that will be updated from the repository if you run svn update). does not 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)." -msgstr "只会在过期的项目(如果你运行svn update,就会更新的项目)旁边安置一个星号。不会导致状态列表反映项目的版本库版本。" - -#. (para) -#: ../source/book.xml:20845 -msgid "And finally, the most information you can get out of the status subcommand:" -msgstr "最后,是你能从status子命令得到的所有信息:" - -#. (screen) -#: ../source/book.xml:20847 -#, no-wrap -msgid "" -"\n" -"$ svn status --show-updates --verbose wc\n" -" M 965 938 sally wc/bar.c\n" -" * 965 922 harry wc/foo.c\n" -"A + 965 687 harry wc/qax.c\n" -" 965 687 harry wc/zig.c\n" -"Head revision: 981\n" -msgstr "" -"\n" -"$ svn status --show-updates --verbose wc\n" -" M 965 938 sally wc/bar.c\n" -" * 965 922 harry wc/foo.c\n" -"A + 965 687 harry wc/qax.c\n" -" 965 687 harry wc/zig.c\n" -"Head revision: 981\n" - -#. (para) -#: ../source/book.xml:20855 -#, fuzzy -msgid "For many more examples of svn status, see ." -msgstr "关于svn status的更多例子可以见。" - -#. (tertiary) -#: ../source/book.xml:20863 -msgid "switch" -msgstr "switch" - -#. (refname) -#: ../source/book.xml:20866 -msgid "svn switch" -msgstr "svn switch" - -#. (refpurpose) -#: ../source/book.xml:20867 -msgid "Update working copy to a different URL." -msgstr "把工作拷贝更新到别的URL。" - -#. (programlisting) -#: ../source/book.xml:20873 -#, no-wrap -msgid "svn switch URL [PATH]" -msgstr "svn switch URL [PATH]" - -#. (programlisting) -#: ../source/book.xml:20874 -#, no-wrap -msgid "switch --relocate FROM TO [PATH...]" -msgstr "switch --relocate FROM TO [PATH...]" - -#. (para) -#: ../source/book.xml:20880 -#, fuzzy -msgid "The first variant of this subcommand (without the 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 for an in-depth look at switching." -msgstr "这个子命令更新你的工作拷贝来反映新的URL—通常是一个与你的工作拷贝分享共同祖先的URL,尽管这不是必需的。这是Subversion移动工作拷贝到分支的方式。更深入的了解请见。" - -#. (para) -#: ../source/book.xml:20887 -msgid "The option causes svn switch to do something different: it updates your working copy to point to the same 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)." -msgstr "选项导致svn switch做不同的事情:它更新你的工作拷贝指向到同一个版本库目录,但是不同的URL(通常因为管理员将版本库转移了服务器,或到了同一个服务器的另一个URL)。" - -#. (para) -#: ../source/book.xml:20900 -msgid "sw" -msgstr "sw" - -#. (screen) -#: ../source/book.xml:20918 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--diff3-cmd CMD\n" -"--relocate FROM TO\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--diff3-cmd CMD\n" -"--relocate FROM TO\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:20935 -#, fuzzy -msgid "If you're currently inside the directory vendors, which was branched to vendors-with-fix, and you'd like to switch your working copy to that branch:" -msgstr "如果你目前所在目录vendors分支到vendors-with-fix,你希望转移到那个分支:" - -#. (screen) -#: ../source/book.xml:20939 -#, no-wrap -msgid "" -"\n" -"$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .\n" -"U myproj/foo.txt\n" -"U myproj/bar.txt\n" -"U myproj/baz.c\n" -"U myproj/qux.c\n" -"Updated to revision 31.\n" -msgstr "" -"\n" -"$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .\n" -"U myproj/foo.txt\n" -"U myproj/bar.txt\n" -"U myproj/baz.c\n" -"U myproj/qux.c\n" -"Updated to revision 31.\n" - -#. (para) -#: ../source/book.xml:20947 -msgid "And to switch back, just provide the URL to the location in the repository from which you originally checked out your working copy:" -msgstr "为了跳转回来,只需要提供最初取出工作拷贝的版本库URL:" - -#. (screen) -#: ../source/book.xml:20950 -#, no-wrap -msgid "" -"\n" -"$ svn switch http://svn.red-bean.com/repos/trunk/vendors .\n" -"U myproj/foo.txt\n" -"U myproj/bar.txt\n" -"U myproj/baz.c\n" -"U myproj/qux.c\n" -"Updated to revision 31.\n" -msgstr "" -"\n" -"$ svn switch http://svn.red-bean.com/repos/trunk/vendors .\n" -"U myproj/foo.txt\n" -"U myproj/bar.txt\n" -"U myproj/baz.c\n" -"U myproj/qux.c\n" -"Updated to revision 31.\n" - -#. (para) -#: ../source/book.xml:20959 -msgid "You can just switch part of your working copy to a branch if you don't want to switch your entire working copy." -msgstr "如果你不希望跳转所有的工作拷贝,你可以只跳转一部分。" - -#. (para) -#: ../source/book.xml:20963 -#, fuzzy -msgid "Sometimes an administrator might change the base location 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 svn switch command rewrite the beginnings of all the URLs in your working copy. Use the 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 .svn/ directories which runs s/OldRoot/NewRoot/." -msgstr "有时候管理员会修改版本库的基本位置—换句话说,版本库的内容并不改变,但是访问根的主URL变了。举个例子,主机名变了、URL模式变了或者是URL中的任何一部分改变了。我们不选择重新检出一个工作拷贝,你可以使用svn switch来重写版本库所有URL的开头。使用来做这种替换,没有文件内容会改变,访问的版本库也不会改变。只是像在工作拷贝.svn/运行了一段Perl脚本s/OldRoot/NewRoot/。" - -#. (screen) -#: ../source/book.xml:20978 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos test\n" -"A test/a\n" -"A test/b\n" -"…\n" -"\n" -"$ mv repos newlocation\n" -"$ cd test/\n" -"\n" -"$ svn update\n" -"svn: Unable to open an ra_local session to URL\n" -"svn: Unable to open repository 'file:///var/svn/repos'\n" -"\n" -"$ svn switch --relocate file:///var/svn/repos file:///tmp/newlocation .\n" -"$ svn update\n" -"At revision 3.\n" -msgstr "" -"\n" -"$ svn checkout file:///tmp/repos test\n" -"A test/a\n" -"A test/b\n" -"…\n" -"\n" -"$ mv repos newlocation\n" -"$ cd test/\n" -"\n" -"$ svn update\n" -"svn: Unable to open an ra_local session to URL\n" -"svn: Unable to open repository 'file:///tmp/repos'\n" -"\n" -"$ svn switch --relocate file:///tmp/repos file:///tmp/newlocation .\n" -"$ svn update\n" -"At revision 3.\n" - -#. (para) -#: ../source/book.xml:20996 -msgid "Be careful when using the 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 . Here's the rule of thumb:" -msgstr "小心使用选项,如果你输入了错误的选项,你会在工作拷贝创建无意义的URL,会导致整个工作区不可用并且难于修复。理解何时应该使用也是非常重要的,下面是一些规则:" - -#. (para) -#: ../source/book.xml:21006 -#, fuzzy -msgid "If the working copy needs to reflect a new directory within the repository, then use just svn switch." -msgstr "如果工作拷贝需要反映一个版本库的新目录,只需要使用svn switch。" - -#. (para) -#: ../source/book.xml:21012 -#, fuzzy -msgid "If the working copy still reflects the same repository directory, but the location of the repository itself has changed, then use svn switch --relocate." -msgstr "如果你的工作拷贝还是反映相同的版本库目录,但是版本库本身的位置改变了,使用svn switch --relocate。" - -#. (tertiary) -#: ../source/book.xml:21025 -msgid "unlock" -msgstr "unlock" - -#. (refname) -#: ../source/book.xml:21028 -msgid "svn unlock" -msgstr "svn unlock" - -#. (refpurpose) -#: ../source/book.xml:21029 -msgid "Unlock working copy paths or URLs." -msgstr "解锁工作拷贝路径或URL。" - -#. (programlisting) -#: ../source/book.xml:21035 -#, no-wrap -msgid "svn unlock TARGET..." -msgstr "svn unlock TARGET..." - -#. (para) -#: ../source/book.xml:21041 -msgid "Unlock each TARGET. If any TARGET 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 TARGETs. Use to break a lock belonging to another user or working copy." -msgstr "解锁每个TARGET。如果任何另一个用户锁定了TARGET,或者没有正确工作拷贝的锁定令牌,打印警告并继续解锁余下的TARGET。使用可以打破其它用户或工作拷贝的锁定。" - -#. (screen) -#: ../source/book.xml:21071 -#, no-wrap -msgid "" -"\n" -"--targets FILENAME\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--force\n" -msgstr "" -"\n" -"--targets FILENAME\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--force\n" - -#. (para) -#: ../source/book.xml:21085 -msgid "Unlock two files in your working copy:" -msgstr "解锁工作拷贝中的两个文件:" - -#. (screen) -#: ../source/book.xml:21086 -#, no-wrap -msgid "" -"\n" -"\n" -"$ svn unlock tree.jpg house.jpg\n" -"'tree.jpg' unlocked.\n" -"'house.jpg' unlocked.\n" -msgstr "" -"\n" -"\n" -"$ svn unlock tree.jpg house.jpg\n" -"'tree.jpg' unlocked.\n" -"'house.jpg' unlocked.\n" - -#. (para) -#: ../source/book.xml:21092 -msgid "Unlock a file in your working copy that is currently locked by another user:" -msgstr "解锁工作拷贝的一个被其他用户锁定的文件:" - -#. (screen) -#: ../source/book.xml:21094 -#, no-wrap -msgid "" -"\n" -"$ svn unlock tree.jpg\n" -"svn: 'tree.jpg' is not locked in this working copy\n" -"$ svn unlock --force tree.jpg\n" -"'tree.jpg' unlocked.\n" -msgstr "" -"\n" -"$ svn unlock tree.jpg\n" -"svn: 'tree.jpg' is not locked in this working copy\n" -"$ svn unlock --force tree.jpg\n" -"'tree.jpg' unlocked.\n" - -#. (para) -#: ../source/book.xml:21100 -msgid "Unlock a file without a working copy:" -msgstr "没有工作拷贝时解锁一个文件:" - -#. (screen) -#: ../source/book.xml:21101 -#, no-wrap -msgid "" -"\n" -"$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg\n" -"'tree.jpg unlocked.\n" -msgstr "" -"\n" -"$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg\n" -"'tree.jpg unlocked.\n" - -#. (tertiary) -#: ../source/book.xml:21112 -msgid "update" -msgstr "update" - -#. (refpurpose) -#: ../source/book.xml:21116 -msgid "Update your working copy." -msgstr "更新你的工作拷贝。" - -#. (programlisting) -#: ../source/book.xml:21122 -#, no-wrap -msgid "svn update [PATH...]" -msgstr "svn update [PATH...]" - -#. (para) -#: ../source/book.xml:21128 -#, fuzzy -msgid "svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up-to-date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the option. As part of the synchronization, svn update also removes any stale locks (see ) found in the working copy." -msgstr "svn update会把版本库的修改带到工作拷贝,如果没有给定修订版本,它会把你的工作拷贝更新到HEAD修订版本,否则,它会把工作拷贝更新到你用指定的修订版本。为了保持同步,svn update也会删除所有在工作拷贝发现的无效锁定(见)。" - -#. (para) -#: ../source/book.xml:21137 -#, fuzzy -msgid "For each updated item, it prints a line that starts with a character reporting the action taken. These characters have the following meaning:" -msgstr "对于每一个更新的项目开头都有一个表示所做动作的字符,这些字符有下面的意思:" - -#. (term) -#: ../source/book.xml:21142 -msgid "A" -msgstr "A" - -#. (para) -#: ../source/book.xml:21144 -msgid "Added" -msgstr "添加" - -#. (term) -#: ../source/book.xml:21148 -msgid "D" -msgstr "D" - -#. (para) -#: ../source/book.xml:21150 -msgid "Deleted" -msgstr "删除" - -#. (term) -#: ../source/book.xml:21154 -msgid "U" -msgstr "U" - -#. (para) -#: ../source/book.xml:21156 -msgid "Updated" -msgstr "更新" - -#. (term) -#: ../source/book.xml:21160 -msgid "C" -msgstr "C" - -#. (para) -#: ../source/book.xml:21162 -#, fuzzy -msgid "Conflicted" -msgstr "冲突" - -#. (term) -#: ../source/book.xml:21166 -msgid "G" -msgstr "G" - -#. (para) -#: ../source/book.xml:21168 -msgid "Merged" -msgstr "合并" - -#. (para) -#: ../source/book.xml:21172 -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." -msgstr "第一列的字符反映文件本身的更新,而第二列会反映文件属性的更新。" - -#. (para) -#: ../source/book.xml:21180 -msgid "up" -msgstr "up" - -#. (screen) -#: ../source/book.xml:21198 -#, fuzzy, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--no-ignore\n" -"--incremental\n" -"--diff3-cmd CMD\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--ignore-externals\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--non-recursive (-N)\n" -"--quiet (-q)\n" -"--diff3-cmd CMD\n" -"--username USER\n" -"--password PASS\n" -"--no-auth-cache\n" -"--non-interactive\n" -"--config-dir DIR\n" -"--ignore-externals\n" - -#. (para) -#: ../source/book.xml:21217 -msgid "Pick up repository changes that have happened since your last update:" -msgstr "获取你上次更新之后版本库的修改:" - -#. (screen) -#: ../source/book.xml:21219 -#, no-wrap -msgid "" -"\n" -"$ svn update\n" -"A newdir/toggle.c\n" -"A newdir/disclose.c\n" -"A newdir/launch.c\n" -"D newdir/README\n" -"Updated to revision 32.\n" -msgstr "" -"\n" -"$ svn update\n" -"A newdir/toggle.c\n" -"A newdir/disclose.c\n" -"A newdir/launch.c\n" -"D newdir/README\n" -"Updated to revision 32.\n" - -#. (para) -#: ../source/book.xml:21227 -#, fuzzy -msgid "You can also update your working copy to an older revision (Subversion doesn't have the concept of sticky files like CVS does; see ):" -msgstr "你也可以将工作拷贝更新到旧的修订版本(Subversion没有CVS的sticky文件的概念;见):" - -#. (screen) -#: ../source/book.xml:21230 -#, no-wrap -msgid "" -"\n" -"$ svn update -r30\n" -"A newdir/README\n" -"D newdir/toggle.c\n" -"D newdir/disclose.c\n" -"D newdir/launch.c\n" -"U foo.c\n" -"Updated to revision 30.\n" -msgstr "" -"\n" -"$ svn update -r30\n" -"A newdir/README\n" -"D newdir/toggle.c\n" -"D newdir/disclose.c\n" -"D newdir/launch.c\n" -"U foo.c\n" -"Updated to revision 30.\n" - -#. (para) -#: ../source/book.xml:21240 -#, fuzzy -msgid "If you want to examine an older revision of a single file, you may want to use svn cat instead—it won't change your working copy." -msgstr "如果你希望检查单个文件的旧的修订版本,你会希望使用svn cat。" - -#. (para) -#: ../source/book.xml:21257 -#, fuzzy -msgid "svnadmin is the administrative tool for monitoring and repairing your Subversion repository. For detailed information, see ." -msgstr "svnadmin是一个用来监控和修改Subversion版本库的管理工具,详情请见。" - -#. (para) -#: ../source/book.xml:21260 -#, fuzzy -msgid "Since svnadmin 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." -msgstr "因为svnadmin直接访问版本库(因此只可以在存放版本库的机器上使用),它通过路径访问版本库,而不是URL。" - -#. (title) -#: ../source/book.xml:21266 -#, fuzzy -msgid "svnadmin Options" -msgstr "svnadmin 选项" - -#. (option) -#: ../source/book.xml:21271 -msgid "--bdb-log-keep" -msgstr "--bdb-log-keep" - -#. (para) -#: ../source/book.xml:21274 -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." -msgstr "(Berkeley DB特定)关闭数据库日志文件的自动删除,保留这些文件可以帮助你在灾难性版本库故障时更加便利。" - -#. (option) -#: ../source/book.xml:21282 -msgid "--bdb-txn-nosync" -msgstr "--bdb-txn-nosync" - -#. (para) -#: ../source/book.xml:21285 -msgid "(Berkeley DB specific) Disables fsync when committing database transactions. Used with the svnadmin create command to create a Berkeley DB backed repository with DB_TXN_NOSYNC enabled (which improves speed but has some risks associated with it)." -msgstr "(Berkeley DB特定)在提交数据库事务时关闭fsync。可以在svnadmin create命令创建Berkeley DB后端时开启DB_TXN_NOSYNC(可以改进速度,但是有相关的风险)。" - -#. (option) -#: ../source/book.xml:21295 -msgid "--bypass-hooks" -msgstr "--bypass-hooks" - -#. (para) -#: ../source/book.xml:21298 -msgid "Bypass the repository hook system." -msgstr "绕过版本库钩子系统。" - -#. (option) -#: ../source/book.xml:21303 -msgid "--clean-logs" -msgstr "--clean-logs" - -#. (para) -#: ../source/book.xml:21306 -msgid "Removes unused Berkeley DB logs." -msgstr "删除不使用的Berkeley DB日志。" - -#. (option) -#: ../source/book.xml:21312 -msgid "--force-uuid" -msgstr "--force-uuid" - -#. (para) -#: ../source/book.xml:21315 -#, fuzzy -msgid "By default, when loading data into repository that already contains revisions, svnadmin will ignore the UUID from the dump stream. This option will cause the repository's UUID to be set to the UUID from the stream." -msgstr "缺省情况下,当版本库加载已经包含修订版本的数据时svnadmin会忽略流中的UUID,这个选项会导致版本库的UUID设置为流的UUID。" - -#. (option) -#: ../source/book.xml:21325 -msgid "--ignore-uuid" -msgstr "--ignore-uuid" - -#. (para) -#: ../source/book.xml:21328 -#, fuzzy -msgid "By default, when loading an empty repository, svnadmin will ignore the UUID from the dump stream. This option will force that UUID to be ignored (useful for overriding your configuration file if it has set)." -msgstr "缺省情况下,当加载空版本库时,svnadmin会使用来自流中的UUID,这个选项会导致忽略UUID。" - -#. (para) -#: ../source/book.xml:21341 -msgid "Dump a revision only as a diff against the previous revision, instead of the usual fulltext." -msgstr "导出一个修订版本针对前一个修订版本的区别,而不是通常的完全结果。" - -#. (option) -#: ../source/book.xml:21348 -msgid "--parent-dir " -msgstr "--parent-dir " - -#. (para) -#: ../source/book.xml:21352 -#, fuzzy -msgid "When loading a dump file, root paths at DIR instead of /." -msgstr "当加载一个转储文件时,根路径为DIR而不是/。" - -#. (term) -#: ../source/book.xml:21358 -msgid " () ARG" -msgstr " () ARG" - -#. (para) -#: ../source/book.xml:21361 -msgid "Specify a particular revision to operate on." -msgstr "指定一个操作的修订版本。" - -#. (option) -#: ../source/book.xml:21367 -msgid "--quiet" -msgstr "--quiet" - -#. (para) -#: ../source/book.xml:21370 -msgid "Do not show normal progress—show only errors." -msgstr "不显示通常的过程—只显示错误。" - -#. (option) -#: ../source/book.xml:21376 -msgid "--use-post-commit-hook" -msgstr "--use-post-commit-hook" - -#. (para) -#: ../source/book.xml:21379 -msgid "When loading a dump file, run the repository's post-commit hook after finalizing each newly loaded revision." -msgstr "当导入使用一个转储文件时,在每次新的修订版本产生时运行版本库post-commit钩子。" - -#. (option) -#: ../source/book.xml:21386 -msgid "--use-pre-commit-hook" -msgstr "--use-pre-commit-hook" - -#. (para) -#: ../source/book.xml:21389 -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." -msgstr "当加载一个转储文件时,每次新加修订版本之前运行版本库的pre-commit钩子。如果钩子失败,终止提交并中断加载进程。" - -#. (title) -#: ../source/book.xml:21400 -#, fuzzy -msgid "svnadmin Subcommands" -msgstr "svnadmin 子命令" - -#. (tertiary) -#: ../source/book.xml:21406 -msgid "create" -msgstr "create" - -#. (refname) -#: ../source/book.xml:21409 -msgid "svnadmin create" -msgstr "svnadmin create" - -#. (refpurpose) -#: ../source/book.xml:21410 -msgid "Create a new, empty repository." -msgstr "创建一个新的空的版本库。" - -#. (programlisting) -#: ../source/book.xml:21416 -#, no-wrap -msgid "svnadmin create REPOS_PATH" -msgstr "svnadmin create REPOS_PATH" - -#. (para) -#: ../source/book.xml:21424 -#, fuzzy -msgid "Remember, svnadmin works only with local paths, not URLs." -msgstr "记住svnadmin只工作在本地路径,而不是URL。" - -#. (para) -#: ../source/book.xml:21422 -#, fuzzy -msgid "Create a new, empty repository at the path provided. If the provided directory does not exist, it will be created for you. As of Subversion 1.2, svnadmin creates new repositories with the fsfs filesystem backend by default." -msgstr "在提供的路径上创建一个新的空的版本库,如果提供的目录不存在,它会为你创建。对于Subversion 1.2,svnadmin缺省使用fsfs文件系统后端创建版本库。" - -#. (para) -#: ../source/book.xml:21431 -msgid "While svnadmin create will create the base directory for a new repository, it will not create intermediate directories. For example, if you have an empty directory named /var/svn, creating /var/svn/repos will work, while attempting to create /var/svn/subdirectory/repos will fail with an error." -msgstr "" - -#. (screen) -#: ../source/book.xml:21445 -#, no-wrap -msgid "" -"\n" -"--bdb-txn-nosync\n" -"--bdb-log-keep\n" -"--config-dir DIR\n" -"--fs-type TYPE\n" -msgstr "" -"\n" -"--bdb-txn-nosync\n" -"--bdb-log-keep\n" -"--config-dir DIR\n" -"--fs-type TYPE\n" - -#. (para) -#: ../source/book.xml:21456 -msgid "Creating a new repository is just this easy:" -msgstr "创建一个版本库就是这样简单:" - -#. (para) -#: ../source/book.xml:21460 -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:" -msgstr "在Subversion 1.0,一定会创建一个Berkeley DB版本库,在Subversion 1.1,Berkeley DB版本库是缺省类型,但是一个FSFS版本库也是可以创建,使用选项:" - -#. (screen) -#: ../source/book.xml:21465 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin create /var/svn/repos --fs-type fsfs\n" -msgstr "" -"\n" -"$ svnadmin create /usr/local/svn/repos --fs-type fsfs\n" - -#. (tertiary) -#: ../source/book.xml:21474 -msgid "deltify" -msgstr "deltify" - -#. (refname) -#: ../source/book.xml:21477 -msgid "svnadmin deltify" -msgstr "svnadmin deltify" - -#. (refpurpose) -#: ../source/book.xml:21478 -msgid "Deltify changed paths in a revision range." -msgstr "修订版本范围的路径的增量变化。" - -#. (programlisting) -#: ../source/book.xml:21484 -#, no-wrap -msgid "svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH" -msgstr "svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH" - -#. (para) -#: ../source/book.xml:21490 -#, fuzzy -msgid "svnadmin deltify exists in current versions of Subversion only for historical reasons. This command is deprecated and no longer needed." -msgstr "svnadmin deltify因为历史原因只存在于1.0.x,这个命令已经废弃,不再需要。" - -#. (para) -#: ../source/book.xml:21493 -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 very little gain, and this feature was deprecated." -msgstr "它开始于当Subversion提供了管理员控制版本库压缩策略的能力,结果是复杂工作得到了非常小的收益,所以这个特性被废弃了。" - -#. (screen) -#: ../source/book.xml:21503 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--quiet (-q)\n" - -#. (tertiary) -#: ../source/book.xml:21513 -msgid "dump" -msgstr "dump" - -#. (refname) -#: ../source/book.xml:21516 -msgid "svnadmin dump" -msgstr "svnadmin dump" - -#. (refpurpose) -#: ../source/book.xml:21517 -msgid "Dump the contents of filesystem to stdout." -msgstr "将文件系统的内容转储到标准输出。" - -#. (programlisting) -#: ../source/book.xml:21523 -#, no-wrap -msgid "svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental]" -msgstr "svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental]" - -#. (para) -#: ../source/book.xml:21529 -msgid "Dump the contents of filesystem to stdout in a dumpfile portable format, sending feedback to stderr. Dump revisions LOWER rev through UPPER rev. If no revisions are given, dump all revision trees. If only LOWER is given, dump that one revision tree. See for a practical use." -msgstr "使用dumpfile可移植格式将文件系统的内容转储到标准输出,将反馈发送到标准错误,导出的修订版本从LOWERUPPER。如果没有提供修订版本,会导出所有的修订版本树,如果只提供LOWER,导出一个修订版本树,通常的用法见。" - -#. (para) -#: ../source/book.xml:21538 -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." -msgstr "缺省情况下,Subversion的转储流包含了一个包括所有文件和目录的单独修订版本(请求的修订版本范围的第一个),后面是其它的只包含本修订所修改的文件和目录的修订版本(请求范围的其它版本)。对于修改的文件,转储文件包括所有的内容和属性,对于目录,包括所有的属性。" - -#. (para) -#: ../source/book.xml:21549 -#, fuzzy -msgid "There are two useful options which modify the dumpfile generator's behavior. The first is the 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." -msgstr "有一对有用的选项可以改变转储文件产生的方式,第一个是,使得第一个修订版本只显示其修改的文件和目录,而不是整个目录树,就像转储文件中其它的修订版本。这对产生一个准备导入到已经有数据的版本库时非常有用。" - -#. (para) -#: ../source/book.xml:21560 -#, fuzzy -msgid "The second useful option is . This option causes svnadmin dump 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 svnadmin dump creates. There are, however, disadvantages to using this option—deltified dumpfiles are more CPU intensive to create, cannot be operated on by svndumpfilter, and tend not to compress as well as their non-deltified counterparts when using third-party tools like gzip and bzip2." -msgstr "第二个有用的选项是,这个选项导致svnadmin dump不会保留修改文件的所有内容,而只是记录修改的部分。这样减少(有些情况下是非常大的)了svnadmin dump产生的转储文件的大小。然而,也有缺点—增量转储文件需要更多的CPU来创建,也不可以用svndumpfilter操作,也不如非增量文件容易被如gzipbzip2等第三方工具压缩。" - -#. (screen) -#: ../source/book.xml:21578 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--incremental\n" -"--quiet (-q)\n" -"--deltas\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--incremental\n" -"--quiet (-q)\n" -"--deltas\n" - -#. (para) -#: ../source/book.xml:21589 -msgid "Dump your whole repository:" -msgstr "转储整个版本库:" - -#. (screen) -#: ../source/book.xml:21590 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin dump /var/svn/repos\n" -"SVN-fs-dump-format-version: 1\n" -"Revision-number: 0\n" -"* Dumped revision 0.\n" -"Prop-content-length: 56\n" -"Content-length: 56\n" -"…\n" -msgstr "" -"\n" -"$ svnadmin dump /usr/local/svn/repos\n" -"SVN-fs-dump-format-version: 1\n" -"Revision-number: 0\n" -"* Dumped revision 0.\n" -"Prop-content-length: 56\n" -"Content-length: 56\n" -"…\n" - -#. (para) -#: ../source/book.xml:21599 -msgid "Incrementally dump a single transaction from your repository:" -msgstr "从版本库增量转储一个单独的事务:" - -#. (screen) -#: ../source/book.xml:21601 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin dump /var/svn/repos -r 21 --incremental \n" -"* Dumped revision 21.\n" -"SVN-fs-dump-format-version: 1\n" -"Revision-number: 21\n" -"Prop-content-length: 101\n" -"Content-length: 101\n" -"…\n" -msgstr "" -"\n" -"$ svnadmin dump /usr/local/svn/repos -r 21 --incremental \n" -"* Dumped revision 21.\n" -"SVN-fs-dump-format-version: 1\n" -"Revision-number: 21\n" -"Prop-content-length: 101\n" -"Content-length: 101\n" -"…\n" - -#. (refname) -#: ../source/book.xml:21619 -msgid "svnadmin help" -msgstr "svnadmin help" - -#. (programlisting) -#: ../source/book.xml:21626 -#, no-wrap -msgid "svnadmin help [SUBCOMMAND...]" -msgstr "svnadmin help [SUBCOMMAND...]" - -#. (para) -#: ../source/book.xml:21632 -msgid "This subcommand is useful when you're trapped on a desert island with neither a net connection nor a copy of this book." -msgstr "当你困于一个没有网络连接和本书的沙漠岛屿时,这个子命令非常有用。" - -#. (tertiary) -#: ../source/book.xml:21649 -msgid "hotcopy" -msgstr "hotcopy" - -#. (refname) -#: ../source/book.xml:21652 -msgid "svnadmin hotcopy" -msgstr "svnadmin hotcopy" - -#. (refpurpose) -#: ../source/book.xml:21653 -msgid "Make a hot copy of a repository." -msgstr "制作一个版本库的热备份。" - -#. (programlisting) -#: ../source/book.xml:21659 -#, no-wrap -msgid "svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH" -msgstr "svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH" - -#. (para) -#: ../source/book.xml:21665 -#, fuzzy -msgid "This subcommand makes a full hot backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the option, svnadmin 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." -msgstr "这个子命令会制作一个版本库的完全拷贝,包括所有的钩子,配置文件,当然还有数据库文件。如果你传递选项,svnadmin会执行热拷贝操作,然后删除不用的Berkeley DB日志文件。你可以在任何时候运行这个命令得到一个版本库的安全拷贝,不管其它进程是否使用这个版本库。" - -#. (screen) -#: ../source/book.xml:21679 -#, no-wrap -msgid "" -"\n" -"--clean-logs\n" -msgstr "" -"\n" -"--clean-logs\n" - -#. (para) -#: ../source/book.xml:21683 -msgid "As described in , hot-copied Berkeley DB repositories are not portable across operating systems, nor will they work on machines with a different endianness than the machine where they were created." -msgstr "就像描述的,热拷贝的Berkeley DB版本库不能跨操作系统移植,也不能在不同字节续的主机上工作。" - -#. (tertiary) -#: ../source/book.xml:21695 -msgid "list-dblogs" -msgstr "list-dblogs" - -#. (refname) -#: ../source/book.xml:21698 -msgid "svnadmin list-dblogs" -msgstr "svnadmin list-dblogs" - -#. (literal) -#: ../source/book.xml:21702 ../source/book.xml:21733 ../source/book.xml:21926 -msgid "bdb" -msgstr "bdb" - -#. (refpurpose) -#: ../source/book.xml:21699 -msgid "Ask Berkeley DB which log files exist for a given Subversion repository (applies only to repositories using the backend)." -msgstr "询问Berkeley DB在给定的Subversion版本库有哪些日志文件存在(只有在版本库使用作为后端时使用)。" - -#. (programlisting) -#: ../source/book.xml:21708 -#, no-wrap -msgid "svnadmin list-dblogs REPOS_PATH" -msgstr "svnadmin list-dblogs REPOS_PATH" - -#. (para) -#: ../source/book.xml:21714 ../source/book.xml:21745 -#, fuzzy -msgid "Berkeley DB creates logs of all changes to the repository, which allow it to recover in the face of catastrophe. Unless you enable DB_LOG_AUTOREMOVE, the log files accumulate, although most are no longer used and can be deleted to reclaim disk space. See for more information." -msgstr "Berkeley DB创建了记录所有版本库修改的日志,允许我们在面对大灾难时恢复。除非你开启了DB_LOG_AUTOREMOVE,否则日志文件会累积,尽管大多数是不再使用可以从磁盘删除得到空间。详情见。" - -#. (tertiary) -#: ../source/book.xml:21727 -msgid "list-unused-dblogs" -msgstr "list-unused-dblogs" - -#. (refname) -#: ../source/book.xml:21730 -msgid "svnadmin list-unused-dblogs" -msgstr "svnadmin list-unused-dblogs" - -#. (refpurpose) -#: ../source/book.xml:21731 -msgid "Ask Berkeley DB which log files can be safely deleted (applies only to repositories using the backend)." -msgstr "询问Berkeley DB哪些日志文件可以安全的删除(只有在版本库使用作为后端时使用)。" - -#. (programlisting) -#: ../source/book.xml:21739 -#, no-wrap -msgid "svnadmin list-unused-dblogs REPOS_PATH" -msgstr "svnadmin list-unused-dblogs REPOS_PATH" - -#. (para) -#: ../source/book.xml:21757 -msgid "Remove all unused log files from a repository:" -msgstr "Berkeley DB创建了记录所有版本库修改的日志,允许我们在面对大灾难时恢复。除非你开启了DB_LOG_AUTOREMOVE,否则日志文件会累积,尽管大多数是不再使用,可以从磁盘删除得到空间。详情见。" - -#. (screen) -#: ../source/book.xml:21758 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin list-unused-dblogs /var/svn/repos\n" -"/var/svn/repos/log.0000000031\n" -"/var/svn/repos/log.0000000032\n" -"/var/svn/repos/log.0000000033\n" -"\n" -"$ svnadmin list-unused-dblogs /var/svn/repos | xargs rm\n" -"## disk space reclaimed!\n" -msgstr "" -"\n" -"$ svnadmin list-unused-dblogs /path/to/repos\n" -"/path/to/repos/log.0000000031\n" -"/path/to/repos/log.0000000032\n" -"/path/to/repos/log.0000000033\n" -"\n" -"$ svnadmin list-unused-dblogs /path/to/repos | xargs rm\n" -"## disk space reclaimed!\n" - -#. (tertiary) -#: ../source/book.xml:21773 -msgid "load" -msgstr "load" - -#. (refname) -#: ../source/book.xml:21776 -msgid "svnadmin load" -msgstr "svnadmin load" - -#. (quote) -#: ../source/book.xml:21778 -msgid "dumpfile" -msgstr "svnadmin load" - -#. (refpurpose) -#: ../source/book.xml:21777 -msgid "Read a -formatted stream from stdin." -msgstr "从标准输入读进一个格式化的流。" - -#. (programlisting) -#: ../source/book.xml:21785 -#, no-wrap -msgid "svnadmin load REPOS_PATH" -msgstr "svnadmin load REPOS_PATH" - -#. (para) -#: ../source/book.xml:21791 -msgid "Read a dumpfile-formatted stream from stdin, committing new revisions into the repository's filesystem. Send progress feedback to stdout." -msgstr "从标准输入读取格式化流dumpfile,提交新修订版本到版本库的文件系统,在标准输出返回进度。" - -#. (screen) -#: ../source/book.xml:21799 -#, no-wrap -msgid "" -"\n" -"--quiet (-q)\n" -"--ignore-uuid\n" -"--force-uuid\n" -"--use-pre-commit-hook\n" -"--use-post-commit-hook\n" -"--parent-dir\n" -msgstr "" -"\n" -"--quiet (-q)\n" -"--ignore-uuid\n" -"--force-uuid\n" -"--use-pre-commit-hook\n" -"--use-post-commit-hook\n" -"--parent-dir\n" - -#. (title) -#: ../source/book.xml:21810 ../source/book.xml:21862 ../source/book.xml:22024 -msgid "Example" -msgstr "例子" - -#. (para) -#: ../source/book.xml:21812 -#, fuzzy -msgid "This shows the beginning of loading a repository from a backup file (made, of course, with svnadmin dump):" -msgstr "这里显示了加载一个备份文件到版本库(当然,使用svnadmin dump):" - -#. (screen) -#: ../source/book.xml:21815 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin load /var/svn/restored < repos-backup\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : test ... done.\n" -" * adding path : test/a ... done.\n" -"…\n" -msgstr "" -"\n" -"$ svnadmin load /usr/local/svn/restored < repos-backup\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : test ... done.\n" -" * adding path : test/a ... done.\n" -"…\n" - -#. (para) -#: ../source/book.xml:21822 -msgid "Or if you want to load into a subdirectory:" -msgstr "或者你希望加载到一个子目录:" - -#. (screen) -#: ../source/book.xml:21823 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin load --parent-dir new/subdir/for/project /var/svn/restored < repos-backup\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : test ... done.\n" -" * adding path : test/a ... done.\n" -"…\n" -msgstr "" -"\n" -"$ svnadmin load --parent-dir new/subdir/for/project /usr/local/svn/restored < repos-backup\n" -"<<< Started new txn, based on original revision 1\n" -" * adding path : test ... done.\n" -" * adding path : test/a ... done.\n" -"…\n" - -#. (tertiary) -#: ../source/book.xml:21836 -msgid "lslocks" -msgstr "lslocks" - -#. (refname) -#: ../source/book.xml:21839 -msgid "svnadmin lslocks" -msgstr "svnadmin lslocks" - -#. (refpurpose) -#: ../source/book.xml:21840 -msgid "Print descriptions of all locks." -msgstr "打印所有锁定的描述。" - -#. (programlisting) -#: ../source/book.xml:21846 -#, no-wrap -msgid "svnadmin lslocks REPOS_PATH" -msgstr "svnadmin lslocks REPOS_PATH" - -#. (para) -#: ../source/book.xml:21852 -msgid "Print descriptions of all locks in a repository." -msgstr "打印版本库所有锁定的描述。" - -#. (para) -#: ../source/book.xml:21864 -#, fuzzy -msgid "This lists the one locked file in the repository at /var/svn/repos:" -msgstr "显示了版本库/svn/repos中一个锁定的文件:" - -#. (screen) -#: ../source/book.xml:21866 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin lslocks /var/svn/repos\n" -"Path: /tree.jpg\n" -"UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n" -"Owner: harry\n" -"Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n" -"Expires: \n" -"Comment (1 line):\n" -"Rework the uppermost branches on the bald cypress in the foreground.\n" -msgstr "" -"\n" -"$ svnadmin lslocks /svn/repos\n" -"Path: /tree.jpg\n" -"UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n" -"Owner: harry\n" -"Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n" -"Expires: \n" -"Comment (1 line):\n" -"Rework the uppermost branches on the bald cypress in the foreground.\n" - -#. (tertiary) -#: ../source/book.xml:21882 -msgid "lstxns" -msgstr "lstxns" - -#. (refname) -#: ../source/book.xml:21885 -msgid "svnadmin lstxns" -msgstr "svnadmin lstxns" - -#. (refpurpose) -#: ../source/book.xml:21886 -msgid "Print the names of all uncommitted transactions." -msgstr "打印所有未提交的事物名称。" - -#. (programlisting) -#: ../source/book.xml:21892 -#, no-wrap -msgid "svnadmin lstxns REPOS_PATH" -msgstr "svnadmin lstxns REPOS_PATH" - -#. (para) -#: ../source/book.xml:21898 -msgid "Print the names of all uncommitted transactions. See for information on how uncommitted transactions are created and what you should do with them." -msgstr "打印所有未提交的事物名称。关于未提交事物是怎样创建和如何使用的信息见。" - -#. (para) -#: ../source/book.xml:21907 -msgid "List all outstanding transactions in a repository." -msgstr "列出版本库所有突出的事物。" - -#. (screen) -#: ../source/book.xml:21909 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin lstxns /var/svn/repos/ \n" -"1w\n" -"1x\n" -msgstr "" -"\n" -"$ svnadmin lstxns /usr/local/svn/repos/ \n" -"1w\n" -"1x\n" - -#. (tertiary) -#: ../source/book.xml:21920 -msgid "recover" -msgstr "recover" - -#. (refname) -#: ../source/book.xml:21923 -msgid "svnadmin recover" -msgstr "svnadmin recover" - -#. (filename) -#: ../source/book.xml:21927 -msgid "repos/conf/passwd" -msgstr "repos/conf/passwd" - -#. (refpurpose) -#: ../source/book.xml:21924 -msgid "Bring a repository database back into a consistent state (applies only to repositories using the backend). In addition, if does not exist, it will create a default password file ." -msgstr "将版本库数据库恢复到稳定状态(只有在版本库使用作为后端时使用),此外,如果不存在,它会创建一个默认的密码文件。" - -#. (programlisting) -#: ../source/book.xml:21934 -#, no-wrap -msgid "svnadmin recover REPOS_PATH" -msgstr "svnadmin recover REPOS_PATH" - -#. (para) -#: ../source/book.xml:21940 -msgid "Run this command if you get an error indicating that your repository needs to be recovered." -msgstr "在你得到的错误说明你需要恢复版本库时运行这个命令。" - -#. (screen) -#: ../source/book.xml:21947 -#, no-wrap -msgid "" -"\n" -"--wait\n" -msgstr "" -"\n" -"--wait\n" - -#. (para) -#: ../source/book.xml:21955 -msgid "Recover a hung repository:" -msgstr "恢复挂起的版本库:" - -#. (screen) -#: ../source/book.xml:21956 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin recover /var/svn/repos/ \n" -"Repository lock acquired.\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 34.\n" -msgstr "" -"\n" -"$ svnadmin recover /usr/local/svn/repos/ \n" -"Repository lock acquired.\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 34.\n" - -#. (para) -#: ../source/book.xml:21964 -#, fuzzy -msgid "Recovering the database requires an exclusive lock on the repository. (This is a database lock; see .) If another process is accessing the repository, then svnadmin recover will error:" -msgstr "恢复数据库需要一个版本库的独占锁(这是一个数据库锁;见),如果另一个进程访问版本库,svnadmin recover会出错:" - -#. (screen) -#: ../source/book.xml:21969 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin recover /var/svn/repos\n" -"svn: Failed to get exclusive repository access; perhaps another process\n" -"such as httpd, svnserve or svn has it open?\n" -"\n" -"$\n" -msgstr "" -"\n" -"$ svnadmin recover /usr/local/svn/repos\n" -"svn: Failed to get exclusive repository access; perhaps another process\n" -"such as httpd, svnserve or svn has it open?\n" -"\n" -"$\n" - -#. (para) -#: ../source/book.xml:21976 -#, fuzzy -msgid "The option, however, will cause svnadmin recover to wait indefinitely for other processes to disconnect:" -msgstr "选项可以导致svnadmin recover一直等待其它进程断开连接:" - -#. (screen) -#: ../source/book.xml:21979 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin recover /var/svn/repos --wait\n" -"Waiting on repository lock; perhaps another process has it open?\n" -"\n" -"### time goes by…\n" -"\n" -"Repository lock acquired.\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 34.\n" -msgstr "" -"\n" -"$ svnadmin recover /usr/local/svn/repos --wait\n" -"Waiting on repository lock; perhaps another process has it open?\n" -"\n" -"### time goes by...\n" -"\n" -"Repository lock acquired.\n" -"Please wait; recovering the repository may take some time...\n" -"\n" -"Recovery completed.\n" -"The latest repos revision is 34.\n" - -#. (tertiary) -#: ../source/book.xml:21997 -msgid "rmlocks" -msgstr "rmlocks" - -#. (refname) -#: ../source/book.xml:22000 -msgid "svnadmin rmlocks" -msgstr "svnadmin rmlocks" - -#. (refpurpose) -#: ../source/book.xml:22001 -msgid "Unconditionally remove one or more locks from a repository." -msgstr "无条件的删除版本库的一个或多个锁定。" - -#. (programlisting) -#: ../source/book.xml:22008 -#, no-wrap -msgid "svnadmin rmlocks REPOS_PATH LOCKED_PATH..." -msgstr "svnadmin rmlocks REPOS_PATH LOCKED_PATH..." - -#. (para) -#: ../source/book.xml:22014 -msgid "Remove lock from each LOCKED_PATH." -msgstr "从LOCKED_PATH删除没个锁定。" - -#. (para) -#: ../source/book.xml:22026 -#, fuzzy -msgid "This deletes the locks on tree.jpg and house.jpg in the repository at /var/svn/repos" -msgstr "这删除了版本库/svn/repostree.jpghouse.jpg文件上的锁定:" - -#. (screen) -#: ../source/book.xml:22030 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin rmlocks /var/svn/repos tree.jpg house.jpg\n" -"Removed lock on '/tree.jpg.\n" -"Removed lock on '/house.jpg.\n" -msgstr "" -"\n" -"$ svnadmin rmlocks /svn/repos tree.jpg house.jpg\n" -"Removed lock on '/tree.jpg.\n" -"Removed lock on '/house.jpg.\n" - -#. (tertiary) -#: ../source/book.xml:22041 -msgid "rmtxns" -msgstr "rmtxns" - -#. (refname) -#: ../source/book.xml:22044 -msgid "svnadmin rmtxns" -msgstr "svnadmin rmtxns" - -#. (refpurpose) -#: ../source/book.xml:22045 -msgid "Delete transactions from a repository." -msgstr "从版本库删除事物。" - -#. (programlisting) -#: ../source/book.xml:22051 -#, no-wrap -msgid "svnadmin rmtxns REPOS_PATH TXN_NAME..." -msgstr "svnadmin rmtxns REPOS_PATH TXN_NAME..." - -#. (para) -#: ../source/book.xml:22057 -msgid "Delete outstanding transactions from a repository. This is covered in detail in ." -msgstr "删除版本库的事物,更多细节在。" - -#. (screen) -#: ../source/book.xml:22064 -#, no-wrap -msgid "" -"\n" -"--quiet (-q)\n" -msgstr "" -"\n" -"--quiet (-q)\n" - -#. (para) -#: ../source/book.xml:22072 -msgid "Remove named transactions:" -msgstr "删除命名的事物:" - -#. (screen) -#: ../source/book.xml:22073 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin rmtxns /var/svn/repos/ 1w 1x\n" -msgstr "" -"\n" -"$ svnadmin rmtxns /usr/local/svn/repos/ 1w 1x\n" - -#. (para) -#: ../source/book.xml:22076 -#, fuzzy -msgid "Fortunately, the output of lstxns works great as the input for rmtxns:" -msgstr "很幸运,lstxns的输出作为rmtxns输入工作良好:" - -#. (screen) -#: ../source/book.xml:22078 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin rmtxns /var/svn/repos/ `svnadmin lstxns /var/svn/repos/`\n" -msgstr "" -"\n" -"$ svnadmin rmtxns /usr/local/svn/repos/ `svnadmin lstxns /usr/local/svn/repos/`\n" - -#. (para) -#: ../source/book.xml:22081 -msgid "Which will remove all uncommitted transactions from your repository." -msgstr "从版本库删除所有未提交的事务。" - -#. (tertiary) -#: ../source/book.xml:22089 -msgid "setlog" -msgstr "setlog" - -#. (refname) -#: ../source/book.xml:22092 -msgid "svnadmin setlog" -msgstr "svnadmin setlog" - -#. (refpurpose) -#: ../source/book.xml:22093 -msgid "Set the log-message on a revision." -msgstr "设置某个修订版本的日志信息。" - -#. (programlisting) -#: ../source/book.xml:22099 -#, no-wrap -msgid "svnadmin setlog REPOS_PATH -r REVISION FILE" -msgstr "svnadmin setlog REPOS_PATH -r REVISION FILE" - -#. (para) -#: ../source/book.xml:22105 -msgid "Set the log-message on revision REVISION to the contents of FILE." -msgstr "设置修订版本REVISION的日志信息为FILE的内容。" - -#. (para) -#: ../source/book.xml:22107 -#, fuzzy -msgid "This is similar to using svn propset --revprop to set the svn:log property on a revision, except that you can also use the 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." -msgstr "这与使用svn propset --revprop设置某一修订版本的svn:log属性效果一样,除了你也可以使用选项绕过的所有pre-或post-commit的钩子脚本,这在pre-revprop-change钩子脚本中禁止修改修订版本属性时非常有用。" - -#. (para) -#: ../source/book.xml:22115 -msgid "Revision properties are not under version control, so this command will permanently overwrite the previous log message." -msgstr "修订版本属性不在版本控制之下的,所以这个命令会永久覆盖前一个日志信息。" - -#. (screen) -#: ../source/book.xml:22124 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--bypass-hooks\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--bypass-hooks\n" - -#. (para) -#: ../source/book.xml:22133 -#, fuzzy -msgid "Set the log message for revision 19 to the contents of the file msg:" -msgstr "设置修订版本19的日志信息为文件msg的内容:" - -#. (screen) -#: ../source/book.xml:22135 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin setlog /var/svn/repos/ -r 19 msg\n" -msgstr "" -"\n" -"$ svnadmin setlog /usr/local/svn/repos/ -r 19 msg\n" - -#. (tertiary) -#: ../source/book.xml:22146 -msgid "verify" -msgstr "verify" - -#. (refname) -#: ../source/book.xml:22149 -msgid "svnadmin verify" -msgstr "svnadmin verify" - -#. (refpurpose) -#: ../source/book.xml:22150 -msgid "Verify the data stored in the repository." -msgstr "验证版本库保存的数据。" - -#. (programlisting) -#: ../source/book.xml:22156 -#, no-wrap -msgid "svnadmin verify REPOS_PATH" -msgstr "svnadmin verify REPOS_PATH" - -#. (para) -#: ../source/book.xml:22162 -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 bitrot. 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?)." -msgstr "如果你希望验证版本库的完整性可以运行这个命令,这样会遍历版本库的所有的修订版本,导出修订版本并丢弃输出—有规律的执行这个命令来防止磁盘失败会是一个好方法,如果这个命令失败了—这是发生问题的第一个征兆—这表明你的版本库至少有一个损坏的修订版本,你必须从备份恢复损坏的修订版本(你需要备份,你没有吗?)。" - -#. (para) -#: ../source/book.xml:22178 -msgid "Verify a hung repository:" -msgstr "检验挂起的版本库:" - -#. (screen) -#: ../source/book.xml:22179 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin verify /var/svn/repos/ \n" -"* Verified revision 1729.\n" -msgstr "" -"\n" -"$ svnadmin verify /usr/local/svn/repos/ \n" -"* Verified revision 1729.\n" - -#. (para) -#: ../source/book.xml:22196 -#, fuzzy -msgid "svnlook 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 peeking. svnlook is typically used by the repository hooks, but a repository administrator might find it useful for diagnostic purposes." -msgstr "svnlook是检验Subversion版本库不同方面的命令行工具,它不会对版本库有任何修改—它只是用来svnlook通常被版本库钩子使用,但是版本库管理也会发现它在诊断目的上也非常有用。" - -#. (para) -#: ../source/book.xml:22203 -#, fuzzy -msgid "Since svnlook 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." -msgstr "因为svnlook通过直接版本库访问(因此只可以在保存版本库的机器上工作)工作,所以他通过版本库的路径访问,而不是URL。" - -#. (para) -#: ../source/book.xml:22206 -#, fuzzy -msgid "If no revision or transaction is specified, svnlook defaults to the youngest (most recent) revision of the repository." -msgstr "如果没有指定修订版本或事物,svnlook缺省的是版本库最年轻的(最新的)修订版本。" - -#. (title) -#: ../source/book.xml:22212 -#, fuzzy -msgid "svnlook Options" -msgstr "svnlook 选项" - -#. (para) -#: ../source/book.xml:22214 -#, fuzzy -msgid "Options in svnlook are global, just like in svn and svnadmin; however, most options only apply to one subcommand since the functionality of svnlook is (intentionally) limited in scope." -msgstr "svnlook的选项是全局的,就像svnsvnadmin;然而,大多数选项只会应用到一个子命令,因为svnlook的功能是(有意的)限制在一定范围的。" - -#. (para) -#: ../source/book.xml:22226 -#, fuzzy -msgid "Prevents svnlook diff 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." -msgstr "防止svnlook打印删除文件的区别,缺省的行为方式是当一个文件在一次事物/修订版本中删除后,得到的结果与保留这个文件的内容变成空相同。" - -#. (option) -#: ../source/book.xml:22235 -msgid "--no-diff-added" -msgstr "--no-diff-added" - -#. (para) -#: ../source/book.xml:22238 -#, fuzzy -msgid "Prevents svnlook diff 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." -msgstr "防止Subversion打印添加文件的区别。缺省的行为方式是,当添加一个文件时,svn diff打印的信息和比较一个空白文件相同。" - -#. (term) -#: ../source/book.xml:22246 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:22249 -msgid "Specify a particular revision number that you wish to examine." -msgstr "指定要进行检查的特定修订版本。" - -#. (term) -#: ../source/book.xml:22266 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:22269 -msgid "Specify a particular transaction ID that you wish to examine." -msgstr "指定一个希望检查的特定事物ID。" - -#. (option) -#: ../source/book.xml:22275 -msgid "--show-ids" -msgstr "--show-ids" - -#. (para) -#: ../source/book.xml:22278 -msgid "Show the filesystem node revision IDs for each path in the filesystem tree." -msgstr "显示文件系统树中每条路径的文件系统节点修订版本ID。" - -#. (title) -#: ../source/book.xml:22287 -#, fuzzy -msgid "svnlook Subcommands" -msgstr "svnlook 子命令" - -#. (tertiary) -#: ../source/book.xml:22293 -msgid "author" -msgstr "author" - -#. (refname) -#: ../source/book.xml:22296 -msgid "svnlook author" -msgstr "svnlook author" - -#. (refpurpose) -#: ../source/book.xml:22297 -msgid "Print the author." -msgstr "打印作者。" - -#. (programlisting) -#: ../source/book.xml:22303 -#, no-wrap -msgid "svnlook author REPOS_PATH" -msgstr "svnlook author REPOS_PATH" - -#. (para) -#: ../source/book.xml:22309 -msgid "Print the author of a revision or transaction in the repository." -msgstr "打印版本库一个修订版本或者事物的作者。" - -#. (screen) -#: ../source/book.xml:22316 ../source/book.xml:22359 ../source/book.xml:22452 -#: ../source/book.xml:22505 ../source/book.xml:22619 ../source/book.xml:22759 -#: ../source/book.xml:22855 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" - -#. (para) -#: ../source/book.xml:22325 -#, fuzzy -msgid "svnlook author is handy, but not very exciting:" -msgstr "svnlook author垂手可得,但是并不令人激动:" - -#. (screen) -#: ../source/book.xml:22327 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook author -r 40 /var/svn/repos \n" -"sally\n" -msgstr "" -"\n" -"$ svnlook author -r 40 /usr/local/svn/repos \n" -"sally\n" - -#. (refname) -#: ../source/book.xml:22340 -msgid "svnlook cat" -msgstr "svnlook cat" - -#. (refpurpose), (para) -#: ../source/book.xml:22341 ../source/book.xml:22353 -msgid "Print the contents of a file." -msgstr "打印一个文件的内容。" - -#. (programlisting) -#: ../source/book.xml:22347 -#, no-wrap -msgid "svnlook cat REPOS_PATH PATH_IN_REPOS" -msgstr "svnlook cat REPOS_PATH PATH_IN_REPOS" - -#. (para) -#: ../source/book.xml:22368 -#, fuzzy -msgid "This shows the contents of a file in transaction ax8, located at /trunk/README:" -msgstr "这会显示事物ax8中一个文件的内容,位于/trunk/README:" - -#. (screen) -#: ../source/book.xml:22371 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook cat -t ax8 /var/svn/repos /trunk/README\n" -"\n" -" Subversion, a version control system.\n" -" =====================================\n" -"\n" -"$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $\n" -"\n" -"Contents:\n" -"\n" -" I. A FEW POINTERS\n" -" II. DOCUMENTATION\n" -" III. PARTICIPATING IN THE SUBVERSION COMMUNITY\n" -"…\n" -msgstr "" -"\n" -"$ svnlook cat -t ax8 /usr/local/svn/repos /trunk/README\n" -"\n" -" Subversion, a version control system.\n" -" =====================================\n" -"\n" -"$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $\n" -"\n" -"Contents:\n" -"\n" -" I. A FEW POINTERS\n" -" II. DOCUMENTATION\n" -" III. PARTICIPATING IN THE SUBVERSION COMMUNITY\n" -"…\n" - -#. (tertiary) -#: ../source/book.xml:22392 -msgid "changed" -msgstr "changed" - -#. (refname) -#: ../source/book.xml:22395 -msgid "svnlook changed" -msgstr "svnlook changed" - -#. (refpurpose) -#: ../source/book.xml:22396 -msgid "Print the paths that were changed." -msgstr "打印修改的路径。" - -#. (programlisting) -#: ../source/book.xml:22402 -#, no-wrap -msgid "svnlook changed REPOS_PATH" -msgstr "svnlook changed REPOS_PATH" - -#. (para) -#: ../source/book.xml:22408 -msgid "Print the paths that were changed in a particular revision or transaction, as well as svn update-style status letters in the first two columns:" -msgstr "打印在特定修订版本或事物修改的路径,也是在前两列使用svn update样式的状态字符:" - -#. (term) -#: ../source/book.xml:22414 -#, fuzzy -msgid "'A '" -msgstr "'A '" - -#. (para) -#: ../source/book.xml:22416 -msgid "Item added to repository." -msgstr "条目添加到版本库。" - -#. (term) -#: ../source/book.xml:22420 -#, fuzzy -msgid "'D '" -msgstr "'D '" - -#. (para) -#: ../source/book.xml:22422 -msgid "Item deleted from repository." -msgstr "条目从版本库删除。" - -#. (term) -#: ../source/book.xml:22426 -#, fuzzy -msgid "'U '" -msgstr "'U '" - -#. (para) -#: ../source/book.xml:22428 -msgid "File contents changed." -msgstr "文件内容改变了。" - -#. (term) -#: ../source/book.xml:22432 -#, fuzzy -msgid "' U'" -msgstr "'A '" - -#. (para) -#: ../source/book.xml:22434 -#, fuzzy -msgid "Properties of item changed. Note the leading space." -msgstr "条目属性改变了。" - -#. (term) -#: ../source/book.xml:22438 -#, fuzzy -msgid "'UU'" -msgstr "'UU'" - -#. (para) -#: ../source/book.xml:22440 -msgid "File contents and properties changed." -msgstr "文件内容和属性修改了。" - -#. (para) -#: ../source/book.xml:22444 -#, fuzzy -msgid "Files and directories can be distinguished, as directory paths are displayed with a trailing '/' character." -msgstr "文件和目录可以区分,目录路径后面会显示字符'/'。" - -#. (para) -#: ../source/book.xml:22461 -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 /:" -msgstr "这里显示了在测试版本库中修订版本39改变的文件和目录,注意修改的第一个项目是一个目录,证据就是结尾的/:" - -#. (screen) -#: ../source/book.xml:22465 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook changed -r 39 /var/svn/repos\n" -"A trunk/vendors/deli/\n" -"A trunk/vendors/deli/chips.txt\n" -"A trunk/vendors/deli/sandwich.txt\n" -"A trunk/vendors/deli/pickle.txt\n" -"U trunk/vendors/baker/bagel.txt\n" -" U trunk/vendors/baker/croissant.txt\n" -"UU trunk/vendors/baker/pretzel.txt\n" -"D trunk/vendors/baker/baguette.txt\n" -msgstr "" -"\n" -"$ svnlook changed -r 39 /usr/local/svn/repos\n" -"A trunk/vendors/deli/\n" -"A trunk/vendors/deli/chips.txt\n" -"A trunk/vendors/deli/sandwich.txt\n" -"A trunk/vendors/deli/pickle.txt\n" -"U trunk/vendors/baker/bagel.txt\n" -"_U trunk/vendors/baker/croissant.txt\n" -"UU trunk/vendors/baker/pretzel.txt\n" -"D trunk/vendors/baker/baguette.txt\n" - -#. (tertiary) -#: ../source/book.xml:22482 -msgid "date" -msgstr "date" - -#. (refname) -#: ../source/book.xml:22485 -msgid "svnlook date" -msgstr "svnlook date" - -#. (refpurpose) -#: ../source/book.xml:22486 -msgid "Print the datestamp." -msgstr "打印时间戳。" - -#. (programlisting) -#: ../source/book.xml:22492 -#, no-wrap -msgid "svnlook date REPOS_PATH" -msgstr "svnlook date REPOS_PATH" - -#. (para) -#: ../source/book.xml:22498 -msgid "Print the datestamp of a revision or transaction in a repository." -msgstr "打印版本库一个修订版本或事物的时间戳。" - -#. (para) -#: ../source/book.xml:22514 -msgid "This shows the date of revision 40 of a test repository:" -msgstr "显示测试版本库修订版本40的日期:" - -#. (screen) -#: ../source/book.xml:22516 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook date -r 40 /var/svn/repos/\n" -"2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n" -msgstr "" -"\n" -"$ svnlook date -r 40 /tmp/repos/\n" -"2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n" - -#. (refname) -#: ../source/book.xml:22529 -msgid "svnlook diff" -msgstr "svnlook diff" - -#. (refpurpose) -#: ../source/book.xml:22530 -msgid "Print differences of changed files and properties." -msgstr "打印修改的文件和属性的区别。" - -#. (programlisting) -#: ../source/book.xml:22536 -#, no-wrap -msgid "svnlook diff REPOS_PATH" -msgstr "svnlook diff REPOS_PATH" - -#. (para) -#: ../source/book.xml:22542 -msgid "Print GNU-style differences of changed files and properties in a repository." -msgstr "打印版本库中GNU样式的文件和属性修改区别。" - -#. (screen) -#: ../source/book.xml:22549 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--no-diff-added\n" -"--no-diff-deleted\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--no-diff-added\n" -"--no-diff-deleted\n" - -#. (para) -#: ../source/book.xml:22560 -msgid "This shows a newly added (empty) file, a deleted file, and a copied file:" -msgstr "这显示了一个新添加的(空的)文件,一个删除的文件和一个拷贝的文件:" - -#. (screen) -#: ../source/book.xml:22562 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook diff -r 40 /var/svn/repos/\n" -"Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)\n" -"\n" -"Added: trunk/vendors/deli/soda.txt\n" -"==============================================================================\n" -"\n" -"Modified: trunk/vendors/deli/sandwich.txt\n" -"==============================================================================\n" -"--- trunk/vendors/deli/sandwich.txt\t(original)\n" -"+++ trunk/vendors/deli/sandwich.txt\t2003-02-22 17:45:04.000000000 -0600\n" -"@@ -0,0 +1 @@\n" -"+Don't forget the mayo!\n" -"\n" -"Modified: trunk/vendors/deli/logo.jpg\n" -"==============================================================================\n" -"(Binary files differ)\n" -"\n" -"Deleted: trunk/vendors/deli/chips.txt\n" -"==============================================================================\n" -"\n" -"Deleted: trunk/vendors/deli/pickle.txt\n" -"==============================================================================\n" -msgstr "" -"\n" -"$ svnlook diff -r 40 /usr/local/svn/repos/\n" -"Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt)\n" -"\n" -"Added: trunk/vendors/deli/soda.txt\n" -"==============================================================================\n" -"\n" -"Modified: trunk/vendors/deli/sandwich.txt\n" -"==============================================================================\n" -"--- trunk/vendors/deli/sandwich.txt\t(original)\n" -"+++ trunk/vendors/deli/sandwich.txt\t2003-02-22 17:45:04.000000000 -0600\n" -"@@ -0,0 +1 @@\n" -"+Don't forget the mayo!\n" -"\n" -"Modified: trunk/vendors/deli/logo.jpg\n" -"==============================================================================\n" -"(Binary files differ)\n" -"\n" -"Deleted: trunk/vendors/deli/chips.txt\n" -"==============================================================================\n" -"\n" -"Deleted: trunk/vendors/deli/pickle.txt\n" -"==============================================================================\n" - -#. (para) -#: ../source/book.xml:22586 -#, fuzzy -msgid "If a file has a non-textual svn:mime-type property, then the differences are not explicitly shown." -msgstr "如果一个文件有非文本的svn:mime-type属性,区别不会明确显示。" - -#. (tertiary) -#: ../source/book.xml:22595 -msgid "dirs-changed" -msgstr "dirs-changed" - -#. (refname) -#: ../source/book.xml:22598 -msgid "svnlook dirs-changed" -msgstr "svnlook dirs-changed" - -#. (refpurpose) -#: ../source/book.xml:22599 -msgid "Print the directories that were themselves changed." -msgstr "打印本身修改的目录。" - -#. (programlisting) -#: ../source/book.xml:22605 -#, no-wrap -msgid "svnlook dirs-changed REPOS_PATH" -msgstr "svnlook dirs-changed REPOS_PATH" - -#. (para) -#: ../source/book.xml:22611 -msgid "Print the directories that were themselves changed (property edits) or whose file children were changed." -msgstr "打印本身修改(属性编辑)或子文件修改的目录。" - -#. (para) -#: ../source/book.xml:22628 -msgid "This shows the directories that changed in revision 40 in our sample repository:" -msgstr "这显示了在我们的实例版本库中在修订版本40修改的目录:" - -#. (screen) -#: ../source/book.xml:22630 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook dirs-changed -r 40 /var/svn/repos\n" -"trunk/vendors/deli/\n" -msgstr "" -"\n" -"$ svnlook dirs-changed -r 40 /usr/local/svn/repos\n" -"trunk/vendors/deli/\n" - -#. (refname) -#: ../source/book.xml:22643 -msgid "svnlook help" -msgstr "svnlook help" - -#. (programlisting) -#: ../source/book.xml:22650 -#, no-wrap -msgid "Also svnlook -h and svnlook -?." -msgstr "Also svnlook -h and svnlook -?." - -#. (para) -#: ../source/book.xml:22656 -#, fuzzy -msgid "Displays the help message for svnlook. This command, like its brother svn help, is also your friend, even though you never call it anymore and forgot to invite it to your last party." -msgstr "显示svnlook的帮助信息,这个命令如同svn help的兄弟,也是你的朋友,即使你从不调用它,并且忘掉了邀请它加入你的上一次聚会。" - -#. (tertiary) -#: ../source/book.xml:22672 -msgid "history" -msgstr "history" - -#. (refname) -#: ../source/book.xml:22675 -msgid "svnlook history" -msgstr "svnlook history" - -#. (refpurpose), (para) -#: ../source/book.xml:22676 ../source/book.xml:22690 -msgid "Print information about the history of a path in the repository (or the root directory if no path is supplied)." -msgstr "打印版本库(如果没有路径,则是根目录)某一个路径的历史。" - -#. (programlisting) -#: ../source/book.xml:22684 -#, no-wrap -msgid "svnlook history REPOS_PATH [PATH_IN_REPOS]" -msgstr "" -"svnlook history REPOS_PATH\n" -" [PATH_IN_REPOS]" - -#. (screen) -#: ../source/book.xml:22698 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--show-ids\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--show-ids\n" - -#. (para) -#: ../source/book.xml:22707 -#, fuzzy -msgid "This shows the history output for the path /tags/1.0 as of revision 20 in our sample repository." -msgstr "这显示了实例版本库中作为修订版本20的路径/tags/1.0的历史输出。" - -#. (screen) -#: ../source/book.xml:22710 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook history -r 20 /var/svn/repos /tags/1.0 --show-ids\n" -"REVISION PATH <ID>\n" -"-------- ---------\n" -" 19 /tags/1.0 <1.2.12>\n" -" 17 /branches/1.0-rc2 <1.1.10>\n" -" 16 /branches/1.0-rc2 <1.1.x>\n" -" 14 /trunk <1.0.q>\n" -" 13 /trunk <1.0.o>\n" -" 11 /trunk <1.0.k>\n" -" 9 /trunk <1.0.g>\n" -" 8 /trunk <1.0.e>\n" -" 7 /trunk <1.0.b>\n" -" 6 /trunk <1.0.9>\n" -" 5 /trunk <1.0.7>\n" -" 4 /trunk <1.0.6>\n" -" 2 /trunk <1.0.3>\n" -" 1 /trunk <1.0.2>\n" -msgstr "" -"\n" -"$ svnlook history -r 20 /usr/local/svn/repos /tags/1.0 --show-ids\n" -"REVISION PATH <ID>\n" -"-------- ---------\n" -" 19 /tags/1.0 <1.2.12>\n" -" 17 /branches/1.0-rc2 <1.1.10>\n" -" 16 /branches/1.0-rc2 <1.1.x>\n" -" 14 /trunk <1.0.q>\n" -" 13 /trunk <1.0.o>\n" -" 11 /trunk <1.0.k>\n" -" 9 /trunk <1.0.g>\n" -" 8 /trunk <1.0.e>\n" -" 7 /trunk <1.0.b>\n" -" 6 /trunk <1.0.9>\n" -" 5 /trunk <1.0.7>\n" -" 4 /trunk <1.0.6>\n" -" 2 /trunk <1.0.3>\n" -" 1 /trunk <1.0.2>\n" - -#. (refname) -#: ../source/book.xml:22738 -msgid "svnlook info" -msgstr "svnlook info" - -#. (refpurpose) -#: ../source/book.xml:22739 -msgid "Print the author, datestamp, log message size, and log message." -msgstr "打印作者、时间戳、日志信息大小和日志信息。" - -#. (programlisting) -#: ../source/book.xml:22746 -#, no-wrap -msgid "svnlook info REPOS_PATH" -msgstr "svnlook info REPOS_PATH" - -#. (para) -#: ../source/book.xml:22752 -#, fuzzy -msgid "Print the author, datestamp, log message size (in bytes) and log message, followed by a newline character." -msgstr "打印作者、时间戳、日志信息大小和日志信息。" - -#. (para) -#: ../source/book.xml:22768 -msgid "This shows the info output for revision 40 in our sample repository." -msgstr "显示了你的实例版本库在修订版本40的信息输出。" - -#. (screen) -#: ../source/book.xml:22770 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook info -r 40 /var/svn/repos\n" -"sally\n" -"2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n" -"16\n" -"Rearrange lunch.\n" -msgstr "" -"\n" -"$ svnlook info -r 40 /usr/local/svn/repos\n" -"sally\n" -"2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003)\n" -"16\n" -"Rearrange lunch.\n" - -#. (refname) -#: ../source/book.xml:22786 -msgid "svnlook lock" -msgstr "svnlook lock" - -#. (refpurpose) -#: ../source/book.xml:22787 -msgid "If a lock exists on a path in the repository, describe it." -msgstr "如果版本库路径已经被锁定,描述它。" - -#. (programlisting) -#: ../source/book.xml:22794 -#, no-wrap -msgid "svnlook lock REPOS_PATH PATH_IN_REPOS" -msgstr "svnlook lock REPOS_PATH PATH_IN_REPOS" - -#. (para) -#: ../source/book.xml:22800 -msgid "Print all information available for the lock at PATH_IN_REPOS. If PATH_IN_REPOS is not locked, print nothing." -msgstr "打印PATH_IN_REPOS锁定的所有信息,如果PATH_IN_REPOS没有锁定,则不打印任何内容。" - -#. (para) -#: ../source/book.xml:22815 -#, fuzzy -msgid "This describes the lock on the file tree.jpg." -msgstr "这描述了文件tree.jpg的锁定。" - -#. (screen) -#: ../source/book.xml:22817 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook lock /var/svn/repos tree.jpg\n" -"UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n" -"Owner: harry\n" -"Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n" -"Expires: \n" -"Comment (1 line):\n" -"Rework the uppermost branches on the bald cypress in the foreground.\n" -msgstr "" -"\n" -"$ svnlook lock /svn/repos tree.jpg\n" -"UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753\n" -"Owner: harry\n" -"Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005)\n" -"Expires: \n" -"Comment (1 line):\n" -"Rework the uppermost branches on the bald cypress in the foreground.\n" - -#. (refname) -#: ../source/book.xml:22835 -msgid "svnlook log" -msgstr "svnlook log" - -#. (refpurpose) -#: ../source/book.xml:22836 -#, fuzzy -msgid "Print the log message, followed by a newline character." -msgstr "日志信息本身, 后接换行。" - -#. (programlisting) -#: ../source/book.xml:22843 -#, no-wrap -msgid "svnlook log REPOS_PATH" -msgstr "svnlook log REPOS_PATH" - -#. (para) -#: ../source/book.xml:22849 -msgid "Print the log message." -msgstr "打印日志信息。" - -#. (para) -#: ../source/book.xml:22864 -msgid "This shows the log output for revision 40 in our sample repository:" -msgstr "这显示了实例版本库在修订版本40的日志输出:" - -#. (screen) -#: ../source/book.xml:22866 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook log /var/svn/repos/\n" -"Rearrange lunch.\n" -msgstr "" -"\n" -"$ svnlook log /tmp/repos/\n" -"Rearrange lunch.\n" - -#. (refname) -#: ../source/book.xml:22879 -msgid "svnlook propget" -msgstr "svnlook propget" - -#. (refpurpose) -#: ../source/book.xml:22880 -msgid "Print the raw value of a property on a path in the repository." -msgstr "打印版本库中一个路径一个属性的原始值。" - -#. (programlisting) -#: ../source/book.xml:22887 -#, no-wrap -msgid "svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS]" -msgstr "svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS]" - -#. (para) -#: ../source/book.xml:22893 -msgid "List the value of a property on a path in the repository." -msgstr "列出版本库中一个路径一个属性的值。" - -#. (para) -#: ../source/book.xml:22900 -msgid "pg, pget" -msgstr "pg, pget" - -#. (screen) -#: ../source/book.xml:22906 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--revprop\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--revprop\n" - -#. (para) -#: ../source/book.xml:22916 -#, fuzzy -msgid "This shows the value of the seasonings property on the file /trunk/sandwich in the HEAD revision:" -msgstr "这显示了HEAD修订版本中文件/trunk/sandwichseasonings属性的值:" - -#. (screen) -#: ../source/book.xml:22919 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook pg /var/svn/repos seasonings /trunk/sandwich\n" -"mustard\n" -msgstr "" -"\n" -"$ svnlook pg /usr/local/svn/repos seasonings /trunk/sandwich\n" -"mustard\n" - -#. (refname) -#: ../source/book.xml:22932 -msgid "svnlook proplist" -msgstr "svnlook proplist" - -#. (refpurpose) -#: ../source/book.xml:22933 -msgid "Print the names and values of versioned file and directory properties." -msgstr "打印版本化的文件和目录的属性名称和值。" - -#. (programlisting) -#: ../source/book.xml:22940 -#, no-wrap -msgid "svnlook proplist REPOS_PATH [PATH_IN_REPOS]" -msgstr "svnlook proplist REPOS_PATH [PATH_IN_REPOS]" - -#. (para) -#: ../source/book.xml:22946 -msgid "List the properties of a path in the repository. With , show the property values too." -msgstr "列出版本库中一个路径的属性,使用选项也会显示所有的属性值。" - -#. (para) -#: ../source/book.xml:22953 -msgid "pl, plist" -msgstr "pl, plist" - -#. (screen) -#: ../source/book.xml:22959 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--verbose (-v)\n" -"--revprop\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--verbose (-v)\n" -"--revprop\n" - -#. (para) -#: ../source/book.xml:22970 -#, fuzzy -msgid "This shows the names of properties set on the file /trunk/README in the HEAD revision:" -msgstr "这显示了HEAD修订版本中/trunk/README的属性名称:" - -#. (screen) -#: ../source/book.xml:22973 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook proplist /var/svn/repos /trunk/README\n" -" original-author\n" -" svn:mime-type\n" -msgstr "" -"\n" -"$ svnlook proplist /usr/local/svn/repos /trunk/README\n" -" original-author\n" -" svn:mime-type\n" - -#. (para) -#: ../source/book.xml:22978 -msgid "This is the same command as in the previous example, but this time showing the property values as well:" -msgstr "这与前一个例子是同一个命令,但是同时显示了属性值:" - -#. (screen) -#: ../source/book.xml:22980 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook --verbose proplist /var/svn/repos /trunk/README\n" -" original-author : fitz\n" -" svn:mime-type : text/plain\n" -msgstr "" -"\n" -"$ svnlook --verbose proplist /usr/local/svn/repos /trunk/README\n" -" original-author : fitz\n" -" svn:mime-type : text/plain\n" - -#. (tertiary) -#: ../source/book.xml:22991 -msgid "tree" -msgstr "tree" - -#. (refname) -#: ../source/book.xml:22994 -msgid "svnlook tree" -msgstr "svnlook tree" - -#. (refpurpose) -#: ../source/book.xml:22995 -msgid "Print the tree." -msgstr "打印树。" - -#. (programlisting) -#: ../source/book.xml:23001 -#, no-wrap -msgid "svnlook tree REPOS_PATH [PATH_IN_REPOS]" -msgstr "svnlook tree REPOS_PATH [PATH_IN_REPOS]" - -#. (para) -#: ../source/book.xml:23007 -msgid "Print the tree, starting at PATH_IN_REPOS (if supplied, at the root of the tree otherwise), optionally showing node revision IDs." -msgstr "打印树,从PATH_IN_REPOS(如果提供,会作为树的根)开始,可以选择显示节点修订版本ID。" - -#. (screen) -#: ../source/book.xml:23016 -#, no-wrap -msgid "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--show-ids\n" -msgstr "" -"\n" -"--revision (-r) REV\n" -"--transaction (-t)\n" -"--show-ids\n" - -#. (para) -#: ../source/book.xml:23026 -msgid "This shows the tree output (with node-IDs) for revision 40 in our sample repository:" -msgstr "这会显示实例版本库中修订版本40的树输出(包括节点ID):" - -#. (screen) -#: ../source/book.xml:23028 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook tree -r 40 /var/svn/repos --show-ids\n" -"/ <0.0.2j>\n" -" trunk/ <p.0.2j>\n" -" vendors/ <q.0.2j>\n" -" deli/ <1g.0.2j>\n" -" egg.txt <1i.e.2j>\n" -" soda.txt <1k.0.2j>\n" -" sandwich.txt <1j.0.2j>\n" -msgstr "" -"\n" -"$ svnlook tree -r 40 /usr/local/svn/repos --show-ids\n" -"/ <0.0.2j>\n" -" trunk/ <p.0.2j>\n" -" vendors/ <q.0.2j>\n" -" deli/ <1g.0.2j>\n" -" egg.txt <1i.e.2j>\n" -" soda.txt <1k.0.2j>\n" -" sandwich.txt <1j.0.2j>\n" - -#. (tertiary) -#: ../source/book.xml:23044 -msgid "uuid" -msgstr "uuid" - -#. (refname) -#: ../source/book.xml:23047 -msgid "svnlook uuid" -msgstr "svnlook uuid" - -#. (literal) -#: ../source/book.xml:23049 -msgid "UUID" -msgstr "UUID" - -#. (refpurpose) -#: ../source/book.xml:23048 -msgid "Print the repository's ." -msgstr "打印版本库的。" - -#. (programlisting) -#: ../source/book.xml:23055 -#, no-wrap -msgid "svnlook uuid REPOS_PATH" -msgstr "svnlook uuid REPOS_PATH" - -#. (para) -#: ../source/book.xml:23061 -#, fuzzy -msgid "Print the UUID for the repository. the UUID is the repository's universal unique identifier. The Subversion client uses this identifier to differentiate between one repository and another." -msgstr "打印版本库的UUID,UUID是版本库的universal unique IDentifier(全局唯一标示),Subversion客户端可以使用这个标示区分不同的版本库。" - -#. (screen) -#: ../source/book.xml:23072 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook uuid /var/svn/repos\n" -"e7fe1b91-8cd5-0310-98dd-2f12e793c5e8\n" -msgstr "" -"\n" -"$ svnlook uuid /usr/local/svn/repos\n" -"e7fe1b91-8cd5-0310-98dd-2f12e793c5e8\n" - -#. (tertiary) -#: ../source/book.xml:23082 -msgid "youngest" -msgstr "youngest" - -#. (refname) -#: ../source/book.xml:23085 -msgid "svnlook youngest" -msgstr "svnlook youngest" - -#. (refpurpose) -#: ../source/book.xml:23086 -msgid "Print the youngest revision number." -msgstr "显示最年轻的修订版本号。" - -#. (programlisting) -#: ../source/book.xml:23092 -#, no-wrap -msgid "svnlook youngest REPOS_PATH" -msgstr "svnlook youngest REPOS_PATH" - -#. (para) -#: ../source/book.xml:23098 -msgid "Print the youngest revision number of a repository." -msgstr "打印一个版本库最年轻的修订版本号。" - -#. (para) -#: ../source/book.xml:23104 -msgid "This shows the youngest revision of our sample repository:" -msgstr "这显示了在实例版本库显示最年轻的修订版本:" - -#. (screen) -#: ../source/book.xml:23106 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnlook youngest /var/svn/repos/ \n" -"42\n" -msgstr "" -"\n" -"$ svnlook youngest /tmp/repos/ \n" -"42\n" - -#. (para) -#: ../source/book.xml:23123 -#, fuzzy -msgid "svnsync is the Subversion remote repository mirroring tool. Put simply, it allows you to replay the revisions of one repository into another one." -msgstr "运行svn commit将更改提交到版本库中。" - -#. (para) -#: ../source/book.xml:23126 -msgid "In any mirroring scenario, there are two repositories: the source repository, and the mirror (or sink) repository. The source repository is the repository from which svnsync 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." -msgstr "在任何镜像场景中,有两个版本库:源版本库,镜像(或sink)版本库,源版本库就是svnsync获取修订版本的库,镜像版本库是源版本库修订版本的目标,两个版本库可以是在本地或远程—它们只是通过URL跟踪。" - -#. (para) -#: ../source/book.xml:23133 -msgid "The svnsync process requires only read access to the source repository; it never attempts to modify it. But obviously, svnsync requires both read and write access to the mirror repository." -msgstr "svnsync进程只需要对源版本库有读权限;它不会尝试修改它。但是很明显,svnsync可以读写访问镜像版本库。" - -#. (para) -#: ../source/book.xml:23138 -msgid "svnsync 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 svnsync process is the only process permitted to modify the mirror repository." -msgstr "svnsync对于不能作为镜像操作一部分的修改非常敏感,为了防止发生这个情况,最好保证svnsync是唯一可以修改镜像版本库的进程。" - -#. (title) -#: ../source/book.xml:23147 -#, fuzzy -msgid "svnsync Options" -msgstr "svn 选项" - -#. (title) -#: ../source/book.xml:23214 -#, fuzzy -msgid "svnsync Subcommands" -msgstr "svn 子命令" - -#. (tertiary) -#: ../source/book.xml:23221 -#, fuzzy -msgid "copy-revprops" -msgstr "--revprop" - -#. (refname) -#: ../source/book.xml:23224 -msgid "svnsync copy-revprops" -msgstr "svnsync copy-revprops" - -#. (refpurpose) -#: ../source/book.xml:23225 -msgid "Copy all revision properties for a given revision from the source repository to the mirror repository." -msgstr "从源版本库拷贝所有的修订版本属性到镜像版本库。" - -#. (programlisting) -#: ../source/book.xml:23233 -#, no-wrap -msgid "svnsync copy-revprops DEST_URL REV" -msgstr "svnsync copy-revprops DEST_URL REV" - -#. (para) -#: ../source/book.xml:23239 -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 svnsync synchronize 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. svnsync copy-revprops is the answer to this problem. Use it to re-synchronize the revision properties for a particular revision." -msgstr "因为Subversion修订版本属性可以在任何时候修改,很有可能有一些修订版本的属性会在已经同步后改变,因为svnsync synchronize不会对没有同步的修订版本范围进行操作,而不会注意修改范围之外的属性修改。这样导致了修订版本属性在源版本库与目标版本库的偏离,svnsync copy-revprops是这个问题的答案,用它可以同步特定修订版本的属性。" - -#. (screen) -#: ../source/book.xml:23263 ../source/book.xml:23324 ../source/book.xml:23394 -#, no-wrap -msgid "" -"\n" -"--non-interactive\n" -"--no-auth-cache\n" -"--username NAME\n" -"--password PASS\n" -"--config-dir DIR\n" -msgstr "" -"\n" -"--non-interactive\n" -"--no-auth-cache\n" -"--username NAME\n" -"--password PASS\n" -"--config-dir DIR\n" - -#. (para) -#: ../source/book.xml:23275 -msgid "Re-synchronize revision properties for a single revision:" -msgstr "为单个修订版本重新同步修订版本属性:" - -#. (screen) -#: ../source/book.xml:23276 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnsync copy-revprops file:///var/svn/repos-mirror 6\n" -"Copied properties for revision 6.\n" -"$\n" -msgstr "" -"\n" -"$ svnsync copy-revprops file:///opt/svn/repos-mirror 6\n" -"Copied properties for revision 6.\n" -"$\n" - -#. (tertiary) -#: ../source/book.xml:23287 -#, fuzzy -msgid "initialize" -msgstr "初始设置" - -#. (refname) -#: ../source/book.xml:23290 -msgid "svnsync initialize" -msgstr "svnsync initialize" - -#. (refpurpose) -#: ../source/book.xml:23291 -msgid "Initialize a destination repository for synchronization from another repository." -msgstr "为与另一个版本库的同步初而始化目标版本库。" - -#. (programlisting) -#: ../source/book.xml:23298 -#, no-wrap -msgid "svnsync initialize DEST_URL SOURCE_URL" -msgstr "svnsync initialize DEST_URL SOURCE_URL" - -#. (para) -#: ../source/book.xml:23304 -msgid "svnsync initialize 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 svnsync operation you run on a would-be mirror repository." -msgstr "svnsync initialize检验版本库是否满足了新镜像版本库的需求—它必须没有存在的版本历史,并允许修订版本修改—记录镜像版本库与源版本库关联的初始管理信息,这是对即将镜像的版本库的第一个svnsync操作。" - -#. (para) -#: ../source/book.xml:23318 -msgid "init" -msgstr "init" - -#. (para) -#: ../source/book.xml:23336 -msgid "Fail to initialize a mirror repository due to inability to modify revision properties:" -msgstr "因为无法修改修订版本属性而初始化镜像版本库失败:" - -#. (screen) -#: ../source/book.xml:23338 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\n" -"svnsync: Repository has not been enabled to accept revision propchanges;\n" -"ask the administrator to create a pre-revprop-change hook\n" -"$\n" -msgstr "" -"\n" -"$ svnsync initialize file:///opt/svn/repos-mirror http://svn.example.com/repos\n" -"svnsync: Repository has not been enabled to accept revision propchanges;\n" -"ask the administrator to create a pre-revprop-change hook\n" -"$\n" - -#. (para) -#: ../source/book.xml:23344 -msgid "Initialize a repository as a mirror, having already created a pre-revprop-change hook which permits all revision property changes:" -msgstr "以镜像初始化版本库,包含已创建允许所有修订版本属性修改的pre-revprop-change钩子:" - -#. (screen) -#: ../source/book.xml:23347 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos\n" -"Copied properties for revision 0.\n" -"$\n" -msgstr "" -"\n" -"$ svnsync initialize file:///opt/svn/repos-mirror http://svn.example.com/repos\n" -"Copied properties for revision 0.\n" -"$\n" - -#. (tertiary) -#: ../source/book.xml:23358 -msgid "synchronize" -msgstr "synchronize" - -#. (refname) -#: ../source/book.xml:23361 -msgid "svnsync synchronize" -msgstr "svnsync synchronize" - -#. (refpurpose) -#: ../source/book.xml:23362 -msgid "Transfer all pending revisions from the source repository to the mirror repository." -msgstr "将所有未完成的修订版本从源版本库转移到镜像版本库。" - -#. (programlisting) -#: ../source/book.xml:23369 -#, no-wrap -msgid "svnsync synchronize DEST_URL" -msgstr "svnsync synchronize DEST_URL" - -#. (para) -#: ../source/book.xml:23375 -msgid "The svnsync synchronize 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." -msgstr "svnsync synchronize命令做了版本库镜像工作的所有体力活,通过讯问镜像版本库来查看已经拷贝的修订版本,然后开始拷贝未镜像修订版本到镜像版本库。" - -#. (para) -#: ../source/book.xml:23381 -#, fuzzy -msgid "svnsync synchronize can be gracefully cancelled and restarted." -msgstr "svn 子命令" - -#. (para) -#: ../source/book.xml:23388 -#, fuzzy -msgid "sync" -msgstr "svnsync" - -#. (para) -#: ../source/book.xml:23406 -msgid "Copy unsynchronized revisions from the source repository to the mirror repository:" -msgstr "从源版本库拷贝未同步修订版本到镜像版本库:" - -#. (screen) -#: ../source/book.xml:23408 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnsync synchronize file:///var/svn/repos-mirror\n" -"Committed revision 1.\n" -"Copied properties for revision 1.\n" -"Committed revision 2.\n" -"Copied properties for revision 2.\n" -"Committed revision 3.\n" -"Copied properties for revision 3.\n" -"…\n" -"Committed revision 45.\n" -"Copied properties for revision 45.\n" -"Committed revision 46.\n" -"Copied properties for revision 46.\n" -"Committed revision 47.\n" -"Copied properties for revision 47.\n" -"$\n" -msgstr "" -"\n" -"$ svnsync help synchronize\n" -"synchronize (sync): usage: svnsync synchronize DEST_URL\n" -"\n" -"Transfer all pending revisions from source to destination.\n" -"…\n" -"$ svnsync synchronize http://svn.example.com/svn-mirror \\\n" -" --username syncuser --password syncpass\n" -"Committed revision 1.\n" -"Copied properties for revision 1.\n" -"Committed revision 2.\n" -"Copied properties for revision 2.\n" -"Committed revision 3.\n" -"Copied properties for revision 3.\n" -"…\n" -"Committed revision 23406.\n" -"Copied properties for revision 23406.\n" -"Committed revision 23407.\n" -"Copied properties for revision 23407.\n" -"Committed revision 23408.\n" -"Copied properties for revision 23408.\n" - -#. (para) -#: ../source/book.xml:23438 -#, fuzzy -msgid "svnserve allows access to Subversion repositories using Subversion's custom network protocol." -msgstr "当对远程源版本库使用svnsync时,Subversion版本库的服务器必须是Subversion1.4或更高的版本。" - -#. (para) -#: ../source/book.xml:23440 -#, fuzzy -msgid "You can run svnserve as a standalone server process (for clients that are using the svn:// access method); you can have a daemon such as inetd or xinetd launch it for you on demand (also for svn://), or you can have sshd launch it on demand for the svn+ssh:// access method." -msgstr "svnserve允许Subversion版本库使用svn网络协议,你可以作为独立服务器进程运行svnserve,或者是使用其它进程,如inetdxinetdsshd为你启动进程。" - -#. (para) -#: ../source/book.xml:23448 -#, fuzzy -msgid "Regardless of the access method, once the client has selected a repository by transmitting its URL, svnserve reads a file named conf/svnserve.conf in the repository directory to determine repository-specific settings such as what authentication database to use and what authorization policies to apply. See for details of the svnserve.conf file." -msgstr "一旦客户端已经选择了一个版本库来传递它的URL,svnserve会读取版本库目录的conf/svnserve.conf文件,来检测版本库特定的设置,如使用哪个认证数据库和应用怎样的授权策略。关于svnserve.conf文件的详情见。" - -#. (title) -#: ../source/book.xml:23459 -#, fuzzy -msgid "svnserve Options" -msgstr "svnserve 选项" - -#. (para) -#: ../source/book.xml:23461 -#, fuzzy -msgid "Unlike the previous commands we've described, svnserve has no subcommands—svnserve is controlled exclusively by options." -msgstr "不象前面描述的例子,svnserve没有子命令—svnserve完全通过选项控制。" - -#. (term) -#: ../source/book.xml:23467 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23469 -#, fuzzy -msgid "Causes svnserve to run in daemon mode. svnserve backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default)." -msgstr "导致svnserve以守护进程方式运行,svnserve维护本身并且接受和服务svn端口(缺省3690)的TCP/IP连接。" - -#. (term) -#: ../source/book.xml:23476 -msgid "=PORT" -msgstr "=PORT" - -#. (para) -#: ../source/book.xml:23478 -#, fuzzy -msgid "Causes svnserve to listen on PORT when run in daemon mode. (FreeBSD daemons only listen on tcp6 by default—this option tells them to also listen on tcp4.)" -msgstr "在守护进程模式时导致svnserve监听PORT端口。" - -#. (term) -#: ../source/book.xml:23485 -msgid "=HOST" -msgstr "=HOST" - -#. (para) -#: ../source/book.xml:23487 -#, fuzzy -msgid "Causes svnserve to listen on the interface specified by HOST, which may be either a hostname or an IP address." -msgstr "svnserve监听的HOST,可能是一个主机名或是一个IP地址。" - -#. (option) -#: ../source/book.xml:23494 -msgid "--foreground" -msgstr "--foreground" - -#. (para) -#: ../source/book.xml:23497 -#, fuzzy -msgid "When used together with , this option causes svnserve to stay in the foreground. This option is mainly useful for debugging." -msgstr "当与一起使用,会导致svnserve停留在前台,主要用来调试。" - -#. (term) -#: ../source/book.xml:23504 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23506 -#, fuzzy -msgid "Causes svnserve to use the stdin/stdout file descriptors, as is appropriate for a daemon running out of inetd." -msgstr "导致svnserve使用标准输出/标准输入文件描述符,更准确的是使用inetd作为守护进程。" - -#. (term) -#: ../source/book.xml:23512 ../source/book.xml:23659 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23514 -msgid "Displays a usage summary and exits." -msgstr "显示有用的摘要和选项。" - -#. (para) -#: ../source/book.xml:23522 -msgid "Displays version information, a list of repository back-end modules available, and exits." -msgstr "显示版本信息,版本库后端存在和可用的模块列表。" - -#. (term) -#: ../source/book.xml:23527 -msgid "=ROOT (=ROOT)" -msgstr "=ROOT (=ROOT)" - -#. (para) -#: ../source/book.xml:23530 -#, fuzzy -msgid "Sets the virtual root for repositories served by svnserve. The pathname in URLs provided by the client will be interpreted relative to this root, and will not be allowed to escape this root." -msgstr "设置svnserve服务的版本库的虚拟根,客户端提供的URL中显示的路径会解释为这个根的相对路径,不会允许离开这个根。" - -#. (term) -#: ../source/book.xml:23538 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23540 -#, fuzzy -msgid "Causes svnserve to run in tunnel mode, which is just like the inetd 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 ssh. That means there's rarely any need for you to pass this option to svnserve. So if you find yourself typing svnserve --tunnel on the command line, and wondering what to do next, see ." -msgstr "导致svnserve以管道模式运行,很像inetd操作的模式(服务于一个标准输入/标准输出的连接),除了连接是用当前uid的用户名预先认证过的这一点。这个选项在客户端使用如ssh之类的管道时使用。" - -#. (option) -#: ../source/book.xml:23558 -msgid "--tunnel-user NAME" -msgstr "--tunnel-user NAME" - -#. (para) -#: ../source/book.xml:23561 -#, fuzzy -msgid "Used in conjunction with the option; tells svnserve to assume that NAME 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." -msgstr "与选项结合使用;告诉svnserve假定NAME就是认证用户,而不是svnserve进程的UID用户,当希望多个用户通过SSH共享同一个系统帐户,但是维护各自的提交标示符时非常有用。" - -#. (term) -#: ../source/book.xml:23571 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23573 -#, fuzzy -msgid "When running in daemon mode, causes svnserve to spawn a thread instead of a process for each connection (e.g. for when running on Windows). The svnserve process still backgrounds itself at startup time." -msgstr "当以守护进程模式运行,导致svnserve为每个连接产生一个线程而不是一个进程,svnserve进程本身在启动后会一直在后台。" - -#. (term) -#: ../source/book.xml:23581 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23583 -#, fuzzy -msgid "Causes svnserve to accept one connection on the svn port, serve it, and exit. This option is mainly useful for debugging." -msgstr "导致svnserve在svn端口接受一个连接,维护完成它退出。这个选项主要用来调试。" - -#. (refpurpose) -#: ../source/book.xml:23606 -msgid "Summarize the local revision(s) of a working copy." -msgstr "总结工作拷贝的本地修订版本。" - -#. (programlisting) -#: ../source/book.xml:23613 -#, no-wrap -msgid "svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]" -msgstr "svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]" - -#. (para) -#: ../source/book.xml:23619 -#, fuzzy -msgid "svnversion is a program for summarizing the revision mixture of a working copy. The resultant revision number, or revision range, is written to standard output." -msgstr "svnversion是用来总结工作拷贝修订版本混合的程序,结果修订版本号或范围会写到标准输出。" - -#. (para) -#: ../source/book.xml:23623 -msgid "It's common to use this output in your build process when defining the version number of your program." -msgstr "通常在构建过程中利用其输出定义程序的版本号码。" - -#. (para) -#: ../source/book.xml:23625 -msgid "TRAIL_URL, if present, is the trailing portion of the URL used to determine if WC_PATH itself is switched (detection of switches within WC_PATH does not rely on TRAIL_URL)." -msgstr "如果提供TRAIL_URL,URL的尾端部分用来监测是否WC_PATH本身已经跳转(监测WC_PATH的跳转不需要依赖TRAIL_URL)。" - -#. (para) -#: ../source/book.xml:23631 -#, fuzzy -msgid "When WC_PATH is not defined, the current directory will be used as the working copy path. TRAIL_URL cannot be defined if WC_PATH is not explicitly given." -msgstr "当没有定义WC_PATH,会使用当前路径作为工作拷贝路径,如果没有显式定义WC_PATH,TRAIL_URL将无法定义。" - -#. (para) -#: ../source/book.xml:23641 -#, fuzzy -msgid "Like svnserve, svnversion has no subcommands, it only has options." -msgstr "像svnservesvnversion没有子命令,只有选项。" - -#. (term) -#: ../source/book.xml:23646 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23648 -msgid "Omit the usual trailing newline from the output." -msgstr "忽略输出的尾端新行。." - -#. (term) -#: ../source/book.xml:23652 -msgid " ()" -msgstr " ()" - -#. (para) -#: ../source/book.xml:23654 -msgid "Use the last-changed revisions rather than the current (i.e., highest locally available) revisions." -msgstr "使用最后修改修订版本而不是当前的(例如,本地存在的最高修订版本)修订版本。" - -#. (para) -#: ../source/book.xml:23661 -msgid "Print a help summary." -msgstr "打印帮助摘要。" - -#. (para) -#: ../source/book.xml:23669 -#, fuzzy -msgid "Print the version of svnversion and exit with no error." -msgstr "打印svnversion,如果没有错误退出。" - -#. (para) -#: ../source/book.xml:23679 -msgid "If the working copy is all at the same revision (for example, immediately after an update), then that revision is printed out:" -msgstr "如果工作拷贝都是一样的修订版本(例如,在更新后那一刻),会打印修订版本:" - -#. (screen) -#: ../source/book.xml:23682 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"4168\n" -msgstr "" -"\n" -"$ svnversion\n" -"4168\n" - -#. (para) -#: ../source/book.xml:23686 -#, fuzzy -msgid "You can add TRAIL_URL to make sure that the working copy is not switched from what you expect. Note that the WC_PATH is required in this command:" -msgstr "添加TRAIL_URL来展示工作拷贝不是从你希望的地方跳转过来的,注意这个命令需要WC_PATH:" - -#. (screen) -#: ../source/book.xml:23690 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnversion . /var/svn/trunk\n" -"4168\n" -msgstr "" -"\n" -"$ svnversion . /repos/svn/trunk\n" -"4168\n" - -#. (para) -#: ../source/book.xml:23694 -msgid "For a mixed-revision working copy, the range of revisions present is printed:" -msgstr "对于混合修订版本的工作拷贝,修订版本的范围会被打印:" - -#. (screen) -#: ../source/book.xml:23696 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"4123:4168\n" -msgstr "" -"\n" -"$ svnversion\n" -"4123:4168\n" - -#. (para) -#: ../source/book.xml:23700 -msgid "If the working copy contains modifications, a trailing \"M\" is added:" -msgstr "如果工作拷贝包含修改,后面会紧跟一个\"M\":" - -#. (screen) -#: ../source/book.xml:23702 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"4168M\n" -msgstr "" -"\n" -"$ svnversion\n" -"4168M\n" - -#. (para) -#: ../source/book.xml:23706 -msgid "If the working copy is switched, a trailing \"S\" is added:" -msgstr "如果工作拷贝已经跳转,后面会有一个\"S\":" - -#. (screen) -#: ../source/book.xml:23708 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"4168S\n" -msgstr "" -"\n" -"$ svnversion\n" -"4168S\n" - -#. (para) -#: ../source/book.xml:23712 -msgid "Thus, here is a mixed-revision, switched working copy containing some local modifications:" -msgstr "因此,这里是一个混合修订版本,跳转的工作拷贝包含了一些本地修改:" - -#. (screen) -#: ../source/book.xml:23714 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"4212:4168MS\n" -msgstr "" -"\n" -"$ svnversion\n" -"4212:4168MS\n" - -#. (para) -#: ../source/book.xml:23718 -#, fuzzy -msgid "If invoked on a directory that is not a working copy, svnversion assumes it is an exported working copy and prints \"exported\":" -msgstr "如果从一个目录而不是工作拷贝调用,svnversion假定它是一个导出的工作拷贝并且打印\"exported\":" - -#. (screen) -#: ../source/book.xml:23721 -#, no-wrap -msgid "" -"\n" -"$ svnversion\n" -"exported\n" -msgstr "" -"\n" -"$ svnversion\n" -"exported\n" - -#. (refname) -#: ../source/book.xml:23739 -msgid " Configuration Directives" -msgstr " Configuration Directives" - -#. (refpurpose) -#: ../source/book.xml:23741 -msgid "Apache configuration directives for serving Subversion repositories through Apache HTTP Server." -msgstr "Apache通过Apache HTTP服务器用来维护Subversion版本库配置指示。" - -#. (para) -#: ../source/book.xml:23749 -msgid "This section briefly describes each of the Subversion Apache configuration directives. For an in-depth description of configuring Apache with Subversion, see .)" -msgstr "这个小节主要描述了Subversion Apache配置的每个指示,关于Apache配置Subversion的更多信息见。" - -#. (title) -#: ../source/book.xml:23755 -msgid "Directives" -msgstr "指示" - -#. (literal) -#: ../source/book.xml:23760 -msgid "DAV svn" -msgstr "DAV svn" - -#. (para) -#: ../source/book.xml:23763 -#, fuzzy -msgid "This directive must be included in any Directory or Location block for a Subversion repository. It tells httpd to use the Subversion backend for mod_dav to handle all requests." -msgstr "这个指示必须包含在所有Subversion版本库的DirectoryLocation块中,它告诉httpd使用Subversion的后端,用mod_dav来处理所有的请求。" - -#. (literal) -#: ../source/book.xml:23772 -msgid "SVNAutoversioning On" -msgstr "SVNAutoversioning On" - -#. (para) -#: ../source/book.xml:23775 -#, fuzzy -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 ModMimeUsePathInfo On so that mod_mime can set svn:mime-type to the correct mime-type automatically (as best as mod_mime is able to, of course). For more information, see " -msgstr "这个指示允许WebDAV客户端的请求导致自动提交,每个修订版本会产生一个普通的日志信息。如果你开启了自动版本化,你很可能需要设置ModMimeUsePathInfo On,这样mod_mime可以自动的(像mod_mime一样好,当然)将svn:mime-type设置为正确的mime-type值。更多信息见。" - -#. (literal) -#: ../source/book.xml:23789 -msgid "SVNPath" -msgstr "SVNPath" - -#. (para) -#: ../source/book.xml:23792 -#, fuzzy -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 SVNParentPath must be present, but not both." -msgstr "这个指示指定Subversion版本库文件文件系统的位置,在一个Subversion版本库的配置块里,必须提供这个指示或SVNParentPath,但不能同时存在。" - -#. (literal) -#: ../source/book.xml:23802 -msgid "SVNSpecialURI" -msgstr "SVNSpecialURI" - -#. (para) -#: ../source/book.xml:23805 -#, fuzzy -msgid "Specifies the URI component (namespace) for special Subversion resources. The default is !svn, and most administrators will never use this directive. Only set this if there is a pressing need to have a file named !svn 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." -msgstr "指定特定Subversion资源的URI部分(命名空间),缺省是!svn,大多数管理员不会用到这个指示。只有那些必须要在版本库中放一个名字为!svn的文件时需要设置。如果你在一个已经使用中的服务器上这样修改,它会破坏所有的工作拷贝,你的用户会拿着叉子和火把追杀你。" - -#. (literal) -#: ../source/book.xml:23819 -msgid "SVNReposName" -msgstr "SVNReposName" - -#. (para) -#: ../source/book.xml:23822 -#, fuzzy -msgid "Specifies the name of a Subversion repository for use in HTTP GET 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." -msgstr "指定Subversion版本库在HTTP GET请求中使用的名字,这个值会作为所有目录列表(当你用web浏览器察看Subversion版本库时会看到)的标题,这个指示是可选的。" - -#. (literal) -#: ../source/book.xml:23832 -msgid "SVNIndexXSLT" -msgstr "SVNIndexXSLT" - -#. (para) -#: ../source/book.xml:23835 -msgid "Specifies the URI of an XSL transformation for directory indexes. This directive is optional." -msgstr "目录列表所使用的XSL转化的URI,这个指示可选。" - -#. (literal) -#: ../source/book.xml:23841 -msgid "SVNParentPath" -msgstr "SVNParentPath" - -#. (para) -#: ../source/book.xml:23844 -#, fuzzy -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 SVNPath must be present, but not both." -msgstr "指定子目录会是版本库的父目录在文件系统的位置,在一个Subversion版本库的配置块里,必须提供这个指示或SVNPath,但不能同时存在。" - -#. (literal) -#: ../source/book.xml:23854 -msgid "SVNPathAuthz" -msgstr "SVNPathAuthz" - -#. (para) -#: ../source/book.xml:23857 -msgid "Control path-based authorization by enabling or disabling subrequests. See for details." -msgstr "控制开启和关闭路径为基础的授权,更多细节见。" - -#. (title) -#: ../source/book.xml:23870 -msgid "Subversion properties" -msgstr "Subversion 属性" - -#. (para) -#: ../source/book.xml:23872 -#, fuzzy -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 svn: (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 svn: properties." -msgstr "Subversion允许用户在文件或目录上发明任意名称的版本化属性和非版本化属性,唯一的限制就是svn:是Subversion本身的保留前缀,用户可以设置这些属性来改变Subversion的行为方式,用户不能发明新的svn:属性。" - -#. (title) -#: ../source/book.xml:23881 -msgid "Versioned Properties" -msgstr "版本控制的属性" - -#. (literal) -#: ../source/book.xml:23886 -msgid "svn:executable" -msgstr "svn:executable" - -#. (para) -#: ../source/book.xml:23889 -msgid "If present on a file, the client will make the file executable in Unix-hosted working copies. See ." -msgstr "如果出现在一个文件上,客户端会将此文件在Unix工作拷贝中设置为可执行,见。" - -#. (literal) -#: ../source/book.xml:23896 -msgid "svn:mime-type" -msgstr "svn:mime-type" - -#. (para) -#: ../source/book.xml:23899 -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 ." -msgstr "如果出现在一个文件,这个值表示了文件的mime-type,这允许客户端在执行更新时决定以行为依据的合并是否安全,同时也会影响使用浏览器浏览文件时的行为方式。见。" - -#. (literal) -#: ../source/book.xml:23909 -msgid "svn:ignore" -msgstr "svn:ignore" - -#. (para) -#: ../source/book.xml:23912 -#, fuzzy -msgid "If present on a directory, the value is a list of unversioned file patterns to be ignored by svn status and other subcommands. See " -msgstr "如果出现在目录上,这是一组svn status可以忽略的未版本化文件的名称模式,见。" - -#. (literal) -#: ../source/book.xml:23921 -msgid "svn:keywords" -msgstr "svn:keywords" - -#. (para) -#: ../source/book.xml:23924 -msgid "If present on a file, the value tells the client how to expand particular keywords within the file. See ." -msgstr "如果出现在一个文件上,这个值告诉客户端如何扩展文件的特定关键字,见。" - -#. (literal) -#: ../source/book.xml:23932 -msgid "svn:eol-style" -msgstr "svn:eol-style" - -#. (para) -#: ../source/book.xml:23935 -#, fuzzy -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 and ." -msgstr "如果出现在一个文件上,这个值告诉客户端如何处理工作拷贝中的文件的行结束符,见。" - -#. (literal) -#: ../source/book.xml:23943 -msgid "svn:externals" -msgstr "svn:externals" - -#. (para) -#: ../source/book.xml:23946 -msgid "If present on a directory, the value is a multi-line list of other paths and URLs the client should check out. See ." -msgstr "如果出现在一个目录上,则这个值就是客户端必须要检出的路径和URL列表。见。" - -#. (literal) -#: ../source/book.xml:23954 -msgid "svn:special" -msgstr "svn:special" - -#. (para) -#: ../source/book.xml:23959 -msgid "As of this writing, symbolic links are indeed the only special objects. But there might be more in future releases of Subversion." -msgstr "此时,符号链是唯一的特别对象,但是以后,也许Subversion会有更多的特别对象。" - -#. (para) -#: ../source/book.xml:23957 -#, fuzzy -msgid "If present on a file, indicates that the file is not an ordinary file, but a symbolic link or other special object." -msgstr "如果出现在一个文件上,表示了那个文件不是一个普通的文件,而是一个符号链或者是其他特殊的对象。" - -#. (literal) -#: ../source/book.xml:23967 -msgid "svn:needs-lock" -msgstr "svn:needs-lock" - -#. (para) -#: ../source/book.xml:23970 -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 ." -msgstr "如果出现在一个文件上,告诉客户端在工作拷贝将文件置为只读,可以提醒我们在修改以前必须解锁。见。" - -#. (title) -#: ../source/book.xml:23980 -msgid "Unversioned Properties" -msgstr "未版本控制的属性" - -#. (literal) -#: ../source/book.xml:23985 -msgid "svn:author" -msgstr "svn:author" - -#. (para) -#: ../source/book.xml:23988 -msgid "If present, contains the authenticated username of the person who created the revision. (If not present, then the revision was committed anonymously.)" -msgstr "如果出现,则保存了创建这个修订版本的认证用户名。(如果没有出现,则修订版本是匿名提交的。)" - -#. (literal) -#: ../source/book.xml:23995 -msgid "svn:date" -msgstr "svn:date" - -#. (para) -#: ../source/book.xml:23998 -#, fuzzy -msgid "Contains the UTC time the revision was created, in ISO 8601 format. The value comes from the server machine's clock, not the client's." -msgstr "保存了修订版本创建的UTC时间,这个值来自服务器主机时钟。" - -#. (literal) -#: ../source/book.xml:24006 -msgid "svn:log" -msgstr "svn:log" - -#. (para) -#: ../source/book.xml:24009 -msgid "Contains the log message describing the revision." -msgstr "保存了描述修订版本的日志信息。" - -#. (literal) -#: ../source/book.xml:24015 -msgid "svn:autoversioned" -msgstr "svn:autoversioned" - -#. (para) -#: ../source/book.xml:24018 -msgid "If present, the revision was created via the autoversioning feature. See ." -msgstr "如果出现,则修订版本是通过自动版本化特性创建,见。" - -#. (title) -#: ../source/book.xml:24031 -msgid "Repository Hooks" -msgstr "版本库钩子" - -#. (primary) -#: ../source/book.xml:24036 ../source/book.xml:24083 ../source/book.xml:24132 -#: ../source/book.xml:24178 ../source/book.xml:24241 ../source/book.xml:24303 -#: ../source/book.xml:24354 ../source/book.xml:24400 ../source/book.xml:24453 -msgid "repository" -msgstr "版本库" - -#. (tertiary), (refname) -#: ../source/book.xml:24038 ../source/book.xml:24041 -msgid "start-commit" -msgstr "start-commit" - -#. (refpurpose) -#: ../source/book.xml:24042 -msgid "Notification of the beginning of a commit." -msgstr "开始提交的通知" - -#. (para) -#: ../source/book.xml:24048 -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." -msgstr " start-commit在开始事务之前执行,通常是用来确定用户是否有提交权限。" - -#. (para) -#: ../source/book.xml:24051 -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." -msgstr "如果start-commit钩子程序返回非零值,提交就会在创建之前停止,标准错误的任何输出都会返回到客户端。" - -#. (title) -#: ../source/book.xml:24058 ../source/book.xml:24109 ../source/book.xml:24155 -#: ../source/book.xml:24205 ../source/book.xml:24267 ../source/book.xml:24327 -#: ../source/book.xml:24374 ../source/book.xml:24426 ../source/book.xml:24473 -msgid "Input Parameter(s)" -msgstr "输入参数" - -#. (para) -#: ../source/book.xml:24060 ../source/book.xml:24111 ../source/book.xml:24157 -#: ../source/book.xml:24207 ../source/book.xml:24269 ../source/book.xml:24329 -#: ../source/book.xml:24376 ../source/book.xml:24428 ../source/book.xml:24475 -msgid "The command-line arguments passed to the hook program, in order, are:" -msgstr "传递给你钩子程序的命令行参数,按照顺序是:" - -#. (para) -#: ../source/book.xml:24064 ../source/book.xml:24115 ../source/book.xml:24161 -#: ../source/book.xml:24211 ../source/book.xml:24273 ../source/book.xml:24333 -#: ../source/book.xml:24380 ../source/book.xml:24432 ../source/book.xml:24479 -msgid "repository path" -msgstr "版本库路径" - -#. (para) -#: ../source/book.xml:24067 -msgid "authenticated username attempting the commit" -msgstr "认证过的用户名尝试提交" - -#. (title) -#: ../source/book.xml:24073 ../source/book.xml:24124 ../source/book.xml:24170 -#: ../source/book.xml:24233 ../source/book.xml:24295 ../source/book.xml:24346 -#: ../source/book.xml:24392 ../source/book.xml:24445 ../source/book.xml:24491 -msgid "Common Uses" -msgstr "普通用户" - -#. (para) -#: ../source/book.xml:24075 ../source/book.xml:24348 ../source/book.xml:24447 -msgid "access control" -msgstr "访问控制" - -#. (tertiary), (refname) -#: ../source/book.xml:24085 ../source/book.xml:24088 -msgid "pre-commit" -msgstr "pre-commit" - -#. (refpurpose) -#: ../source/book.xml:24089 -msgid "Notification just prior to commit completion." -msgstr "在提交结束之前提醒。" - -#. (para) -#: ../source/book.xml:24095 -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)." -msgstr "pre-commit hook在事务完成提交之前运行,通常这个钩子是用来保护因为内容或位置(例如,你要求所有到一个特定分支的提交必须包括一个bug追踪的ticket号,或者是要求日志信息不为空)而不允许的提交。" - -#. (para) -#: ../source/book.xml:24102 -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." -msgstr "如果pre-commit钩子返回非零值,提交会退出,提交事务被删除,所有标准错误的输出返回到客户端。" - -#. (para) -#: ../source/book.xml:24118 -msgid "commit transaction name" -msgstr "提交事务的名称" - -#. (para) -#: ../source/book.xml:24126 -msgid "change validation and control" -msgstr "修改确认和控制" - -#. (tertiary), (refname) -#: ../source/book.xml:24134 ../source/book.xml:24137 -msgid "post-commit" -msgstr "post-commit" - -#. (refpurpose) -#: ../source/book.xml:24138 -msgid "Notification of a successful commit." -msgstr "成功提交的通知。" - -#. (para) -#: ../source/book.xml:24144 -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." -msgstr " post-commit hook在事务完成后运行,创建一个新的修订版本。大多数人用这个钩子来发送关于提交的描述性电子邮件,或者作为版本库的备份。" - -#. (para) -#: ../source/book.xml:24150 -#, fuzzy -msgid "The output from, and exit value returned by the post-commit hook program are ignored." -msgstr "post-commit钩子程序的返回值和输出被忽略。" - -#. (para) -#: ../source/book.xml:24164 -msgid "revision number created by the commit" -msgstr "提交创建的版本号" - -#. (para) -#: ../source/book.xml:24172 -msgid "commit notification, tool integration" -msgstr "提交通知,工具集成" - -#. (tertiary), (refname) -#: ../source/book.xml:24180 ../source/book.xml:24183 -msgid "pre-revprop-change" -msgstr "pre-revprop-change" - -#. (refpurpose) -#: ../source/book.xml:24184 -msgid "Notification of a revision property change attempt." -msgstr "修订版本属性修改的通知。" - -#. (para) -#: ../source/book.xml:24191 -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." -msgstr "pre-revprop-change钩子在修订版本属性修改之前,正常提交范围之外被执行,不象其他钩子,这个钩子默认是拒绝所有的属性修改,钩子必须实际存在并且返回一个零值,这样属性修改才能实现。" - -#. (para) -#: ../source/book.xml:24198 -#, fuzzy -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." -msgstr "如果pre-revprop-change钩子没有实现或返回一个非零值,对属性的修改就不会成功,所以的标准错误输出会返回到客户端。" - -#. (para) -#: ../source/book.xml:24214 -msgid "revision whose property is about to be modified" -msgstr "要修改属性的修订版本" - -#. (para) -#: ../source/book.xml:24217 -msgid "authenticated username attempting the propchange" -msgstr "企图修改属性的认证用户名" - -#. (para) -#: ../source/book.xml:24220 ../source/book.xml:24282 -msgid "name of the property changed" -msgstr "属性名称已修改" - -#. (para) -#: ../source/book.xml:24223 ../source/book.xml:24285 -#, fuzzy -msgid "change description: A (added), D (deleted), or M (modified)" -msgstr "变更描述:A (添加的),D (删除的)或M (修改的)" - -#. (para) -#: ../source/book.xml:24228 -msgid "Additionally, Subversion passes to the hook program via standard input the proposed value of the property." -msgstr "此外,Subversion通过标准输入将属性值传递给钩子程序。" - -#. (para) -#: ../source/book.xml:24235 -msgid "access control, change validation and control" -msgstr "访问控制,修改确认和控制" - -#. (tertiary), (refname) -#: ../source/book.xml:24243 ../source/book.xml:24246 -msgid "post-revprop-change" -msgstr "post-revprop-change" - -#. (refpurpose) -#: ../source/book.xml:24247 -msgid "Notification of a successful revision property change." -msgstr "修订版本属性修改成功的通知" - -#. (para) -#: ../source/book.xml:24254 -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." -msgstr "post-revprop-change钩子会在修订版本属性修改后立即执行,在提交范围之外。可以从其对应物pre-revprop-change知道,如果没有实现pre-revprop-change钩子就不会执行。它通常用来在属性修改后发送邮件通知。" - -#. (para) -#: ../source/book.xml:24262 -#, fuzzy -msgid "The output from, and exit value returned by, the post-revprop-change hook program are ignored." -msgstr "post-revprop-change的返回值和输出会被忽略。" - -#. (para) -#: ../source/book.xml:24276 -msgid "revision whose property was modified" -msgstr "已经修改属性的修订版本" - -#. (para) -#: ../source/book.xml:24279 -msgid "authenticated username of the person making the change" -msgstr "做出修改的认证用户名" - -#. (para) -#: ../source/book.xml:24290 -#, fuzzy -msgid "Additionally, Subversion passes to the hook program, via standard input, the previous value of the property." -msgstr "此外,Subversion通过标准输入将属性的前一个值传递给钩子。" - -#. (para) -#: ../source/book.xml:24297 -msgid "propchange notification" -msgstr "属性修改通知" - -#. (tertiary), (refname) -#: ../source/book.xml:24305 ../source/book.xml:24308 -msgid "pre-lock" -msgstr "pre-lock" - -#. (refpurpose) -#: ../source/book.xml:24309 -msgid "Notification of a path lock attempt." -msgstr "路径锁定尝试的通知。" - -#. (para) -#: ../source/book.xml:24315 -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 steal the existing lock." -msgstr "这个钩子会在每次有人尝试锁定文件时执行,可以防止完全的锁定,或者用来指定控制哪些用户可以锁定特定路径的复杂策略,如果钩子发现已存在的钩子,也可以决定是否窃取这个钩子。" - -#. (para) -#: ../source/book.xml:24321 -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." -msgstr "如果pre-lock钩子返回非零值,锁定动作会退出,并将标准错误返回到客户端。" - -#. (para) -#: ../source/book.xml:24336 ../source/book.xml:24435 -msgid "versioned path which is to be locked" -msgstr "将要锁定的版本化路径" - -#. (para) -#: ../source/book.xml:24339 ../source/book.xml:24438 -msgid "authenticated username of the person attempting the lock" -msgstr "尝试锁定的认证用户名" - -#. (tertiary), (refname) -#: ../source/book.xml:24356 ../source/book.xml:24359 -msgid "post-lock" -msgstr "post-lock" - -#. (refpurpose) -#: ../source/book.xml:24360 -msgid "Notification of a successful path lock." -msgstr "成功锁定路径的通知。" - -#. (para) -#: ../source/book.xml:24366 -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." -msgstr "post-lock在路径锁定后执行,通常用来发送锁定事件邮件通知。" - -#. (para) -#: ../source/book.xml:24369 -#, fuzzy -msgid "The output from and exit value returned by the post-lock hook program are ignored." -msgstr "post-unlock钩子程序的输出和返回值会被忽略。" - -#. (para) -#: ../source/book.xml:24383 -msgid "authenticated username of the person who locked the paths" -msgstr "锁定路径的认证用户名" - -#. (para) -#: ../source/book.xml:24387 -msgid "Additionally, the list of paths locked is passed to the hook program via standard input, one path per line." -msgstr "此外,锁定路径通过标准输入传递给钩子程序,每行一个路径。" - -#. (para) -#: ../source/book.xml:24394 -msgid "lock notification" -msgstr "加锁通知" - -#. (tertiary), (refname) -#: ../source/book.xml:24402 ../source/book.xml:24405 -msgid "pre-unlock" -msgstr "pre-unlock" - -#. (refpurpose) -#: ../source/book.xml:24406 -msgid "Notification of a path unlock attempt." -msgstr "路径解锁尝试的通知。" - -#. (para) -#: ../source/book.xml:24412 -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." -msgstr "这个钩子在某人企图删除一个文件上的钩子时发生,可以用来制定哪些用户可以解除文件锁定的策略。制定破坏锁定的策略非常重要,如果一个用户A锁定了一个文件,允许用户B打开这个锁?如果这个锁已经一周了呢?这种事情可以通过钩子决定并执行。" - -#. (para) -#: ../source/book.xml:24420 -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." -msgstr "如果pre-unlock返回非零值,解锁过程就会退出,标准错误返回到客户端。" - -#. (tertiary), (refname) -#: ../source/book.xml:24455 ../source/book.xml:24458 -msgid "post-unlock" -msgstr "post-unlock" - -#. (refpurpose) -#: ../source/book.xml:24459 -msgid "Notification of a successful path unlock." -msgstr "路径成功解锁的通知。" - -#. (para) -#: ../source/book.xml:24465 -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." -msgstr "post-unlock在一个或多个路径已经被解锁后执行,通常用来发送解锁事件通知邮件。" - -#. (para) -#: ../source/book.xml:24468 -#, fuzzy -msgid "The output from and exit value returned by, the post-unlock hook program are ignored." -msgstr "post-unlock钩子程序的输出和返回值会被忽略。" - -#. (para) -#: ../source/book.xml:24482 -msgid "authenticated username of the person who unlocked the paths" -msgstr "路径解锁的认证用户名" - -#. (para) -#: ../source/book.xml:24486 -msgid "Additionally, the list of paths unlocked is passed to the hook program via standard input, one path per line." -msgstr "此外,解锁路径通过标准输入传递给钩子程序,每行一个路径。" - -#. (para) -#: ../source/book.xml:24493 -msgid "unlock notification" -msgstr "解锁通知" - -#. (title) -#: ../source/book.xml:24505 -msgid "Subversion Quick-Start Guide" -msgstr "Subversion 快速入门指南" - -#. (para) -#: ../source/book.xml:24507 -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." -msgstr "如果你渴望快速配置Subversion并运行(而且你喜欢通过实验学习),本章会展示如何创建版本库,导入代码,然后以工作拷贝检出,继续我们会给出本书的相关章节的链接。" - -#. (para) -#: ../source/book.xml:24513 -msgid "If you're new to the entire concept of version control or to the copy-modify-merge model used by both CVS and Subversion, then you should read before going any further." -msgstr "如果读者还不熟悉版本控制,以及在Subversion和CVS中使用的拷贝-修改-合并模型这些基础的概念,那么建议在进一步学习之前,首先阅读。" - -#. (title) -#: ../source/book.xml:24523 -msgid "Installing Subversion" -msgstr "安装 Subversion" - -#. (para) -#: ../source/book.xml:24525 -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 does not 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." -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等等。" - -#. (para) -#: ../source/book.xml:24537 -#, fuzzy -msgid "The easiest way to get Subversion is to download a binary package built for your operating system. Subversion's website (http://subversion.tigris.org) 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." -msgstr "最简单的安装Subversion的方法就是下载与你的操作系统对应的二进制程序包。在Subversion的网站()上通常可以找到由志愿者提供下载的程序包。在这个网站上,会提供微软操作系统上的图形化应用程序安装包。而对于类Unix系统,则可以使用其自身的程序包系统(PRMs、DEBs、ports tree等等)来获取Subversion。" - -#. (para) -#: ../source/book.xml:24546 -#, fuzzy -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 INSTALL 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 -deps. 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 INSTALL file." -msgstr "此外,还可以通过编译源代码包直接生成Subversion程序。首先,从Subversion网站下载最新的源代码包,然后解压缩。然后,根据INSTALL文件的指示进行编译。需要注意的是,正式发布的源代码包中包含了构建命令行客户端工具所需的全部内容(如apr,apr-util和neno库),可以直接进行编译。但是一些可选的组件则依赖于其它一些程序库,如Berkeley DB和Apache httpd。因此,如果想要进行完整的编译,请根据INSTALL文件中的内容确认这些程序库是否可用。" - -#. (para) -#: ../source/book.xml:24573 -#, fuzzy -msgid "Note that the URL checked out in the example above ends not with svn, but with a subdirectory thereof called trunk. See our discussion of Subversion's branching and tagging model for the reasoning behind this." -msgstr "注意上面例子中检出的URL并不是以svn结尾,而是它的一个叫做trunk的子目录,可以看我们对Subversion的分支和标签模型的讨论来理解背后的原因。" - -#. (para) -#: ../source/book.xml:24567 -#, fuzzy -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 http://svn.collab.net/repos/svn/trunk/: " -msgstr "如果你是一个喜欢使用最新软件的人,你可以从Subversion本身的版本库得到Subversion最新的源代码,显然,你首先需要一个Subversion客户端,有了之后,你就可以从检出一个Subversion源代码的工作拷贝:" - -#. (screen) -#: ../source/book.xml:24578 -#, no-wrap -msgid "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk subversion\n" -"A subversion/HACKING\n" -"A subversion/INSTALL\n" -"A subversion/README\n" -"A subversion/autogen.sh\n" -"A subversion/build.conf\n" -"…\n" -msgstr "" -"\n" -"$ svn checkout http://svn.collab.net/repos/svn/trunk subversion\n" -"A subversion/HACKING\n" -"A subversion/INSTALL\n" -"A subversion/README\n" -"A subversion/autogen.sh\n" -"A subversion/build.conf\n" -"…\n" - -#. (para) -#: ../source/book.xml:24587 -#, fuzzy -msgid "The above command will create a working copy of the latest (unreleased) Subversion source code into a subdirectory named subversion 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 INSTALL file in the top level of the working copy for details." -msgstr "上面的命令会检出一个流血的,最新的Subversion源代码版本到你的叫做subversion的当前工作目录。很明显,你可以调整最后的参数改为你需要的。不管你怎么称呼你的新的工作拷贝目录,在操作之后,你现在已经有了Subversion的源代码。当然,你还是需要得到一些帮助库(apr,apr-util等等)—见工作拷贝根目录的INSTALL来得到更多细节。" - -#. (title) -#: ../source/book.xml:24603 -msgid "High-speed Tutorial" -msgstr "快速指南" - -#. (quote) -#: ../source/book.xml:24607 -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…." -msgstr "请确定你坐在了正确的位置,你的盘桌已经关闭,乘务员们,准备起飞…。" - -#. (para) -#: ../source/book.xml:24612 -#, fuzzy -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." -msgstr "这是一个非常高层次的教程,能够帮助你熟悉Subversion的基本配置和操作,在结束这个教程时,你一定能够对Subversion的典型使用有了一个基础的认识。" - -#. (para) -#: ../source/book.xml:24617 -#, fuzzy -msgid "The examples used in this appendix assume that you have svn, the Subversion command-line client, and svnadmin, 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 svn --version to check.)" -msgstr "运行下面的例子需要首先正确安装Subversion客户端程序svn以及管理工具svnadmin,并且必须为1.2或更新版本的Subversion程序(可以运行svn --version来检查Subversion的版本。)" - -#. (para) -#: ../source/book.xml:24626 -msgid "Subversion stores all versioned data in a central repository. To begin, create a new repository:" -msgstr "Subversion的所有版本化数据都储存在中心版本库中。因此首先,我们需要创建一个版本库:" - -#. (screen) -#: ../source/book.xml:24628 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svnadmin create /var/svn/repos\n" -"$ ls /var/svn/repos\n" -"conf/ dav/ db/ format hooks/ locks/ README.txt\n" -msgstr "" -"\n" -"$ svnadmin create /path/to/repos\n" -"$ ls /path/to/repos\n" -"conf/ dav/ db/ format hooks/ locks/ README.txt\n" - -#. (para) -#: ../source/book.xml:24633 -#, fuzzy -msgid "This command creates a new directory /var/svn/repos 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 ." -msgstr "这个命令创建了一个新目录/path/to/repos,并在其中创建了一个Subversion版本库。这个目录里主要保存了一些数据库文件(还有其它一些文件),而不像CVS那样保存着版本化的文件。需要更多版本库创建和维护方面的内容,参见。" - -#. (para) -#: ../source/book.xml:24640 -msgid "Subversion has no concept of a project. 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 . Either way, the repository only manages files and directories, so it's up to humans to interpret particular directories as projects. 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." -msgstr "在Subversion没有项目的概念。Subversion的版本库只是一个虚拟的版本化文件系统,可以存放你想要存放的任何文件。有些管理员喜欢为每个项目建立一个独立的版本库,而另外一些管理员则喜欢将多个项目存放到同一个版本库的不同目录里。这两种方式各有各的优点,关于这方面内容的叙述,参见。不论是哪一种方式,版本库都只是负责管理文件和目录,而项目则是人为指定的概念。因此,尽管本书中遍布着项目这个词,但是请记住我们只不过是在谈论版本库中的某些特定目录(或者是一组目录)。" - -#. (para) -#: ../source/book.xml:24653 -#, fuzzy -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 myproject (or whatever you wish). For reasons that will be clear later (see ), your project's tree structure should contain three top-level directories named branches, tags, and trunk. The trunk directory should contain all of your data, while branches and tags directories are empty:" -msgstr "在这个例子中,我们假定已经有一些需要导入到Subversion版本库的条目(一组文件和目录)。接下来,我们需要把这些条目整理到一个名为myproject的目录(或者其它任意目录)里。在这个目录下,创建三个顶级子目录:branchestagstrunk,这样做的原因将在后文中阐述。之后,将所有需版本化的数据保存到trunk目录下,同时保持branchestags目录为空:" - -#. (screen) -#: ../source/book.xml:24667 -#, no-wrap -msgid "" -"\n" -"/tmp/myproject/branches/\n" -"/tmp/myproject/tags/\n" -"/tmp/myproject/trunk/\n" -" foo.c\n" -" bar.c\n" -" Makefile\n" -" …\n" -msgstr "" -"\n" -"/tmp/myproject/branches/\n" -"/tmp/myproject/tags/\n" -"/tmp/myproject/trunk/\n" -" foo.c\n" -" bar.c\n" -" Makefile\n" -" …\n" - -#. (para) -#: ../source/book.xml:24676 -#, fuzzy -msgid "The branches, tags, and trunk subdirectories aren't actually required by Subversion. They're merely a popular convention that you'll most likely want to use later on." -msgstr "branchestagstrunk这三个子目录不是Subversion必须的。但这样做是Subversion的习惯用法,我们还是遵守这个约定吧。" - -#. (para) -#: ../source/book.xml:24680 -#, fuzzy -msgid "Once you have your tree of data ready to go, import it into the repository with the svn import command (see ):" -msgstr "准备好了数据之后,就可以使用svn import命令(参见)将其导入到版本库中:" - -#. (screen) -#: ../source/book.xml:24683 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn import /tmp/myproject file:///var/svn/repos/myproject -m \"initial import\"\n" -"Adding /tmp/myproject/branches\n" -"Adding /tmp/myproject/tags\n" -"Adding /tmp/myproject/trunk\n" -"Adding /tmp/myproject/trunk/foo.c\n" -"Adding /tmp/myproject/trunk/bar.c\n" -"Adding /tmp/myproject/trunk/Makefile\n" -"…\n" -"Committed revision 1.\n" -"$ \n" -msgstr "" -"\n" -"$ svn import /tmp/myproject file:///path/to/repos/myproject -m \"initial import\"\n" -"Adding /tmp/myproject/branches\n" -"Adding /tmp/myproject/tags\n" -"Adding /tmp/myproject/trunk\n" -"Adding /tmp/myproject/trunk/foo.c\n" -"Adding /tmp/myproject/trunk/bar.c\n" -"Adding /tmp/myproject/trunk/Makefile\n" -"…\n" -"Committed revision 1.\n" -"$ \n" - -#. (para) -#: ../source/book.xml:24695 -#, fuzzy -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 myproject, which in turn contains your data." -msgstr "现在版本库中已经保存了目录中的数据。如前所述,直接查看版本库是看不到文件和目录的;它们存放在数据库之中。但是版本库的虚拟文件系统中则包含了一个名为myproject的顶级目录,其中依此保存了所有的数据。" - -#. (para) -#: ../source/book.xml:24701 -#, fuzzy -msgid "Note that the original /tmp/myproject 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 working copy of the data, a sort of private workspace. Ask Subversion to check out a working copy of the myproject/trunk directory in the repository:" -msgstr "注意我们在一开始创建的那个/tmp/myproject目录并没有改变,Subversion并不在意它(事实上,完全可以删除这个目录)。要开始使用版本库数据,我们还要创建一个新的用于存储数据的工作拷贝,这是一个私有工作区。从Subversion版本库里检出一个myproject/trunk目录工作拷贝的操作如下:" - -#. (screen) -#: ../source/book.xml:24709 -#, fuzzy, no-wrap -msgid "" -"\n" -"$ svn checkout file:///var/svn/repos/myproject/trunk myproject\n" -"A myproject/foo.c\n" -"A myproject/bar.c\n" -"A myproject/Makefile\n" -"…\n" -"Checked out revision 1.\n" -msgstr "" -"\n" -"$ svn checkout file:///path/to/repos/myproject/trunk myproject\n" -"A myproject/foo.c\n" -"A myproject/bar.c\n" -"A myproject/Makefile\n" -"…\n" -"Checked out revision 1.\n" - -#. (para) -#: ../source/book.xml:24717 -#, fuzzy -msgid "Now you have a personal copy of part of the repository in a new directory named myproject. You can edit the files in your working copy and then commit those changes back into the repository." -msgstr "现在,在myproject目录下生成了一个版本库数据的独立拷贝。我们可以在这个工作拷贝中编辑文件,并将修改提交到版本库中。" - -#. (para) -#: ../source/book.xml:24723 -msgid "Enter your working copy and edit a file's contents." -msgstr "进入工作拷贝目录,编辑某个文件的内容。" - -#. (para) -#: ../source/book.xml:24727 -#, fuzzy -msgid "Run svn diff to see unified diff output of your changes." -msgstr "运行svn diff以标准差别格式查看修改的内容。" - -#. (para) -#: ../source/book.xml:24731 -#, fuzzy -msgid "Run svn commit to commit the new version of your file to the repository." -msgstr "运行svn commit将更改提交到版本库中。" - -#. (para) -#: ../source/book.xml:24735 -#, fuzzy -msgid "Run svn update to bring your working copy up-to-date with the repository." -msgstr "运行svn update更新工作拷贝。" - -#. (para) -#: ../source/book.xml:24739 -msgid "For a full tour of all the things you can do with your working copy, read ." -msgstr "完整的工作拷贝操作指南,请参见。" - -#. (para) -#: ../source/book.xml:24741 -msgid "At this point, you have the option of making your repository available to others over a network. See to learn about the different sorts of server processes available and how to configure them." -msgstr "现在,Subversion版本库可以通过网络方式访问。参考,了解不同服务器软件的使用以及配置方法。" - -#. (title) -#: ../source/book.xml:24755 -msgid "Subversion for CVS Users" -msgstr "CVS 用户的 Subversion 指南" - -#. (para) -#: ../source/book.xml:24757 -msgid "This appendix is a guide for CVS users new to Subversion. It's essentially a list of differences between the two systems as viewed from 10,000 feet. For each section, we provide backreferences to relevant chapters when possible." -msgstr "这个附录可以作为CVS用户开始使用Subversion的指南,实质上就是鸟瞰这两个系统之间的区别列表,在每一小节,我们会尽可能提供相关章节的引用。" - -#. (para) -#: ../source/book.xml:24762 -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 broken 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." -msgstr "尽管Subversion的目标是接管当前和未来的CVS用户基础,需要一些新的特性设计来修正一些CVS不好的行为习惯,这意味着,作为一个CVS用户,你或许需要打破习惯—忘记一些奇怪的习惯来作为开始。" - -#. (title) -#: ../source/book.xml:24773 -msgid "Revision Numbers Are Different Now" -msgstr "版本号现在不同了" - -#. (para) -#: ../source/book.xml:24775 -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." -msgstr "在CVS中,修订版本号是每文件的,这是因为CVS使用RCS文件保存数据,每个文件都在版本库有一个对应的RCS文件,版本库几乎就是根据项目树的结构创建。" - -#. (para) -#: ../source/book.xml:24779 -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 revision 54, they're talking about a particular tree (and indirectly, the way the filesystem looked after the 54th commit)." -msgstr "在Subversion,版本库看起来像是一个单独的文件系统,每次提交导致一个新的文件系统;本质上,版本库是一堆树,每棵树都有一个单独的修订版本号。当有人谈论修订版本54时,他们是在讨论一个特定的树(并且间接来说,文件系统在提交54次之后的样子)。" - -#. (para) -#: ../source/book.xml:24786 -#, fuzzy -msgid "Technically, it's not valid to talk about revision 5 of foo.c. Instead, one would say foo.c as it appears in revision 5. Also, be careful when making assumptions about the evolution of a file. In CVS, revisions 5 and 6 of foo.c are always different. In Subversion, it's most likely that foo.c did not change between revisions 5 and 6." -msgstr "技术上讲,谈论文件foo.c的修订版本5是不正确的,相反,一个人会说foo.c在修订版本5出现。同样,我们在假定文件的进展时也要小心,在CVS,文件foo.c的修订版本5和6一定是不同的,在Subversion,foo.c可能在修订版本5和6之间没有改变。" - -#. (para) -#: ../source/book.xml:24795 -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 /branches or /tags directories that appear at the top level of the repository, beside /trunk). 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 foo.c as it appears in /branches/REL1 in revision 5." -msgstr "类似的,在CVS中标签或分支是文件的一种标注,或者是单个文件的版本信息,而在Subversion中,标签和分支是整个目录树的拷贝(为了方便,进入版本库顶级目录的/branches/tags子目录,/trunk旁边)。版本库作为一个整体,每个文件的许多版本可见:每个分支的最新版本,每个标签的最新版本以及trunk本身的最新版本。所以,我们再精炼一下术语,我们说foo.c在修订版本5出现在/branches/REL1" - -#. (para) -#: ../source/book.xml:24808 -msgid "For more details on this topic, see ." -msgstr "更多细节见." - -#. (title) -#: ../source/book.xml:24815 -msgid "Directory Versions" -msgstr "目录的版本" - -#. (para) -#: ../source/book.xml:24817 -msgid "Subversion tracks tree structures, not just file contents. It's one of the biggest reasons Subversion was written to replace CVS." -msgstr "Subversion会记录目录树的结构,不仅仅是文件的内容。这是编写Subversion替代CVS最重要的一个原因。" - -#. (para) -#: ../source/book.xml:24820 -msgid "Here's what this means to you, as a former CVS user:" -msgstr "以下是对你这意味着什么的说明,作为一个前CVS用户:" - -#. (para) -#: ../source/book.xml:24823 -#, fuzzy -msgid "The svn add and svn delete commands work on directories now, just as they work on files. So do svn copy and svn move. However, these commands do not cause any kind of immediate change in the repository. Instead, the working items are simply scheduled for addition or deletion. No repository changes happen until you run svn commit." -msgstr "svn addsvn delete现在也工作在目录上了,就像在文件上一样,还有svn copysvn move也一样。然而,这些命令会导致版本库即时的变化,相反,工作的项目只是预定要添加和删除,在运行svn commit之前没有版本库的修改。" - -#. (para) -#: ../source/book.xml:24834 -#, fuzzy -msgid "Directories aren't dumb containers anymore; they have revision numbers like files. (Or more properly, it's correct to talk about directory foo/ in revision 5.)" -msgstr "目录不再是哑容器了;它们也有文件一样的修订版本号。(更准确一点,谈论修订版本5的目录 foo/是正确的。)" - -#. (para) -#: ../source/book.xml:24840 -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." -msgstr "让我们再讨论一下最后一点,目录版本化是一个困难的问题;因为我们希望允许混合修订版本的工作拷贝,有一些防止我们滥用这个模型的限制。" - -#. (para) -#: ../source/book.xml:24844 -#, fuzzy -msgid "From a theoretical point of view, we define revision 5 of directory foo to mean a specific collection of directory-entries and properties. Now suppose we start adding and removing files from foo, and then commit. It would be a lie to say that we still have revision 5 of foo. However, if we bumped foo's revision number after the commit, that would be a lie too; there may be other changes to foo we haven't yet received, because we haven't updated yet." -msgstr "从理论观点,我们定义目录foo的修订版本5意味着一组目录条目和属性。现在假定我们从foo开始添加和删除文件,然后提交。如果说我们还有foo的修订版本5就是一个谎言。然而,如果说我们在提交之后增加了一位foo的修订版本号码,这也是一个谎言;foo还有一些修改我们没有得到,因为我们还没有更新。" - -#. (para) -#: ../source/book.xml:24855 -#, fuzzy -msgid "Subversion deals with this problem by quietly tracking committed adds and deletes in the .svn area. When you eventually run svn update, all accounts are settled with the repository, and the directory's new revision number is set correctly. Therefore, only after an update is it truly safe to say that you have a perfect revision of a directory. Most of the time, your working copy will contain imperfect directory revisions." -msgstr "Subversion通过在.svn区域偷偷的纪录添加和删除来处理这些问题,当你最后运行svn update,所有的账目会到版本库结算,并且目录的新修订版本号会正确设置。因此,只有在更新之后才可以真正安全地说我们有了一个完美的修订版本目录。在大多数时候,你的工作拷贝会保存不完美的目录修订版本。" - -#. (para) -#: ../source/book.xml:24864 -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. Therefore, you are not allowed to commit property-changes on a directory unless the directory is up-to-date." -msgstr "同样的,如果你尝试提交目录的属性修改会有一个问题,通常情况下,提交应该会提高工作目录的本地修订版本号,但是再一次,这还是一个谎言,因为这个目录还没有添加和删除发生,因为还没有更新发生。因此,在你的目录不是最新的时候不允许你提交属性修改。" - -#. (para) -#: ../source/book.xml:24872 -msgid "For more discussion about the limitations of directory versioning, see ." -msgstr "关于目录版本的更多讨论见。" - -#. (title) -#: ../source/book.xml:24880 -msgid "More Disconnected Operations" -msgstr "更多离线操作" - -#. (para) -#: ../source/book.xml:24882 -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." -msgstr "近些年来,磁盘空间变得异常便宜和丰富,但是网络带宽还没有,因此Subversion工作拷贝为紧缺资源进行了优化。" - -#. (para) -#: ../source/book.xml:24886 -#, fuzzy -msgid "The .svn administrative directory serves the same purpose as the CVS directory, except that it also stores read-only, pristine copies of your files. This allows you to do many things off-line:" -msgstr ".svn管理目录维护者与CVS同样的功能,除了它还保存了只读的文件原始拷贝,这允许你做许多离线操作:" - -#. (para) -#: ../source/book.xml:24897 -msgid "Shows you any local changes you've made (see )" -msgstr "显示你所做的本地修改(见)" - -#. (para) -#: ../source/book.xml:24905 -msgid "Shows you the details of your changes (see )" -msgstr "显示修改的详细信息(见see )" - -#. (para) -#: ../source/book.xml:24913 -msgid "Removes your local changes (see )" -msgstr "删除你的本地修改(见)" - -#. (para) -#: ../source/book.xml:24917 -msgid "Also, the cached pristine files allow the Subversion client to send differences when committing, which CVS cannot do." -msgstr "另外,原始文件的缓存允许Subversion客户端在提交时只提交区别,这是CVS做不到的。" - -#. (para) -#: ../source/book.xml:24919 -#, fuzzy -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 rm file; svn update will still work, but it blurs the purpose of updating. And, while we're on this subject…" -msgstr "列表中最后一个子命令是新的;它不仅仅删除本地修改,也会取消如增加和删除的预定操作,这是恢复文件推荐的方式;运行rm file; svn update还可以工作,但是这样侮辱了更新操作的作用,而且,我们在这个主题…" - -#. (title) -#: ../source/book.xml:24933 -msgid "Distinction Between Status and Update" -msgstr "区分状态和更新" - -#. (para) -#: ../source/book.xml:24935 -#, fuzzy -msgid "In Subversion, we've tried to erase a lot of the confusion between the cvs status and cvs update commands." -msgstr "在Subversion,我们已经设法抹去cvs statuscvs update之间的混乱。" - -#. (para) -#: ../source/book.xml:24938 -#, fuzzy -msgid "The cvs status 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 cvs update or cvs -n update to quickly see their changes. If users forget to use the option, this has the side effect of merging repository changes they may not be ready to deal with." -msgstr "cvs status命令有两个目的:第一,显示用户在工作拷贝的所有本地修改,第二,显示给用户哪些文件是最新的。很不幸,因为CVS难以阅读的状态输出,许多CVS用户并没有充分利用这个命令的好处。相反,他们慢慢习惯运行cvs updatecvs -n update来快速查看区别,如果用户忘记使用选项,副作用就是将还没有准备好处理的版本库修改合并到工作拷贝。" - -#. (para) -#: ../source/book.xml:24949 -#, fuzzy -msgid "With Subversion, we've tried to remove this muddle by making the output of svn status easy to read for both humans and parsers. Also, svn update only prints information about files that are updated, not local modifications." -msgstr "对于Subversion,我们通过修改svn status的输出使之同时满足阅读和解析的需要来努力消除这种混乱,同样,svn update只会打印将要更新的文件信息,而不是本地修改。" - -#. (title) -#: ../source/book.xml:24956 -msgid "Status" -msgstr "状态" - -#. (para) -#: ../source/book.xml:24958 -#, fuzzy -msgid "svn status 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:" -msgstr "svn status打印所有本地修改的文件,缺省情况下,不会联系版本库,然而这个命令接受一些选项,如下是一些最常用的:" - -#. (option) -#: ../source/book.xml:24965 -msgid "-u" -msgstr "-u" - -#. (para) -#: ../source/book.xml:24968 -msgid "Contact the repository to determine, and then display, out-of-dateness information." -msgstr "访问版本库检测并显示过期的信息。" - -#. (option) -#: ../source/book.xml:24974 -msgid "-v" -msgstr "-v" - -#. (para) -#: ../source/book.xml:24977 -msgid "Show all entries under version control." -msgstr "显示所有版本控制下的文件。" - -#. (option) -#: ../source/book.xml:24983 -msgid "-N" -msgstr "-N" - -#. (para) -#: ../source/book.xml:24986 -msgid "Run non-recursively (do not descend into subdirectories)." -msgstr "非递归方式运行(不会访问子目录)。" - -#. (para) -#: ../source/book.xml:24991 -#, fuzzy -msgid "The status command has two output formats. In the default short format, local modifications look like this:" -msgstr "status命令有两种输出格式,缺省是格式,本地修改像这样:" - -#. (screen) -#: ../source/book.xml:24994 -#, no-wrap -msgid "" -"\n" -"$ svn status\n" -"M foo.c\n" -"M bar/baz.c\n" -msgstr "" -"\n" -"$ svn status\n" -"M foo.c\n" -"M bar/baz.c\n" - -#. (para) -#: ../source/book.xml:24999 -#, fuzzy -msgid "If you specify the () option, a longer output format is used:" -msgstr "如果你指定)选项,就会使用较长的格式输出:" - -#. (screen) -#: ../source/book.xml:25002 -#, no-wrap -msgid "" -"\n" -"$ svn status -u\n" -"M 1047 foo.c\n" -" * 1045 faces.html\n" -" * bloo.png\n" -"M 1050 bar/baz.c\n" -"Status against revision: 1066\n" -msgstr "" -"\n" -"$ svn status -u\n" -"M 1047 foo.c\n" -" * 1045 faces.html\n" -" * bloo.png\n" -"M 1050 bar/baz.c\n" -"Status against revision: 1066\n" - -#. (para) -#: ../source/book.xml:25010 -#, fuzzy -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 faces.html would be patched if we updated, and that bloo.png is a newly added file in the repository. (The absence of any revision number next to bloo.png means that it doesn't yet exist in the working copy.)" -msgstr "在这个例子里,出现了两列,第二列的星号表示了文件或目录是否过期,第三列显示了工作拷贝修订版本号,在上面的例子里,星号表示如果进行更新,faces.html会被合并,而bloo.png则是版本库新加的文件。(bloo.png前面的修订版本号为空表示了这个文件在工作拷贝已经不存在了。)" - -#. ###TODO describe -v here as well as -uv. -u and -v use -#. different long formats and need to be -#. documented separately. Moreover, as you can combine -u and -#. -v, it needs to be explained what each of them does. As -u is -#. much more important than -v, and the example following that -#. paragraph *is* about -u, not -v, my patch concentrated on -#. that. -#. (para) -#: ../source/book.xml:25026 -msgid "At this point, you should take a quick look at the list of all possible status codes in . Here are a few of the more common status codes you'll see:" -msgstr "此刻,你必须赶快看一下中所说的可能属性代码,下面是一些你会看到的常用状态代码:" - -#. (screen) -#: ../source/book.xml:25030 -#, no-wrap -msgid "" -"\n" -"A Resource is scheduled for Addition\n" -"D Resource is scheduled for Deletion\n" -"M Resource has local Modifications\n" -"C Resource has Conflicts (changes have not been completely merged\n" -" between the repository and working copy version)\n" -"X Resource is eXternal to this working copy (may come from another\n" -" repository). See \n" -"? Resource is not under version control\n" -"! Resource is missing or incomplete (removed by another tool than\n" -" Subversion)\n" -msgstr "" -"\n" -"A Resource is scheduled for Addition\n" -"D Resource is scheduled for Deletion\n" -"M Resource has local Modifications\n" -"C Resource has Conflicts (changes have not been completely merged\n" -" between the repository and working copy version)\n" -"X Resource is eXternal to this working copy (may come from another\n" -" repository). See \n" -"? Resource is not under version control\n" -"! Resource is missing or incomplete (removed by another tool than\n" -" Subversion)\n" - -#. (para) -#: ../source/book.xml:25042 -#, fuzzy -msgid "For a more detailed discussion of svn status, see ." -msgstr "关于svn status的详细讨论,见。" - -#. (title) -#: ../source/book.xml:25047 -msgid "Update" -msgstr "更新" - -#. (para) -#: ../source/book.xml:25049 -#, fuzzy -msgid "svn update updates your working copy, and only prints information about files that it updates." -msgstr "svn update会更新你的工作拷贝,只打印这次更新的文件。" - -#. (para) -#: ../source/book.xml:25051 -#, fuzzy -msgid "Subversion has combined the CVS P and U codes into just U. When a merge or conflict occurs, Subversion simply prints G or C, rather than a whole sentence about it." -msgstr "Subversion将CVS的PU合并为U,当合并或冲突发生时,Subversion会简单的打印GC,而不是大段相关内容。" - -#. (para) -#: ../source/book.xml:25056 -#, fuzzy -msgid "For a more detailed discussion of svn update, see ." -msgstr "关于svn update的详细讨论,见。" - -#. (title) -#: ../source/book.xml:25065 -msgid "Branches and Tags" -msgstr "分支和标签" - -#. (para) -#: ../source/book.xml:25067 -msgid "Subversion doesn't distinguish between filesystem space and branch 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 ." -msgstr "Subversion不区分文件系统空间和分支空间;分支和标签都是普通的文件系统目录,这恐怕是CVS用户需要逾越的最大心理障碍,所有信息在。" - -#. (para) -#: ../source/book.xml:25082 -msgid "That is, providing you don't run out of disk space before your checkout finishes." -msgstr "如果在检出完成之前没有消耗完磁盘空间的话。" - -#. (para) -#: ../source/book.xml:25073 -#, fuzzy -msgid "Since Subversion treats branches and tags as ordinary directories, always remember to check out the trunk (http://svn.example.com/repos/calc/trunk/) of your project, and not the project itself (http://svn.example.com/repos/calc/). 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." -msgstr "因为Subversion把分支和标签看作普通目录看待,一直要记住检出项目的trunkhttp://svn.example.com/repos/calc/trunk/),而不是项目本身的(http://svn.example.com/repos/calc/)。如果你错误的检出了项目本身,你会紧张的发现你的项目拷贝包含了所有的分支和标签。" - -#. (title) -#: ../source/book.xml:25092 -msgid "Metadata Properties" -msgstr "元数据属性" - -#. (para) -#: ../source/book.xml:25094 -msgid "A new feature of Subversion is that you can attach arbitrary metadata (or properties) to files and directories. Properties are arbitrary name/value pairs associated with files and directories in your working copy." -msgstr "Subversion的一个新特性就是你可以对文件和目录任意附加元数据(或者是属性),属性是关联在工作拷贝文件或目录的任意名称/值对。" - -#. (para) -#: ../source/book.xml:25099 -#, fuzzy -msgid "To set or get a property name, use the svn propset and svn propget subcommands. To list all properties on an object, use svn proplist." -msgstr "为了设置或得到一个属性名称,使用svn propsetsvn propget子命令,列出对象所有的属性,使用svn proplist。" - -#. (para) -#: ../source/book.xml:25103 -msgid "For more information, see ." -msgstr "更多信息见。" - -#. (title) -#: ../source/book.xml:25110 -msgid "Conflict Resolution" -msgstr "解决冲突" - -#. (para) -#: ../source/book.xml:25112 -#, fuzzy -msgid "CVS marks conflicts with in-line conflict markers, and prints a C during an update. Historically, this has caused problems, because CVS isn't doing enough. Many users forget about (or don't see) the C 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." -msgstr "CVS使用内联冲突标志来标记冲突,并且在更新时打印C。历史上讲,这导致了许多问题,因为CVS做得还不够。许多用户在它们快速闪过终端时忘记(或没有看到)C,即使出现了冲突标记,他们也经常忘记,然后提交了带有冲突标记的文件。" - -#. (para) -#: ../source/book.xml:25120 -#, fuzzy -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 svn resolved. See for more details." -msgstr "Subversion通过让冲突更明显来解决这个问题,它记住一个文件是处于冲突状态,在你运行svn resolved之前不会允许你提交修改,详情见。" - -#. (title) -#: ../source/book.xml:25130 -msgid "Binary Files and Translation" -msgstr "二进制文件和行结束标记转换" - -#. (para) -#: ../source/book.xml:25132 -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." -msgstr "在大多数情况下,Subversion比CVS更好的处理二进制文件,因为CVS使用RCS,它只可以存储二进制文件的完整拷贝,但是,Subversion使用二进制区别算法来表示文件的区别,而不管文件是文本文件还是二进制文件。这意味着所有的文件是以微分的(压缩的)形式存放在版本库。" - -#. (para) -#: ../source/book.xml:25139 -msgid "CVS users have to mark binary files with flags, to prevent data from being garbled (due to keyword expansion and line-ending translations). They sometimes forget to do this." -msgstr "CVS用户需要使用选项来标记二进制文件,防止数据的混淆(因为关键字解释和行结束转化),他们有时候会忘记这样做。" - -#. (para) -#: ../source/book.xml:25143 -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 and 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." -msgstr "Subversion使用更加异想天开的方法—第一,如果你不明确的告诉它(详情见)这样做,它不会做任何关键字或行结束转化的操作,缺省情况下Subversion会把所有的数据看作字节串,所有的储存在版本库的文件都处于未转化的状态。" - -#. (para) -#: ../source/book.xml:25149 -#, fuzzy -msgid "Second, Subversion maintains an internal notion of whether a file is text or binary data, but this notion is only extant in the working copy. During an svn update, Subversion will perform contextual merges on locally modified text files, but will not attempt to do so for binary files." -msgstr "第二,Subversion维护了一个内部的概念来区别一个文件是文本还是二进制文件,但这个概念在工作拷贝非常重要,在svn update,Subversion会对本地修改的文本文件执行上下文的合并,但是对二进制文件不会。" - -#. (para) -#: ../source/book.xml:25155 -#, fuzzy -msgid "To determine whether a contextual merge is possible, Subversion examines the svn:mime-type property. If the file has no svn:mime-type property, or has a mime-type that is textual (e.g. text/*), Subversion assumes it is text. Otherwise, Subversion assumes the file is binary. Subversion also helps users by running a binary-detection algorithm in the svn import and svn add commands. These commands will make a good guess and then (possibly) set a binary svn:mime-type property on the file being added. (If Subversion guesses wrong, the user can always remove or hand-edit the property.)" -msgstr "为了检测一个上下文的合并是可能的,Subversion检测svn:mime-type属性,如果没有svn:mime-type属性,或者这个属性是文本的(例如text/*),Subversion会假定它是文本的,否则Subversion认为它是二进制文件。Subversion也会在svn importsvn add命令时通过运行一个二进制检测算法来帮助用户。这些命令会做出很好的猜测,然后(如果可能)设置添加文件的svn:mime-type属性。(如果Subversion猜测错误,用户可以删除或手工编辑这个属性。)" - -#. (title) -#: ../source/book.xml:25174 -msgid "Versioned Modules" -msgstr "版本化的模块" - -#. (para) -#: ../source/book.xml:25176 -#, fuzzy -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 svn update will update the working copy appropriately, adding and removing components." -msgstr "不像CVS,Subversion工作拷贝会意识到它检出了一个模块,这意味着如果有人修改了模块的定义(例如添加和删除组件),然后一个对svn update的调用会适当的更新工作拷贝,添加或删除组件。" - -#. (para) -#: ../source/book.xml:25181 -msgid "Subversion defines modules as a list of directories within a directory property: see ." -msgstr "Subversion定义了模块作为一个目录属性的目录列表:见。" - -#. (title) -#: ../source/book.xml:25189 -msgid "Authentication" -msgstr "认证" - -#. (para) -#: ../source/book.xml:25191 -#, fuzzy -msgid "With CVS's pserver, you are required to login to the server before any read or write operation—you sometimes even have to login for anonymous operations. With a Subversion repository using Apache httpd or svnserve 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." -msgstr "通过CVS的pserver,你需要在读写操作之前登陆到服务器—即使是匿名操作。Subversion版本库使用Apache的httpdsvnserve作为服务器,你不需要开始时提供认证凭证—如果一个操作需要认证,服务器会要求你的凭证(不管这凭证是用户名与密码,客户证书还是两个都有)。所以如果你的工作拷贝是全局可读的,在所有的读操作中不需要任何认证。" - -#. (para) -#: ../source/book.xml:25203 -#, fuzzy -msgid "As with CVS, Subversion still caches your credentials on disk (in your ~/.subversion/auth/ directory) unless you tell it not to by using the option." -msgstr "相对于CVS,Subversion会一直在磁盘(在你的~/.subversion/auth/目录)缓存凭证,除非你通过选项告诉它不这样做。" - -#. (para) -#: ../source/book.xml:25207 -#, fuzzy -msgid "The exception to this behavior, however, is in the case of accessing an svnserve server over an SSH tunnel, using the svn+ssh:// URL scheme. In that case, the ssh program unconditionally demands authentication just to start the tunnel." -msgstr "这个行为也有例外,当使用SSH管道的svnserve服务器时,使用svn+ssh://的URL模式这种情况下,ssh会在通道刚开始时无条件的要求认证。" - -#. (title) -#: ../source/book.xml:25218 -msgid "Converting a Repository from CVS to Subversion" -msgstr "迁移 CVS 版本库到 Subversion" - -#. (para) -#: ../source/book.xml:25220 -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." -msgstr "或许让CVS用户熟悉Subversion最好的办法就是让他们的项目继续在新系统下工作,这可以简单得通过平淡的把CVS版本库的导出数据导入到Subversion完成,或者是更加完全的方案,不仅仅包括最新数据快照,还包括所有的历史,从一个系统到另一个系统。这是一个非常困难的问题,包括推导保持原子性的修改集,转化两个系统完全不同的分支政策。但是我们还是有许多工具声称至少部分具备了的转化已存在的CVS版本库为Subversion版本库的能力。" - -#. (para) -#: ../source/book.xml:25233 -msgid "The most popular (and likely the most mature) conversion tool is cvs2svn (http://cvs2svn.tigris.org/), 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." -msgstr "最流行的(好像是最成熟的)转化工具是cvs2svn(http://cvs2svn.tigris.org/),它是最初由Subversion自己的开发社区成员开发的一个Python脚本:它会多次扫描你的CVS版本库,并尽可能尝试推断提交,分支和标签,当它结束时,结果是可以代表代码历史的Subversion版本库或可移植的Subversion转储文件,关于指令和警告的详细信息可以看网站。" - -#. (title) -#: ../source/book.xml:25251 -msgid "WebDAV and Autoversioning" -msgstr "WebDAV 和自动版本" - -#. (para) -#: ../source/book.xml:25253 -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 shares exported by WebDAV servers." -msgstr "WebDAV是HTTP的一个扩展,作为一个文件共享的标准不断发展。当今的操作系统变得极端的web化,许多内置了对装配WebDAV服务器导出的共享的支持。" - -#. (para) -#: ../source/book.xml:25258 -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." -msgstr "如果你使用Apache/mod_dav_svn作为你的Subversion网络服务器,某种程度上,你也是在运行一个WebDAV服务器。这个附录提供了这种协议一些背景知识,Subversion如何使用它,Subversion如何和认识WebDAV的软件交互工作。" - -#. (title) -#: ../source/book.xml:25268 -msgid "What is WebDAV?" -msgstr "什么是 WebDAV ?" - -#. (para) -#: ../source/book.xml:25270 -msgid "DAV stands for Distributed Authoring and Versioning. 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 mount shared folders over HTTP that behave much like other network filesystems (such as NFS or SMB.)" -msgstr "DAV的意思是Distributed Authoring and Versioning。RFC 2518为HTTP 1.1定义了一组概念和附加扩展方法来把web变成一个更加普遍的读/写媒体,基本思想是一个WebDAV兼容的web服务器可以像普通的文件服务器一样工作;客户端可以通过HTTP装配类似于NFS或SMB的WebDAV共享文件夹。" - -#. (para) -#: ../source/book.xml:25278 -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." -msgstr "悲惨的是,RFC规范并没有提供任何版本控制模型。基本的DAV客户端和服务器只是假定每个文件或目录只有一个版本存在,可以重复的覆盖。" - -#. (para) -#: ../source/book.xml:25283 -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 V back in DAV — hence the term DeltaV. WebDAV/DeltaV clients and servers are often called just DeltaV programs, since DeltaV implies the existence of basic WebDAV." -msgstr "因为RFC 2518漏下了版本概念,几年之后,另一个委员会留下来负责撰写RFC 3253来添加WebDAV的版本化,也就是DeltaV。WebDAV/DeltaV客户端和服务器经常叫做DeltaV客户端和服务器,因为DeltaV暗含了基本的WebDAV。" - -#. (para) -#: ../source/book.xml:25291 -#, fuzzy -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." -msgstr "最初的WebDAV标准得到了广泛的成功,所有的现代操作系统拥有内置的(后面有详细资料)对普通WebDAV的支持,许多流行的应用程序也可以使用WebDAV—Microsoft Office,Dreamweaver和Photoshop。在服务器方面,Apache从1998年就开始支持WebDAV,并被认为是一个事实上的开源标准,也有许多商业的WebDAV服务器,例如Microsoft的IIS。" - -#. (para) -#: ../source/book.xml:25300 -#, fuzzy -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." -msgstr "不幸的是,DeltaV没有这样的成功,很难寻找到任何DeltaV客户端和服务器。只有一些不太出名的商业产品,因此很难测试交互性,不清楚为什么DeltaV还这样停滞,一些人说规范太复杂了,还有些人认为尽管DeltaV的特性有很大的吸引力(即使最新的技术用户也喜欢使用网络文件共享),版本控制特性对大多数用户还不是这样有趣和必须。最后,有些人认为DeltaV还这样不流行主要是因为一直没有开源的服务器产品实现它。" - -#. (para) -#: ../source/book.xml:25312 -#, fuzzy -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 (mod_dav_svn) 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." -msgstr "当Subversion还在设计阶段时,使用Apache的httpd作为主要网络服务器就是一个很好的想法,已经有了支持WebDAV服务的模块。DeltaV有一个很新的规范,希望就是Subversion服务器模块最终能够成为一个开源的DeltaV参考实现,但非常不幸,DeltaV得版本模型过于详细,与Subversion的模型并不匹配,虽然有些概念可以对应起来,但有些则不能。" - -#. (para) -#: ../source/book.xml:25321 -msgid "What does this mean, then?" -msgstr "这是什么意思呢?" - -#. (para) -#: ../source/book.xml:25322 -#, fuzzy -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 REPORT requests that only mod_dav_svn understands." -msgstr "首先,Subversion客户端不是一个完全实现的DeltaV客户端,它需要从服务器得到DeltaV不能提供的东西,因此非常依赖于只有mod_dav_svn理解的Subversion特定的REPORT请求。" - -#. (para) -#: ../source/book.xml:25328 -#, fuzzy -msgid "Second, mod_dav_svn is not a fully-realized DeltaV server. Many portions of the DeltaV specification were irrelevant to Subversion, and thus left unimplemented." -msgstr "其次,mod_dav_svn不是一个完全的DeltaV服务,许多与Subversion不相关的DeltaV规范还没有实现。" - -#. (para) -#: ../source/book.xml:25332 -#, fuzzy -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, mod_dav_svncould 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." -msgstr "在开发者社区一直有这样的讨论,是否值得弥补这种形势。改变Subversion的设计来匹配DeltaV看起来并不现实,所以可能没有办法让客户端从普通的DeltaV服务器上得到所有的东西。另一方面,mod_dav_svn可以继续开发来实现所有的DeltaV,但缺乏这样做的动力—几乎没有能与之交户的DeltaV客户端。" - -#. (title) -#: ../source/book.xml:25348 -msgid "Autoversioning" -msgstr "自动版本" - -#. (para) -#: ../source/book.xml:25350 -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." -msgstr "因为Subversion客户端不是完整的DeltaV客户端,Subversion服务器也不是完整的DeltaV服务器,但仍有值得高兴的交互特性:叫做自动版本化。" - -#. (para) -#: ../source/book.xml:25354 -#, fuzzy -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 PUT 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 MKACTIVITY, CHECKOUT, PUT, CHECKIN. But if the DeltaV server supports autoversioning, then write-requests from basic WebDAV clients are accepted. The server behaves as if the client had 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." -msgstr "自动版本化是DeltaV标准中的可选特性,一个典型的DeltaV服务器会拒绝一个对版本控制之下文件的PUT操作,为了修改一个版本控制下的文件,服务器只会接受一系列正确的版本请求:例如MKACTIVITYCHECKOUTPUTCHECKIN。但是如果DeltaV服务器支持自动版本化,服务器可以在后台假装客户端执行了一些列正确的版本请求,也就是说,DeltaV服务器可以与一个对版本化一无所知的普通WebDAV客户端交互。" - -#. (para) -#: ../source/book.xml:25368 -#, fuzzy -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 mounts 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." -msgstr "因为有许多操作系统已经集成了WebDAV客户端,这个特性的用例可能是这样的:假设一个办公室有许多使用Microsoft Windows或Mac OS的普通用户,每个用户装载了一个Subversion版本库,看起来就是普通的网络共享文件夹。他们像普通目录一样的操作这个目录:打开文件、编辑它们,保存它们。同时,服务器自动的版本化所有的东西,任何管理员(或有知识的用户)可以一直使用Subversion客户端来查询历史来检索旧版本的数据。" - -#. (para) -#: ../source/book.xml:25379 -#, fuzzy -msgid "This scenario isn't fiction: it's real and it works, as of Subversion 1.2 and later. To activate autoversioning in mod_dav_svn, use the SVNAutoversioning directive within the httpd.conf Location block, like so:" -msgstr "这个场景不是小说:对于Subversion 1.2来说,是真实的和有效的。为了激活mod_dav_svn的自动版本化,需要使用httpd.conf中Location区块的SVNAutoversioning指示,例如:" - -#. (screen) -#: ../source/book.xml:25385 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /var/svn/repository\n" -" SVNAutoversioning on\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /path/to/repository\n" -" SVNAutoversioning on\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:25392 -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." -msgstr "当激活了SVNAutoversioning,来自WebDAV的客户端请求会导致自动提交,每个修订版本会自动附加一个原始的日志信息。" - -#. (para) -#: ../source/book.xml:25395 -#, fuzzy -msgid "Before activating this feature, however, understand what you're getting into. WebDAV clients tend to do many write requests, resulting in a huge number of automatically committed revisions. For example, when saving data, many clients will do a PUT of a 0-byte file (as a way of reserving a name) followed by another PUT 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." -msgstr "然而,在激活这个特性之前,需要理解你做的事情。WebDAV会做许多写请求,导致了产生数量非常多的自动提交修订版本。例如,当保存数据,许多客户端会使用一个PUT一个0字节的文件,然后紧跟一个PUT真实的文件数据。一个单独的文件写操作产生了两个不同的提交。考虑到许多应用程序隔几分钟的自动保存,会产生更多的提交。" - -#. (para) -#: ../source/book.xml:25405 -#, fuzzy -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 svn commit. The trick is to look for a revision property named svn:autoversioned. If present, the commit was made by a generic WebDAV client." -msgstr "如果你有发送邮件的post-commit钩子程序,例如,你会根据是否有价值来开启和关闭邮件通知,另外,一个聪明的post-commit钩子也应该能够区分自动版本化和svn commit产生的事务。技巧就是检查修订版本的svn:autoversioned属性,如果有,则提交来自一个原始的WebDAV客户端。" - -#. (para) -#: ../source/book.xml:25415 -#, fuzzy -msgid "Another feature that may be a useful complement for SVNAutoversioning comes from Apache's mod_mime module. If a WebDAV client adds a new file to the repository, there's no opportunity for the user to set the the svn:mime-type 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 svn:mime-type property on necessary files. But there's potentially no end to such cleanup tasks. Instead, you can use the ModMimeUsePathInfo directive in your Subversion <Location> block:" -msgstr "另一个作为SVNAutoversioning特性补充的特性来自Apache的mod_mime模块,如果一个原始的WebDAV客户端在版本库添加了一个新文件,用户就没有机会设置svn:mime-type属性,这会导致使用WebDAV共享目录查看时会看到原始的图标,而没有关联到任何应用。一个补救办法就是让系统管理员(或其他理解Subversion)的人检出一份工作拷贝,然后为需要的文件手动设置svn:mime-type属性,但是这个整理工作永远不会结束,作为替代,你可以在你的Subversion<Location>区使用ModMimeUsePathInfo指示:" - -#. (screen) -#: ../source/book.xml:25430 -#, fuzzy, no-wrap -msgid "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /var/svn/repository\n" -" SVNAutoversioning on\n" -"\n" -" ModMimeUsePathInfo on\n" -"\n" -"</Location>\n" -msgstr "" -"\n" -"<Location /repos>\n" -" DAV svn\n" -" SVNPath /path/to/repository\n" -" SVNAutoversioning on\n" -"\n" -" ModMimeUsePathInfo on\n" -"\n" -"</Location>\n" - -#. (para) -#: ../source/book.xml:25440 -#, fuzzy -msgid "This directive allows mod_mime 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 svn:mime-type property will be set automatically." -msgstr "这个指示允许mod_mime在使用自动版本化添加新文件时尝试自动检测新文件的mime-type,这个模块查看文件的扩展名,有可能的话还包括检查内容;如果文件符合某个常用模式,就会自动设置文件的svn;mime-type。" - -#. (title) -#: ../source/book.xml:25453 -msgid "Client Interoperability" -msgstr "客户端交互性" - -#. (para) -#: ../source/book.xml:25455 -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. 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." -msgstr "所有的WebDAV客户端分为三类—独立应用程序,文件浏览器扩展或文件系统实现,这些分类定义了WebDAV用户可用的功能性。给WebDAV常见软件进行了分类,并提供了的简短描述。" - -#. (title) -#: ../source/book.xml:25466 -msgid "Common WebDAV Clients" -msgstr "常用 WebDAV 客户端" - -#. (entry) -#: ../source/book.xml:25471 -msgid "Software" -msgstr "软件" - -#. (entry) -#: ../source/book.xml:25472 -msgid "Type" -msgstr "类型" - -#. (entry) -#: ../source/book.xml:25473 -msgid "Windows" -msgstr "Windows" - -#. (entry) -#: ../source/book.xml:25474 -msgid "Mac" -msgstr "Mac" - -#. (entry) -#: ../source/book.xml:25475 -msgid "Linux" -msgstr "Linux" - -#. (entry) -#: ../source/book.xml:25481 -msgid "Adobe Photoshop" -msgstr "Adobe Photoshop" - -#. (entry) -#: ../source/book.xml:25482 ../source/book.xml:25491 ../source/book.xml:25500 -#: ../source/book.xml:25508 ../source/book.xml:25517 -#, fuzzy -msgid "Standalone WebDAV application" -msgstr "独立的 WebDAV 应用程序" - -#. (entry) -#: ../source/book.xml:25483 ../source/book.xml:25493 ../source/book.xml:25494 -#: ../source/book.xml:25501 ../source/book.xml:25502 ../source/book.xml:25503 -#: ../source/book.xml:25509 ../source/book.xml:25518 ../source/book.xml:25528 -#: ../source/book.xml:25539 ../source/book.xml:25548 ../source/book.xml:25556 -#: ../source/book.xml:25564 ../source/book.xml:25573 ../source/book.xml:25585 -msgid "X" -msgstr "X" - -#. (entry) -#: ../source/book.xml:25486 -msgid "Image editing software, allowing direct opening from, and writing to, WebDAV URLs" -msgstr "图像编辑软件,允许直接从WebDAV的URL打开文件和修改。" - -#. (entry) -#: ../source/book.xml:25490 -msgid "Cadaver" -msgstr "Cadaver" - -#. (entry) -#: ../source/book.xml:25495 -msgid "Command-line WebDAV client supporting file transfer, tree, and locking operations" -msgstr "命令行的WebDAV客户端,支持文件传输,目录树显示和锁定操作" - -#. (entry) -#: ../source/book.xml:25499 -msgid "DAV Explorer" -msgstr "DAV Explorer" - -#. (entry) -#: ../source/book.xml:25504 -msgid "Java GUI tool for exploring WebDAV shares" -msgstr "浏览 WebDAV 共享的 Java GUI 工具" - -#. (entry) -#: ../source/book.xml:25507 -msgid "Macromedia Dreamweaver" -msgstr "Macromedia Dreamweaver" - -#. (entry) -#: ../source/book.xml:25512 -msgid "Web production software able to directly read from and write to WebDAV URLs" -msgstr "Web制作软件,可以直接读写WebDAV的URL" - -#. (entry) -#: ../source/book.xml:25516 -msgid "Microsoft Office" -msgstr "Microsoft Office" - -#. (entry) -#: ../source/book.xml:25521 -msgid "Office productivity suite with several components able to directly read from and write to WebDAV URLs" -msgstr "Office上产套件,可以直接读写WebDAV的URL" - -#. (entry), (title) -#: ../source/book.xml:25526 ../source/book.xml:25693 -msgid "Microsoft Web Folders" -msgstr "Microsoft Web 文件夹" - -#. (entry) -#: ../source/book.xml:25527 ../source/book.xml:25536 ../source/book.xml:25545 -#, fuzzy -msgid "File-explorer WebDAV extension" -msgstr "文件浏览器 WebDAV 扩展" - -#. (entry) -#: ../source/book.xml:25531 -msgid "GUI file explorer program able to perform tree operations on a WebDAV share" -msgstr "Novell NetDrive" - -#. (entry) -#: ../source/book.xml:25535 -msgid "GNOME Nautilus" -msgstr "GNOME Nautilus" - -#. (entry) -#: ../source/book.xml:25540 ../source/book.xml:25549 -msgid "GUI file explorer able to perform tree operations on a WebDAV share" -msgstr "GUI文件浏览器,可以对WebDAV共享执行目录树操作" - -#. (entry) -#: ../source/book.xml:25544 -msgid "KDE Konqueror" -msgstr "KDE Konqueror" - -#. (entry), (title) -#: ../source/book.xml:25553 ../source/book.xml:25822 -msgid "Mac OS X" -msgstr "Mac OS X" - -#. (entry), (title) -#: ../source/book.xml:25554 ../source/book.xml:25563 ../source/book.xml:25572 -#: ../source/book.xml:25582 ../source/book.xml:25791 -msgid "WebDAV filesystem implementation" -msgstr "WebDAV 文件系统实现" - -#. (entry) -#: ../source/book.xml:25558 -msgid "Operating system has built-in support for mounting WebDAV shares." -msgstr "内置支持加载WebDAV到本地功能的操作系统" - -#. (entry) -#: ../source/book.xml:25562 -msgid "Novell NetDrive" -msgstr "驱动器映射程序,可以将Windows驱动器加载为远程的WebDAV共享" - -#. (entry) -#: ../source/book.xml:25567 -msgid "Drive-mapping program for assigning Windows drive letters to a mounted remote WebDAV share" -msgstr "SRT WebDrive" - -#. (entry) -#: ../source/book.xml:25571 -msgid "SRT WebDrive" -msgstr "文件传输软件,可以将Windows驱动器加载为远程的WebDAV共享" - -#. (entry) -#: ../source/book.xml:25576 -msgid "File transfer software which, among other things, allows the assignment of Windows drive letters to a mounted remote WebDAV share" -msgstr "一个WebDAV应用就是一个内置WebDAV协议的程序,我们会覆盖大多数支持WebDAV的流行程序。" - -#. (entry) -#: ../source/book.xml:25581 -msgid "davfs2" -msgstr "davfs2" - -#. (entry) -#: ../source/book.xml:25586 -msgid "Linux file system driver that allows you to mount a WebDAV share" -msgstr "Linux 文件系统驱动允许加载 WebDAV 共享" - -#. (title) -#: ../source/book.xml:25595 -msgid "Standalone WebDAV applications" -msgstr "独立的 WebDAV 应用程序" - -#. (para) -#: ../source/book.xml:25597 -#, fuzzy -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." -msgstr "Microsoft Office,Dreamweaver,Photoshop" - -#. (title) -#: ../source/book.xml:25603 -msgid "Microsoft Office, Dreamweaver, Photoshop" -msgstr "Microsoft Office,Dreamweaver,Photoshop" - -#. (para) -#: ../source/book.xml:25608 -msgid "WebDAV support was removed from Microsoft Access for some reason, but exists in the rest of the Office suite." -msgstr "在Windows下,有一些有名的集成WebDAV客户端功能的软件,例如Microsoft's Office、Adobe的Photoshop和Macromedia的Dreamweaver。它们都可以直接打开和保存URL,也可以在编辑时大量的使用WebDAV的锁定。" - -#. (para) -#: ../source/book.xml:25605 -msgid "On Windows, there are several well-known applications that contain integrated WebDAV client functionality, such as Microsoft's Office, 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." -msgstr "在Windows下,有许多已知的应用程序支持WebDAV客户端功能,例如微软Office,Adobe的Photoshop和Macromedia的Dreamweaver程序,他们可以直接打开和保存URL,并且在编辑文件时经常使用WebDAV的锁。 " - -#. (para) -#: ../source/book.xml:25614 -#, fuzzy -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 File->Open 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." -msgstr "需要注意尽管这些程序也存在于Mac OS X,但是在这个平台上并不是直接支持WebDAV。实际上在Mac OS X,File->Open会离开对应的程序,因为OS X已经实现了底层的文件系统级WebDAV支持。" - -#. (title) -#: ../source/book.xml:25626 -msgid "Cadaver, DAV Explorer" -msgstr "Cadaver,DAV 浏览器" - -#. (para) -#: ../source/book.xml:25628 -#, fuzzy -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 http://www.webdav.org/cadaver/." -msgstr "使用cadaver就像使用命令行的FTP程序,因此它很适合基本的WebDAV调试。它可以以压缩方式上传和下载文件,也会检验属性、拷贝、移动、锁定和解锁文件:" - -#. (para) -#: ../source/book.xml:25635 -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:" -msgstr "使用cadaver与命令行FTP程序类似,因此它在基本的WebDAV调试中非常有用,它可以用来在紧急情况下上传或下载文件,也可以用来验证属性,并拷贝、移动、锁定或解锁文件:" - -#. (screen) -#: ../source/book.xml:25640 -#, no-wrap -msgid "" -"\n" -"$ cadaver http://host/repos\n" -"dav:/repos/> ls\n" -"Listing collection `/repos/': succeeded.\n" -"Coll: > foobar 0 May 10 16:19\n" -" > playwright.el 2864 May 4 16:18\n" -" > proofbypoem.txt 1461 May 5 15:09\n" -" > westcoast.jpg 66737 May 5 15:09\n" -"\n" -"dav:/repos/> put README\n" -"Uploading README to `/repos/README':\n" -"Progress: [=============================>] 100.0% of 357 bytes succeeded.\n" -"\n" -"dav:/repos/> get proofbypoem.txt\n" -"Downloading `/repos/proofbypoem.txt' to proofbypoem.txt:\n" -"Progress: [=============================>] 100.0% of 1461 bytes succeeded.\n" -msgstr "" -"\n" -"$ cadaver http://host/repos\n" -"dav:/repos/> ls\n" -"Listing collection `/repos/': succeeded.\n" -"Coll: > foobar 0 May 10 16:19\n" -" > playwright.el 2864 May 4 16:18\n" -" > proofbypoem.txt 1461 May 5 15:09\n" -" > westcoast.jpg 66737 May 5 15:09\n" -"\n" -"dav:/repos/> put README\n" -"Uploading README to `/repos/README':\n" -"Progress: [=============================>] 100.0% of 357 bytes succeeded.\n" -"\n" -"dav:/repos/> get proofbypoem.txt\n" -"Downloading `/repos/proofbypoem.txt' to proofbypoem.txt:\n" -"Progress: [=============================>] 100.0% of 1461 bytes succeeded.\n" - -#. (para) -#: ../source/book.xml:25657 -#, fuzzy -msgid "DAV Explorer is another standalone WebDAV client, written in Java. It's under a free Apache-like license and is available at http://www.ics.uci.edu/~webdav/. 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)." -msgstr "DAV Explorer是另一个独立运行的WebDAV客户端,使用Java编写,有一个类Apache的许可证,网站是。DAV Explorer与cadaver功能差不多,优点可移植,并有一个用户友好的GUI程序。它也是最早的支持WebDAV访问控制协议(RFC 3744)的客户端之一。" - -#. (para) -#: ../source/book.xml:25664 -#, fuzzy -msgid "Of course, DAV Explorer's ACL support is useless in this case, since mod_dav_svn 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 MKACTIVITY requests. But it's not relevant anyway; we're assuming all of these clients are operating against an autoversioning repository." -msgstr "当然,在这个情况下DAV Explorer的ACL支持没有任何用处,事实上,Cadaver和DAV Explorer支持的一些有限的DeltaV命令也并不有效,因为他们不允许MKACTIVITY请求,但是这都不相干;我们假定这些客户端都是针对自动版本化版本库工作。" - -#. (title) -#: ../source/book.xml:25677 -msgid "File-explorer WebDAV extensions" -msgstr "文件浏览器 WebDAV 扩展" - -#. (para) -#: ../source/book.xml:25679 -#, fuzzy -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 network place. 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." -msgstr "一些流行的文件浏览器GUI程序支持WebDAV扩展,允许用户将DAV共享当作本地文件夹访问,例如Windows浏览器可以以network place方式浏览WebDAV服务器。用户可以拖入和拖出文件,或者是改名、拷贝或删除其中的文件。但是因为它只是文件浏览器的一个特性,DAV对普通应用不可见,所有的DAV交互必须通过浏览器界面。" - -#. (para) -#: ../source/book.xml:25695 -msgid "Microsoft was one of the original backers of the WebDAV specification, and first started shipping a client in Windows 98, known as Web Folders. This client was also shipped in Windows NT4 and 2000." -msgstr "Microsoft是WebDAV规范最早的支持者,最早在Windows 98配置客户端,被称作网络文件夹,这个客户端在Windows NT4和2000上也存在。" - -#. (para) -#: ../source/book.xml:25699 -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 My Computer. In Windows 2000, simply add a new network place, enter the URL, and the WebDAV share will pop up for browsing." -msgstr "最早的Webfolders客户端是浏览器的扩展,主要的浏览文件系统的GUI程序,工作良好。在Windows 98,如果我的电脑里没有网络文件夹,这个特性需要明确安装。在Windows 2000,只需要添加一个新的网络位置,输入URL,WebDAV共享就会弹出让你浏览。" - -#. (para) -#: ../source/book.xml:25706 -#, fuzzy -msgid "With the release of Windows XP, Microsoft started shipping a new implementation of Web Folders, known as the WebDAV mini-redirector. 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 (http://host/repos) into UNC share notation (\\\\host\\repos); it also often tries to use Windows Domain authentication to respond to basic-auth HTTP challenges, sending usernames as HOST\\username. 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." -msgstr "伴随着Windows XP,Microsoft开始了另一种网络文件夹的实现,叫做WebDAV mini-redirector,这个新的实现是文件系统级的客户端,允许WebDAV转载到驱动器盘符上。不幸的是,这个实现充满难以相信的bug。客户端经常会尝试把http的URL(http://host/repos)转化为UNC共享符号(\\\\host\\repos),它也经常使用Windows域认证来回应基本的HTTP认证,按照HOST\\username发送用户名。这类互动性问题在网络上大量传播,使大量用户受挫。即使是ApacheWebDAV的作者Greg Stein也建议不要对Apaache服务器使用XP的网络文件夹。" - -#. (para) -#: ../source/book.xml:25722 -msgid "It turns out that the original Explorer-only Web Folders implementation isn't dead in XP, it's just buried. It's still possible to find it by using this technique:" -msgstr "结果是原始的网络文件夹并没有在XP中死掉,只是要被埋葬了。还是有办法适用这个技术:" - -#. (para) -#: ../source/book.xml:25728 -msgid "Go to 'Network Places'." -msgstr "到网络位置。" - -#. (para) -#: ../source/book.xml:25731 -msgid "Add a new network place." -msgstr "添加一个新的网络位置。" - -#. (para) -#: ../source/book.xml:25734 -#, fuzzy -msgid "When prompted, enter the URL of the repository, but include a port number in the URL. For example, http://host/repos would be entered as http://host:80/repos instead." -msgstr "当要求输入,输入版本库的URL,但URL中要包含端口号。例如http://host/repos的输入是http://host:80/repos。" - -#. (para) -#: ../source/book.xml:25741 -msgid "Respond to any authentication prompts." -msgstr "回应所有的认证请求。" - -#. (para) -#: ../source/book.xml:25744 -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." -msgstr "有各种解决问题的方法,但好像没有一种能够在各版本和各级别的Windows XP中有效。在我们的测试里,只有上面这种策略在各种系统中有效。WebDAV社区一致认为避免使用新的网络文件夹实现,而使用旧的,如果你希望在Windows XP使用真实的文件系统级的客户端,请使用第三方的程序,例如WebDrive或NetDrive。" - -#. (para) -#: ../source/book.xml:25753 -#, fuzzy -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 http://support.microsoft.com/?kbid=892211. In particular, this release is known to fix a bug whereby browsing a DAV share shows an unexpected infinite recursion." -msgstr "最后一个提示:如果你尝试使用XP的网络文件夹,确定你有Microsoft最新的版本,Microsoft在2005年1月发布了一个问题修正,在,特别的,这个发布是用来修正在访问DAV时发生无限递归的问题。" - -#. (title) -#: ../source/book.xml:25765 -msgid "Nautilus, Konqueror" -msgstr "Nautilus,Konqueror" - -#. (para) -#: ../source/book.xml:25767 -#, fuzzy -msgid "Nautilus is the official file manager/browser for the GNOME desktop (http://www.gnome.org), and Konqueror is the manager/browser for the KDE desktop (http://www.kde.org). Both of these applications have an explorer-level WebDAV client built-in, and operate just fine against an autoversioning repository." -msgstr "Nautilus是GNOME桌面()官方的文件管理/浏览器,KDE桌面()的则是Konqueror。两个应用程序都是浏览器级别的WebDAV客户端,对自动版本化的版本库工作良好。" - -#. (para) -#: ../source/book.xml:25772 -#, fuzzy -msgid "In GNOME's Nautilus, from the File menu, select Open location and enter the URL. The repository should then be displayed like any other filesystem." -msgstr "GNOME的Nautilus里,从File menu选择Open location,并且输入URL。版本库就会显示出来,就像其他文件系统。" - -#. (para) -#: ../source/book.xml:25776 -#, fuzzy -msgid "In KDE's Konqueror, you need to use the webdav:// scheme when entering the URL in the location bar. If you enter an http:// URL, Konqueror will behave like an ordinary web browser. You'll likely see the generic HTML directory listing produced by mod_dav_svn. By entering webdav://host/repos instead of http://host/repos, Konqueror becomes a WebDAV client and displays the repository as a filesystem." -msgstr "KDE的Konqueror里你需要在地址栏使用webdav://模式来输入URL,如果你输入http://的URL,Konqueror会像普通的web浏览器。你会看到mod_dav_svn输出的普通HTML目录列表。通过输入webdav://host/repos代替http://host/repos,Konqueror就成为了一个WebDAV客户端,并且按照文件系统的方式显示版本库。" - -#. (para) -#: ../source/book.xml:25793 -#, fuzzy -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." -msgstr "WebDAV文件系统实现被认为是最佳的WebDAV客户端,它通过低级的文件系统模块实现,通常在操作系统的核心。这意味着DAV共享像网络的其他文件系统一样装载,就像在Unix下面装载NFS,或者是在Windows下装载一个SMB共享。结果就是这种客户端为所有程序提供了对WebDAV得透明访问。" - -#. (title) -#: ../source/book.xml:25806 -msgid "WebDrive, NetDrive" -msgstr "WebDrive,NetDrive" - -#. (para) -#: ../source/book.xml:25808 -#, fuzzy -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 (http://www.southrivertech.com). NetDrive ships with Netware, is free of charge, and can be found by searching the web for netdrive.exe. 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: http://www.novell.com/coolsolutions/qna/999.html)" -msgstr "WebDrive和NetDrive都是完美的商业产品,允许将WebDAV绑定到Windows的盘符,当我们写作的时候,WebDrive可以从South River Technologies()购买。NetDrive由Netware装运,通过查找netdrive.exe就会找到。尽管它可以自由得到,用户还是需要一个Netware许可证。(如果着听起来有点奇怪,你并不孤单,看Novell网站的这个页面:)" - -#. (para) -#: ../source/book.xml:25824 -#, fuzzy -msgid "Apple's OS X operating system has an integrated filesystem-level WebDAV client. From the Finder, select the Connect to Server item from the Go menu. 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 webdav filesystem type with the mount command:" -msgstr "Apple的OS X操作系统是集成的文件系统级的WebDAV客户端,通过Finder,选择Go menuConnect to Server条目,输入WebDAV的URL,会在桌面显示一个磁盘,就像其他装载的卷。你也可以从Darwin终端通过mount类型为webdav的文件系统实现。" - -#. (screen) -#: ../source/book.xml:25832 -#, no-wrap -msgid "" -"\n" -"$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint\n" -"$\n" -msgstr "" -"\n" -"$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint\n" -"$\n" - -#. (para) -#: ../source/book.xml:25836 -#, fuzzy -msgid "Note that if your mod_dav_svn 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." -msgstr "注意如果mod_dav_svn是1.2之前的版本,OS X不能按照可读写装载,而是会成为只读。这是因为,OS X坚持要读写共享支持锁定,而锁定文件出现在Subversion 1.2。" - -#. (para) -#: ../source/book.xml:25842 -#, fuzzy -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 httpd.conf:" -msgstr "警告一句话:OS X的WebDAV客户端有时候对HTTP重定向很敏感,如果OS X不能装载版本库,你或许需要开启Apache服务器httpd.conf的BrowserMatch指示:" - -#. (screen) -#: ../source/book.xml:25847 -#, no-wrap -msgid "" -"\n" -"BrowserMatch \"^WebDAVFS/1.[012]\" redirect-carefully\n" -msgstr "" -"\n" -"BrowserMatch \"^WebDAVFS/1.[012]\" redirect-carefully\n" - -#. (title) -#: ../source/book.xml:25854 -msgid "Linux davfs2" -msgstr "Linux davfs2" - -#. (para) -#: ../source/book.xml:25856 -#, fuzzy -msgid "Linux davfs2 is a filesystem module for the Linux kernel, whose development is located at http://dav.sourceforge.net/. Once installed, a WebDAV network share can be mounted with the usual Linux mount command:" -msgstr "Linux davfs2是一个Linux核心的文件系统模块,开发坐落在。一旦安装,一个WebDAV网络共享可以使用mount命令装载:" - -#. (screen) -#: ../source/book.xml:25860 -#, no-wrap -msgid "" -"\n" -"$ mount.davfs http://host/repos /mnt/dav\n" -msgstr "" -"\n" -"$ mount.davfs http://host/repos /mnt/dav\n" - -#. (title) -#: ../source/book.xml:25874 -msgid "Third Party Tools" -msgstr "第三方工具" - -#. (para) -#: ../source/book.xml:25876 -#, fuzzy -msgid "Subversion's modular design (covered in ) and the availability of language bindings (as described in ) 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 (http://subversion.tigris.org/project_links.html)." -msgstr "Subversion的模块设计(在讨论过)和语言绑定的能力(在描述过)使的我们可以作为扩展和后端支持来替代软件的某些部分,在这个附录里,我们会简略介绍一些使用Subversion功能的第三方的工具。关于更新的信息,可以在Subversion的网站()查看。" - -#. (title) -#: ../source/book.xml:25890 -msgid "Copyright" -msgstr "Copyright" - -#. (programlisting) -#: ../source/book.xml:25892 -#, fuzzy, no-wrap -msgid "" -"\n" -"\n" -"Copyright (c) 2002-2007\n" -"Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. \n" -"\n" -"This work is licensed under the Creative Commons Attribution License.\n" -"To view a copy of this license, visit\n" -"http://creativecommons.org/licenses/by/2.0/ or send a letter to\n" -"Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,\n" -"USA.\n" -"\n" -"A summary of the license is given below, followed by the full legal\n" -"text.\n" -"\n" -"--------------------------------------------------------------------\n" -"\n" -"You are free:\n" -"\n" -" * to copy, distribute, display, and perform the work\n" -" * to make derivative works\n" -" * to make commercial use of the work\n" -"\n" -"Under the following conditions:\n" -"\t\n" -"Attribution. You must give the original author credit.\n" -"\n" -" * For any reuse or distribution, you must make clear to others the\n" -" license terms of this work.\n" -"\n" -" * Any of these conditions can be waived if you get permission from\n" -" the author.\n" -"\n" -"Your fair use and other rights are in no way affected by the above.\n" -"\n" -"The above is a summary of the full license below.\n" -"\n" -"====================================================================\n" -"\n" -"Creative Commons Legal Code\n" -"Attribution 2.0\n" -"\n" -"CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\n" -"LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN\n" -"ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\n" -"INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\n" -"REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR\n" -"DAMAGES RESULTING FROM ITS USE.\n" -"\n" -"License\n" -"\n" -"THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS\n" -"CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS\n" -"PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE\n" -"WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS\n" -"PROHIBITED.\n" -"\n" -"BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND\n" -"AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS\n" -"YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF\n" -"SUCH TERMS AND CONDITIONS.\n" -"\n" -"1. Definitions\n" -"\n" -" a. \"Collective Work\" means a work, such as a periodical issue,\n" -" anthology or encyclopedia, in which the Work in its entirety in\n" -" unmodified form, along with a number of other contributions,\n" -" constituting separate and independent works in themselves, are\n" -" assembled into a collective whole. A work that constitutes a\n" -" Collective Work will not be considered a Derivative Work (as\n" -" defined below) for the purposes of this License.\n" -"\n" -" b. \"Derivative Work\" means a work based upon the Work or upon the\n" -" Work and other pre-existing works, such as a translation,\n" -" musical arrangement, dramatization, fictionalization, motion\n" -" picture version, sound recording, art reproduction, abridgment,\n" -" condensation, or any other form in which the Work may be recast,\n" -" transformed, or adapted, except that a work that constitutes a\n" -" Collective Work will not be considered a Derivative Work for the\n" -" purpose of this License. For the avoidance of doubt, where the\n" -" Work is a musical composition or sound recording, the\n" -" synchronization of the Work in timed-relation with a moving\n" -" image (\"synching\") will be considered a Derivative Work for the\n" -" purpose of this License.\n" -"\n" -" c. \"Licensor\" means the individual or entity that offers the Work\n" -" under the terms of this License.\n" -"\n" -" d. \"Original Author\" means the individual or entity who created the Work.\n" -"\n" -" e. \"Work\" means the copyrightable work of authorship offered under\n" -" the terms of this License.\n" -"\n" -" f. \"You\" means an individual or entity exercising rights under this\n" -" License who has not previously violated the terms of this\n" -" License with respect to the Work, or who has received express\n" -" permission from the Licensor to exercise rights under this\n" -" License despite a previous violation.\n" -"\n" -"2. Fair Use Rights. Nothing in this license is intended to reduce,\n" -" limit, or restrict any rights arising from fair use, first sale or\n" -" other limitations on the exclusive rights of the copyright owner\n" -" under copyright law or other applicable laws.\n" -"\n" -"3. License Grant. Subject to the terms and conditions of this License,\n" -" Licensor hereby grants You a worldwide, royalty-free,\n" -" non-exclusive, perpetual (for the duration of the applicable\n" -" copyright) license to exercise the rights in the Work as stated\n" -" below:\n" -"\n" -" a. to reproduce the Work, to incorporate the Work into one or more\n" -" Collective Works, and to reproduce the Work as incorporated in\n" -" the Collective Works;\n" -"\n" -" b. to create and reproduce Derivative Works;\n" -"\n" -" c. to distribute copies or phonorecords of, display publicly,\n" -" perform publicly, and perform publicly by means of a digital\n" -" audio transmission the Work including as incorporated in\n" -" Collective Works;\n" -"\n" -" d. to distribute copies or phonorecords of, display publicly,\n" -" perform publicly, and perform publicly by means of a digital\n" -" audio transmission Derivative Works.\n" -"\n" -" e.\n" -"\n" -" For the avoidance of doubt, where the work is a musical composition:\n" -"\n" -" i. Performance Royalties Under Blanket Licenses. Licensor\n" -" waives the exclusive right to collect, whether\n" -" individually or via a performance rights society\n" -" (e.g. ASCAP, BMI, SESAC), royalties for the public\n" -" performance or public digital performance (e.g. webcast)\n" -" of the Work.\n" -"\n" -" ii. Mechanical Rights and Statutory Royalties. Licensor waives\n" -" the exclusive right to collect, whether individually or\n" -" via a music rights agency or designated agent (e.g. Harry\n" -" Fox Agency), royalties for any phonorecord You create from\n" -" the Work (\"cover version\") and distribute, subject to the\n" -" compulsory license created by 17 USC Section 115 of the US\n" -" Copyright Act (or the equivalent in other jurisdictions).\n" -"\n" -" f. Webcasting Rights and Statutory Royalties. For the avoidance of\n" -" doubt, where the Work is a sound recording, Licensor waives the\n" -" exclusive right to collect, whether individually or via a\n" -" performance-rights society (e.g. SoundExchange), royalties for\n" -" the public digital performance (e.g. webcast) of the Work,\n" -" subject to the compulsory license created by 17 USC Section 114\n" -" of the US Copyright Act (or the equivalent in other\n" -" jurisdictions).\n" -"\n" -"The above rights may be exercised in all media and formats whether now\n" -"known or hereafter devised. The above rights include the right to make\n" -"such modifications as are technically necessary to exercise the rights\n" -"in other media and formats. All rights not expressly granted by\n" -"Licensor are hereby reserved.\n" -"\n" -"4. Restrictions.The license granted in Section 3 above is expressly\n" -" made subject to and limited by the following restrictions:\n" -"\n" -" a. You may distribute, publicly display, publicly perform, or\n" -" publicly digitally perform the Work only under the terms of this\n" -" License, and You must include a copy of, or the Uniform Resource\n" -" Identifier for, this License with every copy or phonorecord of\n" -" the Work You distribute, publicly display, publicly perform, or\n" -" publicly digitally perform. You may not offer or impose any\n" -" terms on the Work that alter or restrict the terms of this\n" -" License or the recipients' exercise of the rights granted\n" -" hereunder. You may not sublicense the Work. You must keep intact\n" -" all notices that refer to this License and to the disclaimer of\n" -" warranties. You may not distribute, publicly display, publicly\n" -" perform, or publicly digitally perform the Work with any\n" -" technological measures that control access or use of the Work in\n" -" a manner inconsistent with the terms of this License\n" -" Agreement. The above applies to the Work as incorporated in a\n" -" Collective Work, but this does not require the Collective Work\n" -" apart from the Work itself to be made subject to the terms of\n" -" this License. If You create a Collective Work, upon notice from\n" -" any Licensor You must, to the extent practicable, remove from\n" -" the Collective Work any reference to such Licensor or the\n" -" Original Author, as requested. If You create a Derivative Work,\n" -" upon notice from any Licensor You must, to the extent\n" -" practicable, remove from the Derivative Work any reference to\n" -" such Licensor or the Original Author, as requested.\n" -"\n" -" b. If you distribute, publicly display, publicly perform, or\n" -" publicly digitally perform the Work or any Derivative Works or\n" -" Collective Works, You must keep intact all copyright notices for\n" -" the Work and give the Original Author credit reasonable to the\n" -" medium or means You are utilizing by conveying the name (or\n" -" pseudonym if applicable) of the Original Author if supplied; the\n" -" title of the Work if supplied; to the extent reasonably\n" -" practicable, the Uniform Resource Identifier, if any, that\n" -" Licensor specifies to be associated with the Work, unless such\n" -" URI does not refer to the copyright notice or licensing\n" -" information for the Work; and in the case of a Derivative Work,\n" -" a credit identifying the use of the Work in the Derivative Work\n" -" (e.g., \"French translation of the Work by Original Author,\" or\n" -" \"Screenplay based on original Work by Original Author\"). Such\n" -" credit may be implemented in any reasonable manner; provided,\n" -" however, that in the case of a Derivative Work or Collective\n" -" Work, at a minimum such credit will appear where any other\n" -" comparable authorship credit appears and in a manner at least as\n" -" prominent as such other comparable authorship credit.\n" -"\n" -"5. Representations, Warranties and Disclaimer\n" -"\n" -"UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING,\n" -"LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR\n" -"WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED,\n" -"STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF\n" -"TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,\n" -"NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY,\n" -"OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT\n" -"DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED\n" -"WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\n" -"\n" -"6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY\n" -" APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY\n" -" LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE\n" -" OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE\n" -" WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n" -" DAMAGES.\n" -"\n" -"7. Termination\n" -"\n" -" a. This License and the rights granted hereunder will terminate\n" -" automatically upon any breach by You of the terms of this\n" -" License. Individuals or entities who have received Derivative\n" -" Works or Collective Works from You under this License, however,\n" -" will not have their licenses terminated provided such\n" -" individuals or entities remain in full compliance with those\n" -" licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any\n" -" termination of this License.\n" -"\n" -" b. Subject to the above terms and conditions, the license granted\n" -" here is perpetual (for the duration of the applicable copyright\n" -" in the Work). Notwithstanding the above, Licensor reserves the\n" -" right to release the Work under different license terms or to\n" -" stop distributing the Work at any time; provided, however that\n" -" any such election will not serve to withdraw this License (or\n" -" any other license that has been, or is required to be, granted\n" -" under the terms of this License), and this License will continue\n" -" in full force and effect unless terminated as stated above.\n" -"\n" -"8. Miscellaneous\n" -"\n" -" a. Each time You distribute or publicly digitally perform the Work\n" -" or a Collective Work, the Licensor offers to the recipient a\n" -" license to the Work on the same terms and conditions as the\n" -" license granted to You under this License.\n" -"\n" -" b. Each time You distribute or publicly digitally perform a\n" -" Derivative Work, Licensor offers to the recipient a license to\n" -" the original Work on the same terms and conditions as the\n" -" license granted to You under this License.\n" -"\n" -" c. If any provision of this License is invalid or unenforceable\n" -" under applicable law, it shall not affect the validity or\n" -" enforceability of the remainder of the terms of this License,\n" -" and without further action by the parties to this agreement,\n" -" such provision shall be reformed to the minimum extent necessary\n" -" to make such provision valid and enforceable.\n" -"\n" -" d. No term or provision of this License shall be deemed waived and\n" -" no breach consented to unless such waiver or consent shall be in\n" -" writing and signed by the party to be charged with such waiver\n" -" or consent.\n" -"\n" -" e. This License constitutes the entire agreement between the\n" -" parties with respect to the Work licensed here. There are no\n" -" understandings, agreements or representations with respect to\n" -" the Work not specified here. Licensor shall not be bound by any\n" -" additional provisions that may appear in any communication from\n" -" You. This License may not be modified without the mutual written\n" -" agreement of the Licensor and You.\n" -"\n" -"Creative Commons is not a party to this License, and makes no warranty\n" -"whatsoever in connection with the Work. Creative Commons will not be\n" -"liable to You or any party on any legal theory for any damages\n" -"whatsoever, including without limitation any general, special,\n" -"incidental or consequential damages arising in connection to this\n" -"license. Notwithstanding the foregoing two (2) sentences, if Creative\n" -"Commons has expressly identified itself as the Licensor hereunder, it\n" -"shall have all rights and obligations of Licensor.\n" -"\n" -"Except for the limited purpose of indicating to the public that the\n" -"Work is licensed under the CCPL, neither party will use the trademark\n" -"\"Creative Commons\" or any related trademark or logo of Creative\n" -"Commons without the prior written consent of Creative Commons. Any\n" -"permitted use will be in compliance with Creative Commons'\n" -"then-current trademark usage guidelines, as may be published on its\n" -"website or otherwise made available upon request from time to time.\n" -"\n" -"Creative Commons may be contacted at http://creativecommons.org/.\n" -"\n" -"====================================================================\n" -msgstr "" -"\n" -"\n" -"Copyright (c) 2002-2006\n" -"Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. \n" -"\n" -"This work is licensed under the Creative Commons Attribution License.\n" -"To view a copy of this license, visit\n" -"http://creativecommons.org/licenses/by/2.0/ or send a letter to\n" -"Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,\n" -"USA.\n" - -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#. (None) -#: ../source/book.xml:0 -msgid "translator-credits" -msgstr "" -"Dongsheng Song \n" -"Xun Leasun \n" -"Daijun Sun " diff --git a/doc/svnbook/readme.txt b/doc/svnbook/readme.txt deleted file mode 100644 index 2fc13cb..0000000 --- a/doc/svnbook/readme.txt +++ /dev/null @@ -1,5 +0,0 @@ - po/ ....................... pot & po files - source/ ................... http://svn.red-bean.com/svnbook/trunk/src/en/book - stylesheets/ .............. xsl & css files - xml2po .................... tookit for translate XML documents - build.xml ................. build file diff --git a/doc/svnbook/source/book.txt b/doc/svnbook/source/book.txt deleted file mode 100644 index e63b3b0..0000000 --- a/doc/svnbook/source/book.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. Fix URL of docbookx.dtd - vi book.xml - file:///C:/wc/svn/i18n-zh/trunk/lib/docbook/docbook4/docbookx.dtd - vi version.xml - - - - -2. Upgrade to DocBook v5 - xsltproc -o book-v5-tmp.xml db4-upgrade.xsl book.xml - -3. Clean up - vi book-v5-tmp.xml - Version Control with Subversion - For Subversion 1.5(Compiled from r2907) - - java -jar jing.jar docbook.rng book-v5-tmp.xml - - xmllint -o book-v5.xml --format book-v5-tmp.xml diff --git a/doc/svnbook/source/book.xml b/doc/svnbook/source/book.xml deleted file mode 100644 index fb34df2..0000000 --- a/doc/svnbook/source/book.xml +++ /dev/null @@ -1,26198 +0,0 @@ - - - - Version Control with Subversion - For Subversion 1.5(Compiled from r2907) - Second - ?-?????-???-? - - - - Ben - Collins-Sussman - - - - - Brian W. - Fitzpatrick - - - - - C. Michael - Pilato - - - - - - Tatiana - Apandi - - - 350 pages (est.) - (TBA) - - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - Ben Collins-Sussman - Brian W. Fitzpatrick - C. Michael Pilato - - - This work is licensed under the Creative - Commons Attribution License. To view a copy of this license, - visit http://creativecommons.org/licenses/by/2.0/ - or send a letter to Creative Commons, 559 Nathan Abbott Way, - Stanford, California 94305, USA. - - - - - - - Foreword - - - Karl - Fogel - - - Chicago, March 14, 2004 - - 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 wished people - had asked. Perhaps you've seen the type before: -
- Q: How can I use Glorbosoft XYZ to maximize team - productivity? -
-
- 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 - File menu, scroll down to - Increase Productivity, - then… -
- 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, How can we maximize - productivity?. Rather, people asked highly specific - questions, like, How can we change the calendaring system - to send reminders two days in advance instead of one? - 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. - 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? - Frustrated at seeing the same questions day after day, Ben - worked intensely over a month in the summer of 2002 to write - The Subversion Handbook, 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. - 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. - 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. - 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 - users@subversion.tigris.org 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, you are not - alone. - Let this book be your first companion. -
- - - - Preface - -
- Greg Hudson - - 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. - -
- Concurrent Versions System (CVS) - - 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. - 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 look and - feel) 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 - is 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. - 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. - - - -
- - Audience - - 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 - (svn), and some auxiliary programs, are the - focus of this book. - 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 - svn program also runs on non-Unix platforms - like Microsoft Windows. With a few minor exceptions, such as - the use of backward slashes (\) instead of - forward slashes (/) for path separators, the - input to and output from this tool when run on Windows are - identical to its Unix counterpart. - 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. - 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. - 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. -
- - - -
- - How to Read this Book - - Technical books always face a certain dilemma: whether to - cater to top-down - or bottom-up 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 learn by - doing 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 - . - 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 - recommended reading list for various types of - readers: - - - Experienced System Administrators - - 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. - and - will show you how to - create your first repository and make it available over - the network. After that's done, - and - are the fastest routes to - learning the Subversion client. - - - - New users - - 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 - is a vital introduction to the - ideas behind version control. - is a guided tour of the Subversion client. - - - - Advanced users - - 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 (), how to use Subversion's - property support (), how to - configure runtime options (), and other things. These - chapters aren't critical at first, but be sure to read - them once you're comfortable with the basics. - - - - Developers - - Presumably, you're already familiar with Subversion, - and now want to either extend it or build new software on - top of its many APIs. is - just for you. - - - - The book ends with reference material— 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. -
- - - -
- - Conventions Used in This Book - - This section covers the various conventions used in this - book. - -
- - Typographic Conventions - - - - - Constant width - - - Used for commands, command output, and options - - - - - Constant width italic - - - Used for replaceable items in code and text - - - - - Italic - - - Used for file and directory names - - - -
- -
- - Icons - - - This icon designates a note relating to the surrounding - text. - - - This icon designates a helpful tip relating to the surrounding - text. - - - This icon designates a warning relating to the surrounding - text. - -
-
- - - -
- - Organization of This Book - - The chapters that follow and their contents are listed - here: - - - - - - - Covers the history of Subversion as well as its - features, architecture, and components. - - - - - - - - Explains the basics of version control and different - versioning models, along with Subversion's repository, - working copies, and revisions. - - - - - - - - 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. - - - - - - - - Covers more complex features that regular users will - eventually come into contact with, such as versioned - metadata, file locking, and peg revisions. - - - - - - - - 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. - - - - - - - - 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. - - - - - - - - Explains how to configure your Subversion server and - different ways to access your repository: - HTTP, the svn - protocol, and local disk access. It also covers the details - of authentication, authorization and anonymous - access. - - - - - - - - Explores the Subversion client configuration files, - the handling of internationalized text, and how to make - external tools cooperate with Subversion. - - - - - - - - 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. - - - - - - - - Explains in great detail every subcommand of - svn, svnadmin, and - svnlook with plenty of examples for - the whole family! - - - - - - - - For the impatient, a whirlwind explanation of how to - install Subversion and start using it immediately. You - have been warned. - - - - - - - - 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, update - vs. status, branches, tags, metadata, - conflict resolution, and authentication. - - - - - - - - Describes the details of WebDAV and DeltaV, and how - you can configure your Subversion repository to be - mounted read/write as a DAV share. - - - - - - - - Discusses tools that support or use Subversion, - including alternative client programs, repository - browser tools, and so on. - - - -
- - - -
- - This Book is Free - - 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 .) In fact, - the book was written in the public eye, originally as a part of - Subversion project itself. This means two things: - - - You will always find the latest version of this book in - the book's own Subversion repository. - - - 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. - - - - The online home of this book's development and most of the - volunteer-driven translation efforts around it is - http://svnbook.red-bean.com. 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 svnbook-dev@red-bean.com. -
- - - -
- - Acknowledgments - - 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.Oh, and thanks, Karl, for - being too overworked to write this book yourself. - Thanks to O'Reilly and our editors, Linda Mui and Tatiana - Diaz for their patience and support. - 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. - -
- - From Ben Collins-Sussman - - Thanks to my wife Frances, who, for many months, got to - hear, But honey, I'm still working on the book, - rather than the usual, But honey, I'm still doing - email. I don't know where she gets all that patience! - She's my perfect counterbalance. - 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, Ooh, you wrote a - book?, and then when you tell them it's a computer - book, sort of glaze over.) - 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. - 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. -
- -
- - From Brian W. Fitzpatrick - - - 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. - To Mike and Ben: It was a pleasure working with you on the - book. Heck, it's a pleasure working with you at work! - 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. - - Lastly, thanks to my Grandfather who always told me that - freedom equals responsibility. I couldn't agree - more. -
- -
- - From C. Michael Pilato - - 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! - Gavin, there probably aren't many words in this book that - you can successfully sound out 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. - Aidan, Daddy luffoo et ope Aiduh yike contootoo as much as - Aiduh yike batetball, base-ball, et bootball. - Translation: Daddy loves you and hopes you like - computers as much as you like basketball, baseball, and - football. (Wasn't that obvious?) - - Mom and Dad, thanks for your constant support and - enthusiasm. Mom- and Dad-in-law, thanks for all of the same - plus your fabulous daughter. - 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 - are my .emacs; 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! - Finally, to the One who perfectly demonstrates creative - excellence—thank You. -
-
- - - -
- - What is Subversion? - - 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 time machine. - 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. - 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 - any collection of files. For you, those - files might be source code—for others, anything from - grocery shopping lists to digital video mixdowns and - beyond. - -
- - Is Subversion the Right Tool? - - 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. - 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. - 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".Or as a friend puts - it, swatting a fly with a - Buick. There are simpler tools that - efficiently replicate data without the - overhead of tracking changes, such as rsync - or unison. -
- -
- - Subversion's History - - Subversionhistory of - - In early 2000, CollabNet, Inc. (http://www.collab.net) 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 wasn't 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. - In February 2000, they contacted Karl Fogel, the author of - Open Source Development with CVS - (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 - Subversion, 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. - 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. - After fourteen months of coding, Subversion became - self-hosting on August 31, 2001. That is, - Subversion developers stopped using CVS to manage Subversion's - own source code, and started using Subversion instead. - 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. -
- -
- - Subversion's Features - - 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 , in which we provide a gentle introduction - to version control. - Subversion provides: - - - Directory versioning - - CVS only tracks the history of individual files, but - Subversion implements a virtual versioned - filesystem that tracks changes to whole directory trees - over time. Files and directories are - versioned. - - - - True version history - - 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. - - - - Atomic commits - - 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. - - - - Versioned metadata - - 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. - - - - Choice of network layers - - 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. - - - - Consistent data handling - - 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. - - - - Efficient branching and tagging - - 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. - - - - - Hackability - - 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. - - - -
- -
- - Subversion's Architecture - - illustrates - a mile-high view of Subversion's - design. -
- - Subversion's Architecture - - - - - - -
- 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 working copies). 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. -
- -
- - Subversion's Components - - 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 plenty more pages - in this book devoted to alleviating that confusion. - - - svn - - The command-line client program. - - - - svnversion - - A program for reporting the state (in terms of - revisions of the items present) of a working copy. - - - - svnlook - - A tool for directly inspecting a Subversion repository. - - - - svnadmin - - A tool for creating, tweaking or repairing a Subversion - repository. - - - - svndumpfilter - - A program for filtering Subversion repository dump - streams. - - - - mod_dav_svn - - A plug-in module for the Apache HTTP Server, used to - make your repository available to others over a - network. - - - - svnserve - - 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. - - - - svnsync - - A program for incrementally mirroring one - repository to another over a network. - - - - Assuming you have Subversion installed correctly, you should - be ready to start. The next two chapters will walk you through - the use of svn, Subversion's command-line client - program. -
-
-
- - - - Fundamental Concepts - - 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. - 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. - - - -
- - The Repository - - 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 - filesystem tree—a typical hierarchy - of files and directories. Any number of - clients 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. illustrates this. -
- - A typical client/server system - - - - - - -
- So why is this interesting? So far, this sounds like the - definition of a typical file server. And indeed, the repository - is a kind of file server, but it's not your - usual breed. What makes the Subversion repository special is - that it remembers every change 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. - 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 - previous states of the filesystem. For - example, a client can ask historical questions like, What - did this directory contain last Wednesday? or Who - was the last person to change this file, and what changes did he - make? These are the sorts of questions that are at the - heart of any version control system: - systems that are designed to track changes to data over time. - -
- - - -
- - Versioning Models - - 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. - -
- - The Problem of File-Sharing - - 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. - Consider the scenario shown in . - 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 - won't 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! -
- - The problem to avoid - - - - - - -
-
- -
- - The Lock-Modify-Unlock Solution - - Many version control systems use a - lock-modify-unlock 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 lock 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. - demonstrates this simple solution. -
- - The lock-modify-unlock solution - - - - - - -
- The problem with the lock-modify-unlock model is that it's - a bit restrictive, and often becomes a roadblock for - users: - - - Locking may cause administrative - problems. - - 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. - - - Locking may cause unnecessary - serialization. - - 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. - - - Locking may create a false sense of - security. - - 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. - - -
- -
- - The Copy-Modify-Merge Solution - - Subversion, CVS, and many other version control systems - use a copy-modify-merge model as an - alternative to locking. In this model, each user's client - contacts the project repository and creates a personal - working copy—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. - 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 - out-of-date. In other words, that file - A in the repository has somehow changed since he last copied - it. So Harry asks his client to merge - 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. and show this - process. -
- - The copy-modify-merge solution - - - - - - -
-
- - The copy-modify-merge solution (continued) - - - - - - -
- But what if Sally's changes do overlap - with Harry's changes? What then? This situation is called a - conflict, 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. - 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. - 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. - - - When Locking is Necessary - - While the lock-modify-unlock model is considered - generally harmful to collaboration, there are still times - when locking is appropriate. - 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. - 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 - . - -
-
- - - - -
- - Subversion in Action - - It's time to move from the abstract to the concrete. In - this section, we'll show real examples of Subversion being - used. - -
- - Subversion Repository URLs - - 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: - -$ svn checkout http://svn.example.com:9834/repos -… - - But there are some nuances in Subversion's handling of URLs - that are notable. For example, URLs containing the - file:// access method (used for local - repositories) must, in accordance with convention, have either a - server name of localhost or no server name at - all: - -$ svn checkout file:///var/svn/repos -… -$ svn checkout file://localhost/var/svn/repos -… - - Also, users of the file:// scheme on - Windows platforms will need to use an unofficially - standard 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 - X is the drive on which the repository - resides: - -C:\> svn checkout file:///X:/var/svn/repos -… -C:\> svn checkout "file:///X|/var/svn/repos" -… - - 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. - - Subversion's file:// URLs cannot be - used in a regular web browser the way typical - file:// URLs can. When you attempt to view - a file:// 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 ), and your browser - will not understand how to interact with that - filesystem. - - 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: - -$ svn checkout "http://host/path with space/project/españa" - - …then Subversion will escape the unsafe characters - and behave as if you had typed: - -$ svn checkout http://host/path%20with%20space/project/espa%C3%B1a - - 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 svn program. -
- -
- - Working Copies - - You've already read about working copies; now we'll - demonstrate how the Subversion client creates and uses - them. - 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. - 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 publish 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). - 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 .svn, also known as - the working copy administrative - directory. 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. - 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. - For example, suppose you have a repository that contains - two software projects, paint and - calc. Each project lives in its own - top-level subdirectory, as shown in . -
- - The repository's filesystem - - - - - - -
- To get a working copy, you must check - out some subtree of the repository. (The term - check out 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 /calc, you will get a - working copy like this: - -$ svn checkout http://svn.example.com/repos/calc -A calc/Makefile -A calc/integer.c -A calc/button.c -Checked out revision 56. - -$ ls -A calc -Makefile integer.c button.c .svn/ - - 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 /calc directory, with one - additional entry—.svn—which - holds the extra information needed by Subversion, as mentioned - earlier. - Suppose you make changes to button.c. - Since the .svn 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 - committing (or checking - in) changes to the repository. - To publish your changes to others, you can use - Subversion's commit command. - -$ svn commit button.c -m "Fixed a typo in button.c." -Sending button.c -Transmitting file data . -Committed revision 57. - - Now your changes to button.c 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 /calc, they - will see your changes in the latest version of the - file. - Suppose you have a collaborator, Sally, who checked out a - working copy of /calc at the same time - you did. When you commit your change to - button.c, Sally's working copy is left - unchanged; Subversion only modifies working copies at the - user's request. - To bring her project up to date, Sally can ask - Subversion to update her working copy, - by using the Subversion update command. - This will incorporate your changes into her working copy, as - well as any others that have been committed since she checked - it out. - -$ pwd -/home/sally/calc - -$ ls -A -.svn/ Makefile integer.c button.c - -$ svn update -U button.c -Updated to revision 57. - - The output from the svn update command - indicates that Subversion updated the contents of - button.c. Note that Sally didn't need to - specify which files to update; Subversion uses the information - in the .svn directory, and further - information in the repository, to decide which files need to - be brought up to date. - - - Repository URLs - - 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. - describes how - different URL schemes map to the available access - methods. - - - Repository Access URLs - - - - - Schema - Access Method - - - - - - file:/// - - direct repository access (on local disk) - - - - http:// - - access via WebDAV protocol to Subversion-aware - Apache server - - - - https:// - - same as http://, but with - SSL encryption. - - - - svn:// - - access via custom protocol to an - svnserve server - - - - svn+ssh:// - - same as svn://, but through - an SSH tunnel. - - - -
- For more information on how Subversion parses URLs, see - . For more - information on the different types of network servers - available for Subversion, see - . -
-
- -
- - Revisions - - An svn commit 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. - By atomic transaction, 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. - Each time the repository accepts a commit, this creates a - new state of the filesystem tree, called a - revision. 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. - 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 snapshot of the way the - repository looked after a commit. -
- - The repository - - - - - - -
- - - Global Revision Numbers - - Unlike most version control systems, Subversion's - revision numbers apply to entire trees, - 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 revision 5 of - foo.c, they really mean - foo.c as it appears in revision - 5. Notice that in general, revisions N and M of a - file do not 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 for more - details.) - - 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: - -calc/Makefile:4 - integer.c:4 - button.c:4 - - At the moment, this working directory corresponds exactly - to revision 4 in the repository. However, suppose you make a - change to button.c, 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: - -calc/Makefile:4 - integer.c:4 - button.c:5 - - Suppose that, at this point, Sally commits a change to - integer.c, creating revision 6. If you - use svn update to bring your working copy - up to date, then it will look like this: - -calc/Makefile:6 - integer.c:6 - button.c:6 - - Sally's change to integer.c will - appear in your working copy, and your change will still be - present in button.c. In this example, - the text of Makefile is identical in - revisions 4, 5, and 6, but Subversion will mark your working - copy of Makefile 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. -
- -
- - How Working Copies Track the Repository - - For each file in a working directory, Subversion records - two essential pieces of information in the - .svn/ administrative area: - - - what revision your working file is based on (this is - called the file's working - revision), and - - - a timestamp recording when the local copy was last - updated by the repository. - - - Given this information, by talking to the repository, - Subversion can tell which of the following four states a - working file is in: - - - Unchanged, and current - - 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 svn - commit of the file will do nothing, and an - svn update of the file will do - nothing. - - - - Locally changed, and current - - 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 svn commit of the file will - succeed in publishing your changes, and an svn - update of the file will do nothing. - - - - Unchanged, and out-of-date - - 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 svn - commit of the file will do nothing, and an - svn update of the file will fold the - latest changes into your working copy. - - - - Locally changed, and out-of-date - - The file has been changed both in the working - directory, and in the repository. An svn - commit of the file will fail with an - out-of-date error. The file should be - updated first; an svn update 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. - - - - This may sound like a lot to keep track of, but the - svn status command will show you the state - of any item in your working copy. For more information on - that command, see - . -
- -
- - Mixed Revision Working Copies - - 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. - -
- - Updates and Commits are Separate - - One of the fundamental rules of Subversion is that - a push action does not cause - a pull, 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 svn update should gracefully merge - repository changes into your own, rather than forcing you to - publish them. - 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. - For example, suppose you have a working copy entirely at - revision 10. You edit the - file foo.html and then perform - an svn commit, 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 svn - update, and svn commit doesn't - pull down new changes. If, on the other hand, - svn commit were 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 push and pull remaining - separate actions. Therefore the only safe thing the - Subversion client can do is mark the one - file—foo.html—as being at - revision 15. The rest of the working copy remains at - revision 10. Only by running svn update - can the latest changes be downloaded, and the whole working - copy be marked as revision 15. -
- -
- - Mixed revisions are normal - - The fact is, every time you run - svn commit, 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 svn - status --verbose command (see for more - information.) - 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 svn log command is used to - display the history of changes to a file or directory (see - ). 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 - svn update hasn't been run in a long - time), then the history of the older - version of the object is shown. -
- -
- - Mixed revisions are useful - - If your project is sufficiently complex, you'll discover - that it's sometimes nice to forcibly backdate - (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 . 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 time machine aspect of a version - control system—the feature which allows you to move - any portion of your working copy forward and backward in - history. -
- -
- - Mixed revisions have limitations - - However you make use of mixed revisions in your working - copy, there are limitations to this flexibility. - 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. - Second, you cannot commit a metadata change to a - directory unless it's fully up-to-date. You'll learn about - attaching properties to items in . 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. -
-
-
- - - -
- - Summary - - We've covered a number of fundamental Subversion concepts in - this chapter: - - - We've introduced the notions of the central repository, - the client working copy, and the array of repository - revision trees. - - - We've seen some simple examples of how two collaborators - can use Subversion to publish and receive changes from one - another, using the copy-modify-merge - model. - - - We've talked a bit about the way Subversion tracks and - manages information in a working copy. - - - 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. -
-
- - - - Basic Usage - - 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. - 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 - and are familiar with the general - model of Subversion. For a complete reference of all commands, - see . - - - -
- - Help! - - Before reading on, here is the most important command you'll - ever need when using Subversion: svn help. - The Subversion command-line client is self-documenting—at - any time, a quick svn help - SUBCOMMAND will describe - the syntax, options, and behavior of the subcommand. - -$ svn help import -import: Commit an unversioned file or tree into the repository. -usage: import [PATH] URL - - Recursively commit a copy of PATH to URL. - If PATH is omitted '.' is assumed. - Parent directories are created as necessary in the repository. - If PATH is a directory, the contents of the directory are added - directly under URL. - -Valid options: - -q [--quiet] : print as little as possible - -N [--non-recursive] : operate on single directory only -… - - - - Options and Switches and Flags, Oh My! - - The Subversion command line client has numerous command - modifiers (which we call options), but there are two - distinct kinds of options—short options - that are a single hyphen followed by a single letter, and - long options that consist of two hyphens - followed by a number of letters (eg -s - and --this-is-a-long-option - 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 usually 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. - -
- - - -
- - Getting Data into your Repository - - There are two ways to get new files into your Subversion - repository: svn import and svn - add. We'll discuss svn import here - and svn add later in this chapter when we - review a typical day with Subversion. - -
- - svn import - - The svn import command is a quick way to - copy an unversioned tree of files into a repository, creating - intermediate directories as necessary. svn - import 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: - -$ svnadmin create /var/svn/newrepos -$ svn import mytree file:///var/svn/newrepos/some/project \ - -m "Initial import" -Adding mytree/foo.c -Adding mytree/bar.c -Adding mytree/subdir -Adding mytree/subdir/quux.h - -Committed revision 1. - - The previous example copied the contents of directory - mytree under the directory - some/project in the repository: - -$ svn list file:///var/svn/newrepos/some/project -bar.c -foo.c -subdir/ - - Note that after the import is finished, the original tree - is not converted into a working copy. To - start working, you still need to svn - checkout a fresh working copy of the tree. -
- -
- - Recommended repository layout - - While Subversion's flexibility allows you to layout your - repository in any way that you choose, we recommend that you - create a trunk directory to hold the - main line of development, a - branches directory to contain branch - copies, and a tags directory to contain tag - copies, for example: - -$ svn list file:///var/svn/repos -/trunk -/branches -/tags - - You'll learn more about tags and branches in . For details and how to set up - multiple projects, see and to read more - about project roots. -
-
- - - -
- - Initial Checkout - - Most of the time, you will start using a Subversion - repository by doing a checkout of your - project. Checking out a repository creates a working - copy of it on your local machine. This copy contains - the HEAD (latest revision) of the Subversion - repository that you specify on the command line: - -$ svn checkout http://svn.collab.net/repos/svn/trunk -A trunk/Makefile.in -A trunk/ac-helpers -A trunk/ac-helpers/install.sh -A trunk/ac-helpers/install-sh -A trunk/build.conf -… -Checked out revision 8810. - - - - What's in a Name? - - 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 - - tells you how to give Subversion a hint that - textual operations don't make sense for a - particular file. There are a few places, however, where - Subversion places restrictions on information it - stores. - 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). - 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 - or . - 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 - legally correct versions for internal - use. - - 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: - -$ svn checkout \ - http://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/ -A cmdline/revert_tests.py -A cmdline/diff_tests.py -A cmdline/autoprop_tests.py -A cmdline/xmltests -A cmdline/xmltests/svn-test.sh -… -Checked out revision 8810. - - Since Subversion uses a copy-modify-merge - model instead of lock-modify-unlock (see ), 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. - - While your working copy is just like any other - collection of files and directories on your system, - you can edit files at will, but you must tell Subversion - about everything else that you do. For - example, if you want to copy or move an item in a working - copy, you should use svn copy or - svn move instead of the copy and move - commands provided by your operating system. We'll talk more - about them later in this chapter. - - 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. - - - What's with the <filename>.svn</filename> directory? - - Every directory in a working copy contains an - administrative area, a subdirectory named - .svn. 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. - If you accidentally remove the .svn - subdirectory, the easiest way to fix the problem is to remove - the entire containing directory (a normal system deletion, - not svn delete), then run svn - update from a parent directory. The Subversion - client will re-download the directory you've deleted, with a - new .svn area as well. - - 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: - -$ svn checkout http://svn.collab.net/repos/svn/trunk subv -A subv/Makefile.in -A subv/ac-helpers -A subv/ac-helpers/install.sh -A subv/ac-helpers/install-sh -A subv/build.conf -… -Checked out revision 8810. - - That will place your working copy in a directory named - subv instead of a directory named - trunk as we did previously. The directory - subv will be created if it doesn't already - exist. -
- - Disabling Password Caching - - 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,Of - course, you're not terribly worried—first because you - know that you can't really 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? - you can disable caching either permanently or on a - case-by-case basis. - To disable password caching for a particular one-time - command, pass the option on - the commandline. To permanently disable caching, you can add - the line store-passwords = no to your local - machine's Subversion configuration file. See for - details. -
-
- - Authenticating as a Different User - - 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 on the - commandline and Subversion will attempt to authenticate as - that user, prompting you for a password if necessary. -
-
- - - -
- - Basic Work Cycle - - 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. - The typical work cycle looks like this: - - - Update your working copy - - - - svn update - - - - - - Make changes - - - - svn add - - - - - svn delete - - - - - svn copy - - - - - svn move - - - - - - Examine your changes - - - - svn status - - - - - svn diff - - - - - - Possibly undo some changes - - - - svn revert - - - - - - Resolve Conflicts (Merge Others' Changes) - - - - svn update - - - - - svn resolved - - - - - - Commit your changes - - - - svn commit - - - - - - -
- - Update Your Working Copy - - 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 - svn update to bring your working copy into - sync with the latest revision in the repository. - -$ svn update -U foo.c -U bar.c -Updated to revision 2. - - In this case, someone else checked in modifications to - both foo.c and bar.c - since the last time you updated, and Subversion has updated - your working copy to include those changes. - When the server sends changes to your working copy via - svn update, 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 . -
- -
- - Make Changes to Your Working Copy - - 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 svn add, svn - delete, svn copy, svn - move, and svn mkdir. 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. - 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 mark 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. - Here is an overview of the five Subversion subcommands - that you'll use most often to make tree changes. - - - Versioning symbolic links - - On non-Windows platforms, Subversion is able to version - files of the special type symbolic - link (or, symlink). 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. - 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 - points. 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. - - - - - svn add foo - - - Schedule file, directory, or symbolic link - foo to be added to the repository. - When you next commit, foo will - become a child of its parent directory. Note that if - foo is a directory, everything - underneath foo will be scheduled - for addition. If you only want to add - foo itself, pass the - option. - - - - - svn delete foo - - - Schedule file, directory, or symbolic link - foo to be deleted from the - repository. If foo is a file or - link, it is immediately deleted from your working copy. - If foo is a directory, it is not - deleted, but Subversion schedules it for deletion. When - you commit your changes, foo will - be entirely removed from your working copy and the - repository. - Of course, nothing is ever totally - deleted from the repository—just from the - HEAD 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 - . - - - - - - svn copy foo bar - - - Create a new item bar as a - duplicate of foo and automatically - schedule bar for addition. When - bar is added to the repository on - the next commit, its copy history is recorded (as having - originally come from foo). - svn copy does not create intermediate - directories unless you pass the - . - - - - - svn move foo bar - - - This command is exactly the same as running - svn copy foo bar; svn delete foo. - That is, bar is scheduled for - addition as a copy of foo, and - foo is scheduled for removal. - svn move does not create intermediate - directories unless you pass the - . - - - - - svn mkdir blort - - - This command is exactly the same as running - mkdir blort; svn add blort. That is, - a new directory named blort is - created and scheduled for addition. - - - - - - Changing the Repository Without a Working Copy - - There are 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 svn mkdir, svn - copy, svn move, and - svn delete can work with URLs (And don't - forget that svn import always makes - changes to a URL). - URL operations behave in this manner because commands - that operate on a working copy can use the working copy as a - sort of staging area 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. - -
- -
- - Examine Your Changes - - 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 svn status, and dig - into the details of those changes by using svn - diff. - - - Look Ma! No Network! - - The commands svn status, - svn diff, and svn - revert can be used without any network access even - if your repository is 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.And - also that you don't have a WAN card. Thought you got us, - huh? - Subversion does this by keeping private caches of - pristine versions of each versioned file inside of the - .svn administrative areas. This allows - Subversion to report—and revert—local - modifications to those files without network - access. This cache (called the - text-base) also allows Subversion to send the - user's local modifications during a commit to the server as - a compressed delta (or - difference) 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. - - 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 pristine copy of each version - controlled file within the .svn 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. - -
- - See an overview of your changes - - To get an overview of your changes, you'll use the - svn status command. You'll probably use - svn status more than any other Subversion - command. - - - CVS Users: Hold That Update! - - You're probably used to using cvs - update to see what changes you've made to your - working copy. svn status 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. - In Subversion, update 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 update command to - see what local modifications you've made. - - If you run svn status 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 svn - status can return. (Note that the text following - # is not - actually printed by svn status.) - -A stuff/loot/bloo.h # file is scheduled for addition -C stuff/loot/lump.c # file has textual conflicts from an update -D stuff/fish.c # file is scheduled for deletion -M bar.c # the content in bar.c has local modifications - - In this output format svn status - 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: - - - - A item - - - The file, directory, or symbolic link - item has been scheduled for - addition into the repository. - - - - - C item - - - The file item 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. - - - - - D item - - - The file, directory, or symbolic link - item has been scheduled for - deletion from the repository. - - - - - M item - - - The contents of the file item - have been modified. - - - - If you pass a specific path to svn - status, you get information about that item - alone: - -$ svn status stuff/fish.c -D stuff/fish.c - - svn status also has a - option, which will show you - the status of every item in your - working copy, even if it has not been changed: - -$ svn status -v -M 44 23 sally README - 44 30 sally INSTALL -M 44 20 harry bar.c - 44 18 ira stuff - 44 35 harry stuff/trout.c -D 44 19 ira stuff/fish.c - 44 21 sally stuff/things -A 0 ? ? stuff/things/bloo.h - 44 36 harry stuff/things/gloo.c - - This is the long form output of - svn status. 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. - None of the prior invocations to svn - status contact the repository—instead, they - compare the metadata in the - .svn directory with the working copy. - Finally, there is the - option, which contacts the repository and adds information - about things that are out-of-date: - -$ svn status -u -v -M * 44 23 sally README -M 44 20 harry bar.c - * 44 35 harry stuff/trout.c -D 44 19 ira stuff/fish.c -A 0 ? ? stuff/things/bloo.h -Status against revision: 46 - - Notice the two asterisks: if you were to run - svn update at this point, you would - receive changes to README - and trout.c. This tells you some very - useful information—you'll need to update and get the - server changes on README before you - commit, or the repository will reject your commit for being - out-of-date. (More on this subject later.) - svn status 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 . -
- -
- - Examine the details of your local modifications - - Another way to examine your changes is with the - svn diff command. You can find out - exactly how you've modified things by - running svn diff with no arguments, which - prints out file changes in unified diff - format: - -$ svn diff -Index: bar.c -=================================================================== ---- bar.c (revision 3) -+++ bar.c (working copy) -@@ -1,7 +1,12 @@ -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <unistd.h> -+ -+#include <stdio.h> - - int main(void) { -- printf("Sixty-four slices of American Cheese...\n"); -+ printf("Sixty-five slices of American Cheese...\n"); - return 0; - } - -Index: README -=================================================================== ---- README (revision 3) -+++ README (working copy) -@@ -193,3 +193,4 @@ -+Note to self: pick up laundry. - -Index: stuff/fish.c -=================================================================== ---- stuff/fish.c (revision 1) -+++ stuff/fish.c (working copy) --Welcome to the file known as 'fish'. --Information on fish will be here soon. - -Index: stuff/things/bloo.h -=================================================================== ---- stuff/things/bloo.h (revision 8) -+++ stuff/things/bloo.h (working copy) -+Here is a new file to describe -+things about bloo. - - The svn diff command produces this - output by comparing your working files against the cached - pristine copies within the - .svn area. Files scheduled for - addition are displayed as all added-text, and files - scheduled for deletion are displayed as all deleted - text. - Output is displayed in unified diff format. That is, - removed lines are prefaced with - and - added lines are prefaced with - +. svn diff also - prints filename and offset information useful to the - patch program, so you can generate - patches by redirecting the diff output to a - file: - -$ svn diff > patchfile - - You could, for example, email the patch file to another - developer for review or testing prior to commit. - 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 - and pass any flags you'd like to - it using the option. For - example, to see local differences in file - foo.c in context output format while - ignoring case differences, you might run svn diff - --diff-cmd /usr/bin/diff --extensions '-i' - foo.c. -
-
- -
- - Undoing Working Changes - - Suppose while viewing the output of svn - diff 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. - This is a perfect opportunity to use svn - revert: - -$ svn revert README -Reverted 'README' - - Subversion reverts the file to its pre-modified state by - overwriting it with the cached pristine copy - from the .svn area. But also note that - svn revert can undo - any scheduled operations—for - example, you might decide that you don't want to add a new - file after all: - -$ svn status foo -? foo - -$ svn add foo -A foo - -$ svn revert foo -Reverted 'foo' - -$ svn status foo -? foo - - - svn revertITEM has exactly the same - effect as deleting ITEM from - your working copy and then running svn update -r - BASE ITEM. However, - if you're reverting a file, svn revert - has one very noticeable difference—it doesn't have - to communicate with the repository to restore your - file. - - Or perhaps you mistakenly removed a file from version - control: - -$ svn status README - README - -$ svn delete README -D README - -$ svn revert README -Reverted 'README' - -$ svn status README - README - -
- -
- - Resolve Conflicts (Merging Others' Changes) - - We've already seen how svn status -u - can predict conflicts. Suppose you run svn - update and some interesting things occur: - -$ svn update -U INSTALL -G README -C bar.c -Updated to revision 46. - - The U and - G codes are no cause for - concern; those files cleanly absorbed changes from the - repository. The files marked with - U contained no local changes - but were Updated with changes - from the repository. The G - stands for merGed, 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. - But the C stands for - conflict. This means that the - changes from the server overlapped with your own, and now you - have to manually choose between them. - Whenever a conflict occurs, three things typically occur - to assist you in noticing and resolving that conflict: - - - Subversion prints a C - during the update, and remembers that the file is in a - state of conflict. - - - If Subversion considers the file to be mergeable, - it places conflict - markers—special strings of text which - delimit the sides of the - conflict—into the file to visibly demonstrate the - overlapping areas. (Subversion uses the - svn:mime-type property to decide if a - file is capable of contextual, line-based merging. See - to learn more.) - - - For every conflicted file, Subversion places three - extra unversioned files in your working copy: - - - - filename.mine - - - 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 - .mine file isn't created, since - it would be identical to the working file.) - - - - - filename.rOLDREV - - - This is the file that was the - BASE revision before you updated - your working copy. That is, the file that you - checked out before you made your latest - edits. - - - - - filename.rNEWREV - - - This is the file that your Subversion client - just received from the server when you updated your - working copy. This file corresponds to the - HEAD revision of the - repository. - - - - Here OLDREV is the revision number - of the file in your .svn directory - and NEWREV is the revision number of - the repository HEAD. - - - For example, Sally makes changes to the file - sandwich.txt 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: - -$ svn update -C sandwich.txt -Updated to revision 2. -$ ls -1 -sandwich.txt -sandwich.txt.mine -sandwich.txt.r1 -sandwich.txt.r2 - - At this point, Subversion will not - allow you to commit the file sandwich.txt - until the three temporary files are removed. - -$ svn commit -m "Add a few more things" -svn: Commit failed (details follow): -svn: Aborting commit: '/home/sally/svn-work/sandwich.txt' remains in conflict - - If you get a conflict, you need to do one of three - things: - - - Merge the conflicted text by hand (by - examining and editing the conflict markers within the - file). - - - Copy one of the temporary files on top of your - working file. - - - Run svn revert <filename> - to throw away all of your local changes. - - - Once you've resolved the conflict, you need to let - Subversion know by running svn resolved. - This removes the three temporary files and Subversion no - longer considers the file to be in a state of - conflict.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. - -$ svn resolved sandwich.txt -Resolved conflicted state of 'sandwich.txt' - - -
- - Merging Conflicts by Hand - - 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. - Here's an example. Due to a miscommunication, you and - Sally, your collaborator, both edit the file - sandwich.txt 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 - sandwich.txt to resolve the conflicts. - First, let's take a look at the file: - -$ cat sandwich.txt -Top piece of bread -Mayonnaise -Lettuce -Tomato -Provolone -<<<<<<< .mine -Salami -Mortadella -Prosciutto -======= -Sauerkraut -Grilled Chicken ->>>>>>> .r2 -Creole Mustard -Bottom piece of bread - - 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: - -<<<<<<< .mine -Salami -Mortadella -Prosciutto -======= - - The text between the second and third sets of conflict - markers is the text from Sally's commit: - -======= -Sauerkraut -Grilled Chicken ->>>>>>> .r2 - - 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.And if you - ask them for it, they may very well ride you out of town on - a rail. Once you've agreed on the changes - you will check in, edit your file and remove the conflict - markers. - -Top piece of bread -Mayonnaise -Lettuce -Tomato -Provolone -Salami -Mortadella -Prosciutto -Creole Mustard -Bottom piece of bread - - Now run svn resolved, and you're - ready to commit your changes: - -$ svn resolved sandwich.txt -$ svn commit -m "Go ahead and use my sandwich, discarding Sally's edits." - - Note that svn resolved, 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 svn resolved 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. - 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. -
- -
- - Copying a File Onto Your Working File - - 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: - -$ svn update -C sandwich.txt -Updated to revision 2. -$ ls sandwich.* -sandwich.txt sandwich.txt.mine sandwich.txt.r2 sandwich.txt.r1 -$ cp sandwich.txt.r2 sandwich.txt -$ svn resolved sandwich.txt - -
- -
- - Punting: Using <command>svn revert</command> - - 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: - -$ svn revert sandwich.txt -Reverted 'sandwich.txt' -$ ls sandwich.* -sandwich.txt - - Note that when you revert a conflicted file, you don't - have to run svn resolved. -
-
- -
- - Commit Your Changes - - Finally! Your edits are finished, you've merged all - changes from the server, and you're ready to commit your - changes to the repository. - The svn commit command sends all of - your changes to the repository. When you commit a change, you - need to supply a log message, - 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 - (or ) - option: - -$ svn commit -m "Corrected number of cheese slices." -Sending sandwich.txt -Transmitting file data . -Committed revision 3. - - 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: - -$ svn commit -F logmsg -Sending sandwich.txt -Transmitting file data . -Committed revision 4. - - If you fail to specify either the - or option, - then Subversion will automatically launch your favorite editor - (see the editor-cmd section in - ) for composing a log - message. - - 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. - -$ svn commit -Waiting for Emacs...Done - -Log message unchanged or not specified -a)bort, c)ontinue, e)dit -a -$ - - - 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 has done - that, the entire commit will fail with a message informing you - that one or more of your files is out-of-date: - -$ svn commit -m "Add another rule" -Sending rules.txt -svn: Commit failed (details follow): -svn: Your file or directory 'sandwich.txt' is probably out-of-date -… - - (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.) - At this point, you need to run svn - update, deal with any merges or conflicts that - result, and attempt your commit again. - 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. -
-
- - - -
- - Examining History - - 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 peer into the past instead of - going into the past. - There are several commands that can provide you with - historical data from the repository: - - - - svn log - - - Shows you broad information: log messages with date - and author information attached to revisions, and which - paths changed in each revision. - - - - - svn diff - - - Shows line-level details of a particular change. - - - - - svn cat - - - Retrieves a file as it existed in a particular - revision number and display it on your screen. - - - - - svn list - - - Displays the files in a directory for any given - revision. - - - - -
- - Generating a list of historical changes - - To find information about the history of a file or - directory, use the svn log - command. svn log 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. - -$ svn log ------------------------------------------------------------------------- -r3 | sally | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line - -Added include lines and corrected # of cheese slices. ------------------------------------------------------------------------- -r2 | harry | Mon, 15 Jul 2002 17:47:57 -0500 | 1 line - -Added main() methods. ------------------------------------------------------------------------- -r1 | sally | Mon, 15 Jul 2002 17:40:08 -0500 | 1 line - -Initial import ------------------------------------------------------------------------- - - Note that the log messages are printed in - reverse chronological order by default. - If you wish to see a different range of revisions in a - particular order, or just a single revision, pass the - option: - -$ svn log -r 5:19 # shows logs 5 through 19 in chronological order - -$ svn log -r 19:5 # shows logs 5 through 19 in reverse order - -$ svn log -r 8 # shows log for revision 8 - - You can also examine the log history of a single file or - directory. For example: - -$ svn log foo.c -… -$ svn log http://foo.com/svn/trunk/code/foo.c -… - - These will display log messages only - for those revisions in which the working file (or URL) - changed. - - - Why Does <command>svn log</command> Not Show Me What I - Just Committed? - - If you make a commit and immediately type svn - log 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 - svn commit and the default behavior of - svn log. First, when you commit changes - to the repository, svn only bumps the - revision of files (and directories) that it commits, so - usually the parent directory remains at the older revision - (See for - why). svn log 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 svn - log by using the - () option. - - If you want even more information about a file or - directory, svn log also takes a - 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, svn log will include a - list of changed paths in a revision in its output: - -$ svn log -r 8 -v ------------------------------------------------------------------------- -r8 | sally | 2002-07-14 08:15:29 -0500 | 1 line -Changed paths: -M /trunk/code/foo.c -M /trunk/code/bar.h -A /trunk/code/doc/README - -Frozzled the sub-space winch. - ------------------------------------------------------------------------- - - svn log also takes a - () option, which suppresses the body of the - log message. When combined with , it - gives just the names of the changed files. - - - Why Does <command>svn log</command> Give Me an Empty - Response? - - After working with Subversion for a bit, most users will - come across something like this: - -$ svn log -r 2 ------------------------------------------------------------------------- -$ - - At first glance, this seems like an error. But recall - that while revisions are repository-wide, svn - log 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 svn log directly at - the top-most URL of your repository, as in svn log -r 2 - http://svn.collab.net/repos/svn. - -
- -
- - Examining the details of historical changes - - We've already seen svn diff - 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. - In fact, it turns out that there are - three distinct uses of svn - diff: - - - Examining local changes - - - Comparing your working copy to the repository - - - Comparing repository to repository - - - -
- - Examining Local Changes - - As we've seen, invoking svn diff with - no options will compare your working files to the cached - pristine copies in - the .svn area: - -$ svn diff -Index: rules.txt -=================================================================== ---- rules.txt (revision 3) -+++ rules.txt (working copy) -@@ -1,4 +1,5 @@ - Be kind to others - Freedom = Responsibility - Everything in moderation --Chew with your mouth open -+Chew with your mouth closed -+Listen when others are speaking -$ - -
- -
- - Comparing Working Copy to Repository - - If a single - () number is passed, then your - working copy is compared to the specified revision in the - repository. - -$ svn diff -r 3 rules.txt -Index: rules.txt -=================================================================== ---- rules.txt (revision 3) -+++ rules.txt (working copy) -@@ -1,4 +1,5 @@ - Be kind to others - Freedom = Responsibility - Everything in moderation --Chew with your mouth open -+Chew with your mouth closed -+Listen when others are speaking -$ - -
- -
- - Comparing Repository to Repository - - If two revision numbers, separated by a colon, are - passed via , then the two - revisions are directly compared. - -$ svn diff -r 2:3 rules.txt -Index: rules.txt -=================================================================== ---- rules.txt (revision 2) -+++ rules.txt (revision 3) -@@ -1,4 +1,4 @@ - Be kind to others --Freedom = Chocolate Ice Cream -+Freedom = Responsibility - Everything in moderation - Chew with your mouth open -$ - - A more convenient way of comparing a revision to the - previous revision is to use the : - - -$ svn diff -c 3 rules.txt -Index: rules.txt -=================================================================== ---- rules.txt (revision 2) -+++ rules.txt (revision 3) -@@ -1,4 +1,4 @@ - Be kind to others --Freedom = Chocolate Ice Cream -+Freedom = Responsibility - Everything in moderation - Chew with your mouth open -$ - - 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: - -$ svn diff -c 5 http://svn.example.com/repos/example/trunk/text/rules.txt -… -$ - -
-
- -
- - Browsing the repository - - Using svn cat and svn - list, 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. - -
- - - <command>svn cat</command> - - - If you want to examine an earlier version of a file and - not necessarily the differences between two files, you can use - svn cat: - -$ svn cat -r 2 rules.txt -Be kind to others -Freedom = Chocolate Ice Cream -Everything in moderation -Chew with your mouth open -$ - - You can also redirect the output directly into a - file: - -$ svn cat -r 2 rules.txt > rules.txt.v2 -$ - -
- -
- - - <command>svn list</command> - - - The svn list command shows you what - files are in a repository directory without actually - downloading the files to your local machine: - -$ svn list http://svn.collab.net/repos/svn -README -branches/ -clients/ -tags/ -trunk/ - - If you want a more detailed listing, pass the - flag to get output like - this: - -$ svn list -v http://svn.collab.net/repos/svn - 20620 harry 1084 Jul 13 2006 README - 23339 harry Feb 04 01:40 branches/ - 21282 sally Aug 27 09:41 developer-resources/ - 23198 harry Jan 23 17:17 tags/ - 23351 sally Feb 05 13:26 trunk/ - - 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. - - The svn list with no arguments - defaults to the repository URL of the - current working directory, not the - local working copy directory. After all, if you wanted a - listing of your local directory, you could use just plain - ls (or any reasonable non-Unixy - equivalent). - -
-
- -
- - Fetching older repository snapshots - - In addition to all of the above commands, you can use - svn update and svn - checkout with the option - to take an entire working copy back in time - See? We told you that Subversion was a time - machine.: - -$ svn checkout -r 1729 # Checks out a new working copy at r1729 -… -$ svn update -r 1729 # Updates an existing working copy to r1729 -… - - - Many Subversion newcomers attempt to use the above - svn update example to undo - 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 for a - description of how to undo a commit. - - Lastly, if you're building a release and wish to bundle up - your files from Subversion but don't want those - pesky .svn directories in the way, then - you can use svn export to create a local - copy of all or part of your repository - sans .svn directories. As - with svn update and - svn checkout, you can also pass the - option to svn - export: - -$ svn export http://svn.example.com/svn/repos1 # Exports latest revision -… -$ svn export http://svn.example.com/svn/repos1 -r 1729 -# Exports revision r1729 -… - -
-
- - - -
- - Sometimes You Just Need to Clean Up - - When Subversion modifies your working copy (or any - information within .svn), 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. - And this is exactly what svn cleanup - 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 locked, then this is the command that you - should run. Also, svn status will display - an L next to locked items: - -$ svn status - L somedir -M somedir/foo.c - -$ svn cleanup -$ svn status -M somedir/foo.c - - Don't confuse these working copy locks with the ordinary - locks that Subversion users create when using - the lock-modify-unlock model of concurrent - version control; see - for - clarification. -
- - - -
- - Summary - - Now we've covered most of the Subversion client commands. - Notable exceptions are those dealing with branching and - merging (see ) and properties (see - ). However, you may want to - take a moment to skim through to - get an idea of all the many different commands that Subversion - has—and how you can use them to make your work - easier. -
-
- - - - Advanced Topics - - 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 - svn commit and svn update - functions. You've probably even developed a reflex which causes - you to run the svn status command almost - unconsciously. For all intents and purposes, you are ready to - use Subversion in a typical environment. - But the Subversion feature set doesn't stop at common - version control operations. It has other bits of - functionality besides just communicating file and - directory changes to and from a central repository. - 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 and . Once you've mastered those basics and - consumed this chapter, you'll be a Subversion power-user! - - - -
- - Revision Specifiers - - As you saw in , 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 - do 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. - 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, - svn allows as input some additional forms of - revision specifiers—revision keywords, and revision - dates. - - The various forms of Subversion revision specifiers can be - mixed and matched when used to specify revision ranges. For - example, you can use - where REV1 is a revision keyword - and REV2 is a revision number, or - where REV1 is a date and - REV2 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. - - -
- - Revision Keywords - - - revisions - revision keywords - - - HEAD - - - BASE - - - COMMITTED - - - PREV - - The Subversion client understands a number of - revision keywords. These keywords can - be used instead of integer arguments to the - switch, and are resolved into - specific revision numbers by Subversion: - - - HEAD - - The latest (or youngest) revision in - the repository. - - - - BASE - - The revision number of an item in a working copy. - If the item has been locally modified, the BASE - version refers to the way the item appears - without those local modifications. - - - - COMMITTED - - The most recent revision prior to, or equal to, - BASE, in which an item changed. - - - - PREV - - The revision immediately before - the last revision in which an item changed. - Technically, this boils down to - COMMITTED-1. - - - - As can be derived from their descriptions, the - PREV, BASE, and - COMMITTED revision keywords are used only - when referring to a working copy path—they don't apply - to repository URLs. HEAD, on the other - hand, can be used in conjunction with both of these path - types. - Here are some examples of revision keywords in - action: - -$ svn diff -r PREV:COMMITTED foo.c -# shows the last change committed to foo.c - -$ svn log -r HEAD -# shows log message for the latest repository commit - -$ svn diff -r HEAD -# compares your working copy (with all of its local changes) to the -# latest version of that tree in the repository - -$ svn diff -r BASE:HEAD foo.c -# compares the unmodified version of foo.c with the latest version of -# foo.c in the repository - -$ svn log -r BASE:HEAD -# shows all commit logs for the current versioned directory since you -# last updated - -$ svn update -r PREV foo.c -# rewinds the last change on foo.c, decreasing foo.c's working revision - -$ svn diff -r BASE:14 foo.c -# compares the unmodified version of foo.c with the way foo.c looked -# in revision 14 - -
- -
- - Revision Dates - - - revisions - specified as dates - - 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 can also accept as input date specifiers wrapped in - curly braces ({ and }). - 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.) - -$ svn checkout -r {2006-02-17} -$ svn checkout -r {15:30} -$ svn checkout -r {15:30:00.200000} -$ svn checkout -r {"2006-02-17 15:30"} -$ svn checkout -r {"2006-02-17 15:30 +0230"} -$ svn checkout -r {2006-02-17T15:30} -$ svn checkout -r {2006-02-17T15:30Z} -$ svn checkout -r {2006-02-17T15:30-04:00} -$ svn checkout -r {20060217T1530} -$ svn checkout -r {20060217T1530Z} -$ svn checkout -r {20060217T1530-0500} -… - - 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: - -$ svn log -r {2006-11-28} ------------------------------------------------------------------------- -r12 | ira | 2006-11-27 12:31:51 -0600 (Mon, 27 Nov 2006) | 6 lines -… - - - - Is Subversion a Day Early? - - If you specify a single date as a revision without - specifying a time of day (for example - 2006-11-27), 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 most recent revision of the - repository as of the date you give. If you give - a date without a timestamp, like - 2006-11-27, 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. - If you want to include the 27th in your search, you can - either specify the 27th with the time ({"2006-11-27 - 23:59"}), or just specify the next day - ({2006-11-28}). - - You can also use a range of dates. Subversion will find - all revisions between both dates, inclusive: - -$ svn log -r {2006-11-20}:{2006-11-29} -… - - - Since the timestamp of a revision is stored as an - unversioned, modifiable property of the revision (see , 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. - -
-
- - - -
- - Properties - - - properties - - 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. - But it doesn't stop there. - 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 - properties, 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. - - Subversion has reserved the set of properties whose names - begin with svn: 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. - - 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. - Subversion has no particular policy regarding the use of - properties. It asks only that you not use property names that - begin with the prefix svn:. 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 - . - 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 - svn subcommands, and how property - modifications affect your normal Subversion workflow. - -
- - Why Properties? - - 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. - 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. - Now, you can get this functionality using traditional - files. That is, you can have your - image123.jpg and an - image123-thumbnail.jpg 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 - thumbnails/image123.jpg. 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. - Now consider the same website deployed in a way that makes - use of Subversion's file properties. Imagine having a single - image file, image123.jpg, and then - properties set on that file named caption, - datestamp, and even - thumbnail. 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 svn (or better yet, they can use - the Subversion language bindings—see ) to dig out the - extra information that your site needs to display without - having to read an index file or play path manipulation - games. - 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 test-results property on - that revision with a value all passing, - that's meaningful information to have. - - - Searchability (or, Why <emphasis>Not</emphasis> - Properties) - - 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 set a custom property, - finding that property later is whole - different ball of wax. - 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 svn propget 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. - 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 svn log. It is quite common to - see in Subversion log messages the likes of: - -Issue(s): IZ2376, IZ1919 -Reviewed by: sally - -This fixes a nasty segfault in the wort frabbing process -… - - 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. - -
- -
- - Manipulating Properties - - The svn 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 propset - subcommand. - -$ svn propset copyright '(c) 2006 Red-Bean Software' calc/button.c -property 'copyright' set on 'calc/button.c' -$ - - 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 propset subcommand takes a - option for specifying the name of - a file which contains the new property value. - -$ svn propset license -F /path/to/LICENSE calc/button.c -property 'license' set on 'calc/button.c' -$ - - There are some restrictions on the names you can use for - properties. A property name must start with a letter, a colon - (:), or an underscore - (_); after that, you can also use digits, - hyphens (-), and periods - (.). - If you're familiar with XML, this is pretty much the - ASCII subset of the syntax for XML "Name". - - In addition to the propset command, the - svn program supplies the - propedit command. This command uses the - configured editor program (see ) to add or - modify properties. When you run the command, - svn 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: - -$ svn propedit copyright calc/button.c ### exit the editor without changes -No changes to property 'copyright' on 'calc/button.c' -$ - - We should note that, as with other svn - 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: - -$ svn propset copyright '(c) 2006 Red-Bean Software' calc/* -property 'copyright' set on 'calc/Makefile' -property 'copyright' set on 'calc/button.c' -property 'copyright' set on 'calc/integer.c' -… -$ - - All of this property adding and editing isn't really very - useful if you can't easily get the stored property value. So - the svn program supplies two subcommands - for displaying the names and values of properties stored on - files and directories. The svn proplist - 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 svn - propget. 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. - -$ svn proplist calc/button.c -Properties on 'calc/button.c': - copyright - license -$ svn propget copyright calc/button.c -(c) 2006 Red-Bean Software - - There's even a variation of the - proplist command that will list both the - name and value of all of the properties. Simply supply the - () option. - -$ svn proplist -v calc/button.c -Properties on 'calc/button.c': - copyright : (c) 2006 Red-Bean Software - license : ================================================================ -Copyright (c) 2006 Red-Bean Software. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions, and the recipe for Fitz's famous -red-beans-and-rice. -… - - The last property-related subcommand is - propdel. Since Subversion allows you to - store properties with empty values, you can't remove a - property altogether using propedit or - propset. For example, this command will - not yield the desired effect: - -$ svn propset license '' calc/button.c -property 'license' set on 'calc/button.c' -$ svn proplist -v calc/button.c -Properties on 'calc/button.c': - copyright : (c) 2006 Red-Bean Software - license : -$ - - You need to use the propdel subcommand - to delete properties altogether. The syntax is similar to the - other property commands: - -$ svn propdel license calc/button.c -property 'license' deleted from 'calc/button.c'. -$ svn proplist -v calc/button.c -Properties on 'calc/button.c': - copyright : (c) 2006 Red-Bean Software -$ - - Remember those unversioned revision properties? You can - modify those, too, using the same svn - subcommands that we just described. Simply add the - 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. - Fixing spelling errors, grammatical gotchas, and - just-plain-wrongness in commit log - messages is perhaps the most common use case for the - option. - If your current working directory is part of a working copy of - your repository, you can simply run the - svn propset command with no target path: - -$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop -property 'svn:log' set on repository revision '11' -$ - - 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: - -$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop \ - http://svn.example.com/repos/project -property 'svn:log' set on repository revision '11' -$ - - Note that the ability to modify these unversioned - properties must be explicitly added by the repository - administrator (see ). - 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. - - Users should, where possible, use svn - propedit instead of svn - propset. 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. - -
- -
- - Properties and the Subversion Workflow - - Now that you are familiar with all of the - property-related svn 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. - And as with file contents, your property changes are local - modifications, only made permanent when you commit them to the - repository with svn commit. Your property - changes can be easily unmade, too—the svn - revert 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 - svn status and svn diff - commands. - -$ svn status calc/button.c - M calc/button.c -$ svn diff calc/button.c -Property changes on: calc/button.c -___________________________________________________________________ -Name: copyright - + (c) 2006 Red-Bean Software - -$ - - Notice how the status subcommand - displays M in the second column instead of - the first. That is because we have modified the properties on - calc/button.c, but not its - textual contents. Had we changed both, we would have seen - M in the first column, too (see ). - - - Property Conflicts - - 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. - -% svn update calc -M calc/Makefile.in - C calc/button.c -Updated to revision 143. -$ - - Subversion will also create, in the same directory as - the conflicted object, a file with a - .prej 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 - C in the second column of svn - status output for that object, and attempts to - commit your local modifications will fail. - -$ svn status calc - C calc/button.c -? calc/button.c.prej -$ cat calc/button.c.prej -prop 'linecount': user set to '1256', but update set to '1301'. -$ - - To resolve property conflicts, simply ensure that the - conflicting properties contain the values that they should, - and then use the svn resolved command to - alert Subversion that you have manually resolved the - problem. - - You might also have noticed the non-standard way that - Subversion currently displays property differences. You can - still run svn diff and redirect the output - to create a usable patch file. The patch - 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 - svn diff, any property modifications will - need to be applied by hand. -
- -
- - Automatic Property Setting - - 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. - Whenever you introduce a file to version control using the - svn add or svn import - 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 - svn:executable property on newly added or - imported files whose execute bit is enabled. (See 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 - svn:mime-type property on that file to - application/octet-stream (the generic - this is a collection of bytes MIME type). Of - course, if Subversion guesses incorrectly, or if you wish to - set the svn:mime-type property to something - more precise—perhaps image/png or - application/x-shockwave-flash—you can - always remove or edit that property. (For more on - Subversion's use of MIME types, see .) - Subversion also provides, via its runtime configuration - system (see ), 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 - *.jpg—Subversion should automatically - set the svn:mime-type property on those - files to image/jpeg. Or perhaps any files - that match *.cpp should have - svn:eol-style set to - native, and svn:keywords - set to Id. Automatic property support is - perhaps the handiest property-related tool in the Subversion - toolbox. See for more about - configuring that support. -
-
- - - -
- - File Portability - - 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 - svn on one platform, you know how to wield it - everywhere. - 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 text - file 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. - 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. - -
- - File Content Type - - 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 svn:mime-type file - property determines some behavioral characteristics of - Subversion itself. - - - Identifying File Types - - 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 - .txt 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 .png, 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. - Unfortunately, some of those extensions have changed - their meanings over time. When personal computers first appeared, - a file named README.DOC would have - almost certainly been a plaintext file, just like today's - .txt 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 .DOC - file. - You think that was rough? During that same era, - WordPerfect also used .DOC for their - proprietary file format's preferred extension! - - 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. - 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 MIME - types—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. - - 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 line. So, for versioned files - whose svn:mime-type property is set to a - non-textual MIME type (generally, something that doesn't begin - with text/, 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 .oldrev extension and contains - the BASE revision of the file. The other file has a - .newrev 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. - Also, if the svn:mime-type property is - set, then the Subversion Apache module will use its value to - populate the Content-type: 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. -
- -
- - File Executability - - 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 svn:executable 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. - This property has no effect on filesystems that have no - concept of an executable permission bit, such as FAT32 and - NTFS. - The Windows filesystems use file extensions (such as - .EXE, .BAT, and - .COM) to denote executable - files. - Also, although it has no defined values, Subversion will force - its value to * when setting this property. - Finally, this property is valid only on files, not on - directories. -
- -
- - End-of-Line Character Sequences - - Unless otherwise noted using a versioned file's - svn:mime-type 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. - This means that by default, Subversion doesn't pay any - attention to the type of end-of-line (EOL) - markers 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 (CR) - followed by a line feed (LF). Unix - software, however, just uses the LF - character to denote the end of a line. - Not all of the various tools on these operating systems - understand files that contain line endings - in a format that differs from the native line - ending style of the operating system on which - they are running. So, typically, Unix programs - treat the CR character present in Windows - files as a regular character (usually rendered as - ^M), and Windows programs combine - all of the lines of a Unix file into one giant line because - no carriage return-linefeed (or CRLF) - character combination was found to denote the ends of - the lines. - 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. - 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 - dos2unix or its companion, - unix2dos) 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. - 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? - The solution to this problem is the - svn:eol-style 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: - - - - native - - - 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 - svn:eol-style property set to - native, that file will contain - CRLF EOL markers. A Unix user - checking out a working copy which contains the same - file will see LF EOL markers in his - copy of the file. - Note that Subversion will actually store the file - in the repository using normalized - LF EOL markers regardless of the - operating system. This is basically transparent to - the user, though. - - - - - CRLF - - - This causes the file to contain - CRLF sequences for EOL markers, - regardless of the operating system in use. - - - - - LF - - - This causes the file to contain - LF characters for EOL markers, - regardless of the operating system in use. - - - - - CR - - - This causes the file to contain - CR 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). - - - -
-
- - - -
- - Ignoring Unversioned Items - - 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. - 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 feature - 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 svn add and svn - import 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 svn - status 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. - 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 ), 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. - The Subversion runtime configuration system provides an - option, global-ignores, whose value is a - whitespace-delimited collection of file patterns (also known as - globs). 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 svn status - 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' *~ and .*~ - files. - When found on a versioned directory, the - svn:ignore 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 - global-ignores runtime configuration option, - but are instead appended to that list. And it's worth noting - again that, unlike the global-ignores option, - the patterns found in the svn:ignore - property apply only to the directory on which that property is - set, and not to any of its subdirectories. The - svn:ignore 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. - - 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 always notices - all of its versioned objects. - - - - Ignore Patterns for CVS Users - - The Subversion svn:ignore property is - very similar in syntax and function to the CVS - .cvsignore file. In fact, if you are - migrating a CVS working copy to Subversion, you can directly - migrate the ignore patterns by using the - .cvsignore file as input file to the - svn propset command: - -$ svn propset svn:ignore -F .cvsignore . -property 'svn:ignore' set on '.' -$ - - 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 - ! pattern as a reset back to having no - ignore patterns at all. - - 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 svn:ignore property and its - uses. - Say you have the following output from svn - status: - -$ svn status calc - M calc/button.c -? calc/calculator -? calc/data.c -? calc/debug_log -? calc/debug_log.1 -? calc/debug_log.2.gz -? calc/debug_log.3.gz - - In this example, you have made some property modifications - to button.c, but in your working copy you - also have some unversioned files: the latest - calculator program that you've compiled - from your source code, a source file named - data.c, and a set of debugging output log - files. Now, you know that your build system always results in - the calculator program being generated. - Isn't that the whole point of a build system? - 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 - svn status, and pretty sure that nobody else - is interested in them either. So you use svn propedit - svn:ignore calc to add some ignore patterns to the - calc directory. For example, you might add - this as the new value of the svn:ignore - property: - -calculator -debug_log* - - After you've added this property, you will now have a local - property modification on the calc - directory. But notice what else is different about your - svn status output: - -$ svn status - M calc - M calc/button.c -? calc/data.c - - Now, all that cruft is missing from the output! Of course, - your calculator 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 data.c that you - probably forgot to add to version control. - 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 to Subversion: - -$ svn status --no-ignore - M calc - M calc/button.c -I calc/calculator -? calc/data.c -I calc/debug_log -I calc/debug_log.1 -I calc/debug_log.2.gz -I calc/debug_log.3.gz - - As mentioned earlier, the list of file patterns to ignore is - also used by svn add and svn - import. 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 to tell Subversion ignore - its ignores list and operate on all the files and directories - present. -
- - - -
- - Keyword Substitution - - Subversion has the ability to substitute - keywords—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 - after 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. - 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 - LastChangedDate keyword. You control - where the keyword is inserted into your document by placing - a keyword anchor at the desired - location in the file. This anchor is just a string of text - formatted as - $KeywordName$. - 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 svn:keywords property to be - case-sensitive too—certain keyword names will be recognized - regardless of case, but this behavior is deprecated. - 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: - - - - Date - - - This keyword describes the last time the file was - known to have been changed in the repository, and - is of the form $Date: - 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) - $. It may also be specified as - LastChangedDate. - - - - - Revision - - - This keyword describes the last known revision in - which this file changed in the repository, and looks - something like $Revision: 144 $. - It may also be specified as - LastChangedRevision or - Rev. - - - - - Author - - - This keyword describes the last known user to - change this file in the repository, and looks - something like $Author: harry $. - It may also be specified as - LastChangedBy. - - - - - HeadURL - - - This keyword describes the full URL to the latest - version of the file in the repository, and looks - something like $HeadURL: - http://svn.collab.net/repos/trunk/README $. - It may be abbreviated as - URL. - - - - - Id - - - This keyword is a compressed combination of the - other keywords. Its substitution looks something like - $Id: calc.c 148 2006-07-28 21:30:43Z sally - $, and is interpreted to mean that the file - calc.c was last changed in revision - 148 on the evening of July 28, 2006 by the user - sally. - - - - Several of the previous descriptions use the phrase - last known or similar wording. Keep in mind that - keyword expansion is a client-side operation, and your client - only knows 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. - 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 - … or maybe even a section of a book … - about how to use keywords, and you don't want Subversion to - substitute your beautiful examples of un-substituted keyword - anchors! - To tell Subversion whether or not to substitute keywords - on a particular file, we again turn to the property-related - subcommands. The svn:keywords 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. - For example, say you have a versioned file named - weather.txt that looks like - this: - -Here is the latest report from the front lines. -$LastChangedDate$ -$Rev$ -Cumulus clouds are appearing more frequently as summer approaches. - - With no svn:keywords property set on - that file, Subversion will do nothing special. Now, let's - enable substitution of the - LastChangedDate keyword. - -$ svn propset svn:keywords "Date Author" weather.txt -property 'svn:keywords' set on 'weather.txt' -$ - - Now you have made a local property modification on the - weather.txt 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 Rev - 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 - svn:keywords property value. - Immediately after you commit this property change, - Subversion will update your working file with the new - substitute text. Instead of seeing your keyword anchor - $LastChangedDate$, you'll see its - substituted result. That result also contains the name of - the keyword, and continues to be bounded by the dollar sign - ($) characters. And as we predicted, the - Rev keyword was not substituted because - we didn't ask for it to be. - Note also that we set the svn:keywords - property to Date Author yet the keyword - anchor used the alias $LastChangedDate$ - and still expanded correctly. - -Here is the latest report from the front lines. -$LastChangedDate: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $ -$Rev$ -Cumulus clouds are appearing more frequently as summer approaches. - - If someone else now commits a change to - weather.txt, 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 weather.txt - file will be re-substituted with information that - reflects the most recent known commit to that file. - - - Where's $GlobalRev$? - - New users are often confused by how the - $Rev$ 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 - $Rev$ keyword's value. But - $Rev$ expands to show the last revision in - which the file changed, 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? - To do this, you need external processing. Subversion - ships with a tool called svnversion which - was designed for just this purpose. - svnversion 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 - svnversion, see . - - 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 (::) 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 (#) character just before - the final dollar sign terminator. - 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: - -$Rev$: Revision of last commit -$Author$: Author of last commit -$Date$: Date of last commit - - 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: - -$Rev: 12 $: Revision of last commit -$Author: harry $: Author of last commit -$Date: 2006-03-15 02:33:03 -0500 (Wed, 15 Mar 2006) $: Date of last commit - - 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: - -$Rev:: $: Revision of last commit -$Author:: $: Author of last commit -$Date:: $: Date of last commit - - 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 - Rev and Author are - padded with spaces, and the long Date - field is truncated by a hash character: - -$Rev:: 13 $: Revision of last commit -$Author:: harry $: Author of last commit -$Date:: 2006-03-15 0#$: Date of last commit - - 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). - - 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. - -
- - - -
- - Locking - - 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 ), 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. - 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. - 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 HEAD, 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 HEAD, - 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. - 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! - 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 , most of these - types of problems go away entirely where perfect communication - between Harry and Sally exists. - Communication wouldn't have been such bad medicine for - Harry and Sally's Hollywood namesakes, either, for that - matter. - 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 locking - feature, which is similar to the reserved - checkouts mechanisms of other version control - systems. - Subversion's locking feature serves two main - purposes: - - - Serializing access to a versioned - object. 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. - - - Aiding communication. 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. - - - 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 - Subversion does not currently allow locks on directories. - (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. - - - The three meanings of <quote>lock</quote> - - In this section, and almost everywhere in this book, the - words lock and locking describe - a mechanism for mutual exclusion between users to avoid - clashing commits. Unfortunately, there are two other sorts - of lock with which Subversion, and therefore - this book, sometimes needs to be concerned. - The first is working copy locks, - 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 - L in the third column of - svn status output, and removed by the - svn cleanup command, as described in . - Secondly, there are database locks, - 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 wedged, as - described in . - You can generally forget about these other kinds of locks - until something goes wrong that requires you to care about - them. In this book, lock means the first sort - unless the contrary is either clear from context or explicitly - stated. - - -
- - Creating locks - - In the Subversion repository, a - lock is a piece of metadata which - grants exclusive access to one user to change a file. This - user is said to be the lock owner. - Each lock also has a unique identifier, typically a long - string of characters, known as the lock - token. 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. - 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 svn lock command. - -$ svn lock banana.jpg -m "Editing file for tomorrow's release." -'banana.jpg' locked by user 'harry'. -$ - - There are a number of new things demonstrated in the - previous example. First, notice that Harry passed the - option to svn - lock. Similar to svn commit, the - svn lock command can take comments (either - via or ) to describe the reason for locking the file. - Unlike svn commit, however, svn - lock will not demand a message by launching your - preferred text editor. Lock comments are optional, but still - recommended to aid communication. - 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 svn update and - reattempt the locking command. The locking command would also - have failed if the file already been locked by someone - else. - As you can see, the svn lock command - prints confirmation of the successful lock. At this point, - the fact that the file is locked becomes apparent in the - output of the svn status and svn - info reporting subcommands. - -$ svn status - K banana.jpg - -$ svn info banana.jpg -Path: banana.jpg -Name: banana.jpg -URL: http://svn.example.com/repos/project/banana.jpg -Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec -Revision: 2198 -Node Kind: file -Schedule: normal -Last Changed Author: frank -Last Changed Rev: 1950 -Last Changed Date: 2006-03-15 12:43:04 -0600 (Wed, 15 Mar 2006) -Text Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006) -Properties Last Updated: 2006-06-08 19:23:07 -0500 (Thu, 08 Jun 2006) -Checksum: 3b110d3b10638f5d1f4fe0f436a5a2a5 -Lock Token: opaquelocktoken:0c0f600b-88f9-0310-9e48-355b44d4a58e -Lock Owner: harry -Lock Created: 2006-06-14 17:20:31 -0500 (Wed, 14 Jun 2006) -Lock Comment (1 line): -Editing file for tomorrow's release. - -$ - - That the svn info 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 svn status command shows a - K next to the file (short for locKed), - indicating that the lock token is present. - - - Regarding lock tokens - - A lock token isn't an authentication token, so much as - an authorization token. The token - isn't a protected secret. In fact, a lock's unique token is - discoverable by anyone who runs svn info - URL. 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. - 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 break the lock and re-lock the - file.) - - Now that Harry has locked banana.jpg, - Sally is unable to change or delete that file: - -$ svn delete banana.jpg -D banana.jpg -$ svn commit -m "Delete useless file." -Deleting banana.jpg -svn: Commit failed (details follow): -svn: DELETE of -'/repos/project/!svn/wrk/64bad3a9-96f9-0310-818a-df4224ddc35d/banana.jpg': -423 Locked (http://svn.example.com) -$ - - 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: - -$ svn status -M K banana.jpg -$ svn commit -m "Make banana more yellow" -Sending banana.jpg -Transmitting file data . -Committed revision 2201. -$ svn status -$ - - Notice that after the commit is finished, svn - status shows that the lock token is no longer - present in working copy. This is the standard behavior of - svn commit—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—even on files that weren't - committed. 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 images because he's unsure of which - files he needs to change, yet only only changes four of those - files, when he runs svn commit images, the - process will still release all thirty locks. - This behavior of automatically releasing locks can be - overridden with the option to - svn commit. 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 - no-unlock runtime configuration option (see - ). - 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 svn unlock command: - -$ svn unlock banana.c -'banana.c' unlocked. - -
- -
- - Discovering locks - - When a commit fails due to someone else's locks, it's - fairly easy to learn about them. The easiest of - these is svn status --show-updates: - -$ svn status -u -M 23 bar.c -M O 32 raisin.jpg - * 72 foo.h -Status against revision: 105 -$ - - In this example, Sally can see not only that her copy of - foo.h is out-of-date, but that one of the - two modified files she plans to commit is locked in the - repository. The O symbol stands for - Other, meaning that a lock exists on the file, - and was created by somebody else. If she were to attempt a - commit, the lock on raisin.jpg would - prevent it. Sally is left wondering who made the lock, when, - and why. Once again, svn info has the - answers: - -$ svn info http://svn.example.com/repos/project/raisin.jpg -Path: raisin.jpg -Name: raisin.jpg -URL: http://svn.example.com/repos/project/raisin.jpg -Repository UUID: edb2f264-5ef2-0310-a47a-87b0ce17a8ec -Revision: 105 -Node Kind: file -Last Changed Author: sally -Last Changed Rev: 32 -Last Changed Date: 2006-01-25 12:43:04 -0600 (Sun, 25 Jan 2006) -Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b -Lock Owner: harry -Lock Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006) -Lock Comment (1 line): -Need to make a quick tweak to this image. -$ - - Just as svn info 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 - svn info 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, svn info on a working copy - path will show no lock information at all). If the main - argument to svn info 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. - So in this particular example, Sally can see that Harry - locked the file on February 16th to make a quick - tweak. 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. -
- -
- - Breaking and stealing locks - - 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 breaking the - lock. - From the administrator's chair, it's simple to break - locks. The svnlook - and svnadmin programs have the ability to - display and remove locks directly from the repository. (For - more information about these tools, see - .) - -$ svnadmin lslocks /var/svn/repos -Path: /project2/images/banana.jpg -UUID Token: opaquelocktoken:c32b4d88-e8fb-2310-abb3-153ff1236923 -Owner: frank -Created: 2006-06-15 13:29:18 -0500 (Thu, 15 Jun 2006) -Expires: -Comment (1 line): -Still improving the yellow color. - -Path: /project/raisin.jpg -UUID Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b -Owner: harry -Created: 2006-02-16 13:29:18 -0500 (Thu, 16 Feb 2006) -Expires: -Comment (1 line): -Need to make a quick tweak to this image. - -$ svnadmin rmlocks /var/svn/repos /project/raisin.jpg -Removed lock on '/project/raisin.jpg'. -$ - - 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 to the unlock - command: - -$ svn status -u -M 23 bar.c -M O 32 raisin.jpg - * 72 foo.h -Status against revision: 105 -$ svn unlock raisin.jpg -svn: 'raisin.jpg' is not locked in this working copy -$ svn info raisin.jpg | grep URL -URL: http://svn.example.com/repos/project/raisin.jpg -$ svn unlock http://svn.example.com/repos/project/raisin.jpg -svn: Unlock request failed: 403 Forbidden (http://svn.example.com) -$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg -'raisin.jpg' unlocked. -$ - - Now, Sally's initial attempt to unlock failed because she - ran svn unlock 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 svn unlock. 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 , the authentication and - authorization requirements are ignored, and the remote lock is - broken. - 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 svn unlock - --force and then svn lock - 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 steal the lock, which involves - breaking and re-locking the file all in one atomic step. To - do this, Sally passes the option - to svn lock: - -$ svn lock raisin.jpg -svn: Lock request failed: 423 Locked (http://svn.example.com) -$ svn lock --force raisin.jpg -'raisin.jpg' locked by user 'sally'. -$ - - 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 defunct. 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 - svn status to contact the - repository: - -$ svn status - K raisin.jpg -$ svn status -u - B 32 raisin.jpg -$ svn update - B raisin.jpg -$ svn status -$ - - If the repository lock was broken, then svn - status --show-updates displays a - B (Broken) symbol next to the file. If a - new lock exists in place of the old one, then a - T (sTolen) symbol is shown. Finally, - svn update notices any defunct lock tokens - and removes them from the working copy. - - - Locking Policies - - 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. - Subversion defaults to the softer - approach, but still allows administrators to create stricter - enforcement policies through the use of hook scripts. In - particular, the pre-lock and - pre-unlock 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 - post-lock and - post-unlock hooks are also available, - and can be used to send email after locking actions. To - learn more about repository hooks, see . - -
- -
- - Lock Communication - - We've seen how svn lock - and svn unlock 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? - 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 svn status - --show-updates, 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. - Subversion's solution to this problem is to provide a - mechanism to remind users that a file ought to be locked - before the editing begins. The mechanism - is a special property, svn:needs-lock. 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 - svn lock), the file becomes read-write. - When the lock is released, the file becomes read-only - again. - 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: - -$ /usr/local/bin/gimp raisin.jpg -gimp: error: file is read-only! -$ ls -l raisin.jpg --r--r--r-- 1 sally sally 215589 Jun 8 19:23 raisin.jpg -$ svn lock raisin.jpg -svn: Lock request failed: 423 Locked (http://svn.example.com) -$ svn info http://svn.example.com/repos/project/raisin.jpg | grep Lock -Lock Token: opaquelocktoken:fc2b4dee-98f9-0310-abf3-653ff3226e6b -Lock Owner: harry -Lock Created: 2006-06-08 07:29:18 -0500 (Thu, 08 June 2006) -Lock Comment (1 line): -Making some tweaks. Locking for the next two hours. -$ - - - Users and administrators alike are encouraged to attach - the svn:needs-lock property to any file - which cannot be contextually merged. This is the primary - technique for encouraging good locking habits and preventing - wasted effort. - - 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. - 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 - hijack 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. - Except, perhaps, a classic Vulcan mind-meld. - -
-
- - - -
- - Externals Definitions - - 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 svn checkout 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. - Fortunately, Subversion provides support for - externals definitions. 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 svn:externals - property. You can create or modify this property using - svn propset or svn - propedit (see ). 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. - -$ svn propget svn:externals calc -third-party/sounds http://sounds.red-bean.com/repos -third-party/skins http://skins.red-bean.com/repositories/skinproj -third-party/skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker - - The convenience of the svn:externals - 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. - - The relative target subdirectories of externals - definitions must not already exist on your or other users' - systems—Subversion will create them when it checks out - the external working copy. - - Note the previous externals definition example. When - someone checks out a working copy of the - calc directory, Subversion also continues - to check out the items found in its externals definition. - -$ svn checkout http://svn.example.com/repos/calc -A calc -A calc/Makefile -A calc/integer.c -A calc/button.c -Checked out revision 148. - -Fetching external item into calc/third-party/sounds -A calc/third-party/sounds/ding.ogg -A calc/third-party/sounds/dong.ogg -A calc/third-party/sounds/clang.ogg -… -A calc/third-party/sounds/bang.ogg -A calc/third-party/sounds/twang.ogg -Checked out revision 14. - -Fetching external item into calc/third-party/skins -… - - 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 svn:externals - property, Subversion will synchronize the checked-out items - against the changed externals definition when you next run - svn update. The same thing will happen when - others update their working copies and receive your changes to - the externals definition. - - Because the svn:externals property has - a multiline value, we strongly recommend that you use - svn propedit instead of svn - propset. - - - 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 - they 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. - - The svn status command also recognizes - externals definitions, displaying a status code of - X 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. - 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 ../../skins/myskin). Third, the - working copies created via the externals definition support are - still disconnected from the primary working copy (on whose - versioned directories the svn:externals - 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 svn - commit explicitly on those working - copies—committing on the primary working copy will not - recurse into any external ones. - 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 - my-project, and you've created an externals - definition on one of its subdirectories - (my-project/some-dir) which tracks the - latest revision of another of its subdirectories - (my-project/external-dir). - -$ svn checkout http://svn.example.com/projects . -A my-project -A my-project/some-dir -A my-project/external-dir -… -Fetching external item into 'my-project/some-dir/subdir' -Checked out external at revision 11. - -Checked out revision 11. -$ svn propget svn:externals my-project/some-dir -subdir http://svn.example.com/projects/my-project/external-dir - -$ - - Now you use svn move to rename the - my-project directory. At this point, your - externals definition will still refer to a path under the - my-project directory, even though that - directory no longer exists. - -$ svn move -q my-project renamed-project -$ svn commit -m "Rename my-project to renamed-project." -Deleting my-project -Adding my-renamed-project - -Committed revision 12. -$ svn update - -Fetching external item into 'renamed-project/some-dir/subdir' -svn: Target path does not exist -$ - - 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 - http:// or https://, but - only allow commits to come in via https://, - you have an interesting problem on your hands. If your - externals definitions use the http:// 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 https:// form of - the URLs, anyone who might be checking out via - http:// because their client doesn't support - https:// will be unable to fetch the external - items. Be aware, too, that if you need to re-parent your - working copy (using svn switch --relocate), - externals definitions will not also be - re-parented. - Finally, there might be times when you would prefer that - svn subcommands would not recognize, or - otherwise operate upon, the external working copies. In those instances, - you can pass the option to - the subcommand. -
- - - -
- - Peg and Operative Revisions - - 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. - Subversion is pretty smart about noticing when an object's - version history includes such changes of address. - 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. - 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, /trunk/object for example. What, - then, does it mean to ask Subversion about the history of - /trunk/object? 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 all the objects that have - ever lived at that path? Clearly, Subversion needs a hint about - what you really want. - And thanks to moves, versioned object history can get far - more twisted than that, even. For example, you might have a - directory named concept, 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. - You're not supposed to name it. Once you name it, - you start getting attached to it.—Mike - Wazowski - 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 concept is renamed - to frabnaggilywort. Life goes on, - Frabnaggilywort releases a 1.0 version, and is downloaded and - used daily by hordes of people aiming to improve their - lives. - 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, - concept, and the cycle begins again. In - fact, the cycle begins again many times over the years, each - time starting with that old concept - 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 - concept to something else for a while, but - later rename the thing back to concept for - some reason. - 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 Main Street 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. - In version 1.1, Subversion introduced a way for you to tell - it exactly which Main Street you meant. It's called the - peg revision, 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 at syntax, so - called because the syntax involves appending an at - sign (@) and the peg revision to the - end of the path with which the revision is associated. - But what of the of which - we've spoken so much in this book? That revision (or set of - revisions) is called the operative - revision (or operative revision - range). 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, - 606 N. Main Street, Wheaton, Illinois, is the home of - the Wheaton History Center. Get it—History - Center? It seemed appropriate…. - we can think of Main Street as our path and - Wheaton 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 606 N. as our operative revision, of - sorts, and we know exactly where to - go. - - - The peg revision algorithm - - 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: - -$ svn command -r OPERATIVE-REV item@PEG-REV - - If OPERATIVE-REV is older than - PEG-REV, then the algorithm is as - follows: - - - Locate item in the revision - identified by PEG-REV. There - can be only one such object. - - - Trace the object's history backwards (through any - possible renames) to its ancestor in the revision - OPERATIVE-REV. - - - Perform the requested action on that ancestor, - wherever it is located, or whatever its name might - be or have been at that time. - - - But what if OPERATIVE-REV is - younger than - PEG-REV? Well, that adds some - complexity to the theoretical problem of locating the path in - OPERATIVE-REV, because the path's - history could have forked multiple times (thanks to copy - operations) between PEG-REV and - OPERATIVE-REV. 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: - - - Locate item in the revision - identified by OPERATIVE-REV. There - can be only one such object. - - - Trace the object's history backwards (through any - possible renames) to its ancestor in the revision - PEG-REV. - - - Verify that the object's location (path-wise) in - PEG-REV is the same as it is in - OPERATIVE-REV. 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 OPERATIVE-REV. - 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.) - - - 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 - BASE for working copy items and - HEAD for repository URLs. And when no - operative revision is provided, it defaults to being the same - revision as the peg revision. - - Say that long ago we created our repository, and in revision 1 - added our first concept directory, plus an - IDEA 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 - frabnaggilywort. By revision 27, we had a - new concept, a new concept directory to - hold it, and a new IDEA file to describe - it. And then five years and twenty thousand revisions flew by, - just like they would in any good romance story. - Now, years later, we wonder what the - IDEA file looked like back in revision 1. - But Subversion needs to know if we are asking about how the - current file looked back in revision 1, or - if we are asking for the contents of whatever file lived at - concepts/IDEA 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 IDEA file looked in that old - revision, you run: - -$ svn cat -r 1 concept/IDEA -svn: Unable to find repository location for 'concept/IDEA' in revision 1 - - Of course, in this example, the current - IDEA 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: - -$ svn cat -r 1 concept/IDEA@BASE -svn: Unable to find repository location for 'concept/IDEA' in revision 1 - - And when executed, it has the expected results. - 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 svn know whether - news@11 is the name of a directory in my - tree, or just a syntax for revision 11 of - news? Thankfully, while - svn 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 news@11@. - svn 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 filename@@ to talk about a file named - filename@. - Let's ask the other question, then—in revision 1, what - were the contents of whatever file occupied the address - concepts/IDEA at the time? We'll use an - explicit peg revision to help us out. - -$ svn cat concept/IDEA@1 -The idea behind this project is to come up with a piece of software -that can frab a naggily wort. Frabbing naggily worts is tricky -business, and doing it incorrectly can have serious ramifications, so -we need to employ over-the-top input validation and data verification -mechanisms. - - 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. - 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 HEAD, the - Frabnaggilywort project is located in the - frabnaggilywort directory. So we specify - that we want to see how the line of history identified in - HEAD as the path - frabnaggilywort/IDEA looked in revision - 1. - -$ svn cat -r 1 frabnaggilywort/IDEA@HEAD -The idea behind this project is to come up with a piece of software -that can frab a naggily wort. Frabbing naggily worts is tricky -business, and doing it incorrectly can have serious ramifications, so -we need to employ over-the-top input validation and data verification -mechanisms. - - And the peg and operative revisions need not be so trivial, - either. For example, say frabnaggilywort - had been deleted from HEAD, but we know it - existed in revision 20, and we want to see the diffs for its - IDEA file between revisions 4 and 10. We - can use the peg revision 20 in conjunction with the URL that - would have held Frabnaggilywort's IDEA file - in revision 20, and then use 4 and 10 as our operative revision - range. - -$ svn diff -r 4:10 http://svn.red-bean.com/projects/frabnaggilywort/IDEA@20 -Index: frabnaggilywort/IDEA -=================================================================== ---- frabnaggilywort/IDEA (revision 4) -+++ frabnaggilywort/IDEA (revision 10) -@@ -1,5 +1,5 @@ --The idea behind this project is to come up with a piece of software --that can frab a naggily wort. Frabbing naggily worts is tricky --business, and doing it incorrectly can have serious ramifications, so --we need to employ over-the-top input validation and data verification --mechanisms. -+The idea behind this project is to come up with a piece of -+client-server software that can remotely frab a naggily wort. -+Frabbing naggily worts is tricky business, and doing it incorrectly -+can have serious ramifications, so we need to employ over-the-top -+input validation and data verification mechanisms. - - 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. -
- - - -
- - Network Model - - 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 - (http://) with the Apache HTTP Server or - speaking the custom Subversion protocol - (svn://) with svnserve, - 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. - -
- - Requests and Responses - - 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 ). - - Run svn --version to see - which URL schemes and protocols the client knows how to - use. - - 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 credentials 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 (logs - in) to the server before ever making a request. In - Subversion, the server pulls credentials by - challenging the client at the appropriate moment, rather than - the client pushing 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 svn checkout. - If the particular network requests issued by the client - result in a new revision being created in the repository, - (e.g. svn commit), 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 - svn:author property on the new revision - (see ). If - the client was not authenticated (in other words, the server - never issued an authentication challenge), then the revision's - svn:author property is empty. - -
- -
- - Client Credentials Caching - - 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 - (~/.subversion/auth/ on Unix-like systems - or %APPDATA%/Subversion/auth/ on Windows; - see 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. - 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. - The security-conscious reader will suspect immediately - that there is reason for concern here. Caching - passwords on disk? That's terrible! You should never do - that! - 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: - - - 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.) - - - 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. - - - For other Unix-like operating systems, no standard - keychain services exist. However, - the auth/ 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. - - - 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. - To disable caching for a single command, pass the - option: - -$ svn commit -F log_msg.txt --no-auth-cache -Authentication realm: <svn://host.example.com:3690> example realm -Username: joe -Password for 'joe': - -Adding newfile -Transmitting file data . -Committed revision 2324. - -# password was not cached, so a second commit still prompts us - -$ svn delete newfile -$ svn commit -F new_msg.txt -Authentication realm: <svn://host.example.com:3690> example realm -Username: joe -… - - Or, if you want to disable credential caching permanently, - you can edit the config file in your - runtime configuration area, and set the - option to - no. 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 ). - -[auth] -store-auth-creds = no - - Sometimes users will want to remove specific credentials - from the disk cache. To do this, you need to navigate into - the auth/ 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 svn:realmstring key describes - the particular server realm that the file is associated - with: - -$ ls ~/.subversion/auth/svn.simple/ -5671adf2865e267db74f09ba6f872c28 -3893ed123b39500bca8a0b382839198e -5c3c22968347b390f349ff340196ed39 - -$ cat ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28 - -K 8 -username -V 3 -joe -K 8 -password -V 4 -blah -K 15 -svn:realmstring -V 45 -<https://svn.domain.com:443> Joe's repository -END - - Once you have located the proper cache file, just delete - it. - One last word about svn's - authentication behavior, specifically regarding the - and - options. Many client subcommands accept these options, but it - is important to understand using these options does - not automatically send credentials to the - server. As discussed earlier, the server pulls - credentials from the client when it deems necessary; the - client cannot push 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. - Again, a common mistake is to misconfigure a - server so that it never issues an authentication challenge. - When users pass and - 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! - - 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 - svn from a script). - Here is a final summary that describes how a Subversion - client behaves when it receives an authentication - challenge. - - - First, the client checks whether the user specified - any credentials as command-line options - ( and/or - ). If not, or if these options - fail to authenticate successfully, then - - - the client looks up the server's hostname, port, and realm in - the runtime auth/ area, to see if the - user already has the appropriate credentials cached. If - not, or if the cached credentials fail to authenticate, - then - - - finally, the client resorts to prompting the user - (unless instructed not to do so via the - option or its - client-specific equivalents). - - - 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). -
-
-
- - - - Branching and Merging - -
- Confucius - - 君子务本 - (It is upon the Trunk that a gentleman works.) - -
- 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. - 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 (). - - - -
- - What's a Branch? - - 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 - tweaked for them, since they do things slightly - differently. - 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. - 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. - This is the basic concept of a - branch—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 ). -
- - Branches of development - - - - - - -
- 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 - mix and match different lines of development in - your daily work. -
- - - -
- - Using Branches - - At this point, you should understand how each commit creates - an entire new filesystem tree (called a revision) - in the repository. If not, go back and read about revisions in - . - For this chapter, we'll go back to the same example from - . Remember that you and your - collaborator, Sally, are sharing a repository that contains two - projects, paint and - calc. Notice that in , however, each project - directory now contains subdirectories named - trunk and branches. - The reason for this will soon become clear. -
- - Starting repository layout - - - - - - -
- As before, assume that Sally and you both have working - copies of the calc project. Specifically, you - each have a working copy of /calc/trunk. - All the files for the project are in this subdirectory rather - than in /calc itself, because your team has - decided that /calc/trunk is where the - main line of development is going to take - place. - 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 - /calc/trunk) 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.) - 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 /calc/trunk 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 best - practice 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 svn update after weeks of - isolation. - 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. - - -
- - Creating a Branch - - Creating a branch is very simple—you make a copy of - the project in the repository using the svn - copy 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 - /calc/trunk 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 /calc/branches - area of the repository, and you want to name your branch - my-calc-branch. You'll want to create a - new directory, - /calc/branches/my-calc-branch, which - begins its life as a copy of - /calc/trunk. - At this point, you might have seen svn - copy used to copy one file to another within a - working copy. But it can also be used to do - a remote copy entirely within the repository. - Just copy one URL to another: - -$ svn copy http://svn.example.com/repos/calc/trunk \ - http://svn.example.com/repos/calc/branches/my-calc-branch \ - -m "Creating a private branch of /calc/trunk." - -Committed revision 341. - - This command causes a near-instantaneous commit in the - repository, creating a new directory in revision 341. The new - directory is a copy of /calc/trunk. This - is shown in - . - Subversion does not support copying between different - repositories. When using URLs with svn - copy or svn move, you can only - copy items within the same repository. - - While it's also possible to create a branch by - using svn copy 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. -
- - Repository with new copy - - - - - - -
- - - Cheap Copies - - 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 existing 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. - This is why you'll often hear Subversion users talk - about cheap copies. 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 cheap copy of the previous - revision, with a few items lazily changed within. (To read - more about this, visit Subversion's website and read about - the bubble up method in Subversion's design - documents.) - 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 svn copy - URL1 URL2), it's a quick, constant-time operation. - Make branches as often as you want. - -
- -
- - Working with Your Branch - - Now that you've created a branch of the project, you can - check out a new working copy to start using it: - -$ svn checkout http://svn.example.com/repos/calc/branches/my-calc-branch -A my-calc-branch/Makefile -A my-calc-branch/integer.c -A my-calc-branch/button.c -Checked out revision 341. - - 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 - /calc/trunk. (Be sure to read later in this chapter: the - svn switch command is an alternate way of - creating a working copy of a branch.) - Let's pretend that a week goes by, and the following - commits happen: - - - - You make a change to - /calc/branches/my-calc-branch/button.c, - which creates revision 342. - - - - You make a change to - /calc/branches/my-calc-branch/integer.c, - which creates revision 343. - - - - Sally makes a change to - /calc/trunk/integer.c, which creates - revision 344. - - - There are now two independent lines of development, shown - in , happening on - integer.c. -
- - The branching of one file's history - - - - - - -
- Things get interesting when you look at the history of - changes made to your copy of - integer.c: - -$ pwd -/home/user/my-calc-branch - -$ svn log -v integer.c ------------------------------------------------------------------------- -r343 | user | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines -Changed paths: - M /calc/branches/my-calc-branch/integer.c - -* integer.c: frozzled the wazjub. - ------------------------------------------------------------------------- -r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines -Changed paths: - A /calc/branches/my-calc-branch (from /calc/trunk:340) - -Creating a private branch of /calc/trunk. - ------------------------------------------------------------------------- -r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines -Changed paths: - M /calc/trunk/integer.c - -* integer.c: changed a docstring. - ------------------------------------------------------------------------- -r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines -Changed paths: - M /calc/trunk/integer.c - -* integer.c: adding this file to the project. - ------------------------------------------------------------------------- - - Notice that Subversion is tracing the history of your - branch's integer.c 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 integer.c was implicitly - copied when all of /calc/trunk/ was - copied. Now look what happens when Sally runs the same - command on her copy of the file: - -$ pwd -/home/sally/calc - -$ svn log -v integer.c ------------------------------------------------------------------------- -r344 | sally | 2002-11-07 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines -Changed paths: - M /calc/trunk/integer.c - -* integer.c: fix a bunch of spelling errors. - ------------------------------------------------------------------------- -r303 | sally | 2002-10-29 21:14:35 -0600 (Tue, 29 Oct 2002) | 2 lines -Changed paths: - M /calc/trunk/integer.c - -* integer.c: changed a docstring. - ------------------------------------------------------------------------- -r98 | sally | 2002-02-22 15:35:29 -0600 (Fri, 22 Feb 2002) | 2 lines -Changed paths: - M /calc/trunk/integer.c - -* integer.c: adding this file to the project. - ------------------------------------------------------------------------- - - 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 - does 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. -
- -
- - The Key Concepts Behind Branching - - 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 branch because you - 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. - Second, because of this copy mechanism, Subversion's - branches exist as normal filesystem - directories in the repository. This is different - from other version control systems, where branches are - typically defined by adding - extra-dimensional labels 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 /branches directory, but - you're free to invent any policy you wish. -
-
- - - -
- - Basic Merging - - 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 trunk, or main line of - development. - 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. - 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 - too far apart. Remember that one of the - problems with the crawl in a hole 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. - 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 - copy 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 merging, and - is performed using various invocations of the svn - merge command. - 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 manual - methods to achieve similar results. (See - .) - -
- - Keeping a Branch in Sync - - 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 /trunk. 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 surprise conflicts when it comes time - for you to fold your changes back into the trunk. - 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: - -$ pwd -/home/user/my-calc-branch - -$ svn merge http://svn.example.com/repos/calc/trunk ---- Merging r345 through r356 into '.': -U button.c -U integer.c - - 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: - -$ svn status -M button.c -M integer.c - - At this point, the wise thing to do is look at the changes - carefully with svn diff, then build and - test your branch. You might need to resolve some conflicts - (just as you do with svn update), or - possibly make some small edits to get things working properly. - (Remember, just because there are - no syntactic conflicts doesn't mean there - aren't any semantic conflicts!) If you - encounter serious problems, you can always abort the local - changes by running svn revert and start a - long what's going on? discussion with your - collaborators. If things look good, however, then you can - submit your changes into the repository: - -$ svn commit -m "Merged /trunk to /my-calc-branch." -Sending button.c -Sending integer.c -Transmitting file data .. -Committed revision 357. - - At this point, your private branch is now in - sync with the trunk, so you can rest easier knowing - that as you continue to work in isolation, you're not - drifting too far away from what - everyone else is doing. - - - Why Not Use Patches Instead? - - A question may be on your mind, especially if you're a - Unix user: why bother to use svn merge at - all? Why not simply use the operating system's - patch command to accomplish the same job? - For example: - -$ cd my-calc-branch -$ svn diff -r 341:HEAD http://svn.example.com/repos/calc/trunk > patchfile -$ patch -p0 < patchfile -Patching file integer.c using Plan A... -Hunk #1 succeeded at 147. -Hunk #2 succeeded at 164. -Hunk #3 succeeded at 241. -Hunk #4 succeeded at 249. -done - - In this particular case, yes, there really is no - difference. But svn merge has special - abilities that surpass the patch program. - The file format used by patch is quite - limited; it's only able to tweak file contents. There's no - way to represent changes to trees, such - as the addition, removal, or renaming of files and - directories. Nor can the patch program - notice changes to properties. If Sally's change had, - say, added a new directory, the output of svn - diff wouldn't have mentioned it at - all. svn diff only outputs the limited - patch-format, so there are some ideas it simply can't - express. - The svn merge 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 - .) - 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. - - 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! - -$ svn merge http://svn.example.com/repos/calc/trunk ---- Merging r357 through r380 into '.': -U integer.c -U Makefile -A README - - 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 svn commit the local - modifications to your branch. - 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: - -$ svn merge http://svn.example.com/repos/calc/trunk ---- Merging r381 through r385 into '.': -U button.c -U README - -$ # build, test, ... - -$ svn commit -m "Final merge of trunk changes to my-calc-branch." -Sending button.c -Sending README -Transmitting file data .. -Committed revision 390. - - Now, you use svn merge to replicate - your branch changes back into the trunk. To do this, you'll - need a working copy of /trunk. You can - do this by either doing an svn checkout, - dredging up an old trunk working copy from somewhere on your - disk, or by using svn switch (see - .) Then - invoke svn merge within your trunk working - copy: - -$ pwd -/home/user/calc-trunk - -$ svn merge http://svn.example.com/repos/calc/branches/my-calc-branch ---- Merging r341 through r390 into '.': -U button.c -U integer.c -U Makefile - -$ # build, test, verify, ... - -$ svn commit -m "Merge my-calc-branch back into trunk!" -Sending button.c -Sending integer.c -Sending Makefile -Transmitting file data .. -Committed revision 391. - - 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: - -$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch -Committed revision 392. - - 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 /branches directory, its existence is - still an immutable part of the repository's history. A - simple svn log command on - the /branches URL will show the entire - history of your branch. Your branch can even be resurrected - at some point, should you desire. (See - .) -
- -
- - Basic Merge Tracking - - ###TODO: set expectations on what gets tracked and what - doesn't. - -
- - Mergeinfo - - ###TODO: explain svn:mergeinfo prop and 'svn mergeinfo' - command, so users get a general sense of how the system is - tracking changes. -
- -
- - Previewing Merges - - It's a best practice to do your merge into a working - copy that has no local edits and has - been recently updated. If your working copy - isn't clean in these ways, you can run into - some headaches. - Assuming your working copy is tidy, merging isn't a - particularly high-risk operation. If you get the merge - wrong the first time, simply svn revert - the changes and try again. - 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 - svn revert is no longer an option. The - two sets of changes may be impossible to separate. - 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 svn diff with - the same arguments you plan to pass to svn - merge, as we already showed in our first example - of merging. Another method of previewing is to pass the - option to the merge - command: - -$ svn merge --dry-run http://svn.example.com/repos/calc/trunk -U integer.c - -$ svn status -# nothing printed, working copy is still unchanged. - - The option doesn't actually - apply any local changes to the working copy. It only shows - status codes that would be printed in a - real merge. It's useful for getting a high - level preview of the potential merge, for those - times when running svn diff gives too - much detail. -
- -
- - Multi-Layered Merges - - ###TODO: explain how a merge can apply successive - patches, and that any intermediate conflicts *must* be - resolved (for now, at least.) -
-
-
- - - -
- - Advanced Merging - - ###TODO: Intro: talk about how and why advanced users can - pass specific revision numbers to 'svn merge'. - -
- - Copying Specific Changes - - 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: - Assume you get word that Sally made an interesting change - to integer.c 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, before you start working too heavily - in the same places. - -$ svn diff -c 344 http://svn.example.com/repos/calc/trunk - -Index: integer.c -=================================================================== ---- integer.c (revision 343) -+++ integer.c (revision 344) -@@ -147,7 +147,7 @@ - case 6: sprintf(info->operating_system, "HPFS (OS/2 or NT)"); break; - case 7: sprintf(info->operating_system, "Macintosh"); break; - case 8: sprintf(info->operating_system, "Z-System"); break; -- case 9: sprintf(info->operating_system, "CPM"); break; -+ case 9: sprintf(info->operating_system, "CP/M"); break; - case 10: sprintf(info->operating_system, "TOPS-20"); break; - case 11: sprintf(info->operating_system, "NTFS (Windows NT)"); break; - case 12: sprintf(info->operating_system, "QDOS"); break; -@@ -164,7 +164,7 @@ - low = (unsigned short) read_byte(gzfile); /* read LSB */ - high = (unsigned short) read_byte(gzfile); /* read MSB */ - high = high << 8; /* interpret MSB correctly */ -- total = low + high; /* add them togethe for correct total */ -+ total = low + high; /* add them together for correct total */ - - info->extra_header = (unsigned char *) my_malloc(total); - fread(info->extra_header, total, 1, gzfile); -@@ -241,7 +241,7 @@ - Store the offset with ftell() ! */ - - if ((info->data_offset = ftell(gzfile))== -1) { -- printf("error: ftell() retturned -1.\n"); -+ printf("error: ftell() returned -1.\n"); - exit(1); - } - -@@ -249,7 +249,7 @@ - printf("I believe start of compressed data is %u\n", info->data_offset); - #endif - -- /* Set postion eight bytes from the end of the file. */ -+ /* Set position eight bytes from the end of the file. */ - - if (fseek(gzfile, -8, SEEK_END)) { - printf("error: fseek() returned non-zero\n"); - - The svn merge command is almost exactly - the same. Instead of printing the differences to your - terminal, however, it applies them directly to your working - copy as local modifications: - -$ svn merge -c 344 http://svn.example.com/repos/calc/trunk -U integer.c - -$ svn status -M integer.c - - The output of svn merge shows that your - copy of integer.c was patched. It now - contains Sally's change—the change has been - copied 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. - In another scenario, it's possible that things may not have - gone so well, and that integer.c may have - entered a conflicted state. You might need to resolve the - conflict using standard procedures (see ), or if you decide that the merge was a - bad idea altogether, simply give up and svn - revert the local change. - But assuming that you've reviewed the merged change, you can - svn commit 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 - porting changes. - 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: - -$ svn commit -m "integer.c: ported r344 (spelling fixes) from trunk." -Sending integer.c -Transmitting file data . -Committed revision 360. - - A word of warning: while svn diff and - svn merge are very similar in concept, they - do have different syntax in many cases. Be sure to read about - them in for details, or ask - svn help. For example, svn - merge 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: - - - You want to merge directory changes into your current - working directory. - - - You want to merge the changes in a specific file into - a file by the same name which exists in your current working - directory. - - - If you are merging a directory and haven't specified a - target path, svn merge 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, - svn merge assumes the second case and tries - to apply the changes to a local file with the same name. - 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: - -$ svn merge -c 344 http://svn.example.com/repos/calc/trunk my-calc-branch -U my-calc-branch/integer.c - -
- -
- - Advanced Merge Syntax - - You've now seen some examples of the svn - merge 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 svn merge - behaves. - The main source of confusion is the - name of the command. The term - merge 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 svn - diff-and-apply, because that's all that happens: - two repository trees are compared, and the differences are - applied to a working copy. - If you're using svn merge to do basic - copying of changes between branches, it will generally do the - right thing automatically. For example, a command like - -$ svn merge http://svn.example.com/repos/calc/some-branch - - ... will attempt to duplicate any changes made - on some-branch 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 newest branch changes - that happened since you last merged. - If you choose to use the svn merge - command in all its full glory by giving it specific revision - ranges to duplicate, then the command takes three main - arguments: - - - An initial repository tree (often called the - left side of the - comparison), - - - A final repository tree (often called the - right side of the - comparison), - - - A working copy to accept the differences as - local changes (often called the target - of the merge). - - - 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 svn - add or svn delete commands - yourself. If you like the results, you can commit them. If - you don't like the results, you can simply svn - revert all of the changes. - The syntax of svn merge allows you to - specify the three necessary arguments rather flexibly. Here - are some examples: - -$ svn merge http://svn.example.com/repos/branch1@150 \ - http://svn.example.com/repos/branch2@212 \ - my-working-copy - -$ svn merge -r 100:200 http://svn.example.com/repos/trunk my-working-copy - -$ svn merge -r 100:200 http://svn.example.com/repos/trunk - - The first syntax lays out all three arguments explicitly, - naming each tree in the form URL@REV 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. -
- -
- - Undoing Changes - - Another common use for svn merge is to - roll back a change that has already been committed. Suppose - you're working away happily on a working copy of - /calc/trunk, and you discover that the - change made way back in revision 303, which changed - integer.c, is completely wrong. It never - should have been committed. You can use svn - merge to undo the change in your - working copy, and then commit the local modification to the - repository. All you need to do is to specify a - reverse difference. (You can do this by - specifying , or by an - equivalent .) - -$ svn merge -c -303 http://svn.example.com/repos/calc/trunk -U integer.c - -$ svn status -M integer.c - -$ svn diff -… -# verify that the change is removed -… - -$ svn commit -m "Undoing change committed in r303." -Sending integer.c -Transmitting file data . -Committed revision 350. - - One way to think about a repository revision is as a - specific group of changes (some version control systems call - these changesets). By using the - option, you can ask svn - merge to apply a changeset, or whole range of - changesets, to your working copy. In our case of undoing a - change, we're asking svn merge to apply - changeset #303 to our working copy - backwards. - - - Subversion and Changesets - - Everyone seems to have a slightly different definition - of changeset, or at least a different - expectation of what it means for a version control system to - have changeset features. 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. - 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 revision N 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, - this issue was fixed by revision 9238.. - Somebody can then run svn log -r9238 to - read about the exact changeset which fixed the bug, and run - svn diff -c 9238 to see the patch - itself. And Subversion's merge command - also uses revision numbers. You can merge specific changesets - from one branch to another by naming them in the merge - arguments: svn merge -c 9238 would - merge changeset #9238 into your working copy. - - Keep in mind that rolling back a change like this is just - like any other svn merge operation, so you - should use svn status and svn - diff to confirm that your work is in the state you - want it to be in, and then use svn commit - to send the final version to the repository. After - committing, this particular changeset is no longer reflected - in the HEAD revision. - 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 - calc project between revisions 303 and - 349, they'll still see the bad change, right? - Yes, that's true. When we talk about - removing a change, we're really talking about - removing it from HEAD. 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 HEAD 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. - The Subversion project has plans, however, to someday - implement a command that would accomplish the task of - permanently deleting information. In the meantime, see - - for a possible workaround. - -
- -
- - Resurrecting Deleted Items - - 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 HEAD - revision, but the object still exists in earlier revisions. - One of the most common questions new users ask is, How - do I get my old file or directory back?. - The first step is to define - exactly which 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 - peg revision syntax—foo.c@224 - —mentioned back in - .) - First, you might need to use svn log to - discover the exact coordinate pair you wish to resurrect. A - good strategy is to run svn log - --verbose in a directory which used to contain your - deleted item. The 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 grep, or - perhaps via an incremental search in an editor). - -$ cd parent-dir -$ svn log -v -… ------------------------------------------------------------------------- -r808 | joe | 2003-12-26 14:29:40 -0600 (Fri, 26 Dec 2003) | 3 lines -Changed paths: - D /calc/trunk/real.c - M /calc/trunk/integer.c - -Added fast fourier transform functions to integer.c. -Removed real.c because code now in double.c. -… - - In the example, we're assuming that you're looking for a - deleted file real.c. 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 - /calc/trunk/real.c from revision - 807. - That was the hard part—the research. Now that you - know what you want to restore, you have two different - choices. - One option is to use svn merge to apply - revision 808 in reverse. (We've already - discussed how to undo changes, see - .) This - would have the effect of re-adding real.c - as a local modification. The file would be scheduled for - addition, and after a commit, the file would again exist - in HEAD. - In this particular example, however, this is probably not - the best strategy. Reverse-applying revision 808 would not - only schedule real.c for addition, but - the log message indicates that it would also undo certain - changes to integer.c, which you don't - want. Certainly, you could reverse-merge revision 808 and - then svn revert the local modifications to - integer.c, but this technique doesn't - scale well. What if there were 90 files changed in revision - 808? - A second, more targeted strategy is not to use - svn merge at all, but rather the - svn copy command. Simply copy the exact - revision and path coordinate pair from the - repository to your working copy: - -$ svn copy -r 807 \ - http://svn.example.com/repos/calc/trunk/real.c ./real.c - -$ svn status -A + real.c - -$ svn commit -m "Resurrected real.c from revision 807, /calc/trunk/real.c." -Adding real.c -Transmitting file data . -Committed revision 1390. - - The plus sign in the status output indicates that the item - isn't merely scheduled for addition, but scheduled for - addition with history. Subversion remembers - where it was copied from. In the future, running svn - log 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 - real.c isn't really new; it's a direct - descendant of the original, deleted file. - Although our example shows us resurrecting a file, note - that these same techniques work just as well for resurrecting - deleted directories. -
- -
- - Manually Merging a Branch - - ###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: - 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. - So how do we use svn merge 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 /calc/trunk. - 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 wrong, and has burned many - a new user! Since svn merge operates like - svn diff, comparing the latest trunk and - branch trees will not 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 removal - of trunk changes that never happened on your branch. - 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 svn log 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 - HEAD revision. That means you want to - compare revisions 341 and HEAD of your - branch directory, and apply those differences to a working - copy of the trunk. - - A nice way of finding the revision in which a branch was - created (the base of the branch) is to use the - option to svn - log. 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 - will halt log output as soon - as svn log detects that its target was - copied or renamed. - So in our continuing example, - -$ svn log -v --stop-on-copy \ - http://svn.example.com/repos/calc/branches/my-calc-branch -… ------------------------------------------------------------------------- -r341 | user | 2002-11-03 15:27:56 -0600 (Thu, 07 Nov 2002) | 2 lines -Changed paths: - A /calc/branches/my-calc-branch (from /calc/trunk:340) - -$ - - As expected, the final revision printed by this command - is the revision in which my-calc-branch - was created by copying. - - Here's the final merging procedure, then: - -$ cd calc/trunk -$ svn update -At revision 405. - -$ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch -U integer.c -U button.c -U Makefile - -$ svn status -M integer.c -M button.c -M Makefile - -# ...examine the diffs, compile, test, etc... - -$ svn commit -m "Merged my-calc-branch changes r341:405 into the trunk." -Sending integer.c -Sending button.c -Sending Makefile -Transmitting file data ... -Committed revision 406. - - 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. - 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 - HEAD 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 new - on your branch since the last time you merged. The trick is - to figure out what's new. - The first step is to run svn log on the - trunk, and look for a log message about the last time you - merged from the branch: - -$ cd calc/trunk -$ svn log -… ------------------------------------------------------------------------- -r406 | user | 2004-02-08 11:17:26 -0600 (Sun, 08 Feb 2004) | 1 line - -Merged my-calc-branch changes r341:405 into the trunk. ------------------------------------------------------------------------- -… - - 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 - HEAD. - -$ cd calc/trunk -$ svn update -At revision 480. - -# We notice that HEAD is currently 480, so we use it to do the merge: - -$ svn merge -r 406:480 http://svn.example.com/repos/calc/branches/my-calc-branch -U integer.c -U button.c -U Makefile - -$ svn commit -m "Merged my-calc-branch changes r406:480 into the trunk." -Sending integer.c -Sending button.c -Sending Makefile -Transmitting file data ... -Committed revision 481. - - 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. -
- -
- - Merge Conflicts - - Just like the svn update command, - svn merge applies changes to your working - copy. And therefore it's also capable of creating - conflicts. The conflicts produced by svn - merge, however, are sometimes different, and this - section explains those differences. - To begin with, assume that your working copy has no - local edits. When you svn update to a - particular revision, the changes sent by the server will - always apply cleanly 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. - But svn merge has no such guarantees - and can be much more chaotic: the advanced user can ask the - server to compare any 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. svn merge will do its best - to apply as much of the delta as possible, but some parts may - be impossible. Just as the Unix - patch command sometimes complains about - failed hunks, svn merge - will complain about skipped targets: - - $ svn merge -r 1288:1351 http://svn.example.com/repos/branch - U foo.c - U bar.c - Skipped missing target: 'baz.c' - U glub.c - C glorb.h - - $ - - In the previous example it might be the case that - baz.c 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 - skipped 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 - (svn revert --recursive), delete any - unversioned files or directories left behind after the - revert, and re-run svn merge with - different arguments. - Also notice that the previous example shows a conflict - happening on glorb.h. We already - stated that the working copy has no local edits: how can a - conflict possibly happen? Again, because the user can use - svn merge 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. - Another small difference between svn - update and svn merge are the - names of the full-text files created when a conflict - happens. In , we saw - that an update produces files named - filename.mine, - filename.rOLDREV, and - filename.rNEWREV. When svn - merge produces a conflict, though, it creates - three files named filename.working, - filename.left, and - filename.right. In this case, the - terms left and right 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. -
- -
- - Blocking Changes - - ###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. -
- -
- - Logging and Blaming - - ###TODO: demonstrate 'svn log -g' and 'svn blame -g', and - explain why they're useful. -
- -
- - Noticing or Ignoring Ancestry - - When conversing with a Subversion developer, you might - very likely hear reference to the term - ancestry. 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. - For example, suppose you commit revision 100, which - includes a change to a file foo.c. - Then foo.c@99 is an - ancestor of foo.c@100. - On the other hand, suppose you commit the deletion of - foo.c in revision 101, and then add a - new file by the same name in revision 102. In this case, - foo.c@99 and - foo.c@102 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 ancestry. - The reason for bringing this up is to point out an - important difference between svn diff and - svn merge. The former command ignores - ancestry, while the latter command is quite sensitive to it. - For example, if you asked svn diff to - compare revisions 99 and 102 of foo.c, - you would see line-based diffs; the diff - command is blindly comparing two paths. But if you asked - svn merge 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: - - D foo.c - A foo.c - - Most merges involve comparing trees that are ancestrally - related to one another, and therefore svn - merge defaults to this behavior. Occasionally, - however, you may want the merge 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 ). If you asked - svn merge 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 - svn merge to do a path-based comparison - only, ignoring any relations between files and directories. - Add the option to your - merge command, and it will behave just like svn - diff. (And conversely, the - option will cause - svn diff to behave like the - merge command.) -
- -
- - Merges and Moves - - 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? - 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 update - command isn't as robust as it should be, particularly when - dealing with copy and move operations. - When you use svn copy 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 svn update - or svn merge. Instead of telling the - client, Copy that file you already have to this new - location, 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 true - renames—the svn move - command is nothing more than an aggregation of svn - copy and svn delete. - For example, suppose that while working on your private - branch, you rename integer.c - to whole.c. 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 trunk, Sally has committed some - improvements to integer.c. Now you - decide to merge your branch to the trunk: - - $ cd calc/trunk - - $ svn merge -r 341:405 http://svn.example.com/repos/calc/branches/my-calc-branch - D integer.c - A whole.c - - 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 integer.c file (the one containing - Sally's latest changes), and blindly added your - new whole.c file—which is a - duplicate of the older version - of integer.c. The net effect is that - merging your rename to the branch has removed - Sally's recent changes from the latest revision! - 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. -
- -
- - Blocking Pre-1.5 Clients - - ###TODO: Why you might want to do this. (How did we - decide to do this??) -
-
- - - -
- - Common Branching Patterns - - There are many different uses for branching and svn - merge, and this section describes the most common ones - you're likely to run into. - 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. - -
- - Release Branches - - 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. - Here's where version control can help. The typical - procedure looks like this: - - - Developers commit all new work to the - trunk. - - Day-to-day changes are committed to - /trunk: new features, bugfixes, and - so on. - - - The trunk is copied to a - release branch. - - When the team thinks the software is ready for release - (say, a 1.0 release), then /trunk - might be copied to - /branches/1.0. - - - Teams continue to work in parallel. - - One team begins rigorous testing of the release branch, - while another team continues new work (say, for version - 2.0) on /trunk. 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 frozen for - final testing right before a release. - - - The branch is tagged and released. - - When testing is complete, - /branches/1.0 is copied to - /tags/1.0.0 as a reference - snapshot. The tag is packaged and released to - customers. - - - The branch is maintained over time. - - While work continues on /trunk for - version 2.0, bugfixes continue to be ported from - /trunk to - /branches/1.0. When enough - bugfixes have accumulated, management may decide to do a - 1.0.1 release: /branches/1.0 is - copied to /tags/1.0.1, and the tag - is packaged and released. - - - 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 maintenance mode, and a number - of tags representing final shipped versions. -
- -
- - Feature Branches - - A feature branch 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 - /trunk. It's a temporary branch - created to work on a complex change without interfering with - the stability of /trunk. 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. - 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 - /trunk 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 - ever 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. - Most projects take a middle-of-the-road approach. They - commonly insist that /trunk 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 - /trunk were never destabilized), would it - be too large a change to review? If the answer to that - question is yes, 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. - Finally, there's the issue of how to best keep a feature - branch in sync 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. - 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. - At some point, you'll be ready to merge the - synchronized 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: - ###TODO: SIMPLIFY THIS EXAMPLE TO SHOW MERGE-TRACKING - - $ cd trunk-working-copy - - $ svn update - At revision 1910. - - $ svn merge http://svn.example.com/repos/calc/trunk@1910 \ - http://svn.example.com/repos/calc/branches/mybranch@1910 - U real.c - U integer.c - A newdirectory - A newdirectory/newfile - … - - By comparing the HEAD revision of the - trunk with the HEAD 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. - Another way of thinking about this pattern is that your - weekly sync of trunk to branch is analogous to running - svn update in a working copy, while the - final merge step is analogous to running svn - commit from a working copy. After all, what else - is a working copy but a very shallow - private branch? It's a branch that's only capable of - storing one change at a time. -
-
- - - -
- - Traversing Branches - - The svn switch 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 - /calc/trunk to mirror the new branch - location: - -$ cd calc - -$ svn info | grep URL -URL: http://svn.example.com/repos/calc/trunk - -$ svn switch http://svn.example.com/repos/calc/branches/my-calc-branch -U integer.c -U button.c -U Makefile -Updated to revision 341. - -$ svn info | grep URL -URL: http://svn.example.com/repos/calc/branches/my-calc-branch - - After switching 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. - The svn switch command also takes a - () option, so you - need not always move your working copy to the - HEAD of the branch. - Of course, most projects are more complicated than our - calc example, containing multiple - subdirectories. Subversion users often follow a specific - algorithm when using branches: - - - Copy the project's entire trunk to a - new branch directory. - - - Switch only part of the trunk - working copy to mirror the branch. - - - In other words, if a user knows that the branch-work only - needs to happen on a specific subdirectory, they use - svn switch 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 trunk 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 mixed - working copy—not only can working copies contain a - mixture of working revisions, but a mixture of repository - locations as well. - 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. - Note that while it's okay for your working copy to reflect a - mixture of repository locations, these locations must all be - within the same repository. Subversion - repositories aren't yet able to communicate with one another; - that's a feature planned for the - future. - You can, however, use svn - switch with the option - if the URL of your server changes and you don't want to - abandon an existing working copy. See for more information and an - example. - - - Switches and Updates - - Have you noticed that the output of svn - switch and svn update look the - same? The switch command is actually a - superset of the update command. - When you run svn update, 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 svn - switch and svn update is that the - update command always compares two identical - paths. - That is, if your working copy is a mirror of - /calc/trunk, then svn - update will automatically compare your working copy - of /calc/trunk to - /calc/trunk in the - HEAD revision. If you're switching your - working copy to a branch, then svn switch - will compare your working copy of - /calc/trunk to some - other branch-directory in the - HEAD revision. - In other words, an update moves your working copy through - time. A switch moves your working copy through time - and space. - - Because svn switch is essentially a - variant of svn update, 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. - For example, suppose you have a working copy of - /calc/trunk 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 svn - switch your working copy to the branch, the local - changes will remain. You can then test and commit them to the - branch. -
- - - -
- - Tags - - Another common version control concept is a - tag. A tag is just a - snapshot 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. - However, people often want to give more human-friendly names - to tags, like release-1.0. 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. - -
- - Creating a Simple Tag - - Once again, svn copy comes to the - rescue. If you want to create a snapshot of - /calc/trunk exactly as it looks in the - HEAD revision, then make a copy of it: - -$ svn copy http://svn.example.com/repos/calc/trunk \ - http://svn.example.com/repos/calc/tags/release-1.0 \ - -m "Tagging the 1.0 release of the 'calc' project." - -Committed revision 351. - - This example assumes that a - /calc/tags directory already exists. (If - it doesn't, you can create it using svn - mkdir.) After the copy completes, the new - release-1.0 directory is forever a - snapshot of how the project looked in the - HEAD 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 - /calc/trunk is exactly the snapshot you - want, you can specify it by passing to - the svn copy command. - 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 tag is because - humans 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. - If you are administering a repository, there are two - approaches you can take to managing tags. The first approach - is hands off: 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 .) 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. -
- -
- - Creating a Complex Tag - - Sometimes you may want your snapshot to be - more complicated than a single directory at a single - revision. - For example, pretend your project is much larger than our - calc 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 svn update - -r liberally), or by switching files and directories - to particular branches (making use of svn - switch). 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. - 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, svn copy actually has four - different uses (which you can read about in ), including the ability to copy a - working-copy tree to the repository: - -$ ls -my-working-copy/ - -$ svn copy my-working-copy http://svn.example.com/repos/calc/tags/mytag - -Committed revision 352. - - Now there is a new directory in the repository, - /calc/tags/mytag, which is an exact - snapshot of your working copy—mixed revisions, URLs, - and all. - 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 svn - diff and sending a patch file (which won't capture - tree changes, symlink changes or changes in properties), you can - instead use svn copy to upload - 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 svn merge to receive - your exact changes. - While this is a nice method for uploading a quick snapshot - of your working copy, note that this is not - 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. - - Have you ever found yourself making some complex edits - (in your /trunk working copy) and - suddenly realized, hey, these changes ought to be in - their own branch? A great technique to do this can - be summarized in two steps: - -$ svn copy http://svn.example.com/repos/calc/trunk \ - http://svn.example.com/repos/calc/branches/newbranch -Committed revision 353. - -$ svn switch http://svn.example.com/repos/calc/branches/newbranch -At revision 353. - - The svn switch command, like - svn update, preserves your local edits. - At this point, your working copy is now a reflection of the - newly created branch, and your next svn - commit invocation will send your changes - there. - -
-
- - - -
- - Branch Maintenance - - 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 too - flexible. In this section, we'll offer some suggestions for - arranging and managing your data over time. - -
- - Repository Layout - - There are some standard, recommended ways to organize a - repository. Most people create a trunk - directory to hold the main line of development, - a branches directory to contain branch - copies, and a tags directory to contain - tag copies. If a repository holds only one project, then - often people create these top-level directories: - -/trunk -/branches -/tags - - If a repository contains multiple projects, admins - typically index their layout by project (see to read more about - project roots): - -/paint/trunk -/paint/branches -/paint/tags -/calc/trunk -/calc/branches -/calc/tags - - 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 svn move 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. - 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 svn move - operation might remove the path from the latest revision. - When the user next runs svn update, she will - be told that her working copy represents a path that no - longer exists, and the user will be forced to svn - switch to the new location. - -
- -
- - Data Lifetimes - - 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 - calc project. After merging all of your - changes back into /calc/trunk, there's - no need for your private branch directory to stick around - anymore: - -$ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch \ - -m "Removing obsolete branch of calc project." - -Committed revision 375. - - And now your branch is gone. Of course it's not really - gone: the directory is simply missing from the - HEAD revision, no longer distracting - anyone. If you use svn checkout, - svn switch, or svn list - to examine an earlier revision, you'll still be able to see - your old branch. - 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 HEAD, simply - use svn copy -r to copy it from the old - revision: - -$ svn copy -r 374 http://svn.example.com/repos/calc/branches/my-calc-branch \ - http://svn.example.com/repos/calc/branches/my-calc-branch - -Committed revision 376. - - 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 main branches running side-by-side for - very long periods. For example, suppose it's time to release - a stable version of the calc 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 stable branch of the software that won't - change much: - -$ svn copy http://svn.example.com/repos/calc/trunk \ - http://svn.example.com/repos/calc/branches/stable-1.0 \ - -m "Creating stable branch of calc project." - -Committed revision 377. - - And now developers are free to continue adding - cutting-edge (or experimental) features to - /calc/trunk, and you can declare a - project policy that only bug fixes are to be committed to - /calc/branches/stable-1.0. 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. -
-
- - - -
- - Vendor branches - - 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. - 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 ). 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 bleeding edge 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. - 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 pin down specific - versions of that information to some location in your own - working copy directory (see ). - 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. - 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. - The solution to this problem is to use vendor - branches. 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 vendor drop. - 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. - -
- - General Vendor Branch Management Procedure - - Managing vendor branches generally works like this. You - create a top-level directory (such as - /vendor) 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, - /trunk) 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 - /trunk, resolving whatever conflicts - occur between your local changes and the upstream - changes. - 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 - libcomplex, and our code drops will go - into a subdirectory of our vendor branch called - current. And since svn - import creates all the intermediate parent - directories it needs, we can actually accomplish both of these - steps with a single command. - -$ svn import /path/to/libcomplex-1.0 \ - http://svn.example.com/repos/vendor/libcomplex/current \ - -m 'importing initial 1.0 vendor drop' -… - - We now have the current version of the libcomplex source - code in /vendor/libcomplex/current. Now, - we tag that version (see ) - and then copy it into the main development branch. Our copy - will create a new directory called - libcomplex in our existing - calc project directory. It is in this - copied version of the vendor data that we will make our - customizations. - -$ svn copy http://svn.example.com/repos/vendor/libcomplex/current \ - http://svn.example.com/repos/vendor/libcomplex/1.0 \ - -m 'tagging libcomplex-1.0' -… -$ svn copy http://svn.example.com/repos/vendor/libcomplex/1.0 \ - http://svn.example.com/repos/calc/libcomplex \ - -m 'bringing libcomplex-1.0 into the main branch' -… - - 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. - And entirely bug-free, of course! - - 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. - To perform this upgrade, we check out a copy of our vendor - branch, and replace the code in the - current 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 current 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. - After replacing the 1.0 code with 1.1 code, svn - status 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 svn add 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 - svn delete. Finally, once our - current working copy contains only the - libcomplex 1.1 code, we commit the changes we made to get it - looking that way. - Our current 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. - -$ cd working-copies/calc -$ svn merge http://svn.example.com/repos/vendor/libcomplex/1.0 \ - http://svn.example.com/repos/vendor/libcomplex/current \ - libcomplex -… # resolve all the conflicts between their changes and our changes -$ svn commit -m 'merging libcomplex-1.1 into the main branch' -… - - 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. - 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. -
- - -
- - - <command>svn_load_dirs.pl</command> - - - 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 svn_load_dirs.pl - 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 svn_load_dirs.pl - can help you more quickly and easily arrive at that - stage. - In short, svn_load_dirs.pl is an - enhancement to svn import that has several - important characteristics: - - - 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. - - - It takes care of complicated series of operations between - which Subversion requires an intermediate commit—such - as before renaming a file or directory twice. - - - It will optionally tag the newly imported directory. - - - It will optionally add arbitrary properties to files and - directories that match a regular expression. - - - svn_load_dirs.pl 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 svn_load_dirs.pl - might look like: - -$ svn_load_dirs.pl http://svn.example.com/repos/vendor/libcomplex \ - current \ - /path/to/libcomplex-1.1 -… - - You can indicate that you'd like - svn_load_dirs.pl to tag the new vendor drop - by passing the command-line option and - specifying a tag name. This tag is another URL relative to - the first program argument. - -$ svn_load_dirs.pl -t libcomplex-1.1 \ - http://svn.example.com/repos/vendor/libcomplex \ - current \ - /path/to/libcomplex-1.1 -… - - When you run svn_load_dirs.pl, it - examines the contents of your existing current - 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, - svn_load_dirs.pl 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 math.c in version 1.0 of - libcomplex was renamed to arithmetic.c in - libcomplex 1.1. Any discrepancies not explained by moves - are treated as regular additions and deletions. - The script also accepts a separate configuration file for - setting properties on files and directories matching a regular - expression that are added to the - repository. This configuration file is specified to - svn_load_dirs.pl using the - 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 - break or cont), and then - optionally a property name and value. - -\.png$ break svn:mime-type image/png -\.jpe?g$ break svn:mime-type image/jpeg -\.m3u$ cont svn:mime-type audio/x-mpegurl -\.m3u$ break svn:eol-style LF -.* break svn:eol-style native - - For each added path, the configured property changes whose - regular expression matches the path are applied in order, - unless the control specification is break - (which means that no more property changes should be applied - to that path). If the control specification is - cont—an abbreviation for - continue—then matching will continue - with the next line of the configuration file. - 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 (\) 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. -
-
- - - -
- - Summary - - 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 svn copy command. We've shown how - to use svn merge to copy changes from one - branch to another, or roll back bad changes. We've gone over - the use of svn switch to create - mixed-location working copies. And we've talked about how one - might manage the organization and lifetimes of branches in a - repository. - 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. -
-
- - - - Repository Administration - - 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. - 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 - svnlook and svnadmin 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. - 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, - 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. - this chapter is for you. - - - -
- - The Subversion Repository, Defined - - 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 - inside the repository. - 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: - -$ ls repos -conf/ dav/ db/ format hooks/ locks/ README.txt - - 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.) - - - conf - - A directory containing repository configuration files. - - - - dav - - A directory provided to mod_dav_svn for its private - housekeeping data. - - - - db - - The data store for all of your versioned data. - - - - format - - A file that contains a single integer that - indicates the version number of the repository layout. - - - - hooks - - A directory full of hook script templates (and hook - scripts themselves, once you've installed some). - - - - locks - - A directory for Subversion's repository lock - files, used for tracking accessors to the repository. - - - - README.txt - - A file whose contents merely inform its readers that - they are looking at a Subversion repository. - - - - 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. -
- - - -
- - Strategies for Repository Deployment - - 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. - Some things you'll want to consider up front, though, are: - - - What data do you expect to live in your repository (or - repositories), and how will that data be organized? - - - Where will your repository live, and how will it be - accessed? - - - What types of access control and repository event - reporting do you need? - - - Which of the available types of data store do you want - to use? - - - In this section, we'll try to help you answer those - questions. - -
- - Planning Your Repository Organization - - 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 laying out your repository or - repositories and their versioned contents ahead of time, you - can prevent many future headaches. - 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. - 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. - 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. - 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 not the kind of - thing you should weigh when deciding how to arrange your - projects and repositories. - - 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. - 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 ), the - Subversion community recommends that you choose a repository - location for each project - root—the top-most directory - which contains data related to that project—and then - create three subdirectories beneath that root: - trunk, meaning the directory under which - the main project development occurs; - branches, which is a directory in which - to create various named branches of the main development line; - tags, which is a collection of tree - snapshots that are created, and perhaps destroyed, but never - changed. - The trunk, tags, - and branches trio are sometimes referred - to as the TTB directories. - - For example, your repository might look like: - -/ - calc/ - trunk/ - tags/ - branches/ - calendar/ - trunk/ - tags/ - branches/ - spreadsheet/ - trunk/ - tags/ - branches/ - … - - 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: - -/ - utils/ - calc/ - trunk/ - tags/ - branches/ - calendar/ - trunk/ - tags/ - branches/ - … - office/ - spreadsheet/ - trunk/ - tags/ - branches/ - … - - 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. - In the name of full disclosure, though, we'll mention - another very common layout. In this layout, the - trunk, tags, and - branches directories live in the root - directory of your repository, and your projects are in - subdirectories beneath those, like: - -/ - trunk/ - calc/ - calendar/ - spreadsheet/ - … - tags/ - calc/ - calendar/ - spreadsheet/ - … - branches/ - calc/ - calendar/ - spreadsheet/ - … - - 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. -
- -
- - Deciding Where and How to Host Your Repository - - 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. - We cover server choice and configuration in , 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. - 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. -
- -
- - Choosing a Data Store - - As of version 1.1, Subversion provides two options for the - type of underlying data store—often referred to as - the back-end or, somewhat confusingly, - the (versioned) filesystem—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 - BDB-backed. 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 FSFS - Often pronounced fuzz-fuzz, if Jack - Repenning has anything to say about it. (This book, - however, assumes that the reader is thinking - eff-ess-eff-ess.) - —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. - - gives a comparative overview of Berkeley DB and FSFS - repositories. - - - Repository Data Store Comparison - - - - - Category - Feature - Berkeley DB - FSFS - - - - - Reliability - Data integrity - when properly deployed, extremely reliable; - Berkeley DB 4.4 brings auto-recovery - older versions had some rarely demonstrated, but - data-destroying bugs - - - Sensitivity to interruptions - very; crashes and permission problems can leave the - database wedged, requiring journaled - recovery procedures - quite insensitive - - - Accessibility - Usable from a read-only mount - no - yes - - - Platform-independent storage - no - yes - - - Usable over network filesystems - generally, no - yes - - - Group permissions handling - sensitive to user umask problems; best if accessed - by only one user - works around umask problems - - - Scalability - Repository disk usage - larger (especially if logfiles aren't purged) - smaller - - - Number of revision trees - database; no problems - some older native filesystems don't scale well with - thousands of entries in a single directory - - - Directories with many files - slower - faster - - - Performance - Checking out latest revision - no meaningful difference - no meaningful difference - - - Large commits - slower overall, but cost is amortized across the - lifetime of the commit - faster overall, but finalization delay may cause - client timeouts - - - -
- There are advantages and disadvantages to each of these - two back-end types. Neither of them is more - official 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 , 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. - 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. - The following subsections provide a more detailed look at - the available data store types. - -
- - Berkeley DB - - 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. - 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. - Another great feature of Berkeley DB is hot - backups—the ability to backup the database - environment without taking it offline. We'll - discuss how to backup your repository in , but the benefits of being - able to make fully functional copies of your repositories - without any downtime should be obvious. - 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 - checkpoint—a location in the - log files known not to be corrupt—and replay - transactions until the data is restored to a usable state. - See for - more about Berkeley DB log files. - 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. - While Berkeley DB promises to behave correctly on - network shares that meet a particular set of specifications, - Berkeley DB requires that the underlying filesystem - implement strict POSIX locking semantics, and more - importantly, the ability to map files directly into - process memory. - most networked filesystem types and appliances do - not 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). - - 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. - - 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 wedge - besides crashed processes, such as programs conflicting over - ownership and permissions on the database files. - - 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. - - 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 httpd - or svnserve (see )—rather than accessing it - as many different users via file:// or - svn+ssh:// URLs. If using a Berkeley DB - repository directly as multiple users, be sure to read . -
- -
- - FSFS - - 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 - hot, just like a BDB-backed - repository. - 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. - 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. - The most important distinction, however, is FSFS's - imperviousness to wedging 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. - 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, - Oracle bought Sleepycat and its flagship software, - Berkeley DB, on Valentine's Day in 2006. - 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. -
-
-
- - - -
- - Creating and Configuring Your Repository - - In , 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. - -
- - Creating the Repository - - Subversion repository creation is an incredibly simple - task. The svnadmin utility that comes with - Subversion provides a subcommand (create) - for doing just that. - -$ svnadmin create /var/svn/repos - - This creates a new repository in the directory - /var/svn/repos, 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 - argument, which accepts as a - parameter either fsfs or - bdb. - -$ # Create an FSFS-backed repository -$ svnadmin create --fs-type fsfs /var/svn/repos -$ - - -# Create a Berkeley-DB-backed repository -$ svnadmin create --fs-type bdb /var/svn/repos -$ - - After running this simple command, you have a Subversion - repository. - - The path argument to svnadmin is just - a regular filesystem path and not a URL like the - svn client program uses when referring to - repositories. Both svnadmin and - svnlook 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 local - file:// ones) to these two programs. - - Present in the db/ 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 (/) directory. - Initially, revision 0 also has a single revision property, - svn:date, set to the time at which the - repository was created. - Now that you have a repository, it's time to customize - it. - - 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 by hand. The - svnadmin 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 - not attempt manual manipulation of your - version control history by poking and prodding around in - your repository's data store files! - -
- -
- - Implementing Repository Hooks - - A hook 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 pre hooks) 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 post hooks) - 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. - The hooks subdirectory is, by - default, filled with templates for various repository - hooks. - -$ ls repos/hooks/ -post-commit.tmpl post-unlock.tmpl pre-revprop-change.tmpl -post-lock.tmpl pre-commit.tmpl pre-unlock.tmpl -post-revprop-change.tmpl pre-lock.tmpl start-commit.tmpl - - 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 repos/hooks directory - which can be executed as the name (like - start-commit or - post-commit) of the hook. - 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 .tmpl 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 - .exe for programs, and - .bat for batch files. - - For security reasons, the Subversion repository executes - hook programs with an empty environment—that is, no - environment variables are set at all, not even - $PATH (or %PATH%, - 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. - - 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. - There are nine hooks implemented by the Subversion - repository, and you can get details about each of them in - . 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. - 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 - for discussion of some of the most commonly used hook - programs. Or, if you wish to write your own, see . - - While hook scripts can do almost - anything, there is one dimension in which hook script - authors should show restraint: do not - 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 validate the transaction in the - pre-commit 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. - -
- -
- - Berkeley DB Configuration - - 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. - 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 DB_CONFIG in the environment - directory (namely, the repository's - db 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 - DB_CONFIG 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 - DB_CONFIG won't take effect until you - recover the database environment (using svnadmin - recover). -
-
- - - -
- - Repository Maintenance - - 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. - -
- - An Administrator's Toolkit - - 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. - -
- - svnadmin - - The svnadmin 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 - svnadmin is similar to that of other - Subversion command-line programs: - -$ svnadmin help -general usage: svnadmin SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...] -Type 'svnadmin help <subcommand>' for help on a specific subcommand. -Type 'svnadmin --version' to see the program version and FS modules. - -Available subcommands: - crashtest - create - deltify -… - - We've already mentioned svnadmin's - create subcommand (see ). Most of the - others we will cover later - in this chapter. And you can consult for a full rundown of - subcommands and what each of them offers. -
- -
- - svnlook - - svnlook is a tool provided by - Subversion for examining the various revisions and - transactions (which are revisions - in-the-making) in a repository. No part of this program - attempts to change the repository. svnlook - is typically used by the repository hooks for reporting the - changes that are about to be committed (in the case of the - pre-commit hook) or that were just - committed (in the case of the post-commit - hook) to the repository. A repository administrator may use - this tool for diagnostic purposes. - svnlook has a straightforward - syntax: - -$ svnlook help -general usage: svnlook SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...] -Note: any subcommand which takes the '--revision' and '--transaction' - options will, if invoked without one of those options, act on - the repository's youngest revision. -Type 'svnlook help <subcommand>' for help on a specific subcommand. -Type 'svnlook --version' to see the program version and FS modules. -… - - Nearly every one of svnlook'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 and - options to specify which - revision or transaction, respectively, to examine. In the - absence of both the and - options, - svnlook will examine the youngest (or - HEAD) 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 - /var/svn/repos: - -$ svnlook info /var/svn/repos -$ svnlook info /var/svn/repos -r 19 - - The only exception to these rules about subcommands is - the svnlook youngest subcommand, which - takes no options, and simply prints out the repository's - youngest revision number. - -$ svnlook youngest /var/svn/repos -19 - - - 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) or - aborted and removed. - - Output from svnlook is designed to be - both human- and machine-parsable. Take as an example the output - of the info subcommand: - -$ svnlook info /var/svn/repos -sally -2002-11-04 09:29:13 -0600 (Mon, 04 Nov 2002) -27 -Added the usual -Greek tree. - - The output of the info subcommand is - defined as: - - - The author, followed by a newline. - - - The date, followed by a newline. - - - The number of characters in the log message, - followed by a newline. - - - The log message itself, followed by a newline. - - - 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, svnlook 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. - svnlook 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 - for a full reference of - svnlook's features. -
- -
- - svndumpfilter - - While it won't be the most commonly used tool at the - administrator's disposal, svndumpfilter - 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. - The syntax of svndumpfilter is as - follows: - -$ svndumpfilter help -general usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...] -Type "svndumpfilter help <subcommand>" for help on a specific subcommand. -Type 'svndumpfilter --version' to see the program version. - -Available subcommands: - exclude - include - help (?, h) - - There are only two interesting subcommands. They allow - you to make the choice between explicit or implicit - inclusion of paths in the stream: - - - - exclude - - - Filter out a set of paths from the dump data - stream. - - - - - include - - - Allow only the requested set of paths to pass - through the dump data stream. - - - - You can learn more about these subcommands and - svndumpfilter's unique purpose in . -
- -
- - svnsync - - The svnsync 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 source and - sink - Or is that, the sync? - repositories may be on different computers from each other - and from svnsync itself. - As you might expect, svnsync has a - syntax that looks very much like every other program we've - mentioned in this chapter: - -$ svnsync help -general usage: svnsync SUBCOMMAND DEST_URL [ARGS & OPTIONS ...] -Type 'svnsync help <subcommand>' for help on a specific subcommand. -Type 'svnsync --version' to see the program version and RA modules. - -Available subcommands: - initialize (init) - synchronize (sync) - copy-revprops - help (?, h) -$ - - We talk more about replication repositories with - svnsync in . -
- -
- - Berkeley DB Utilities - - 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 db/ - 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. - For day-to-day Subversion use, these tools are - unnecessary. Most of the functionality typically needed for - Subversion repositories has been duplicated in the - svnadmin tool. For example, - svnadmin list-unused-dblogs and - svnadmin list-dblogs perform a - subset of what is provided by the Berkeley - db_archive command, and svnadmin - recover reflects the common use cases of the - db_recover utility. - However, there are still a few Berkeley DB utilities - that you might find useful. The db_dump - and db_load 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 svnadmin dump and - svnadmin load for similar purposes, but - db_dump and db_load - 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 db_stat - utility can provide useful information about the status of - your Berkeley DB environment, including detailed statistics - about the locking and storage subsystems. - For more information on the Berkeley DB tool chain, - visit the documentation section of the Berkeley DB section - of Oracle's website, located at http://www.oracle.com/technology/documentation/berkeley-db/db/. -
-
- -
- - Commit Log Message Correction - - Sometimes a user will have an error in her log message (a - misspelling or some misinformation, perhaps). If the - repository is configured (using the - pre-revprop-change hook; see ) to accept changes to - this log message after the commit is finished, then the user - can fix her log message remotely using the - svn program's propset - command (see ). - 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. - If a log message needs to be changed by an administrator, - this can be done using svnadmin setlog. - This command changes the log message (the - svn:log property) on a given revision of a - repository, reading the new value from a provided file. - -$ echo "Here is the new, correct log message" > newlog.txt -$ svnadmin setlog myrepos newlog.txt -r 388 - - The svnadmin setlog command, by - default, is - still bound by the same protections against modifying - unversioned properties as a remote client is—the - pre- and - post-revprop-change 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 to the svnadmin setlog command. - - 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. - -
- -
- - Managing Disk Space - - 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. - -
- - How Subversion saves disk space - - To keep the repository small, - Subversion uses deltification (or, - deltified storage) 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, I look just like this other - piece of data over here, except for the following couple of - changes. 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 fulltext 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. - - 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. - -
- -
- - Removing dead transactions - - 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. - You can use svnadmin's - lstxns command to list the names of the - currently outstanding transactions. - -$ svnadmin lstxns myrepos -19 -3a1 -a45 -$ - - Each item in the resultant output can then be used with - svnlook (and its - 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 svnadmin rmtxns, which - will perform the cleanup of the transaction. In fact, the - rmtxns subcommand can take its input - directly from the output of - lstxns! - -$ svnadmin rmtxns myrepos `svnadmin lstxns myrepos` -$ - - 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. - contains a bit of shell-scripting that can quickly generate - information about each outstanding transaction in your - repository. - - - txn-info.sh (Reporting Outstanding Transactions) - - -#!/bin/sh - -### Generate informational output for all outstanding transactions in -### a Subversion repository. - -REPOS="${1}" -if [ "x$REPOS" = x ] ; then - echo "usage: $0 REPOS_PATH" - exit -fi - -for TXN in `svnadmin lstxns ${REPOS}`; do - echo "---[ Transaction ${TXN} ]-------------------------------------------" - svnlook info "${REPOS}" -t "${TXN}" -done - - - The output of the script is basically a concatenation of - several chunks of svnlook info output - (see ), and - will look something like: - -$ txn-info.sh myrepos ----[ Transaction 19 ]------------------------------------------- -sally -2001-09-04 11:57:19 -0500 (Tue, 04 Sep 2001) -0 ----[ Transaction 3a1 ]------------------------------------------- -harry -2001-09-10 16:50:30 -0500 (Mon, 10 Sep 2001) -39 -Trying to commit over a faulty network. ----[ Transaction a45 ]------------------------------------------- -sally -2001-09-12 11:09:28 -0500 (Wed, 12 Sep 2001) -0 -$ - - 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? - 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. -
- -
- - Purging unused Berkeley DB logfiles - - 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 between - states. Thus, they can grow and accumulate quite - rapidly. - 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 svnadmin - 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 to the - svnadmin create command. If you forget - to do this, or change your mind at a later time, simply edit - the DB_CONFIG file found in your - repository's db directory, comment out - the line which contains the set_flags - DB_LOG_AUTOREMOVE directive, and then run - svnadmin recover on your repository to - force the configuration changes to take effect. See for more information about - database configuration. - 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 svnadmin - list-unused-dblogs command to list the unused - log files: - -$ svnadmin list-unused-dblogs /var/svn/repos -/var/svn/repos/log.0000000031 -/var/svn/repos/log.0000000032 -/var/svn/repos/log.0000000033 -… -$ rm `svnadmin list-unused-dblogs /var/svn/repos` -## disk space reclaimed! - - - BDB-backed repositories whose log files are used - as part of a backup or disaster recovery plan should - not make use of the log file - autoremoval feature. Reconstruction of a repository's - data from log files can only be accomplished when all 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. - -
-
- -
- - Berkeley DB Recovery - - As mentioned in , 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. - 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 .) - 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 - wedged. 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). - 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 - E.g.: hard drive + huge electromagnet = disaster. - 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. - Instead, use the following recipe to attempt to - unwedge your repository: - - - 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. - - - 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 - unwedged. - - - Run the command svnadmin recover - /var/svn/repos. You should see output like - this: - -Repository lock acquired. -Please wait; recovering the repository may take some time... - -Recovery completed. -The latest repos revision is 19. - - This command may take many minutes to complete. - - - Restart the server process. - - - 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 - root. Part of the recovery process might - involve recreating from scratch various database files (shared - memory regions, for example). Recovering as - root will create those files such that they - are owned by root, which means that even - after you restore connectivity to your repository, regular - users will be unable to access it. - 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 - repos.BROKEN) and then restore your - latest backup of it. Then, send an email to the Subversion - user list (at users@subversion.tigris.org) - describing your problem in detail. Data integrity is an - extremely high priority to the Subversion developers. -
- -
- - Migrating Repository Data Elsewhere - - 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. - Subversion provides such functionality by way of - repository dump streams. A repository dump stream (often - referred to as a dumpfile 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 - svnadmin dump and svnadmin - load subcommands, respectively. - - 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 not 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. - - 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 ) purging versioned - data from repository history. - Whatever your reason for migrating repository history, - using the svnadmin dump and - svnadmin load subcommands is - straightforward. svnadmin dump 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: - -$ svnlook youngest myrepos -26 -$ svnadmin dump myrepos > dumpfile -* Dumped revision 0. -* Dumped revision 1. -* Dumped revision 2. -… -* Dumped revision 25. -* Dumped revision 26. - - At the end of the process, you will have a single file - (dumpfile in the previous example) that - contains all the data stored in your repository in the - requested range of revisions. Note that svnadmin - dump is reading revision trees from the repository - just like any other reader process would - (svn checkout, for example), so it's safe - to run this command at any time. - The other subcommand in the pair, svnadmin - load, 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: - -$ svnadmin load newrepos < dumpfile -<<< Started new txn, based on original revision 1 - * adding path : A ... done. - * adding path : A/B ... done. - … -------- Committed new rev 1 (loaded from original rev 1) >>> - -<<< Started new txn, based on original revision 2 - * editing path : A/mu ... done. - * editing path : A/D/G/rho ... done. - -------- Committed new rev 2 (loaded from original rev 2) >>> - -… - -<<< Started new txn, based on original revision 25 - * editing path : A/D/gamma ... done. - -------- Committed new rev 25 (loaded from original rev 25) >>> - -<<< Started new txn, based on original revision 26 - * adding path : A/Z/zeta ... done. - * editing path : A/mu ... done. - -------- Committed new rev 26 (loaded from original rev 26) >>> - - - 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 - and - options to - svnadmin load, 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 . - Note that because svnadmin 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 - svnadmin on each side of the pipe): - -$ svnadmin create newrepos -$ svnadmin dump oldrepos | svnadmin load newrepos - - 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. 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. - We mentioned previously that svnadmin - dump outputs a range of revisions. Use the - 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. - -$ svnadmin dump myrepos -r 23 > rev-23.dumpfile -$ svnadmin dump myrepos -r 100:200 > revs-100-200.dumpfile - - 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 svnadmin dump - command. - 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 svnadmin dump 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. - However, you can change this default behavior. If you add - the option when you dump your - repository, svnadmin 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: - -$ svnadmin dump myrepos -r 0:1000 > dumpfile1 -$ svnadmin dump myrepos -r 1001:2000 --incremental > dumpfile2 -$ svnadmin dump myrepos -r 2001:3000 --incremental > dumpfile3 - - These dump files could be loaded into a new repository - with the following command sequence: - -$ svnadmin load newrepos < dumpfile1 -$ svnadmin load newrepos < dumpfile2 -$ svnadmin load newrepos < dumpfile3 - - Another neat trick you can perform with this - option involves appending to an - existing dump file a new range of dumped revisions. For - example, you might have a post-commit 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, svnadmin dump can be - one way to back up changes to your repository over time in case - of a system crash or some other catastrophic event. - The dump format can also be used to merge the contents of - several different repositories into a single repository. By - using the option of - svnadmin load, you can specify a new - virtual root directory for the load process. That means if - you have dump files for three repositories, say - calc-dumpfile, - cal-dumpfile, and - ss-dumpfile, you can first create a new - repository to hold them all: - -$ svnadmin create /var/svn/projects -$ - - Then, make new directories in the repository which will - encapsulate the contents of each of the three previous - repositories: - -$ svn mkdir -m "Initial project roots" \ - file:///var/svn/projects/calc \ - file:///var/svn/projects/calendar \ - file:///var/svn/projects/spreadsheet -Committed revision 1. -$ - - Lastly, load the individual dump files into their - respective locations in the new repository: - -$ svnadmin load /var/svn/projects --parent-dir calc < calc-dumpfile -… -$ svnadmin load /var/svn/projects --parent-dir calendar < cal-dumpfile -… -$ svnadmin load /var/svn/projects --parent-dir spreadsheet < ss-dumpfile -… -$ - - 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 - cvs2svn utility (see ) uses the dump format to - represent the contents of a CVS repository so that those - contents can be copied into a Subversion repository. -
- -
- - Filtering Repository History - - 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. - That's rather the reason you use version control at - all, right? - 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). - Conscious, cautious removal of certain bits of - versioned data is actually supported by real use-cases. - That's why an obliterate feature has been - one of the most highly requested Subversion features, - and one which the Subversion developers hope to soon - provide. - 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. - As we described in , 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 svnadmin - dump command to generate the dump data, and - svnadmin load to populate a new - repository with it (see ). 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. - That's where svndumpfilter 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. - Let's look a realistic example of how you might use this - program. We discuss elsewhere (see ) 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. - Our imaginary repository contains three projects: - calc, calendar, and - spreadsheet. They have been living - side-by-side in a layout like this: - -/ - calc/ - trunk/ - branches/ - tags/ - calendar/ - trunk/ - branches/ - tags/ - spreadsheet/ - trunk/ - branches/ - tags/ - - To get these three projects into their own repositories, - we first dump the whole repository: - -$ svnadmin dump /var/svn/repos > repos-dumpfile -* Dumped revision 0. -* Dumped revision 1. -* Dumped revision 2. -* Dumped revision 3. -… -$ - - 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: - -$ svndumpfilter include calc < repos-dumpfile > calc-dumpfile -… -$ svndumpfilter include calendar < repos-dumpfile > cal-dumpfile -… -$ svndumpfilter include spreadsheet < repos-dumpfile > ss-dumpfile -… -$ - - 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 calc - project, that repository would still have a top-level - directory named calc. If you want - your trunk, tags, - and branches directories to live in the - root of your repository, you might wish to edit your - dump files, tweaking the Node-path and - Node-copyfrom-path headers to no longer have - that first calc/ path component. Also, - you'll want to remove the section of dump data that creates - the calc directory. It will look - something like: - -Node-path: calc -Node-action: add -Node-kind: dir -Content-length: 0 - - - - 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. - - All that remains now is to create your three new - repositories, and load each dump file into the right - repository: - -$ svnadmin create calc; svnadmin load calc < calc-dumpfile -<<< Started new transaction, based on original revision 1 - * adding path : Makefile ... done. - * adding path : button.c ... done. -… -$ svnadmin create calendar; svnadmin load calendar < cal-dumpfile -<<< Started new transaction, based on original revision 1 - * adding path : Makefile ... done. - * adding path : cal.c ... done. -… -$ svnadmin create spreadsheet; svnadmin load spreadsheet < ss-dumpfile -<<< Started new transaction, based on original revision 1 - * adding path : Makefile ... done. - * adding path : ss.c ... done. -… -$ - - Both of svndumpfilter's subcommands - accept options for deciding how to deal with - empty 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, svndumpfilter provides - the following command-line options: - - - - - - - Do not generate empty revisions at all—just - omit them. - - - - - - - - If empty revisions are dropped (using the - option), change the - revision numbers of the remaining revisions so that - there are no gaps in the numeric sequence. - - - - - - - - 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 - svndumpfilter. - - - - While svndumpfilter 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 Node-path and - Node-copyfrom-path headers. - -… -Node-path: spreadsheet/Makefile -… - - If the paths have leading slashes, you should - include leading slashes in the paths you pass to - svndumpfilter include and - svndumpfilter exclude (and if they don't, - you shouldn't). Further, if your dump file has an inconsistent - usage of leading slashes for some reason, - While svnadmin dump has a - consistent leading slash policy—to not include - them—other programs which generate dump data might - not be so consistent. - you should probably normalize those paths so they all - have, or lack, leading slashes. - 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 svndumpfilter is - excluding, to a location that it is including. In order to - make the dump data self-sufficient, - svndumpfilter 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. - Finally, svndumpfilter takes path - filtering quite literally. If you are trying to copy the - history of a project rooted at - trunk/my-project and move it into a - repository of its own, you would, of course, use the - svndumpfilter include command to keep all - the changes in and under - trunk/my-project. 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 - trunk/my-project directory, but it will - not contain directives which would - create the trunk directory itself - (because trunk 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. -
- -
- - Repository Replication - - 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. - As of version 1.4, Subversion provides a program for - managing scenarios like - these—svnsync. - svnsync works by essentially asking the - Subversion server to replay 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 - svnsync 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. - - When using svnsync against a remote - source repository, the Subversion server for that repository - must be running Subversion version 1.4 or better. - - 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 ), but it must not - yet have any version history in it. The protocol via which - svnsync communicates revision information - is highly sensitive to mismatches between the versioned - histories contained in the source and target repositories. - For this reason, while svnsync cannot - demand that the target repository be - read-only, - In fact, it can't truly be read-only, or - svnsync itself would have a tough time - copying revision history into it. - allowing the revision history in the target repository to - change by any mechanism other than the mirroring process is a - recipe for disaster. - - Do not 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 - svnsync tool. - - Another requirement of the target repository is that the - svnsync process be allowed to modify - certain revision properties. svnsync - stores its bookkeeping information in special revision - properties on revision 0 of the destination repository. - Because svnsync works within the framework - of that repository's hook system, the default state of the - repository (which is to disallow revision property changes; - see ) - is insufficient. You'll need to explicitly implement the - pre-revprop-change hook, and your script must allow - svnsync to set and change its special - properties. With those provisions in place, you are ready to - start mirroring repository revisions. - - 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. - - Let's walk through the use of svnsync - 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. - 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 .) 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. - 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. - -$ ssh admin@svn.example.com \ - "svnadmin create /var/svn/svn-mirror" -admin@svn.example.com's password: ******** -$ - - At this point, we have our repository, and due to our - server's configuration, that repository is now - live 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 - syncuser will be allowed. - 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 - pre-revprop-change hook script is found - in , and basically verifies that the user attempting the - property changes is our syncuser user. If - so, the change is allowed; otherwise, it is denied. - - - Mirror repository's pre-revprop-change hook script - - -#!/bin/sh - -USER="$3" - -if [ "$USER" = "syncuser" ]; then exit 0; fi - -echo "Only the syncuser user may change revision properties" >&2 -exit 1 - - - That covers revision property changes. Now we need to - ensure that only the syncuser user is - permitted to commit new revisions to the repository. We do - this using a start-commit hook scripts - like the one in . - - - Mirror repository's start-commit hook script - - -#!/bin/sh - -USER="$2" - -if [ "$USER" = "syncuser" ]; then exit 0; fi - -echo "Only the syncuser user may commit new revisions" >&2 -exit 1 - - - 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. - The first thing we need to do with - svnsync is to register in our target - repository the fact that it will be a mirror of the source - repository. We do this using the svnsync - initialize subcommand. Note that the various - svnsync subcommands provide several of the - same authentication-related options that - svn does: , - , - , - , and - . - -$ svnsync help init -initialize (init): usage: svnsync initialize DEST_URL SOURCE_URL - -Initialize a destination repository for synchronization from -another repository. - -The destination URL must point to the root of a repository with -no committed revisions. The destination repository must allow -revision property changes. - -You should not commit to, or make revision property changes in, -the destination repository by any method other than 'svnsync'. -In other words, the destination repository should be a read-only -mirror of the source repository. - -Valid options: - --non-interactive : do no interactive prompting - --no-auth-cache : do not cache authentication tokens - --username arg : specify a username ARG - --password arg : specify a password ARG - --config-dir arg : read user configuration files from directory ARG - -$ svnsync initialize http://svn.example.com/svn-mirror \ - http://svn.collab.net/repos/svn \ - --username syncuser --password syncpass -Copied properties for revision 0. -$ - - 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 svnsync—that was required by the - pre-revprop-change hook on our mirror repository. - - The URLs provided to svnsync must - point to the root directories of the target and source - repositories, respectively. The tool does not handle - mirroring of repository subtrees. - - - The initial release of svnsync (in - Subversion 1.4) has a small shortcoming—the values - given to the and - 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 svnsync in non-interactive - mode (with the option) - might experience problems. - - And now comes the fun part. With a single subcommand, we - can tell svnsync to copy all the - as-yet-unmirrored revisions from the source repository to the - target. - 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. - The svnsync synchronize 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 svnsync get the resulting - response from the source repository's server, it begins - forwarding those revisions to the target repository's server - as new commits. - -$ svnsync help synchronize -synchronize (sync): usage: svnsync synchronize DEST_URL - -Transfer all pending revisions from source to destination. -… -$ svnsync synchronize http://svn.example.com/svn-mirror \ - --username syncuser --password syncpass -Committed revision 1. -Copied properties for revision 1. -Committed revision 2. -Copied properties for revision 2. -Committed revision 3. -Copied properties for revision 3. -… -Committed revision 23406. -Copied properties for revision 23406. -Committed revision 23407. -Copied properties for revision 23407. -Committed revision 23408. -Copied properties for revision 23408. - - 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 syncuser, 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 svnsync 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. - Also noteworthy is that svnsync - 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 svnsync - synchronize 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. - 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, svnsync 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 svnsync copy-revprops - subcommand, which simply re-replicates all the revision - properties for a particular revision. - -$ svnsync help copy-revprops -copy-revprops: usage: svnsync copy-revprops DEST_URL REV - -Copy all revision properties for revision REV from source to -destination. -… -$ svnsync copy-revprops http://svn.example.com/svn-mirror 12 \ - --username syncuser --password syncpass -Copied properties for revision 12. -$ - - 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. - Also, while it isn't very commonplace to do so, - svnsync 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. - As far as user interaction with repositories and mirrors - goes, it is 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: - -$ cat - <<EOF | svnadmin load --force-uuid dest -SVN-fs-dump-format-version: 2 - -UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e -EOF -$ - - Now that the two repositories have the same UUID, you can - use svn switch --relocate to point your - working copy to whichever of the repositories you wish to - operate against, a process which is described in . 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. - Finally, be aware that the revision-based replication - provided by svnsync 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. -
- -
- - Repository Backup - - 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. - 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. - 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 - svnadmin hotcopy command takes care of the - minutia involved in making a hot backup of your repository. - And its invocation is as trivial as Unix's - cp or Windows' copy - operations: - -$ svnadmin hotcopy /var/svn/repos /var/svn/repos-backup - - 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. - When making copies of a Berkeley DB repository, you can - even instruct svnadmin hotcopy to purge any - unused Berkeley DB logfiles (see ) from the - original repository upon completion of the copy. Simply - provide the option on the - command-line. - -$ svnadmin hotcopy --clean-logs /var/svn/bdb-repos /var/svn/bdb-repos-backup - - Additional tooling around this command is available, too. - The tools/backup/ directory of the - Subversion source distribution holds the - hot-backup.py script. This script adds a - bit of backup management atop svnadmin - hotcopy, 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 rotate off 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 - hot-backup.py from a program scheduler - (such as cron on Unix systems) which will - cause it to run nightly (or at whatever granularity of Time - you deem safe). - Some administrators use a different backup mechanism built - around generating and storing repository dump data. We - described in - how to use svnadmin dump --incremental 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 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. - 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. - The svnsync program (see ) 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 - inside the repository's virtual versioned - filesystem are not handled by svnsync. - 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. - svnadmin setlog can be called in a - way that bypasses the hook interface altogether. - 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. - 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. - 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 - hot-backup.py and an offsite - rsync 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 svnsync. 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, - You know—the collective term for all of her - fickle fingers. - it should certainly help you recover from those trying - times. -
-
- - - -
- - Summary - - 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. - 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. -
-
- - - - Server Configuration - - A Subversion repository can be accessed simultaneously by - clients running on the same machine on which the repository - resides using the file:// 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. - 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. - - - -
- - Overview - - 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 repository - access 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. - Apache is an extremely popular webserver; using the - mod_dav_svn 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 for free, such as encrypted - SSL communication, logging, integration with a number of - third-party authentication systems, and limited built-in web - browsing of repositories. - In the other corner is svnserve: 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. - A third option is to use svnserve - tunneled over an SSH connection. Even though this scenario - still uses svnserve, it differs quite a bit - in features from a traditional svnserve - 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 svnserve, which has its own private - user accounts.) Finally, because this setup requires that each - user spawn a private, temporary svnserve - process, it's equivalent (from a permissions point of view) to - allowing a group of local users to all access the repository - via file:// URLs. Path-based access control - has no meaning, since each user is accessing the repository - database files directly. - Here's a quick summary of the three typical server - deployments. - - - Comparison of Subversion Server Options - - - - - Feature - Apache + mod_dav_svn - svnserve - svnserve over SSH - - - - - Authentication options - HTTP(S) basic auth, X.509 certificates, LDAP, NTLM, or - any other mechanism available to Apache httpd - CRAM-MD5 by default; LDAP, NTLM, or any other mechanism - available to SASL - SSH - - - User account options - private 'users' file, or other mechanisms - available to Apache httpd (LDAP, SQL, etc.) - private 'users' file, or other mechanisms available - to SASL (LDAP, SQL, etc.) - system accounts - - - Authorization options - read/write access can be granted over whole - repository, or specified per-path. - read/write access can be granted over whole - repository, or specified per-path. - read/write access only grantable over whole - repository - - - Encryption - via optional SSL - via optional SASL features - SSH tunneled - - - Logging - full Apache logs of each HTTP request, with - optional high-level logging of general - client operations - no logging - no logging - - - Interoperability - partially usable by other WebDAV clients - only talks to svn clients - only talks to svn clients - - - Web viewing - limited built-in support, or via 3rd-party tools - such as ViewVC - only via 3rd-party tools such as ViewVC - only via 3rd-party tools such as ViewVC - - - Speed - somewhat slower - somewhat faster - somewhat faster - - - Initial setup - somewhat complex - extremely simple - moderately simple - - - -
-
-
- - Choosing a Server Configuration - - So, which server should you use? Which is best? - 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 official than another. - Here are some reasons why you might choose one deployment - over another, as well as reasons you - might not choose one. -
- - The <command>svnserve</command> Server - - - - Why you might want to use it: - - - - Quick and easy to set - up. - - - Network protocol is stateful and - noticeably faster than WebDAV. - - - No need to create system accounts on - server. - - - Password is not passed over the - network. - - - - - - Why you might want to avoid it: - - - - 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.) - - - No logging of any kind, not even - errors. - - - No built-in web browsing. (You'd have to - install a separate web server and some CGI software to - add this.) - - - - - -
-
- - <command>svnserve</command> over SSH - - - - Why you might want to use it: - - - - Network protocol is stateful and - noticeably faster than WebDAV. - - - You can take advantage of existing ssh - accounts and user infrastructure. - - - All network traffic is - encrypted. - - - - - - Why you might want to avoid it: - - - - Only one choice of authentication - method. - - - No logging of any kind, not even - errors. - - - Requires users to be in same system group, or - use a shared ssh key. - - - If used improperly, can lead to file permissions - problems. - - - - - -
-
- - The Apache HTTP Server - - - - Why you might want to use it: - - - - Allows Subversion to use any of the - numerous authentication systems already integrated - with Apache. - - - No need to create system accounts on - server. - - - Full Apache logging. - - - Network traffic can be encrypted via - SSL. - - - HTTP(S) can usually go through corporate - firewalls. - - - Built-in repository browsing via web - browser. - - - Repository can be mounted as a network - drive for transparent version control. (See - .) - - - - - - Why you might want to avoid it: - - - - Noticeably slower than svnserve, because - HTTP is a stateless protocol and requires more - turnarounds. - - - Initial setup can be complex. - - - - - -
-
- - Recommendations - - In general, the authors of this book recommend a vanilla - svnserve 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. - Here are some general recommendations and tips, based on - years of supporting users: - - - If you're trying to set up the simplest possible - server for your group, then a - vanilla svnserve 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. - - - 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 svnserve 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. - - - If you've decided to use either Apache or stock - svnserve, create a - single svn user on your system and run - the server process as that user. Be sure to make the - repository directory wholly owned by - the svn 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. - - - 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 svnserve 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 svnserve with SASL encryption - instead. - - - Do not be seduced by the simple - idea of having all of your users access a repository - directly via file:// 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 - .) Note - that this is also one of the reasons we warn against - accessing repositories via svn+ssh:// - URLs—from a security standpoint, it's effectively - the same as local users accessing - via file://, and can entail all the - same problems if the administrator isn't careful. - - -
-
- - - -
- - svnserve, a custom server - - The svnserve program is a lightweight - server, capable of speaking to clients over TCP/IP using a - custom, stateful protocol. Clients contact an - svnserve server by using URLs that begin with - the svn:// or svn+ssh:// - scheme. This section will explain the different ways of running - svnserve, how clients authenticate themselves - to the server, and how to configure appropriate access control - to your repositories. - -
- - Invoking the Server - - There are a few different ways to run the - svnserve program: - - - Run svnserve as a - standalone daemon, listening for - requests. - - - Have the Unix inetd daemon - temporarily spawn svnserve whenever a - request comes in on a certain port. - - - Have SSH invoke a - temporary svnserve over an encrypted - tunnel. - - - Run svnserve as a Microsoft - Windows service. - - - -
- - <command>svnserve</command> as Daemon - - The easiest option is to run svnserve - as a standalone daemon process. Use the - option for this: - -$ svnserve -d -$ # svnserve is now running, listening on port 3690 - - When running svnserve in daemon mode, - you can use the and - options to customize the - exact port and hostname to bind to. - Once we successfully start svnserve as - above, it makes every repository on your system available to - the network. A client needs to specify an - absolute path in the repository URL. For - example, if a repository is located at - /var/svn/project1, then a client would - reach it via - svn://host.example.com/var/svn/project1. To - increase security, you can pass the option - to svnserve, which restricts it to - exporting only repositories below that path. For - example: - -$ svnserve -d -r /var/svn -… - - Using the 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: - -$ svn checkout svn://host.example.com/project1 -… - -
- -
- - <command>svnserve</command> via <command>inetd</command> - - If you want inetd to launch the - process, then you need to pass the - () option. In the example, we've shown the - output from running svnserve -i 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 inetd to - start svnserve. - -$ svnserve -i -( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline ) ) ) - - When invoked with the option, - svnserve attempts to speak with a - Subversion client via stdin and - stdout using a custom protocol. This is - the standard behavior for a program being run via - inetd. The IANA has reserved port 3690 - for the Subversion protocol, so on a Unix-like system you can - add lines to /etc/services like these (if - they don't already exist): - -svn 3690/tcp # Subversion -svn 3690/udp # Subversion - - And if your system is using a classic Unix-like - inetd daemon, you can add this line to - /etc/inetd.conf: - -svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i - - Make sure svnowner is a user which has - appropriate permissions to access your repositories. Now, when - a client connection comes into your server on port 3690, - inetd will spawn an - svnserve process to service it. Of course, - you may also want to add to the - configuration line as well, to restrict which repositories are - exported. -
- -
- - <command>svnserve</command> over a Tunnel - - A third way to invoke svnserve is in - tunnel mode, with the - option. This mode assumes that a remote-service program - such as RSH or SSH has - successfully authenticated a user and is now invoking a - private svnserve process as - that user. (Note that you, the user, will - rarely, if ever, have reason to invoke - svnserve with the at - the command line; instead, the SSH daemon - does so for you.) The svnserve program - behaves normally (communicating via - stdin and stdout), - and assumes that the traffic is being automatically - redirected over some sort of tunnel back to the client. - When svnserve 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 file:// URLs. - This option is described in much more detail in - . -
- -
- - <command>svnserve</command> as Windows Service - - If your Windows system is a descendant of Windows NT - (2000, 2003, XP, Vista), then you can - run svnserve as a standard Windows - service. This is typically a much nicer experience than - running it as a standalone daemon with the 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. - You'll need to define the new service using the - command-line tool SC.EXE. Much like - the inetd configuration line, you must - specify an exact invocation of svnserve - for Windows to run at start-up time: - -C:\> sc create svn - binpath= "C:\svn\bin\svnserve.exe --service -r C:\repos" - displayname= "Subversion Server" - depend= Tcpip - start= auto - - This defines a new Windows service - named svn, and which executes a - particular svnserve.exe command when - started (in this case, rooted - at C:\repos.) There are a number of - caveats in the prior example, however. - First, notice that the svnserve.exe - program must always be invoked with - the option. Any other options to - svnserve must then be specified on the - same line, but you cannot add conflicting options such - as , , or . Options such as - or are fine, though. Second, be - careful about spaces when invoking - the SC.EXE command: the - key= value patterns must have no - spaces between key= and exactly one - space before the value. 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 binpath in double-quotes, by escaping - them: - -C:\> sc create svn - binpath= "\"C:\program files\svn\bin\svnserve.exe\" --service -r C:\repos" - displayname= "Subversion Server" - depend= Tcpip - start= auto - - Also note that the word binpath is - misleading—its value is a command - line, not the path to an executable. That's why - you need to surround it with quote marks if it contains - embedded spaces. - 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: - -C:\> net stop svn -C:\> net start svn - - The service can also be uninstalled (i.e. undefined) by - deleting its definition: sc delete svn. - Just be sure to stop the service first! - The SC.EXE program has many other - subcommands and options; run sc /? to - learn more about it. -
-
- -
- - Built-in authentication and authorization - - When a client connects to an svnserve - process, the following things happen: - - - The client selects a specific - repository. - - - The server processes the repository's - conf/svnserve.conf file, and begins to - enforce any authentication and authorization policies it - describes. - - - Depending on the defined policies, - - - the client may be allowed to make requests - anonymously, without ever receiving an authentication - challenge, OR - - - the client may be challenged for - authentication at any time, OR - - - if operating in tunnel - mode, the client will declare itself to be - already externally authenticated (typically by - SSH). - - - - - The svnserve server, by default, only - knows how to send a CRAM-MD5 See RFC - 2195. 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. At no point does the actual password - travel over the network. - If your svnserve 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 - to configure - SASL authentication and encryption. - It's also possible, of course, for the client to be - externally authenticated via a tunnel agent, such as - SSH. 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 . - As you've already guessed, a repository's - svnserve.conf file is the central - mechanism for controlling authentication and authorization - policies. The file has the same format as other configuration - files (see ): section names - are marked by square brackets ([ and - ]), comments begin with hashes - (#), and each section contains - specific variables that can be set (variable = - value). Let's walk through these files and learn how - to use them. - -
- - Create a 'users' file and realm - - For now, the [general] section of the - svnserve.conf 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: - -[general] -password-db = userfile -realm = example realm - - The realm is a name that you define. - It tells clients which sort of authentication - namespace 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 ). The - password-db variable points to a separate - file that contains a list of usernames and passwords, using - the same familiar format. For example: - -[users] -harry = foopassword -sally = barpassword - - The value of password-db can be an - absolute or relative path to the users file. For many - admins, it's easy to keep the file right in the - conf/ area of the repository, alongside - svnserve.conf. 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) svnserve will run - as, restrict read access to the user file as necessary. -
- -
- - Set access controls - - There are two more variables to set in the - svnserve.conf file: they determine what - unauthenticated (anonymous) and authenticated users are - allowed to do. The variables anon-access - and auth-access can be set to the values - none, read, or - write. Setting the value to - none prohibits both reading and writing; - read allows read-only access to the - repository, and write allows complete - read/write access to the repository. For example: - -[general] -password-db = userfile -realm = example realm - -# anonymous users can only read the repository -anon-access = read - -# authenticated users can both read and write -auth-access = write - - 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: - -[general] -password-db = userfile -realm = example realm - -# anonymous users aren't allowed -anon-access = none - -# authenticated users can both read and write -auth-access = write - - The server process not only understands - these blanket 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 authz-db variable to point to it: - -[general] -password-db = userfile -realm = example realm - -# Specific access rules for specific locations -authz-db = authzfile - - The syntax of the authzfile file is - discussed in detail in - . Note - that the authz-db variable isn't mutually - exclusive with the anon-access - and auth-access variables; if all the - variables are defined at once, then all - of the rules must be satisfied before access is allowed. -
-
- -
- - Using <command>svnserve</command> with SASL - - For many teams, the built-in CRAM-MD5 authentication is - all they need from svnserve. 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. - - - What is SASL? - - 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 svnserve server - and svn 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. - You can download Cyrus SASL (both code and - documentation) from - http://asg.web.cmu.edu/sasl/sasl-library.html. - - Normally, when a subversion client connects - to svnserve, 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 - ). 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. -
- - Authenticating with SASL - - To activate specific SASL mechanisms on the server, you'll - need to do two things. First, create - a [sasl] section in your - repository's svnserve.conf file, with - this key-value pair: - - use-sasl = true - - Second, create a file - called subversion.conf 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 /usr/lib/sasl2/ - or /etc/sasl2/. (Note that this - is not - the svnserve.conf file that lives - within a repository!) - On a Windows server, you'll have to also edit the - registry (using a tool like regedit) to - tell SASL where to find things. Create a registry key - named [HKEY_LOCAL_MACHINE\SOFTWARE\Carnegie - Mellon\Project Cyrus\SASL Library], and place two - keys inside it: a key called SearchPath - (whose value is a path containing the - SASL .dll plugins), and a key - called ConfFile (whose value is a path - containing the subversion.conf - file.) - 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 doc/ 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 subversion.conf - contains: - -pwcheck_method: auxprop -auxprop_plugin: sasldb -mech_list: DIGEST-MD5 - - ...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 /etc/sasldb2). A system - administrator can then use - the saslpasswd2 program to add or modify - usernames and passwords in the database: - -$ saslpasswd2 -c -u realm username - - A few words of warning: first, make sure that the - "realm" argument to saslpasswd2 matches - the same "realm" you've defined in your - repository's svnserve.conf 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 svnserve program has read access to - the file (and possibly write access as well, if you're using - a mechanism such as OTP.) - 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. - 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 (my clients must all use - Kerberos!). 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. -
-
- - SASL Encryption - - 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 svnserve.conf file: - -[sasl] -use-sasl = true -min-encryption = 128 -max-encryption = 256 - - The min-encryption - and max-encryption 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. -
-
- -
- - Tunneling over SSH - - svnserve'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 SSH into the server machine. - It's easy to use SSH in conjunction with - svnserve. The client simply uses the - svn+ssh:// URL scheme to connect: - -$ whoami -harry - -$ svn list svn+ssh://host.example.com/repos/project -harry@host.example.com's password: ***** - -foo -bar -baz -… - - In this example, the Subversion client is invoking a local - ssh process, connecting to - host.example.com, authenticating as the - user harry, then spawning a private - svnserve process on the remote machine - running as the user harry. The - svnserve command is being invoked in tunnel - mode () and its network protocol is being - tunneled over the encrypted connection by - ssh, the tunnel-agent. - svnserve is aware that it's running as the - user harry, and if the client performs a - commit, the authenticated username will be used as the - author of the new revision. - The important thing to understand here is that the - Subversion client is not connecting to a - running svnserve daemon. This method of - access doesn't require a daemon, nor does it notice one if - present. It relies wholly on the ability of - ssh to spawn a temporary - svnserve process, which then terminates - when the network connection is closed. - When using svn+ssh:// URLs to access a - repository, remember that it's the ssh - program prompting for authentication, and - not the svn client - program. That means there's no automatic password caching - going on (see ). 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 - svn+ssh:// URLs, however, users may be - annoyed by ssh repeatedly asking for a - password for every outbound connection. The solution is to - use a separate SSH password-caching tool like - ssh-agent on a Unix-like system, or - pageant on Windows. - 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 - file:// 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 .) But even in the case of - tunneling, the svnserve.conf file can - still be used to block access, by simply setting - auth-access = read or auth-access - = none. - Note that using any sort - of svnserve-enforced access control at - all is a bit pointless; the user already has direct access to - the repository database. - - 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 config - file (see ). For example, - suppose you want to use RSH instead of SSHWe - don't actually recommend this, since RSH is notably less - secure than SSH.. In the - [tunnels] section of your - config file, simply define it like - this: - -[tunnels] -rsh = rsh - - And now, you can use this new tunnel definition by using a - URL scheme that matches the name of your new variable: - svn+rsh://host/path. When using the new - URL scheme, the Subversion client will actually be running the - command rsh host svnserve -t behind the - scenes. If you include a username in the URL (for example, - svn+rsh://username@host/path) the client - will also include that in its command (rsh - username@host svnserve -t). But you can define new - tunneling schemes to be much more clever than that: - -[tunnels] -joessh = $JOESSH /opt/alternate/ssh -p 29934 - - 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 - /opt/alternate/ssh) with specific - options. In this case, accessing a - svn+joessh:// URL would invoke the - particular SSH binary with as - arguments—useful if you want the tunnel program to - connect to a non-standard port. - Second, it shows how to define a custom environment - variable that can override the name of the tunneling program. - Setting the SVN_SSH 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 JOESSH environment variable, its value - would override the entire value of the tunnel - variable—$JOESSH would be executed - instead of /opt/alternate/ssh -p - 29934. -
- -
- - SSH configuration tricks - - It's not only possible to control the way in which the - client invokes ssh, but also to control - the behavior of sshd on your server - machine. In this section, we'll show how to control the - exact svnserve command executed - by sshd, as well as how to have multiple - users share a single system account. - -
- - Initial setup - - To begin, locate the home directory of the account - you'll be using to launch svnserve. 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 authorized_keys file. - If it doesn't already exist, create the - authorized_keys file (on Unix, - typically ~/.ssh/authorized_keys). - Each line in this file describes a public key that is - allowed to connect. The lines are typically of the - form: - - ssh-dsa AAAABtce9euch… user@example.com - - 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 command - field: - - command="program" ssh-dsa AAAABtce9euch… user@example.com - - When the command field is set, the - SSH daemon will run the named program instead of the - typical svnserve -t 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: - - command="program" TYPE KEY COMMENT - -
- -
- - Controlling the invoked command - - Because we can specify the executed server-side command, - it's easy to name a specific svnserve - binary to run and to pass it extra arguments: - - command="/path/to/svnserve -t -r /virtual/root" TYPE KEY COMMENT - - In this example, /path/to/svnserve - might be a custom wrapper script - around svnserve which sets the umask (see - ). It also shows how to - anchor svnserve in a virtual root - directory, just as one often does when - running svnserve 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 svn+ssh:// - URL. - 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 authorized_users file, one per - line, and use the - option: - - command="svnserve -t --tunnel-user=harry" TYPE1 KEY1 harry@example.com - command="svnserve -t --tunnel-user=sally" TYPE2 KEY2 sally@example.com - - 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 - tells svnserve -t to assume that the named - argument is the authenticated user. Without - , it would appear as though - all commits were coming from the one shared system - account. - 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 command value - in authorized_keys. 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 command: - - command="svnserve -t --tunnel-user=harry",no-port-forwarding,\ - no-agent-forwarding,no-X11-forwarding,no-pty \ - TYPE1 KEY1 harry@example.com - -
-
-
- - - -
- - httpd, the Apache HTTP server - - The Apache HTTP Server is a heavy duty - network server that Subversion can leverage. Via a custom - module, httpd makes Subversion repositories - available to clients via the WebDAV/DeltaV protocol, which is an - extension to HTTP 1.1 (see http://www.webdav.org/ - 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. - They really hate doing that. - While an Apache-Subversion server has more features than - svnserve, it's also a bit more difficult - to set up. With flexibility often comes more complexity. - 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 - http://httpd.apache.org. For example, a general - reference for the configuration directives is located at http://httpd.apache.org/docs-2.0/mod/directives.html. - 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 httpd.conf - file are directives that specify the on-disk locations of the - access and error logs generated by Apache (the - CustomLog and ErrorLog - 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. - - - Why Apache 2? - - 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. - 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: - -$ svn checkout http://host.example.com:7382/repos/project -… - - - -
- - Prerequisites - - To network your repository over HTTP, you basically need - four components, available in two packages. You'll need - Apache httpd 2.0, the - mod_dav DAV module that comes with it, - Subversion, and the mod_dav_svn - filesystem provider module distributed with Subversion. - Once you have all of those components, the process of - networking your repository is as simple as: - - - getting httpd 2.0 up and running with the mod_dav - module, - - - installing the mod_dav_svn plugin to mod_dav, which - uses Subversion's libraries to access the repository, - and - - - configuring your httpd.conf - file to export (or expose) the repository. - - - You can accomplish the first two items either by - compiling httpd 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 INSTALL file in - the top level of the Subversion source code tree. -
- -
- - Basic Apache Configuration - - Once you have all the necessary components installed on - your system, all that remains is the configuration of Apache - via its httpd.conf file. Instruct Apache - to load the mod_dav_svn module using the - LoadModule directive. This directive must - precede any other Subversion-related configuration items. If - your Apache was installed using the default layout, your - mod_dav_svn module should have been - installed in the modules subdirectory of - the Apache install location (often - /usr/local/apache2). The - LoadModule directive has a simple syntax, - mapping a named module to the location of a shared library on - disk: - -LoadModule dav_svn_module modules/mod_dav_svn.so - - Note that if mod_dav was compiled as a - shared object (instead of statically linked directly to the - httpd binary), you'll need a similar - LoadModule statement for it, too. Be sure - that it comes before the mod_dav_svn line: - -LoadModule dav_module modules/mod_dav.so -LoadModule dav_svn_module modules/mod_dav_svn.so - - At a later location in your configuration file, you now - need to tell Apache where you keep your Subversion repository - (or repositories). The Location 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 - Location 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 - /repos/ to a DAV provider whose - repository is located at - /var/svn/repository using the - following httpd.conf syntax: - -<Location /repos> - DAV svn - SVNPath /var/svn/repository -</Location> - - 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 - SVNParentPath directive, to indicate that - common parent directory. For example, if you know you will be - creating multiple Subversion repositories in a directory - /var/svn that would be accessed via - URLs like http://my.server.com/svn/repos1, - http://my.server.com/svn/repos2, and - so on, you could use the httpd.conf - configuration syntax in the following example: - -<Location /svn> - DAV svn - - # any "/svn/foo" URL will map to a repository /var/svn/foo - SVNParentPath /var/svn -</Location> - - Using the previous syntax, Apache will delegate the - handling of all URLs whose path portions begin with - /svn/ to the Subversion DAV provider, - which will then assume that any items in the directory - specified by the SVNParentPath directive - are actually Subversion repositories. This is a particularly - convenient syntax in that, unlike the use of the - SVNPath directive, you don't have to - restart Apache in order to create and network new - repositories. - Be sure that when you define your new - Location, it doesn't overlap with other - exported Locations. For example, if your main - DocumentRoot is exported to - /www, do not export a Subversion - repository in <Location /www/repos>. - If a request comes in for the URI - /www/repos/foo.c, Apache won't know - whether to look for a file repos/foo.c in - the DocumentRoot, or whether to delegate - mod_dav_svn to return - foo.c from the Subversion repository. - The result is often an error from the server of the form - 301 Moved Permanently. - - - Server Names and the COPY Request - - Subversion makes use of the COPY - 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 ServerName directive in - httpd.conf to accomplish this. - -ServerName svn.example.com - - If you are using Apache's virtual hosting support via - the NameVirtualHost directive, you may - need to use the ServerAlias directive to - specify additional names that your server is known by. - Again, refer to the Apache documentation for full - details. - - 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. - 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 - User and Group - directives in httpd.conf 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. -
- -
- - Authentication Options - - At this point, if you configured - httpd.conf to contain something like - -<Location /svn> - DAV svn - SVNParentPath /var/svn -</Location> - - …then your repository is anonymously - accessible to the world. Until you configure some - authentication and authorization policies, the Subversion - repositories you make available via the - Location directive will be generally - accessible to everyone. In other words, - - - anyone can use their Subversion client to check out a - working copy of a repository URL (or any of its - subdirectories), - - - anyone can interactively browse the repository's - latest revision simply by pointing their web browser to - the repository URL, and - - - anyone can commit to the repository. - - - Of course, you might have already set up - a pre-commit hook script to prevent - commits (see ). - 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. - -
- - Basic HTTP Authentication - - 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 htpasswd - 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. - -$ ### First time: use -c to create the file -$ ### Use -m to use MD5 encryption of the password, which is more secure -$ htpasswd -cm /etc/svn-auth-file harry -New password: ***** -Re-type new password: ***** -Adding password for user harry -$ htpasswd -m /etc/svn-auth-file sally -New password: ******* -Re-type new password: ******* -Adding password for user sally -$ - - Next, you need to add some more - httpd.conf directives inside your - Location block to tell Apache what to do - with your new password file. The - AuthType directive specifies the type of - authentication system to use. In this case, we want to - specify the Basic authentication system. - AuthName 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 AuthUserFile directive to specify - the location of the password file you created using - htpasswd. - After adding these three directives, your - <Location> block should look - something like this: - -<Location /svn> - DAV svn - SVNParentPath /var/svn - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /etc/svn-auth-file -</Location> - - This <Location> 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 which 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 Require valid-user - tells Apache that all requests require an authenticated - user: - -<Location /svn> - DAV svn - SVNParentPath /var/svn - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /etc/svn-auth-file - Require valid-user -</Location> - - Be sure to read the next section () for more detail on the - Require directive and other ways to set - authorization policies. - 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 https:// - instead of http://; at a bare minimum, - you can configure Apache to use a self-signed server - certificate. - While self-signed server certificates are still - vulnerable to a man in the middle attack, - such an attack is much more difficult for a casual - observer to pull off, compared to sniffing unprotected - passwords. - Consult Apache's documentation (and OpenSSL documentation) - about how to do that. -
- -
- - SSL Certificate Management - - Businesses that need to expose their repositories for access - outside the company firewall should be conscious of the - possibility that unauthorized parties could be - sniffing their network traffic. SSL makes - that kind of unwanted attention less likely to result in - sensitive data leaks. - If a Subversion client is compiled to use OpenSSL, then - it gains the ability to speak to an Apache server via - https:// 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. - 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 - can be covered here is how to manage - server and client certificates from an ordinary Subversion - client. - When speaking to Apache via https://, - a Subversion client can receive two different types of - information: - - - a server certificate - - - a demand for a client certificate - - - 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 - certifying authority (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: - -$ svn list https://host.example.com/repos/project - -Error validating server certificate for 'https://host.example.com:443': - - The certificate is not issued by a trusted authority. Use the - fingerprint to validate the certificate manually! -Certificate information: - - Hostname: host.example.com - - Valid: from Jan 30 19:23:56 2004 GMT until Jan 30 19:23:56 2006 GMT - - Issuer: CA, example.com, Sometown, California, US - - Fingerprint: 7d:e1:a9:34:33:39:ba:6a:e9:a5:c4:22:98:7b:76:5c:92:a0:9c:7b - -(R)eject, accept (t)emporarily or accept (p)ermanently? - - 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 - auth/ area in just the same way your - username and password are cached (see ). If cached, - Subversion will automatically trust this certificate - in future negotiations. - Your run-time servers 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 ssl-authority-files - variable to a semicolon-separated list of PEM-encoded CA - certificates: - -[global] -ssl-authority-files = /path/to/CAcert1.pem;/path/to/CAcert2.pem - - Many OpenSSL installations also have a pre-defined set - of default CAs that are nearly universally - trusted. To make the Subversion client automatically trust - these standard authorities, set the - ssl-trust-default-ca variable to - true. - 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: - -$ svn list https://host.example.com/repos/project - -Authentication realm: https://host.example.com:443 -Client certificate filename: /path/to/my/cert.p12 -Passphrase for '/path/to/my/cert.p12': ******** -… - - Notice that the client certificate is a - p12 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. - Again, the runtime servers file - allows you to automate this challenge on a per-host basis. - Either or both pieces of information can be described in - runtime variables: - -[groups] -examplehost = host.example.com - -[examplehost] -ssl-client-cert-file = /path/to/my/cert.p12 -ssl-client-cert-password = somepassword - - Once you've set the - ssl-client-cert-file and - ssl-client-cert-password variables, the - Subversion client can automatically respond to a client - certificate challenge without prompting you. - More security-conscious folk might not want to store - the client certificate password in the runtime - servers file. - -
-
- -
- - Authorization Options - - 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. - -
- - Blanket Access Control - - 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. - You can restrict access on all repository operations by - adding the Require valid-user directive - to your <Location> block. Using - our previous example, this would mean that only clients that - claimed to be either harry or - sally, and provided the correct - password for their respective username, would be allowed to - do anything with the Subversion repository: - -<Location /svn> - DAV svn - SVNParentPath /var/svn - - # how to authenticate a user - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /path/to/users/file - - # only authenticated users may access the repository - Require valid-user -</Location> - - Sometimes you don't need to run such a tight ship. For - example, Subversion's own source code repository at - http://svn.collab.net/repos/svn 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 Limit and - LimitExcept configuration directives. - Like the Location directive, these blocks - have starting and ending tags, and you would nest them - inside your <Location> - block. - The parameters present on the Limit - and LimitExcept 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 LimitExcept directive, - passing the GET, - PROPFIND, OPTIONS, and - REPORT request type parameters. Then the - previously mentioned Require valid-user - directive would be placed inside the - <LimitExcept> block instead of just - inside the <Location> block. - -<Location /svn> - DAV svn - SVNParentPath /var/svn - - # how to authenticate a user - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /path/to/users/file - - # For any operations other than these, require an authenticated user. - <LimitExcept GET PROPFIND OPTIONS REPORT> - Require valid-user - </LimitExcept> -</Location> - - These are only a few simple examples. For more in-depth - information about Apache access control and the - Require directive, take a look at the - Security section of the Apache - documentation's tutorials collection at http://httpd.apache.org/docs-2.0/misc/tutorials.html. -
- -
- - Per-Directory Access Control - - It's possible to set up finer-grained permissions using - a second Apache httpd module, - mod_authz_svn. This module grabs the - various opaque URLs passing from client to server, asks - mod_dav_svn to decode them, and then - possibly vetoes requests based on access policies defined in - a configuration file. - If you've built Subversion from source code, - mod_authz_svn is automatically built - and installed alongside mod_dav_svn. - Many binary distributions install it automatically as well. - To verify that it's installed correctly, make sure it comes - right after mod_dav_svn's - LoadModule directive in - httpd.conf: - -LoadModule dav_module modules/mod_dav.so -LoadModule dav_svn_module modules/mod_dav_svn.so -LoadModule authz_svn_module modules/mod_authz_svn.so - - To activate this module, you need to configure your - Location block to use the - AuthzSVNAccessFile 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.) - 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.) - The simplest block is to allow open access to everyone. - In this scenario, Apache never sends authentication - challenges, so all users are treated as - anonymous. - - - A sample configuration for anonymous access. - - -<Location /repos> - DAV svn - SVNParentPath /var/svn - - # our access control policy - AuthzSVNAccessFile /path/to/access/file -</Location> - - - 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 - Require valid-user directive, and defines - a means to authenticate. - - - A sample configuration for authenticated access. - - -<Location /repos> - DAV svn - SVNParentPath /var/svn - - # our access control policy - AuthzSVNAccessFile /path/to/access/file - - # only authenticated users may access the repository - Require valid-user - - # how to authenticate a user - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /path/to/users/file -</Location> - - - 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 Satisfy Any - and Require valid-user directives - together. - - - A sample configuration for mixed - authenticated/anonymous access. - - -<Location /repos> - DAV svn - SVNParentPath /var/svn - - # our access control policy - AuthzSVNAccessFile /path/to/access/file - - # try anonymous access first, resort to real - # authentication if necessary. - Satisfy Any - Require valid-user - - # how to authenticate a user - AuthType Basic - AuthName "Subversion repository" - AuthUserFile /path/to/users/file -</Location> - - - Once you've settled on one of these three - basic httpd.conf templates, you need to - create your file containing access rules for particular - paths within the repository. This is described in - . -
- -
- - Disabling Path-based Checks - - The mod_dav_svn module goes through a - lot of work to make sure that data you've marked - unreadable doesn't get accidentally leaked. - This means that it needs to closely monitor all of the paths - and file-contents returned by commands like svn - checkout or svn update - 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 - svn cat -r OLD foo.c 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. - All of this path-checking can sometimes be quite - expensive, especially in the case of svn - log. 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), - 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 - mod_authz_svn at all, the - mod_dav_svn module is still asking Apache - httpd to run authorization checks on - every path. The mod_dav_svn module has - no idea what authorization modules have been installed, so - all it can do is ask Apache to invoke whatever might be - present. - 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 - mod_authz_svn or similar module), then - you can disable all of this path-checking. In your - httpd.conf file, use the - SVNPathAuthz directive: - - - Disabling path checks altogether - - -<Location /repos> - DAV svn - SVNParentPath /var/svn - - SVNPathAuthz off -</Location> - - - The SVNPathAuthz directive is on by - default. When set off, all path-based - authorization checking is disabled; - mod_dav_svn stops invoking authorization - checks on every path it discovers. -
-
- -
- - Extra Goodies - - 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. - -
- - Repository Browsing - - 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 GET 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. - 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. - - - Can I view older revisions? - - With an ordinary web browser? In one word: nope. At - least, not with mod_dav_svn as your - only tool. - 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 discover 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. - So to answer the question, one obvious way to see - older revisions of files and directories is by passing the - argument to - the svn list and svn - cat commands. To browse old revisions with your - web browser, however, you can use third-party software. A - good example of this is ViewVC - (http://viewvc.tigris.org/). ViewVC was - originally written to display CVS repositories through the - web, - Back then, it was called ViewCVS. - and the latest releases are able to understand Subversion - repositories as well. - -
- - Proper MIME Type - - When browsing a Subversion repository, the web browser - gets a clue about how to render a file's contents by - looking at the Content-Type: header - returned in Apache's response to the - HTTP GET 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 default MIME type, - typically text/plain. 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 foo.html file - in the repository actually render as HTML when - browsing. - To make this happen, you only need to make sure that - your files have the - proper svn:mime-type set. This is - discussed in more detail in - , - and you can even configure your client to automatically - attach proper svn:mime-type properties - to files entering the repository for the first time; see - . - So in our example, if one were to set - the svn:mime-type property - to text/html on - file foo.html, then Apache would - properly tell your web browser to render the file as - HTML. One could also attach - proper image/* 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. -
-
- - Customizing the Look - - 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 SVNIndexXSLT directive in your - repository's Location block of - httpd.conf will instruct mod_dav_svn - to generate XML output when displaying a directory - listing, and to reference the XSLT stylesheet of your - choice: - -<Location /svn> - DAV svn - SVNParentPath /var/svn - SVNIndexXSLT "/svnindex.xsl" - … -</Location> - - Using the SVNIndexXSLT 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 tools/xslt/ directory. - Keep in mind that the path provided to the - SVNIndexXSLT directory is actually a URL - path—browsers need to be able to read your - stylesheets in order to make use of them! -
-
- - Listing Repositories - - If you're serving a collection of repositories from a - single URL via the SVNParentPath - directive, then it's also possible to have Apache display - all available repositories to a web browser. Just - activate the SVNListParentPath - directive: - -<Location /svn> - DAV svn - SVNParentPath /var/svn - SVNListParentPath on - … -</Location> - - If a user now points her web browser to the - URL http://host.example.com/svn/, she'll - see list of all Subversion repositories sitting - in /var/svn. Obviously, this can - be a security problem, so this feature is turned off by - default. -
-
- -
- - Apache Logging - - 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 httpd.conf file will cause - Apache to produce two logs: - error_log - and access_log. 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 /usr/local/apache2/logs/.) - The error_log describes any internal - errors that Apache runs into as it works. - The access_log 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. - 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 access_log and deduce what the - client was doing—most operations look like a series - of cryptic PROPPATCH, GET, - PUT, and REPORT - requests. To make things worse, many client operations send - nearly-identical series of requests, so it's even harder to - tell them apart. - mod_dav_svn, however, can come to - your aid. By activating an operational - logging feature, you can - ask mod_dav_svn to create a separate log - file describing what sort of high-level operations your - clients are performing. - To do this, you need to make use of - Apache's CustomLog directive (which is - explained in more detail in Apache's own documentation). - Be sure to invoke this - directive outside of your - Subversion Location block: - -<Location /svn> - DAV svn - … -</Location> - -CustomLog logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION - - In this example, we're asking Apache to create a special - logfile svn_logfile in the standard - Apache logs directory. - The %t and %u - variables are replaced by the time and username of the - request, respectively. The really important part are the - two instances of SVN-ACTION. - When Apache sees that variable, it substitutes the value of - the SVN-ACTION environment variable, - which is automatically set by mod_dav_svn - whenever it detects a high-level client action. - So instead of having to interpret a - traditional access_log like - this: - -[26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1" 207 398 -[26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1" 207 449 -[26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc HTTP/1.1" 207 647 -[26/Jan/2007:22:25:29 -0600] "REPORT /svn/calc/!svn/vcc/default HTTP/1.1" 200 607 -[26/Jan/2007:22:25:31 -0600] "OPTIONS /svn/calc HTTP/1.1" 200 188 -[26/Jan/2007:22:25:31 -0600] "MKACTIVITY /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1" 201 227 -… - - … you can instead peruse a much more - intelligible svn_logfile like this: - -[26/Jan/2007:22:24:20 -0600] - list-dir '/' -[26/Jan/2007:22:24:27 -0600] - update '/' -[26/Jan/2007:22:25:29 -0600] - remote-status '/' -[26/Jan/2007:22:25:31 -0600] sally commit r60 - -
- -
- - Other Features - - 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 https://. - 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. - Finally, because mod_dav_svn 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 . -
-
-
- - - -
- - Path-Based Authorization - - Both Apache and svnserve 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. - Both servers use a common file format to describe these - path-based access rules. In the case of Apache, one needs to - load the mod_authz_svn module and then add - the AuthzSVNAccessFile directive (within - the httpd.conf file) pointing to your own - rules-file. (For a full explanation, see - .) If - you're using svnserve, then you need to make - the authz-db variable - (within svnserve.conf) point to your - rules-file. - - - Do you really need path-based access control? - - 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. - 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 shouldn't 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. - 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. - 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 sounds good 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.A common theme in - this book!. - 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 are - 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. - - Once your server knows where to find your rules-file, it's - time to define the rules. - The syntax of the file is the same familiar one used - by svnserve.conf and the runtime - configuration files. Lines that start with a hash - (#) 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 - r (read-only) or rw - (read-write). If the user is not mentioned at all, no access is - allowed. - To be more specific: the value of the section-names are - either of the form [repos-name:path] or the - form [path]. If you're using the - SVNParentPath directive, then it's important - to specify the repository names in your sections. If you omit - them, then a section like - [/some/dir] will match the path - /some/dir in every - repository. If you're using the SVNPath - directive, however, then it's fine to only define paths in your - sections—after all, there's only one repository. - -[calc:/branches/calc/bug-142] -harry = rw -sally = r - - In this first example, the user harry has - full read and write access on the - /branches/calc/bug-142 directory in the - calc repository, but the user - sally has read-only access. Any other users - are blocked from accessing this directory. - 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: - -[calc:/branches/calc/bug-142] -harry = rw -sally = r - -# give sally write access only to the 'testing' subdir -[calc:/branches/calc/bug-142/testing] -sally = rw - - Now Sally can write to the testing - subdirectory of the branch, but can still only read other parts. - Harry, meanwhile, continues to have complete read-write access - to the whole branch. - It's also possible to explicitly deny permission to someone - via inheritance rules, by setting the username variable to - nothing: - -[calc:/branches/calc/bug-142] -harry = rw -sally = r - -[calc:/branches/calc/bug-142/secret] -harry = - - In this example, Harry has read-write access to the - entire bug-142 tree, but has absolutely no - access at all to the secret subdirectory - within it. - 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. - 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 (*), which means all - users: - -[/] -* = r - - 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 - rw permission to certain users on specific - subdirectories within specific repositories. - The asterisk variable (*) is also worth - special mention here: it's the - only 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 - * value defined for the path being accessed; - if it can't find one, then it demands real authentication from - the client. - The access file also allows you to define whole groups of - users, much like the Unix /etc/group - file: - -[groups] -calc-developers = harry, sally, joe -paint-developers = frank, sally, jane -everyone = harry, sally, joe, frank, sally, jane - - Groups can be granted access control just like users. - Distinguish them with an at - (@) prefix: - -[calc:/projects/calc] -@calc-developers = rw - -[paint:/projects/paint] -@paint-developers = rw -jane = r - - Groups can also be defined to contain other groups: - -[groups] -calc-developers = harry, sally, joe -paint-developers = frank, sally, jane -everyone = @calc-developers, @paint-developers - - - - - Partial Readability and Checkouts - - 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 svn - checkout. - 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 only 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. - -
- - - -
- - Supporting Multiple Repository Access Methods - - 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. - At any given time, these processes may require read and - write access to your repository: - - - regular system users using a Subversion client (as - themselves) to access the repository directly via - file:// URLs; - - - regular system users connecting to SSH-spawned private - svnserve processes (running as - themselves) which access the repository; - - - an svnserve process—either a - daemon or one launched by - inetd—running as a particular fixed - user; - - - an Apache httpd process, running as a - particular fixed user. - - - 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 svn 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. - 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 svn program into a - wrapper script that first sets umask 002 and - then runs the real svn client program. You - can write a similar wrapper script for the - svnserve program, and add a umask - 002 command to Apache's own startup script, - apachectl. For example: - -$ cat /usr/bin/svn - -#!/bin/sh - -umask 002 -/usr/bin/svn-real "$@" - - - 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 svn 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 db directory. This causes - all newly-created log files to have the same group owner as the - parent directory. - 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. - Fortunately, most repository administrators will never - need to have such a complex configuration. - Users who wish to access repositories that live on the same - machine are not limited to using file:// - access URLs—they can typically contact the Apache HTTP - server or svnserve using - localhost for the server name in their - http:// or svn:// 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! - - - The svn+ssh:// server checklist - - 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: - - - 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. - - - - Make the repository wholly owned by that group. - - - - Set the group permissions to read/write. - - - Your users need to use a sane umask when accessing the - repository, so: make sure that svnserve - (/usr/bin/svnserve, or wherever - it lives in $PATH) is actually a - wrapper script which sets umask 002 and - executes the real svnserve - binary. - - - Take similar measures when using - svnlook and - svnadmin. Either run them with a sane - umask, or wrap them as described above. - - - -
-
- - - - Customizing Your Subversion Experience - - 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. - - - - -
- - Runtime Configuration Area - - 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. - The Subversion configuration area is - a two-tiered hierarchy of option names and their values. - Usually, this boils down to a special directory that contains - configuration files (the first tier), - which are just text files in standard INI format (with - sections 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. - -
- - Configuration Area Layout - - The first time that the svn - command-line client is executed, it creates a per-user - configuration area. On Unix-like systems, this area appears - as a directory named .subversion in the - user's home directory. On Win32 systems, Subversion creates a - folder named Subversion, typically inside - the Application Data 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. - The APPDATA environment variable - points to the Application Data area, - so you can always refer to this folder as - %APPDATA%\Subversion. - We will refer to the per-user configuration area using its Unix - name, .subversion. - 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 svn - program have the final word on behavior. On Unix-like - platforms, the system-wide configuration area is - expected to be the /etc/subversion - directory; on Windows machines, it looks for a - Subversion directory inside the common - Application Data location (again, as - specified by the Windows Registry). Unlike the per-user - case, the svn program does not attempt - to create the system-wide configuration area. - The per-user configuration area currently contains three - files—two configuration files (config and - servers), and a README.txt - 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 svn - command, such as svn --version. A new - configuration directory with the default contents will be - created. - The per-user configuration area also contains a cache of - authentication data. The auth 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. -
- -
- - Configuration and the Windows Registry - - 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 file/section 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. - Subversion looks for system-wide configuration values - under the - HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion - key. For example, the global-ignores option, - which is in the miscellany section of the - config file, would be found at - HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion\Config\Miscellany\global-ignores. - Per-user configuration values should be stored under - HKEY_CURRENT_USER\Software\Tigris.org\Subversion. - - Registry-based configuration options are parsed - before 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: - - - Command-line options - - - The per-user INI files - - - The per-user Registry values - - - The system-wide INI files - - - The system-wide Registry values - - - Also, the Windows Registry doesn't really support the - notion of something being commented out. - However, Subversion will ignore any option key whose name - begins with a hash (#) 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. - The svn 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 REGEDIT - program. Alternatively, you can create a - .reg file, and then double-click on that - file from the Explorer shell, which will cause the data to be - merged into your registry. - - - Sample Registration Entries (.reg) File. - - -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion\Servers\groups] - -[HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion\Servers\global] -"#http-proxy-host"="" -"#http-proxy-port"="" -"#http-proxy-username"="" -"#http-proxy-password"="" -"#http-proxy-exceptions"="" -"#http-timeout"="0" -"#http-compression"="yes" -"#neon-debug-mask"="" -"#ssl-authority-files"="" -"#ssl-trust-default-ca"="" -"#ssl-client-cert-file"="" -"#ssl-client-cert-password"="" - -[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auth] -"#store-passwords"="yes" -"#store-auth-creds"="yes" - -[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\helpers] -"#editor-cmd"="notepad" -"#diff-cmd"="" -"#diff3-cmd"="" -"#diff3-has-program-arg"="" - -[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\tunnels] - -[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\miscellany] -"#global-ignores"="*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store" -"#log-encoding"="" -"#use-commit-times"="" -"#no-unlock"="" -"#enable-auto-props"="" - -[HKEY_CURRENT_USER\Software\Tigris.org\Subversion\Config\auto-props] - - - - The previous example shows the contents of a - .reg 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 (#) character from the - beginning of the option names, and set the values as you - desire. -
- -
- - Configuration Options - - - In this section, we will discuss the specific - run-time configuration options that are currently supported - by Subversion. - -
- - Servers - - The servers file contains - Subversion configuration options related to the network - layers. There are two special section names in this - file—groups and - global. The groups - section is essentially a cross-reference table. The keys in - this section are the names of other sections in the file; - their values are globs—textual - tokens which possibly contain wildcard - characters—that are compared against the hostnames of - the machine to which Subversion requests are sent. - -[groups] -beanie-babies = *.red-bean.com -collabnet = svn.collab.net - -[beanie-babies] -… - -[collabnet] -… - - 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 groups section. If - a match is made, Subversion then looks for a section in the - servers file whose name is the matched - group's name. From that section it reads the actual network - configuration settings. - The global section contains the - settings that are meant for all of the servers not matched - by one of the globs under the groups - 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 - groups section), and are as - follows: - - - - http-proxy-exceptions - - - 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. - - - - - http-proxy-host - - - 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. - - - - - http-proxy-port - - - This specifies the port number on the proxy host - to use. It defaults to an empty value. - - - - - http-proxy-username - - - This specifies the username to supply to the proxy - machine. It defaults to an empty value. - - - - - http-proxy-password - - - This specifies the password to supply to the proxy - machine. It defaults to an empty value. - - - - - http-timeout - - - 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 - 0, which instructs the underlying - HTTP library, Neon, to use its default timeout - setting. - - - - - http-compression - - - This specifies whether or not Subversion should - attempt to compress network requests made to DAV-ready - servers. The default value is yes - (though compression will only occur if that capability - is compiled into the network layer). Set this to - no to disable compression, such as - when debugging network transmissions. - - - - - neon-debug-mask - - - 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 - 0, which will silence all debugging - output. For more information about how Subversion - makes use of Neon, see . - - - - - ssl-authority-files - - - 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. - - - - - ssl-trust-default-ca - - - Set this variable to yes if you - want Subversion to automatically trust the set of - default CAs that ship with OpenSSL. - - - - - ssl-client-cert-file - - - 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. - - - - - ssl-client-cert-password - - - 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 servers file), - then you can set this variable to the certificate's - passphrase. You won't be prompted anymore. - - - -
- -
- - Config - - The config 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. - The auth section contains settings - related to Subversion's authentication and authorization - against the repository. It contains: - - - - store-passwords - - - 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 yes. Set this to - no to disable this on-disk password - caching. You can override this option for a single - instance of the svn command using - the command-line - parameter (for those subcommands that support it). - For more information, see . - - - - - store-auth-creds - - - This setting is the same as - store-passwords, except that it - enables or disables disk-caching of - all authentication information: - usernames, passwords, server certificates, and any - other types of cacheable credentials. - - - - The helpers section controls which - external applications Subversion uses to accomplish its - tasks. Valid options in this section are: - - - - editor-cmd - - - This specifies the program Subversion will use to - query the user for a log message during a commit - operation, such as when using svn - commit without either the - () or - () options. - This program is also used with the svn - propedit 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 ). 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: - - - Command-line option --editor-cmd - - - Environment variable SVN_EDITOR - - - Configuration option editor-cmd - - - Environment variable VISUAL - - - Environment variable EDITOR - - - Possibly, a default value built in to Subversion - (not present in the official builds) - - - The value of any of these options or variables is - (unlike diff-cmd) 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. - - - - - diff-cmd - - - This specifies the absolute path of a differencing - program, used when Subversion generates - diff output (such as when using the - svn diff command). By default - Subversion uses an internal differencing - library—setting this option will cause it to - perform this task using an external program. See - for - more details on using such programs. - - - - - diff3-cmd - - - 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 for more - details on using such programs. - - - - - diff3-has-program-arg - - - This flag should be set to true - if the program specified by the - diff3-cmd option accepts a - command-line - parameter. - - - - The tunnels section allows you to - define new tunnel schemes for use with - svnserve and svn:// - client connections. For more details, see . - The miscellany section is where - everything that doesn't belong elsewhere winds up. - Anyone for potluck dinner? - In this section, you can find: - - - - global-ignores - - - When running the svn status - command, Subversion lists unversioned files and - directories along with the versioned ones, annotating - them with a ? character (see ). 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 - global-ignores 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 *.o *.lo *.la #*# .*.rej *.rej .*~ *~ - .#* .DS_Store. - As well as svn status, the - svn add and svn import - 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 command-line flag. - For information on more fine-grained control of - ignored items, see . - - - - - enable-auto-props - - - This instructs Subversion to automatically set - properties on newly added or imported files. The - default value is no, so set this to - yes to enable Auto-props. - The auto-props section of this file - specifies which properties are to be set on which files. - - - - - log-encoding - - - This variable sets the default character set - encoding for commit log messages. It's a permanent - form of the option (see - ). 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. - - - - - use-commit-times - - - 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 - svn 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. - 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 svn export command - always places these last-commit - timestamps on trees that it produces. By - setting this config variable to - yes, the svn - checkout, svn update, - svn switch, and svn - revert commands will also set last-commit - timestamps on files that they touch. - - - - - The auto-props 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 PATTERN = PROPNAME=PROPVALUE - where PATTERN 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 - override another. You can find several - examples of auto-props usage in the - config file. Lastly, don't - forget to set enable-auto-props to - yes in the miscellany - section if you want to enable auto-props. -
-
-
- - - -
- - Localization - - Localization 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 localized. This section describes - steps Subversion has made towards localization. - -
- - Understanding locales - - Most modern operating systems have a notion of the - current locale—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. - On most Unix-like systems, you can check the values of the - locale-related runtime configuration options by running the - locale command: - -$ locale -LANG= -LC_COLLATE="C" -LC_CTYPE="C" -LC_MESSAGES="C" -LC_MONETARY="C" -LC_NUMERIC="C" -LC_TIME="C" -LC_ALL="C" - - 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 C - locale, but users can set these variables to specific - country/language code combinations. For example, if one were - to set the LC_TIME variable to - fr_CA, 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 LC_MESSAGES variable to - zh_TW, then programs would know to present - human-readable messages in Traditional Chinese. Setting the - LC_ALL variable has the effect of changing - every locale variable to the same value. The value of - LANG 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 locale - -a. - On Windows, locale configuration is done via the - Regional and Language Options 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. -
- -
- - Subversion's use of locales - - The Subversion client, svn, honors the - current locale configuration in two ways. First, it notices - the value of the LC_MESSAGES variable and - attempts to print all messages in the specified language. For - example: - -$ export LC_MESSAGES=de_DE -$ svn help cat -cat: Gibt den Inhalt der angegebenen Dateien oder URLs aus. -Aufruf: cat ZIEL[@REV]... -… - - 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 .mo filename - extension. For example, the German translation file is named - de.mo. These translation files are - installed somewhere on your system. On Unix, they typically - live in /usr/share/locale/, while - on Windows they're often found in the - \share\locale\ folder in Subversion's - installation area. Once installed, a module is named after - the program it provides translations for. For example, the - de.mo file may ultimately end up - installed as - /usr/share/locale/de/LC_MESSAGES/subversion.mo. - By browsing the installed .mo files, you - can see which languages the Subversion client is able to - speak. - The second way in which the locale is honored involves how - svn interprets your input. The repository - stores all paths, filenames, and log messages in Unicode, - encoded as UTF-8. In that sense, the repository is - internationalized—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. - For example, suppose you create a file named - caffè.txt, and then when committing the - file, you write the log message as Adesso il caffè è - più forte. Both the filename and log message contain - non-ASCII characters, but because your locale is set to - it_IT, 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. - Note that while the repository demands UTF-8 filenames and - log messages, it does not 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. - - - Character set conversion errors - - While using Subversion, you might get hit with an error - related to character set conversions: - -svn: Can't convert string from native encoding to 'UTF-8': -… -svn: Can't convert string from 'UTF-8' to native encoding: -… - - 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 en_US but a collaborator - has committed a Japanese filename, you're likely to see this - error when you receive the file during an svn - update. - The solution is either to set your locale to something - which can 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.) - -
-
- - - -
- - Using External Differencing Tools - - The presence of and - options, and similarly named - runtime configuration parameters (see ), can lead to a - false notion of how easy it is to use external differencing (or - diff) 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. - 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 - diff and diff3 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, - Subversion developers are good, but even the best make - mistakes. - the and - 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. - 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. - 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. - - 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 - svn:mime-type 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 - application/msword). For more about MIME - type settings, see - - -
- - External diff - - 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 backgrounded), - 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. - The GNU diff manual page puts it this way: An - exit status of 0 means no differences were found, 1 means some - differences were found, and 2 means trouble. - - - and - are templates for external diff tool wrappers in the Bourne - shell and Windows batch scripting languages, - respectively. - - - diffwrap.sh - - -#!/bin/sh - -# Configure your favorite diff program here. -DIFF="/usr/local/bin/my-diff-tool" - -# Subversion provides the paths we need as the sixth and seventh -# parameters. -LEFT=${6} -RIGHT=${7} - -# Call the diff command (change the following line to make sense for -# your merge program). -$DIFF --left $LEFT --right $RIGHT - -# Return an errorcode of 0 if no differences were detected, 1 if some were. -# Any other errorcode will be treated as fatal. - - - - - diffwrap.bat - - -@ECHO OFF - -REM Configure your favorite diff program here. -SET DIFF="C:\Program Files\Funky Stuff\My Diff Tool.exe" - -REM Subversion provides the paths we need as the sixth and seventh -REM parameters. -SET LEFT=%6 -SET RIGHT=%7 - -REM Call the diff command (change the following line to make sense for -REM your merge program). -%DIFF% --left %LEFT% --right %RIGHT% - -REM Return an errorcode of 0 if no differences were detected, 1 if some were. -REM Any other errorcode will be treated as fatal. - - -
- -
- - External diff3 - - 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 mine, - older, and yours 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. - - and are - templates for external merge tool wrappers in the Bourne shell - and Windows batch scripting languages, respectively. - - - diff3wrap.sh - - -#!/bin/sh - -# Configure your favorite diff3/merge program here. -DIFF3="/usr/local/bin/my-merge-tool" - -# Subversion provides the paths we need as the ninth, tenth, and eleventh -# parameters. -MINE=${9} -OLDER=${10} -YOURS=${11} - -# Call the merge command (change the following line to make sense for -# your merge program). -$DIFF3 --older $OLDER --mine $MINE --yours $YOURS - -# After performing the merge, this script needs to print the contents -# of the merged file to stdout. Do that in whatever way you see fit. -# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts -# remain in the result. Any other errorcode will be treated as fatal. - - - - - diff3wrap.bat - - -@ECHO OFF - -REM Configure your favorite diff3/merge program here. -SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe" - -REM Subversion provides the paths we need as the ninth, tenth, and eleventh -REM parameters. But we only have access to nine parameters at a time, so we -REM shift our nine-parameter window twice to let us get to what we need. -SHIFT -SHIFT -SET MINE=%7 -SET OLDER=%8 -SET YOURS=%9 - -REM Call the merge command (change the following line to make sense for -REM your merge program). -%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS% - -REM After performing the merge, this script needs to print the contents -REM of the merged file to stdout. Do that in whatever way you see fit. -REM Return an errorcode of 0 on successful merge, 1 if unresolved conflicts -REM remain in the result. Any other errorcode will be treated as fatal. - - -
-
-
- - - - Embedding Subversion - - 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. - 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. - - - -
- - Layered Library Design - - 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 ). 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.). - - - libsvn_client - - Primary interface for client - programs - - - - libsvn_delta - - Tree and byte-stream differencing - routines - - - - libsvn_diff - - Contextual differencing and merging - routines - - - - libsvn_fs - - Filesystem commons and module - loader - - - - libsvn_fs_base - - The Berkeley DB filesystem - back-end - - - - libsvn_fs_fs - - The native filesystem (FSFS) - back-end - - - - libsvn_ra - - Repository Access commons and module - loader - - - - libsvn_ra_dav - - The WebDAV Repository Access - module - - - - libsvn_ra_local - - The local Repository Access - module - - - - libsvn_ra_serf - - Another (experimental) WebDAV Repository - Access module - - - - libsvn_ra_svn - - The custom protocol Repository Access - module - - - - libsvn_repos - - Repository interface - - - - libsvn_subr - - Miscellaneous helpful - subroutines - - - - libsvn_wc - - The working copy management - library - - - - mod_authz_svn - - Apache authorization module for Subversion - repositories access via WebDAV - - - - mod_dav_svn - - Apache module for mapping WebDAV operations to - Subversion ones - - - - The fact that the word miscellaneous 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 big - picture that allows you to pinpoint the location of - certain pieces of functionality with relative ease. - 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. - 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 ). So while the - Subversion distribution provides only the svn - 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. - -
- - Repository Layer - - 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 - other end of the line. - 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 - files and directories 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 .) 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. - 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 - (properties) 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. - 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: - - - Begin a Subversion commit transaction. - - - Make your changes (adds, deletes, property - modifications, etc.). - - - Commit your transaction. - - - 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 the way things were. - - - The Transaction Distraction - - 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 - none of them ever happened—and in - a way that does not interfere with other processes acting on - the data. - 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)! - 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). - - 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 /foo/bar, 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. - 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. shows a typical - representation of a tree as exactly that. -
- - Files and directories in two dimensions - - - - - - -
- The difference here is that the Subversion filesystem has a - nifty third dimension that most filesystems do not - have—Time! - 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 fourth dimension, and we - apologize for any emotional trauma induced by our - assertion of a different theory. - In the filesystem interface, nearly every function that has a - path argument also expects a - root 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 - /foo/bar in revision 32, and the same - path as it exists in revision 98. shows revision - history as an added dimension to the Subversion filesystem - universe. -
- - Versioning time—the third dimension! - - - - - - -
- 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. - 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. - 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: - - - create, open, destroy, and perform recovery steps on a - Subversion repository and the filesystem included in that - repository. - - - describe the differences between two filesystem - trees. - - - 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. - - - generate a human-readable dump of the - filesystem, a complete representation of the revisions in - the filesystem. - - - parse that dump format, loading the dumped revisions - into a different Subversion repository. - - - As Subversion continues to evolve, the repository library - will grow with the filesystem library to offer increased - functionality and configurable option support. -
- -
- - Repository Access Layer - - If the Subversion Repository Layer is at the other - end of the line, 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, - svnserve). - Since Subversion uses URLs to identify its repository - resources, the protocol portion of the URL scheme (usually - file://, http://, - https://, svn://, or - svn+ssh://) is used to determine which RA - module will handle the communications. Each module registers - a list of the protocols it knows how to speak - 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 - svn --version: - -$ svn --version -svn, version 1.4.3 (r23084) - compiled Jan 18 2007, 07:47:40 - -Copyright (C) 2000-2006 CollabNet. -Subversion is open source software, see http://subversion.tigris.org/ -This product includes software developed by CollabNet (http://www.Collab.Net/). - -The following repository access (RA) modules are available: - -* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol. - - handles 'http' scheme - - handles 'https' scheme -* ra_svn : Module for accessing a repository using the svn network protocol. - - handles 'svn' scheme -* ra_local : Module for accessing a repository on local disk. - - handles 'file' scheme - -$ - - 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 - svnserve program; and so on. - 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. -
- -
- - Client Layer - - 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 reflection of one or more repository - locations—and propagating changes to and from the - Repository Access layer. - 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 - .svn, 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 - .svn subdirectory is similar in purpose - to the CVS administrative directories - found in CVS working copies. For more information about the - .svn administrative area, see in this chapter. - 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 - svn_client_checkout() 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 (.svn directories - and all). - 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 - tools/examples/minimal_client.c that - exemplifies how to wield the Subversion API to create a simple - client program - - - Binding Directly—A Word About Correctness - - 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. - 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 again - translate into its 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. - 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. - -
-
- - - -
- - Inside the Working Copy Administration Area - - As we mentioned earlier, each directory of a Subversion - working copy contains a special subdirectory called - .svn which houses administrative data about - that working copy directory. Subversion uses the information in - .svn to keep track of things like: - - - Which repository location(s) are represented by the - files and subdirectories in the working copy - directory. - - - What revision of each of those files and directories are - currently present in the working copy. - - - Any user-defined properties that might be attached - to those files and directories. - - - Pristine (un-edited) copies of the working copy - files. - - - 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. - -
- - The Entries File - - Perhaps the single most important file in the - .svn directory is the - entries 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! - Folks familiar with CVS's administrative directories will - have recognized at this point that Subversion's - .svn/entries file serves the purposes of, - among other things, CVS's CVS/Entries, - CVS/Root, and - CVS/Repository files combined. - The format of the .svn/entries 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. -
- -
- - Pristine Copies and Property Files - - As mentioned before, the .svn - directory also holds the pristine text-base - versions of files. Those can be found in - .svn/text-base. 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 text-base an option. - Ironically though, it is as your versioned files' sizes get - larger that the existence of the text-base - becomes more crucial—who wants to transmit a huge file - across a network just because they want to commit a tiny - change to it? - Similar in purpose to the text-base files - are the property files and their pristine - prop-base copies, located in - .svn/props and - .svn/prop-base respectively. Since - directories can have properties, too, there are also - .svn/dir-props and - .svn/dir-prop-base files. -
-
- - - -
- - Using the APIs - - 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 - subversion/include directory of the source - tree. These headers are copied into your system locations (for - example, /usr/local/include) 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. - 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 svn_, followed by a short code for the - library in which the symbol is defined (such as - wc, client, - fs, etc.), followed by a single underscore - (_) 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 (__). - Functions that are private to a given source file have no - special prefixing, and are declared static. - Of course, a compiler isn't interested in these naming - conventions, but they help to clarify the scope of a given - function or datatype. - Another good source of information about programming against - the Subversion APIs is the project's own hacking guidelines, - which can be found at http://subversion.tigris.org/hacking.html. 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. - After all, Subversion uses Subversion's APIs, - too. - - -
- - The Apache Portable Runtime Library - - Along with Subversion's own datatypes, you will see many - references to datatypes that begin with - apr_—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. - In addition to providing consistent implementations of - system calls that differ across operating systems, - Subversion uses ANSI system calls and datatypes as much - as possible. - 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), - Neon and Berkeley DB are examples of such libraries. - and while a person coding against the Subversion APIs is - not required to do the same, they are 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 apr_initialize() to initialize the - APR subsystem, and then must create and manage pools for use with - Subversion API calls, typically by using - svn_pool_create(), - svn_pool_clear(), and - svn_pool_destroy(). - - - Programming with Memory Pools - - 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. - Higher-level languages, on the other hand, take the job of - memory management away from the developer completely. - Or at least make it something you only toy with when - doing extremely tight program optimization. - Languages like Java and Python use garbage - collection, allocating memory for - objects when needed, and automatically freeing that memory - when the object is no longer in use. - 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 - pool) of memory, instead of per allocated - object. Rather than using malloc() 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 all 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. - -
- -
- - URL and Path Requirements - - 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 remote might mean across the - office, it could just as well mean across the - globe. 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 - subversion/include/svn_utf.h) that can be - used by any program to do these conversions. - Also, Subversion APIs require all URL parameters to be - properly URI-encoded. So, instead of passing - file:///home/username/My File.txt as the URL of a - file named My File.txt, you need to pass - file:///home/username/My%20File.txt. Again, - Subversion supplies helper functions that your application can - use—svn_path_uri_encode() and - svn_path_uri_decode(), for URI encoding - and decoding, respectively. -
- -
- - Using Languages Other than C and C++ - - 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 - subversion/bindings/swig. 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. - 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 http://www.swig.org/. - Subversion also has language bindings for Java. The - JavaJL bindings (located in - subversion/bindings/java 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. - 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. - 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 http://subversion.tigris.org/links.html), but there - are a couple of popular ones we feel are especially - noteworthy. First, Barry Scott's PySVN bindings (http://pysvn.tigris.org/) 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 (http://svnkit.com/), 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. -
- -
- - Code Samples - - - 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 svn_repos_ and - svn_fs_ 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). - - - Using the Repository Layer - - -/* Convert a Subversion error into a simple boolean error code. - * - * NOTE: Subversion errors must be cleared (using svn_error_clear()) - * because they are allocated from the global pool, else memory - * leaking occurs. - */ -#define INT_ERR(expr) \ - do { \ - svn_error_t *__temperr = (expr); \ - if (__temperr) \ - { \ - svn_error_clear(__temperr); \ - return 1; \ - } \ - return 0; \ - } while (0) - -/* Create a new directory at the path NEW_DIRECTORY in the Subversion - * repository located at REPOS_PATH. Perform all memory allocation in - * POOL. This function will create a new revision for the addition of - * NEW_DIRECTORY. Return zero if the operation completes - * successfully, non-zero otherwise. - */ -static int -make_new_directory(const char *repos_path, - const char *new_directory, - apr_pool_t *pool) -{ - svn_error_t *err; - svn_repos_t *repos; - svn_fs_t *fs; - svn_revnum_t youngest_rev; - svn_fs_txn_t *txn; - svn_fs_root_t *txn_root; - const char *conflict_str; - - /* Open the repository located at REPOS_PATH. - */ - INT_ERR(svn_repos_open(&repos, repos_path, pool)); - - /* Get a pointer to the filesystem object that is stored in REPOS. - */ - fs = svn_repos_fs(repos); - - /* Ask the filesystem to tell us the youngest revision that - * currently exists. - */ - INT_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool)); - - /* Begin a new transaction that is based on YOUNGEST_REV. We are - * less likely to have our later commit rejected as conflicting if we - * always try to make our changes against a copy of the latest snapshot - * of the filesystem tree. - */ - INT_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool)); - - /* Now that we have started a new Subversion transaction, get a root - * object that represents that transaction. - */ - INT_ERR(svn_fs_txn_root(&txn_root, txn, pool)); - - /* Create our new directory under the transaction root, at the path - * NEW_DIRECTORY. - */ - INT_ERR(svn_fs_make_dir(txn_root, new_directory, pool)); - - /* Commit the transaction, creating a new revision of the filesystem - * which includes our added directory path. - */ - err = svn_repos_fs_commit_txn(&conflict_str, repos, - &youngest_rev, txn, pool); - if (! err) - { - /* No error? Excellent! Print a brief report of our success. - */ - printf("Directory '%s' was successfully added as new revision " - "'%ld'.\n", new_directory, youngest_rev); - } - else if (err->apr_err == SVN_ERR_FS_CONFLICT) - { - /* Uh-oh. Our commit failed as the result of a conflict - * (someone else seems to have made changes to the same area - * of the filesystem that we tried to modify). Print an error - * message. - */ - printf("A conflict occurred at path '%s' while attempting " - "to add directory '%s' to the repository at '%s'.\n", - conflict_str, new_directory, repos_path); - } - else - { - /* Some other error has occurred. Print an error message. - */ - printf("An error occurred while attempting to add directory '%s' " - "to the repository at '%s'.\n", - new_directory, repos_path); - } - - INT_ERR(err); -} - - - Note that in , the code could - just as easily have committed the transaction using - svn_fs_commit_txn(). 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, - svn_repos_fs_commit_txn(). (For more - information regarding Subversion's repository hooks, see .) - Now let's switch languages. 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. - - - Using the Repository Layer with Python - - -#!/usr/bin/python - -"""Crawl a repository, printing versioned object path names.""" - -import sys -import os.path -import svn.fs, svn.core, svn.repos - -def crawl_filesystem_dir(root, directory): - """Recursively crawl DIRECTORY under ROOT in the filesystem, and return - a list of all the paths at or below DIRECTORY.""" - - # Print the name of this path. - print directory + "/" - - # Get the directory entries for DIRECTORY. - entries = svn.fs.svn_fs_dir_entries(root, directory) - - # Loop over the entries. - names = entries.keys() - for name in names: - # Calculate the entry's full path. - full_path = directory + '/' + name - - # If the entry is a directory, recurse. The recursion will return - # a list with the entry and all its children, which we will add to - # our running list of paths. - if svn.fs.svn_fs_is_dir(root, full_path): - crawl_filesystem_dir(root, full_path) - else: - # Else it's a file, so print its path here. - print full_path - -def crawl_youngest(repos_path): - """Open the repository at REPOS_PATH, and recursively crawl its - youngest revision.""" - - # Open the repository at REPOS_PATH, and get a reference to its - # versioning filesystem. - repos_obj = svn.repos.svn_repos_open(repos_path) - fs_obj = svn.repos.svn_repos_fs(repos_obj) - - # Query the current youngest revision. - youngest_rev = svn.fs.svn_fs_youngest_rev(fs_obj) - - # Open a root object representing the youngest (HEAD) revision. - root_obj = svn.fs.svn_fs_revision_root(fs_obj, youngest_rev) - - # Do the recursive crawl. - crawl_filesystem_dir(root_obj, "") - -if __name__ == "__main__": - # Check for sane usage. - if len(sys.argv) != 2: - sys.stderr.write("Usage: %s REPOS_PATH\n" - % (os.path.basename(sys.argv[0]))) - sys.exit(1) - - # Canonicalize the repository path. - repos_path = svn.core.svn_path_canonicalize(sys.argv[1]) - - # Do the real work. - crawl_youngest(repos_path) - - - 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 dictionaries) 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. - The Subversion Python bindings can be used for working - copy operations, too. In the previous section of this - chapter, we mentioned the libsvn_client - interface, and how it exists for the sole purpose of - simplifying the process of writing a Subversion client. is a brief - example of how that library can be accessed via the SWIG - Python bindings to recreate a scaled-down version of the - svn status command. - - - A Python Status Crawler - - -#!/usr/bin/env python - -"""Crawl a working copy directory, printing status information.""" - -import sys -import os.path -import getopt -import svn.core, svn.client, svn.wc - -def generate_status_code(status): - """Translate a status value into a single-character status code, - using the same logic as the Subversion command-line client.""" - code_map = { svn.wc.svn_wc_status_none : ' ', - svn.wc.svn_wc_status_normal : ' ', - svn.wc.svn_wc_status_added : 'A', - svn.wc.svn_wc_status_missing : '!', - svn.wc.svn_wc_status_incomplete : '!', - svn.wc.svn_wc_status_deleted : 'D', - svn.wc.svn_wc_status_replaced : 'R', - svn.wc.svn_wc_status_modified : 'M', - svn.wc.svn_wc_status_merged : 'G', - svn.wc.svn_wc_status_conflicted : 'C', - svn.wc.svn_wc_status_obstructed : '~', - svn.wc.svn_wc_status_ignored : 'I', - svn.wc.svn_wc_status_external : 'X', - svn.wc.svn_wc_status_unversioned : '?', - } - return code_map.get(status, '?') - -def do_status(wc_path, verbose): - # Calculate the length of the input working copy path. - wc_path_len = len(wc_path) - - # Build a client context baton. - ctx = svn.client.svn_client_ctx_t() - - def _status_callback(path, status, root_path_len=wc_path_len): - """A callback function for svn_client_status.""" - - # Print the path, minus the bit that overlaps with the root of - # the status crawl - text_status = generate_status_code(status.text_status) - prop_status = generate_status_code(status.prop_status) - print '%s%s %s' % (text_status, prop_status, path[wc_path_len + 1:]) - - # Do the status crawl, using _status_callback() as our callback function. - svn.client.svn_client_status(wc_path, None, _status_callback, - 1, verbose, 0, 0, ctx) - -def usage_and_exit(errorcode): - """Print usage message, and exit with ERRORCODE.""" - stream = errorcode and sys.stderr or sys.stdout - stream.write("""Usage: %s OPTIONS WC-PATH -Options: - --help, -h : Show this usage message - --verbose, -v : Show all statuses, even uninteresting ones -""" % (os.path.basename(sys.argv[0]))) - sys.exit(errorcode) - -if __name__ == '__main__': - # Parse command-line options. - try: - opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"]) - except getopt.GetoptError: - usage_and_exit(1) - verbose = 0 - for opt, arg in opts: - if opt in ("-h", "--help"): - usage_and_exit(0) - if opt in ("-v", "--verbose"): - verbose = 1 - if len(args) != 1: - usage_and_exit(2) - - # Canonicalize the repository path. - wc_path = svn.core.svn_path_canonicalize(args[0]) - - # Do the real work. - try: - do_status(wc_path, verbose) - except svn.core.SubversionException, e: - sys.stderr.write("Error (%d): %s\n" % (e[1], e[0])) - sys.exit(1) - - - As was the case in , this - program is pool-free and uses, for the most part, normal - Python data types. The call to - svn_client_ctx_t() 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 - svn_path_canonicalize(), because to - not 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. -
-
-
- - - - Subversion Complete Reference - - This chapter is intended to be a complete reference to using - Subversion. This includes the command line client - (svn) and all its subcommands, as well as the - repository administration programs (svnadmin - and svnlook) and their respective - subcommands. - - - -
- - The Subversion Command Line Client: <command>svn</command> - - To use the command line client, you type - svn, the subcommand you wish to use - Yes, yes, you don't need a subcommand to use the - option, but we'll get to that in just - a minute., 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 svn - status: - -$ svn -v status -$ svn status -v -$ svn status -v myfile - - You can find many more examples of how to use most client - commands in and commands for managing - properties in . - -
- - <command>svn</command> Options - - 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, - () always - means verbose output, regardless of the - subcommand you use it with. - - - - - - - Enables auto-props, overriding the - enable-auto-props directive in the - config file. - - - - () - ARG - - Used as a means to refer to a specific - change (aka a revision), this option is - syntactic sugar for -r ARG-1:ARG. - - - - - - DIR - - - Instructs Subversion to read configuration - information from the specified directory instead of the - default location (.subversion in - the user's home directory). - - - - - - CMD - - - Specifies an external program to use to show - differences between files. When svn - diff 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 . - You can pass options to the diff program with the - option (more on that later - in this section). - - - - - - - CMD - - - Specifies an external program to use to merge files. - - - - - - - - Goes through all the motions of running a command, - but makes no actual changes—either on disk or in - the repository. - - - - - - CMD - - - Specifies an external program to use to edit a log message - or a property value. See the editor-cmd - section in - for ways to specify a default editor. - - - - - - ENC - - - 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. - - - - () - ARGS - - Specifies an argument or arguments that Subversion - should pass to an external diff command. This option is - valid only when used with the svn - diff or svn merge commands, - with the - option. - If you wish to pass multiple - arguments, you must enclose all of them in quotes (for - example, svn diff --diff-cmd /usr/bin/diff -x - "-b -E"). - - - - () - FILENAME - - - Uses the contents of the named file for the - specified subcommand, though different subcommands do - different things with this content. For example, - svn commit uses the content as a - commit log, whereas svn propset uses - it as a property value. - - - - - - - - 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 I know what I'm - doing as well as the possible repercussions of doing it, - so let me at 'em. 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. - - - - - - - - Forces a suspicious parameter passed to the - () or - () 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, - 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 - to subcommands that accept log messages. - - - - ( or - ) - - - 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. - - - - - - - - Tells Subversion to ignore ancestry when calculating - differences (rely on path contents alone). - - - - - - - - Tells Subversion to ignore external definitions and - the external working copies managed by them. - - - - - - - - Prints output in a format suitable for - concatenation. - - - - - - NUM - - - Show only the first NUM - log messages. - - - - () - MESSAGE - - - Indicates that you will specify a either a log - message or a lock comment on the command line, following - this option. For example: - -$ svn commit -m "They don't make Sunday." - - - - - - - ARG - - - Uses ARG as the newer - target (for use with svn diff). - - - - - - - - Prevents caching of authentication information - (e.g. username and password) in the Subversion - administrative directories. - - - - - - - - Disables auto-props, overriding the - enable-auto-props directive in the - config file. - - - - - - - - Prevents Subversion from printing differences for - deleted files. The default behavior when you remove a - file is for svn diff to print the - same differences that you would see if you had left - the file but removed all the content. - - - - - - - - Shows files in the status listing that would - normally be omitted since they match a pattern in the - global-ignores configuration option - or the svn:ignore property. See and for more - information. - - - - - - - - Don't automatically unlock files (the default commit - behavior is to unlock all files listed as part of the - commit). See for - more information. - - - - - - - - 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. - - - - () - - 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. - - - - - - - - Pay attention to ancestry when calculating - differences. - - - - - - ARG - - - Uses ARG as the older - target (for use with svn diff). - - - - - - PASS - - - Indicates that you are providing your password for - authentication on the command line—otherwise, if - it is needed, Subversion will prompt you for - it. - - - - () - - Requests that the client print only essential - information while performing an operation. - - - - () - - Makes a subcommand recurse into subdirectories. - Most subcommands recurse by default. - - - - - - FROM TO - [PATH...] - - - Used with the svn switch - 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 svn switch for an - example. - - - - () - REV - - - 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: - -$ svn log -r 1729 -$ svn log -r 1729:HEAD -$ svn log -r 1729:1744 -$ svn log -r {2001-12-04}:{2002-02-17} -$ svn log -r 1729:{2002-02-17} - - See for more - information. - - - - - - - - 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. - - - - () - - 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 svn update. - - - - - - - - - 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. - - - - - - - - Causes Subversion to use strict semantics, a notion - which is rather vague unless talking about specific - subcommands (namely, svn propget). - - - - - - FILENAME - - - 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. - - - - - - - NAME - - - Indicates that you are providing your username for - authentication on the command line—otherwise, if - it is needed, Subversion will prompt you for - it. - - - - () - - 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. - - - - - - - - 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 - () it prints only the version number - in a compact form. - - - - - - - - Prints output in XML format. - - - -
- -
- - <command>svn</command> Subcommands - - Here are the various subcommands: - - - svn - subcommands - add - - - svn add - Add files, directories, or symbolic links. - - - - Synopsis - - svn add PATH... - - - - Description - - 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 - svn revert. - - - - - Alternate Names - - None - - - - Changes - - Working Copy - - - - Accesses Repository - - No - - - - Options - - ---targets FILENAME ---non-recursive (-N) ---quiet (-q) ---config-dir DIR ---no-ignore ---auto-props ---no-auto-props ---force - - - - - Examples - - To add a file to your working copy: - -$ svn add foo.c -A foo.c - - When adding a directory, the default behavior of - svn add is to recurse: - -$ svn add testdir -A testdir -A testdir/a -A testdir/b -A testdir/c -A testdir/d - - You can add a directory without adding its - contents: - -$ svn add --non-recursive otherdir -A otherdir - - Normally, the command svn add * - 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 makes svn - add recurse into versioned directories: - - -$ svn add * --force -A foo.c -A somedir/bar.c -A otherdir/docs/baz.doc -… - - - - - - svn - subcommands - blame - - - svn blame - Show author and revision information in-line - for the specified files or URLs. - - - - Synopsis - - svn blame TARGET[@REV]... - - - - Description - - 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. - - - - Alternate Names - - praise, annotate, ann - - - - Changes - - Nothing - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) ARG ---verbose (-v) ---incremental ---xml ---extensions (-x) ARG ---force ---username ARG ---password ARG ---no-auth-cache ---non-interactive ---config-dir ARG - - - - - - Examples - - If you want to see blame annotated source for - readme.txt in your test - repository: - -$ svn blame http://svn.red-bean.com/repos/test/readme.txt - 3 sally This is a README file. - 5 harry You should read this. - - Even if svn blame 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 context of the - line—he may have just adjusted the whitespace. - - - - - - svn - subcommands - cat - - - svn cat - Output the contents of the specified files or - URLs. - - - - Synopsis - - svn cat TARGET[@REV]... - - - - Description - - Output the contents of the specified files or URLs. - For listing the contents of directories, see svn - list. - - - - Alternate Names - - None - - - - Changes - - Nothing - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - If you want to view readme.txt in your repository - without checking it out: - -$ svn cat http://svn.red-bean.com/repos/test/readme.txt -This is a README file. -You should read this. - - - If your working copy is out of date (or you have - local modifications) and you want to see the - HEAD revision of a file in your - working copy, svn cat -r HEAD will - automatically fetch the HEAD revision - when you give it a path: - - -$ cat foo.c -This file is in my local working copy -and has changes that I've made. - -$ svn cat -r HEAD foo.c -Latest revision fresh from the repository! - - - - - - svn - subcommands - checkout - - - svn checkout - Check out a working copy from a repository. - - - - Synopsis - - svn checkout URL[@REV]... [PATH] - - - - Description - - Check out a working copy from a repository. If - PATH 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 PATH, with the - name of the subdirectory being the basename of the - URL. - - - - Alternate Names - - co - - - - Changes - - Creates a working copy. - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---quiet (-q) ---non-recursive (-N) ---username USER ---password PASS ---no-auth-cache ---non-interactive ---ignore-externals ---config-dir DIR - - - - - Examples - - Check out a working copy into a directory called - mine: - -$ svn checkout file:///var/svn/repos/test mine -A mine/a -A mine/b -Checked out revision 2. -$ ls -mine - - Check out two different directories into two separate - working copies: - -$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz -A test/a -A test/b -Checked out revision 2. -A quiz/l -A quiz/m -Checked out revision 2. -$ ls -quiz test - - Check out two different directories into two separate - working copies, but place both into a directory called - working-copies: - -$ svn checkout file:///var/svn/repos/test file:///var/svn/repos/quiz working-copies -A working-copies/test/a -A working-copies/test/b -Checked out revision 2. -A working-copies/quiz/l -A working-copies/quiz/m -Checked out revision 2. -$ ls -working-copies - - 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: - -$ svn checkout file:///var/svn/repos/test test -A test/a -A test/b -^C -svn: The operation was interrupted -svn: caught SIGINT - -$ svn checkout file:///var/svn/repos/test test -A test/c -A test/d -^C -svn: The operation was interrupted -svn: caught SIGINT - -$ cd test -$ svn update -A test/e -A test/f -Updated to revision 3. - - - - - - svn - subcommands - cleanup - - - svn cleanup - Recursively clean up the working copy. - - - - Synopsis - - svn cleanup [PATH...] - - - - Description - - Recursively clean up the working copy, removing - working copy locks and resuming unfinished operations. - If you ever get a working copy locked error, - run this command to remove stale locks and get your working copy - into a usable state again. - If, for some reason, an svn update - fails due to a problem running an external diff program - (e.g. user input or network failure), pass the - to allow cleanup to complete - any merging with your external diff program. You can also - specify any configuration directory with the - option, but you should need - these options extremely infrequently. - - - - Alternate Names - - None - - - - Changes - - Working copy - - - - Accesses Repository - - No - - - - Options - - ---diff3-cmd CMD ---config-dir DIR - - - - - Examples - - Well, there's not much to the examples here as - svn cleanup generates no output. If - you pass no PATH, - . is used. - -$ svn cleanup - -$ svn cleanup /var/svn/working-copy - - - - - - svn - subcommands - commit - - - svn commit - Send changes from your working copy to the repository. - - - - Synopsis - - svn commit [PATH...] - - - - Description - - Send changes from your working copy to the - repository. If you do not supply a log message with your - commit by using either the or - option, - svn will launch your editor for you - to compose a commit message. See the - editor-cmd section in . - svn commit will send any lock - tokens that it finds and will release locks on all - PATHS committed (recursively), - unless is passed. - - 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. - - - - - Alternate Names - - ci (short for check in; not - co, which is short for - checkout) - - - - Changes - - Working copy, repository - - - - Accesses Repository - - Yes - - - - Options - - ---message (-m) TEXT ---file (-F) FILE ---quiet (-q) ---no-unlock ---non-recursive (-N) ---targets FILENAME ---force-log ---username USER ---password PASS ---no-auth-cache ---non-interactive ---encoding ENC ---config-dir DIR - - - - - Examples - - Commit a simple modification to a file with the - commit message on the command line and an implicit - target of your current directory - (.): - -$ svn commit -m "added howto section." -Sending a -Transmitting file data . -Committed revision 3. - - Commit a modification to the file - foo.c (explicitly specified on the - command line) with the commit message in a file named - msg: - -$ svn commit -F msg foo.c -Sending foo.c -Transmitting file data . -Committed revision 5. - - If you want to use a file that's under version - control for your commit message with - , you need to pass the - option: - -$ svn commit --file file_under_vc.txt foo.c -svn: The log message file is under version control -svn: Log message file is a versioned file; use '--force-log' to override - -$ svn commit --force-log --file file_under_vc.txt foo.c -Sending foo.c -Transmitting file data . -Committed revision 6. - - To commit a file scheduled for deletion: - -$ svn commit -m "removed file 'c'." -Deleting c - -Committed revision 7. - - - - - - svn - subcommands - copy - - - svn copy - Copy a file or directory in a working copy or - in the repository. - - - - Synopsis - - svn copy SRC[@REV]... DST - - - - Description - - Copy one or more files in a working copy or in the repository. - SRC and - DST can each be either a - working copy (WC) path or URL: - - - WC -> WC - - Copy and schedule an item for - addition (with history). - - - - WC -> URL - - Immediately commit a copy of WC to URL. - - - - URL -> WC - - Check out URL into WC, and schedule it for - addition. - - - - URL -> URL - - Complete server-side copy. This is - usually used to branch and tag. - - - - When copying multiple sources, they will be added as - children of DST, which must be - a directory. - If no peg revision (ie - @REV) is supplied, by default - the BASE revision will be used for - files copied from the working copy, while the - HEAD revision will be used for files - copied from a URL. - - You can only copy files within a single repository. - Subversion does not support cross-repository copying. - - - - - Alternate Names - - cp - - - - Changes - - Repository if destination is a URL. - Working copy if destination is a WC path. - - - - Accesses Repository - - If source or destination is in the repository, or if needed - to look up the source revision number. - - - - Options - - ---message (-m) TEXT ---file (-F) FILE ---revision (-r) REV ---quiet (-q) ---username USER ---password PASS ---no-auth-cache ---non-interactive ---force-log ---editor-cmd EDITOR ---encoding ENC ---config-dir DIR - - - - - Examples - - Copy an item within your working copy (just - schedules the copy—nothing goes into the repository - until you commit): - -$ svn copy foo.txt bar.txt -A bar.txt -$ svn status -A + bar.txt - - Copy several files in a working copy into a - subdirectory: - -$ svn cp bat.c baz.c qux.c src -A src/bat.c -A src/baz.c -A src/qux.c - - Copy revision 8 of bat.c into your - working copy under a different name: - -$ svn cp bat.c ya-old-bat.c -A ya-old-bat.c - - Copy an item in your working copy to a URL in the - repository (an immediate commit, so you must supply a - commit message): - -$ svn copy near.txt file:///var/svn/repos/test/far-away.txt -m "Remote copy." - -Committed revision 8. - - Copy an item from the repository to your working - copy (just schedules the copy—nothing goes into the - repository until you commit): - - This is the recommended way to resurrect a dead - file in your repository! - - -$ svn copy file:///var/svn/repos/test/far-away near-here -A near-here - - And finally, copying between two URLs: - -$ svn copy file:///var/svn/repos/test/far-away file:///var/svn/repos/test/over-there -m "remote copy." - -Committed revision 9. - - - This is the easiest way to tag a - revision in your repository—just svn - copy that revision (usually - HEAD) into your tags directory. - - -$ svn copy file:///var/svn/repos/test/trunk file:///var/svn/repos/test/tags/0.6.32-prerelease -m "tag tree" - -Committed revision 12. - - And don't worry if you forgot to tag—you can - always specify an older revision and tag anytime: - -$ 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" - -Committed revision 13. - - - - - - svn - subcommands - delete - - - svn delete - Delete an item from a working copy - or the repository. - - - - Synopsis - - svn delete PATH... - svn delete URL... - - - - Description - - Items specified by PATH 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 to override this - behavior. - Items specified by URL are deleted from - the repository via an immediate commit. Multiple URLs are - committed atomically. - - - - Alternate Names - - del, remove, rm - - - - Changes - - Working copy if operating on files, repository if - operating on URLs - - - - Accesses Repository - - Only if operating on URLs - - - - Options - - ---force ---force-log ---message (-m) TEXT ---file (-F) FILE ---quiet (-q) ---targets FILENAME ---username USER ---password PASS ---no-auth-cache ---non-interactive ---editor-cmd EDITOR ---encoding ENC ---config-dir DIR - - - - - Examples - - Using svn 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. - -$ svn delete myfile -D myfile - -$ svn commit -m "Deleted file 'myfile'." -Deleting myfile -Transmitting file data . -Committed revision 14. - - Deleting a URL, however, is immediate, so you have - to supply a log message: - -$ svn delete -m "Deleting file 'yourfile'" file:///var/svn/repos/test/yourfile - -Committed revision 15. - - Here's an example of how to force deletion of a file - that has local mods: - -$ svn delete over-there -svn: Attempting restricted operation for modified resource -svn: Use --force to override this restriction -svn: 'over-there' has local modifications - -$ svn delete --force over-there -D over-there - - - - - - svn - subcommands - diff - - - svn diff - Display the differences between two revisions or paths. - - - - Synopsis - - diff [-c M | -r N[:M]] [TARGET[@REV]...] - diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...] - diff OLD-URL[@OLDREV] NEW-URL[@NEWREV] - - - - Description - - Display the differences between two paths. The ways - you can use svn diff are: - Use just svn diff'to display local - modifications in a working copy. - Display the changes made to - TARGETs as they are seen in - REV between two revisions. - TARGETs may be all working copy - paths or all URLs. If - TARGETs are working copy paths, - N defaults to - BASE and M - to the working copy; if URLs, - N must be specified and - M defaults to - HEAD. The -c M option - is equivalent to -r N:M where N = - M-1. Using -c -M does the - reverse: -r M:N where N = - M-1. - Display the differences between - OLD-TGT as it was seen in - OLDREV and - NEW-TGT as it was seen ain - NEWREV. - PATHs, if given, are relative - to OLD-TGT and - NEW-TGT and restrict the output - to differences for those paths. - OLD-TGT and - NEW-TGT may be working copy - paths or URL[@REV]. - NEW-TGT defaults to - OLD-TGT if not specified. - -r N makes OLDREV default to N, -r N:M - makes OLDREV default to - N and - NEWREV default to - M. - Shorthand for svn diff --old=OLD-URL[@OLDREV] - --new=NEW-URL[@NEWREV] - svn diff -r N:M URL is shorthand - for svn diff -r N:M --old=URL - --new=URL. - svn diff [-r N[:M]] URL1[@N] - URL2[@M] is shorthand for svn diff [-r - N[:M]] --old=URL1 --new=URL2. - If TARGET is a URL, then - revs N and M can be given either via the - or by using - @ notation as described earlier. - If TARGET is a working copy - path, then the option - means: - - - - - - - The server compares - TARGET@N - and - TARGET@M. - - - - - - - - The client compares - TARGET@N - against working copy. - - - - (no ) - - The client compares base and working copies of - TARGET. - - - - If the alternate syntax is used, the server compares - URL1 and - URL2 at revisions - N and - M respectively. If either - N or - M are omitted, a value of - HEAD is assumed. - By default, svn diff ignores the - ancestry of files and merely compares the contents of the - two files being compared. If you use - , the ancestry of the - paths in question will be taken into consideration when - comparing revisions (that is, if you run svn - diff 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). - - - - Alternate Names - - di - - - - Changes - - Nothing - - - - Accesses Repository - - For obtaining differences against anything but - BASE revision in your working copy - - - - Options - - ---revision (-r) ARG ---change (-c) ARG ---old ARG ---new ARG ---non-recursive (-N) ---diff-cmd CMD ---extensions (-x) "ARGS" ---no-diff-deleted ---notice-ancestry ---summarize ---force ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - - Examples - - Compare BASE and your working copy - (one of the most popular uses of svn - diff): - -$ svn diff COMMITTERS -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 4404) -+++ COMMITTERS (working copy) - - See what changed in the file - COMMITTERS revision 9115: - -$ svn diff -c 9115 COMMITTERS -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 3900) -+++ COMMITTERS (working copy) - - See how your working copy's modifications compare - against an older revision: - -$ svn diff -r 3900 COMMITTERS -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 3900) -+++ COMMITTERS (working copy) - - Compare revision 3000 to revision 3500 using @ - syntax: - -$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500 -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 3000) -+++ COMMITTERS (revision 3500) -… - - Compare revision 3000 to revision 3500 using range - notation (you only pass the one URL in this - case): - -$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 3000) -+++ COMMITTERS (revision 3500) - - Compare revision 3000 to revision 3500 of all files in - trunk using range notation: - -$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk - - Compare revision 3000 to revision 3500 of only three - files in trunk using range - notation: - -$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING - - If you have a working copy, you can obtain the - differences without typing in the long URLs: - -$ svn diff -r 3000:3500 COMMITTERS -Index: COMMITTERS -=================================================================== ---- COMMITTERS (revision 3000) -+++ COMMITTERS (revision 3500) - - Use - CMD to - pass arguments directly to the external diff - program - -$ svn diff --diff-cmd /usr/bin/diff -x "-i -b" COMMITTERS -Index: COMMITTERS -=================================================================== -0a1,2 -> This is a test -> - - - - - - svn - subcommands - export - - - svn export - Export a clean directory tree. - - - - Synopsis - - svn export [-r REV] URL[@PEGREV] [PATH] - svn export [-r REV] PATH1[@PEGREV] [PATH2] - - - - Description - - The first form exports a clean directory tree from the - repository specified by URL, at revision - REV if it is given, otherwise - at HEAD, into - PATH. If - PATH is omitted, the last - component of the URL is used - for the local directory name. - The second form exports a clean directory tree from - the working copy specified by - PATH1 into - PATH2. All local changes will - be preserved, but files not under version control will not - be copied. - - - - Alternate Names - - None - - - - Changes - - Local disk - - - - Accesses Repository - - Only if exporting from a URL - - - - Options - - ---revision (-r) REV ---quiet (-q) ---force ---username USER ---password PASS ---no-auth-cache ---non-interactive ---non-recursive (-N) ---config-dir DIR ---native-eol EOL ---ignore-externals - - - - - Examples - - Export from your working copy (doesn't print every - file and directory): - -$ svn export a-wc my-export -Export complete. - - Export directly from the repository (prints every - file and directory): - -$ svn export file:///var/svn/repos my-export -A my-export/test -A my-export/quiz -… -Exported revision 15. - - 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 will do this, but it - only affects files that have svn:eol-style = - native properties attached to them. For - example, to export a tree with all CRLF line endings - (possibly for a Windows .zip file distribution): - -$ svn export file:///var/svn/repos my-export --native-eol CRLF -A my-export/test -A my-export/quiz -… -Exported revision 15. - - You can specify LR, - CR, or CRLF as a - line ending type with the - option. - - - - - svn - subcommands - help - - - svn help - Help! - - - - Synopsis - - svn help [SUBCOMMAND...] - - - - Description - - This is your best friend when you're using - Subversion and this book isn't within reach! - - - - Alternate Names - - ?, h - The options , - and have the same effect as using the - help subcommand. - - - - Changes - - Nothing - - - - Accesses Repository - - No - - - - Options - - ---config-dir DIR - - - - - - svn - subcommands - import - - - svn import - Commit an unversioned file or tree into the - repository. - - - - Synopsis - - svn import [PATH] URL - - - - Description - - Recursively commit a copy of - PATH to - URL. If - PATH is omitted - . is assumed. Parent - directories are created in the repository as - necessary. - - - - Alternate Names - - None - - - - Changes - - Repository - - - - Accesses Repository - - Yes - - - - Options - - ---message (-m) TEXT ---file (-F) FILE ---quiet (-q) ---non-recursive (-N) ---username USER ---password PASS ---no-auth-cache ---non-interactive ---force-log ---editor-cmd EDITOR ---encoding ENC ---config-dir DIR ---auto-props ---no-auto-props ---ignore-externals - - - - - Examples - - This imports the local directory - myproj into - trunk/misc in your repository. The - directory trunk/misc need not exist - before you import into it—svn - import will recursively create directories for - you. - -$ svn import -m "New import" myproj http://svn.red-bean.com/repos/trunk/misc -Adding myproj/sample.txt -… -Transmitting file data ......... -Committed revision 16. - - Be aware that this will not - create a directory named myproj in - the repository. If that's what you want, simply add - myproj to the end of the URL: - -$ svn import -m "New import" myproj http://svn.red-bean.com/repos/trunk/misc/myproj -Adding myproj/sample.txt -… -Transmitting file data ......... -Committed revision 16. - - After importing data, note that the original tree is - not under version control. To start - working, you still need to svn checkout - a fresh working copy of the tree. - - - - - svn - subcommands - info - - - svn info - Display information about a local or remote - item. - - - - Synopsis - - svn info [TARGET[@REV]...] - - - - Description - - Print information about the working copy paths or - URLs specified. The information shown for both may - include: - - - Path - - - Name - - - URL - - - Repository Root - - - Repository UUID - - - Revision - - - Node Kind - - - Last Changed Author - - - Last Changed Revision - - - Last Changed Date - - - Lock Token - - - Lock Owner - - - Lock Created (date) - - - Lock Expires (date) - - - Additional kinds of information available only for - working copy paths are: - - - Schedule - - - Copied From URL - - - Copied From Rev - - - Text Last Updated - - - Properties Last Updated - - - Checksum - - - Conflict Previous Base File - - - Conflict Previous Working File - - - Conflict Current Base File - - - Conflict Properties File - - - - - - Alternate Names - - None - - - - Changes - - Nothing - - - - Accesses Repository - - Only if operating on URLs - - - - Options - - ---revision (-r) REV ---recursive (-R) ---targets FILENAME ---incremental ---xml ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - svn info will show you all the - useful information that it has for items in your working - copy. It will show information for files: - -$ svn info foo.c -Path: foo.c -Name: foo.c -URL: http://svn.red-bean.com/repos/test/foo.c -Repository Root: http://svn.red-bean.com/repos/test -Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25 -Revision: 4417 -Node Kind: file -Schedule: normal -Last Changed Author: sally -Last Changed Rev: 20 -Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003) -Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003) -Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003) -Checksum: d6aeb60b0662ccceb6bce4bac344cb66 - - It will also show information for directories: - -$ svn info vendors -Path: vendors -URL: http://svn.red-bean.com/repos/test/vendors -Repository Root: http://svn.red-bean.com/repos/test -Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25 -Revision: 19 -Node Kind: directory -Schedule: normal -Last Changed Author: harry -Last Changed Rev: 19 -Last Changed Date: 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) -Properties Last Updated: 2003-01-16 23:39:02 -0600 (Thu, 16 Jan 2003) - - svn info also acts on URLs (also - note that the file readme.doc in this example is locked, - so lock information is also provided): - -$ svn info http://svn.red-bean.com/repos/test/readme.doc -Path: readme.doc -Name: readme.doc -URL: http://svn.red-bean.com/repos/test/readme.doc -Repository Root: http://svn.red-bean.com/repos/test -Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25 -Revision: 1 -Node Kind: file -Schedule: normal -Last Changed Author: sally -Last Changed Rev: 42 -Last Changed Date: 2003-01-14 23:21:19 -0600 (Tue, 14 Jan 2003) -Lock Token: opaquelocktoken:14011d4b-54fb-0310-8541-dbd16bd471b2 -Lock Owner: harry -Lock Created: 2003-01-15 17:35:12 -0600 (Wed, 15 Jan 2003) -Lock Comment (1 line): -My test lock comment - - - - - - svn - subcommands - list - - - svn list - List directory entries in the repository. - - - - Synopsis - - svn list [TARGET[@REV]...] - - - - Description - - List each TARGET file and - the contents of each TARGET - directory as they exist in the repository. If - TARGET is a working copy path, - the corresponding repository URL will be used. - The default TARGET is - ., meaning the - repository URL of the current working copy - directory. - With , svn - list shows the following fields for each - item: - - - Revision number of the last - commit - - - Author of the last commit - - - If locked, the letter O (See for details). - - - Size (in bytes) - - - Date and time of the last - commit - - - With , output is in XML format (with - a header and an enclosing document element unless - is also specified). All of the - information is present; the option - is not accepted. - - - - Alternate Names - - ls - - - - Changes - - Nothing - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---verbose (-v) ---recursive (-R) ---incremental ---xml ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - svn list is most useful if you - want to see what files a repository has without - downloading a working copy: - -$ svn list http://svn.red-bean.com/repos/test/support -README.txt -INSTALL -examples/ -… - - You can pass the option for - additional information, rather like the UNIX command - ls -l: - -$ svn list --verbose file:///var/svn/repos - 16 sally 28361 Jan 16 23:18 README.txt - 27 sally 0 Jan 18 15:27 INSTALL - 24 harry Jan 18 11:27 examples/ - - For further details, see . - - - - - svn - subcommands - lock - - - svn lock - Lock working copy paths or URLs in the - repository, so that no other user can commit changes to - them. - - - - Synopsis - - svn lock TARGET... - - - - Description - - Lock each TARGET. If any - TARGET is already locked by - another user, print a warning and continue locking the - rest of the TARGETs. Use - to steal a lock from another user - or working copy. - - - - Alternate Names - - None - - - - Changes - - Working Copy, Repository - - - - Accesses Repository - - Yes - - - - Options - - ---targets FILENAME ---message (-m) TEXT ---file (-F) FILE ---force-log ---encoding ENC ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR ---force - - - - - Examples - - Lock two files in your working copy: - - -$ svn lock tree.jpg house.jpg -'tree.jpg' locked by user 'harry'. -'house.jpg' locked by user 'harry'. - - Lock a file in your working copy that is currently - locked by another user: - -$ svn lock tree.jpg -svn: warning: Path '/tree.jpg is already locked by user 'sally in \ - filesystem '/var/svn/repos/db' - -$ svn lock --force tree.jpg -'tree.jpg' locked by user 'harry'. - - Lock a file without a working copy: - -$ svn lock http://svn.red-bean.com/repos/test/tree.jpg -'tree.jpg' locked by user 'harry'. - - For further details, see . - - - - - svn - subcommands - log - - - svn log - Display commit log messages. - - - - Synopsis - - svn log [PATH] - svn log URL [PATH...] - svn log URL[@REV] [PATH...] - - - - Description - - Shows log messages from the repository. - If no arguments are supplied, svn - log 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 BASE:1. - 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 HEAD:1. - With , svn log - will also print all affected paths with each log message. - With , svn log - will not print the log message body itself (this is - compatible with ). - 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 to disable - this behavior, which can be useful for determining branch - points. - - - - Alternate Names - - None - - - - Changes - - Nothing - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---quiet (-q) ---verbose (-v) ---targets FILENAME ---stop-on-copy ---incremental ---limit NUM ---xml ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - You can see the log messages for all the paths that - changed in your working copy by running svn - log from the top: - -$ svn log ------------------------------------------------------------------------- -r20 | harry | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line - -Tweak. ------------------------------------------------------------------------- -r17 | sally | 2003-01-16 23:21:19 -0600 (Thu, 16 Jan 2003) | 2 lines -… - - Examine all log messages for a particular file in - your working copy: - -$ svn log foo.c ------------------------------------------------------------------------- -r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line - -Added defines. ------------------------------------------------------------------------- -r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines -… - - If you don't have a working copy handy, you can log - a URL: - -$ svn log http://svn.red-bean.com/repos/test/foo.c ------------------------------------------------------------------------- -r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line - -Added defines. ------------------------------------------------------------------------- -r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines -… - - If you want several distinct paths underneath the - same URL, you can use the URL [PATH...] - syntax. - -$ svn log http://svn.red-bean.com/repos/test/ foo.c bar.c ------------------------------------------------------------------------- -r32 | sally | 2003-01-13 00:43:13 -0600 (Mon, 13 Jan 2003) | 1 line - -Added defines. ------------------------------------------------------------------------- -r31 | harry | 2003-01-10 12:25:08 -0600 (Fri, 10 Jan 2003) | 1 line - -Added new file bar.c ------------------------------------------------------------------------- -r28 | sally | 2003-01-07 21:48:33 -0600 (Tue, 07 Jan 2003) | 3 lines -… - - When you're concatenating the results of multiple - calls to the log command, you may want to use the - option. svn - log 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 svn log on a range of two - revisions, you would get this: - -$ svn log -r 14:15 ------------------------------------------------------------------------- -r14 | … - ------------------------------------------------------------------------- -r15 | … - ------------------------------------------------------------------------- - - However, if you wanted to gather 2 non-sequential - log messages into a file, you might do something like - this: - -$ svn log -r 14 > mylog -$ svn log -r 19 >> mylog -$ svn log -r 27 >> mylog -$ cat mylog ------------------------------------------------------------------------- -r14 | … - ------------------------------------------------------------------------- ------------------------------------------------------------------------- -r19 | … - ------------------------------------------------------------------------- ------------------------------------------------------------------------- -r27 | … - ------------------------------------------------------------------------- - - You can avoid the clutter of the double dashed lines - in your output by using the incremental option: - -$ svn log --incremental -r 14 > mylog -$ svn log --incremental -r 19 >> mylog -$ svn log --incremental -r 27 >> mylog -$ cat mylog ------------------------------------------------------------------------- -r14 | … - ------------------------------------------------------------------------- -r19 | … - ------------------------------------------------------------------------- -r27 | … - - The option provides - similar output control when using the - option. - - If you run svn log on a specific - path and provide a specific revision and get no output - at all - -$ svn log -r 20 http://svn.red-bean.com/untouched.txt ------------------------------------------------------------------------- - - 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: - -$ svn log -r 20 touched.txt ------------------------------------------------------------------------- -r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line - -Made a change. ------------------------------------------------------------------------- - - - - - - - svn - subcommands - merge - - - svn merge - Apply the differences between two sources to a - working copy path. - - - - Synopsis - - svn merge [-c M | -r N:M] SOURCE[@REV] [WCPATH] - svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH] - svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH] - - - - Description - - In the first and second forms, the source paths (URLs - in the first form, working copy paths in the second) are - specified at revisions N and - M. These are the two sources - to be compared. The revisions default to - HEAD if omitted. - The -c M option is equivalent to - -r N:M where N = - M-1. Using -c -M does - the reverse: -r M:N where - N = M-1. - In the third form, SOURCE - can be a URL or working copy item, in which case the - corresponding URL is used. This URL, at revisions - N and - M, defines the two sources to - be compared. - WCPATH is the working copy - path that will receive the changes. If - WCPATH is omitted, a default - value of . is assumed, - unless the sources have identical basenames that match a - file within .: in which - case, the differences will be applied to that file. - Unlike svn diff, 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. - - - - Alternate Names - - None - - - - Changes - - Working copy - - - - Accesses Repository - - Only if working with URLs - - - - Options - - ---revision (-r) REV ---change (-c) REV ---non-recursive (-N) ---quiet (-q) ---force ---dry-run ---diff3-cmd CMD ---extensions (-x) ARG ---ignore-ancestry ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - 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): - -$ svn merge -r 250:HEAD http://svn.red-bean.com/repos/branches/my-branch -U myproj/tiny.txt -U myproj/thhgttg.txt -U myproj/win.txt -U myproj/flo.txt - - 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: - -$ svn merge -r 23:30 file:///var/svn/repos/trunk/vendors -U myproj/thhgttg.txt -… - - To merge changes to a single file: - -$ cd myproj -$ svn merge -r 30:31 thhgttg.txt -U thhgttg.txt - - - - - - svn - subcommands - mkdir - - - svn mkdir - Create a new directory under version control. - - - - Synopsis - - svn mkdir PATH... - svn mkdir URL... - - - - Description - - Create a directory with a name given by the final - component of the PATH or URL. - A directory specified by a working copy - PATH 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. - - - - Alternate Names - - None - - - - Changes - - Working copy, repository if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---message (-m) TEXT ---file (-F) FILE ---quiet (-q) ---username USER ---password PASS ---no-auth-cache ---non-interactive ---editor-cmd EDITOR ---encoding ENC ---force-log ---config-dir DIR - - - - - Examples - - Create a directory in your working copy: - -$ svn mkdir newdir -A newdir - - Create one in the repository (instant commit, so a - log message is required): - -$ svn mkdir -m "Making a new dir." http://svn.red-bean.com/repos/newdir - -Committed revision 26. - - - - - - svn - subcommands - move - - - svn move - Move a file or directory. - - - - Synopsis - - svn move SRC... DST - - - - Description - - This command moves files or directories in your - working copy or in the repository. - - This command is equivalent to an svn - copy followed by svn - delete. - - When moving multiple sources, they will be added as - children of DST, which must be - a directory. - - 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. - - - - WC -> WC - - Move and schedule a file or directory for - addition (with history). - - - - URL -> URL - - Complete server-side rename. - - - - - - - Alternate Names - - mv, rename, ren - - - - Changes - - Working copy, repository if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---message (-m) TEXT ---file (-F) FILE ---revision (-r) REV (Deprecated) ---quiet (-q) ---force ---username USER ---password PASS ---no-auth-cache ---non-interactive ---editor-cmd EDITOR ---encoding ENC ---force-log ---config-dir DIR - - - - - Examples - - Move a file in your working copy: - -$ svn move foo.c bar.c -A bar.c -D foo.c - - Move several files in your working copy into a subdirectory: - -$ svn move baz.c bat.c qux.c src -A src/baz.c -D baz.c -A src/bat.c -D bat.c -A src/qux.c -D qux.c - - Move a file in the repository (an immediate commit, - so it requires a commit message): - -$ svn move -m "Move a file" http://svn.red-bean.com/repos/foo.c \ - http://svn.red-bean.com/repos/bar.c - -Committed revision 27. - - - - - - svn - subcommands - propdel - - - svn propdel - Remove a property from an item. - - - - Synopsis - - svn propdel PROPNAME [PATH...] - svn propdel PROPNAME --revprop -r REV [TARGET] - - - - Description - - 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 - (TARGET only determines which - repository to access). - - - - Alternate Names - - pdel, pd - - - - Changes - - Working copy, repository only if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---quiet (-q) ---recursive (-R) ---revision (-r) REV ---revprop ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - Delete a property from a file in your working - copy - -$ svn propdel svn:mime-type some-script -property 'svn:mime-type' deleted from 'some-script'. - - Delete a revision property: - -$ svn propdel --revprop -r 26 release-date -property 'release-date' deleted from repository revision '26' - - - - - - svn - subcommands - propedit - - - svn propedit - Edit the property of one or more items under - version control. - - - - Synopsis - - svn propedit PROPNAME PATH... - svn propedit PROPNAME --revprop -r REV [TARGET] - - - - Description - - 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 - (TARGET only determines which - repository to access). - - - - Alternate Names - - pedit, pe - - - - Changes - - Working copy, repository only if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---revision (-r) REV ---revprop ---username USER ---password PASS ---no-auth-cache ---non-interactive ---encoding ENC ---editor-cmd EDITOR ---config-dir DIR - - - - - Examples - - svn propedit makes it easy to - modify properties that have multiple values: - -$ svn propedit svn:keywords foo.c - <svn will launch your favorite editor here, with a buffer open - containing the current contents of the svn:keywords property. You - can add multiple values to a property easily here by entering one - value per line.> -Set new value for property 'svn:keywords' on 'foo.c' - - - - - - svn - subcommands - propget - - - svn propget - Print the value of a property. - - - - Synopsis - - svn propget PROPNAME [TARGET[@REV]...] - svn propget PROPNAME --revprop -r REV [URL] - - - - Description - - 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 for more information on - properties. - - - - Alternate Names - - pget, pg - - - - Changes - - Working copy, repository only if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---recursive (-R) ---revision (-r) REV ---revprop ---strict ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - Examine a property of a file in your working - copy: - -$ svn propget svn:keywords foo.c -Author -Date -Rev - - The same goes for a revision property: - -$ svn propget svn:log --revprop -r 20 -Began journal. - - - - - - svn - subcommands - proplist - - - svn proplist - List all properties. - - - - Synopsis - - svn proplist [TARGET[@REV]...] - svn proplist --revprop -r REV [TARGET] - - - - Description - - 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 - (TARGET only determines which - repository to access). - - - - Alternate Names - - plist, pl - - - - Changes - - Working copy, repository only if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---verbose (-v) ---recursive (-R) ---revision (-r) REV ---quiet (-q) ---revprop ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - You can use proplist to see the properties on an - item in your working copy: - -$ svn proplist foo.c -Properties on 'foo.c': - svn:mime-type - svn:keywords - owner - - But with the flag, svn - proplist is extremely handy as it also shows you the - values for the properties: - -$ svn proplist --verbose foo.c -Properties on 'foo.c': - svn:mime-type : text/plain - svn:keywords : Author Date Rev - owner : sally - - - - - - svn - subcommands - propset - - - svn propset - Set PROPNAME to PROPVAL on files, directories, or revisions. - - - - Synopsis - - svn propset PROPNAME [PROPVAL | -F VALFILE] PATH... - svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET] - - - - Description - - Set PROPNAME to - PROPVAL 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 - (TARGET only determines which - repository to access). - - Subversion has a number of special - properties that affect its behavior. See for more on these - properties. - - - - - Alternate Names - - pset, ps - - - - Changes - - Working copy, repository only if operating on a URL - - - - Accesses Repository - - Only if operating on a URL - - - - Options - - ---file (-F) FILE ---quiet (-q) ---revision (-r) REV ---targets FILENAME ---recursive (-R) ---revprop ---username USER ---password PASS ---no-auth-cache ---non-interactive ---encoding ENC ---force ---config-dir DIR - - - - - Examples - - Set the mime type on a file: - -$ svn propset svn:mime-type image/jpeg foo.jpg -property 'svn:mime-type' set on 'foo.jpg' - - On a UNIX system, if you want a file to have the - executable permission set: - -$ svn propset svn:executable ON somescript -property 'svn:executable' set on 'somescript' - - Perhaps you have an internal policy to set certain - properties for the benefit of your coworkers: - -$ svn propset owner sally foo.c -property 'owner' set on 'foo.c' - - If you made a mistake in a log message for a - particular revision and want to change it, use - and set svn:log - to the new log message: - -$ svn propset --revprop -r 25 svn:log "Journaled about trip to New York." -property 'svn:log' set on repository revision '25' - - Or, if you don't have a working copy, you can - provide a URL. - -$ svn propset --revprop -r 26 svn:log "Document nap." http://svn.red-bean.com/repos -property 'svn:log' set on repository revision '25' - - 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: - -$ svn propset owner-pic -F sally.jpg moo.c -property 'owner-pic' set on 'moo.c' - - - 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 - pre-revprop-change. See for more information on - hook scripts. - - - - - - svn - subcommands - resolved - - - svn resolved - Remove conflicted state on - working copy files or directories. - - - - Synopsis - - svn resolved PATH... - - - - Description - - Remove conflicted state on working copy - files or directories. This routine does not semantically - resolve conflict markers; it merely removes - conflict-related artifact files and allows - PATH to be committed again; - that is, it tells Subversion that the conflicts have been - resolved. See for an in-depth look at - resolving conflicts. - - - - Alternate Names - - None - - - - Changes - - Working copy - - - - Accesses Repository - - No - - - - Options - - ---targets FILENAME ---recursive (-R) ---quiet (-q) ---config-dir DIR - - - - - Examples - - If you get a conflict on an update, your working - copy will sprout three new files: - -$ svn update -C foo.c -Updated to revision 31. -$ ls -foo.c -foo.c.mine -foo.c.r30 -foo.c.r31 - - Once you've resolved the conflict and - foo.c is ready to be committed, run - svn resolved to let your working copy - know you've taken care of everything. - - You can just remove the - conflict files and commit, but svn - resolved 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. - - - - - - svn - subcommands - revert - - - svn revert - Undo all local edits. - - - - Synopsis - - svn revert PATH... - - - - Description - - Reverts any local changes to a file or directory and - resolves any conflicted states. svn - revert 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 - unscheduled). - - - - Alternate Names - - None - - - - Changes - - Working copy - - - - Accesses Repository - - No - - - - Options - - ---targets FILENAME ---recursive (-R) ---quiet (-q) ---config-dir DIR - - - - - Examples - - Discard changes to a file: - -$ svn revert foo.c -Reverted foo.c - - If you want to revert a whole directory of files, - use the flag: - -$ svn revert --recursive . -Reverted newdir/afile -Reverted foo.c -Reverted bar.txt - - Lastly, you can undo any scheduling - operations: - -$ svn add mistake.txt whoops -A mistake.txt -A whoops -A whoops/oopsie.c - -$ svn revert mistake.txt whoops -Reverted mistake.txt -Reverted whoops - -$ svn status -? mistake.txt -? whoops - - - svn revert is inherently - dangerous, since its entire purpose is to throw away - data—namely, your uncommitted changes. Once - you've reverted, Subversion provides no - way to get back those uncommitted - changes. - If you provide no targets to svn - revert, it will do nothing—to protect - you from accidentally losing changes in your working - copy, svn revert requires you to - provide at least one target. - - - - - - svn - subcommands - status - - - svn status - Print the status of working copy files and directories. - - - - Synopsis - - svn status [PATH...] - - - - Description - - Print the status of working copy files and - directories. With no arguments, it prints only locally - modified items (no repository access). With - , it adds working revision - and server out-of-date information. With - , it prints full revision - information on every item. - 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. - The first column indicates that an item - was added, deleted, or otherwise changed. - - - ' ' - - No modifications. - - - - 'A' - - Item is scheduled for Addition. - - - - 'D' - - Item is scheduled for Deletion. - - - - 'M' - - Item has been modified. - - - - 'R' - - 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. - - - - 'C' - - The contents (as opposed to the properties) of - the item conflict with updates received from the - repository. - - - - 'X' - - Item is present because of an externals definition. - - - - 'I' - - Item is being ignored (e.g. with the - svn:ignore property). - - - - '?' - - Item is not under version control. - - - - '!' - - Item is missing (e.g. you moved or deleted it - without using svn). This also - indicates that a directory is incomplete (a checkout - or update was interrupted). - - - - '~' - - Item is versioned as one kind of object (file, - directory, link), but has been replaced by different - kind of object. - - - - The second column tells the status of a file's or - directory's properties. - - - ' ' - - No modifications. - - - - 'M' - - Properties for this item have been - modified. - - - - 'C' - - Properties for this item are in conflict with - property updates received from the - repository. - - - - The third column is populated only if the - working copy directory is locked. (See - .) - - - ' ' - - Item is not locked. - - - - 'L' - - Item is locked. - - - - The fourth column is populated only if the item is - scheduled for addition-with-history. - - - ' ' - - No history scheduled with commit. - - - - '+' - - History scheduled with commit. - - - - The fifth column is populated only if the item is - switched relative to its parent (see ). - - - ' ' - - Item is a child of its parent directory. - - - - 'S' - - Item is switched. - - - - The sixth column is populated with lock information. - - - ' ' - - When is used, - the file is not locked. If - is - not used, this merely means that - the file is not locked in this working copy. - - - - K - - File is locked in this working copy. - - - - O - - File is locked either by another user or in - another working copy. This only appears when - is used. - - - - T - - File was locked in this working copy, but the - lock has been stolen and is invalid. - The file is currently locked in the repository. This - only appears when is - used. - - - - B - - File was locked in this working copy, but the - lock has been broken and is invalid. - The file is no longer locked This only appears when - is used. - - - - The out-of-date information appears in the seventh - column (only if you pass the - option). - - - ' ' - - The item in your working copy is up-to-date. - - - - '*' - - A newer revision of the item exists on the - server. - - - - The remaining fields are variable width and - delimited by spaces. The working revision is the next - field if the or - options are passed. - If the option is passed, - the last committed revision and last committed author - are displayed next. - The working copy path is always the final field, so - it can include spaces. - - - - Alternate Names - - stat, st - - - - Changes - - Nothing - - - - Accesses Repository - - Only if using - - - - Options - - ---show-updates (-u) ---verbose (-v) ---non-recursive (-N) ---quiet (-q) ---no-ignore ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR ---ignore-externals - - - - - Examples - - This is the easiest way to find out what changes you - have made to your working copy: - -$ svn status wc - M wc/bar.c -A + wc/qax.c - - If you want to find out what files in your working - copy are out-of-date, pass the - option (this will - not make any changes to your - working copy). Here you can see that - wc/foo.c has changed in the - repository since we last updated our working - copy: - -$ svn status --show-updates wc - M 965 wc/bar.c - * 965 wc/foo.c -A + 965 wc/qax.c -Status against revision: 981 - - - only places an asterisk next to - items that are out of date (that is, items that will be - updated from the repository if you run svn - update). does - not 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). - - And finally, the most information you can get out of - the status subcommand: - -$ svn status --show-updates --verbose wc - M 965 938 sally wc/bar.c - * 965 922 harry wc/foo.c -A + 965 687 harry wc/qax.c - 965 687 harry wc/zig.c -Head revision: 981 - - For many more examples of svn status, - see . - - - - - svn - subcommands - switch - - - svn switch - Update working copy to a different URL. - - - - Synopsis - - svn switch URL [PATH] - switch --relocate FROM TO [PATH...] - - - - Description - - The first variant of this subcommand (without the - 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 for an in-depth look - at switching. - - The option causes svn - switch to do something different: it updates - your working copy to point to the - same 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). - - - - Alternate Names - - sw - - - - Changes - - Working copy - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---non-recursive (-N) ---quiet (-q) ---diff3-cmd CMD ---relocate FROM TO ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR - - - - - Examples - - If you're currently inside the directory - vendors, which was branched to - vendors-with-fix, and you'd like to - switch your working copy to that branch: - -$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix . -U myproj/foo.txt -U myproj/bar.txt -U myproj/baz.c -U myproj/qux.c -Updated to revision 31. - - And to switch back, just provide the URL to the - location in the repository from which you originally - checked out your working copy: - -$ svn switch http://svn.red-bean.com/repos/trunk/vendors . -U myproj/foo.txt -U myproj/bar.txt -U myproj/baz.c -U myproj/qux.c -Updated to revision 31. - - - You can just switch part of your working copy to a - branch if you don't want to switch your entire working - copy. - - Sometimes an administrator might change the - base location 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 svn switch - command rewrite the beginnings of all the - URLs in your working copy. Use the - 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 .svn/ directories - which runs s/OldRoot/NewRoot/. - -$ svn checkout file:///var/svn/repos test -A test/a -A test/b -… - -$ mv repos newlocation -$ cd test/ - -$ svn update -svn: Unable to open an ra_local session to URL -svn: Unable to open repository 'file:///var/svn/repos' - -$ svn switch --relocate file:///var/svn/repos file:///tmp/newlocation . -$ svn update -At revision 3. - - - Be careful when using the - 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 - . Here's the rule of - thumb: - - - If the working copy needs to reflect a - new directory within the - repository, then use just svn - switch. - - - If the working copy still reflects the - same repository directory, but the location of the - repository itself has changed, then use svn - switch --relocate. - - - - - - - - svn - subcommands - unlock - - - svn unlock - Unlock working copy paths or URLs. - - - - Synopsis - - svn unlock TARGET... - - - - Description - - Unlock each TARGET. If any - TARGET 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 TARGETs. Use - to break a lock belonging to - another user or working copy. - - - - Alternate Names - - None - - - - Changes - - Working Copy, Repository - - - - Accesses Repository - - Yes - - - - Options - - ---targets FILENAME ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR ---force - - - - - Examples - - Unlock two files in your working copy: - - -$ svn unlock tree.jpg house.jpg -'tree.jpg' unlocked. -'house.jpg' unlocked. - - Unlock a file in your working copy that is currently - locked by another user: - -$ svn unlock tree.jpg -svn: 'tree.jpg' is not locked in this working copy -$ svn unlock --force tree.jpg -'tree.jpg' unlocked. - - Unlock a file without a working copy: - -$ svn unlock http://svn.red-bean.com/repos/test/tree.jpg -'tree.jpg unlocked. - - For further details, see . - - - - - svn - subcommands - update - - - svn update - Update your working copy. - - - - Synopsis - - svn update [PATH...] - - - - Description - - svn update brings changes from the - repository into your working copy. If no revision is given, - it brings your working copy up-to-date with the - HEAD revision. Otherwise, it - synchronizes the working copy to the revision given by the - option. As part of the - synchronization, svn update also - removes any stale locks (see ) found in the - working copy. - For each updated item, it prints a line that starts - with a character reporting the action taken. These - characters have the following meaning: - - - A - - Added - - - - D - - Deleted - - - - U - - Updated - - - - C - - Conflicted - - - - G - - Merged - - - - 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. - - - - Alternate Names - - up - - - - Changes - - Working copy - - - - Accesses Repository - - Yes - - - - Options - - ---revision (-r) REV ---non-recursive (-N) ---quiet (-q) ---no-ignore ---incremental ---diff3-cmd CMD ---username USER ---password PASS ---no-auth-cache ---non-interactive ---config-dir DIR ---ignore-externals - - - - - Examples - - Pick up repository changes that have happened since - your last update: - -$ svn update -A newdir/toggle.c -A newdir/disclose.c -A newdir/launch.c -D newdir/README -Updated to revision 32. - - You can also update your working copy to an older - revision (Subversion doesn't have the concept of - sticky files like CVS does; see ): - -$ svn update -r30 -A newdir/README -D newdir/toggle.c -D newdir/disclose.c -D newdir/launch.c -U foo.c -Updated to revision 30. - - - If you want to examine an older revision of a - single file, you may want to use svn - cat instead—it won't change your working copy. - - - -
-
- - - -
- - - <command>svnadmin</command> - - - svnadmin is the administrative tool for - monitoring and repairing your Subversion repository. For - detailed information, see . - Since svnadmin 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. - -
- - <command>svnadmin</command> Options - - - - - - - - (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. - - - - - - - - (Berkeley DB specific) Disables fsync when - committing database transactions. Used with the - svnadmin create command to create a - Berkeley DB backed repository with - DB_TXN_NOSYNC enabled (which improves - speed but has some risks associated with it). - - - - - - - - Bypass the repository hook system. - - - - - - - - Removes unused Berkeley DB logs. - - - - - - - - - By default, when loading data into repository that - already contains revisions, svnadmin - will ignore the UUID from the dump - stream. This option will cause the repository's - UUID to be set to the - UUID from the stream. - - - - - - - - By default, when loading an empty repository, - svnadmin will ignore the - UUID from the dump stream. This - option will force that UUID to be ignored (useful for - overriding your configuration file if it has - set). - - - - - - - - Dump a revision only as a diff against the - previous revision, instead of the usual - fulltext. - - - - - - - - When loading a dump file, root paths at - DIR instead of - /. - - - - () - ARG - - Specify a particular revision to operate - on. - - - - - - - - Do not show normal progress—show only - errors. - - - - - - - - When loading a dump file, run the repository's - post-commit hook after finalizing each newly loaded - revision. - - - - - - - - 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. - - - -
- -
- - <command>svnadmin</command> Subcommands - - - - svnadmin - subcommands - create - - - svnadmin create - Create a new, empty repository. - - - - Synopsis - - svnadmin create REPOS_PATH - - - - Description - - Create a new, empty repository at the path provided. - If the provided directory does not exist, it will be - created for you.Remember, - svnadmin works only with local - paths, not - URLs. As of - Subversion 1.2, svnadmin creates new - repositories with the fsfs filesystem - backend by default. - While svnadmin create will create - the base directory for a new repository, it will not - create intermediate directories. For example, if you - have an empty directory named - /var/svn, creating - /var/svn/repos will work, while - attempting to create - /var/svn/subdirectory/repos will - fail with an error. - - - - Options - - ---bdb-txn-nosync ---bdb-log-keep ---config-dir DIR ---fs-type TYPE - - - - - Examples - - Creating a new repository is just this easy: - -$ svnadmin create /var/svn/repos - - 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: - -$ svnadmin create /var/svn/repos --fs-type fsfs - - - - - - svnadmin - subcommands - deltify - - - svnadmin deltify - Deltify changed paths in a revision range. - - - - Synopsis - - svnadmin deltify [-r LOWER[:UPPER]] REPOS_PATH - - - - Description - - svnadmin deltify exists in - current versions of Subversion only for historical reasons. - This command is deprecated and no longer needed. - 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 very little gain, and - this feature was deprecated. - - - - Options - - ---revision (-r) REV ---quiet (-q) - - - - - - svnadmin - subcommands - dump - - - svnadmin dump - Dump the contents of filesystem to stdout. - - - - Synopsis - - svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental] - - - - Description - - Dump the contents of filesystem to stdout in a - dumpfile portable format, sending feedback - to stderr. Dump revisions - LOWER rev through - UPPER rev. If no revisions are - given, dump all revision trees. If only - LOWER is given, dump that one - revision tree. See - for a practical use. - 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. - There are two useful options which modify the dumpfile - generator's behavior. The first is the - 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. - The second useful option is . - This option causes svnadmin dump 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 - svnadmin dump creates. There are, however, - disadvantages to using this option—deltified - dumpfiles are more CPU intensive to create, cannot be - operated on by svndumpfilter, and tend - not to compress as well as their non-deltified counterparts - when using third-party tools like gzip - and bzip2. - - - - Options - - ---revision (-r) REV ---incremental ---quiet (-q) ---deltas - - - - - Examples - - Dump your whole repository: - -$ svnadmin dump /var/svn/repos -SVN-fs-dump-format-version: 1 -Revision-number: 0 -* Dumped revision 0. -Prop-content-length: 56 -Content-length: 56 -… - - Incrementally dump a single transaction from your - repository: - -$ svnadmin dump /var/svn/repos -r 21 --incremental -* Dumped revision 21. -SVN-fs-dump-format-version: 1 -Revision-number: 21 -Prop-content-length: 101 -Content-length: 101 -… - - - - - - svnadmin - subcommands - help - - - svnadmin help - Help! - - - - Synopsis - - svnadmin help [SUBCOMMAND...] - - - - Description - - This subcommand is useful when you're trapped on a - desert island with neither a net connection nor a copy of - this book. - - - - - Alternate Names - - ?, h - - - - - svnadmin - subcommands - hotcopy - - - svnadmin hotcopy - Make a hot copy of a repository. - - - - Synopsis - - svnadmin hotcopy REPOS_PATH NEW_REPOS_PATH - - - - Description - - This subcommand makes a full hot backup - of your repository, including all hooks, configuration - files, and, of course, database files. If you pass the - option, - svnadmin 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. - - - - Options - - ---clean-logs - - - As described in , hot-copied - Berkeley DB repositories are not - portable across operating systems, nor will they work on - machines with a different endianness than - the machine where they were created. - - - - - - svnadmin - subcommands - list-dblogs - - - svnadmin list-dblogs - Ask - Berkeley DB which log files exist for a given Subversion - repository (applies only to repositories using the - bdb backend). - - - - Synopsis - - svnadmin list-dblogs REPOS_PATH - - - - Description - - Berkeley DB creates logs of all changes to the - repository, which allow it to recover in the face of - catastrophe. Unless you enable - DB_LOG_AUTOREMOVE, the log files - accumulate, although most are no longer used and can be - deleted to reclaim disk space. See for more - information. - - - - - svnadmin - subcommands - list-unused-dblogs - - - svnadmin list-unused-dblogs - Ask Berkeley DB which log files can be safely - deleted (applies only to repositories using the - bdb backend). - - - - Synopsis - - svnadmin list-unused-dblogs REPOS_PATH - - - - Description - - Berkeley DB creates logs of all changes to the - repository, which allow it to recover in the face of - catastrophe. Unless you enable - DB_LOG_AUTOREMOVE, the log files - accumulate, although most are no longer used and can be - deleted to reclaim disk space. See for more - information. - - - - Examples - - Remove all unused log files from a repository: - -$ svnadmin list-unused-dblogs /var/svn/repos -/var/svn/repos/log.0000000031 -/var/svn/repos/log.0000000032 -/var/svn/repos/log.0000000033 - -$ svnadmin list-unused-dblogs /var/svn/repos | xargs rm -## disk space reclaimed! - - - - - - svnadmin - subcommands - load - - - svnadmin load - Read a - dumpfile-formatted stream from - stdin. - - - - Synopsis - - svnadmin load REPOS_PATH - - - - Description - - Read a dumpfile-formatted stream from - stdin, committing new revisions into the repository's - filesystem. Send progress feedback to stdout. - - - - Options - - ---quiet (-q) ---ignore-uuid ---force-uuid ---use-pre-commit-hook ---use-post-commit-hook ---parent-dir - - - - - Example - - This shows the beginning of loading a repository from - a backup file (made, of course, with svnadmin - dump): - -$ svnadmin load /var/svn/restored < repos-backup -<<< Started new txn, based on original revision 1 - * adding path : test ... done. - * adding path : test/a ... done. -… - - Or if you want to load into a subdirectory: - -$ svnadmin load --parent-dir new/subdir/for/project /var/svn/restored < repos-backup -<<< Started new txn, based on original revision 1 - * adding path : test ... done. - * adding path : test/a ... done. -… - - - - - - svnadmin - subcommands - lslocks - - - svnadmin lslocks - Print descriptions of all locks. - - - - Synopsis - - svnadmin lslocks REPOS_PATH - - - - Description - - Print descriptions of all locks in a repository. - - - - Options - - None - - - - Example - - This lists the one locked file in the repository at - /var/svn/repos: - -$ svnadmin lslocks /var/svn/repos -Path: /tree.jpg -UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753 -Owner: harry -Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005) -Expires: -Comment (1 line): -Rework the uppermost branches on the bald cypress in the foreground. - - - - - - svnadmin - subcommands - lstxns - - - svnadmin lstxns - Print the names of all uncommitted transactions. - - - - Synopsis - - svnadmin lstxns REPOS_PATH - - - - Description - - Print the names of all uncommitted transactions. See - - for information on how uncommitted transactions are - created and what you should do with them. - - - - Examples - - List all outstanding transactions in a - repository. - -$ svnadmin lstxns /var/svn/repos/ -1w -1x - - - - - - svnadmin - subcommands - recover - - - svnadmin recover - Bring a repository database back into a - consistent state (applies only to repositories using the - bdb backend). In addition, if - repos/conf/passwd does not exist, it - will create a default password file . - - - - Synopsis - - svnadmin recover REPOS_PATH - - - - Description - - Run this command if you get an error indicating that - your repository needs to be recovered. - - - - Options - - ---wait - - - - - Examples - - Recover a hung repository: - -$ svnadmin recover /var/svn/repos/ -Repository lock acquired. -Please wait; recovering the repository may take some time... - -Recovery completed. -The latest repos revision is 34. - - Recovering the database requires an exclusive lock on - the repository. (This is a database lock; - see .) - If another process is accessing the repository, - then svnadmin recover will error: - -$ svnadmin recover /var/svn/repos -svn: Failed to get exclusive repository access; perhaps another process -such as httpd, svnserve or svn has it open? - -$ - - The option, however, will - cause svnadmin recover to wait - indefinitely for other processes to disconnect: - -$ svnadmin recover /var/svn/repos --wait -Waiting on repository lock; perhaps another process has it open? - -### time goes by… - -Repository lock acquired. -Please wait; recovering the repository may take some time... - -Recovery completed. -The latest repos revision is 34. - - - - - - svnadmin - subcommands - rmlocks - - - svnadmin rmlocks - Unconditionally remove one or more locks from a - repository. - - - - Synopsis - - svnadmin rmlocks REPOS_PATH LOCKED_PATH... - - - - Description - - Remove lock from each LOCKED_PATH. - - - - Options - - None - - - - Example - - This deletes the locks on - tree.jpg and - house.jpg in the repository at - /var/svn/repos - -$ svnadmin rmlocks /var/svn/repos tree.jpg house.jpg -Removed lock on '/tree.jpg. -Removed lock on '/house.jpg. - - - - - - svnadmin - subcommands - rmtxns - - - svnadmin rmtxns - Delete transactions from a repository. - - - - Synopsis - - svnadmin rmtxns REPOS_PATH TXN_NAME... - - - - Description - - Delete outstanding transactions from a repository. - This is covered in detail in . - - - - Options - - ---quiet (-q) - - - - - Examples - - Remove named transactions: - -$ svnadmin rmtxns /var/svn/repos/ 1w 1x - - Fortunately, the output of lstxns - works great as the input for rmtxns: - -$ svnadmin rmtxns /var/svn/repos/ `svnadmin lstxns /var/svn/repos/` - - Which will remove all uncommitted transactions from - your repository. - - - - - svnadmin - subcommands - setlog - - - svnadmin setlog - Set the log-message on a revision. - - - - Synopsis - - svnadmin setlog REPOS_PATH -r REVISION FILE - - - - Description - - Set the log-message on revision REVISION to the - contents of FILE. - This is similar to using svn propset - --revprop to set the svn:log property - on a revision, except that you can also use the 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. - - Revision properties are not under version control, - so this command will permanently overwrite the previous - log message. - - - - - Options - - ---revision (-r) REV ---bypass-hooks - - - - - Examples - - Set the log message for revision 19 to the contents of - the file msg: - -$ svnadmin setlog /var/svn/repos/ -r 19 msg - - - - - - - svnadmin - subcommands - verify - - - svnadmin verify - Verify the data stored in the repository. - - - - Synopsis - - svnadmin verify REPOS_PATH - - - - Description - - 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 bitrot. 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?). - - - - Examples - - Verify a hung repository: - -$ svnadmin verify /var/svn/repos/ -* Verified revision 1729. - - - -
-
- - - -
- - - <command>svnlook</command> - - - svnlook 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 peeking. - svnlook is typically used by the - repository hooks, but a repository administrator might find it - useful for diagnostic purposes. - Since svnlook 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. - If no revision or transaction is specified, - svnlook defaults to the youngest (most - recent) revision of the repository. - -
- - <command>svnlook</command> Options - - Options in svnlook are global, just - like in svn and - svnadmin; however, most options only - apply to one subcommand since the functionality of - svnlook is (intentionally) limited in - scope. - - - - - - - Prevents svnlook diff 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. - - - - - - - - Prevents svnlook diff 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. - - - - - () - - Specify a particular revision number that you wish - to examine. - - - - - - - - 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. - - - - - () - - Specify a particular transaction ID that you wish to - examine. - - - - - - - - Show the filesystem node revision IDs for each path in the filesystem - tree. - - - -
- -
- - <command>svnlook</command> Subcommands - - - - svnlook - subcommands - author - - - svnlook author - Print the author. - - - - Synopsis - - svnlook author REPOS_PATH - - - - Description - - Print the author of a revision or transaction in - the repository. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - svnlook author is handy, but not - very exciting: - -$ svnlook author -r 40 /var/svn/repos -sally - - - - - - svnlook - subcommands - cat - - - svnlook cat - Print the contents of a file. - - - - Synopsis - - svnlook cat REPOS_PATH PATH_IN_REPOS - - - - Description - - Print the contents of a file. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - This shows the contents of a file in transaction - ax8, located at - /trunk/README: - -$ svnlook cat -t ax8 /var/svn/repos /trunk/README - - Subversion, a version control system. - ===================================== - -$LastChangedDate: 2003-07-17 10:45:25 -0500 (Thu, 17 Jul 2003) $ - -Contents: - - I. A FEW POINTERS - II. DOCUMENTATION - III. PARTICIPATING IN THE SUBVERSION COMMUNITY -… - - - - - - svnlook - subcommands - changed - - - svnlook changed - Print the paths that were changed. - - - - Synopsis - - svnlook changed REPOS_PATH - - - - Description - - Print the paths that were changed in a particular - revision or transaction, as well as svn - update-style status letters in the first two - columns: - - - 'A ' - - Item added to repository. - - - - 'D ' - - Item deleted from repository. - - - - 'U ' - - File contents changed. - - - - ' U' - - Properties of item changed. Note the leading space. - - - - 'UU' - - File contents and properties changed. - - - - Files and directories can be distinguished, as directory - paths are displayed with a trailing '/' - character. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - 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 /: - -$ svnlook changed -r 39 /var/svn/repos -A trunk/vendors/deli/ -A trunk/vendors/deli/chips.txt -A trunk/vendors/deli/sandwich.txt -A trunk/vendors/deli/pickle.txt -U trunk/vendors/baker/bagel.txt - U trunk/vendors/baker/croissant.txt -UU trunk/vendors/baker/pretzel.txt -D trunk/vendors/baker/baguette.txt - - - - - - svnlook - subcommands - date - - - svnlook date - Print the datestamp. - - - - Synopsis - - svnlook date REPOS_PATH - - - - Description - - Print the datestamp of a revision or transaction in - a repository. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - This shows the date of revision 40 of a test - repository: - -$ svnlook date -r 40 /var/svn/repos/ -2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003) - - - - - - svnlook - subcommands - diff - - - svnlook diff - Print differences of changed files and properties. - - - - Synopsis - - svnlook diff REPOS_PATH - - - - Description - - Print GNU-style differences of changed files and - properties in a repository. - - - - Options - - ---revision (-r) REV ---transaction (-t) ---no-diff-added ---no-diff-deleted - - - - - Examples - - This shows a newly added (empty) file, a deleted - file, and a copied file: - -$ svnlook diff -r 40 /var/svn/repos/ -Copied: egg.txt (from rev 39, trunk/vendors/deli/pickle.txt) - -Added: trunk/vendors/deli/soda.txt -============================================================================== - -Modified: trunk/vendors/deli/sandwich.txt -============================================================================== ---- trunk/vendors/deli/sandwich.txt (original) -+++ trunk/vendors/deli/sandwich.txt 2003-02-22 17:45:04.000000000 -0600 -@@ -0,0 +1 @@ -+Don't forget the mayo! - -Modified: trunk/vendors/deli/logo.jpg -============================================================================== -(Binary files differ) - -Deleted: trunk/vendors/deli/chips.txt -============================================================================== - -Deleted: trunk/vendors/deli/pickle.txt -============================================================================== - - If a file has a non-textual - svn:mime-type property, then the - differences are not explicitly shown. - - - - - svnlook - subcommands - dirs-changed - - - svnlook dirs-changed - Print the directories that were themselves changed. - - - - Synopsis - - svnlook dirs-changed REPOS_PATH - - - - Description - - Print the directories that were themselves changed - (property edits) or whose file children were - changed. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - This shows the directories that changed in - revision 40 in our sample repository: - -$ svnlook dirs-changed -r 40 /var/svn/repos -trunk/vendors/deli/ - - - - - - svnlook - subcommands - help - - - svnlook help - Help! - - - - Synopsis - - Also svnlook -h and svnlook -?. - - - - Description - - Displays the help message for svnlook. This - command, like its brother svn help, is - also your friend, even though you never call it anymore - and forgot to invite it to your last party. - - - - Alternate Names - - ?, h - - - - - svnlook - subcommands - history - - - svnlook history - Print information about the history of a path in - the repository (or the root directory if no path is - supplied). - - - - Synopsis - - svnlook history REPOS_PATH [PATH_IN_REPOS] - - - - Description - - Print information about the history of a path in - the repository (or the root directory if no path is - supplied). - - - - Options - - ---revision (-r) REV ---show-ids - - - - - Examples - - This shows the history output for the path - /tags/1.0 as of revision 20 in our - sample repository. - -$ svnlook history -r 20 /var/svn/repos /tags/1.0 --show-ids -REVISION PATH <ID> --------- --------- - 19 /tags/1.0 <1.2.12> - 17 /branches/1.0-rc2 <1.1.10> - 16 /branches/1.0-rc2 <1.1.x> - 14 /trunk <1.0.q> - 13 /trunk <1.0.o> - 11 /trunk <1.0.k> - 9 /trunk <1.0.g> - 8 /trunk <1.0.e> - 7 /trunk <1.0.b> - 6 /trunk <1.0.9> - 5 /trunk <1.0.7> - 4 /trunk <1.0.6> - 2 /trunk <1.0.3> - 1 /trunk <1.0.2> - - - - - - svnlook - subcommands - info - - - svnlook info - Print the author, datestamp, log message size, - and log message. - - - - Synopsis - - svnlook info REPOS_PATH - - - - Description - - Print the author, datestamp, log message size (in bytes) - and log message, followed by a newline character. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - This shows the info output for revision 40 in our - sample repository. - -$ svnlook info -r 40 /var/svn/repos -sally -2003-02-22 17:44:49 -0600 (Sat, 22 Feb 2003) -16 -Rearrange lunch. - - - - - - svnlook - subcommands - lock - - - svnlook lock - If a lock exists on a path in the repository, - describe it. - - - - Synopsis - - svnlook lock REPOS_PATH PATH_IN_REPOS - - - - Description - - Print all information available for the lock at - PATH_IN_REPOS. If - PATH_IN_REPOS is not locked, - print nothing. - - - - Options - - None - - - - Examples - - This describes the lock on the file - tree.jpg. - -$ svnlook lock /var/svn/repos tree.jpg -UUID Token: opaquelocktoken:ab00ddf0-6afb-0310-9cd0-dda813329753 -Owner: harry -Created: 2005-07-08 17:27:36 -0500 (Fri, 08 Jul 2005) -Expires: -Comment (1 line): -Rework the uppermost branches on the bald cypress in the foreground. - - - - - - svnlook - subcommands - log - - - svnlook log - Print the log message, followed by a newline - character. - - - - Synopsis - - svnlook log REPOS_PATH - - - - Description - - Print the log message. - - - - Options - - ---revision (-r) REV ---transaction (-t) - - - - - Examples - - This shows the log output for revision 40 in our sample - repository: - -$ svnlook log /var/svn/repos/ -Rearrange lunch. - - - - - - svnlook - subcommands - propget - - - svnlook propget - Print the raw value of a property on a path in - the repository. - - - - Synopsis - - svnlook propget REPOS_PATH PROPNAME [PATH_IN_REPOS] - - - - Description - - List the value of a property on a path in the - repository. - - - - Alternate Names - - pg, pget - - - - Options - - ---revision (-r) REV ---transaction (-t) ---revprop - - - - - Examples - - This shows the value of the seasonings property - on the file /trunk/sandwich in the - HEAD revision: - -$ svnlook pg /var/svn/repos seasonings /trunk/sandwich -mustard - - - - - - svnlook - subcommands - proplist - - - svnlook proplist - Print the names and values of versioned file and - directory properties. - - - - Synopsis - - svnlook proplist REPOS_PATH [PATH_IN_REPOS] - - - - Description - - List the properties of a path in the repository. With - , show the property values too. - - - - Alternate Names - - pl, plist - - - - Options - - ---revision (-r) REV ---transaction (-t) ---verbose (-v) ---revprop - - - - - Examples - - This shows the names of properties set on the file - /trunk/README in the - HEAD revision: - -$ svnlook proplist /var/svn/repos /trunk/README - original-author - svn:mime-type - - This is the same command as in the previous example, - but this time showing the property values as well: - -$ svnlook --verbose proplist /var/svn/repos /trunk/README - original-author : fitz - svn:mime-type : text/plain - - - - - - svnlook - subcommands - tree - - - svnlook tree - Print the tree. - - - - Synopsis - - svnlook tree REPOS_PATH [PATH_IN_REPOS] - - - - Description - - Print the tree, starting at - PATH_IN_REPOS (if supplied, at - the root of the tree otherwise), optionally showing node - revision IDs. - - - - Options - - ---revision (-r) REV ---transaction (-t) ---show-ids - - - - - Examples - - This shows the tree output (with node-IDs) for revision - 40 in our sample repository: - -$ svnlook tree -r 40 /var/svn/repos --show-ids -/ <0.0.2j> - trunk/ <p.0.2j> - vendors/ <q.0.2j> - deli/ <1g.0.2j> - egg.txt <1i.e.2j> - soda.txt <1k.0.2j> - sandwich.txt <1j.0.2j> - - - - - - svnlook - subcommands - uuid - - - svnlook uuid - Print the repository's - UUID. - - - - Synopsis - - svnlook uuid REPOS_PATH - - - - Description - - Print the UUID for the repository. - the UUID is the repository's - universal unique - identifier. The Subversion client - uses this identifier to differentiate between one - repository and another. - - - - Examples - - -$ svnlook uuid /var/svn/repos -e7fe1b91-8cd5-0310-98dd-2f12e793c5e8 - - - - - - svnlook - subcommands - youngest - - - svnlook youngest - Print the youngest revision number. - - - - Synopsis - - svnlook youngest REPOS_PATH - - - - Description - - Print the youngest revision number of a repository. - - - - Examples - - This shows the youngest revision of our sample - repository: - -$ svnlook youngest /var/svn/repos/ -42 - - - -
-
- - - -
- - - <command>svnsync</command> - - - svnsync is the Subversion remote - repository mirroring tool. Put simply, it allows you to replay - the revisions of one repository into another one. - In any mirroring scenario, there are two repositories: the - source repository, and the mirror (or sink) - repository. The source repository is the repository from which - svnsync 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. - The svnsync process requires only read - access to the source repository; it never attempts to modify it. - But obviously, svnsync requires both read and - write access to the mirror repository. - - svnsync 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 svnsync process is the only - process permitted to modify the mirror repository. - - -
- - <command>svnsync</command> Options - - - - - - DIR - - - Instructs Subversion to read configuration - information from the specified directory instead of the - default location (.subversion in - the user's home directory). - - - - - - - - Prevents caching of authentication information - (e.g. username and password) in the Subversion - administrative directories. - - - - - - - - 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. - - - - - - PASS - - - Indicates that you are providing your password for - authentication on the command line—otherwise, if - it is needed, Subversion will prompt you for - it. - - - - - - NAME - - - Indicates that you are providing your username for - authentication on the command line—otherwise, if - it is needed, Subversion will prompt you for - it. - - - -
- -
- - <command>svnsync</command> Subcommands - - Here are the various subcommands: - - - svnsync - subcommands - copy-revprops - - - svnsync copy-revprops - Copy all revision properties for a given - revision from the source repository to the mirror - repository. - - - - Synopsis - - svnsync copy-revprops DEST_URL REV - - - - Description - - 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 - svnsync synchronize 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. svnsync - copy-revprops is the answer to this problem. - Use it to re-synchronize the revision properties for a - particular revision. - - - - Alternate Names - - None - - - - Options - - ---non-interactive ---no-auth-cache ---username NAME ---password PASS ---config-dir DIR - - - - - Examples - - Re-synchronize revision properties for a single revision: - -$ svnsync copy-revprops file:///var/svn/repos-mirror 6 -Copied properties for revision 6. -$ - - - - - - svnsync - subcommands - initialize - - - svnsync initialize - Initialize a destination repository for - synchronization from another repository. - - - - Synopsis - - svnsync initialize DEST_URL SOURCE_URL - - - - Description - - svnsync initialize 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 - svnsync operation you run on a would-be - mirror repository. - - - - Alternate Names - - init - - - - Options - - ---non-interactive ---no-auth-cache ---username NAME ---password PASS ---config-dir DIR - - - - - Examples - - Fail to initialize a mirror repository due to - inability to modify revision properties: - -$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos -svnsync: Repository has not been enabled to accept revision propchanges; -ask the administrator to create a pre-revprop-change hook -$ - - Initialize a repository as a mirror, having already - created a pre-revprop-change hook which permits all revision - property changes: - -$ svnsync initialize file:///var/svn/repos-mirror http://svn.example.com/repos -Copied properties for revision 0. -$ - - - - - - svnsync - subcommands - synchronize - - - svnsync synchronize - Transfer all pending revisions from the source - repository to the mirror repository. - - - - Synopsis - - svnsync synchronize DEST_URL - - - - Description - - The svnsync synchronize 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. - svnsync synchronize can be - gracefully cancelled and restarted. - - - - Alternate Names - - sync - - - - Options - - ---non-interactive ---no-auth-cache ---username NAME ---password PASS ---config-dir DIR - - - - - Examples - - Copy unsynchronized revisions from the source - repository to the mirror repository: - -$ svnsync synchronize file:///var/svn/repos-mirror -Committed revision 1. -Copied properties for revision 1. -Committed revision 2. -Copied properties for revision 2. -Committed revision 3. -Copied properties for revision 3. -… -Committed revision 45. -Copied properties for revision 45. -Committed revision 46. -Copied properties for revision 46. -Committed revision 47. -Copied properties for revision 47. -$ - - - -
-
- - - -
- - - <command>svnserve</command> - - - svnserve allows access to Subversion - repositories using Subversion's custom network protocol. - You can run svnserve as a standalone - server process (for clients that are using the - svn:// access method); you can have a daemon - such as inetd or xinetd - launch it for you on demand (also for - svn://), or you can have - sshd launch it on demand for the - svn+ssh:// access method. - Regardless of the access method, once the client has - selected a repository by transmitting its URL, - svnserve reads a file named - conf/svnserve.conf in the repository - directory to determine repository-specific settings such as - what authentication database to use and what authorization - policies to apply. See for details of the - svnserve.conf file. - -
- - <command>svnserve</command> Options - - Unlike the previous commands we've - described, svnserve has no - subcommands—svnserve is controlled - exclusively by options. - - - () - - Causes svnserve to run in daemon - mode. svnserve backgrounds itself - and accepts and serves TCP/IP connections on the svn - port (3690, by default). - - - - =PORT - - Causes svnserve to listen on - PORT when run in daemon mode. - (FreeBSD daemons only listen on tcp6 by default—this - option tells them to also listen on tcp4.) - - - - =HOST - - Causes svnserve to listen on the - interface specified by HOST, - which may be either a hostname or an IP address. - - - - - - - - When used together with , this - option causes svnserve to stay in the - foreground. This option is mainly useful for - debugging. - - - - () - - Causes svnserve to use the - stdin/stdout file descriptors, as is appropriate for a - daemon running out of inetd. - - - - () - - Displays a usage summary and exits. - - - - - - - - Displays version information, a list of repository - back-end modules available, and exits. - - - - =ROOT - (=ROOT) - - Sets the virtual root for repositories served by - svnserve. The pathname in URLs - provided by the client will be interpreted relative to - this root, and will not be allowed to escape this - root. - - - - () - - Causes svnserve to run in tunnel - mode, which is just like the inetd - 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 ssh. That means there's rarely - any need for you to pass this - option to svnserve. So if you find - yourself typing svnserve --tunnel on - the command line, and wondering what to do next, see - . - - - - - - - - - Used in conjunction with the - option; tells svnserve to assume that - NAME 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. - - - - () - - When running in daemon mode, causes - svnserve to spawn a thread instead of - a process for each connection (e.g. for when running on - Windows). The svnserve process still - backgrounds itself at startup time. - - - - () - - Causes svnserve to accept one - connection on the svn port, serve it, and exit. This - option is mainly useful for debugging. - - - -
-
- - - -
- - - <command>svnversion</command> - - - - - svnversion - - - svnversion - Summarize the local revision(s) of a working - copy. - - - - Synopsis - - svnversion [OPTIONS] [WC_PATH [TRAIL_URL]] - - - - Description - - svnversion is a program for - summarizing the revision mixture of a working copy. The - resultant revision number, or revision range, is written to - standard output. - It's common to use this output in your build process - when defining the version number of your program. - TRAIL_URL, if present, is the - trailing portion of the URL used to determine if - WC_PATH itself is switched - (detection of switches within - WC_PATH does not rely on - TRAIL_URL). - When WC_PATH is not defined, - the current directory will be used as the working copy path. - TRAIL_URL cannot be defined if - WC_PATH is not explicitly - given. - - - - Options - - Like svnserve, - svnversion has no subcommands, it only - has options. - - - () - - Omit the usual trailing newline from the output. - - - - () - - Use the last-changed revisions rather than the - current (i.e., highest locally available) revisions. - - - - () - - Print a help summary. - - - - - - - - Print the version of svnversion - and exit with no error. - - - - - - - Examples - - If the working copy is all at the same revision (for - example, immediately after an update), then that revision is - printed out: - -$ svnversion -4168 - - You can add TRAIL_URL to make - sure that the working copy is not switched from what you - expect. Note that the WC_PATH - is required in this command: - -$ svnversion . /var/svn/trunk -4168 - - For a mixed-revision working copy, the range of - revisions present is printed: - -$ svnversion -4123:4168 - - If the working copy contains modifications, a trailing - "M" is added: - -$ svnversion -4168M - - If the working copy is switched, a trailing "S" is - added: - -$ svnversion -4168S - - Thus, here is a mixed-revision, switched working copy - containing some local modifications: - -$ svnversion -4212:4168MS - - If invoked on a directory that is not a working copy, - svnversion assumes it is an exported - working copy and prints "exported": - -$ svnversion -exported - - - -
- - - -
- - - <command>mod_dav_svn</command> - - - - - mod_dav_svn Configuration - Directives - Apache configuration - directives for serving Subversion repositories through Apache - HTTP Server. - - - - Description - - This section briefly describes each of the Subversion - Apache configuration directives. For an in-depth - description of configuring Apache with Subversion, see .) - - - - Directives - - - - - DAV svn - - - This directive must be included in any - Directory or - Location block for a Subversion - repository. It tells httpd to use the Subversion - backend for mod_dav to handle all requests. - - - - - SVNAutoversioning On - - - 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 ModMimeUsePathInfo On - so that mod_mime can set - svn:mime-type to the correct - mime-type automatically (as best as - mod_mime is able to, of course). - For more information, see - - - - - SVNPath - - - 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 - SVNParentPath must be present, but - not both. - - - - - SVNSpecialURI - - - Specifies the URI component (namespace) for - special Subversion resources. The default is - !svn, and most - administrators will never use this directive. Only - set this if there is a pressing need to have a file - named !svn 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. - - - - - SVNReposName - - - Specifies the name of a Subversion repository for - use in HTTP GET 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. - - - - - SVNIndexXSLT - - - Specifies the URI of an XSL transformation for - directory indexes. This directive is optional. - - - - - SVNParentPath - - - 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 - SVNPath must be present, but not - both. - - - - - SVNPathAuthz - - - Control path-based authorization by enabling or - disabling subrequests. See for details. - - - - - -
- - - -
- - Subversion properties - - 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 svn: (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 svn: properties. -
- - Versioned Properties - - - - - svn:executable - - - If present on a file, the client will make the - file executable in Unix-hosted working copies. See - . - - - - - svn:mime-type - - - 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 - . - - - - - svn:ignore - - - If present on a directory, the value is a list of - unversioned file patterns to be ignored - by svn status and other - subcommands. See - - - - - - svn:keywords - - - If present on a file, the value tells the client - how to expand particular keywords within the file. - See - . - - - - - svn:eol-style - - - 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 and - . - - - - - svn:externals - - - If present on a directory, the value is a - multi-line list of other paths and URLs the client - should check out. See - . - - - - - svn:special - - - If present on a file, indicates that the file is not - an ordinary file, but a symbolic link or other special - objectAs of this writing, symbolic links - are indeed the only special objects. But - there might be more in future releases of - Subversion.. - - - - - svn:needs-lock - - - 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 - . - - - -
-
- - Unversioned Properties - - - - - svn:author - - - If present, contains the authenticated username of - the person who created the revision. (If not present, - then the revision was committed anonymously.) - - - - - svn:date - - - Contains the UTC time the revision was created, in - ISO 8601 format. The value comes from the - server machine's clock, not the - client's. - - - - - svn:log - - - Contains the log message describing the - revision. - - - - - svn:autoversioned - - - If present, the revision was created via the - autoversioning feature. See - . - - - -
-
- - - -
- - Repository Hooks - - - - - repository - hooks - start-commit - - - start-commit - Notification of the beginning of a commit. - - - - Description - - 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. - 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. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - authenticated username attempting the commit - - - - - - Common Uses - - access control - - - - - - - repository - hooks - pre-commit - - - pre-commit - Notification just prior to commit completion. - - - - Description - - 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). - 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. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - commit transaction name - - - - - - Common Uses - - change validation and control - - - - - - repository - hooks - post-commit - - - post-commit - Notification of a successful commit. - - - - Description - - 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. - The output from, and exit value returned by the - post-commit hook program are ignored. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - revision number created by the commit - - - - - - Common Uses - - commit notification, tool integration - - - - - - repository - hooks - pre-revprop-change - - - pre-revprop-change - Notification of a revision property change - attempt. - - - - Description - - 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. - 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. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - revision whose property is about to be modified - - - authenticated username attempting the propchange - - - name of the property changed - - - change description: A (added), - D (deleted), or M - (modified) - - - Additionally, Subversion passes to the hook program via - standard input the proposed value of the property. - - - - Common Uses - - access control, change validation and control - - - - - - repository - hooks - post-revprop-change - - - post-revprop-change - Notification of a successful revision property - change. - - - - Description - - 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. - The output from, and exit value returned by, the - post-revprop-change hook program are ignored. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - revision whose property was modified - - - authenticated username of the person making the change - - - name of the property changed - - - change description: A (added), - D (deleted), or M - (modified) - - - Additionally, Subversion passes to the hook program, via - standard input, the previous value of the property. - - - - Common Uses - - propchange notification - - - - - - repository - hooks - pre-lock - - - pre-lock - Notification of a path lock attempt. - - - - Description - - 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 steal the existing lock. - 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. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - versioned path which is to be locked - - - authenticated username of the person attempting the - lock - - - - - - Common Uses - - access control - - - - - - repository - hooks - post-lock - - - post-lock - Notification of a successful path lock. - - - - Description - - 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. - The output from and exit value returned by the post-lock - hook program are ignored. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - authenticated username of the person who locked the - paths - - - Additionally, the list of paths locked is passed to the - hook program via standard input, one path per line. - - - - Common Uses - - lock notification - - - - - - repository - hooks - pre-unlock - - - pre-unlock - Notification of a path unlock attempt. - - - - Description - - 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. - 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. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - versioned path which is to be locked - - - authenticated username of the person attempting the - lock - - - - - - Common Uses - - access control - - - - - - repository - hooks - post-unlock - - - post-unlock - Notification of a successful path unlock. - - - - Description - - 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. - The output from and exit value returned by, the - post-unlock hook program are ignored. - - - - Input Parameter(s) - - The command-line arguments passed to the hook program, - in order, are: - - - repository path - - - authenticated username of the person who unlocked the - paths - - - Additionally, the list of paths unlocked is passed to the - hook program via standard input, one path per line. - - - - Common Uses - - unlock notification - - -
-
- - - - Subversion Quick-Start Guide - - 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. - - If you're new to the entire concept of version control or to - the copy-modify-merge model used by both CVS and - Subversion, then you should read - before going any further. - - - - -
- - Installing Subversion - - 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 - does not 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. - The easiest way to get Subversion is to download a binary - package built for your operating system. Subversion's website - (http://subversion.tigris.org) 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. - 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 INSTALL 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 -deps. 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 INSTALL file. - 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 http://svn.collab.net/repos/svn/trunk/: - Note that the URL checked out in the example above - ends not with svn, but with a - subdirectory thereof called trunk. See - our discussion of Subversion's branching and tagging model - for the reasoning behind this. - -$ svn checkout http://svn.collab.net/repos/svn/trunk subversion -A subversion/HACKING -A subversion/INSTALL -A subversion/README -A subversion/autogen.sh -A subversion/build.conf -… - - The above command will create a working copy of the latest - (unreleased) Subversion source code into a subdirectory - named subversion 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 INSTALL file in the top level of the - working copy for details. -
- - - -
- - High-speed Tutorial - -
- - 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…. - -
- 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. - - The examples used in this appendix assume that you have - svn, the Subversion command-line client, - and svnadmin, 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 svn --version - to check.) - - Subversion stores all versioned data in a central - repository. To begin, create a new repository: - -$ svnadmin create /var/svn/repos -$ ls /var/svn/repos -conf/ dav/ db/ format hooks/ locks/ README.txt - - This command creates a new directory - /var/svn/repos 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 - . - Subversion has no concept of a project. 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 . - Either way, the repository only manages files and directories, - so it's up to humans to interpret particular directories - as projects. 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. - 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 myproject (or whatever you wish). - For reasons that will be clear later (see - ), your project's tree - structure should contain three top-level directories - named branches, - tags, and - trunk. The trunk - directory should contain all of your data, - while branches - and tags directories are empty: - -/tmp/myproject/branches/ -/tmp/myproject/tags/ -/tmp/myproject/trunk/ - foo.c - bar.c - Makefile - … - - The branches, tags, - and trunk subdirectories aren't actually - required by Subversion. They're merely a popular convention - that you'll most likely want to use later on. - Once you have your tree of data ready to go, import it into - the repository with the svn import command - (see ): - -$ svn import /tmp/myproject file:///var/svn/repos/myproject -m "initial import" -Adding /tmp/myproject/branches -Adding /tmp/myproject/tags -Adding /tmp/myproject/trunk -Adding /tmp/myproject/trunk/foo.c -Adding /tmp/myproject/trunk/bar.c -Adding /tmp/myproject/trunk/Makefile -… -Committed revision 1. -$ - - 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 myproject, which in turn - contains your data. - Note that the original /tmp/myproject - 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 - working copy of the data, a sort of private - workspace. Ask Subversion to check out a working - copy of the myproject/trunk directory in - the repository: - -$ svn checkout file:///var/svn/repos/myproject/trunk myproject -A myproject/foo.c -A myproject/bar.c -A myproject/Makefile -… -Checked out revision 1. - - Now you have a personal copy of part of the repository in a - new directory named myproject. You can edit - the files in your working copy and then commit those changes - back into the repository. - - - Enter your working copy and edit a file's - contents. - - - Run svn diff to see unified diff - output of your changes. - - - Run svn commit to commit the new - version of your file to the repository. - - - Run svn update to bring your working - copy up-to-date with the repository. - - - For a full tour of all the things you can do with your - working copy, read . - At this point, you have the option of making your repository - available to others over a network. See to learn about the different sorts of - server processes available and how to configure them. - -
-
- - - - Subversion for CVS Users - - This appendix is a guide for CVS users new to Subversion. - It's essentially a list of differences between the two systems - as viewed from 10,000 feet. For each section, we - provide backreferences to relevant chapters when - possible. - 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 broken 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. - - - -
- - Revision Numbers Are Different Now - - 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. - 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 revision 54, they're talking - about a particular tree (and indirectly, the way the filesystem - looked after the 54th commit). - Technically, it's not valid to talk about revision 5 - of foo.c. Instead, one would say - foo.c as it appears in revision - 5. Also, be careful when making assumptions about the - evolution of a file. In CVS, revisions 5 and 6 of - foo.c are always different. In Subversion, - it's most likely that foo.c did - not change between revisions 5 and - 6. - 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 /branches - or /tags directories that appear at the top - level of the repository, beside /trunk). 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 foo.c as it appears in - /branches/REL1 in revision - 5. - For more details on this topic, see . -
- - - -
- - Directory Versions - - Subversion tracks tree structures, not just file contents. - It's one of the biggest reasons Subversion was written to - replace CVS. - Here's what this means to you, as a former CVS user: - - - The svn add and svn - delete commands work on directories now, just as - they work on files. So do svn copy and - svn move. However, these commands do - not cause any kind of immediate change - in the repository. Instead, the working items are simply - scheduled for addition or deletion. No - repository changes happen until you run svn - commit. - - - Directories aren't dumb containers anymore; they have - revision numbers like files. (Or more properly, it's - correct to talk about directory - foo/ in revision 5.) - - - 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. - From a theoretical point of view, we define revision - 5 of directory foo to mean a - specific collection of directory-entries and properties. Now - suppose we start adding and removing files from - foo, and then commit. It would be a lie - to say that we still have revision 5 of - foo. However, if we bumped - foo's revision number after the commit, - that would be a lie too; there may be other changes to - foo we haven't yet received, because we - haven't updated yet. - Subversion deals with this problem by quietly tracking - committed adds and deletes in the .svn - area. When you eventually run svn update, - all accounts are settled with the repository, and the - directory's new revision number is set correctly. - Therefore, only after an update is it truly safe to - say that you have a perfect revision of a - directory. Most of the time, your working copy will - contain imperfect directory revisions. - 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. - Therefore, you are not allowed to commit - property-changes on a directory unless the directory is - up-to-date. - For more discussion about the limitations of directory - versioning, see . -
- - - -
- - More Disconnected Operations - - 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. - The .svn administrative directory - serves the same purpose as the CVS - directory, except that it also stores read-only, - pristine copies of your files. This allows you - to do many things off-line: - - - - svn status - - - Shows you any local changes you've made (see ) - - - - - svn diff - - - Shows you the details of your changes (see ) - - - - - svn revert - - - Removes your local changes (see ) - - - - Also, the cached pristine files allow the Subversion client - to send differences when committing, which CVS cannot do. - 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 rm file; svn update will still work, but - it blurs the purpose of updating. And, while we're on this - subject… - - -
- - - -
- - Distinction Between Status and Update - - In Subversion, we've tried to erase a lot of the confusion - between the cvs status and - cvs update commands. - The cvs status 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 cvs - update or cvs -n update to quickly - see their changes. If users forget to use - the option, this has the side effect of - merging repository changes they may not be ready to deal - with. - With Subversion, we've tried to remove this muddle by making - the output of svn status easy to read for - both humans and parsers. Also, svn update - only prints information about files that are updated, - not local modifications. -
- - Status - - svn status 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: - - - - - - - Contact the repository to determine, and then display, - out-of-dateness information. - - - - - - - - Show all entries under - version control. - - - - - - - - Run non-recursively (do not descend into - subdirectories). - - - - The status command has two output - formats. In the default short format, local - modifications look like this: - -$ svn status -M foo.c -M bar/baz.c - - If you specify the - () option, a longer output format is - used: - -$ svn status -u -M 1047 foo.c - * 1045 faces.html - * bloo.png -M 1050 bar/baz.c -Status against revision: 1066 - - 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 - faces.html would be patched if we updated, - and that bloo.png is a newly added file in - the repository. (The absence of any revision number next to - bloo.png means that it doesn't yet exist in - the working copy.) - - At this point, you should take a quick look at the list of - all possible status codes in - . Here are a few of the - more common status codes you'll see: - -A Resource is scheduled for Addition -D Resource is scheduled for Deletion -M Resource has local Modifications -C Resource has Conflicts (changes have not been completely merged - between the repository and working copy version) -X Resource is eXternal to this working copy (may come from another - repository). See -? Resource is not under version control -! Resource is missing or incomplete (removed by another tool than - Subversion) - - For a more detailed discussion of svn - status, see . -
-
- - Update - - svn update updates your working copy, - and only prints information about files that it updates. - Subversion has combined the CVS P and - U codes into just U. When - a merge or conflict occurs, Subversion simply prints - G or C, rather than a - whole sentence about it. - For a more detailed discussion of svn - update, see . -
-
- - - -
- - Branches and Tags - - Subversion doesn't distinguish between filesystem space and - branch 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 . - - Since Subversion treats branches and tags as ordinary - directories, always remember to check out the - trunk - (http://svn.example.com/repos/calc/trunk/) - of your project, and not the project itself - (http://svn.example.com/repos/calc/). 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.That is, providing you don't run out of - disk space before your checkout - finishes. - -
- - - -
- - Metadata Properties - - A new feature of Subversion is that you can attach arbitrary - metadata (or properties) to files and - directories. Properties are arbitrary name/value pairs - associated with files and directories in your working - copy. - To set or get a property name, use the svn - propset and svn propget - subcommands. To list all properties on an object, use - svn proplist. - For more information, see . -
- - - -
- - Conflict Resolution - - CVS marks conflicts with in-line conflict - markers, and prints a C during an - update. Historically, this has caused problems, because CVS - isn't doing enough. Many users forget about (or don't see) the - C 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. - 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 - svn resolved. See for more details. -
- - - -
- - Binary Files and Translation - - 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. - CVS users have to mark binary files with - flags, to prevent data from being garbled - (due to keyword expansion and line-ending translations). They - sometimes forget to do this. - 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 and 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. - Second, Subversion maintains an internal notion of whether a - file is text or binary data, but - this notion is only extant in the working - copy. During an svn update, Subversion will - perform contextual merges on locally modified text files, but - will not attempt to do so for binary files. - To determine whether a contextual merge is possible, - Subversion examines the svn:mime-type - property. If the file has no svn:mime-type - property, or has a mime-type that is textual (e.g. - text/*), - Subversion assumes it is text. Otherwise, Subversion assumes - the file is binary. Subversion also helps users by running a - binary-detection algorithm in the svn import - and svn add commands. These commands will - make a good guess and then (possibly) set a binary - svn:mime-type property on the file being - added. (If Subversion guesses wrong, the user can always remove - or hand-edit the property.) -
- - - -
- - Versioned Modules - - 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 svn update will update the working - copy appropriately, adding and removing components. - Subversion defines modules as a list of directories within a - directory property: see . -
- - - -
- - Authentication - - With CVS's pserver, you are required to login - to the server before any read or write operation—you - sometimes even have to login for anonymous operations. With a - Subversion repository using Apache httpd or - svnserve 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. - As with CVS, Subversion still caches your credentials on - disk (in your ~/.subversion/auth/ - directory) unless you tell it not to by using the - option. - The exception to this behavior, however, is in the case of - accessing an svnserve server over an SSH - tunnel, using the svn+ssh:// URL scheme. In - that case, the ssh program unconditionally - demands authentication just to start the tunnel. -
- - - -
- - Converting a Repository from CVS to Subversion - - 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. - The most popular (and likely the most mature) conversion - tool is cvs2svn (http://cvs2svn.tigris.org/), 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. -
-
- - - - WebDAV and Autoversioning - - 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 shares exported by WebDAV - servers. - 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. - - - -
- - What is WebDAV? - - DAV stands for Distributed - Authoring and Versioning. 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 mount shared - folders over HTTP that behave much like other network - filesystems (such as NFS or SMB.) - 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. - 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 V back in DAV - — hence the term DeltaV. WebDAV/DeltaV - clients and servers are often called just DeltaV - programs, since DeltaV implies the existence of basic - WebDAV. - 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. - 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. - 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 (mod_dav_svn) 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. - What does this mean, then? - 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 REPORT requests that - only mod_dav_svn understands. - Second, mod_dav_svn is not a - fully-realized DeltaV server. Many portions of the DeltaV - specification were irrelevant to Subversion, and thus left - unimplemented. - 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, - mod_dav_svn could 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. -
- - - -
- - Autoversioning - - 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. - Autoversioning is an optional feature defined in the DeltaV - standard. A typical DeltaV server will reject an ignorant - WebDAV client attempting to do a PUT 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 - MKACTIVITY, CHECKOUT, - PUT, CHECKIN. But if the - DeltaV server supports autoversioning, then write-requests from - basic WebDAV clients are accepted. The server behaves as if the - client had 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. - 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 mounts 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. - This scenario isn't fiction: it's real and it works, as of - Subversion 1.2 and later. To activate autoversioning in - mod_dav_svn, use - the SVNAutoversioning directive within - the httpd.conf Location block, like - so: - -<Location /repos> - DAV svn - SVNPath /var/svn/repository - SVNAutoversioning on -</Location> - - 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. - Before activating this feature, however, understand what - you're getting into. WebDAV clients tend to do - many write requests, resulting in a huge - number of automatically committed revisions. For example, when - saving data, many clients will do a PUT of a - 0-byte file (as a way of reserving a name) followed by another - PUT 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. - 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 svn commit. - The trick is to look for a revision property - named svn:autoversioned. If present, the - commit was made by a generic WebDAV client. - Another feature that may be a useful complement - for SVNAutoversioning comes from - Apache's mod_mime module. If a WebDAV client - adds a new file to the repository, there's no opportunity for - the user to set the the svn:mime-type - 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 svn:mime-type property on necessary - files. But there's potentially no end to such cleanup tasks. - Instead, you can use the ModMimeUsePathInfo - directive in your Subversion <Location> - block: - -<Location /repos> - DAV svn - SVNPath /var/svn/repository - SVNAutoversioning on - - ModMimeUsePathInfo on - -</Location> - - This directive allows mod_mime 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 svn:mime-type property will be set - automatically. -
- - - -
- - Client Interoperability - - 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. 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. - - - Common WebDAV Clients - - - - - Software - Type - Windows - Mac - Linux - Description - - - - - Adobe Photoshop - Standalone WebDAV application - X - - - Image editing software, allowing direct opening - from, and writing to, WebDAV URLs - - - Cadaver - Standalone WebDAV application - - X - X - Command-line WebDAV client supporting file - transfer, tree, and locking operations - - - DAV Explorer - Standalone WebDAV application - X - X - X - Java GUI tool for exploring WebDAV shares - - - Macromedia Dreamweaver - Standalone WebDAV application - X - - - Web production software able to directly read from - and write to WebDAV URLs - - - Microsoft Office - Standalone WebDAV application - X - - - Office productivity suite with several components - able to directly read from and write to WebDAV - URLs - - - Microsoft Web Folders - File-explorer WebDAV extension - X - - - GUI file explorer program able to perform tree - operations on a WebDAV share - - - GNOME Nautilus - File-explorer WebDAV extension - - - X - GUI file explorer able to perform tree - operations on a WebDAV share - - - KDE Konqueror - File-explorer WebDAV extension - - - X - GUI file explorer able to perform tree - operations on a WebDAV share - - - Mac OS X - WebDAV filesystem implementation - - X - - Operating system has built-in support for mounting - WebDAV shares. - - - Novell NetDrive - WebDAV filesystem implementation - X - - - Drive-mapping program for assigning Windows drive - letters to a mounted remote WebDAV share - - - SRT WebDrive - WebDAV filesystem implementation - X - - - File transfer software which, among other things, - allows the assignment of Windows drive letters to a - mounted remote WebDAV share - - - davfs2 - WebDAV filesystem implementation - - - X - Linux file system driver that allows you to mount a - WebDAV share - - - -
- -
- - Standalone WebDAV applications - - 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. - -
- - Microsoft Office, Dreamweaver, Photoshop - - On Windows, there are several well-known applications - that contain integrated WebDAV client functionality, such as - Microsoft's Office, - WebDAV support was removed from Microsoft Access for - some reason, but exists in the rest of the Office - suite. - 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. - 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 - File->Open 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. -
- -
- - Cadaver, DAV Explorer - - 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 - http://www.webdav.org/cadaver/. - 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: - -$ cadaver http://host/repos -dav:/repos/> ls -Listing collection `/repos/': succeeded. -Coll: > foobar 0 May 10 16:19 - > playwright.el 2864 May 4 16:18 - > proofbypoem.txt 1461 May 5 15:09 - > westcoast.jpg 66737 May 5 15:09 - -dav:/repos/> put README -Uploading README to `/repos/README': -Progress: [=============================>] 100.0% of 357 bytes succeeded. - -dav:/repos/> get proofbypoem.txt -Downloading `/repos/proofbypoem.txt' to proofbypoem.txt: -Progress: [=============================>] 100.0% of 1461 bytes succeeded. - - DAV Explorer is another standalone WebDAV client, written - in Java. It's under a free Apache-like license and is - available at http://www.ics.uci.edu/~webdav/. - 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). - Of course, DAV Explorer's ACL support is useless in this - case, since mod_dav_svn 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 MKACTIVITY - requests. But it's not relevant anyway; we're assuming all - of these clients are operating against an autoversioning - repository. -
-
- -
- - File-explorer WebDAV extensions - - 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 network place. 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. - -
- - Microsoft Web Folders - - Microsoft was one of the original backers of the WebDAV - specification, and first started shipping a client in Windows - 98, known as Web Folders. This client was also - shipped in Windows NT4 and 2000. - 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 My Computer. In Windows 2000, simply - add a new network place, enter the URL, and the - WebDAV share will pop up for browsing. - With the release of Windows XP, Microsoft started shipping - a new implementation of Web Folders, known as the WebDAV - mini-redirector. 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 (http://host/repos) into UNC share - notation (\\host\repos); it also often - tries to use Windows Domain authentication to respond to - basic-auth HTTP challenges, sending usernames as - HOST\username. 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. - It turns out that the original - Explorer-only Web Folders implementation isn't - dead in XP, it's just buried. It's still possible to find it - by using this technique: - - - Go to 'Network Places'. - - - Add a new network place. - - - When prompted, enter the URL of the repository, but - include a port number in the URL. - For example, http://host/repos would be - entered as http://host:80/repos instead. - - - - Respond to any authentication prompts. - - - 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. - 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 - http://support.microsoft.com/?kbid=892211. - In particular, this release is known to fix a bug whereby - browsing a DAV share shows an unexpected infinite - recursion. -
- -
- - Nautilus, Konqueror - - Nautilus is the official file manager/browser for the - GNOME desktop (http://www.gnome.org), and - Konqueror is the manager/browser for the KDE desktop (http://www.kde.org). Both of these applications have - an explorer-level WebDAV client built-in, and operate just - fine against an autoversioning repository. - In GNOME's Nautilus, from the File - menu, select Open - location and enter the URL. The repository - should then be displayed like any other filesystem. - In KDE's Konqueror, you need to use the - webdav:// scheme when entering the URL in - the location bar. If you enter - an http:// URL, Konqueror will behave - like an ordinary web browser. You'll likely see the generic - HTML directory listing produced - by mod_dav_svn. By entering - webdav://host/repos instead of - http://host/repos, Konqueror becomes a - WebDAV client and displays the repository as a - filesystem. -
-
-
- - WebDAV filesystem implementation - - 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. - -
- - WebDrive, NetDrive - - 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 (http://www.southrivertech.com). NetDrive ships with - Netware, is free of charge, and can be found by searching - the web for netdrive.exe. 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: http://www.novell.com/coolsolutions/qna/999.html) -
- -
- - Mac OS X - - Apple's OS X operating system has an integrated - filesystem-level WebDAV client. From the Finder, select the - Connect to Server item from the - Go menu. 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 webdav - filesystem type with the mount command: - -$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint -$ - - Note that if your mod_dav_svn 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. - 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 - httpd.conf: - -BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully - -
- -
- - Linux davfs2 - - Linux davfs2 is a filesystem module for the Linux kernel, - whose development is located at http://dav.sourceforge.net/. Once installed, a WebDAV - network share can be mounted with the usual Linux mount - command: - -$ mount.davfs http://host/repos /mnt/dav - -
-
-
-
- - - - Third Party Tools - - Subversion's modular design (covered in ) and the availability of - language bindings (as described in ) 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 (http://subversion.tigris.org/project_links.html). - - - - - Copyright - - - -Copyright (c) 2002-2007 -Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. - -This work is licensed under the Creative Commons Attribution License. -To view a copy of this license, visit -http://creativecommons.org/licenses/by/2.0/ or send a letter to -Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, -USA. - -A summary of the license is given below, followed by the full legal -text. - --------------------------------------------------------------------- - -You are free: - - * to copy, distribute, display, and perform the work - * to make derivative works - * to make commercial use of the work - -Under the following conditions: - -Attribution. You must give the original author credit. - - * For any reuse or distribution, you must make clear to others the - license terms of this work. - - * Any of these conditions can be waived if you get permission from - the author. - -Your fair use and other rights are in no way affected by the above. - -The above is a summary of the full license below. - -==================================================================== - -Creative Commons Legal Code -Attribution 2.0 - -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE -LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN -ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS -INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR -DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS -CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS -PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE -WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS -PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND -AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS -YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF -SUCH TERMS AND CONDITIONS. - -1. Definitions - - a. "Collective Work" means a work, such as a periodical issue, - anthology or encyclopedia, in which the Work in its entirety in - unmodified form, along with a number of other contributions, - constituting separate and independent works in themselves, are - assembled into a collective whole. A work that constitutes a - Collective Work will not be considered a Derivative Work (as - defined below) for the purposes of this License. - - b. "Derivative Work" means a work based upon the Work or upon the - Work and other pre-existing works, such as a translation, - musical arrangement, dramatization, fictionalization, motion - picture version, sound recording, art reproduction, abridgment, - condensation, or any other form in which the Work may be recast, - transformed, or adapted, except that a work that constitutes a - Collective Work will not be considered a Derivative Work for the - purpose of this License. For the avoidance of doubt, where the - Work is a musical composition or sound recording, the - synchronization of the Work in timed-relation with a moving - image ("synching") will be considered a Derivative Work for the - purpose of this License. - - c. "Licensor" means the individual or entity that offers the Work - under the terms of this License. - - d. "Original Author" means the individual or entity who created the Work. - - e. "Work" means the copyrightable work of authorship offered under - the terms of this License. - - f. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this - License with respect to the Work, or who has received express - permission from the Licensor to exercise rights under this - License despite a previous violation. - -2. Fair Use Rights. Nothing in this license is intended to reduce, - limit, or restrict any rights arising from fair use, first sale or - other limitations on the exclusive rights of the copyright owner - under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, - Licensor hereby grants You a worldwide, royalty-free, - non-exclusive, perpetual (for the duration of the applicable - copyright) license to exercise the rights in the Work as stated - below: - - a. to reproduce the Work, to incorporate the Work into one or more - Collective Works, and to reproduce the Work as incorporated in - the Collective Works; - - b. to create and reproduce Derivative Works; - - c. to distribute copies or phonorecords of, display publicly, - perform publicly, and perform publicly by means of a digital - audio transmission the Work including as incorporated in - Collective Works; - - d. to distribute copies or phonorecords of, display publicly, - perform publicly, and perform publicly by means of a digital - audio transmission Derivative Works. - - e. - - For the avoidance of doubt, where the work is a musical composition: - - i. Performance Royalties Under Blanket Licenses. Licensor - waives the exclusive right to collect, whether - individually or via a performance rights society - (e.g. ASCAP, BMI, SESAC), royalties for the public - performance or public digital performance (e.g. webcast) - of the Work. - - ii. Mechanical Rights and Statutory Royalties. Licensor waives - the exclusive right to collect, whether individually or - via a music rights agency or designated agent (e.g. Harry - Fox Agency), royalties for any phonorecord You create from - the Work ("cover version") and distribute, subject to the - compulsory license created by 17 USC Section 115 of the US - Copyright Act (or the equivalent in other jurisdictions). - - f. Webcasting Rights and Statutory Royalties. For the avoidance of - doubt, where the Work is a sound recording, Licensor waives the - exclusive right to collect, whether individually or via a - performance-rights society (e.g. SoundExchange), royalties for - the public digital performance (e.g. webcast) of the Work, - subject to the compulsory license created by 17 USC Section 114 - of the US Copyright Act (or the equivalent in other - jurisdictions). - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights -in other media and formats. All rights not expressly granted by -Licensor are hereby reserved. - -4. Restrictions.The license granted in Section 3 above is expressly - made subject to and limited by the following restrictions: - - a. You may distribute, publicly display, publicly perform, or - publicly digitally perform the Work only under the terms of this - License, and You must include a copy of, or the Uniform Resource - Identifier for, this License with every copy or phonorecord of - the Work You distribute, publicly display, publicly perform, or - publicly digitally perform. You may not offer or impose any - terms on the Work that alter or restrict the terms of this - License or the recipients' exercise of the rights granted - hereunder. You may not sublicense the Work. You must keep intact - all notices that refer to this License and to the disclaimer of - warranties. You may not distribute, publicly display, publicly - perform, or publicly digitally perform the Work with any - technological measures that control access or use of the Work in - a manner inconsistent with the terms of this License - Agreement. The above applies to the Work as incorporated in a - Collective Work, but this does not require the Collective Work - apart from the Work itself to be made subject to the terms of - this License. If You create a Collective Work, upon notice from - any Licensor You must, to the extent practicable, remove from - the Collective Work any reference to such Licensor or the - Original Author, as requested. If You create a Derivative Work, - upon notice from any Licensor You must, to the extent - practicable, remove from the Derivative Work any reference to - such Licensor or the Original Author, as requested. - - b. If you distribute, publicly display, publicly perform, or - publicly digitally perform the Work or any Derivative Works or - Collective Works, You must keep intact all copyright notices for - the Work and give the Original Author credit reasonable to the - medium or means You are utilizing by conveying the name (or - pseudonym if applicable) of the Original Author if supplied; the - title of the Work if supplied; to the extent reasonably - practicable, the Uniform Resource Identifier, if any, that - Licensor specifies to be associated with the Work, unless such - URI does not refer to the copyright notice or licensing - information for the Work; and in the case of a Derivative Work, - a credit identifying the use of the Work in the Derivative Work - (e.g., "French translation of the Work by Original Author," or - "Screenplay based on original Work by Original Author"). Such - credit may be implemented in any reasonable manner; provided, - however, that in the case of a Derivative Work or Collective - Work, at a minimum such credit will appear where any other - comparable authorship credit appears and in a manner at least as - prominent as such other comparable authorship credit. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, -LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR -WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, -STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF -TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, -NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, -OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT -DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED -WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY - APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY - LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE - OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE - WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this - License. Individuals or entities who have received Derivative - Works or Collective Works from You under this License, however, - will not have their licenses terminated provided such - individuals or entities remain in full compliance with those - licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any - termination of this License. - - b. Subject to the above terms and conditions, the license granted - here is perpetual (for the duration of the applicable copyright - in the Work). Notwithstanding the above, Licensor reserves the - right to release the Work under different license terms or to - stop distributing the Work at any time; provided, however that - any such election will not serve to withdraw this License (or - any other license that has been, or is required to be, granted - under the terms of this License), and this License will continue - in full force and effect unless terminated as stated above. - -8. Miscellaneous - - a. Each time You distribute or publicly digitally perform the Work - or a Collective Work, the Licensor offers to the recipient a - license to the Work on the same terms and conditions as the - license granted to You under this License. - - b. Each time You distribute or publicly digitally perform a - Derivative Work, Licensor offers to the recipient a license to - the original Work on the same terms and conditions as the - license granted to You under this License. - - c. If any provision of this License is invalid or unenforceable - under applicable law, it shall not affect the validity or - enforceability of the remainder of the terms of this License, - and without further action by the parties to this agreement, - such provision shall be reformed to the minimum extent necessary - to make such provision valid and enforceable. - - d. No term or provision of this License shall be deemed waived and - no breach consented to unless such waiver or consent shall be in - writing and signed by the party to be charged with such waiver - or consent. - - e. This License constitutes the entire agreement between the - parties with respect to the Work licensed here. There are no - understandings, agreements or representations with respect to - the Work not specified here. Licensor shall not be bound by any - additional provisions that may appear in any communication from - You. This License may not be modified without the mutual written - agreement of the Licensor and You. - -Creative Commons is not a party to this License, and makes no warranty -whatsoever in connection with the Work. Creative Commons will not be -liable to You or any party on any legal theory for any damages -whatsoever, including without limitation any general, special, -incidental or consequential damages arising in connection to this -license. Notwithstanding the foregoing two (2) sentences, if Creative -Commons has expressly identified itself as the Licensor hereunder, it -shall have all rights and obligations of Licensor. - -Except for the limited purpose of indicating to the public that the -Work is licensed under the CCPL, neither party will use the trademark -"Creative Commons" or any related trademark or logo of Creative -Commons without the prior written consent of Creative Commons. Any -permitted use will be in compliance with Creative Commons' -then-current trademark usage guidelines, as may be published on its -website or otherwise made available upon request from time to time. - -Creative Commons may be contacted at http://creativecommons.org/. - -==================================================================== - - - - -
diff --git a/doc/svnbook/source/images/ch01dia1.png b/doc/svnbook/source/images/ch01dia1.png deleted file mode 100644 index 9be697065321ea10f82ba3cf46bd31475081c842..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 55406 zcwTh81z1&mxAwaP6cD7lLAs>{2>}tL8>J*f5D=t01W73o5h*35yGv;Vq?8T;>F$Oz zmhax@e0zV_nU@zn4=m>T#~AnhyXTzCP&Ji@w{BA0L?95i6y#+!5QuA62n31(1`2$K zV>yQk{z7|xU->=)F@`o-Iu75aLnz4J*K$i*pK>)IT)IMRvtV8$kRL4_@S~$+4NJ!{ zuO)j;nD2*0oT;5hLS;D>qGOv^>0A`1{Yo)Yn@INBD?gwq~I`z^ZNGm?=(jqfJLK$B%iB9~X%^PzdXd1AFg z!9$goj6OztjvL%!Wn*JrqGuzN_$c$8Jfp%x#_%Wg?Ht{hg>BaLa3&ga-|Z_5G!%){ zzWE*V6LZbdKNLkD`y#di%_?Hej{;%8%*p@HiQaFLM7;ZDnp)B0VlIOjoPst+iwHe2 zz(h}=o<(J%@*pt3GWz`G%a{E8p3cs%pFe+VZT-73QH6?*6IhlZfe1PZ@lUU1=~`x! z+j&bk019INW%R|w>Oyz?@bGZJja#A)e=($&f9L56 z2?@yrVV|sIr{YPgtE;aK7nD_1(F)nV&}EtU%!4GA0PkvrNtcUKHL1pap|YKyZiMUH;n3BxL8@2k9X$p z(QFN7DmFGYvZy3s{5z`QRgKx^N&+fGjc z|M&0T7Zw)YoqU9GqnTd`S-p613M=>Vju{N~>B5u@57u#)^z3adC02t*!3~rb>8Iv=qXeMLb*VI>O7%d>{vl#{#h zM%sOEQCVF*rljPRsi|q7wG%bzcQqS19>GNklmF)R&Xwj{(m6;|< z=@2QpuerH%s%FLmQwEVEJHi_Q{v)x{7vaLi;If9yc9-TM~CmLU=@wi6|J8rPe)jk&4`v)%UF6>-|^pmbE82QeVQV^d%>Zm`I4MFUjNCH7v|=_X32j1_;Gr$_K=YvK`BeG z2~UL%?|obxbV$XkVCR2_tsPI86kXt(H;{P;^Lrb5Lo*p1+dFSAEV2G?~oyOe=xwE+hKdk zy=x*=K0JD6X7gze!r#7qTi?(Cn~5)NWMp)9xIxML)Gs*rp^QvGQ_~gn4i3#d)=9Pe z(+Q9e;g^#l@Q0K%KAy*zAuvldm4<-8^ySM&$0Ze-sF9&95=1|X)ZrG2>GeO`ac*3d z;iNnotnc^toy5f(loN&M14~Ows|{X4d4{(^Z-{vv7bhn}M|rbMCh8qjg@uJdhh83x z7<(SBW8&b*AxnXu?Ct*ketCI$<>U=)1fuu;;TC5JioIzW--8Da$SEnI6=s^7r9bBA z=Ien{uK)Q%r&CWjQhz$}mYiQpOH1x8nYym7uD-q^9Ucj%o)mK|tV?=&y5}Epl&)r8 zP9~;>pUGlOOiayjMaE4eDgkX4Wmq?F{?jyQz|%>e7uMF@KYoBi`1tq;2V;9&>%2^6 z(m|-WvG8tA)w#lpe)RSh6c!padfjc*P*A|U&`mBl!CCs5?77@efAbAP{v~t%Zu_kL zM`l2K+^)xlhT(_nx>z&-(M2v*-_7$Qp#1!)pNqV9wqRy*d)zd+b z4Gax;2u~JegKt#mU2L4}En$3FU0sDm^7g)f_gP=J2~;yMNXpE7CfvY7$3((ow7#|F zJKr90adsr>w*75lLVurBY7GtLd#-jKEPj?sGW+Dsmg1nG8-Z#jCSPJ>2?M^5*1Piu znSj`UK^-0*V&9lw{hc>bWQ>c2<>>6(MmaAnBg4hTMNLJep{c1}rl@l#%l{Fsp%hGGSrbge-{1dvUrKLR*Ij7fJzH|@_O+3sz7%mW z-%GDw8V6PC>2lAWKlk+TXmsDRxVpTMWl+C=|5}p@EGQu%;m~b6e0e1=uX{d!;XpR! z@^ZO1;|}QmO*pWyqNv4O&X0G#2cX{$tTxz$bK^_vSK2%-w~UF6jV&tLs<0mU^yw3~ zLG?Dc3Wzzp9#G<9r-K$=o2|xrJiWWOS5{gI8-4<+U0hrY6N6F(i@Yl??mb=azO%FQ zQwzg>T z@IHf>Us1p7`djC^^&vhUs~gQ<;%%GhtfBawe+MjoEVJ@WTwKyT>tWM`GT+OSj){px zC1xJO+VbjZvMc;hLJTw*I1LR=XlN+l0{nNnT*U7F{;!ddk)a_hY;2oGVUP_%7M02B zSM#$i!N<6dOBB_hEn0$cJ3KjAR8y!ZDXmRScUy2Jz0NkOVq#*BcW^V%_s^Yf@g;B$ z&-1+a=69`t>eRu(VRv^o&DzPyX*;i@dDSjAH@8`nHxSQX%I_D?Z8Gfk`Hm=j>F#)* zsJCy4jBfD>36Z!gLO1i0yqAGV~ z7;|c{FhI&<^p;jqLRi?fIS}*s(_;MRz>%-pg7ozCGd^b>6qz~Tk@X1JCW|Q1>Bou!wVYM+{0VorIjypUu(%09Ai;0<& zpD&BCFCQB(nLsyp+AAe_kjDO(yNP+&+=4N4G z;ZJiuyO~DsqfNt-UO)_TBBK4{9kcWJyt+D1DJdxjhthZNG#)%?gAQrszTe<^1m62{ z^;ZrjiS^&kn99mZD=VwW$VgarS_v--k`^_8@NumA@K2RClq zFkMqrRAeIxvu9r+@qW2U7l@bI$HU5M`HWdaC^5nneU^ffa?GYOC`iuRTRcHYNKg=l zmAp-$B`4Poc3Naur=zROQvVJ7R?_EuwB3sRsZ0DOYFQnkpCczPuj)8aRaf^Ye8Ptt z%u$|EV=dM%EXyY_8i;0kfT#Y)?{k9p_4W13qcnU8lOkTuVI&G(iU?VEOzJw7f`(nX0$O(k% z6KE00G;huTu;TggD>1RUFEYX0#*I{Km9$Jqp67c+hsSA9Z9h_I2qOC~a={nC4@fVb zOJ7Gv=Wu7Z&FPXf#k$U-TgeK>+i>pA2TvCz!fsPUAc$Md}@ni3O4jOKY+7lq$8wq zojX!j=i0)BZASY~qgkxL?xJWVH)m(>0LO806>v|Mty}n>@789dM>7n1-9R%>8clt% z6!jb0X88B-(4V=Cz3q|IYjbm@_Os2_BZZ;bZ&t7&dwEGT<>s>Axl>YIt*0lSw}grI z8rr?Jt?d?-NdMSajdjz+1lFqkwUu(W9aC^q_P9rx8VZaAG4ks@C7^{A1Ox<>l!^>7 zwY;4#5BB;b6B801JbYMJQ{${XTAFx)FAWw2MRsy>^6c5Oh=_Q2Ywh^7AKwm;tw-1g~Gee(%EhSkDl2IgFSCez{hl zeKRvX9f^RK=kAJ%-TtWPE?pAOM9*#qe$~oNNFYyEd0wLDC1LzJMo&+V)41_`vc?g@ zP@;gLV09$%9qc!nn)A*^3lJM zBBDbU(P{jp=wjr-3$@s_A3v^fSFWn0%>(i}+}R-)_i!3%9iIn%)6md>uTIX+V#aHv zrB_WE8>dl)g_~fT0RaK78{>iy+yDxT^s5RFG$IlE*Lr!j83MN(eF#Dsk5X~g?~00w zN=Qh6iJAHT9v*IV+j%Yh#p~d=?(rw!Rqzq$Q`nBfp6I)}x+9Qlb+xp>Z2MRCRZ=cn zPLj2Te*YHtI<|-2bay}b=8x*SJ_;nqvho?REC(GqK0Xe-A}lCa0R~)-JOu9CSur=h z72fuw)VvE+RX-u1h!{*@e`lxW)qHy>A&XoTO>%sEu*qnKLM#Sab9)5k#Jf{7Q&VoE z`ceOQl7;p4BmieaLqko?As9~IHrh< z$tCXXw4V_V^_qMxASFSp6D{6|x&3gu(VHVlVFOy8lVlBk6|%R-@izT*)IMay=;&xL zJiv;cWU-^mi!JHB}cpLw7h~*Yv8!Kmq-_ zsLH#{z^fKy^*1-+Nt=?owXw3XRUBb`hQ#&#_4THUL;Vgup4hJZuV2X^e2kuEtENWM zh>J2YJsT}HX*%ES23|C3@X$6i7~J z#B2T?z>o9fBbrVjjuP<1<6!mo-cq0Six)PwwjFQDWwM7n7c-l_ zT6af)4J3)YVz_-fy~T5Rq$o8jYY}=FURGnU`6G@4MCUFQPIwywK`692aQefC&u5$8 zK#|3B8#eRi=jJ|wsN#E@$G9;`$o9#L7pu|qGPQrH6A}|ge*Ln)yp4w;dd~>I)VE03 zq6b{(BWyWjI4CA-7-pG8@9THA4G(bRDZ6@lKx&MjT>8JrkaFtrLeH|@GhEKqFLAp! z-TVg2_k5?r=i=0v`J+rQ4wrGG!Gi~x85ynrppyU2oma5SIXOA7>KI5(R816828jot z*k2h^P*6akrErHYmAQol$n7&&kL0FT4?+5JazeWo=B`|r&%*n5xi6i{tp4~5oPpE{ z+fDb(+E?1mNZ5`GCFaCwBZ{i zW=O%pO(l7T&CShob8~6w>2-`5{|QZfZJPS}-4^f47AtWJi^WMJC~PdTd=7t zOiW-7C#R>8WOvfAj%ErV>_1;6hw)heU&Fo#@bRsVe`CxmEp-5FhE?Ym7N!-jjIOM7 zp=80ZO6i%{@48uqzozPUFjzC)($X?Dbpau4#``F_w)Pa>8NycvuZkW|ZHg3KNF3!# z&n5JN_hL^1RM{;G0ZV8HdDThYwj8 z8KGYuQq0BtI?d6{HuYA4d=@G@4!#F!UshHIRekK`qc0@eTPh9;;_W4I1(XDhT2)>? z+34-bbGm^$&P`803n5Fl$jI5=Ua#J*1iZ04u5i@^QjoFtfi~KO3F4r;kx@!|`aF!cp`iiRnrr2=6#CA|In2q^-5uni0U7}$2s8;<1Y-Q z!T;vz6#VG!E~}_W<~4cU)Z_~z$Ou5$*aipy`KBZzgC%`FUTy{GF5=Dg5$8wStuuTa5g#fq?{Z&%;LVvl}>6%YXm=8XaBU-1LDY07eV#ihlk2 z!Pd-7OG`R{P-Elt#KalM{8XiFVnKoJ{rmnP=oS`>F!|oz-krzuCtg1C@*!Wod;tJ^ z_3Dl^Fpmsm2=EQ+>RS=L7Tw+5vGR;w;{k^+xo?&>ai(eHz=A_dWMySRMlvcjS5Q}v zfyor)6ctH&90rfBBdg2UEi zjoH(u+c5RCw6vqG86Km0x0S(6N+Fw305FJ+8k(A2=DWZM#tk0C)YRf&hS0LgsS+1J z?4bUX!Y}VREvtbe_a+KcQc!Rk*22E;gYQ7>mGnB^2G>Tqg1r1kL2DgLOH0ogbr+XP zKxBWZZ+WKWu8!(Z6r>Sy6ZP(nAP+EUP=7TwH3fxGn9*E{gmJi@~9-=8Wa3UL7e%(aFdgOWGGuPG}jIoaEH z{``r&pdw(YW@JPYBj3tmqN}aV6x#)AU?U_ZEL_#t=mQ?H;VrhZvhwNECkF=yb3XE| ztCeF?DbL`L*Ajq2HVZ%EKsMG!ii+~{&u4>aS&44OJ-UU98}DT4t?A&v=P$LryGu|w zyLSS<$#2o~d1wXn+IN3B2CZdHvGHV)Qc|*McmiMqT9PEZ!eQYDoXm{uaIOst7Z(@1 zMM+5sf-WH;At|>(h>4zzOh9U?F)(Ea{%z>DJJ=j-Y~*4toI&6mFL!o!$byjE#i3i6 zUszaKQu3WQzqE94Y%HN=7DCA%o+=Ox81`W!KAa*`F+N4qnH}sB#=t*+F*`|n9#vU+ z*e7|F^x=b!p`op*X(^yTAO)yLfqqqrn5)X*z=0r41qTO*ENH61vnnHlQBu-(C`%b4 zJ7`lX-?JYOZht1-g`~u?!h041NDbczQyCnbgqZ=HTEE6BDDQO`WQ9jqUo2Nyx19 zk#{z)s4-2Am4t+3!-F&~E^ce432@+cY}avhpNjKE)zKPCXUMm2QUe;{L^l_p@803$ zZi%?8e=HV>PfMHo^F07cVkG}@Y(fItO8;s8^0K9jjEqp?l)vrHr%%W8umYI0RbR`? zi6m)@a&o?pV9;Vvh7?$(E5>s_*3(;`suSkpBWPmiH7yyhwguNdI(2YGd*^cW+0-3IJe7yE6@?aGf z7G`0|h7E)FhkOR>%FfFAt%KLkg&q$B(obvndbqcr67yb90{`LR;kz(pxvzP7UtF7rAxo7IccemJ`BXs@h@Uri2-n zgeR9zlf>n>;o(X}iz|fj-<6fS=AF@yX5>Yq4_`St&hNNsW~&Ga2oSlPAyI!P()i=l zb*F10?4m(ZbY7?X3b0dy{++dhgBlzhdDYb-P$3E(gE|oW!F2E6zu(^84&@704h_uC z&TcDd=I7&!U}R%s%V}&h8dUETH8g}WJ~}-+a~-<(Y0Bhxu66)AZoBH?PR`$jg#|J9 zHCl6Dgog^4J;X;VD_G4K=WtRU9d-4)_J8~`P_1GE0|PyeHt&jv^jiwR8zU8Sh&H$W zTEF$STYXT_4eodjJPbza@O&}nRV_WekNYFl3l25cu3ZCb($Uq`RagHqU`cfIy5vsq zI<8dF_gQ=B_{W?iiM^W-rf|Fo{#_y8dwm@%^Z4td{PT!{{E`^1YTiltZKpmF0o-cQ_f(U^ZqQk)Xc2+uLf;!cc_p zRYwO-mb|t9@ZW`}s}c6=|NSgLxIAOZT}KOeqqep->aTVE%4jIxfw;Cyr9lceH#cEB zk(XmACbm9>^LFl39u5d(%s!%Vq#*bRE#gg96GFE zJt87R#KaXB3qU=v1X&=FTU)-cQGwBrB`kD%s8{G3!`d zS}N1a2Yp=@LGdOq_w8qf{N8kVnim?{#nW^?c+!9$DvOF50O<~6#LdH_(f7)zT-nD* zBC+>pFY+*K@DMZ_z)Nj=FUwG2?Lq{VEt(uD`K`%8Ku~Zed-1<-5Ap$LdfmDt@|UuA zbPNv-Jpq3e7Z(@Xv$z(m5`FQVR7+QPYqX@LzkeHeFEk{??fm#v{JP6@z5DaNls4;J z0J)5;taiv;<^C|G$Vi~lPRN0wCcHh$63I2o$+GlN>yEbAXht&3|sF0{qN8W zc9Ye2EP6f`j=S627l(!YINq60PEL;JHawk=k_;0puBzf;V*@V$;{I4x<`_Oi_E=xv zcdu7C%^HX1p5NszaxsHxvXfOJq(Q$PQiw6d{b`|rN}-2uZ0 zT1kn!cgH3s>a3@E5gI}L9<}s%js2gyVFPl0_=(%KhT!+5h{xJsL$I5jodxSREH&?f z6#zPWkh;;F{+?L`o_)`znWdCqYG$UXriMpD!~Nm3jwC_pCDXy}!19U;eT9qV zCXQ>i1E#AFF;DlFt)kwPqUM_**(1erjeLIa|r zGAe z*85DzXG#5N_8&>u2-N}e7@|&0$UE`&fsekNuE)%wMLZrlEA@qaNlvD|JdQW^A;0Uu zXhgUO=}pXK-SQb!em}&2OwtLXN7x+;4p3#a7QLU4msKE@&CE3EXZwBQecQL>dZL(- zoqcwCIzBoI#ANaOdFnm)!O6*bYhx5dKgWLKdel)6DG?D}An>H{vmfsvu`mSENcya= zuN!DbWTf_8!-SNiw^8P)MzP`Sg zSX~6Au-t({vy#KgozMd2ES+Q3fG)6+v9 zhIICK#|`-L!#h)x>&^t23y^i81&DdFM+TyL zO1_#4%*=eIq7wP#%PeGkeCe8+8mNJp22Ww>kiMm}<71@+zP90E5+0^@b3Pt}YCL@W zS5TNx0Q7+n0MCb1C6h&+k++MQC*I&mV`5@LXOnWPd=d!#{`8*bAtx8t#zJ@ejPKRO zVs9e8G{`IVjoYA2TwGid5+4T|-vYIv_ydch z@FlFTtx^7q^{fiSSk^W+=NnZsO3KQ(R3dm36rYll8!QJH$Z0z;5qPU{V>4r8Cta~D zuwjHODj7p7j07uy@Z8+o7+=!T80sI9#>hi{?wG(*^g!-RW8)=gLYilb9ci;&AO|Ze z-n0*!&Qx1#D`3>RFs*Ci9Qf?WM>Oi9gCEE zvdQ-fRP)5kC)`trm$$R0$Hvm~8!sm_v)q1;``)5qlTUJ&IYS^w*w17!VMzI*ge>hH z9k&BP=(M!8tpuKUdy5;XadLD292_J#uqi1%+L|dcYJjd0k(8vR?coQ^*z{3HNZI|; z?>G|^6Yxm9~T=4|4=(QdLw$UUN;fTV7wcF*kSGUmhTF&4XAC zK2Td-4Q=R9W5Acd>Gh&H5VQLOm!qp|wnh#l`l-@q$Y;2moez$V;H&q}T-$6*FuwH7 zn>S~?kEo@;W@X*Dx+IhIIZwLlSZO;ke31G&1ax|PdmB;@li~++3k#pZ+-nHLdEP-O zzp+jKLhWB-teZEh4PJIsHn{IGry`$8Gxoi329nixG1AazwkX@_062qhgTysIzmD=9 z=rTdcLf=T7hX-b|2Js8}du(j%_wV0c5={rn+u!d21cRyAdc~=%o}{PQNnt<@Pu08g zb8!^_9Jd6sBB=Y%`zota&Z-K1uP&*l4|nD}vQ?6E^YgXT)yaiy^z^~2(Xt{VaW1Qi zi|yOOh?99pbPNm(9zVWo*-tn7l^(2rW4r=p25Jp3mMCo3Ol*jdnmFiPpCN~Gy4YXQ zG&4*0_rH%WSPI92D};jhuBc5a_K4JGp^q{ z&u;<(0?^nu@hqlgW8jKMhli075f#P7(NDEx8A{Gx^c|RN6W)@KGfKJu!C`?T3A++n zwYaz+1h=mzejgOU&kr&1!%3E5pru8oG>4YHb!jgzHl!PVlrFfxU|iHxA6|# zf`WowsEahQ7Y7qF;f|Ty$o0|t|NAbodPsT8_5^1Ji9r&&MjGjJ-@xdgpmvaQ8(Uj^ zX)v$0t942W3NLSOem*`TechBL(`wcwrF{2L}hp%O!fKuwak{U_R_|FP=X~ zJ_si)Tm_|cb-Gpr1p?|^RbK7{yaV+L?Pk%JqD+VPGgVU3to<$WW_?M?E7*7FGg^L& z9;lBMr&@57>R0oTRCi5nZM{!+pTVTTN?_RM%zi@9yrOQ~bTRU+4{z?Ac;N)MEbRfz zUG@y`5UrebAf zWkNy%1ZuaqUgYC66oTx0d=Aivu;qLE`)>g!!4jaq+9Rp!-1jU>ZosQLIO+gNls*Yq z{rTqq|6=~z(9i@ht32JJ=|*oco6%x$U~FI1)bai)Al93gUt-s`QnKIHinBQ{z(~KEiJ)L}EXkb9XsRvNyvoe_ZxXi+K zrjeRn!1waJ%5Ek_!dsM{-lXT_9SnMFYiqAZ2uH^~Som;3JRKJqjM=!Uw6rwX=(+iM zpiK^T_U#(v$v&s2^FRIO_n+%J_XBPalafAs@F0Sme-T^@q6LsY2hHy=Vh)%NH5C<< zClHs|;V`pGlBJDJetNo0_E6?sO}tQ9_BeKJ8NZBe>(U2<=QB6W?{EFQ1elNs#!-Is z2+E~N$Y#{<`4tG$LGv3d$HgAxmB5s^uUhQWDY6WhXecE&dO7MAAbyOkPfi*H_5)?? zbUE)N)?=Unx3W)@wG>0$CVcud_q-9gStIk$=C?;yYx<-eJf7~(x~%ZWUtC+(X}DZB zJ6s>56n+W8lJtGVgvgaibo9tW$xerY{> zw$RsryhZUaf`XWU;5BK;%aRDKWKvWFqHyH-6~IYmMn+GHxPG+-I5*^_vgdungM+Xh zxdjEp6SDc&Qv0BMYO1UM#7(VlY$!f@G&wm5AicQ0KKX;!7OEUp!W|AzPe5H^yKhf< zjhcKS`uO1;1_Sy}6WELn8avWfa&_}_bJNsViEh5>GSB_`)vM%tfqvEG)D$M#YXB-( zl!uX2p?K^(Ji5TwhkNB|pFd0K>K-}D)VSYEk)pGl7il^_KQC%LeKFr20eQV4ZN_+f z{~RAns;K{5HQnwo`erys`Nz{lVat-zMC3g+FWC@??pz0_d0kk<#y z%mVOk-nvx*LS%0*udMt416G;(u0v~IpWWs834|kzFK^$zeS<~%Xy4oK>T!cdg{40_ zMFa@}0mFAUM6^$-+wZE}+?!22!a$}H5=NSuLsL^zLqlcd<@?YW(C#qDz8^n4PIeb! zSyY>wn}NjNCnn})WmSSpg@lA4Z?co~{XN{6ASf!s4TRl#u=WDVmc*_R6@k$;SJM<- zP_QvtVg?HWfp30p4o}+O-ycK@6pBS92?Vhni1W<>rO)v!x{OQE3>%Bi%6Kc+pki2jOu|Myk5TC z48$Z1jM&Kr`deFDb98ik%=sZFCx_K0W~zT^u{4UJEq zKB1x9*U)$u5D;L00ab^BiVEt~-QAsN2bxh~(M!R@Q5RQ`Q?wguK3Px{G|C!lNb zP9g|-vBzDP5)u*?{|;o>j&lhDi|BjfWv8NX#r^~IqC90 z|5@*SR#{c$+V=o=oSBssii8cm4*DbdvG#k}?QA<{?O(ijv0ZwZ_CFt@BS{W}Idsm< zND2v6ip}}6+a;?%ehhOwSs7vhJyqyH@pFoagEO!|SiA@MlZcpjN5y=$hqt=Ubt@=1 z*!AfL7tD9bpW>kck2`6{+`9|j)1rTNE={?Z=!PjwPaCas-2Vi5draXCUx*Z4XD5-v z=WYeF!}vv;H+|!*z4&3@dGkphV2y`M(P`=ENUM@ABXYVgWf|1l>uSFI5U`BT$Y6Z< zu)}EIlSm#De)4}jPxi6Rbhc&tS;Sl4D}NVIeNAm`K_Q{x-@oIWI6n)=)UHS2Y3S;@ zIypi0K}H9ff8YC3c|ctbQU1DPUQj^5zQ({`3bAzS^G3#<|Lei7!CCnm=S%^Wf9yqo z2RKQ>do46`wCX3XBa9g{$7typp?RM^1IJYwIazXVY`3PCEK^KmKUXsD}55NB|(J8u?_Hjg8GV zxhEp}RrJOE5#+;VnTqk;#*OCysUaa45~;>|ddq+Rwm#*BEcez#&&X&R{2uT?0<0O} zoGuXX6grR`yM4UEdM6bJyqk*8yz?ECBB(VlwzZ`t^1~8(dLQ%htfAFF7s#-K($nXs z>Re+w>un&BO1SSbO3TyXjZRF=$5vw+R@Zl00V8L&=Bj^EiP_u8o?Jt zK_);_@+vBe4mGgCDyphQxw)kk6$?9VU`hbDK9}e2(8A&2SV1O`voy0+h;MOnaC8q1 z#deuP1I?4lPfbn&=E5ok;nEuE>atX_l9cJmn}&;@(__&Gg1o()u21;zK}TD=ZNY(w z7&F?TSMyrZSwLZYQj!-;3Ak9&eYbUVRF4j?wW9-Af|;55iN1aZGHk&)C7hPk1O+P~ zT6VOz%RPKp^rRvT#4CY+395jCg5vJoyZ`mDLy1}N=p~qN`&)9eXU{UTvV^>jw?XC8 zuNI$C3ck?t@sS8`dm(W$jw}mX+p^M9NJ5YlXMX+Khtzb(to>_F&Qz^)c=tjWH$z~n zDG6520mijxA7trZVPoI(K1C`xk72FT`e+F_3`uxge0)4ecXl=;MDxJt+FDU0SU~ka z`OcPQn5eI$)HCCI zwXw3oHW}ErWL)RMB`D|&n-0(erNYC;_Px8BArNrM`o#-bQfM>19#i@X8hXSaZmHz5 z9Ed-VE$qVL;^MVy*T8x_JUrY=VMmwjMaY80J@z{X2L}fR?y#|8(i2fquFcKu?yn3% zFtC|vy!ak~4m6H8#S&x!`P6IoFQ#-z%WS>dj5gK$QR_plyzsRzL(^1 zy5B&sMhz6i#LipO$V(aLIBbE@kZL332o3-4xS8GwfAi~6AY%XKpu`;E{)=P3Dc}g_ zwc(n&I_P!&gdW&5Qc}|Ht}f+d(YQ9#2&%h-!^1BBI}(#)%h}s+OJ1F8>graRw%we? z`Tw51rld^7BxDAZgmccn(S6e%MJovb&UT_Qv=F&h_3nGy9nhsNE-oWQ#xwu(6Hi3? zMBxe2UqXTeoR<4ZZlis!imt6`kQ#ZHa&;e6K~3$csp)IHADx}ZXA&!{M?lnN^9V^v zNLJU@y1OnsHQ-3g%w*Ep4e7O*Uun$B3hJ1jrItwJ#YR3L0ll;AbV`~&2f>|N*G=>F zXqsgYSI{rhK=IK3>+?+K`v|=2j-J;->0{*6tcZ|m%A@nK5pr-^IBa9@(d~Ofy4u>d zmo|{xfS$d)yvE<1;!B$jxrA{EMS*A_C!p)Mj?4J1xp@wNc&g;NxA(=~QXdu%8!AEq zz3>zT6LJs)BKQe(jQjE?|NrlFzZ>?6 z@82=q(`I94yZMO0CjYR-|QgzNs#Z-cyT!K`SWLL2n%|}Pa(5| zs2zJiYnn6%GAVxe6HZP}zPY*CTu^B@<1^P9`tsH~^ak`qJuua9fj%`g^_a~eFw}!3 z`=jk`H_$H_P(glvpz#AhFbIiLL>f|3QjZ=z3KqUvO7-c$WQcFS;~p|!dB z-}(92xVSfXK%1Er6$hX12S8SSjrT}ZwF-{X(wmr=D<|8CZ?G%IS%rm#Sy>m4Vs?;xXW1G&VNI^BBwhyNmSj;q(5__opb7)YST+93j0O52;E**oF8^ zNJt2jcRtb;$Ds=X{g9CWUmBoJn2!(nTx*?R%3_MR=Z6m;4tE#2!Jv>2m12AWh@^ro zVPji?%*08u_RSv^xZeF>RolVA0ooTg7#)FADrrdw+e#6kV`!NC?%m+%sO5_n9$--C zY?6|a=ZSxQ#Boe{&qd);hYAE$&TAww^7sDd?W|X-?Kk}J%zd|?*$ACooE@Rwz&?ig ztT>%EdY^$g8v+3&CWhnj2@6A#>iqGe)_pH4DoWKAz0CK@2mH&=&kwfM4#XC~9plSg z$Hhs=|12!%Exa5Y942P)5|Gp*dvrw~pT@#M?#qvTOHIC4M(XPL#=k~JvNduXmwt*n zE#tkBCKq+GRK0P-kG1pi4;C->M7h-v{K1okG6@X{sYX8Sny0IqueZ}d>-)zRWEV<7 z%x(KA;L&E}Qd>Bw>*nNlT1{3WoZtW?6w-oTf~B3{S5(w0M6%G})CPNGxazu#9??Hd?) zwb+wDh12o#C-TATV_^=2_}hMu-|Q%}ShxJ%TQB&kF*!<+SPqhW zRI{?mf!>O(0sf%bVCOyfAaXDMgc~P-h$9c>uq{*KbInOC6$b*aHC~KNxy>wuO8oLV%*6uux@C zz5MB)Z~n-~`wtI)LiTpzM4V$mr{(?l@#8ucNs^eWin6luU`e^si!w>+&aN)2wc&!7 zFJEd<(nkw|qUr;V_9P0!f~ybudwmc9q*r_T^mA-%Y*bW~6kRl&58m9?5w!I6>(|L* zu8%~chgmr|%JeuD9u9m0n5fCgVG|M2gM@|{qbwQ3g%+=*Z zW)0=7eRum!+{UL9m9`K`p_$*|{O!(YT0$2F>;`m(PDFyvUr^2BVJ8A|^i-C00iZeAW}$~5>+MMVV+GI2i*;??f<_9%ctYbYUP zTqbI)=m-59Cv(eDdz^WH`DE3A5&$WdsDk^3xB@mF3KFl6sqQ;5lLYfmY zmH?Bze@~=Hc3lLK>?X~bzy;+nwo1tCRd6URb2A(by^9phF*IM-V~?G0=Q`e5{A_ODZZL1a1tidHC4NGVA~zAU~2j8%)ax zgQSnX@UN!zJy)m0+iyQpk9+?fnA&5Wy!`d+X6RK@Q&XKn1GW`CzkG18%T$OM-e-r& zlD>`cAL6z$lO-|enV2${mzP;oQ}T_Qj9?iP5W3!H68XJD>X0grkB`sK_xhk`ZD$_k zva+%L{{8!4aED)jVgsTYA+wU2mR6tU*Na_LIPWDQ`<9RoEiyBckdi_*;RNs1d_Z0jg@^=V2I1V3 zues3qc-ur(RTUfwmXr;4>tPg4#lLIJXQpP?ufL(ez}y#)zBrR`c6Np&1zK5JTH4;; zPU3r$H=zeI)So|)ozRcG0uAL24Gnd5M+OHq2K}8rgoY}B%|nGP^(5@IwcDp7mJywo zeEyFzk(aGjoJhid&)q9QUfHwgb#QgvIvK6~0Olk{BUQ461qAjpU-3Y` z05`#6hl9RP?Y$I*=JXBR{?;ud->|Pp)hcZ@Oym(mk}D}G`S-vi=!Co| zRsTa6pJ5b@xTxo$jfY2V2I|TqC zi!s!VPEcYQ?n}J$+i|>{C$j$U-pRngKulHI-j5d*H}nqq`Ius!Ob5y`zUyMVOQ7Iq z;w6#VLAb5Y{#boS;%Ii^c44>>iN(F&n)FG zM|9s-^$v*R1c_<$!XB~bCfLksI{&7fdCpiHS#@b~QcBX@4q`}kdSIzx5tDKvFSv2# zYRw&&_BlN>D_2@mQ#}imn)RkuZrbG46~3Q|9$~QlOnCr2IWk%D8C7$cXx)Cu8J47oaDnrdpbtky7jeDESjPYfCefcgcc?Np$Of^l)+KwT=jsT5}k&tWTAfLg*E1IchrX@AutiJ@59Dq9a>5 z;-|F~`6d-CyZV~_`g(0`+Ap!&NfwPomOUQ&+ss=sgiABEa%2` z>FIrxgKasO}& z73K@MesE}Lrjdg^=WAi1wIu-_CZl^P15~;6yW4x!%J;Z~JFMm$SL2A~u?=t4-MI}L zC?hRhZLkTk5MNr7_Ul`~nV6}nK z6BnOHa@@h)G8lrzAHQ-_4aXj9>&)qCx4Y1hZc#|_Dh zgmZvZ_@0GjW-dTb{qhUf65ssFXay28@OG%8myz0&0HT#oH`-T4<#un{Du03=(4;Z& zJYttPoRx8O-1{b&Nc2|jPxkq)c@4fyPd?XM1qL>m{i{S-sW8U3fq2bmDA<^n)V3#f z{0!IdF){E%@4fABwVORdv=j@wZxI@s3kqE{J$}}MP7z6Cp_2J$N}0=?<2u2++fQZp zxBmRRvdCtn!22x=<;@MB9LG2F}il!TQ?B-d5 z=3m`CDN4a!&E9TlcOLXrrAq8|adcdpX}ZeM%oaUayM_G6JOC_WPdaEx(`cDS2(2!- z9%@)|Ikf^1l~O6(Pf=pP#|)v9B1`4@V_$uo!yT#FC&0KEzf&&hlY1h0_*0BKEIner zZ_}u0ez_rlj$KG?o!B!}y`+P{+ABiNj6k128L&t|J=XGVXv6@qgW+Q%a;e zB&0;TLAp!OrMpAAK{`bmL0Z721(r@hDe3O+r5gm^;rD&s{e$OO7-l|m z#C2!J*Ey;N0XSyqrboaV8%Hh9XFy+3XFv)Kf5}&tE__k&o5q>>gGBk412MviPx&#M zE`nlIL)jIdJ?c{F5OVV6v$9iPX;(|hsH#5H#KQlkb)jOvWipEYdh0k{WwIsaSf&YG z^4_NO^}Rcoub(a!@FXb+Di2&-0SR!Q&%P z_ogGImoFm_d7m{A@acD(tT{6D7&Hz%e50OF>9_+6!YSgeS00 zgK&z1EY5OgB#$n^dN^D3f<_PNPo(j_)8Y4`B941U_i&w!+3zYp$6LeR?`-dG>>k=% zSq;8EE)3ZIbcx- zqr5D)H{5OJ>|&lY@mq*93wtO-TZNeM~{`*n=Qe3$m$F%(;-1fwxWQ9V;g*C zSD+Ar1W5TmplK~-SNE&`!G?=@p6DJ3xg!BoX~{MSz=q=FS*^X5oSstGqC(|jgXhUD z5}@9HO4K^NINUSP8yy#CSV{fH5?dh=tiE1(R-+Ul1edpeCGb31J2mobtcU-(?ZQJI zof!~purPzxRtuIeBQg`91Bd`^D8K_Tu)nsnV>-INE9ktsEl0%G_ zz8!n!y#79rh(qQFNieXI2mp;JVRyece@sB+giAk$2$A1k@mihsVrW^_?vf}Heh7 z9?G@>W)kD)U|siyn;RqyI)aopwIMdvU<7%L@Z8@_FEb5xj1J_bD}c{;QYcj`|nB+sQMDQbTF@Q+T>f9j^sw#W%T?DGEJiP zI42XyKnj#pFx&C7j;UC_&HC*RC;j`)ve~2y5zb)XS-zqnWdt%pr}oHnDBwkyhot$o zz0RO;3Vwa(2CX9M{}sHAOCXrh^6}`Bl-DJ+@mVch=u4H1iqic@qgg{ljF zP8U~KE5B2ie@z8p1QviORw>sk!CA>~$*`@}L60}c<>VgS=+Ddd9cGuhAZ2fol$eo{ zp*u4(U7%gM92`=+$>(N=irlgJ1=HU~i}R(;ddao_#aN?j@edYUU_~<&6<;VE01!|Z zOs%&L+P7T_W&bdU_-j$*0b4aYBw2A2CRR&0)c$U!^KC59+7_u$l&TW=8bZllg!d{$36a{mpk0qHm%HXv(J_yd z%MTNQ%O{+{Fsi1S%~qH`kqI9|bdh4d9)m)-b~<;&W5`1XphX8TCv`7TD-_Z*^f?Y%86N}xWLSNMbry>CW06ZQhMf9ZZdyw1o*3s*`$s8 z`2fAMZB>qVU6<2j9XVG7`NUk(@2^z~+6jA&)AAMR36!$MRJr>XUWcZyc@IFcJ{#a4 zUt6?s{+b@>nwn!>TPO^cDugBVv^^%;mz4|G*=hMd`?I#46G+8n98^=|8W12B-}44W z5xd*z@Cez|{52^aZv?CML;-xscbol%F{J5G^AfQlq)lloC*vF}5B3dV0&EBRQ;*ND zMA#PvxMQWgo*otJ0u|%w>FJUonbvaWRQsj;aPL2x;Sc1*oIq85-Ok+HtAi8KLbi5u zQhZ`&Y29+Gm$%(Zxhq5-hmx`ydY<@EjH;jc!iRO4(GnTt^Q}$PM{|Bp&Po;+-+VXJ z-WvQmyncDGGz4Kq1zs@?b50$Ww4tt7``=v#+~0;FD3lO{8dx3l+AU;HryF58-KI6>48@{n)6I>tCnOkSNsB>el*_Lx}YU z6c%RY%5Jczo+g6BGW~+oKg%%ZoM#Zy?e6KF0!x=mP|RSvP-RSdg-a1Lwrc}en-*sC z+L-fNkYuTe-}A7t?w#+BPfbk~O$9?4!L(mEGFt!s{X2ZA`N-uIYdZ+f151}imd4V_ zKkqXGejGX`0u2pwXvqq4!Iy!wzgah4=ToBmYRVRkqF(wSvdD0#eh z)4A!4=qK9!-B9mWpnMmXU*ZVCLZXwMX4DTY=Ni`&eqhBmTC;o<^LlG?_+dR>d?-h} z-ScS4YUta~+A?cH+9Ilu`3GKkbMuWqlxUb3O2b7CF4u zu(UlVGNcyb;GOcWJ6~`dtOBM>r^)3!DVc6o{nbTr?8lX$<&Nv&!<)>CEfVO=-^XnR z#55ZSp$Mvd4O8fO1;w1-EjAH?n$>?A|4HXY`nZV)QE;~n|eX3ryzf0nTBH@$N|t*0v9_u^V_tgdfDL=1i) zGEjV<++huD`g=a{qd>3el5%V9!{;2euJ7uX`Bq<+H|0LS{0zn7^{#Jqua5d2t6hx% ziT83xhqQxsAJiDXiu&?Jblq%aIyo~(-ah+$rWLYtaci;s;LH@^eDch^eg>id;k!CJ zcdihaWQ{=PK%kK5pedgU(l81gxmnK?_B`lK;Dcsg`k-`ieX7V8-ra+UaUyg$H!|MC z4#oU#mpAnQW0n5)uV#j{L5ke|x94*4RACVj>&_z=BnxL+T42omeef&Ps;S^;Ljb%1fj48JQANChf*l?`7a)d zs`hq#0cy%K5W){7{TuucB=IB%TOzRGdxxut_CM|k@PfJt37+#5jzg1$VBtljwhhz^ zt$oFWYMM4Q$Mh{cOJZU^-PrSJ9>&TY4{)jNnW8UTr7M%K4N=eDH5G$8Iu;&or2 ztbav4dNbwRG1cA#pS!v`>Z$bRalishX#=fuF4^_?R#P!9RPkvx0l8wWQa9UY<;6x~ zc0HCczY{Viiv)+hh~&Ms$g}|tnRyFm$5}JiB}sj z+iqUHml2>C`h3qXx_wmodr>H~vr8rxFX-5R7@9F)T04hW!Q-1q@~^Vrw&Rh+aOJD(5J%^frphJTW4x6IGhpi zMF^_Te4BIFX-lT~Y*tY~zHo%>N-ZZRZQUMv%e2OfULFhi*_nR!-Lz3E#fS#&lfywy z#=$u2!w*fOXV<6R?(0u?&D<~HvqM?JdJqWsa~f0{yz-0JG8yDNDuF*8p%fWK7{NbgA|^LB zHv8yQna-&;Ol)bta3<9#q#dyBD_a`q>CI~utGe%ubPf)(v#~vC8{V)Fj}e2ZFWT)b zRoa7wDMw%_Qn)-_$@^vzN9~Ww~ zIC=QD&cCYavYM%*T3a`dXGM!S{(Os?X?CaYqCxK9>frj}<-J>?m5_tyOWkiVU1WrX zd0KkNsJ%8Moh9P4{|BZ?{ENmI5B)bmnEp_Ot_e#Dddi5-_dxUY-5Ps-!Euu>eK zgeS!##q^niWU~G~($JyaL0@YxDhwczV2!h#x~6S^{C7}ARlZD3mT~)Um)cJEdvTE; zw|}f=`QL$o4+3^;D?^{CRY@{VdA=glx;?}q2|r?EIcU)gaJthV?HnF-L+NkZ<_mwH zqENG@obL2K*T9#1fZW|rUSly*rBnQer7--J^pte%apY-^0$a602Xsn zhc$9))yeS6d?l=-xyL-6oRN`{r#tEg^Zak#jDrUJgQgeQ)%)rTivS-W0n|E;%2)Uf zUb-setLK%ubk!m9-M9RjS~A&bxO(;BA*nKOq4DEli3L{E75Tz<8M{z*`w8gxyZXo5 ztG|DT+w>o1;S2D;YrlSOtMWULA~S9kxgShE-fq5!Np*^a94D)*XY0-O;3z{C zRN@b9N*&Mb^&XSrjXK)2PO^N@KM1&ra4{duj=SQ^wHwrbmHVhfiH;5Vxl_Pyt%00&&)%|+1-UC)Wt$~jZE{zzL z!zQ+b_V>@s29}E({Ahs&LCEY}Do*SWQfszltXRy>+@`>5IhfypQ;K+Z-=NvdH4E`@ z&ew+%0*`^&=Mh^ zR9ZfMXDF6c=00M=d#E;kB+Gbg<%DMR8a=B&!v8-DuwPw8*hgBejvL0apy2Z@y(p^5 zO^abyddV zmPLh{gmR@iHj^c^1x(l1XoP9!wj0#c{^3PNH|&hv*`8-bxfmB z0P`ZzZ5MB{IK=`DnC*OKs0 zz2f@kIQDn+hpIwydzgSe&P}`L{B-%rlFJRKtwB-jx$JLcOG{!FT;7gA$jYmaB@9~h z#z%;Iht~-grwdRa@yA$h{&=2VCDj_z*~5)Y!~8H)ens<1;@{zqzL4;^_?YPL@`fiB z6?q|{bSKO659Z=T=G&ADH`5JJ*BLiPY&xL`oJdh(==d8}*p`bu4`ROEQKw><>2a^Z zTUoWC{@&h!K{Gs!78)8nx@cT0#WH$8bkO-G-y_Sn>F)X&sc56Yw3r5d4>Da$by&yBsyna0?y@JR5JJYoV}!p0nI9`5sk2)UB|x8gZtc+~nr=DLh zqS(=nhX+*WI}J=cWI#TQB6uzM0jByW6&B9ov}EHh5O{hV6p*Fm(g5iS>HKLL&3FM9 zciT*(4&-VI)VVziIQs12aly9qd-YhyLFjmrY5dAz(b(=NJ>%5;U#vG$*OD1Y9WfdV zXSc=uzU1fqoCaaf;sEjM-ucR?z?#&gh|64?)})v_-|_9#mdpI?GXlgJ9NKWn@_7#k zm+L|f+HmYwq3yI6G4)Q@H#g(o<5T^N;LP2hmr{kk(DYtev8N0A1WDVn_$IXbE$W0z z4u;G*K<=`Noz^?19Fz>2)tNtBtk3c4-Dhx?5hC}|%A>V8XvkXN z$avVS@>abK%KiNJxCEOZYNI!So>Iuoda1=b0*6wW9nB2c*)I@jhBAQmQj!DkYM!}- zlYQqfxeud|N_E=cGW@U$)rz>%zt~22ERx+980za^aTd_w^VmEb92{cv(^xrN`~kP; z3{|)7H}jR-UOS`#)O)ckP`rm6vr%o-SvTlDYS1NYt0g%cP=@6z4u+2HUkvBGZ1%k& z8qi{S;rFQuK2akar8^Z+Z@u28g^E#1k{49UiGP3HA)YWdU3{H@yt-#h3g0Fe>sEnW z`TF)V($SfoZuDVbU~q77fEDg*Y>MS}h&eG~qiCdzR0@?M9~z4pnu`g^R_3r6iKus~ zQPP%d+3eI3{u0~dpP|k_L#rw%`l2mL2Lw@!bU(Y*y`>TwuD?{f>i{wu*mOpjX%pIZntSEdtaR-e7nU6S;ygY#b>z#${P)Hq%x3&0 zh;rIkAj(NFuOR&ZBnnvv7^N|N0pf(e~@;?ctq=M+_}D z^F5>He+GEi|Lg0UEV#<8N3)-;cfUW_Pn)z&k)UBpP8G2+m9ih;qkQG=3e;5^@va8u06~Vu!XCyw&1Ot# zzPakmR9svWqtSjD?_L60??&keT4UGJzWqx!u%TSBD7)RqdwRrgx?(Z>8M)=qHyg0} zDGBip!0z}B{n6Z_&cV4!p!z0O@&r&sRb>uSgeo@$G`ZGSps;?lz%fx5w4f4i8Ez_h z^&-0TbMXJ#55_@~=$yRdXOb_l+^((@Nq+6aw8qVTx!jWIp8HNT13w!y0XL6Aw z1QkrQW}tsbWi$)KVE6l`eC5kSYWnlKJL_M#}j^c6NHr4DPV2>uQt&+#)2;$Gnf6 z-nX7N%RKse9sP;^U4w~*wQ));?)SQQ<0m>^v&*)uR8neZ8^R!obbRJzLP!mk)_GZ8 z;nWl)E<^HsF;kZetZ6bV?5L9H(LA;|1Q8? zUpm~eudX#(sU@mXi&q_7QDa%$Bt>|P?(zgy7-XlV!5q5c?b0~kH=2J|q!q8W8o-Sa z6FIr!2vwJK9E#5w9#mCxcrmuS5Y@FgG);#t#i5Hhru(r;_p1!EA8+&>{KQPu8R*dL zE~m!Hde^bIcwfI9KrZZ2rU~VN5h=guoLUB2zC~~Czk*qirG$PQ%QuSstliq%bSY6d zrd=xhIJ+K!Gvo+3@9hN0S@GjKJ=XN#B1lLE9G-g{wFq0f*iZE7&}MOb6aBafkIMBh z=r7-}IrZmU{sV8Ck=k23L;+q~{hH=5sg^#Qt}8B^Kzk0J?bX{L-kP+e%gXcu!`X_4?NCc+KMoTK)4%rf#7|pM_?B z(SsYU50YYoBQ?Z<(?8|fv8>dXQ%>u$d@uby&tv|z3>U>w@ZZzxp)si$J%YfwxO;jJxfL9!qIU>${mpj07;o%b;6J@X+K0btn<%&s@~tN5tQ^CL!z) z3axYvx97mFn`H+fe~bj?o8Ib*ngSB>B%vd)AjsIVhzy#SLe_A_S)?^2U{`}d3Ku~_NeQp=9poYa7YtHn_S z_TbVFxLsUJ0V>?t#nM!QT;}j(s{4q`9r4cq2ph~Ll6%nAv(G*q%! ziKgR8wIO^O44LQrCbrkZNWIwN^V)6Xn4nSwyNfF-Z9M}ej0-yij|*FiFyY)CFJvYO zC+Au+z!Aq(J;zhdC|1n>@;Wbef-rh*$89cCmm}N_V{l;T{M_N+&QiIDfiFLf{XP7o zU|E-=mC&_FrI-r+#iYH1-L&gU)wjR3nY!yaqTUD zqM}rZ^yx(D>-%}B#TyK=9{na_!+eU)>Axx^=;#mt%wBmTyRSC8Pp>-{yF+I@dsLwf zGgC%^JA%gP5%EUQ1IBi@j3Rf)v;7Z71o>oH2H0IKy~D6NnAJX7D6^_yYVAf#Rki)i z<{kcXE5+}HW(Pn0gc#xXf>@b#_F5JR01eTJpee@v*ufsWZ`_-V3TT*B5GS9HV~87H z)SZ56xA{AUSnZpDMph1TQBh}2Ye`Ib;Sc{e@eT7VKzEo@{qj%Gq6R+?-8|H8senAG zcVV_Uq5%^v3GP>7>r@sJQ0#posn3e+y4+I$O?9mlnZ+mgK~l6RId4FA;$Lk6l-2g$ z^~=v3j)rX(F?or&K=8^b%K5$pIwHDud3#eKjNR8Tm?ns(KZO-9ddUr=)^J&%Dn;J( zqzI8n6B@_Zz9y{x+LSh)iO9|fwY}MO)1@Lq39losSK&V7=Pu_~3}@TU1azFU{U5j0 z5XDnn132E1E9YsR4c5I;jH3d&Lt8wT+X#!9fuNwb8yg$r=j7}-UCHAv)4R2D_5Z5& zww*XcM|PFE&wk>a$VeS_(iczg%<_#)H-FRu@SJkaUXz z!*DJQ-|>-GR8(|!cGlO|FOZFUqAD?qIKjg!eiAJFK)+=g4}(t(R%$ulVSD*MjVRZR zom2=U+CRCBdr~enn(R*JEP4OgIgebVBRXC%u$LFR8aa6*^qKK@eeXLiWSUUCK`vP( zavf8a!kXTM+TcwU-D^t{vXp*^jrB8qoW5kC*IEzkGU#}Ht1eJh3oRrxatszcn+pb- z=)5Ssw6$oJN8zjt<8dP*T-^AZv+bvb&qYMRuL1k}QYlyJViSYRpZnYp7r0l$tqk9t zMxF(n(%zvkUvbN%(S36*>aFi%bKYOyytmlZ^#r~Rb1sZ)h>fgk-8Ro?5df;R)2p*0 z`Cq|muWeHjTze*_G(CiLH{;!Z*1Ne?6DzViP{Ju4*jQa7)tPllVT1^%QG{4tha8u- zE7b<~K5=XCKC`Pg?q$2w3$Jt4=Euw!NK(P_<$9^rcXf3YTqcyQVYxl}9Q$W*-n#x8!|rGAk2s%5CeK+%Wd&%ujZ35zh}=N zs5ZQAlCu4cG4-FAP=LgsO9w$GFF6_k8iStZT;dFlZ^V|)hYGsB|mygv+toU+@ z__`e57}3#pCqnYk59Vdty`@$syYC{M^IlE6v*4c`*t5M5VxHgzf=FIoti~zT=MW&; z1q0CxJ?FNgZBRLj65I4+ua>8GX8y#IdLAupp4}9shIk8u=K@)fS6u$M*Q8j01ayz+ z8yLc1FiAwq$9HRmL_>mTg6J?fBDywR+ODlj;zG{O!3(A}jhEZ_8dZkzJ269bCWDfs}yqSeGvLAwx;)Z|X;<@77 zSf9vU!LWoBq!Tbyj&z@-$!(p1uojo{ui3RgF^}ZUI=eqUa!^RQHUj~XZA>j~c%PEL z+s!TI3!C43HmbtV^;z3!Q6ZzAlSY^JYV_D=jA zAYJ=;WCO)Z(94T|O;1qAct!QGx$-Ag@w4zo(VeSOA{h|bzs#j22$PnxuJ_&Bc_zA3C?$5G0f`J!A!HX$+dZ$I zPrlINU}0e?hrpTw?wcae0@S!Ut1c>82&fCGW14fa^)^g`@l1KbC}dYn?N-+|jBWNM zFc>JZ)BScQvmf9mi#x4v#BaHT#01&tg?aD7vgr%GWW+A~sEYM6|2$MowNp3c7UN6x zMkl)O&Sv`EDAH~u3XrJJH` zrDSa?A~G@;cGL5-;pGUv%0+jmgbV>A1+@&KVP+9kYlt7XB%tAe%fa>f1>aa9O8@>G zeeznnpOmwFigH2{Q)Qcr6Rt3&q^%9ZY67W^w<3&GRJ(zqe{@i_)G8T8FoF1pX!%w5 zh{&x>CeZ_5MVk~=njB55PO-MlBt%q&9!Ej{_GqF;ZrUoKIu;?CMnM$McCqx3J>0}C ztnuapRDlIL%UK)R5$ym+3X<-2TAnDd!%`!+*~M^7@6VmyM?ys8b6Q$}*-h7{{h1(| zxt&J62`f>;9Xk>mR8$xq-#fR!(id!P_idIXYBLzCjv*_jL#Rw>_J3tmOe1cEbCE$m zHHl`Ur$#6WG|a)X7n_dR>}L#+gCeElwOmRHrp9G5vM;;GMw2!$0f}D5H{-7F_FT*} zLuJK2!@2D3;lK4!5CL7eOt=WCuNi(hQ|*o6XH7LuwV!csd@em=m}jRh)#KG?E*50r1R8z{C+ndDc^S6??$&!t6J1op8znFG>Kzx`{O@LKtUv{J zh6(!aMTTXzWuK-i)|;~zjoe|7g7Ka6_@m{ypFX2jrS-zi4Fd0@DIK~UJv4QNZBXcu zr>Tn^Vj4;cNP*lG!7Rw_oHsA~(yJ|v##t2aYF5;_!G3w~)Y3KX=#j&$209i1z0q9O zr$VZ*91`Xfn)`|CuU_BsxJ(5T0u7V!_S!`RAd%25cXXjShWEnru5Nq_;B2la7~Q)3>blg zH77gbk43G$xIw`OOgT!D~R(8}vS7W9g1S_SMB)TBfV4(d@BTD}mwh+{CX&ZN`Aj`Ke8LHhV zDpW@}--HN6Ft}lEp8XAGmG?(Vxu;D)#vkb|R0j=SFlo@>rBWyZjPx#g3{|QAZsit2 zCFI#)sr96?Vh|nl%1$WOZ1*ur*t94~8o~((H2hbN4d5Mnt9ob>>p_c?-f4O2*k+IgF{W2(2ZV%QJTZY)EsP)x$60%rRCK9KE3)D8{YJJJ+o{d?wkj#%z*nOv^ z7p~}Dq^A((F;wTm{tO_C<5<_4}$8#C@nl(f-LOb$CJy(6ZO}+meS-2$1 zP2)PMM@*Z?GK8**=!`v7gx&z9sJaXSV}1SlW6x(w5WNsOrj|p$7Z=ytPVV(4&>zgf zN-f`!dWQw(w7Xx~XxL*wO7TMS-CYBrN&LdXP!jz3d|=mIs1VevKP+4>GTW44I#(jX zM&*-8K*2j?G=W(kw5sOsBCPbhdOGh@W(q6cYEyg&rRnIImsHWTm)`tE9Hv{bFiKAV zP&jl`#~*TRk&eg|j9P!!gvx3`x2cO>GBYzDpPV%M-__OB)IedzV3CB6o(JZv$Kk@w z0OvrCpEk;&NZ&2fmWPj{1_Op{C1WiL6%J9h*plC?;x(uVAdzy7*htt%i;)O;#5V5S z$pk$;hzOr-zTtiW&_K3L^PI-&ko0h62>im^((M1uWLsdM?vQTbLLt4&3tOXY6?A<8Ke^xd$r7Ev^V-@<{HX`YlWk4q_QGNWO8@kjz7 zLBN&kde$bn^lpI6)XeN`XOy0toSYu>4@o!3O`vD*j#uA;q5({OOvlBh$pX3f>uWD+ z>Krm58AYAWLgC>GF~8l`GlEdOu~O1jvRzo@6hUMjb8rtWOEiN50Un)vw4}V+8=g38 z)X_*90l&{31csM1uZ0RDo^4LkAsecOSFa?U5?A*O*OWqMr!?2LOp9fcw=8l|AO#Jc z`yM*9NXQrf&Qv1CeQ+zqfZF0aQV~(nf`S53QF5P4gYmKN3Q2>R{GK}_ofA@ILLjm5 zk;N6MWb)r?!pL=JJ(&1{XU1u8`BcaypL}E=76|x;3%dnO5_`n z^)`qkV`2k^&*kTdy`r<>&2XeQVc0olm{5CeRjzv8WLvbTTw-Y0duv*v_wu2L2stax zDMGSFbm`2R1J#;|)S|;vi3C%JT7uW6{9AwGf*>pULPhnXdzlO4D zf|L@`gCu_lkTwxXlp-027;^den|P?o?yXO-y`X2fAqX~;0h|T3?<6V%9LPUJ#}Sbk z(k1k6%0`BSLUG#K+BBi(b1*weNy(zA|5Q`-!oq?=(o2Wsw#BEJ4G=>~ywIQ?{A1R; z))fFpiN5cxR60j`IutnwY8qo$L-W514L2Q%96zQ@81&==_DJVX$fPK z@$Ag}Gy_wZykWbzh=k8Ry|VHMtck2`X=Mx4p;68EY=<6-9-XDAyam(T5Wx{!ELz=; z_2UK#9GNkm^6_y+m=1Jmmn3)tQ=uYqbDh}&53cOGG_U&nEkQUbKmqc^{IdyTjwGQVDqT&xr zXL@~KZ^9H4yXXb^fLuiN*8n4v?#E9nQhg7;!8Gu)Zj}}ay*r_srkM#hW|f6AvzN6F z^OsM`59jDbkXj!YRzNE2JDyxm+O(M(f zft0;56G@in+SF)@a`tcb3~fVGVjO&lkl2PG-+;f!Ki|W*w>|G~FX|lTGay)7FJ^AZ zNm~uYJ>WAI1F5_YbLR(z`vRZ&2;|5WdOGqc0?4uqLA%&M)ZXahFcKYy`f1f&fXks4 za^EAQrj9Rf|M022J>dqVcL#fWv46)PSiMH@xOq!>XF?5^Q+`#I^FqVNOg;w} zH#Z&_5jIfwuq9m}8%HJTV{ZE*eHtV@YrpH&2>-iFN)fLrXqa(yhnVEgEMfd%~C(tyjAey^0>N695Cg_u{A$M^(aa!?#hIqNq;$8Eh#`4Jlajcha&-n=c z|5<=LdL#vTd2~!n?sI14I06a^znfEwxAFahgS>}oRkC1;TK>us_9T;PD`-NYy7*1< z=XVToiee%3oi@?JCI9oo#b#m>66^oMirS0>%(m$Y10^*ze%Kd9Fv11F8mdyiajfLs zD==VNQ0pE@xMAT$pBh7qV16By>nsCt31om|*&$7>BMF(ONo9O%`Pmr2;&?|NdQ5CiU}|cLh=>S3IC#1coq_6bKV7aT zhbOJ9tb9>=yOE^!)MaIFI^;Fx*RNjgJ(MjvuzjYGh>eBy238T?3-Tr! z4#krJT&zc?p2ky_>(&4Hc(YHPnwmEOz<<{#J3BjtN@+vi1mCc* zU;uSsj)UiWe|Kfn6F~&ks%>($BR@r4VsXFOnxWBDq~3ri4O4Cfj67Pe5KQo`1CK8(?`HnA|RnIwEEWP z<{DoeE`o-~z{aNFchrv|V*l0ErQ!j5hO4VPZP@Db6BnS0zgqG=`U=qqdCQSTE#~J1 zqAOT9u;ieUEkFJW!-}UCe*iHVBe-{HXsEwmvvd;i69D|Xzn|q66BB#9zcK>TmRiJ% z%W0`)VnW->%8F0%0K}qc+~gXUAKomuK!W_CXjG1V9}p^ ze0*%u6^;-jm1oSq)ac5@#>U3ScNxRk78xCliH*Gg?ybV08R%GE78e%IWG8z5e0_f( z3m}w95dndE)1|TAY1#6OlqE&+ayJ;tE93#++1tBa=|qBRN574o6w|A-|0*8X1_I8K z{9E`92%mRXM>(Rt9!F`|ltQ%)XAzX}r|}t}l|ilMe6}?Rk|ruDDmV7o)pB4>jUE~< zRZHMwK$dD+W~Q*ux%JQY`j>1=OG~P%s-SXTKk?!;Y_VQyxdHXD-5K|5;P^MO(ecf{ z(E_711>d z%3sh-dNA9~?QMSWT%MXvFUgn!fbrk-*JN?1o_7;sdi9Q!{Eie6;}X8ad&tti^C0N? z{}7$#9$r@HH$FX~{YtljgssYB_3Q>@14#MQ*jTlBj2H_`-}rb^*J`ghH&uMk<*JD9 z<=@}G3$-KESSD;QLeOya_4VO!xUGKcCop}tK#Mtn5xt2^i*EWm`UO}ZTwGpyxVqL< zRsGmnp8rRW@-AB_?Xr67OP@JtLfs1elhadf7?Co*MI2uMcUnkHj1rXHepn1hj@8r? z`KyP3_$gN=hDdfoC+CONjpV-m+(3pIn2SiL*d0a7e_zL4@XtT~OJr0EmCBp#FBP+# z6tmEhNnJ?H&ZZ(HG=G4afeR!cAW(!6pa=I34#HqC-W1k1lI1#2lSMQ%G@h;qV!f<- zuv}WxdwQ~%ae}77A5x&-;`I~6ud+1V5DPFQ4(987KKKn%KaaiDdFg%)`t}J%t$&?_ z|NXDMljhe%*kc?&#hwnhK#9s}kVRZT?fA5J;b)`UXdzJA|NY4rOfE3Z7%BI-EU`d( zi5>l+XTxb1OdW8I!2fR_bLQ5J>(6(b!d4z3&||Rb>b=R*G*I)fqFi2=5ej8}9@x~; z4==I_rjaKQSAYEsKSl9r@bc44^a&}h6qL*o#Zj2ubObK7j{eru43hoIc3U}IR5Qmi z!`3FHG!9x?+W&4H9K?4Tmnd0UZe{S=Ib#+y$#mJ?JxzK6-S+9zCy+(O{H~qn>l|8J zT4t^t`}+D8n?0{iPQD7cv(Eno>F+s{sy#?Dp%~AjkpfdKz<+yqc*x7k`^||4MzS5K z5Y*L2PB#Y-R*G{1Zb1f_HF)aB4;GEK|Abzr&utEHw)=r_)7sh!Qkog?Y~YrOiRq~c z9|yrJuw>Yot+8@2;6T+Pe?k~g z44ORhrVB}TRX+e+AJ?R@uwqtLRzRZj_3=SPK>=$5<>GM}8JWSaZzA%4fWPng{kw1T z6a+6&sm#vJfof@}uMfH~2ja2ZXNuW|kL#)IdY8N7Xn?(g11_}~1r^o9LH)9&rDaiJ zAnC%a?{tZhe!JFadMCKQyVFMoalJF*f5xh2Ot}MXn2oENSVRyMb5R^iC%H=w0*&?%DU1k$MG`PQF155r_i%)k~z^|YVFv)U# znnD+Fe_PG?+G!K4L=CFVqn;XahZ$oRbbbg_Q&R(I(DTjTZv_VP`U{~jE&{OD7ZG4&?PsE-r;ti&fCdIM?NS_fnlymKYfgi<4V=8U?_vYq8SwU&fy?{3WH*yj-kj@HB0E?c(v>C{wVP2PF*^x z)&0P45K8`=APV5UcrlqTgB2ysZQlEZUhXr{0g^DtX6lEZ-iBji;NlkBfYK&M&=nQ< zOf4=3ZuHcf3*`6fA0R1Ff(!r_m;xhylT|R7|M5!av{B$92y9MmH$`CdfK;PXIteb0 zlGm0H-~kyD%qZ~S2nYzEm(DIOK#TA8B{AVriCEj&`GV+9O`X%*+xt=_161Kv?oY!Q z7Z*iAiW3ph=SV9qDgvcL(?Vi8f1WmLv06?W$b|K`Z_WPV+26;!2ju{`*JjTnDk7pf z=T#{no!g?Hv;80F18&=iA7Ff?`f5KN_v{P_5fM`FIQSCzsV%;=boWYU$Ws)8;ttFP z3_wIw)WN|aBqU_{9Oo011Ptz-9qWvuW$*1Q5O_Z2{{WqpE$qp`&Fuo7GoViKJ}#d* z+=PhjJr`ISJ|^dj-DrU!XJS>F7YW@S6AH0nGIb zTPjbpvcZ(YdG?GKhNt|_`aM++s1Zzcqm8r+HCg6cg+a4}p-?j@OBIg>1OxDPW$!KjAo&T+@ zq3z+p*F63E_a>a5s3l=AHf1z%=@%^cJ}M=Hj+di(f&6< zSJ1Cr6>02IENOA%{4N6DShR}LA?QVW6O8-IK$qpa*bj_*B`E!t3uORDnqG;c+Vnk5tGNdf>^~dkR#uNk zfsev|*HscUT%crdhrV$L#6~r95xZUq0fh%OlVch6N}V`r2$T>^nzq14G4kicTDV|A z9a&b!mdG%Blk@IXQ0Ii%*!cMNV5a9pH0_*7-Gc)rKPy{u593=Lc7fKlzwDgzjFPJENLzCMF^yBNdWf&i?Pi$jE2`)&Le3peRKIP@j=$*AX=8 z8`#zmX1a|JF)jK&OP^>H|9cXQO*L%)E_^7%&F*a4=v_ZLf+o< z?!FxjlcMjt3Ei_9Hjd`oA*9lP4A2=C61}`>@$p)suWilD)FGieI@B)o+qe~I6+w;q zv+m*Y*9}0rG&MG2VquMtHsrv!AxAu?c}ye$IRVu`l{odQN}y<1nckSd_#5(J3HrCH zstQa_wSE`#05=C=6B}ea$hPv?48t>NEab><#+VM|Sukm?mRzWo^Ae~a@Z5m9eZ9Sf zg@w8mcDG~O{y105FouSPB4?(cw;@V$2);Kr^VyHO0_@=9<9BCBgz#K{u3%ziH4_{h z5rH)K4H#e^o_?G1o(z9*(-jpJcFf@PO{Lk;ic_qgL&OAXr z$GJN7gY~SI9{?ushnKfEb>--5H2ujePmlL1F8vl79@i+wA*cDRpRU0vI}fWYOipaOs)b8>UPR#pAt?TqZB2*LB) znz;|*(MAOt(?S*6jvv+P;^LytLhe;NQN@@0{=Mt@!*88c19fr2+^&zf%PcyV$14Au zZMdG8{0^$|`l-7+$H61U81mwT?cc@{@oXp*wp2;hi`%bR%M0v?*l>cF9TKCNZj*(E zuM4?A%ch$`^mKG6D@T8-=F+47JIiVtR53ES@`6`p#Rvn`X+hU?e0=;sVb=9~kKR7L zV@^4LxVr-Cn1=W?japJ({wL@{h~3Ajh2-j-=%&uggda>H?G{#7?X0b>ZLYiF*Ba6T zF&SIw(0;Pc7cA)sh~?K+lpQB&BtrApc?`XLfh2LOo{#dC*IU7OuLgiSkhJ?Iw1^#jU_W|HJj)f#ByFMjcCRkZ9NDz}*)tHqMZnyOk^|m;(bEPUnu6btA$|8FX+>~| zX*}U-(b1&p?c9l82RT#MCx4RC)7L|Oy?lvHgP(1p*6dij?Yo~7nLoO;j1B%zpd9-J zw`;nLLFnJe5T8kTDXE4ZF*m?Ps*sS7sM|Iq2D9q=->`U+FMwaP4gv#&6o6=4=YeGf zDYi+TRPp7d0;k+Fy(C`i-V&3hO}naK#evCxHo|w*({6Ba{Q?0CViN=;y12L)J=f1L zpHWB9yVq*Tu*+!1)CHS6qKZk*Rn&oP(Hp09}$M@U`y?6OrCWl z-Q7JR`bOArug=kQwk2YJV{)?8ECfcZ1G8-9bCCccy?ClgqG7F9nvlx}WIi~)F95DQ z=L~PYsSpnUJAhxzuE-uxJa~7BSeHL+Fq$oPH-P;{l#tN`1n|{ zsF{X4BhohcgKcLlrrufdlRrOV2%Abs0uI+Mm@`8NI3G;CAo=3HChWedqkfTFr0e`l zIuG>%&kIqlw!QBk8XHepo;hyR%qD+1J@bDP{ZP8`%{8s>uNl>PzFfc#%hb?s9(+_v z@KNo-r3YhCqr$&T$F)`}`c20*K3~B#r6s)hn&k)1$c?bot)p3=+In88iwU9`OX=-&HNgD%M3xAHevF#!~d>pHoeRCDV&kSy9+d<0Ii zj%djp$Xh8*xct+nPe(ObXf-ta0$j@LH1!S936u5pD~2T-kuLm%QAu|#Tbi3MU}OJT zSXddOz`|Af*YhqjlYyCe{`lZ85XWSND<}K_{{SxiOVkb)YSZ&L`ue?h@7~$i*znxF z3;gN{p?mFYkq4tNWK2w(x2%Xh4IP0;zzD@g{OI-hE2)8!ko z;dq3E;jdmT{!sf_^nCQxYwB;egf?1Z6aO37mdSZaVyhol-)R*rbR=EAc1_4@#|pVf z-p7xT5fQb%NA4uLS;hd5zK1*2?rWo<^M!lt`uB!Nz{TiPI;3S}7+G7R>+HE{RLAH) znY9vUsr~~8u{;*N{^Q;KFrb*juZJ$Kty@IN0v~-r|=2T!x zN(vfnom+?#=;gQ5@#dz2R-w-H!UA&Qw4tOYy#5vkbnqiom#-5u%KYpx!S_Qg4Xf$ z#_k4%&%s;*YuwMFApv&w&WQ=b$@v|*a32%PKuN^)0=DVu=qy4Ihp4jXml!vMUcP0; zn{079*Pb9?H;ketg2EWH2-2L5qTofYUcKK5_yBb^HFKVkKW(uhI@Gd~lHV*dd`qH z2ga{ZQYM}k&)F6tv_^750xs%RRMdi#;Ee~7FX?Zoq|;DSkAdLZs6R7A?lvyR-O&~n z66#Fk#-gb5+?oMh49X92|6@o9*q_K-wB|p~u0&85|n2 zw6IW4;<;a>i6UuF~-#R9PqHQ5u&)qf zA_Y*a{$#N01Ae>VskJpR>)!W6S2q9t74h6;KuI!@0d7LLK(|zW{!C6mfr$dkAj?3S zr@o`gdA?AuHILmU2HRGq^@peVS&@ zhJgahWZcz{R*#L1eJc3-?QQi@XCXQ|I>7&{KKjw}IlNRwH_Y1eChJ8$0a5^C9UdJG z4GbVz64;~s4}`q4yZfHNq))cvy)TIR>ISjDzcw}$-^feV+0>Msm35to>HFXyv=uqn z1TfE4*no*l%zKXz6`h^c5mIhAWTOU`*?lI?i3}{*Y=E0 z1Y&;w`p5t5$ms0!WMyS#*Iur&#VW)H;na8UcI@v9AU8dvq@)~uJ(ZM*_*KDZ7OJ81 z3kvuyYG`VfLl@D*<=t@O?=!}zp*0Eyc#>db3kNPEC%Mmerr3YZ|NObXx7T^0E6xA( z!1D3qBsnIV*+3iK<*`|vdcRsVG_o^KkzS?niY9qelc2~6_-OzI<0x$DFc541{{4Fp zMOW)aqAzXzTx43(%_dAg7A(EF`T?U8R+{j^P0XME0tY|@8Z6|$Fs$l+^o_6foB3H-%x6ly z_*TCZ?Cx$_r@@*g;5ZS8g=J!{IiuFeN#jXHJJ)zugn81S!^ z@V6Bf78XhXN_Y2)z#_NN;o-%ZneE*nBe;50)AaDz*j>tSe&XZh*Fwo#BWA-D_9^xC zXH`#UtMotC*)PdbPB(V-^z=Yg9`v5!9PTWY*$m`^u&JO20#(z}+8eYigp5F=pRF{F zy;5aiifvO}Hz}a++!vtm`!|go)f7%G5ZO8lxw!tkl;|K`!XNPTIuDN;K!``(;c@|( z49Jqo(qrVPT6W#{DMoPFagWK`gJBSGAQX{3qNzpGg&eu-IEm~oCeQTd+2479u%M6-U@g1S3Lr>v9-dDi5I=mFZ;QQE zS67#wo(=$sLdD7Nf^{7o8^guLZ5p61AB?i)1QG%)m1F>njXcAFI*Pi3!FFBz1r6yU z*#31nN!TqvBm_4|TIkufInX3${qZ)juA$d0adE$2nNs!{3|4dPAUKC#Ov? ztrZUA$pD+_>8GnBW#QrBFl>MeK&PjGf;Vs81pS8W6w;fcFv)@0U1r%0;6@zMH0`AG z_pC^2dGf|ct@r*^!;2TspJQVN*4g)vIK9qQWVW@j5e66nExEe3M&$i;6@q|P#Qk`) zi3Akdtu4SWao|S~Q)|LDTQkkB!sFfD#WgiF?KRGGuTxU=CzU6BcAk!-|Gw&R; zy~xaY4!(z82F1JfM)zMIBPm|;#U%(iUS3|{Eq(!krc0Q1rTpP4;s@s4>0%nJZd2a^ zQ2~vO(*GifW8_?)K5ZC`y2Hlya;3F=-#Hxyi zXb5Rh8QmG&X2H@~zbXwjFv0tGN|2-}pLJ(dr~d#CvoTSN+^X{TKZ8sIw;?-8u`4PY zPPw(!N)M8w-i^q~oKH~j-wP7)R}m3J`1sEbwsRb~lN8;L_SV1$@rjCxiiy#pNGU1t zW^0*l-D<)@qOtfUr(sP=MFlfis0`z!<~<&Fzr&?lBqUMM(b14qAUut}xLWspP&(va zHh}PvsB&OL1;}Qn3A+(^7feL6u(7>upCb!p0yWaTP;6NHrPeGF5A_Wg-C_KT8(8W} z!NGxnUF5V(<&Hp<7JQdG^MHx_7X)9Cu}A%4Z6 zbb*Gpc2m+nfX#Vh{8#gbPuCc^xqF(L%s_@h{CEEN!NSSusLd-dZbWQzwD0-d^eGaa zyVR&mHMDY?aE@d4#D(?sbrkCI<=CbWl9jRekBkBW+JA4*Mb*15y{QXd>cPHn0h-zr znz+{d{X2HpyE%Z_`Q6X<_Vy;RG~QT`Ry1Y6$W~sY$w*DLb97Y6Q8TGjX&pP2JMk6; zX&n?4H0)Wd$^!a5+fT_$0GJH)Syh!F7IENXeSN~q!12ntw{G3?-|2a9$cJ9o2CzyO za+wDqbIAXP{o%uh(@uisJW0}7lDGl=lf%zIs?kLa*+qfsJOK;q#k(|aY-wp}ZCwox z%$K@X69gIM?+7_2-N%n}a&wOk4wlC9=)!}7njxvcc4B3`@umQad4m*BSy}n5HdKc= zUqW}TlQb_sf3(7WEbCqf3T0YKiQ)ou!zH0x9OIA)VPR)qo2;*w&vABhLwxGjcud)v z$cM4a&z?Qot-5B4oFl?Q-q6rs$3NEAhSn}NoS&Zu2C&cI&%ZM-cS3|Ko>32Y1T7De zzD^NFFXr`UZf>AK_zJ;&1%(jJj4>=*4z(_!)y}Z1Z z$Kos0K(*$oWZYDUud1#t9kKKF_6AGI9E(2q+3x?me{wUXeGVTV{|@N$ukLGrN_-v< zncf^89)8evs{TDcZy}!14YY=w;ydMBEuDoN0*s9bKgdGK5!}DcY{?a2o$+DQI-lt` z=q5!yzUwh^s;}HMDeLNqL&~`Du%GJ|4fcB|Weqvw4|i*}2TAtZ@VQFp);-8kYcuCr zOywPqQ$xS3Bl>H}mCibUCc_v5YCK(qh5U81X$%g0wQP3JlB;l9moe9(t8iGeDHkO; zUPb2EHgiyfWjbtO+B$lA>MZ1|NBPCY$YXKc5@)}+JPt1<(+D}6PuBTfyLL_NN%i~9 z&CTuYZJPm!Af>X(T_R{lHU z(9YhT7LXn}_^l!=EbQyouUdstG7mQQ_et>aLDcqCUO(#uHe*&!rMz-w?$4h;Q%Etk zw^0yBPR;MEP4=KR7A^d`Vx({wz6VbO?<+WK zVqqcfcU%Rk2i$XKXD5&{=*YIVHZZO&EjaEso0R?gQzplw+viI5>8albib;TL)YQ~$ zZf=GKf_B*2-lh`u+zg@jvobUL3ml=6DtPH2ATl~3LBOV;rOLd%&i+86-^NV~DTB)c z1!AJ2$SQN_x?z`#XEi0=xwS<80bYKDWaAs)loR6O8aT`-9X?l7RDAsSF)ItB>j1LM zDHuOZ+0rH;;;`|$(cQauiyntNZl&C11u&h*eq5^4vGBL_x)C1D>fDy6kGK&7={HBn zpKp%efBqym9avjk%{;Rx8|mum(!DDV?iB2K2nqfA+S+)-vm9CY%frXlch|o8to8eM zaG3GUrbM*DZ=0sSX-T~G`$q!d4-nRm88lrP^nvQ=_Fyfa(7 zX2#9Ydr7%>$ZPE4@lhJ*?>i;DbWx52G2aC6U2BOIt!fh_5d?ECFf7tM!>u*Q^?T%q zIl-}*dyNps8RZxe8rt>}|1u;!B;ePFW>J0+nZ#w|B2yWU%EP%L+H2{IeH1gJJp@>kKj zS(CJkG_nqbi|HJeB;S9SEpcZD>Xo+`4EO9?YJl4s{$!k7-1KtpslM$sWhLAJ}f&cq6j}!zW z%PdxFgRbGpkYK`xlz!Jda{+B|mD5lkd@xv6AVY^Fz*&!<)jT{r9ELT+AMdq9(bt3H z*{C}r{uqv|99HHvJ3T(2EhY+Fbbu;+4h5t2Kt^VDxO5g-qEzi-36?2GA;EoPf(QkC zYGPu7g3+vYnwHkq9*UqA_-X#heyjqKg9wGTMAF`glXv`G#clj8;Pm7uL(H23RRa3) z-#<@BN5>dBUa$lZDR#fB9?kq#$b2HDjhdKBP1jY zgXoO*Bmrg*1`O2b_cu2czz>Kz{H}uQ09k$c^2NDYf0+B78ak8Wucs(+NNil3 z+u7*}j2PiH9wu(?OQ`7dbmAMToc|pG2iC)=+(r{*9<&iTCG*dZ7%)-Jf~l*kcA+xP zf9E?vC?s$iv68=L*Q;Q?%gxDo zVrf}v)AB(n#m>$SnWg06fwmtn_GBj}COXy~;GhCVCV}GKzh^>8s;RvR32FU$VnO<< z5{XSEWNmXz4Va1JmI!JG2Zw`$gD+2jY~H~n%kV5L&8Vk*#I*W-oDk)*I%8Qf~W(>%0mA0xPv&N4)ipGjD8jgpaut)_q^1(u zFBYzIV!tbpT8^^1ytTCjx%PLVTSZ%enA~Bq zF73@5GAb%vef>f;G{Hrrv_?=btgjQJNaP=Eybg+{RuX>=m)Y~0+)lq|&TOB2o4uV2G8*Vfj+Wq&J>OhloQ6t#48 zUNuVw?^fF2$Uc2qnwCbZ*rbW(J{lh%zt8x{!~~e@K=78myYk zu}Miu14BbtsNTLl6Y;24NXl!dDd<%U3=CAjQeQ4)-(*iuOoMSatq4U_YikQqz{gn! zGl{w`l7`9%J57DtTN^XEL51Ri+OJwNRsxz!h#vOAy8ddXg6G9f*FXK&;9TL2M4FZ2FLTtBVz!tUpF;0H5*i^lW!4S zyr@@ddV%IllEDkRO_Tw4Y ztFe($SXdWu1^YP>H9rakVQ0~iSn4<_jzXm=lMoT@?(W9P=fEHUs2BMBh`tW?9%6@+ zoqfE_l7vRe4Rq7q9^G9F801cfPbE-AR{7P{&kPOIrL+Dm7Zig$v@$VinB95KhnLXUA<7Du#NBsG2{J3Hc^m$L%`nQ!91Y zP>}hiXuWqpAB75QwuuTHCB?(;3?UpR2$gv^_)L!v%X|A*Efy*OWOhq)b3>>ko{S0x zTB1?s-|^q>uX*zT$xU?cIr8ZP7YQI7!!Hz8=JrViMqU!T#Jhm|elNr&z54rrp^Z{(PKjUJQ8GRNX$W3HYy zVJEbo3(We`(o#qv5U6OR;9JZ%33~p8SA2a>5CSmg0W}Rq1co|E5rUAJnHj!UHajUL zWo%^RIiX$~`?lm-Vy5q98HC&^%C zZG9nKL9=|vikB)*e&A=I-*eEsZRU0t-CpNm9Lq7r z;1zRmb2n7TAmBC>h|G5iqEHnB$9O1c{-$NbO%w{mVUAh@I}S<`JUR8dYE87p_8^$s zO>wa7okj3lC~|@$8wL1H&n7)x-S5TGa!h2QFC`hG`2vO_#|bDczV-L_BTo(Yzdd)T z1VNaNLAphe5fN$p_EbrV!TY!qnyYlZR=k~(7w}}frIsB90lz#vJOH4fR&ny+3xz#5 zr$Ckbm~)0cOK8u+l&*bYJemunWyAN|X8FVUxTuaBQw`#fT!p~z>`Y8=%r2oS!PcVg zcvLU|Uz)CbxdT=bwW);JY-{^s5#7`gQZ0YzBSVtpy{=^YwRynBG%sX}kBgRI=|LiZ%+;PyvgsHA!7F}>O0BB`qzzV&uzFLUhIOuQ5O}| zU_3lBa)q3HXKiesHiOE95TZo!Q&|~E&SJ+qx>EICqqCl8C;Mjy3-s?#UwuT0J)&Z! zbv(N91xxj0*Zx8y7i2@gtLB;BUNsUD5?|`)i!6Y*2DobeSWLHW<@%qUE)Mu(8UMVAum1`J|V*IKYrkP30gqf zzbC+?IwbKfOmf-L3TzFC8K@&A!1otC=qXu0zq;(~Yyh!3A}Lp5Q$y;an`1zN|NMB|J_D@O*`uyAc7Knw`SpM{+{pZi0d+XyVadA10*`#S$ zcBk#;p8#up$DVW1{Cewz)d1Mg(GlLgAi#?h(8O{~Z@l-{iI7{=AFfZNb)4t&IgGJwT)h;i0O>4qOUwHG32%6@=h9pGCmG_tufxJh zX~;q~3=Hf+qCF@e6(cv`esFS%gGm?V;qD%6%^LT`yp4?MM2r?QFgiLq^IBz^bQTg5 z6wsp~fmpbWFVW~FP~W?@gzwZT`R#`L(dupHJjcViD)c9#FSwW>=!x%z5Z@#V<)vB! zD&nP5nw)144l(%Z9wWz;NXKLT$}d8Sk_@>Xz#hncpUno`SZ1Z(O7>UEO^uB+t@Qr9 zd`O|?wTiCml%ga?CSCzFOLctaJFX#-Vm{xQ(mL$~%mQk?&K}-k)kT8YgO!(;=j801 zUtC-XlnK|P3;mdQV|T+DS`T{J#pUifivdP3kODh{ECCbU+slaDe~8gxi$A4KQpC9o z!~hTiymE)P4~441!N$Z;NI74v5^W^K81sWl6|F%P0e}x04Vjfhj$%HanX)+N3Sc@Y z*(}_6FEIl8>lFa-Z{EB)cYa$NY*`@$9I$6GQXH+U;8mdF-@j>=(I0*^cIm@~bNkwa zjZKvpW1Iw2KNOl-BagCrrkMe86@9r(cs}u(iQDU{0IUesyt+E6dqEwoap%q*+w-EQ zrzavJf{TmGpRxuKx4is1IKc>a`|y>+1+_C}$s9E?-@~1WTJI=&3BSV~Ybhy=jBXES zXVbC~4h{}g`ZaKd_V$2TMTLdXC3Q;cr1~6{Sy@@gmJ#O#WCa+}!a_nXk-K-xko#yG zlauZ3w%=b}0x8=%8}Wn-J!_cJU~Kj9E_^KqCfYy5%F0To)@ygJJ>fCiAh^BSnwpy0 zS|OT9WDS&3A2o99>;3y9BO^jWLe|#S`W!>8tqWjaL7E)$7sW~$(my+)BT_r73~8M$ z)hQe)vveH&9NKBIGM4HffB$}SW6;Ie*jQ?6YNGifjX%3?+;qi`T#K)TmPc*xC^BD0 zZH_tC3yFwC(Tcc3HHWDa@lXL8thF8+6A{z`Z(?IHP%yAu{TZ#ZkM;Dr)5S#Y+`0J7 zm+--P0YUxml9w-V_Py;x91^v&y{F(6FJ9#+)T`tG5exEeZ0svs3%UZ7v`N`WWMpK? zy}=T2(a2hpD_4LQE?l?}6chw4gx@D7ChF?ykO%05T^Er(8=m|m$Fjm_ERHb3yMjVp z9Y@vzoLLYKtWaa+E#%T#O%Nq1?j0Ze{r&ql_`R8#84!aY3`a+Gp;E&a!gtSf_4Jya zN>GG7F)@+K?d$C5cqQ}BuQ*5ZkF!ul_f>+R&f=*pPd7I=oij)H7i@*PdMw~)O6RQG;JOR<1X)Ske)pg&|tkn!`PR4)B~z$csNh!Z&dffWjt)=*oQf4W8(YwJWT1a zLz8z3*q}+#iuh!2|v$n8k0sYm{G4)vj8rKm519Gp}!q)a^ z{yLcU$|vm_(A$`!{>r2a{#M_50OS?pb{Tq|z&_r*f9G$VzdfdxVyG>4z zrD_Ek&81`p@_Y^{IY}e=L!4}Et4oIUAetf69ls9YqCkmcsp=RSI-m?Er=*sP=~)n+ z&HbiwkLYx3tEl!gWpYp2kiI7e@fH)bKUQvhAz8dY^#3#)_diX@*LahrV35IZT_!SG z8k)hv$5^w@HA&FTU~SGUOZjXE3k|;Ru@@2$5j9UcZ7RKk{BHgJ9qNXXynp`!amWkx z#)nL5XQwB{@IH#&8(*G-r$?5OG&)6`a+Krt^hqsG&e4dt6V|mJfsWr8E}aFGKdit* zq4*sq3bhJ?q^A#eR{%vVyVE1q$nda133o53B=J1iTOEO#MY&U5DYNKoJV`0D?8Zbv zjKbR&R#t57?ZxazKSQXZzCrqz6NH3>V4)nwzg(fD6#VZ-!=r53>t_+3v~nktmpn!N zHm4f2w6sdrILSgO*mS;Gl%1TM+~wgxp}I39GN7q-zDHnpOR~W(yuGas9vFpENf+Jv z``4^&h&a0P&m?lci?Rn^SLK$FE$CvaMJBy!u2@`B%)43l z(&yM;9w-2in{ADPSOSZYz+nIqMyK57il{0_f=UX1=fs2`xOB`w1}MzT7C+zK)~m2P zSS{=B%8-akldh~l_CiQ7@;mqwtAaw|ERX-@c0pZy+kxd&d$c> z@L(Y$fn6_n=4+h-SeF+KzdCNSvYPTF@$>V;xTet3)05DOqEJz-wpSeNkg_`dRREa| zVt@SUr3_`UM@0%u@aT9uV`T|&aBNUI6=!grCW zgTD(UmAEKld;7JO6>3UK%JY2`MBJA90|HQ-oSfR)+B%Xf6;4i@Q^nqgsKK}I_}Z!h)bUM3@RUmJa5V?#wv z9VVv4NSe&B>z`Y5c6x*?E1C)8d?ho}m#bpUONFd}e8lp$rbe`rxdJRXvfT{{eI01h zD|fWGD8rx5wxkKU;H-m6O3Vl-Xt5o@K_vpk)B7I>Hcfv}$vCwrSf8x#o^yuU=ouIk zC8^~03DGEPX;G-1dC1DhdWmwnU${u|Ehd1o{@58gsN+GT&x5N0i$a-?COuk_4BVKYB_{{{VguL@nh?x4U6g?F zw*b)bR#z&@%b##jesy2dt@rcQ)Qkf$Wn*Il3NKXV3-kppy-z^(>!AT8sz3zY(f+8I z!oTLmjMm79I7W6)fe_O@IRc#n4f*Q5@1UxxYB`B7Ba#UC5G8Sn*9Vjs8WvWNpFgwZ zSwtZYfRM;-W(<0sO;~so)Cqvd#t$u-D3CV^cfI%Q1k3y;YMwze^sAk7LPOgCnj!b* z!L6*X(_OoUAEM`mkB1aw7Ed;Us@$rF5dsv#U~zHr@-1cKCx+V8H0^8SUn@b%ICKK0 zHz1~$o0XN7hlebZMe>I^4{^v{0fEVS|1*%{hkI*dBbC@a#5g2$KG1`QhhG1A56JJ@^ESQ&Lh=rNj7h`mpmNCMGr+Q}l}N!t%kAE}f|7FB?BeNy#Tqo=8ar*4B!x zHeKVj`W1GSbIQ=jX!7%C-o!emX-q{sXcWXBDA%3M&480_z@ldc_N2D9E6|G?`>PKh zJ}lC0wkYdKULB9fQAn_`v~&@q0Y?`o`OTc?^5x4$+QS0_ySW*D$^7=oMMdmE(%=IM zw2SG$JbdM)>`|9|>N_Sy@`V~?)KyNy-}UE@@J{#!h*1tz8rA!OSOz&oh?D(5g?f#6 z(i`&E+Iq=*qc)eXxl9vC0IICRrd1H-YY-CXyMcrAdc~GaE=Mg?<_*Xd(*i0SU=#Z& zJlPzzaz>IHq+bxDDtcaa>@Q#jF4ko}GW!3ax}X%>{7riRAiSp2#Ih|!v7 ze^DqFCML|DPN|K zg@qy>>%0O2E`q5*ma%Q-zA1x3#)keNN$vRcCg)w%AsSBi>(4O$?0S=1#Z|hi8yNVm z4wvri>?|)YBXarBD^$kR(z4Z}Z2b4{VY`aj+S;P?0wSxtoG+}ox3Z1)dHWpyxhL&E zFB+PfP=E5PSG9rEw6)b)$iYs4n1qgoT1`z!X7}W2>QMfno`?n~x2+YEt zU2fgo!_(7KVq)U;^>wI|!z;vf`BVS%@pE@~cXKP3WQcAv#|+E_+Wdj1WPPIZu*uF8tkV z#fwaUszUxJDl&&PfBN+4of;Zm1quq4fk5R+3cr%wx5PzLZIXuqRXGo;^8IOAum&qT zCnrc~#+W>isadL!hQLw@?N4};)X*=b2_?2YMOi+9hh(ErU?O9wbFS7$Yp{|N*o9^N zk_4(6?T6YH4Jv-awHKv}YMM4Cyw=GJ*)i?JOhtN16n~G2ENdgMQ7K0aK8E;8D`sY9 z@b(lfHN@`ZuF6iFF>>!!S#=eb9_P}??5h<|Qx2)S{LEKI`$d2K-A63s z(pjYHK6&%d${e)@URNyDLOwnNWRCMV+Xi!hX2Qjj;aI_J^0|CY~|qQ4kMtZ4jfPu3hlq};$)0l zYUpsqX5RKBcG__Dj4%yD3kMbO>_TEo9dRekYPN-{=jsi2JY_5t>aE$o7)b^ciYqh( zzmW0+TjI{Wrwtl7E~w|)@s->@F=*wp2%Xgu30d!>BPR+C6cTGi~b#omdtH?jAy>HTZdv- z-=B)%unVAEb$uKK{}B007viut`~Q9PsuBx&cV9}oqbE^O;6mspj7HcXv_OD} zMOlVNvNd;q{UH4RxmWOift2(7CZ-jB8y&p~_E))Z4-}SPlVQ0o=>FrS+>EYtu_I8B zI^t2S0O?2FKS5_i$HiSh{R6EBmYx`e91ERwFNC+fe_#Mir&6jQvH|2p3br3VepES4 zOFw(|3^1FTQ>vh3oqe>#q$$N#&}F^@$YgeA1{+h##wOnZ1Ja0|{_JFb5-|c(4KE@h zBF?M_1SWl6tqFXm_wwd#2YY$cEH-akUyBHD_WIg^4WI#=IuzId?nwU3*?BwqX z`;_A1Vy(a@?eXmTRljr&_hOLJQ5_hgwMa| z_BnthIuUm}=r=$T(9<^M!lI%+i@&lI5;$(g$bo-vjiQf=jBJ^98mn}aINz+n%E3Y0 zb93s=O$8mcLEtNJ=3uo`It{i1r-&}+qaPwms_58{71j5U3PbO zovVF-$B*_mEK7C3*5VS=2zu>UDJv_htM`3SNgsZUo&ci)T3L|B zp);8eg$j}`HEn(^M=Gl0u=%=j{?{C4MyeU_!zpb)_Z^Z?_W?U@=Rp@$6F5o z1b0^vJ-9Md+-LO}>Xa(sPj|=B!J*D;*9KULIHb(HjcnW-Y&I|vP~FBvEyPfbMJE+n z!v@|4{rKybDsf0G=<=l{aPnA~m_N+7CC-lTLYRY={k(4(jO4GO9Mc;ZVFO5t(Q;eR zcThhybbn*xOrMH`l8TCi@1d)k+b(!a@x#UJDDgwNEY-L1@!$-GzJE6d&K0F|oUHQ& zGe<;31j92hFtE^-CIYPsq4#@*mI#y-bp9jvkJ3~c9rQUOkQG)}_P>h`G$>A=E z#4&iq-1qN+iYUTz+#--oDQlkHMKLfj$#5k6JvfFQNK%|%SP+01g{Xu6|8KVoQ%GKF ze!CxCU3)t_uCA`4{-?)rceIU7a@3aQ=PQuK)+ziCb9#|y;A)LN+Wk^r?#rHLq2) z2CJCoCPSKXZr>7kT*xJ44=63I!S(U4rQ4If`{SUr053CR2Wvwh&CCV1H9roEj1>3UVWBwA{QOyi zBjGC;c@dFHuQ7TtuN??>T47hbkR}L^nT8j*cP+a>gV*QgTAG^9bR^w1;ePPoLA5?H zDzk6Nj^DfY{X@*a0OedPlpGTou$QPO*XoifPtqnSB?r+R|K)ykcsL=1tf#iyhKaAQ z*s49KNhKvEF80{AO;6F3&R~;RdpkS$HT<$AxCms83JWXib0K@|@{>!i)-M2WI0?qY z#OQNWf(7L2>+R(c6Ek2S{j;#(4}%G#b_zU5C*c>)Hw<=8gY{%KO2V+t=NZUpfqo++ zBYG;TpXNMfW@hKEzXvjEW_Gp|6L=3?EO(%!aoGr%KN06Ycopp(9fcJYd*4GZ3(~B+ zS%N);%f(mG#!@rhqSekM`IN zzL29z0NBcPeOCsH5)&!&;wV8!L%!&j+YEp!M%J%TQ1FA)MmDL2+yiVTC&)pgAF{@o z&b664TUl9|nwmmDDJpircQW3%;k~<@qrs}As3;pwiGgC_;6T>%dU*+_DI+^C@wMwc zek=wY28qoad*$j?TU|i^HyIfcW-a01Id0v$H8wW(Kt_hm;LFa>xI3Prbpv&2$S!xt zy?GN8@4eL?JC4s6$VV;(E=Gb?Dbr!=q~wJ72lHWCTJ`CZ8Vk9zU@D-_pFie>;rbjQ zO^FbMve~s+&cg**WA81yQi1=11lAx6XoFX`6F~SUqrL|8C0d(};yEal(1g(_;IK*75RCw0 zC2*CVo}O}Yau4$50dIW{whwn##wH#gcUAeHL9)@`wFs{x;wIhn^f~I!kYqTQaIeyd r`IQ3#h22Td^_zHk#%#+>2ie+bgCuYP(F1?Ay=WtorC#?Su;g~+_P diff --git a/doc/svnbook/source/images/ch02dia1.png b/doc/svnbook/source/images/ch02dia1.png deleted file mode 100644 index 019be3107a37daa53ab0715e5a57f23ec20bfc69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 2544 zcwPbU2@m#(P)gwp| z=ruJp=H}+)U3P#KgkF!VeD*z`(%1zP`M?yt=x&xVX5swzjmiw6L(SuCA`E ztgN7*pq7@Fl$4Z^kdTUsiin7afPjE{dU|khaBOUBWMpJuU|?KaTv}RMR#sL}P*6@z zPXGV^OiWDu{ryTxO8fi!`T6-qMn?Dd_e4ZQ_4W1h^YcJJK=JYM@9*zCJUs2~?d$97 zI5;@z>FMX^=jG+)3=F-!y}P@+xw*Nwx3{&m zwK3kvXaE2J0b)x>L;#2d9Y_EG010qNS#tmY3labT3lag+-G2N4000McNliru)B_6< zAqK6&aM=I=2hmAHK~#90?VO93)V3AI<%U;*c0<$B5b_|v(l^i&k}V}nW0)Werg3gJ zrG*s&N*7ZluwYP2CPrz1zdMpWJARJmj>fw?J;&dfUE4GM?4Pg3vOK;Lfw>deYJjSy zM(Q!<@wyM<{_He~rbeQn6VbX4JZWAnXnG`OUcB!DS6t~g+&%|Edmx1*+eES`Mczv30dM3zDk6u%xoBC&3y?vZ{nNL@P+DdOH2)^Oml= z?I9f=TzviE-)6)yY7=Sj;>X*6wlE`5%SeO4#hGX|<{q!t3z9@6jk z4E3XrKAkC0?IEd5UyA)R1gbrxoc?+5&YSju+7P7oek=ZUaR0L1rZ)!Z@E;yOxW{d) z%?&~N_n8llADu6x#aGWeBX0z%kTB|yFzS#n>X0z%kTB|yFzS#n>X0y+MGZYB!#CD`y(LKRu5KegSWUF+lXUvYuGMuN+5)5- zD=W9i-jzg`K2E0}Us@UI=bMfM3k$~xAqN+XcBo{spmr?ewCP9yR3oJiDd_N-Q*#Z9 z)GSCoidsbIuckXn&dPSQr{iUjF5tc zoDZyKL6X7x+z4qDw;5!QB>GuMMo7>Lnv!Fzka|H)f=jJ@H*;l3z$tbEp*~{$fOleYV}wONY-_4 zhh)2DYh#CmG0r=Zb;hW$tv%|Dv$ZNWM01M7b%E(Jl_rQ&mYpoMj+U^Ax@DtSDj+Ea zCec4MYsQ*z3Z#fe1&9E9NM&O`OYj{c`2?I{Ga#5EBbkRl3pXX9tR5#kiF{iwK?(yPjGKF)NZ*^Oh+@B_A$J0^x}l+c4_}L~8x0MUVc|A8MRI_6;8GC! zi>|Px2IdHKnX%*qVM>2rL+shQZq)myRL^+1&PEB6KJ$qK)B#;;%uhN^p`^E^l0H@< z_56M z?Jp;)rof5F<* zXWwW*!j8G#Fg?`{Y2?A(=p}8!Jfb9bG5( z2reUiks8097^pH*YTWbf?z_viNT**7wJ2^h2dZRzJTl4~&4DT*<&0@YUl}P2*O7Oc zJGzcH-o4pqEFopa`*#nR2#-ga)X{aU@zJqE2b&^17U|JftG9Ka#v?s@{NUd0YZge) zj{ow=+YQFCNT;4Wynp8(4M=AOPmWn3eRo=Zb;kzjPp41*;+-a>bLxa0(z*Ygv_m>~ z=06=$htwf;NF7p#)FE|99n$|P(&DXJeKZkitZ@?3({aWj62Lxw|M7>f&Q&x431Ioa zk>8!JF-}0z#+&ay8oaC;3rOGmv8v}Nq#ENA2I+%3V;)J?>G))%N43T$2&7u$i4oF~ zWA!>Z3F+QA<3yw}MlnP>@b)7axlB`2y-bb8YL#psM$!sjnffl!TkI?dK>XHOOReN6l%f9 z5Zyj<#%#>X%t*lZVK@k`h(l(2E5?Em#9*qfdDviv)6E&F8O#=MgfNVG*+^2n1j+L` zku-vcqN0=>XR_s-5fi1%=tL0q%f>tsi&!!SE}Ir9XPgd+#w?~~BLOcQA^A#iJd$Ic z?xjeX5rdQ&X{eN_A}K-@PYW*O!_kCII@3h)I7qfvFk;4r&Ww&3N49L#l|Vn%$7zr_ zBhhdL4-=-Ph|pxqIb#nq$neOh_Y=#qao#g?=0hD4M&AR*q(#ZW9iid?0000fR;* diff --git a/doc/svnbook/source/images/ch02dia2.png b/doc/svnbook/source/images/ch02dia2.png deleted file mode 100644 index e0ac203f20b12a12dd5756499110f99c45d9a73a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 11754 zcwSwa1yCGM(CA69Ai>=(Sa5ec5;Q>2;2aVNK`sP$3+@tvd+;Df@H^ZgXb2&PyI*h) zIXHOa|9$nU-rK6F-R|A#?wy(Lt@+i)=xC`v#izr^z`%H__DV?)1LG0+q3Jxqe9&mI z*RnmFu^i;aQtSXAe=zVd^jTNrNza? zU%!4WC@9Fu$;rsbNJ~rm^5x6t&!3Z$lH%gxVq#*VqN0L>gZ=&eeSLjhU0t1>ot>PV zz+kYQot>?%t&NS1xw*NSnVE@+iII_!rl#iI-QDf&t(uw|3Wd75x>8nFzPPwhR8%}a zKY#i1<>~3EyuAGJ@v)qo+~MJ&jEv0Rzkj8qr1tmsB_t$vcX!3a#J0D$H#awhgoM`D z*98OwR##W~`1qEWmlqco=jZ2VXJ^^j+5i0c^ZWPjU%!3<0DzxAe=;&MPE1UUjg8UL z(vFOb3=a-x3;!Iq0r{$=Elax`uh6s-@jK^S65V2 zl$Dj0l#~<|6%`g1=I7_<=H_N+XJ=++rl+T;rlzK(q$DRNCnhGw$H&LU#zsd+hlYlJ z`t&IvAi&Sh&%?vR#l_{_yLVPrRu&c(AP~sZ)YRD6*wD~WM@L6XOY8pr{`KqEXf#?~ zUH#_f=KA_tMMdTE@={4j35i6Wot?dS@#5s<1PBBk9UaNa${rjXNJ~p25C}<0$-TWj zadGjTogGn8(XFj5VPWBojSWFT!L_wDet!Oym6fHXC2nr+g@px9PR_ZxIXE0XGc&`& z!ZJNQ{p{JZsi`R@CZ@^BNd^Xn@$vD|(a|42ehdu_4GawQ_4SdEko5HQ5D^h|b#)OE z5_WWSw6(RtV6c{!mZqkrhK2@7yY06R>*kTQhN==qG&bX_2LaFJm5DnB1_9Z>_UPAA z(Cvc~*F#NH8TU6P0V%T-eTn%d2F5cCHKmvOKDh^hNd=38o`6Q#FCFL9Z)alHOYOHp;%4=fZxpOUfZs4#dp}6eSfD0)h*|X{ryxpJ@B)qd&qB*(VwADku0#s z*oe)ii!q)lcd$;0S-@4t>;f%A`nC~@fjYCNUBXhf{W_#aHX*UDVR>QcVCrKMq;}fE zyQPIdz765gp`p$H)-yt@Z@&y`59;@;kN%?dYQHui=(y?d)UBoMwg2e(ZZ!X8>!|tF zoJ^6boSz#W;BwchDRlRcw4;%ipN`r!m3O^_Tnp(nh#CSNefZUPsAZ6+g_?=8vo2RK4GnzLSO;wSAzjMH%O2q; z^0Fq3BZd8)X(Lgra4^7V|1X(Byh$AK1`q0u0NYrJp(OkC#GVGWo$u5SES^VYIg`d7AH$7qP) zvYqCo5`l`1Sl&zezjuOF^Ih5-@(Xb|EdIz<-}zgT^fXkx^#@N9_HO`mIcpoK5GCv= zxH@U|C|V5f_rU4uoLzD+;jLQC7L4e2x8c*9QB3kxQUX?<-M-R%4f8=s$@pmD(T2Qk zYU(!{Ht9bOBsC}vCEUwL=4o^?5;wh`GkrEknaWtzja^h5 z??6+Egd=xcr$t$DuA_|BuXXh4KVpd}RPbNs4oA2f&G_2nOILI12S$*I|leV|MPfA z{~6=s85|B`39(NjUYVRG!#0#C@cFR|9lV#?cua5=rYI)6V#`09V26z}%XSyOGv?is zsZfr&uL5!2;5zntQMx54i62HX5hc!+Lxlvj8~bPmSgiA=8Bd6ZtJ;b`-cQ_e!oXC*vW#=1is>T?Eco zbusvyekQCB6yZI6Zc_Q()V~D#A%aN49Nv;;ijlA#%K4%4XvX!k_wJ$MVGz2Mb@kX0 z`_=0g@@sujMzLqSAN`r>fjzkq{7@B3eFYcY@Iyzww#bhPR?|=74!Y6(9Haehm5jj3vPq&O}rv5n0iuksKO%EE(u}3$l`Da zM^2b&85h4wjf^q<=TbUV)xC`+iyu1FGkL?xU9o;qb*H3{ly%c3w{WW`S=V0%#Ssh< zNe`t_q&+Hsc3Mo%WRABp)mF?#Mk0T#Kt1mrfT5GWTJ-u}8u%`RG`-n?+@nm4@=f>X z?zqAz?Q4zCfw!%rw&-LmpRCK=!pU;vr?MX2!!6rq0k6<1J4&CO486*pdXo-{PGW(+ z`0ms;J3g&^c^|PR9cKz^At2aLtoJe>jcR<-3!%n()26|v+5xnb(VgD`3s4P4y_*4v z0_tC(5!g<>L&h}{D$dyTpp2xc1w2oXou%_wQZ=#eP?P+bMul|dN|chRQtZT+i<>f? z=~#{zCJCB{YEX#z;!1abt(TW8$L?`CLJ6}xv^K1D(fv;AY@{-8{qMkXf&5x}JhadVtZH<*e z51*_lZac1ueN=*w-l}Y-4F4juL?}g)9w&n zfqFI78z~M&5(YozR#`VM`VJhl~`H={3jcO<^@SrGi)~>~LMjXaCw$b!??8l4^dj zh~b<)AFpGEgw7-2$KMS{5=91UCKtc6eeS?mLj8WC$dEYF523Zs)}F|)nMM9&B(9?) z^H3em-Qlr}cr1u7vnIm4Q2ijcGEx_KN-J%%ok{o z)DE@Hos}&pnIkpv(k$FaRk1P+ltG5f=;`uFz>Tf;o3`BjeF4=-Dm;>X1 zO3TR4!RK<=B7yY*uO7iAaFT8fFKuZfcvK#Q#Jkt>m%i6UCGD6zn|@Ze8>2}R=I1oO zcCI5i*Zl;2_6VHsU#Oqh44cNi8ADnf50`IcHJ=NiNCrT}iNMPrjNi)mzgZ?qpzd?g%N6@v*tr(4%|nU~{exxnK5|_iwnV`~WFUnBpPFo$NZ0 zN5&FLjk}=Lf*dw37C}|nJ5}4L(?9;WEhR2X@x;Ezr#EC!!w5%67qUlL4K%GXuObDK zkWkTnKC;o81uS5ID9ATsv;|MjhhU5CpYrS*lTd=I%%ggzuBnDK9>0$zzX$8`*cmafe3hev;P!e-0 zCIh%_sqdI_>$)v)KH`GZ^49L*KHLZdn!IwYaV9=@|Iwd*dHs-ZoI_;f-s3!v!XlGIasUTrjRxB+E#U|R30{|;WCyopjoufEV0PvmPs zIH9Qy*yvT2?@S}i1;P>*Uq5Is;Vs=O2Q}<;nb>s2wM((c0=DLbs7>;t$+M@f!TGhq zy7j~+$*}V6KkIDdWQni@ z1+a@e+_)(qKw+=A_NK#= zcoq~7=ql)b8#lBYir85Zh^Q8Of7R<1AH)+Ab}@0r45wbM?DlK> zvyK6;YQfe*w_L3(+#|g3TTEqCa3KZl<}v8z>trJv(B1FjA@bU?6Lqtp-PC-4Py7i@ z0UPPfgCDoo%vbU>cUA?HFG3&cQUjv8%y&4M1sup$C|%w`7o$+F7CEb><{jaTkQwDve#P1y{1tT*lnZfm=gY` ziU}}Nu*vN?(IcAm&J@#H=+$Y?$JQG1KoQ;A(C_|gc|Jfda>&?h51Muatj`-pC9M?= zVQW1ud|kY_FZug#p$ILrwjp;yX72Up9V?GFlMzF`3Uu42gsIXdv|^l}X(E-Z5TKn=g_r|D>%g!4m=VthM) z;dGjV>|C7_rWOW}azZMWByF7>+t;z^rcu~XDK2#lmU=Z{(`xEgtmc^cbD4wsW4+YS zkp5E=<;zo=rO@orL^Hjom~80_$PU@b9V6N-IwjMAs%(EhKBDRDpi4(1sTzO3_>W^3 zK%K|E+~uCylV`B;=J@DJYLUxjQ-*wn@{mEH*KxcD@Bh#g!}-+778{{lOEc}nzL#Iw zfH!BoRtI`LdSn1pP8O9S7f&V86*-ry_IC%KN5W_X{37LQ_jAWsk{ge@N&3z;D?)>ByvD|IAJDLIlZuFsvxM6Gg&D?$Zx5L zjd>KA(4(;;kfi#hfcS^29F6R)ymM8&Q3k8MAoOG>SWr$yoe@%3VOfEnV$h9D)zNqp z@MO?Y8acp&ui5tL+4rIQ?1mw_vjESyl<>z8o}%b2`1(8O-QClWuB&|M=?Ri^r13hd zJUT3XL~L-kRQa3G0WX}Gz*PV}1E4m2-#MAFjmmS4+PrB?;;v65e7W%+Z3!`ue~lg3 zxk2Um`oWYv+u@RPM!0F^IrA5{ptI(iOuFg!17w#$=V>!WU%26!J5^?>Z112<8)Ae_ zsco?9J5O480Z_85i$`c=7t0na@EQ#M)@}FT-az@_hs1#%L;}4~B{e#hG&KsnJL+gD zI6SQMAsc;yIyuXs?mWHfX8>0Ze0wmO>K3?{7bcNE_K`-X0I_m6xVGR;w}mPB!>*+2k4C;uKiJx^eMI{-35ULWqq zWJ~lSI}@cdT+MCrlS)10YYUvC5ml{3;R1{nD^;t~T~v0x$O~kZ#<*L@SAiwo9qG7A zq1K;)$1j$O5@UqmsFa|$N85ulFDc=Ty-~SR4IUjPkQQXmEX5htxUdR!tL5y2!KXiO zj&IkNho4fon~PnRST6q=niuayW>wLnmgYf5bDrwnTc9vr^r@05C4Arx6?%7Yptdpl z1TIkv%&=!EBh_E4oo?mX@l#uY=G)u9zhuTFY!Zg}l7lQ?#E|EeHziO4*=pL{AkIb5 zZy=-dTENc&e=UGSqNYn=g|joLKs0e06+o$6>S;8N^bK^tq#xpXcXtq#NRWDfVamyTX!zd!P}Z`-_KU0wPujg|k>ekbnZGdf62>o(cBR$knttLUeb~ z2{O}AixMFe!&yK={8YKCdGO)hCJa(XRXzjK_7|9b4zZ&xZuyLOsN&;P2DlBbn&2)> z8DEHGn7=z%YN&sh{F|P#FkW6xJwi>U4hq896Oj6m7 zz2gP~8x|oVK7aqfiR7;giAJC}1WUnZ*9YzWb3?li`4O3MxqLOZ+SlIh7ucDJIG{e$ z8ATd~^k?l{Cz}1PV}|mRv^;D+oA7;E`9Dp zq%`QLT@PP54jin*f0CB9eZ5b`{#2lVhdSfnGu0Kz;!&!^O$R?dqxzySXO`>z4~oKE zmwbess^snC5sr!gv3e&~+*6)TeZx?f+aCV6rM=*TI817h0ZX>hw_wvT!Q=ELbMb^w z;EI~dfn>2IB?vxGUG4x;bUJ^#q7Nas7@&1KaL8Y1kzFTAFou#gs6T-uJmJNHi5u@~ zqXTN*-6v;)^_T6aSlO%{(~@8+zM%*%{jI3)bgS+7C*V#iXEU8fix%SU>t7YR*9SrUj1 z96U{u-6zwIgEceieedggCZlo$*%WaQ$BWis(qvG7Q_~Ixqe)G|4b(PvYmLO;l!p_q zWv?Yb%a-HYLIIdx2We$wHe1Ohr%gSSTB@BWMu=gCwe5W>??RxC4p#8;FNp%%bo@3p z5Vb-dR#Iv-)AH)ug$iun4P%)+&q)Ca(V|fB*V|}t(@5LwZ2WL&@MvjGURhCa-VR;+ zML$HbCNXRL5phez+YpiUc`m`kv_;VsqH&2t#kTk4ZH83=s?$X-N>tH28IdT=f~s=z znlTsNji}BfdDnM8VDMQoq+hVt z)l2cvQxN~Ow%Q2Y;$lo100n1&4_AS6%V4}$!$^h(ec_#TeCLJhz_MCiSxcZbEJ6Mc zekRUeLY(OlN5gAj2e8~p(rT+rA$HzOvz49Q*~WV6I5Lk4A@_I}K>Rk+UAt`*+?F#t za|r4F^r2kC$Z&5Tf1p5yXX(pp<6_kTL%yFfns7shfT@z`w0EQ&x!+afnfBzfcg&QV z-adgXBKW=AMjO4AlKd!wz5GWxa=sf1+S3+mXb(s^6h&LqN0VzwD#KM#9NYTdrVj9F zZ_Oo#u$n+1&u~N1fJIo zHyRQ^SpOrH`eu`Ak1KTt#e?6Lqe)p>&-JRiR{d;uzRz%7Gp_9 zj86|OCo+}Gqu1zp;FIh#Ve(=KA^{fU##qYdpUBbW>eg#42@m=>5i*3pa!8sfE&V zbfK{sEDD7aDt^%#Y+$T^F{UmOOZqG5^n&tqjiTdn1o%qko7yULAqhUV%={8W1og8{SQBxTvq(AFL9$ z)j=h#@VoM4L@d!0yIlXqBQ#F&qchqC>(mA4J_PgmW|;ANa$E{4h+Vk8h?9cJ5W=6) z^4%}aJ!2|r44e^9p5#FSs~^5nbd^0_iu~!JcF-d4Mgs~hm2ZYxV(sZXyTc?Q%~4`NIR4MedBmLK4D%g<7gyG}FHi*Rm_DdTA`URIZz z9X<`tq*=~3&81PGBxd5*rwxpADr6R}Xg#{J0Oa3)3jO?8ig(-eH?Et5i-zoHTv6uS zPg6JjgY8Utzqtl*^;jShQ!(td-r>KycX;ES(K`3BvtS)0iLBeuqqWuhlSkH!=e>`P z@k=wG-_=FqahZh>nB@LE`AfnhAS`t}q&mHYwU5tb96sz|tn-o{%+K)5&}?%o0;1)z zG@6@PEp(S?fvvHcGKFRn>CJ>{GT60=7OZJq9Oy00o3(^)`Vx> z(@$`Tn&rhW8Ku9yi6#C(wt--ra@2%GWq;C#sx_~&8J^lVWFs)>WnC~r2(*=>R*Pf3 z@d%B-N09YY!(K5{(Fv3D;eOxt+iiM5{yTD^`BhJR=9^T!k*gC;SK9aCxrc;bkz@${ zo&d>Is%J9!2LuI_P);4iEUWXf5DUgw+yuFkcJI~5FK+`yKUjVh5gEhW29rGh*dE25 zgh<`S%(DsTh%<-uBX!7`XT+;#b0aHGnfcY-HHYwz-ws8+^q7F+R)6YB09p5)ZNU1U zz=pDj-9CKBT7E=~pVTk_J8(ZYVhF%3dqL`|)hERF^DzvU*`@76tQ5@XP;sOalK{3C zVmo(CSbSqOJ4(WBHr!4d>h_Xj^`~gK0!L-UTPwfC{ZFp_dEv->b zX66o|S`NVQ`#ywB?=}bAMl<@6(_>l3yV-zB8~Qk^Je`bioC^lj-S=?`M)J*GcdTHg z#7^QQws#?sG=8+JEYCPDUM#w3oZ~9J%w(an8^gPcYQ^!;QZj{N!-P1Zxedzxn(4VP z{Ip}^_i+8L%^a^&5zol9EBEPjUw1zCNrVq}k4t;&rYh`xrAqr<9Fr%_5YHEA(pvd>0Yx5RvOhS zxyc18^%>EuD|Rrua3uT4kklP~x?XkZg+YQ{J z!JE?OtVy~#$|2fv0;lNcEYL=F*+3K>fhh3OZtYi_#;~W-jqVHkRr`1aK3U0ggs7ppkD;a4JZ^w583cU6%k%nzqi zrb)2|vng77J;x>TK28xrE9^mynverL2AQQ|zYgft%Dn0eSzOzh`*1bW5Mc%$i!wb6 zXuyCSz8OCgy(MGNACgxRi875-ynPJ{J$yn7RLaEOISdEWsdz;q1g-O=Jkx-L7?gZb zj&@SoE}Borhh6@K_#Gj&pyKkLYJzSE$QG(Pf&JzMM2?$i0HQFpSP-EBC=QE#|3dC> zY(FskrAQK>j}^{D88zI5wM0sW3dmK79BurR!ufc_DFGHq6<)|D`gvW)-SV&V0?hfAi)`lBS}pOlDwccghCl`gxTUGa-eK?dKg5r8u=lNOjhgv1Ixr$y$vWMrK6E zYf^Yv@noQ0(CsDOyN(R5bw8`ytu)mw1i$UL0y8|UN5j&`Y*}UaVU`pr+#Yt}ryUD! znr5ZMj{-}xn=6ex*+F3r!RxwNZtrRaxHe479I8y?-VBOmUhK4zX`1~p&3z03bdqkA zcA;#f{===0;H*o4JDAe6;f^Ai+{X(5;LCD_hEhHv{IJKei$&L43XP~V=zZsKuR-?O zY{oQqM4NW@n!_mQnR0wD&{Fth<)+1GN5aVf>{ET?ia9EvEE(ig=+{0i9h! z^6+2qbwb^7q^f{LYQLw*9ja$k7&=iz8;q_Ye&?!5f5PkrH58vT%Hm7{d!iBVivC}6 zs|O;+@lOqsoXavLgFlU*x^$60a5u^iyjYjiWrA~WEB^67o2Vnh)Qac;MV}BMkfV@0 zfATG}Lq-05iI%;dCZ!^}w)6-rcwSET=|!3y$H-_i_=nR*lo15h&RMVgu;CI#KJ30!HKXwKKt-%#AVyuLV(8#NM+skva@Iqy+M8*=Mv-kVZA2LX1$ zc{y4AhL^R(=it#<$>(HSE;T{%oizfMVS_?x53hr5a~{&!UhP~?Hsit<93Q0I<;FJ^ zOcqnKjl!1%qt&@}6No=gidA%!m9ze7T!``j_Cpw@TTC!82%i1>7vL4Q>&wAie>3t!;m+M9GQ*mSqJBoxC+7>rcmVT2I z8}F-ju6Zx0@6QV|_LqTeW#?0H^s<0FcaLrkd|d}Ma)B>rVs0H5=TG2wEAHBMQ_H@< zO%#WX9Nq)Dv?z8+Gu<51^dC_!`UZ*@56MCCc-3?eM~zmr z&bx-75*+I#ty}NSx5H#)1=su=d~n(zZq%q4UWBf-izb^EcVWNrC;DoAWXcYbX!yr~ zDGz=uK7l)4yz89wB&A9Kx4r->Ez!u~d4dG=7G}o`@AsjG6t#tpI<8B+Cs}UVtLqg$ z=^S?b3mWl9@&Nu&*FILDM#M3Y>iu6!Fr-hgzuqoIE1EgLcQ7sd{agEs>nZ(sZqg7L z>_J-Qvd@HTfrLiFHIqB0ypKq6W(6~QIC07@6m#ak?!7f$!TVtFS&J@CcPmB7^O)8) zQZstzxuVaFXixl;a#_kZgS&wo-uI$Iwuz)sXtCFHLWq)eJ8|mbSSiN!**%hFu5d58 za=kT0d=T~14Ek)e$V2Z^la)0UIJcVwg*WvI{{TZ;1ud!T9TeajY^#B&cw)zI$2 zcB}cx)XvVlQxIA0#mK-Oh==$~8itEpUR6Bt^)^^dmYmZ!FYU30S^yt+oRfh~yhRJA z+UikRe}@@5g>6N=vpJ(*HA&XGhWjo#x0LNL5LtS39YF?;pF&Wv9916mQ# zfC7P0WcO7E>o;a6w_!3-Nt8&37H3Q-aK$xF`guKQg+}&vX~aq+OUN$~(X;wldz8@O zi(+D73dReu!GEMFToxYo#*#OIReUKb+Fnz>otNuSl@$L89YY{L0Hb1%rsJb-icUAu z>iGC5HPb8TkgE@Qxq+czX<$E38`{aFaXZZ+E=&dSs!g#T&bpB@;}HG)iRgTwG-sA>5|jD=4_-yZq-p%M4fap2X3sxId{Xv@b1zKA8IX zi!1+&mGvMJ`G>%KkpqXoPCR%4?Bc$n^zP1O)c=Y;}i}xZqu=fhCCo?yKmI z`6v)na1-?(zQuzaefWED6lXbkJ4JBBhF2*xITV{VNy(1q0J)U7xIF9!1tW}(YIdNI z?+8Wns4j^X`VCY&#QE<5pSgUy)F!G}^dF>*hb4~EaTV~WlMRC83k&8J=y&Nk^$SnVC7EU@8?i&42Izi|D- z-ge}y`rV*rN;?Q7j&`YI@hU|oTQYdT)$MK&B)bmke*iBf8XS1Djp=;9`}DYloKCv|aa!bN%e9Sq9$RGxk8s*RBIp-Tg)brhAz#bNRli6fzh>ShPyswc zJY9v)PYPZd*cqsU3*!m`oYb&Eff(U4YuVBXnOuEKr>-#6fZk4ewhR=Md5B9eE2Q!!Oo>e0fISE z<7bhpCiQUCn6Qd7D;&8Jk|+DWY!|sQnkx%889TNpqXbQJJ(P=n>!vVq3H_pJxGcx&1-+yJo!N>O~q2Q^-Slj|+ zOA!k`37}dnQiu3QklAs(vexzd1hV8!q5iXH$qGkU^7MyDLj))^Zs+6wOAwq@RH5-= z1YIC-)$iUAFJEr}`NfvZ+2G-G9{8%JsAO%cL(f%P3sC&V@32mWSJeL(1EhiK82tI}}_!Aqj>HMaF( zQHaBG6d~+Fbn?KA$u(MqSN-?C092giJIUs})z`_>#KJ$Fl0xu`_DNoqSN*@a0qzN> zSa1V<%JW*-AdUUlQuk&yWBsro%gFB_u3<6U+iI{%oq5=1Xou-T48^{@EDF9?KVsgK z4U9BYXh)rXLU31x6YrJMF+xZ~K{BK-$#Hp3nsnYQE*}pU^PeZvJ{ zYvJ=+m7 zB%mAmYTgiIUS-f(?4T?8;Ao`u>q9ToU*tqX!a=(?SLCWVj0S7N&xNNFrH0QGDGs+5 zP8mDXWimXuJw(%AZf&S@8Ug#6_H~$|dD5Prs{-m#t}|z}DhY{1RsqRIJ`$6nh2GzG zKj4pZTXH)Y$cBa@in;A(b^q45TU{quNoZ4Z%_20BYyWQZ{gFSktj+&;miQq@&a`Nm zea|&of7PWTcnmqg-U`!dlaVoRt&bI9TT072oKU9@hCp)ddndNFYCp87%r7m{{vDKR zi(xTLQOi@+r>R-@Zb>K9hTs-xCaXmAh1AKT!Xvo&GUcX zuj;E?cdELk=gc{Mx=(di_nF_s=x8ZpV~}IO!NFmxswn8e!NCLmmCtC1|0D-(_$&Wz zNcOUtvT$&XNtn-8$Z&87GCCR`6#vN^8yoBE>uYOktE;Q4s;Vk0E6dBvOG`_Oi;D{j z3-j~yb8~YuGc(iE(^FGZQ&Lirl9Cb<65`_GVq#*VqoV@?0zQBK?Cb06?d|R9>FMt7 z?&|95?CcBzfgBwj?d|PtZEbCAY^o2E<>lqCudiigWiKx;&(F^#B_&T!PsPQ>kB^TJ4-bWfh4=UO_xASq`T2Kt zc6fPtx3;#pxw$tsHaIys*VfinR#sS9Sz$2PpFe+?n3xt87NAh*?CdNJ4b9BV3>6jC z)YKFO1;ym#BpDgm`1ttP*x1O($k5Qx;NT!GE^dE+e{XMZcXxMZXJ>nRduwZJOG`^r zQ&U4jLtR~6O-;@B@87{-a79H$Sy@?8QBgrbK~7FiR#sM8TH3d7-;$G)6B85TDWq@;9rcc-ABaC38Wb#)~pBXejTNrNza?`T2QzdiuG!Ia*rU-@kuTQ&Ue*PyhP$Yhq&J=g*&`qoc#a!#{rfz{A5E z7#Qg5>%+pr>gnm}>gwv~=xA$egFqn7&CM6pcv1i65WKazvI5*!WGa<^59n?x#-4C+ znE3w{_}SIq=YK*}FI7!NR45|mJ9?C;GX`=vI9fPW1=$aNc_%?hg)1Z8G)Uv0v^CR3 z*hd|=|0GZfW|-xaGg*{zFqk=+sph9O%juT{DgTCw*&+hyO}pks!cvJ_Q({))26HDA zh_`3tuzp&j6HB;9YLqeD)Zg?By!M~Hgl0>g+XO+xPOTfVqPeNpy662l# z9|7(-PjR(3wX^KKogYE$w^S3LYZgtgnRvTdYjlyo*6=U*gc{510rKt`gcZ9bc&1Xx z(%&vUzq{}i<~1!R)EK4P0lorSvV_!%6fD#bj^;)8}#sJ!0b zfc;3Lqk59D)BZJC&wxIjy~b^*{Q&EgiTe0ZB$4F)hmZ@F(O%m849W1kvk8;%>w-Z? zJ0g#4keqYepYwrcPWyH$E`KJfR&2fa`7!U69r-ac{oaePfxnwvKM1&$NdytVl78P? zjQ!Fw@*uXKB`AZwF@G6E;?ndXIaM)F!W#Z=<%+O?xl{03bc?BhnxPB%MU<{KA(72uWTDFjA+)tS_@rx_vFY5YE9f?BXk*)|=E8hF@G7(6@ zdXuR%7mutAMrIW8^$uNr#DFFhuWI}-7VT;R^Kge>%azVXdOqUuo$&Fx^0GYZZR^qY}8%2rr%i5J6vfAF>9BNTEtb9O}7BT&*y@OOQo`t zgG01NML)xTwQ?q8()~)XAM~-gN7k!DUOu|fAnt$u+HZzCY9H#1X&Av+@{`35(IOF! zY(o(n^VO2U^iwyTy9#MOI^E@vF&vEES0l%R**yAGEDr|kU=JT*RhqX|;e)w`_+7S> z<)qLq%NmTibt!&3fgAnyJ&_tYkV0hi*JV#xM$zYss$G;H+-Vk{zWQSDErtyw!28x8 z|0EKU#ZGS;Kz<)F`Uin~y#G=CCi0DnKiM8#?}Fu>d4XTN8lA6(7GKDg;1}9oMO|Ix z&KZ=$rqfn_@*9GDC_WTI1h}JU(;krr07fjOWzBo?D>n&jUGll~zlU=Jb|Z)q`u7#* zk~(OEB7ZO)HWLj`e-UC00wZ6@buk&}RoDZpSBNBhoLDJTK0R=O=|@RoBYk^qP#d=~ zlLs5lHDnkNMlVDQ{07@rbPGP64uOV^EWQh&&7M`5eyOM06c_X8I1iT*QiKck8$zaW zP7--s`14g9ITZ5@K|-c~*G{&h8|z#Mfgl`bb^}v4(&obqOqDbOrHPraK<%My@;odg zGEg~)6-@|5_KUSLd~iQIHxgArJL$2A)Y$z$Z{RtYgypBa6Uqzmveu>Vt{E(UV5$Id zrj^THMb~jE=HjV^y-jGRyXV07zH@x!aGswFT1(!}Jc84SqENC3+~0)r!6%=P5HmxY z!?t(O!rBa6d%IX8!(`#SXV8^%7W%6-12o_r@iN#;8h>u!&6U70wT4}oBmL4H@cI?I z+mq*~ocmW=cHcZjB=PjfawYl>+tr>FpIny$Nu*WrRWfe^i_!dCr4x1I=WJ4^$9{U1 z;%^O9JqHy|5|)-U3Y4JGM44niQCco+Q`A>99BY0tkDxsTf^eA{Y7|ogtYFch*5I%3 zVFV~CxSRfC*0SR9=B!!3D}zRa8>WXq9vV(r=#{4HtsV(_9Ly+Ur( zK%FWHl~SqAr*UDd<*eYL^@*{*Hlw0evZ6(6kug2iM*MP}X_&b8f4fdxIjA z3RJ{(jF~7`%;&j}kik?9J(Q93CsTj+0&Kc0g3yQ9FFMxD9g>Bk&Cwp{b~s+30S)Ct zrtU4YLUy{j3QeA;NT_uQyJgl9?yix9v>m!v9G<~9bfj#`jgM=WDSweeQSHVfbF1x@ z8*t-03i#`*IQ5oUW=oIseyr=U#}>mzo#xBr;=0N?u`43{RE)PereKWx-$?pbszE>a+H>0_Tb%VvJ`{uQ0ai znqVHKv%o4%%NH*S=tA)T87$JOQYKY|=7@mo0pMSOy!b=q)AyF!lt~{!Gh+`3K;)_U zFK{VnlXDy5r%jeWFx<8@lHPS%iAEshO}f(C6>RBZ;>BPyH9IAyZnr@Px5`=KwiX2INNQKNtR#PN6|Thg?QJ z0v}Ghe*(Vy$D$&tiN=sMmx-!7k@Kp^IbXiJ5p2ob0lw38=A2=!1Tq1R`f0}H`DOrx zoz!|0*nOcW;D7!7=I|7A4Th{B;5gfWA@}d9yq_z!-Slw>1RSQ_WK86_ar_$zJadO6 zH|Aq&;iNDeZC@(Li*RIeakavf5v?CuHgZqSN38RB$ zImS%`@0U^wk+6C_^qi4g5h<~{-%k%i?RsmlDIXE7J?SccdEgZ+Z?JvYf7i*Ev4Wc5 z9Bz(>UFjFEBc2CH7=jY*FZgq=xIU+S_=r=S0n<5==vLGLX=Z6kQ(fEl=BxsqzCCRH z%61kRmJcJs6Dp9;41>uChoWKf3AqW1^ODG)zSSfu(<8Es1;%VaLN1lrZs=rf z!gb_M)B~g+3!^O@y`b;@^$9;s=gIG_{O$fYiGt=c7Lm5s1o-66;xRWDi1d+S|2<22 zYu{a|wDdEXZ4fvsT1TsvPj+7GLgimYE~p4l^^pmj$V&YY`u&4x5Q=PL5l~l^^Dta2 zuG)q);PL|gb@y)q@;vWwX#^~UEcUsqSc&FZ#DX<>O-o+ZTjPSISZMyfXOTv*ZS2^*ndxU5R3>HYBdZvOkz)I^!K0$87Ez}BD3@(P!Z z*z3t;7>%^)tcrPOye+77lo@Q!o2R&^scU&!4;-w*X)?YKUATLha4uf)K z{cc7MZmM}|)_Sv@p+yjkWSyt-*I(7HKDac}cPg!oW`L*h3yR9ZUX1o2F)~7fN9~^> zf`0%X0Z;q$ugxqTZ!77aKz)4-6w9`tB*n$L(k#R2{0=sn$o#WFbs-=RTCCGaIfb@# z5NGl22)TJrx|Z^H`3bB+HJU(f!s`_~M$N(DxcndYuAV?|xT@8IJJ*74uBx8*GmLr1 zrYmU)KyZ2NGmI!ZIp8)Mr0YfePvu(NBgPmTMK;Bvi$O8i#rFl4kUI-o6AO9mcKYCe zM~Kv^a#Cem1@_sx_zKh(y_3 zT{B|G0x{e@b%UGjA{z(7ITkoZ-~=>ipWI;TBzY zh@DF9XUu#gm{?ziIfe_Pw!->ER01cC7fs;x&<5*iM{4$n4|3;M_0feC*mkxOHk2(d z`g{ZA+7piG_TFY$4hSEelt1>X6y&+bJ^*rEo%vSqn}3)g@)o6YKH-FXgzfj5Oj~E8 z*_0s@EcfBN%fB$TXk9os7n!WytJ~laOAnVS9+2rFE=)}t=1wQqYkiA@GMTf6KGa>Xkl=a* z=L--M-h(a=@#y*be%5ov~!F6ajQ0_DH6S>A@`xex8Vz<5I2d0`3233 zWN0Gt^K|a$m4k8-CRA!R{eIl=TS%Amf!(?PGJ;vz?WIaL|482v@eF==gSYBdhSiGN zTF`|aada-Fsr()$SduT}6m{gS>qCEvkHZNZ7nc-$u?H`kStLMdqtOaVVwHo*mRY@n zLi@1Pu;AVMfxFm_j0hAW7(RXjLcWsE;HavwsWNkRGn!;$yB3TXq&Z32Qm#djeM!27 zI1FOxOStu*(Sc<8*Ao(&)R+Navwn|s061SNy1)3X05oF6rGS)3mOfS*2}3x=10Fz8 z;2p0T<*H3NQ;=;J9C-l&(WDUvm40|}In){P$=;MUdaW(n)=stl`^^x2QH#1{Cea_* zrceB6>L7TI5n8ZCpHCrn7&oZl+-PBiN3wp>GxaRPVhG_0id0-LQ_z}iqN6yT)2QcR5> zO9@C>7HB48`{SfenJH$0U4>0fbjcwzO_;<%&s}^nIDyY#$CTfc_$3@tYY&iW7nsr1 zr!e-u!c*U9m@WJBY^0#5*Zw;Taqw;LjJ_EcODl4`ENvG-F;SCY51yOi$CUu{!8uZR zKh-Eczubi?H~ke;XcNsNqux_)DZi{mj3RV{H*1xYUvJ=CAV#=&K9QYBd5u#7bkz_7%w8OuyU^c3o^ zg`nS{6koF@q*f1X?6a)4(UAI^-6eM11loxjy@WmVv=>$EF~0Q;)z|)V7==#UPx-$u zh;RIgKm0XCTKwFVnE~w0r(Wp?)uZ6;))YC#FD`cdkPuAH@tyu4GG);l$$3yfGy>+= zD-f-tUaROwsxav->S;~>@M+W0RTH|FdubnH1`qMF3zr#eKvn9$?VrDLBo)vS(HJbj zfE=HiQS?YRWuCPVrb2|006=2}6}%^E)XE`VNgyaICue{jVO3OD-MQ!LdE zNQJRZqP#FT*k!{c4JLIc)dB$l;=a5!ubkBBFSLM z@^%6~i_gG9%K0Oxjk_ll=ex7i!_CDgsi0vX$bM)jz>FUNExV@(uK?$-T+o;=a{|G8BI;!>L!nAYo;!~&A< zizgv9{Af0;+|OHuT*9?WfJ8Q+^v!K%@OYBOoDCC%B(YxNG5L|hp9oUuFMfaE;lf#@ z*5|{qTff%+Xm>YDU-hzHS=ZxzOt-ZCFFs5VZppa@b9>S6;1>avKwDtVm<5y1Cy{01ijP>c z2R8p(<;<`%Q;B7KU?q+hxA}2*ucwtSPkQ;CReBM`Wj2Q6BR_RxV6w8WD! zoD2|X;Yox<0{~L-t1p97Q<$8^KI1ZXkHrLd+-3O}8DbV>Et9kw*$*(+|3(5(b%xj9 z!@JD|h<)5UnnLq3QF6BRuNa1|(E)Pvw|=VuG27*xIGy`svz%j<1Hk#G@LFAY^&9~8 z6RM5CUqZvBl2AKDvytBW)R6n7>At*CMQ14At#98OYRJ8EBy|YrP)7JWApjSGqxPI+ zi@!*Y^q5^L9rTpnvyALenla0enN%3q_h%cL&5ie1%nq7fWuuleWQ7{inDw|?(*ebh$Zwl^7O^D%mc2N%A|tZM&M4Pt=_y;R#TY3&?6 zapbe0z4p1G^U?`u@9c_ZtMt=(w8R!r5!FmeHM}rtn5l<)W$N{3&f} zkw$f^X*%Ra-l;O{o|#k26GDs7Ep|CMKiC-h!IVYHdK9>oluOKY%@{+lV{k#LLWcHy zpoyo``^B5_TcJ@LSZyYz+7BxtamTfhzRqG_6`y%b)FLL09xDj=&mi7z08@_{9-uq(Q+($O@Z{}gkDBR0(7rA)2&+cDvM4?ql`p;3(yL}E4dlkYe7 z__2$#ofA^E%unit246-<=R z(Cb9e!>qwfHcYG2t;Exvbl?_H3Try1$1+(}MUlmz;@u!I96>0is_=DBsTm^b;jD*) ztl}!^jR#EF1}bnSNS^eq2ya&K{glyJ=5Ok2JSNVF#9!i!nJH#af(}+4nK3XhxGTC= zD~G~PUUj(fS+i417UBf!cdRgkk>oexk$$Z*Rcin3Ys`h<#mq!GCW6b|Yp$3ZL}S?f zO#mqV*!^t>L+LYg`|AZs79u&l zuKDtps_zF}gdne4Yu+@X&WZ~1b{tBx^2)LboM+ex;skpDX;!T-UCWAjySoysV z#a7|4@U>x^RdQ{F2n5o$qDd20fzud*JrOVg`jKTv$yb9h3FWAjf1WcdISTM{&EHz) zLL!cH{bR;?fj#?Y&BR>$|60hLs2nTWcLv9t(?MYW?~+{NQ@y+zwz26zLO{D(YO>1d z7vPo6MN^LH3dZWu-}f1fHqxT97X6R%lv$s@gH-lQf|5eeuqUd$6HgAw%>d*y*4*A- zd#)QvR^8xAzY0K1*u7lKH340ark-0_Z*sfHy81SKkYVy}Eg_`(<3o0kqAl1Y6U7;R zAr)Ut<>Z#!`BzB;SxqKt*OAG|1XH=Y*T*$il@r*&xN-o2J;Nso(Td2=pA*~sNTqmf zd%lGf#2HB$rM9I=UX);2&-4&ErPWVR#7D9g#uE_s8gjlmYW#+SObEu{S^osMr}yWO zR7I5c%jx=jhJZyzIkj)=lz%4lK?HyL@e=G#T?_gjlY6v1I~EG65nWw=@NeWWzhQW= zg`ySRTK+m*<|q+7T37R9MQ*Gt3?k~#Kk4bpSoe68SqgR>ibUYM{o2;>9e8wa{lWBN z5b)F6wyEu|wR~Yg;vmV^**s1ZN+($vy+{oz+_H*vHg=hAx~P(9X0@7ufcWFSu?#8$ zwG_+}InOokncY}iT90=w#P8(QPZKDp;y$jL9w7shwD?+5et@+*j*yAJ;<=MxuGnNo z7|WPoZ7KWdqL+qFl!PjP6`T-z_x>oTyxY9qdB1|L#hd0^d2U3{{HaNZnYj3nvXz;W8 zBbyijcYZF~2K4c)f!9?@dz0_n6pN61$s*vH-mj$hTl0X)(4V%~TIF>By5;bZF{&Vf z7X^BWeb{LFSS03ZsU`hTY))Ec?8_7+71IQ zda7TCKVjyCyz}6`L{g!_iB^o({$rlIv~8CsQd9ut|0zkW>cYI?*w1kN zsfgaDLzg!Gw*q}TDV7Ew0FuR&Co8W)-$7uCYTSa;GRdfCI-RF;XHY)J8CNQ@ABTa_#+I(Na#4ZiP^&QGfw>-lbnK29JnnsJVWsR34YP}Q7 zuyR`pQt=T!>$`M4(T$dSqzS{p^nTCnMjQPV)~{4F91Pgjiv)V6i=Ot}+-XtCuWetz zbe~bf8C;@#!G58Ep}jF*lzv-^KX3l%m~K+s_~bz5hxQQpRqY8Eb-3pu?q{yYq`50r zDKcG>cru=lRe!%MT`IvvIeoZ}><}Vr3ZZ1Ow*kWnUVF^5-}`ogKs5T#vSF6AZQu+t zI!LPv>BJ8`y>8o#pGoB7m>sFBj$K1{oXZ9YvzKy$XkH|YTyjC5>C~TE42BfK&*{i5 zg~F4SZHeKk`?1-zE9rNa;(k=IaqoO}7afLbf2&Zj(O@e!OPoENZvOHii}N7s9KPI% zFi`vEM+3(Pq6NEd64lU+BvB#saDt8P>UE_OYJWI5BJBVE1z`UX(%GM)3`Iho+`;Nm77IoanjlmD)Wx!WmAN%@_b9pA#N74 zVEFRBv)5I2Blc!uAnOro=Rt5YCxmdM_8@>rD{ZzGl*+OdAI2MwlSqPulSjq-YTH zHW3@59q+jYPxiK@#FRT!PUA6=HxpIwiZpLHR)$2gc-$PnqDOtPhQ%PaBEmMU zXX$d55*z_WCb2P)d1J^(lwNByzaeO~v|I+Cx zNi3EC+HU5y31+&cd$A*I+sp&XK!Z6Ou0T|Uqz$L@#xRMhs;6}5lnsa^nt1Vd?QnEx zot6Nm*G=hgBm~6Ub_Ee3L|7Fcq7|5;J4S@*8wKFQT<`#tn1Qyj2DmnbSi_LW7pec z$;e^>k0JD^wv>)yRUktWdSpPBl@qy-_c!>b?~3g}6wwBofh1axFh_Lqm(&MMg*h4F z{|k`fd+7*AlNcMYeC2}~B~jjeuHW<^^8Aa3=YdQMjJzAldnkCi+ZOsjVzAr z5z(p)b`20QjM|*AgI+`oSS7`FOzIaq?y+Oqk&4JG-M0hdiIh1Aw3>ElCE5l)!u@9OvgPQ|4%Vy@En=IgrP8WZvi_d4m7-j` zIQTL$k;@qY7{<)u3Slvr%s}Ajm0ie$a)4x*)tG zwl&C?*GYL`+p`{Hmg2rnBbWIPD3!eUKL^_zLng0KI}y`#p7h>c*H3%(n$9S7{zFEk zt*$}AXPya35>fc!I)4zLx3zCx1_?z##8sqn=U({CL&J_h8thVHgJR zX<@zK#eF**x5zqHnFtb#^dB{f1wf-GVhIfkWpy~ffDiiBAKWRPAWTrHhkH1Sm+g_T z!>lb`xsyID#o(3u9b2NhFzUbT$ktMU?b$_Q6@Fx8u2n+N*HD`rB!il|kaO7>ZCf94~Djt(<&~ zQWPK&a;M74qPZVDx)drj5mJ&5&B@oQOl?IK!wQoFKKTZDs+<_H!yNH?Z)($}jA{t~ z2W%+zLg^qjwGO*HKJ7MPPaf>6f7WD3s)F8f|Gs^e`DXw)2&5X}abikUowdYE6Sc4e zO$T22$T_RAe;|+W`HSa;+!-BC5zd_O;u)Z<2l%ZPt`kO#+L>k!FxCeDGVL~~wAXX+ z-otdeCvC`u@UT_QKc*E!LQm0frE>CRZzgQ;yoz2MZP;I6^#21fPNi2L5wJt+Zds{o zvAp6OT>t-x3_u;&4_yWj0Zf>im#IxCV*Un12k$P^u#YOkNcTM&KR>w~l|Siuyq=uJ zubDd}$inqK-OSq$T@m@!M`m-YSuA}%KJ+}R9C}`T%Xpk2?laKq>cwn7s#`@0Y0Vwv zKbZ(*f)*$oy#A6If4i|(+ezij-U@|Exl>+{gwVZ-_C7F=&KWtI{hL2Qn6}~%%*+II zAy3n@^nLS*ln6RcDu!F^7OJl=RNJ|$0_LtJdze){9EwkZ+l%;QeVIfL9_m>Z8ZCVrav6kMA)Nuu)vq+gm&;C}BKY{SidnIfcdK{`Oias7!bD$Kh&dZyFV zmT}QfHd*L3*$d4DYv+2y!dv?NVrMX?LwE`YR(&2I{b*5X$hLh0iHWg>V{(D-4=u3C zG};4LHTyqmlU_aNXkO>R^4;UVk8#364iOUt{mWplM(H7I@W(DwTWknp+j*|w+?ImA ze%!=abD57u(udj;a3lvyVs-8=_PFnJ5Ve0ZdU<)1<#_Kw|nMHds|kFfggdzH5awa4dzh~YGT*Vg77*aQ6# zf41#hGNYg%sc)?4^e`zB`Af5O!6=T(atTXofxX|H{!Or}VIrBvpwge=yaulfQZ zAYN7ne?L)2)0yL0roeuZfx}OtYQYm{jv`_PfAYs6@40neyKU(%*fSk^i0-8fE)%je zk|duZFosywuzm=yAB7%}4T5&fW~j?HQW&GCLuWzwh{B@?b_Qo_~R*rK! zK<$X9f|xEn&FJ2$Of;00rcyKBF zFH4V3-@X|lb$*KK1Q6_e#FY#^t=Y&B=4Cds#v{+o7w5SW6vsfcAT9??Q1F+|FMOYe zk&V6xsMuoQ=>kEZ$`g(7CHX<)qF)PB7`z7paVS<%u;kq=UdEc}y~)LRUIP?JW;wLp zImhkqcx(%;fPHTc+P@v?fG{Zvs-#gB0v4Sqm-IcYoQ6O%_V8w*NtW#ad^C9Si3LCtARvXIVsduLf$WXIhZKw zohGVeJAtmI7QX_hruXcXj?@T~PBTikl~=FHl3rGiG{ffFl&5iE*F9{*7vKz zuM9VexRLqN7tlzoIL^%qqR`!aw6+QsX|am#{}J&%N%XGKKX?BC6Q9^Tg)nuC179lP z8LiMr^r2{?;Lu9VvB*S`lc1k#6kxx?nD*2jX}Pn9N`A$gQ|U(tFB{>eyL+xHdKbsL z=#>O#Um_Icjvb|fVu&AzH=zjJO&gjq+i|PR1&pv(6eOr*OkKv({mW(yD}~TPlbR`= zQr(pX5Z#>~W(dej+GP`M=!rjoZR7D=4sYAU8jZZmS3788(y>HFx+u zWy5tgxH3xhL4v5A$VKiyW`pZmyz7j2T*ZJ#`Sr(!#q4v)^#hl`hNkqEQ=npUKRnBU z4nDnZ<`gwpfpUY`9A ztyY#{;dmZic(MAC^At$uH~s?j?Mv2^o77Q(B4>y`b1EnF2&)2=BQ+}T<(!o0qm?4n zBIa~W3JV;E`CV7D>z8drsyE5EL5fN$M``&sd zaDJr7xR$D}dviR5G9i1Au4y_yugQ9Wpu!KSL)o*l`HooXRo&aD!)9S2_`!#KJ?Ih@ zNJE=JySP35>L2?_VPPQ_l`q@+gNCno(%H*?$PN>AO!g({iWznmvL*fe z0fanYowWXPyo_t-lb!s)rc>SC;6VKu`1F$bx@Wfpnbf*qDRB7bVk*;uP>|)o{p{{^ zS?x}QZichi!14cwl&=3WrLQ-MMtmcfuW2urv?KDB+pCTT7}x8k%BAVV#XdQ00v5<4 z>T%R8f?pWes_E@@*0xhE-lmM)nLqVjLZzx|%POZ2?>S8hZzD&Y}|iETg;cW z6G^VUu3e@SZ)u@Pe-xS-{b_eADRvAQAU!`=dgsfBr7G zpAfPn(-sSRS`)vC8`k@eAAvqX?GRVhfPJOi=9LOW5Zvy!m3iTcqT8Xp)2XSW=sMi8 z=Ra%Wm=(9tZ3Ps1CNe}2y?ugcY6^^6d!`d!NN(=TJZ3IK%#$(Du|rk_`uSbiarYX^ ze>+zBOfE?jpgI>ukdI?JK6S$eWRGf$BMDt-_Dv{T(f&UwBt9gH&V8O2$5S^XqxgTp zoW8x(M@~Lk$KB^f>|oBK!G~{heZhBADh|J(YySbL{MQ>bAS)-Pm#;XpSnf7~bG9rP z%?ncwRB=1pHSNQPuWgIBAx?6prQT5p)uPxZj#yAXIm-VP{5OUiI5EdhA{Ncno0ZY@ z5o+MzEbGt%H9zb2)3z7pbSHx#n=E(u?QhLU{_zD?V*hLOsQmwuDM4rkIZ}(UNFpR0 zhEA$yLI~i7M2ooz;?C=+PdvkpqP4yp_2hnQ`Z#6SVe!AWzI|{Pa#WBx+uqxB7`na$ z8=~3CZzJ=q*AJmCxnNGqamvA9ef7%mK!`f1ax(Bl81gSu)ymrX4FI0OnV9rbS%Vy( zum_#~Epqu2FI+d6EnbrYC&XJ{0w8ztKdG}&bpIcckV{jVc~Rn49*9AeA)mj8dUsi4x5F829g&X-9hb96JPl*!SK8w)7((f0C!nH_`cMr- zR~izi2K}w_=12<&%>rz-$R;2C0TFZH?xg}`nd`O&(8haYG`@+*x{#`acZp*h2>+yf z<@lFt*M^bbdzPUY(#gmo%6`7RQzbCGPyu5*4Wh~|hv^qz_=*_Ed{%T7{Tp|`Rf>fkVe~!LDYh$zL+i`+!L#r}bK>b2fSeL^ zR;M~QHMPCFtu~x}mbM0`UGo_>=9!0PrfAyqJJDN>HD4imdpr|I1ib%YbZK3Nrd%;# z=9gRUJw(!uSB$Xpld5O}e&%hI9wKByot-J+r+eVZEiEQ{*Z$b;z`s$@TpuO98;&!j zYHewQgqwT==p=j}&$cC6_M#uFOKXNe4EVlMmETlrrg1D(zO(HKT@fhGC;)sXjS?oF z;3!`r(!@>Uj+!<5Uc3F#BvwvT&Hso?^`oYfTjpLf?Nd^%cPD`ELuLWMq=tvTs7r0J zyaFex?F2W&@b;W{Y3=ZG?edb^Y_+_rnsA+~{#02$#9N$(ql|8$btiKqx~NM281w@c x8X9jiZS}Dw2DYjS?BE2bou~}{A1w6-FHa?5=4&&*3HR?(Rn$_bld}x_e*iEVxHgeCjF0mM2MGxYUsXj>4+#m`?BCGALjC9YNvg!~?}p|i zrzwYo)RcnzWQ&f3gd(e>Vesyszp1IIp`if`2G`Zq)zs8fRaI3~RDAvVwXCeHq@<*v zpdc?VFDEA_D=RA{B_$~-DIp;tE-o%MHa0vwJUBS`!-o%ketuqFULGDEAP~sa)z!(# z$U@ZjJeAt7OZe}8XpZ+CZhXJ==7dwXkZD+B`h{{4GnW8=4P-)d`XtE;OkD=W*( z%fEd2Qd(MCTwI)=pP!qXo1LAVnVFfMo}QYTnw*@Rn3xzJAOHFD=a`t7sHmuqA3uhL zg@uHK1O)~8`}_O)`g(hNdwP1hySux%xHvmIJ2*Jl*w|QESy@^oUteEdUdqbKo}ZsfOG}@go=QqeA`l31 zaq*+0ql1G35fPESy*(izp`D!_0Re%ntt~!2zKx9y9v+^xwYAmN)#c@7Ha51UrKN?1 zg}J#o1_p-Tzkk!y)BpPQiCo{tD~c%t*x!4rKP#KS-#Zj)xR1-wo_MDMEZ$d_Ea(TK|;bM z`EMY@R>PkDIWc`zHQ!;*qT&)W5PTM@V?#osM^aUkGYBk1gr=0NjQG*Dm;WrJN{BJ6 z(KW2|o>(NPD|WOr^nZ0|=TrAvmsKD=l$CRm#SJx$IW6}<2p9#Cvj@ByCx0jE#Kt_% z7lYrN&Z*O=WjaJNu6|*CR50+jKZTMjId^GD_erf}%MLT)7D^r|dWjMF0i)QaxvjOO zC8o=@ePPIT72Lvow}{xVBA@O-3J^W#@?EHm-FGDTHBK8mg`Tj=E@S@`!4p9Kx^or1 zyY*wNLU-f5<^JGk3xKwMqlaz37_1k7AJ)hxHO%Mp+4g4flBYc~Am}Yn)c9O0zz6vL zT^^N4SHU=GfFsnkpib(;0j-@EHenDWKp&Vx=z(AcU}wM1hN2h5GNU8<;kJJXGyH*0 zK3*O_RT{bK^CBz!VKnxFen=Yd9SOaLd1b8V0AQKNBpj8PO2P|DFpi4?Y9q+*y^5$b zY$O-Y!*6&ZJ5lGB=(W6K?!OtAi0`#8#pKUvt>sTn=`^r1LzWqF&W5zU3KFYXdAI)e zo#A{HGCuB&_$!(Xyf1^sc-1mH`KW#o#uV?vvCq&9HLhre<~Lb#{B1QYis7dQq((2v z26M_7t&wyFrwZ!Z`!v78ka^$=H;}}j=!SR;pGG3aJ*V&vb2r)*JD9tXpLcgI!!ZN( zomT(1KvGs|!0atbL8mSrog7_?jgiI**1$<}G*EtXIPPJQAtGgoaQ#G^&kJQCLH?LX zEZd$4Gdb;qL7`#ACXO0}H%hg9+4(O^fycSAd?yosTcLTTJe zCy{~_MuIlmiiqm}`_=mU=>Q7A(a${%Zw=UGpUq;PE~4V?aZkNdeNw5{Kb3X#e}bmu^c3k zK9MQ?{aXQFk)3AGs~0wIUj=gMOr3vDxVQ35vJ}fl^y3qWr9q|W22PyGYraEczKN2q zI(TYpA6MY@|MrzUL-GW(vj8&U!{@M9K4Pp>l@g!@4riUl-m89C|49*S#P{GB^xadK zui@P~qe&e$9dX;9^0Po$4uSSpe*Sg7S-_dh@sD~w39dr))JRU1{y0>1D|S4B&(>YE5E%R#u3GOZMgD{c+r*H@=F&hxGtLP|(|#v! zbgcL-?L95_vMxnqYX#j0{#WX-$V0Dk!}Lm0>=9P?a7j=ZTryu--(Fi@VsKK)A3TQXkDVm8MNlZ z$>a0Z#?LL$rUbUe>sNMZ`X!u)eESCNx8kKJ!U=qf?MV!c9J1(PRoH3-$h8W>E`0mH zYo%3b7B^`xNLK({>{MrV?tk*hSdU56hfsQ;rl?lJ6j!%$D6VLlDvf$5Y0S^v5ABB%lDSiZFz<7gqdZi@1*942b4EW@m76 zI%HF}&2NSgR4w34lo-M;`GBVR*ugC1jn!oPS?M?ZpVdnpW1MNeC~f@eGK*!FNebb{ zS8+I-6y^c9iwYlCF*^=Wf#I5PM9lz$3rw~)Q@0Nt*L>(EaFho6~ zZTOALv0a@$lzFbEHFP4WIZRA^52X&SpBB}1raTc}Qw+5;6{b}-j+BV%!uORk&avTq zaM;Y~7nHwqh^k*WC$@#fD6uv=obuy_h`=qS-;wn=yufDkYYbuVBK}GwTsDUyCIRsg1B<6E zYZ&9CzeJkOL4<8>csSxclg1kYLE$&W$lm>*6r+Zpq_@I1>2dUd_b=ai%_1aR(dtpU z=WgXlsVv|ay|1?~si$)1%rO7j$jE;+qq14B zhdsos-;b<*t!WUho}?vDbOC!bVd{*u&wtls0g3aM0^VE`iDR5l5zNm2P#+B2Wa>>y zm)>__Ho_{%3|=Z##n++Q|Kx`3OCm|CH>62T9oTpfcr3@3+?@*Y21+PJQh_usPt0?P zZ0E1^9c(ulZua9mbe%)W7)-=sQUI=a-7JLav&kW*N8b(z(-8VY-0^WO$k55LuUq&7=x;7);-j`mj9w^fMDXv&Q* z{O#y-fittoMk^4h1bf{*lu*meU-duGr{3fZ>{y%M*P96@(XD?jr@`a-JLypesP*6G zjMjk%O z^t`Tpdj({lS;_v`QU{4!=MBo32gz$f=hle?WMjj94!}x^ej4Z1**DWU+HBQ?K@TmI zrN$+Wid58A%BAMqh!+$525zbIq8O1(v`)k5{RncSp;y{MV%^E?v~#e(W|=S!r~sdq8SaN^&BkhWQSavS2WwGPa*J(+$mqR4)ve&@kSk|911UJ8i7r*&rFim zrWu9r)iptU-rSGnWda(akm_0|Fa9>)~>m)(OVx8P` zcj>#pa%MX%{sTfj(Kr=`2dbwq zi66wxs~ag@KNmuFNBSj;m*!{g^*$CtWEWR{yl!p2^qcDz{?TGTSuw{CWn=}7T1c0G zMoCrc#Al@J^Y8sNA{BIK_O0v+o1+oFSZxzjq7!Zsm1XlBvPN)Fb915VsF|57IgcFo zk5>CPA>d83;33IKAB2f|C_=#Exy~gNd?FhVd@m;5+g-%&R;9qU@%M-Es};I?68UM; z6ucXSQgbf10}6TKTjkz-n?Ei7C1Pk&`jP^Rm=W$ZjYUNbBsW7pjGNBvw}^ISpj-C8 z8;V{?Q(mKYR--8PKsZoVIi}o$%aaa7AC>?9q?5i|k1Tm!#?*gW!(_cvq*Cq;>GXO` z^*a|N#5s3yrA8SUZMd>pq#%gh-5Mg5q1HOr#YMGD>}w9a7>)EGV0Km)9H~f>K?^x- zrmMV*B@}cP<5yKKEl>--QJ|b^Ex&}8OI;HT@jhP$=sleVeBWe)T z^oZXJVg!FpA5L3d{J3K|LAbtokX2X1{nlZCTW{88R;&_TaS&&UC>6EEw0G9phfOf0 z^UxXI$f#23i|>BsC~Suw#AXSHQo3QM~g~uc!wGWH|&pf zU$$HVq|@kp2ES$8aB38AoRKAa8==tN7sjpN#MA3vG7Go7Hmz+jdG2H9j^vUKerRJ`e0ay7M$(57EICd*dp0SOt4fdK>9bTXcHFr zyXmnV;zFzbF{*L8)@9=RA#^a>*E%e~}hLUiNYGWYYcN(k}e$=R|&DTcVP%LjbtaiPc&c^iZuPLnnw1?n1@kkIi2$ z`v|1$;^7}JejV5wQG;4Pe8M-)7lFVgr*Ue(C26^X`o{#TX9H6!)^G=orc_}0%7d_1 z-=Ctn4ye^%j4iP6enNU~Q7qfq%?hGr4VH(by%*m!(71{gEu?;|_S$|F`pg(#*xr3y zTWSp0>DH$A!eZX|Cf&-l#(V^5qVCpu5QYtF5;0OsNG7%JnegA`U!-vVJoLO>`C+`n zgvI@tc|8A*PsGVnMb^8~TZ=E*H!8u?Ng*xD@K8K2!FgKXtzRkU;s0!@3uYYOWkwM8 zqtpy21@b690}24IE-+dYA~WW)12 zZIN9NOoXQ(&-QOnwxYE!DD{fR@H;tCsipJ$3D%cPA35;z$7MK|y|pMkVp9(`CC?s4 zUG-tK-Uy-M$M_kD=;4P(?()axp?rv>Nqdz~y#Elb;LJ2myodO?`u-1~`^EEhNrI3A zg1gk_oV9COL7`-fX0xWva95o4j)V0NUOsaTjURUKA!L_s6_(#}W1meaU!M@y5S5S-ik<_Qt@oap*TJL6p@m5OPfN za7*1A8bCaZAg1Icn-8EFhF9kMC33(%#hWWTO-Ht&)4vx3w4b2jdI+&L6y5`J3{5ZUcu)2iB|W6ihy{H8^+@}urd8Km4o+)XsN@*oPd3yN6@)6 zh@ejD&DdBLKTzt(VYfoc&*kwU_ne-WJ6p(}Rny0@7q-jwz5-0MPs^9$=0V6asS3|L ztw6<0Rw>W&>vhlH9SNzJG@bZwIadxuT_yGdZEos3C-+`3Ow!L*nE@0QKYFDo%F`X> z{NGeY;%KI&uCxN$AZzirtiZQx18D_0EQzk-QH;t2mbnd(w+W`eBaBYY-TsvhZx=PQ z21w!Q)XyxkJjnMA%F8VL%Q1_8>wU{K(sSL|+vUs{0_KQ}8gqb_7K#PJ1MK0o6AJKd zs9G%jc}wg>7OwIx3#j;%hkEd11;=9U_gP-hA3H}u7B4Kxp23y!$;&Je`<+)(HqtNM zADqYZ`XC1 zjXb09lVI@_#^Pu!h%sC`tg}yAK>IW(p-XZ|1q>&J$Th=X)48G6dc6EuSNk*FLB>ty zuw9RAjyfkGR4oHiwrFu$E;)k^Y$!}!2U^0Uxtjwk=1B=zz=e?4z!$CeCs85sn9}}F zn(RW85AZ@quibG?!*ajwZhff93DKaK<&9@O*63^S^_lx0)Wjj*veEl8o-H@Q7_3U1 z9GrUeaXuwiW@07*X&*AePoB?YZwzf-Z;?h%Em)~YgvP$p@ZII0^~v%7&u1v92i(G{ zS6joj*d&@Byx1X_Blb&V+EsjHYWq@+1-&NH1A>Pe`Q+o?6@DHD{JNucEB0b*%l5&- z#>S(LX(HAiN=o|JNh@+CE--8bsa(9&`=XS10h_XbMk=1sC5K8x*e?N6likd$OmxWY zxtfejps4SDM89z-j{KhQu2YR?aJ&52y0Jck?x&=v>hAZxTiBJ1P@V{|sI0@DYmWr0 zk7ZI{J+R?wYSoZ~L+8%l9}?-z=BXS}B^zb4>&tkp5bKU=UIZA|yg-)5+gxiD=(qP3 z;aZv2lIFbjaV?s=MA-x>2UReXg*b?3*MVbPs2gi$-C!K7+B2uy;1HkIY6?^d^B!RY zHW43Kc$fB@*x{ReXW`-H4qS0&0E0i+qOI}ajccO_u;i1Tq%#k2NO$B**0!XHX3hUT z7*-w>INgnSj0`C&Z z!ROS=3C{6@T zvFJVEmPp3rE&4$02AcN~OM`C|5v%CkA`X5rp~v!1&8+A>@%(aPf`7jr06cezg3b62 zemjhii!2+sI#r1+x!HrEl*+=VY4s_@C+cMNMdGwtbZeHo`JW?9>bBe)DBT*Wj zZ5WUH3B)UF5nL81>rQ+MF*cR;;6NO19KQW#yPu;xwJ4g=a0%Vu8ByOFtD;a3K+6en zl{3t~=1BZ}A8?)N==V_{C<VG2_lkRFO`>tWIk%vj!b8)IC`#D zyA;8=IlQsQ)6Kb-o=w1~CU)OX*p$Cyg~t$?v=rNX`~FKO)t{{fEn^hOq*QU)mWS<7 zMc!i5aPiCFWM#<44Ei`|d+QE#@B-0G2y7gx0R%qUF{}WntLmvMAhcwr+2)tY7CW%w zti%LwQEG;S3inD+=NVoI7uD#|B2Lj)wy1{3GLPlOd#3m%5A()=5-E=TWiEg!MZG!T z{mUbO53(=*uF2z^W}yZ@IK~}mv{@dPfFxZ{S~X^4X;ZYvaKQbkoA?I%k<}sv)Y#LT zyb*r$4sV!E5D9G^m+ml{tT{!xnNY(^X4rY+BR{6y!4f7Q<0BbAoTo%aR9sjL;BRH~ zZNkyVHf~ZO6?n2h=JylkUDfg3psV-~0oZIFr@(;(Z^yK!Nw9L7_pThcIS5&5v z&GZJ(eoY(iR`?;1%Ob`gQYP)^*`F*Y?zs~}E_Y4uKtn)+F~|%Vza%Qh=keax6%#j+ zi@vmnkX4Gc*BS_FLcNMdUJ_{*+-6v=?Nt+wx zk0%o!%dTab$#P0H-8~Ijz5u@E&G8CyO@Ee>WGLs;D;p7J#`7B2fu*YsP8*5nh*R+p zvpDslWU6K4q(=N@krjPUycF*?xy?nW(how0DO&S&~( z*7FsKNFg4VET~uLhtf1Hbh=nw6yJ8y+}J%!JW%=Xu$W@icv zz78{~hRpLPfi#4L_}|MW8E6LmP$*wf2d{r|iw)}k*8^`ffP#_5!h#|Cq^vr7OVEBS zo)CHJl6!l?rr*c?ONv0d%c#}fGb(?gbD>Vla`I2EJG#}T$LWI0ne@&vmi{UHC=*CT z{rx2jT6r%x?o{KBRrW&!o{sZNBCIj^$w0=!=u8!N)By@&RrzezH3g@fY zK%*H;9w5;3x%g;c<{!tv=lFJF3xjJ?fDzeGXcH|LnZCcyt11$PTjFl^S|TzNd5z%b z{#TF}wzxAKL0OVN^xjXdnWd-(5P(I4Gnuy6uX!p#lNh+{szV|ezAU#s(D+-POdM^oR;y9YKdldQe31?hsXQT^OnCxV#2S#;a+YS=rHz_HSvkqwVCyL$88@R?({=Whl6E980m z_KfQ3A|luFypRLhZ;?nnSo1&6KIBb?O%jkWmO-w6;|>hSvzL?>E})TkU&ZiAvdN#Aza&`q zwsJ1+;UIb?E%37FfH3(?0g-p^9#<{(iFD6Q zvF>haCAkaXjh`LDtk-|KvEg$6Pb`Z8S|_+)D#xTtiVeNI%R*)|9y^x4BqM4p$?`T|W)FXqGsg?X@1HX3LGHco}y4 z%~twfe*tq%nJA~!Sremi?-pP z`W?Sk#6;Y^SH#P)Y1qJptN>O(rMLuurpB!YC5@HE{r;+Q)D_dL=oblM76M@|8QCHX z54u`>U+i-fx_vYeVfj1fD7JOiH?mp6Y-__zSR3wmZ+hqFobe)5mz_>0hRBq4=7f{1?TO>SXsEnMuTskclU?Tncw$gNY5~1Dv~*V=vOni zaxiPbJmxo+8F2Q^6Og{v7e5?5!o3AjVrhOqFb6^p(`Z%@dq@%W5E_##v)`^WgO7#> zz4yE4)U24ZcIE9`;Ui0ev(vKIRy^N;bF@TrjQSc3OA6Gw8lG=JWH37fL0J>TOsRL5 z9$Xv-!kDZm`u)SWQYQ(LR2i6vZ34(+-ntW9gTJ= zHbOy4m;n4_SzLxbNWb79D1zy|6HMHE&BI^f8N5XfPk$nRsZtcf9eL9)H_up3PVgguUV;;m<#f6Yk`WlzMX^3#?DYFX4OY zh1#ul@t7({yqagd=gk!iPp#;k^oR`oAVLa{Og3KOVzk=#%rmE2=ihCgrcbkft*?tK z^~%EWI@SadsT{`;o>-LaF=b-5?a65k)bc}oLR>6hyLjc-(lbJ{^AN9B-rA|SIdjG~M7}3(y>a-#FXq*5!eATj_(`pK~4BBs5pbbh1cNh!H z51nBJ>sfP-Q94Dp_Z9Qdxt|6d@4BN}=KVS%OgiK?&L#{HvD7xi!jCgUlQhlOjG}36 ztz;cz1f%PHWd!AYe~IQiO2|+Xi9PJbd-mSdm)}B55?%w1eea^VPp5K(OA9%SS?w(+ zXD5IebrbYq**XjFXkt5c*S=!Mag)s6;s!`SzYelBwAp)n9FGHM$*OYC1g*r_7KI%E4pPfGEbMgMAUsF=xba*<~5iuwTzW8-<5L2nw$Cn7i;tG zTwy!)yQUo*CdlWDozUcpY#$BkKI@~2e*VGP_7mnF{G7(ix+h$rr2M>el-~lfZ}zMo4>NUH{?%dbtXut5tyM_FL8AH`~9!ykMc3RT-GeWUC%Z#(ab0cRjN?)pt&1 z>0Tp%kSzpP@9X_=TAfA;?Ant=*__@IiQ&hw%Z=Bv-n)Oa%GrSzlZ(sCrYm93e!j=K zR$tH)Qlxgd$hfDld=G{?6eL6L8{EL?U)QxFUO`cX7v@RL`^>4VaKgFqkr?s6`?e$Xq2k(-=@@n}Uv3$?>rzMN?2AE8* zJr=b0byNM-9%iz*X(*>ZFH-Z}sIvnFp3U+gxK&|3s@l*j)yMsm`jl5e6BPI9YLA#3 z!qy7^oa1__ZjR;^wNne3JJEY3mc1AA{5wKBu&|q537Pf>rZ%yE%4q<%4m%yWovY;E z_z%^(a#|y#^Exu`WsO<>wADEg80{If_ zX~KfCnffsMru=83rMTz1%Kx}xCCnQZsqT~BI?+xK9$x5m$zNWUARoES4g-4R?_xAc z`Po)6fv^Rv$5rXX_yAyIxWLvYh{-Y0gu-qOLP6p(!+&eAF18g@+1(1xqblLLeY8P+ zpw7C-1j_T0GxO^6hf?QCEORcu%7#}+d2i1|BZ@LOIURvV$st}aV=Yb9qpa2mlWiik zh?AHP&=AMq;4!@}$S$Xij|)F1XjQgN(X0XDID!s@+GG76qGd<0Uj~RyWKrvOD5R>G zGk^`vkhjbTHqwFLS!}~#1i1rA`7I(TaS&#hSp^y2>p8fcpg&9!GMFEAuNvGR^7q4K zstG(l!aWaS1Vm3f^6hocj|9ypPin)B%Zhq@0m=p^M8ic50zfbfhho7CYXR`3Lx2Ff z%YeX{ZPh2SmO!-!j+eKnaoSikSQm^^2VtSFgqBM1{x=zVCpf!x_iQ2*==A^J__GAQ z<}9EdOtD}N#7Si!L>V5WO$py2a*=jibOm}rNmH^_y1LkD5osc)M1R6fK383-ayH#{ zSfX`m|5R~JHyUgA4vcYM5x>JMd67Tc+=g6&j z=nI%B9$0sbaFgx!S z3$#_rfSsFO9Z*r|>x5GQgY^0Sz~)a)D}X3|Nc)>b0|shy$h^V;gRP*od%VI(aB=Q{ z*t@cMhEE6G*1wwZ>>(3qatvF7#^*M!Y7^Hzm8OaMq#+0^l>&{|T(u1Oa=#X)EaC9P zW&%K#Nb-6ueWuAUpg3CU;8Ei6v$zt8&zI0okN0Gg@9Q_y)LfZkgc)ek#Aff4^^3jO znvC`rzC@v65DYDTPP2_wlC>nH3ZkL3Qzd4*>CR*`nNpYVAtNLi2p79SprxoNi)ikS zP^f?Nift4zbwPRe1HFdZPRBoml9U5=F148+bJ^2#|C2c57p9VhGSYn>!b@wSPgn!e zpVasn5JA;{IpmTk)xXK%zF%+F2X-jP>N+uiJ;cmRD>a^ny_6McM1QVXj^jeZxF?Ob zW&uRrz6>DNi`mN6Y6q?+5o+&PzIu!rNWUKg_lkRvsU6)i_D-$m7a@*6%sZl=aa*$0 zU3J9MUQ?w_EvVuqGS7>U=RsmeT?LX{K=NPWAgyJ$6~@_c=taiI#5k7wE(ceg^qb?N z!q%^5R3G$#Qbk(dhE1Ho0om6?XBV5!!K4Diw#Us@V&-Jizg8Qt^T+65vTn+?H sqv(tdD65kqbMQB=u$Ja|t@9V;ZgI;@z7Q57q<@#{J1xa}d7DrF51JO}0{{R3 diff --git a/doc/svnbook/source/images/ch02dia5.png b/doc/svnbook/source/images/ch02dia5.png deleted file mode 100644 index 0b9b281fa4fa859e74dc16ec3c58e9f20635965e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 12176 zcwSwa1ymd{7pQS}cUz!P+`YIKYboyTR$5?jDei8?Dee?2i@Ovk6o*9@iY_d&6n*r6 z|I;}q=bqdob8j+9Zswbb(biPP#iGJOKtRA%RZ)14fPiTBk{mIRUo^Y1jZ!ZH#a>oJ z76G9t3H!kk6#)TBNn8Dc;)}kisi~o%p{}m3rlzKPVh>3|E9UX~?i2V8UM@UF$ ze}7*$u&^vHF8==gdv0!Sc6N4p zdU|SVijtCYVq$`voP2C-Y-D6)XlQ6)U;rN6%50{!^$qobpvt*x!Oxw)~i zvA({(y1Kfuva-CqysWIOq@<*%sHmWz;Op0~xw*O7+1Z(ynd#~2si~>S$;pX{iShCA zv9Yny(b18Sks%==K|w)&etzEG-k&~w`uOpqhlhuQgM)>Ig_)U|iHV7kk&&LBp0>8O zrl#ie^Rv3T`s3rHnwr}E{r%s+f0dM!;BdHtg2MIn_2uQIjEv01#RU`!m6Vh`Jv|i{ z7e78e78MmeJUkQ@7CtyQ5EK-IKp_15{JXomyu7^I+uPjS+?$)5oSd8+8yjnDYiw+6 zD=RBYOG^t23rtK*^Yilz3=F@1{i36zo0*yU`Sa)GnRduwZJOH0dB)uHOkOhUAJtE_+!jY_NXlEL&)G4w(} zz$W^a5a%|69$u8_pHwvz(SIXj6Eaa^A8;G)Pn$J<0TR7 zar?+jRB9n>RwV4gZZwJ3q`lxpk?;*EPF@6Wd;w9;s)k#!QzYyupB`Ud0e4>C(rwH; z=Z*Y)Za1HcRjRW#pC1zEP2G`8tGChKUk7XrPBjxZRB5`>Bpo*-?oN?|R&S9{zw7I* zo|3Mc_TS(8ep@qh92`A+1BUJZRy`f*;n?3#wL!i7Vr}`NZTbINE$W?jdg;J!X12S% zgIj+aIE^^@ANWeRA9UtVD}s!ep9!}=P#1PZTZ5ZG`MVOzs%-R+ZoO$<3-nzEJQ;r* z+Xi?f(|kTRn4dusajYoetGMM;v)eb5d#92FV5`U^5n;UGAQH_tMwb215e)yG(~2)# z>rZ0+BNY3fGI>BtRhG?3uC09|%G!^qAX%_?;xo*|rPavbny zf98S3o@fE-Rpo&Kw-WOJ$_nE}<#vD4RP>hu;@f2=yxxuz!N!z8e5oDr(BWx!25*#R zN$+Ih0Xt%J&Ey-R$6EML9}u@}ZS#X5+Jy;Qga;zBgv=1~Q^ELa8$??@@egPx7>P~n z&tlD#l$D~GY%C~8AsT6(`?^UFKo2t_;bR(zD3+Z!dLqU z+XjPB+AOHkJ5u82+Gc~2k0fi&rl5Z)&?E{9(cGNy)tWH70+-3qeb+4GWFoed5f8BG zF-rdsKY3L~jQnjWJQweKl)+p|(v>bD0wcq%)Kw%ciimjXw%E72!rxV(0S)cuk?Tia6o!o<{WtN_q%cRIlY}&HVQ6 zgaPq5PhO2S4Dy5#_rzBaybz0#9R2(StfQ?)+Gto>zdchqQgI|JIJ~n$;R0CnGzzbknuvNU^x>BX zejq-MeNCsXV5}D^mz*<2hv=P?5T&2 zD-nHa`)YnC9A)|N%)y0O4#j&8qqL9VWar%fOa3r^w0kHt>aFGg0f@D!uTIS4)%&&v z`;R)F%d+K|Q4$a8|C#g^C?*sQjr*5?E%g%yQSfE9Jf_zV*?ExHO^2rdX<<3Jj5T6H zgUF1D&4>3NXhzL?|pPCQyt4#9CLS$^E5o9|viY3JA2{D0YbrQW-JE3LTn4**) zI2vl^%p4CSqHw&lw)(0n<+*5qrlYStT0~-y99)X*$!-hSs`=j{Q&Fl&p!3GX+OHRR z!4nVAeeh~paMRyePW|v)?y%-A8zsL3hVD;cpr+)0k|E}60kv3W_DB3p@y1(#)L{!q zL>X$K&|GL5Zlc#|0F;K3qLoT9O3~^{mD@jX5Fs+y{>t6&`gRfducjGqakq?z){!@d!ZGpD>pfIH=}i%mh+saJ6#06~Jh+C}2T6ut zKKTGbFuu4m6>H$kzgiF$bc(l0H@e1bw(w=KW}`H>b*IyaalcY!elTo`hqV34Ivbq8p|><%F2!gBSoU zr6pNPMD@gL4zpVD{jNNf4xlCBiS|k+c~L8Ku<0c#dk;-1l%KCCXdNLJi10P*ig%b%I}lL%pjC*cjf`l9v6K z8URB1m!)hh>=2J6(rARpN+w`j-Q;xMa8A7>U-#N8u?%f^O6*Jhe)vePrBl7VcEU!O z3m)x5Qn2E?TTu$-;VRaJQ5qRD?6eRElHUqno{Nj@Io%)dMU7E(bK+S)55vVh* z73i2;rYHK90(zitL>q2B!YgU^a!|}(PXB=p+u?22fkhIEoxJ76d9OSbk}~?09G4ho zWqery8BWwW#Kg|zOZXz88}~CmK3^Uss1McJ7Uq{73^`RK(QQJhlI63~Tv%96pqD^L z5j5r1V|B;AY*057s20E1ksFQQ8S^M+>|=|Su{8$N7o#$cVRO+uPeAJIFkg(xhzs;7 zp&&UUK41d=RG{V#e+@_7AL!u+%GXWciiCY96!;*hHH2HHsgf>aRZc3^Bg~M-1eQ3tHdZ?_R~GSb`x1Mbjive^f3sxI*W;2kla{Ac zEp*_S6e}VYM7`JHAAg;#BzG!kd)FzlxArBy9M?90!te2pTKYi=LY!1&L52CV$LM0< zX-O;K@^YJ;zsYc`EVB^k&)Ayj;^s=;c0T}<~{I^fZ z-QU3NhWU>?@ys9PZcFnr_H=oz^f;mRXJ(SmJ5IX5<0kN{o`crESfC;3 zLi025_@Z0Or2e%#)kGjP=iY~9%s9!blDi?6u!U-Gc;c>mJpW~jvmfF_6ocs%DiHw~ zp%$WFdf~znd1)^tx-=w(^xnK@E*lhJD)$sXLl|FFaXmio;*9%vy8cCUPW>kGj=sd* z_(kT3c+_HB5ccM3Prm})X}Wv&$NWLuKz~&3?Q?MVIBU!z2O=i00q>fz$7g$>p9T@N zM<0m@RURaX&QHFLupaWj8mg zlJ!*X{qe0q9qL*Qx+9yV)r6))Y04%fP)57HX+d2py(nBv`(EMy09{N+q7M(&rQHrJ zCRBB6xUMQl(4Q9FJ`%QYGK-_L;P0eKP}7sxUpRV(8%yPsW>n>wWg8a(eFv z1t?uaJcl@$_x`#+U&DivzfGP?Bs81F7XsIy;O^k(r|XI{`=-r4M`jA?z@zzg>0X|q z$#bW)0C!I4%o(`*K6LX3hYWJ~P6~*rjV6m~kER0z-9UVpYuF?#1_JC%z@HgcD2Vp6 zEghjG(wE)`ijiE$ii}huRwEEnFWTbyY)57WsF%AJ=%%XG2Bvm*IN8Bqy0zaKnen6!;@aKH#5t=zb9*2`?Ky zOy^T|3Oq&QSB{btj9VpaMe(0L#mDV{VD7L?H0K-tvEwQk`lXO7B33!d=ebS|ulKup zLxASWgyRdLO#I~W!i;u`Zj+bz;sSPL{yoyRy_%R*HMp2Jy|*au^qxtYDQ=Zv?W&KF zK|xBSj|^5pv>q9Gb+ruO{HSeW(OoQ$hv2r@*3HYTM1a-v@se^;$_(>#)%zN4_iRc8CVro<1Ie#uldF}X(jtr-m_O^9veZI zy_oRmZ_26mU<=0qMm`}vB-*fi33A67)2n5;8n8KR35kDd*(o;pt+YSz^W%j!%J9z= zcrgv1b0SEsJf%{(3F?{%dYKqdQ<8&o?Zj*$Ww0V0-z08q9sv3;Y%)OQ#jF--faJg- zb)2l^XqB0WU=_(PvV6b34=Ac04atjI**O@Q0))M+U!1b+6`9N3p{AQCTCQ$>C^3Ku8PNE!Gsc_i)m zeZQQdYVsk>?5UfQZofj@&Rrva`w4zz_ti&geqKcZ*3DD6=4 zhDFv>4V?6Q`ZmEB*kGwHhF%P6CV%}JAQ5l^Z+m}~jxy{BObTi8I8D1s)=UJ=y_B&^ z&;;GKyK7Q zFFPfl|J#7bSI@rJhNNgFL%v6T)3baM3|*Yo`B^LDPkH2PGl5>8q~4aN?2X^Qg6f&o zIdG304*So^dKQDsJ0Ev6;CZbnk7s{d=L<_YDhh^_34Gve2=N5=!mnT+jS@%x+}&u854n5!uQ|A& z>arL6Fz%}h;%V)F*4TjuSh2dwuIwb^64u(a;!cyiX4=4c0|MXy6`zD0&>kl?kClfz znBq6azd@pY1vSy)c-gh>0*pL=!=_&j1B9??p@cFq*v`vF>ZJj2Oa$dH(!SfjBrJH( z;;sqwiqFm;x2{zIn~X34iF=lmdtrOQkF7}$NxdZ7u~b0ZE3K!?sNmf~``G)1m2j&o zj_0f1hnCF;a>Eg)J=78U=BGR^3zHoh-lvhRjb2)_Al+zlwiI#~Pk2<}#uS;4`+gCH z^kZF~^xb$?OGPDUPlj%{ea5>g#8b6bBolr)NOMw^2FDKD2@*e!rp$tuL|-U=hG9{X z`%HC!+Mk8VC-z9meYknpG<$tfVLi-mhLb*w=M8r7vf06UF5M8_UV=nJhmRe0tSs0Y z%)aWhCzY?Wen@oCn6@co?W^}je|?6>&Ayya;NhwTHC}h@{$hRSjhREYR&Xf_tdlI0 z(pe`rq0BR0427pV5=Gqmv#l=`GNIs8h&^y#_|zXa?y{axfR7C1t7s{|0VOKMNB}>L zF&f|OkkTlz*t7GnH^yI39Qwp6!`ig*?=9WK@7Qp*)70v-jly$VF83>J>)R>(31ieL zLNOT=eLY603C!MjmRo$lPA}}%%+J+5 zt^>NVBnSM8p2WS+M(D6rwJvGfc(FUzeHva3D&=+PXV+1|Wo2v=^-A_LbbwV2&WBd2-rk5DcfK&as=4@olp!|ZcGc-nD=Kt7yG8w=NG9c?2XZA*Jq=RdkSA)6$X*}ggKf4V=MU2~eh z+c`fuUFXfc!x{;*=sw`yvC&=^1JAmw{1?4Ce=_=jvApt}4XW{f{K(^DLx3-J_N|ak z1eeyWR~WMGW@~ynxMO}xV2B&4d%4&XWE?ep47QQ;=q?&wIdv<;fLU1O;^h2kF zeXSw|G!uzSlW&Ez=_hoBRjL3yVI6)ACuCiD)R^?i{S{JL3Atz4sPVO#3a4DrtFL`N zw3!jPM6YBDB5-#)QC1p%Z5NsjkVUYPs1Jrw5n34(P&NmK#?cI%{Kmw^uNS%gI);mx zEFg9Bc2iJ3sRJ)hmzXHYYLeKbGHCIBdfyi_v<4y`s!G`QccRL23x#`a2d$t#&Nfyj zs>uQ+8Pb&0_zTNV^pm7u71>*f({l~&ri-Qs(RM7DH?~r3f4Y&2uD*m#3;(im8c|2F z6cxj=y6aPpb{iXKF&e+R{-u!GN>U1apD?y3{A}2iB#0mRNX?bF&0)F3B{F0*k)a;7 z-t2q2=DqBMM6KD^s?yyxG84765dP$2MsI0qyc%4W(9~V4CauPPg*_CPQHT!N`k11J zdUU*J>z2Xo3Do-9R$>|lxrHSR9s21-E2w3MF@%e8+D<$tTZ(Cxc&;6N_otq@ zY$)giG?SN54g<~-LA*O0h}LGD4-;rrp{TDATrmJcCLAu`ix4UGu}LC&1JcM7leo~n zPz_t-5&Fo{efKbNX?qfIN+Ev3LB|KMDcnZRMsoORH-3JMcy~91E-<@1H=?&rkW5!7 zOL!r`?}vASs2{?4K3ExXlDuG~a+f?A#y}-5Lx}Mn`wS426DYD{9D>A?>Hp47kqpqc zMqra5EbhU@y0GIl$h%p#ebF>5s@tJwCs~2Q-Kw#R>2v}hVCGufM^>aSvwBFLG(>%4 zH@{Eg&7K`Yu-cqcD0Dm1WXpdOErvZGL!K&Zh{%P0LsY1X)h1p-i5z9ZLHr@E@3!$k zr=#lD1SP@oXPeA8$YB3>2uGs@$}RIr<{(GENuDa}!oUO1CQ0Y6b=*6U9xI8BWk+jq zAiza0ax#~ht(9DqF`FYHc~pA7&khF2Q$1;fB=nySCix?-dtw*~O+nvO*48vt)zUTf z^AIB+&4&H(JF!8G3g6JAgRsBDS%4G4yR1TWS~0R3S%`d zO(&p6CQ17k3NPn%>(_U@@8wca`KR>&|ehn(lwx}1wt zu2^GotJC3hMY*Pv4~Uh$>lgE_W5AKZ@{CmWzrjQoKb0ctO}7gb*-lo~B%Wz!gRBLH+l>H6q6#g=>9Nz^cIKT8H30IyfZN#N!hs~St3f-?9 zdn1a#4~yiDOanvDCGKACGPK_<7_iFi+#K$dl ziW%4nP+95oYQIEy;9-UBh&Qsyi^oY?wITHATWOmJkiCp$6T`ISySwgY#qziRR3gsTP_4@4Vs=LYaDnl6WrXQ%3lSPV%s_)HyvJM=Q zNF^yktN)8$(|rDeUQ-SKH+q#^?(3aYekP<09CllneSaiKv^89wN6UP;`&UM8It3yU zJ0Je#Bh2-~37j7&FAc+JQzf}wzGT`=idGfMbmxAmPLU}s*6Zgj(*#(;#Fw#{j+_%C zJ$SG~g_8LQV*>UXaHlONLiaI1Y9IsHpn z>z}+rO9GW6ZnBvlaGpkcOV|Qv;!F2XL-;??d(AF0yAly3FlB0`{NLc_&PZ^WOKZ(i`vqL}Gg(P60EFvZR zyov}iDl(iBGqB)3;YbrnPbt=0ji!92mUCl(uWUERs2 zE9;p8lB)Y?!0e@BUpn^YU8}GGSTNPGD6GeKAF}qB@huoPJ@Ol`XD12p5eGsEZuv^w z{1sVTR;N*#C9O8hhodsTTwNL-8IYGe_ubasuxP2F_d?#0<0G4IdzhWQPYo15!n{9>ALsv&SJ#Wzicw*;j?8jEmVeMwfwSRLp7uUXB+)-GnhI$6 z@c$xLa+jSM7Rtt#21r2Z2fz5^U_j_UV2cDar+XLl=seRf>6Ae#7Nww-{jk!~On&`- zmxjo6O8`2-YvK3^E?K7KIt>Cb8KTaspukwq^YdzmT;xngIXf@49;^SEV9$i>w1YP` zfaTSQlUT8FknS70?dG7r>v^P;m7`(-*VvZBsQRSw*`$;AIbGy4 zy&XonV82>;43EBPg5i;1D#b9Y0C*keQ$1;%1kLFE(DiZCfB(r86SjCfu%nHDfb;#| zzW}>5)sr<=L$zqYrsg2`kM^H|$CP|;WfDOP6)8h1V{4QJqqlop0mpkbFGZy2!-Lxh z(fDrb*)IQ+ymCFh9`kQ)VbU>c1=!J=qNjCuK*4{<%SXhcPF)|F-CD2w(<+v+YW3^A zI*Q!gcP{hR^hI9XseL!Y6ixOi!oS8d7?{|P7}xy!ANC4fTU{N=V87 zY{$d5Iqi>U8~0+%?puOH@r7@$57!De>E8t$-3dbU^Y;9$fjk>O<&nd848Vo)luwK3 z@6&mN#>6~;n_U7U?(3?h{~@r~nEmF@-vn(jy`~z!`@|LkyDoPq^q-*|JmtSS2nD#I zh|;}3EAzOVN4!4weFl`HIH)uw17_~( zy-f{i{*vXkSMf(7w_I1_F+J?=p*w04Y>LDZw~E5xz931*Ua9q~O2LeUU7Y>8(&kvV zuvb3@WT5c`o+GuZv6B57UP6*T2hlAo(TM@Y5>36%(hmw-Q8oe#k|}@{J@Jn8{Yb}- z%c=hiGA|iMmuoz#HG~a!L9;szPiq&iu%Hmchrz+ z+5TpR?s(rJIPyAx)tiv7&%1k&8Dflapgme5EcL3@qExAyu2q)7D!Ux|_hubfLc--# zYGU@{ct^R$NaONqVrF>$DD7Hf6YVNmjjjsbR=RTer50didF$}dAhns72h+lU&(Vua zxv5fPa=@&zm<-KUil)=C)U(dekH||L{Y#^U!LN1W7>T&Zt54pJzndy?k^H~ax&qRP zlB+T(%bO=oe4c`M#;6H840qfIhVsIcI$kGQy`z@fra#VGNmTT(NKs$YH~RHg!VZH{ z*wc{8XALvI?;|abZOs#orlT3naEUPE%#&7NTdi#LhIXT0fT7XST#=|?su*V=Yr}k4 zCJDL=m-!#eRm(W$c~hgI%oZkDMylpY4MSqH9U7BK{+Eh|SniX>LtZOLRVYlVBF#u0 z-(xn%%A{rG$y?de+K2p9Z-kXY5%DnPg9)Ap;j`FN)95VoD%GXxV5`kI6e%7B-UXv& zg%k5HjthIYQS$O+BsKdq3UiFSYZxt`tGCU+@Lu4xJY0darLDZ#rU>4UUioJvO-P0(zQTt>53X?Kf+m@bqxTa`+tjAJUzpjf@IJ$G0naX%0 zU!VPB*Gk;TKgr5CG8`CRR@qMvywGyeBvmrFe;&YHAlynPE;d-3hD1akY=<)JwxT}F z58R+q>V2Pm7^+tcy7o+rGP|U-&mW}k&KSy(d5p%*d3{l*a#dN%%%+)gvxhILWl1(- zU6$L{j;6Z)Jf>W$tH@EIKBk!=>breM9aKJ)S|qA?=WH&oRl_WWZT<4T&dCLxyXP>jyVcixrBq9CnxMU<)n;-fHf9ckw`I(1 z)2ZO+)nFpM4&f2&bW!v+oS2JV?j=X;um~-+Fe}2trRNHMWHJFV&doI1IaR*L8ehs( zauO>f#quRZ*}51&k71&i0${T7F-;2Rb2JvuB? z9YC4ZQ|`{HD$On(Gefc~Wg6A1ui5Ku&kTJ`2mS4VV@X_{Kp@*IKlZvy1w89@E&o1hyDIT|#{dR$OjI|6$sCr@_^N2bW8*q^s|EB!aSce`t!$Gd>16LVW9HxhR% zwf~4WVD9*is8Ncc&Ik-)2^2LjTWl~jCZCMEyz4%`)80g;rsKvvO7#H(4_7S$AFsg6 zX{4g)p1nTADutRamKu6GaeY=H+pQZ+2Mk!TBG;ymu&pcS@Fl0q?mJtyPaYv?e~(`UcT#)%l!n$RG?Oo z0l4^$$sD>)y!~gqwIB7b@O62h$r&ADio%cJ4wKz3ztPS}oApx5K7cOXnI4h`I+0tO|n(2B;lyIzm`M+n_5eca1; z96I4&9!w4T!4353r0KmvG&ARed-th|W<#vSXG&Bf;S738}gC9BK< zHJMk*1wc=yX^w9PzYw5AD34w8e+GC-a2Z=*i3 zZMZ*x+{2%@YI2C$?dkbS^Rnpg?|Wfkw%z+ zI#4}H|J`rhKh15jD8ZVk1YlY6HAs?o+rdr}`+jb$j5V4U04uP!w|KYtmmRw0DsnZDxeo7Ir=a~VSq6C<_7>&;4jM? z2_5bDLT-jSE2s7Nc+~0sZ?i;8k0Y@X+`pFlRL)}n?l#B?1nN$pX4TXschU5vw81X3Ne|3Ju41m5HJ67k{gN)@Vt-=>yjtsj@K-6i* zOc5MGYB(ppn2Hz9$sWsk8nWhMv|#w8bMow~dAPBmaH;{A&oR$Hf$tD`MBNN=mv8RT zteUXo-6no(vXi$8)1Y_b$!E6rMY+2>vqGiIe#mL%U{jPoD&VqW5kc0H_v|OKi6C({u{~jp;fd!tu{wu{v5vG0xGo3sMzVm={L5DPzt$4`ia_I3BFEMe& z`@{HJANAbvn#?Q2T>~@aKQW7XIiQ*(mOn`Yv9tK5H+(3mnMYH|+_vwvGqLCGBPu?Y zo??K5H}jm5lr4v|1&?7hEP;I#vD5tff6Py;3jzbPJO8Hg9-X1B{rd2mZR*1Ud(7?; zOTHCNX<&d*CV9J~>`rw~Gv}nj>(7vH=q2>ma4gjNtnUmfcEL$+Cm^RMyR6I=grW7< z5pcc2HXkha9{{Ci(cXvBN>}@D^X@J8je*shXM>|UHNMv*cJ%iZFM+R$yZqpzvxg&n zP=+Ykt0bv8+Q;dOpcDKNSF#D5355mi(s;H?@FJ}?< FKL9>_=MVq@ diff --git a/doc/svnbook/source/images/ch02dia6.png b/doc/svnbook/source/images/ch02dia6.png deleted file mode 100644 index 19f7d114e206f5d2461b7ccdce42dc6fa8c44f42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 4023 zcwQw}WmJ^?)BfEXu&^MFgrow>gLDZZyOfJ40{RC87M4(H5K&OV8nbWLzkmN$R#skF zS-EoM%F@!3f`Y=YU%%w!$JgE6-PzgM-roNG`}dZXmZqkr#>U3_`g#Ti1`35zS67F{Vryz@ zs;a6gDk{p#%1TN~ii(N~3k&n}^D{Fu)6>(*WO8zHa$;g)e0+RtY;1INbW~JSXlQ6~ za4-zRzP`TR-rmojKlk+Xba!`mb#=A3x3{&mwX(7zkx1s|=4NJQCMG6^hK722db+y0 zCnqO2Z{9pUKE83|#?jFcfj~GoIMCA4+S}XH(9qb~+1c9K!r^cm8ynZIU0YjQyL$EN z>guYJlG5_>vZA8m;^Lyby!^t#f~>6U+}xbBwDixPKP4q4r>CdI#lJ#-_z5>%gfu<)z#6_(bm@1+S=OO-2Cm^w}yrWMn=Z3 zU%!6&@`a9$uC}(ey1Kfuva-CqytK5mxVX5#_&DH{4Um=2bqx@V<{_L0G_Hhuj{(3k z|7TF|58pqhNosfPTbk7UNGy|}aIGJ*_mpzywKec}Jrh@x!c$nTb2f|YeDbgoE7L4s zzgQZpz*IoEgJ=%h4j3n@n7*FKu9z@hPR@5Kzmv;q*-O(Kx^S6jN)ZzaSavs!+*eg9 z))sG_b9yQxb3oeLyHYXM(dNC?exdrPO{NRTT0wtP0+x%kkfg}CC9dM@P`6_W)1Srh zN||?%$=E|wjZN+Ab<%u`_D&oru!~z4j**#cK^l4BGQ0`BwPe< z(n5?%xQZ-Im{I0_MMjvK0B#OaM+Qc zkBh|%q5;}<*X-6>GB>%I4U&DucGZVA3ef`iEr}DhprzB1Sp8BTL?s0@NnI&d9u_-^ zApxAuQR38WfYWnmbo3!=uFIoU_!q-eNog0R%sn~xDvKzJQOUx~DYHBX1uqSyC?4$+ zAYavIS+V=AQM7m+RT zav(|{NlIJ0+ zD$x|+M&98_y@+6azDm@4pwIWd^)W1}ca17{RN;ve5L=S59^k_1%Hgbybd<3&TLEt! zv<2Nzj`6V;~G5~Raed3<)8lUsEl#@qw<-B^-aCcc) zknXDidpV2Mj|pr@*7VcMmi#*-<_45+^lx(Z_JDo>XfvvqsP46(j)h_gY0{khav5`& zq!E+8&b*gtv-KM5O_uHwNKec6(xVWW-gNFuTuUYg75T^euQ@IeB82j2Okq*c`hvsf zJmxI$Pfn!os$)BU3z~%YTp1nIha5w&;NVnjj2 z^MpOjL%wWKK|HWMm>FS0wC9a0_Ct)asv<8X`O`K?Y#^hag$akD(*U_^0pVj|{Zx{U zvWY0tAPc&1MLF4h~zjOdIbpWb3Dcn*V=%!c{e~HxE zYYZF_`7(`2+A2c>vE~la?4~3MHv&(|V7LIhdYg(7b4HE32)y#eU~B-p9D>3#T#C_H z&=Z{u}r5LJ|NKapAvS{WVF(ZEvP z7S{?b-5qZe9}#mr+d~hU#~hXRszaDVZA@g}=Z0<2TW9gU*%(T&66qtzXUVH5a>`(e zh|=t@JPlLb6CC>jWAyu={YGS|WUC4EzX<(et zMe|})d-YYC@i`{k&)D`yOJ0XQF>g>5$q+`6#h0wseH;-2@q?%QGYrNpQlA6NVC2g~ zUQw%H{i!}dH-494vM~o)uH*ZHongMh@cEg+ej~i(88tQaF)dalxYTJMbLZs_9fr`0 z+3#kN%o4m#_bL~w2Bac<&y&W;4@}>Q-xx+KelHHC0pV2Ol^h6WLG(8po&)Tw7iWcW zbs>To?H8zo>?Z^1ff~`~4!iuy5#Z$Cq`h}DczNswR0Era3gFFKBLBA{%u83M`Qg}G zx!dbWdqgZx*GD!=>@Zw_owq3KByE> z@oNhwIL3%R6;3$q`A*MdBi3I7&Tu$%+T zK;3iP7l^dlz0RR$-`_41LxtLM)QJOXHy{I;l^mmS=50~;+BSm<*qyew7`RIF3KP)E*Yt9$8m{Oyn@EJMZTD@(e zZA3+B{1La@CPXZ?onKG}+w2V^y~Y+FKCn{OpF^`tY+v7%wz9HmJ(kV`rtIHG45o$u zosz2@ZnC<>@EzR>@?^Y@Z6CN4%bHcz0NS`45Npx>GASxrEcsmwUAO!_I3XSTo{3bT znsPZj4j+fK(IID(u_ggo->&2T!CiS@d!>M$?7KLLGH&m9tx4~Iz%4@$oaY~pyxr`O zgU4^0|AUKXs8stDmBTt*z&w_HcL(9_D`>mwAEXpt-b2@Y`x50u0cVI~p@sZie`i=6 z%mrgo;T1F+2->w^m59th zOzq!ww$OHGuA+tO^FD@b(tLu(^Aey9&z)zAreh9yK4Z9Z&6lXcMeah~V)WGd-S@aU zoBT{y47qeUD6iYGOyD&gNwfHH3DkTr-Zqk5lOSLK-o}z1C3#7+tm|Q&zn}yAVaujn z%NFg&B9i8k`XgAQ*x89||BM#up1x&C6zFmrT#ByL3KWijT^Qf=x}HfB*3wMbL8o6^ zW8o{04SbAOgEM85Fz}+Xz%DLOq`Q)W#kT}Da8W!tvVG2yI6#a@Eb|1qyOd^X?OUmM z@L;787Ph6B)boqd+JY`JT`I)5Pcg*ur=9M_saC_5VDukpxi3yVXi4mgqa`GRkHgH) zPA^)oOQdG(QXcRyRC;1?p3<{S{6tS$#Ccq{Lk#!ysZFM$Nn39xm}{@rCJ>9B$cY}? zR6by)4-GF6x)dqW_n~sFRl+H3b@=;Eu>3W*EBOyEkEB(twWc)F`8y_vJw4T4M-pT8LdEFfR9nN|AoqX8oe?;=|s|Su>i5*RxMv z=$HPO;oi;xmW^D&E-9gXW)5ogl%4Jicx(F=lyUlJGE{1^BgsF6!r}qjXWJ+|u{$&B z0X!<4UV~lg`w#{704resiXPNOsF#E|{+&sE&p{T4GGtlwFx)^`l4cDEb9G9GQ%_2TY&9CES1dDn7CZcQ#I z!faXea>m>_(usk`>JX~%SnakQgkz2#o2|5I9lRa&E4oMHt(i1WbYCQzCYtuXiENHb z4YP8LPSJJu!z5$vo0|}GT5;<+IU(LFQs4sidWE*)KA;O z9fdQK&^3D8G6Qlg=2*B9pdT#&)$zo22j$Pxg|kC~n_N;=5> z`5bQll+)zDqLQy5fm*LZ){LG^;OWhz9g=2`2JM4~`Y4LqAkf2g$N`Uwa22Wv7syp( zN3Bk2im*W1D%pI8$PMP=XY^nvWyukT$d#gW^>i*A;r|;58o=;!PJRFFwkMG1^uo#U z=J6NvU;iSqvE<*;Pu@b=Y*Po$y%@;>;^yr(FR+~mWz&$m==4Sokl(jeFUT;fZ|K%L QpMFq4TT@pfUybDdf3s&!jsO4v diff --git a/doc/svnbook/source/images/ch02dia7.png b/doc/svnbook/source/images/ch02dia7.png deleted file mode 100644 index 28f553d5a97e8446bfd1513e150cd453e6d749bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 5495 zcwS9b2UHVX(?$@LA|k$2B?u@Wy@NogfzV690!VKnO_WeV6$!mbQFa- zkR*FMd= z;o;`y=Ire3A#zcBZ4Fb8>Q`rKNRzd<=)f zfBpKUuCD&`=g-5#LlqU3A3uI5DJkvk?Lnc?ot+(ddHJoat^4=ygCHm)BeTA~E+r+k zy1FVMA@TkDcQG-sZ{NO&h=_ds`c+6sh(I9B&(F`!&f@X-yLazSPfr5?FflQ~!ND;; zKF-e0J~}!&JUqbSy@>b85wD5X>Z@YO-V^fN=iyh zOpK3@kByCuj*gCuj0_JC4+#kg3JMAc2tc7wzP`TR-rinbUeBLDcXxMpb#;CA?Ag<& zPaPc{?d|QYt*tFBEuTDjVrFLc`0?Y14<8yD8tUuopP!%W>gt}Jo@#4r|M~Oh_wU~t z8X8AOM=%(SNF*K{94IR*@9*y`Dk|>o?kXrKY;SMN$;oYQZpzBaZftCMFaFE5LViY_fJ2@4A^E-nfR3N9=x%+1Yx`SN9EW@c(?ii?YDa&q$a?c1L}e}+IH zV`F2tZrvIg85tTH8XO!P7#Qg9@9*vHrKhLw?(XjF?4+fo#o=&mZEYW!q zjjzeb7&5hBDki>J+u7%8H&@sP#>^f)+O9YDa%EH>s_EsT{6ue>iO73PXJh!3!a=+| zZZkUj{VxZ#Hfi&QHZvAi-*JXW#t%lR!S;Vri4oUY%bTQ`(Ql{{F6due2sy{~UEkfm=@#zoCVY+)SCgjAR8F z=%R<)QcQeY&&2TV!;OP!ZpOmT9}9d^6HRNFa0&Z_frNu;WF0STH$0q2IZ!WF=sh1p zc7*!!8{h9~*f6#26#9pv-?u?#GNN~hl`1qix3nYlEC>>-96mtaOsjK335n;s%2};U z?n^VRfPQYbtZF=oTm5rnAlz6l*w9#&6%WfICpJh#;H$&t1Ga2J%BTG3Fyr;T4P-|R+2I~rahq70NJ+{8%0o0cKdV# z?czrSqK%c%smI|71Hy*Yep`TpBpC8a7;va_1bAygQpx9yvX~=jyqS&)?Kk@A@79|8Nmer-7&I0UL|ym$CpA zlq#HM|La}D&TiLU-&MY-tMQv-;@1j|awTM|&O?6>ohXbhVtDcGD)F?){S(c+Gvn2m zQ8!s^E?H+OC3tmBZdY7S6EI-O?loa|NPEeGJs78n88l?hgJUI>S+GqtUyDrg&RBL& zWG6gN!=hX!IY2SXO!9RSmocgl3&ix%XudjD%g&ZPBC0>XOW&p)?WNCUkvWR-R}VSw zy1|fOz+89X2alnGVE+UB`p9d zq0k7ist^2k3N*Sad*-?YqXVRUrP z(@(vly+CaQK8!>(siw3tA__;Ir+7_HjOz z*UtE9Bc@w0iu*@zY;EzNR$iDne4$Q4#&O}r-ed^_;kwtRtQY;CjWD7*ZLQt7-_%M{~|= z%+(XPjIYTCpBE0ai7e{=w1i_Irh$J>ZY;=%@D6BTAkV!OCZ-ln17B>_HJ8@8c5(w1 zWjrRJE9B7}5U>;-?L)zjY#g&%oDW!0eNTjvb}WrXR9_zW@YmklH#)j3X@b_r@zdi8 zg{#|ejOAe4q3ffVIQ@n0xqxz}xmPhLt9;BQL+tBXiOt+n6n9m1-Jg&_-pw*XDR4xQ z%$6pe#+$e+V_mS6f*!iVLazT9Oyv z@RheD9?+@Jk~>nZf1K(cq=Yio*N0l}{h3Y3zsFmcvwj!DF!v1fT=%685(kB~xRa99h%F8 zY}xsz_=V_Xf$-$0y98xtY;nhadLb>O?LMeBm8!mn*E70IskB_aHC&u?qxGti^86j* z>hj8-IdF@Z^}NeB#!;A9u9LiX3QGpY!cO*v6jw{F+@Oy0I`v7d@_E6VWp8!TQM|Ho z)0hrIi1KNH%9itTs;K~0Vz}W7C+NZEr^eGqb4g{>JMWQRBtCX8yh&9`qu_{ij==kXFmB;i8;huGKMs=K^kvDp9V= ze}HJ`B#W%Egh!&to}}L>fQUwBF9ENv7%{^lTa8>v0DHt(?2hI`3KTusQ^Qo*WJ@LJ zTktksEq(b$!s-05$SiZ)$R6ZeGneVy2LVpa+#314zzoVxZF_LGc3T-|)i!d;YR}kk=H9RF#g4beyJ}Hx zP^3yTn3LUXHE=&zZay#&F~i@B6;V6^ zOPS{2VkhIyn6*!#|YY-+ic z4`YOH-G#~w`-Bf0D+v+e%*BH*Ip?(cdUbBj%onBWSr~qo=p1wP?^htM!yhb)2O3%D zw3g1$F}k=R+%m>_D>?&nloH4gz6hIW)0h~@f%06KG78>F`ar%C&_9<}=c>H7e8lt#bQ zFaVw4y5a~X;R$))^llm^Scrv&UvmT}CXDGNkj`5U{h88vkkiSL*tSS^o3~I-1e}Fu z{hOR}z%MtA=^OJMeCck)njcwvaHc0@ zM*(;Hld`tN`8d)XKM1%zUwIIz7;CgeThg)K+CtrXsSKTRa3A17J9D6 zcZ?TiRkcf=(hO36W=di#5V|Aqj|V3j|9uftkA`U;c3}TMz@##SVa+*7bM~*Iwmavx z{yKDC=uVW32B=D-WqaE3pMci!GT&`YXh7HBZm^`abK@Men~O#D!{T(OWX&~SY-Xsj zU@~{J|ZDlux|cF&Ej<)o_(tH zADzAGINp#`I!j&Qzl9+jNssJ~p+!y|-6J+L{~cBTdk>0+mdTb`kc#3vVObVCRLLz} zxO2Ad@$Sr1Du3Zu>E-#{!zY8OzIH`B$Ln8o#&jxz9Yw%AbbUS7^@)r^RrD)=#3o~r zhvKJHD@)!4Hwln2xj}r&x+uup-9kS6O)J;WB3vo+OKL`&LdCrLRcc*~IA+J#?9Ub~ zdqgK`kV6ua;~FOl?;1B>wi?z2?+vA)z@8}syL-qhMxYr9Sc##i^-=o7%P~!%t?-%- zI}>MN{e7ma}0LYWpnN{TZl;yuY($uvB`x zB&T?3;dGh&#>il$=7P+37S@m>Y4yOu0jp;U(jG2|YX;8HI3xIKsgjJ3|M>Vb7lcRk zQKpB}!1kT<3O%Tg^QT|6d6_B4&f`bGf2JjSK$tYK+z~?4s)cP!ce#!La6>y}#lorn zj|z5JX}=Xi+G=I#%FY~YkPT%HdhtYG%7 zQ@1j1Rp1pLQt#hX{%~}D3du%Ag(G*~mOx%~G}z7Tthw*#Gl(OF-+TW&iD>IIXbkcw zH+DJ*FWD9GUJ>LG2-D1V_%omy6BF^EBJ&19NUZ*U4!U`vYf}i)gpmjA&Oyx468+lFIz;9qHUg4MRMp68mv=a{3DO-(OjE z%_rF=+g7k@y5`1jMoKELrzj#Lon81RZZbH%CY`}}88?4J`B0K~(@8$uNBaNuB86l`l2Oy2dZ{GsK$0KdFEjr2 z4hxi2Vl}lErYEO0`H3VQgkjU~da2N!S#sm7M%O847w5OJD1(A<`@>RgZFY4tp*w}} z2MCaF!p~%-h%jbE;`~ikF3Yva7sqogFilu)W3K+?kZD%$u8qHBVVEdB%iU1xKMcqY zIW*UdF>gl05cOz#^#3+wn7QV|NPc7+Ozs-17^}Xs}?IbhJO8qFadq^$>A~)l$ zb2NgNlM?Cvm@^*1d;6~vn@|y?FoNf=J+fBk3j)_q**Hjcj40}kt~DJ7#UtQvylDoJ zbrw!OC4fNW)2>d^CE_{7s~u0e_wmR6 PWTZz+T_0AZY90E2x5Vn5 diff --git a/doc/svnbook/source/images/ch04dia1.png b/doc/svnbook/source/images/ch04dia1.png deleted file mode 100644 index b32cdf6e7ba26d1b55e86c349ae64dd2cdef6669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 2713 zcwTjuc{J1u8^@>clQCt9%vgq~WQjqR!elg)%8cf^bt8kZG-51c-?G%CQWQmWDQyOC6`9aVPh2z8Gr=r_VLi`3C9(xtT=Y@rZ`T6-785wD5X)j;C zeERfhe0+RFL+9>QtEf?`W@ctf zOG`*3a$#X%Zf=gl;r#shb82d8Vq)UQj~@sGVr*<|baeFl_wU2Q!-Io^{r&ylzJ2@p z^{bMSQg?UvmoHyBJ3HIk+gn>(KYjYt)YSCx<419EaXOt|UteEaTU%XSU0GRKUS3{W zTDmk)rob0;pR=U}8uU;|;Ud2fpPj-KWt7nP%Ax>Hu~NVRk>OP&2Y)RTWhV=dl6II1#B= z-qmRci-o;CiHN__jV!})ZxT)nt|3FmZOWc+zISbZfrJ@J0E89A#l7QJb7@^uTGdLS z*1vTV0gwJDS4JHwaNa}a*p)VQ*(4JS-y4VIXd$+(yJwS+QAf>QbFpT}Gbw;5kuVsV z4Tj5rs|a$x+=&hV>PsI1rPj~%vPSi-ji|o+vrk@b^{UIy>=0BhYhBV@jg&svc2P&O zex*IxIZY9k0?R~U8zpCv4@w>Z8)l;kbnHc4qa)c;Fpoz-_5g*9e;Yx?IHXL&wuiv7 zN#J_{l~f#?wbSWk5d0gpyOMJCtVRz|Hd~( zActf_wXd9@>L1sz^M4+2Mv3}lAjJ5_m@zCpRnpkC1)BsTlI}Iul@z>^))|d=nGEy4 z6_OGkq@YZNlM(GIKMy`K_jS^Zw--}?o)=g0MjdrP|F5I4WgBW`LXCI4AUR)B4GvG6 zbdYxJB3c2aeVJNU2cfiT`2bv)dy0VWH0r!{F$%6}pCT{@b;Hk=NyAB;xK&;nf3Qinq9_a+ z$hnvI_Qgeh*p~{?M#^+#+Q>=~b7Gn}E51T*ch!nR5&qYcT`8BD6KDQOlmC|L1`znV z+H#_?m)F@lHlHhMkkluBzRxkcQ|eAsyBB^Uh8+D38RSszGF^*`a3GkLZ7r%n=CvB_ zH}Qb6``UH$>~{3^^pq;in@t+F$%JOCA&_?3v$i3gVoeWTG{8s?UK>ZhkS-^G6D92T zJ{oGg{uOUPYIlpAh0ms2aiV zo!T*1W6{KI1)oWKhfYY|`)&?v#d>3bWIIW^5~ zE{i=A+&TOvlE;8LrENT3F%;W9WkhL6*L-lPdEy`)75rckjCfs_Jlh;?_LWgQjYy8&3y6F`dX7J<9hPH;bv>D!|$xrW)DsGWo{=bu&t)WTR@;|P~!*h)#ES>NlGPsw49OeCr@h3QD zkcWu=PxNszUg<8m+_&%ZJAS(eUt zSEMX%sbdP&r96dn#{Fr&zpwMnt$E`Q@<8>4RhPW`@Z4cEO=ryfK4}^8HP!}9&Hl+X zJUC?H_UrEt^-rH{WyMGdx!_LUU_S{+Ac6me@`^@}TUZ$4@|~v_T$G!OYcbErSa;<< zMCvISDC2_Lvux^rWO&YVz2$8}{j0LjXcL`Ko-jfR=a=@2>4wY>JBtO{d&;(TM{YxS zn44FOE5(mSAB9Lg$m4D9^qnNO4j*s3ieTsU`ogO{Nkh4EI-P)t3YXl3}Co-3JbsiLTq5w&}iD>*na z5*c%Qxm%`XXKSq<4L1pi=YIj)a)X$6Gh-hg?4edy>&)S%Vatx}r5}2YvfE)i0+sxy zp~s?vI8Nq)RGlSIiz+PgqWBd0L$ZL3v^N=dZi1h-W*XXPc)|$O+Rv>Iva;91y9zB- zi?6P=5M35IGUtIcY39(d(X2ci&L~x>=nLI|Jn3e=pS+)_>uHY>M1_c%zctmhE1URX|b^{~7`1AU+DZNWsn z)GhMabyJu;l<5w;?amuLy6kDd^e=R&5c=Y&HgZ2qP|J&HX8jCO2AL1I0eJ0lJfS8T z1O55~!_lP?!6))8HYaL0@4iZ>C(@f)9IGv(3c$kVwjqlRwK_D$J`h>HCoOy1VEJL6 z6!JKAgvC)kKQ(SD5TdNJcD5WsY97%;2xnA)1Ie=n2S;;;;tZz+p9EeDHpvxl8}B!4 zC3+Pd8GsTTqx_J$T+^>?M!}un0>?cSt^nITqpYW_U(R7J*S@e~iQ{hUjrLL2-dwit zuW{NwI2FMOt_hjiUH00Arr0{{R3a}-Dj00004XF*Lt006O% z3;baP0006LP)t-s00027v9YhOudS`Esi~=_r>CW*rK6*xp`oFlpP!wbotc@LmzS57 zm6ef^k&lm$jg5_oiHV1Yhkt*6eSLj?Ck97>gqQ)H|Xf-=H})zGc)AmU3P#KgkF!VeD*z`(%1zP`M? zyt=x&xVX5swzjmiw6e0Yu&}VKtgNc4s;H=_rlzK(q@<#vqM)Flo}QkZoSd4Pnv#-| zkdTm!jEstkiin7af`Wp8fPj8}etdj`};^pNcs8s_xJZiL`3!V_4D)dKtMq8@$o)B zKJV}EJUl$@?d>``I_vA}>FMblovGBV@i<1jEV;o;#fE-v5S-`(Ba z+uPgO+1c0E*VWb4A|fKw)6*azAkop$9v&Xg&(F=x&CAQn$;rvb$H&FR#lyqH5D*Z- z!NI@3zrDS^ySux&xw*Hux3#skv$L})-EWrw0004EOGiWihy@);00009a7bBm000XT z000XT0n*)m`~Uy|2XskIMF-Ra3lSq6VwUS6000ewNklKDbm_vFP|{zt1T;1MwZII4t>BrBEqEsDoOB6k9#%-m3MmO0DA=@= z;F5|zar$NZ$(F1u=~>e0(f1tANt1)~Ig(pF->Y|pN?IoJR@O_23)23Zb6x5*Y{^JzkPmwKk=l$hS1Xc61Pvo7HtD<=Zz9&xI# zFVR3O99)>6O)^k^dUg5A1FvF}@t}A@l{jefs3c&|HFn7jB&z zUEZGpK|nU)KsA$aV1Y?Eu)-%BD9TRXO%RaHB^)Ry$p$KdlP^KQoYTL8NdhvCXE;GX zm!!ZHm;zH^AfQ_%p*@vYfYsXBiSPdDM?F0~pY?bp7GS9~e|YqZTRS^DAMbc(JT72$ zOv`V_yi<(_II^kdgH1q2;s7oW8+m^ilA-8n$7eI-+vQR4ZSy}9ZC30Xri_!jO zU{YY%cmu2THdH)K9#3F(Fy1zl7qB|mD1z{Vr)Fm(uk(8V37^@9nvYu88EEqvZKw-p z9otadJNuo1ms*Nk?ro@lcdJv@83>cl?F1Q+jaJAz2XI9owFkZo<2Mg1O}a(WMHKm}#lBmnE*vLl2UoJG8GinB=MX#$D& z*IF$wP^=(TMw|}B1til162E+L?-X$pR#L7cB=F|s6FZHCTOxrsZ|>bQJeyqLUM=rE zd+u^lfmP#k;{E>`*gu<0pqbj#)uH~&Ne1?AUR%NY`;rU%=X0NKJT)*IJFvL!0(__T z{BhnB2ya6T1_Wvs{YgjQv?_W7tF<$K_|9whgW6E{f`OC7vT0FYHf>D?1(r&WFO8h6 z!P-z~pujwNvDJK+?hbqe4dCZDw0wBOJ6{9=Zd>c7;J|fw8)`HFuVfE;ZZ)_L$ut2*{6aM8}SR2X} zc-?+&9}5Z0XIs{+Ikz^{dv>B5@RQbS`;m}96};U3)gkiay8u^K+cF##kUif&-`ptU z1SD!R&z>hP?ok0>T-83IbpqNxxIc8Ld2Npfc;Dv6Q@GyB^8)&)%}@jG9#ck^>uWJj zAiOq14fw#B>zl(1eK4Sp+6*;d&$%1_TkVGd{nTb+0h)o;W`YClJ5quGdyigQ8Stvj zfPrEwRz+cfdTr)vuz#p8n)MVCX!OR&vN{-8thxX}wHfCh=FKJw0b~)9IT^7Cvofw^ zke~s1iGcva)n=L@+fZA2J!NgZ|||F5;yW-iiQ zQENwVZL-{YiZzgG0$HpBi38aA2!^Z8I0B2tZ}0#L90(Y;Hq+sUHekU7DslsuMG6Gy z_WG28S!8tY1k?oL3YQ?DM^a!4Oo4Ykup6}*s=#j4X7ZemHk22z8?~AB+O2Qz{r;bG zo;@hN4Fv*HuFaH6`^wi&{NB3-rRN&}kalgx1OhrxMy`7T4?8qo!UG`9O}RE>$HxtP{qz@~biA=EZlLXBX9^^M zs?&_P_HV}rY}>VAfn>ixsht! z2eJ&#Ar=S>SDPWTZZ7Z4_n_WnGWs_4CKw~}=GWS}*8hSOWEgPXu^JHwXhjDWDuSdK zM^LEun0TQwZDKh|W^%HAjsZZIDn*!CA39J}^e(o_>zgV??N9obSk=C(e{J;PRR#7Q zbW2DeFexwvroa>!2$)l$;bH-v&cFHA&wC%?rU7|14xrU(x_us!o!Edch_H;s1Uz;e zn$1{%Pk#i@a16kM1Aej)Ik0cmUjq2(Ts=sC8ZbTJ?y=+7mXbWl_Vur;8wr_YD>*&tjP3d6`jM5$ zCOEEl0v4tfjsDluwzfUd(;T!2<=zyc>>iDjF>Tt%b?ByM}zvfc9P12`j#I4d)< zK8;!yMH%y%UTQ#cv%%yOwdTUj2e5PRkm{Jzy>HidYa|qSbMjqlw}ua(>hv(wt^j|h z2klvz^#}9_^&y=Qet~a)FOL|M})e1Mvg5@-FxCb7yb1 z+&}09blKnFkV@b=tf&aw4dEDL%;|*-7laF*0R!9jlk5ry{Ca$Rd~Mt_wSaS2*PuIc z+<+&lTK-%0&dDIaqP1=c4t!=q&u=yW83_Qi5*%0_GV<#oNS2}p?wd37-W({PT~}0r zt}hTGDKKnOAdx_As0e|<+E5--0<33j&;Yizp@IX=?HcFEYkPQLTN~;MOy~}**)Hy3 zffH?QsJ}n>V}~YG+w&@2fz?y?d>Rhec9X4Z8;ZLK0*zbsl6-#WTZ-Op;9sDunK}8@hVb?nlbzE8_X;B+#a|7|NDs-L*_`*&$kPFJ{biouIp-&LiU-dyF|n&^fHeIi?Dn zFdwtv0i2ORz`WaYn!+#nNnmD1(P$!KDh;4Wz6YrcNDKoMWrpe1x9YOJjYiZon;@V^ zQeX;9fp)Esd9uwHXumm3IruXhQ*j zv}-d4P&oxm^{Ce@;6`nRXuROCKpxV7vf5D4Y0A`UGdghDM~0wtSZUQ}N~Kv?`>D}} zg3e*3RGSGLSZ&5CH6;;9t2PrjQPpMwC#u?vo@)0xO(AMCgl|uMIS{tfoccna)7cXLOnt0(6?f-Z#?$X!jYNroTEinp!tJwLQNWIEU3Q5Zr0XavdH? z8TP&zKS1~F8FAfBk!`WdJvNUeCg^6?s!j4+`yMduO03< zEG2H>YbUg;LZ>}raRYbXII-S%W?~Y7uh%F{vJCq0J4x2qD%;y+ZRz%|qeP@;kA9EU_Hq+K=s+vGa&^N+Vrl(nnHG520 zn8~q{j8rVoR2Wravv6RD+6=ikAv#U^kj@O&XTd6*)nm#^#S&9E5DqIS#}tH*@1a002ovPDHLkV1hM<)3*Qs diff --git a/doc/svnbook/source/images/ch04dia3.png b/doc/svnbook/source/images/ch04dia3.png deleted file mode 100644 index c0fa2b98099669e9b45b5f34ec1ed68f5c0e1deb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 6537 zcwQw~1yoee{{<-#k#rG|-erlUyAi1+r9*P*ZhtG7g{Q$59l7?;NXzLRTXvb(rp|ZT;2P4cez=&NSnI^ z-{G0&GaQ_nWRe?e0vw!swl6gFmG1bOnwpOvKUP&$Ra8`zm6es2mKGNmzkmP!-Me=M z1qFF|dD+?7nVFgC>FKGdsmaO7iHV8v@$s>-v2WhIiHwX43kwSg2?+`c3JeVN_xJbn z^YiiX@$&NW@bGYRb8~TVadL8UaB#4*v$L_Wv9`9hw6rugH-Gu^rHP4&k&%(Mwzj6G z=I!mRy1M$!&CS)-)y2hyl9JNd+1cso>9c3gPEJnb)4-QCsI)!EtE-rnBU))s+4SXo(FSXh{unVFiJ8XFrM8XD^B>%VyMLQ6~Q z@87=~8XAB8{83X=yS~1@yu3U=KUY*#{Qdj)uV269<>i0={3$CddwhH>EiHX`cql0; z`ThHMadGke{e4kU(Y?JrVPWB&ogG0z!L6+=et!OqjSXI2-nF&0m6esHrKK-lzRb_h z&(6-Wva(K3Pct(!PfkuUGBS>jkB^Ry4i67wvDkrufxf=Jo}M0Za`LXOuFlTR_V)JH z*4F0c=Elax`uh6X+S&y)`rm}aMX0MN;=~XzsNMl$PgN5i92^qLe=qLTO6biUN#qOH zR3e(eBcWhpoB7fI6bA?N7OwbAKOpxoFENa2FXZ#bPZQBfoD7vq#o@hf4Q1;5W1gfZ zW@cnbLLvl&3CQ8>d4LAuoLTKUS;Fh&{6dni5)xrO{3r!(pb{nbQQu;sXM(WTk{2aw(kKk4 z>mhYpR=x6F*^t+@YVB9%17xkm#8apnwKdH;6t5D@*Hyj8<-IUM5t?%;+Z&NVSqk_S zQz_e<>$kW06jP-KPgMXY6T^bYPp*BvS7TH>a5-GS`J@Qyj1kUm&sf*hICFcqP4$B=>M_KUpB!X!EEbxnPMu7U6jO9u)3Js zn9!DtbXy4>k|+GJcr<*y_U-I`NkIMD3eGldY%gyH|iw$ha7OW5RU3 zEUAxSPBZ$CHQw$Hxj*s-pk6$Gl@u)!KO+Xe8ZC>hM%kxaK`&2Ty}o&i>mA>u2A{33 z=CO?0o@jd?rr@@F9coL1B4jPabw2-7x!V+Cdl5rq|-`fTmmT9nXa{*6hC;XFR zY@ciH8VS#WAtVYIMO=7`fB;Vfu=mEZ0IsB41o*~7+Q*x{P7jAH$N_4+w=TeD7BeJe zd~7ssUd#uKP3JH{Z_4Wq>LO6UAod`@Y0$y77O~?wN2aEDXR!dNy%_FRg8R9y}dr9 z{}U2X@v-0&JmXFLMQT~FZgbF1rPb8y2jezNo-cBp; zn-*ld(7`P{4(Q3qQE6^u^lejab0|_Uv{e6<_Uu>ET5w2_&rATC6dK#Bpaw;ad1XP? za&xF3Leq@Rp#E)j@0OPIqd{<48L4ULlj2nqIN?(g0hzCgCtsfH{*9Up$tt$}R6{-; zsRf>AY!_ORvY%Lhfg_WUS&Y7{m+4;bTwJ#)(Kfc*2FS_Lw-uJ`VgH%^nJ;WBv|;Ih z8+y}A=~MUUe4P)x^fvnK_&ZT!xZ;(+br5D~N3}ww zcQaZwap0bTN(jlygYl3rq~W~OenNW8zS9XME-Uyy<6QcpbI^gj#E`xwMXVsw{%T_W zs5S{=G1j_!nqaHy?>4)_jI3Clq&Tu&*#O+L8eSsHN zvZG||{WM`YxK5X$>rSQ{kO_G({_!9(D}%-k%l%-yGmrpbY7qs2HgMm3BWrj*foC0y z#OI>TFji$hVm2R^_g*qUTDJQ=E|Q`Ij8$t+z7Ch({@8OGHse86+c8UEIV!{A!-e6| z%phRcjZ5P=XhqV1o}{S=gNjra)u+pgT|^2HmYvqERqATzw^bzb>U z*u3J-4e=Mlmwskt5!2UYZHvlB{BW<(Kv5ac+MTw^%?^|qAIbZQepo&6ch zT?BEl4nsk&HVs|!n~_$g7I*7k;EyxEWyNaqYl?rh(UYicDwe?Z1S?am^sKu}8 zXaKMAu8@u6OC3VfK&_5bB8VJUMqV1^T~65s{%Ncl-9miwq7b~q=l~YrZqSj2)|K{E zGWQ0g*l!&soD_luSkpyQmP3f1`9~?j@ZDqsi>dxtJ+Zf)3A+O)fPF7f8u{-uTH8aP@=X=Zy$HJfb#q92Md2wkzH&cJ_`hDlUOxsq@Hf z_yvZIDbpR(eCbGZItqsS%!*%p*goB&b_WHGe-Ik10EAJt7p`qw#IngbUoL={j^7JQimT?O$bl5neAm=M8o@~)m(zNIPGMQafSGs_!y_duB++;i& z;?bV8u6ZAdT5WX+(%w_*2Cj)Ho@T5m`k*%#+h4Y3ce5h^pM~tM^r2jm)^8`Gqrf>x z+$pCJ9bQa7kURO>_o(sYy9Hz#W4_t6E9sA>T}tXx>o6PJ(|z9jjv9q#%su^93)*relKAw*AwT@LY^GeU`vWNl{H^$h)6&hVcAkokydUi?57S*%uz<{Pb7&%5AouP1QV@)@0a zXES8jeyx*A&sXl+>`1m8WR_!zKO$ABl51Q0nh997Ec4v&@MdX0Zm!z(%p{k~sW>;f zN3Fh>)WpZA(U_FAopYG3XmGcAW((P>|D^qT_Q|;MBV``1-BUCR>PjR+74w5alpY zKOxy^ZcetutloZEZT&1@1F|2q>Uo2#7T99A=aoq=3_4lCrqEdsVwT$kU3g=8OMc2t zFE#qnnr^oEIl^pr&TnFoO@YOD*!>WnJ~x{=4-*w8k}p5ZFu$zU~W*D_|EN`E&}T_gX;T{$Tv4qXXsq z1RDv}%8WAo++tpVO(;XRw~`;%kV8Mh^vCz}Ed(o+mm#+bl4JIP%-LuRoPN|`zN(@_ zf)|8Yvw`(uxw+FMMa$KO1b#r-d$^($d=ubM8vtEr(A;uC>(bfW&HRkNhI~7nu&`c zeUA`)Z1W_%n1BoP9v@{+Jpa4mmPW3{&(>MDRg3G860H*v zWm4WEPUl$8FEO5hZg*$c*fmX0_z5^N?+=*Y&))ry%&Ge6Ad{W74*~FnvZoMuRGn%N zk%(MSajAy9oWT=f#~;O!xG3&!C1)qk^KW)X3|3w~xdB(3OfUq@|D@5r zJ48bFCM87t&oAIo;vG@=^dw$5X)}K@q|L{5$8>i)KW^OiQNLva3;T0G{H|l-@+q#j zcJ!N->~}p8x3bv_NXBbuVK6(B18u%eWME736cpoLFusoqJ5sn8gCsBfT|<6vy~Quf zcrYsLE?XxHQosrFX9?|BxLXwBA}pUs-x_S|rZ05tg=4j{QX{(G>mtIJQT2FSWJH4hHrJN=v)`g)_d&&U-gh z5CShuPfz(^$GRYBQy$0|_4a%jF>D+|g-u`T7fY>D&%7HcprYjZL3Gek1EK#vRMs52 z{19un$qU+4JZZ=CG0OXh_|AQVV9^3=j~{buCDe`Gk7PAD@aXln#o^1|<=38aVOm)g zajH}Ia#;|Mrq6GTL#{&t-53zUVo4VM2V*$ynj;_tzqE%iDqSatEC4>L*@$oX1f0l^ z8qxDSv{BThoJQ!z{M6TQj1Ol*n8nhtL1T|%u5cc{eMmErgT{DStY-<6)w*F!@?&eg zx4}9m-)?Iq;n_O36EK4%E5W$Y$B>Ul;L1$>+nCtXsg%l9hHv0hL5LGEB3zx7DX(ph zLKqKT#i5Vs9U!QgvB*p-Ygh+=Cks2}bXT1vegsZkcTu*t^&^$#pH0~^WofpN4cTZZ zZ51a1b}N(!I3+rN3|+G^UfrHSl*}BeA)~*U9*3qb9NyZ`cAyEm;D!zvH}eMb>9n}; z^r5S=h^3S_UsdftTIMw^Z}`1uHPc}MZu|n>_tN%6GQE`Q%`lZmWXUNv@o)Tt7e3s7 zzIt{N8(QOtwP^&hMXq8q7MfAG>Z|v-U;e$#7a>|vW6gg0IBWB@TlF(F(B9`)FA9!p za9^!axx9e8o%qBcNLPZ%PVLqJ49-70v z@Zsx|MKM_|g*&EV-TjUAbL{gser?L~f~hlWqV%OMd18M}1%X_*1NvijW~ZPpq5FE% zbfTyOwX~ zvSkPlJ-iyT=nd@ZBq zv+#De5W(U%;al~V-$F+b3=tih)R!zdQXm%9OfNHzEmOZehptInPZF*5@@Z!=u|Fl5 zoR|k!4n^;le`R^;Hl$B%;+T9pc3tCd#LL*lCoG{M35rOMdV6gOKN)15(#qiuH;y4R zbriWX^4MM%z-mc<4^Tv~(19|^bCNlMhvO$A@aR%=Rk{qCd+=u&;772Y61SY8LC20c z$`oM-6K@ktKL$-O4A>(HVgD>$A#msJ0#7`MgLEAtk7-Tb-EF1|6R4COUL#KF8uHxj=#m7Oe+9y}`w2;z_oBNp$ff4BVGU)s zvFc+YT9d!l*TGz~D`Q1a&WU6x*E6HLPt*Wut^K)&xJ*h|G4_Ex9x9L$)%-ytYURJK7{M-PNzakAroM-GLaVRvM?ykB)ZJgKAc03t1{yhh(*aV&31PVq{(3Xmj>?Y7594)t|7YIk*{4*=fT&5v!+blq z&%gW7m!lZ8M2DR%K@t&sO%QW$AQJ6CYZAU?a4Og7I2d<>0Sgl|c@qeJzmkR&@ diff --git a/doc/svnbook/source/images/ch04dia4.png b/doc/svnbook/source/images/ch04dia4.png deleted file mode 100644 index f900bcedc9db25bffdebb122eeaef11831c5306c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 3849 zcwTi^cQD-D8YZHzAPAc%%Zd^NONuZ0>YYf4AQr1cPxO-Lk@#V;dfAAC=tNyD>SEPk z_0B30y^C_)Z|44a-glM`(cGpXAt9ktS5q<|At42>a2yrc zRYqvh@n22XZ56Z?NJz?JXwMMjSArLMT87G3d`U@3K|w)YULFR6$;ilviHV7diV6q_ z@bmL?aBwg)Gt<@8)z;R&xVShwJ3Bo+Jw84@JUrar-{0Ncm6Ma(-rkmxk=fkb{PX9} z@87>yS67#pmzS2778VvnMMdZ4=4NJQrlzJQCML$l#zsa)hKGj-2M4*hxCRCW`uh5M zdV279d}n7T4u@-NYins~p{J*BYHDh1Y^<-ZudS`Esi~=|s;a1{C@n25EG+!|`Ez=D zItqmX0N~T7Pl17f{{H^1uCC6`&K4FH=H}*ldU`rKI+vH1=jZ2t|NcEWIXOByIygAk z+uM_um*3ghk(HI*+S=OK*jQg*Ut3#SSy>?xiHnPiVq#+R^YgQ_v(wYllarI<33&WB&EB$wld`~87(7J zXhKNm{?!ZesVgZMdZ%w>oQF(SfCGt9?;OcI9iLQ@PJ1-1ve1MLv=|@;Oy_C-;Tte} zBv}*!uJpGv5xl&l_j@&|9^XyuF0=Z!INAjPaadV5FuP^rE;Go9`Pk;o;f6 za)E4cuhJQSy?N@QR=(}QFR=VS2G=7x^K^U90cW!2h#9apPRXlR3tQ})G}X&Xh{KxN zUP>mJQ1NA;Ol=j3wF>_QRa*Otk(A25mxq7tLDT^!odYK6ZYBterdx{MemM% z>wmb9=7YM}vTQGEQ-LA1rq;BJy%Lo+zJZYESJMP!5=c zM5)9+L7|ksPp;&cb8TTK4-6cq6xmA)y5vN_YFETjWe&aQokX90^g+vWm-X?cuRUlQ zP%9}lRJZA^!-tUT7(e*aV-Y0U+L7%CzyV2PFBJd6@k`034Zj<%rs0lvR{(XE7S9nK z*abs}qoveq0&Vr~K8`*1v&;sxA-wMm57^XU3wO&xYkRy)s79PT62(wi88>G_5<^3T z;uH@Clo;qlHJU!~gD;qhLA7`h`*X!Wo}xWkk^dVT*4*aIlZ}9Z1yZCJ=K${x>LrPBrBccolHLP}Why$nndN8;sro!CelLnfMpQ@1*b5i zgnVcT1etVl#AOvQ&{H!_@x_UgS|Jj|Gh4-18;jRmc*)Z4!i7bQgJRurLrbNC$fgKZ zIgj4@H!lzwyFOpA&%N2Y&KMqWl$U{&&jO#p_BZ#zoFSRs$$AFG5C-~{eFWQJSrWQ$JAC(QaP zJRT?PmCx%GiC>g(=TCL+EWiDjccR>99hL+hJd(&yN)ZY5BDTX3CoOJUD(E8!4e=&4YHlh`vY)2;bBa1s zYEcr*=J>SVgx3(iE>k2+DB(vEY# z{f)@-H7Iypy2au7%;n5B^E57LIPMXF$jCkVCkEoBJRB|Ctr3O-^&qpHq|@Dt_32oB zmT<78;K1+FaKUsZ&gkY`&jBpJ@}p*xE4Kqt$Gga!GpggIO_4M-n&D*<-VPaN`jZO8 z|EU1t-T9#L1*HNX6K_P!hwIQ3acHz{5S_}|np0ti^8j%kteLhpaL&THk@mbGE< zUlkE$pDOwxnfR(sO4%`I!YXHJMOi09wGgcNqReK@(q?Qh7#OqFlDOG7#J3`0*DO^iaDuoG;j|@u9WN`K z`Vs;qZ--N8-F-xqL$VWX>?;&A7&8gjwPY~ZCzGLjCrjTKm)mxaQk6Td?E#2xwV`jP z+(StWyUbfbCxFF81Ncp$j>1Y{e}CVT<(PO;m&cq2lC zxxcLHhx1P*f_K=XbNjTb(^2!vzbiEJx+5tzWQ6Yc$i)2;)`7lL&|ePM>pe~6&Ii=! zJD#rOytJ{Va>x*|%hoF`JhQyB@Ki+l-Ep1%^`Rg8S$S_v;tOrT$&8xT^L80&&M67p zHMhiE90zBTV4$)@0Y`_l_QRrG6nw?!*59H`q=-w27Q(PUqEFqY9bAdk`!LFJNsW+bg&0ZhD8yO z%wH{48~2J|Mss>1tcq;#N4~RKYV0!p-jxA&u1xYOln+NxSRv+qX*(_rdPzddd5c`W;+#C!xUTCw#_# z?`J2;&dksA!%LLIXt9iZ@vBQtpOp+RPFZ2(*|u4o2%!+L^4entQ#u>}9AtHAU_cte zOsd=zaSo3TH{0mfU9wG zT@5!)W|01*{QYIm1^8$Qyt_2BvDYU<0^W-E&B=waPsd?Y!BDWA|4;%D@Mdp9x>(X%hle-l4{uEG1U;FNn|dN$9}oeP zEpXn{r4rma?NLMTsNs$pK*y{$r95-b4ln4JE zS+QnGAfnb|_-^yuC6fgeNH;0{& zXd_Mdky-GJpmmb}%}idFOJaUwp|FnWln*p=Lo@OfPf0!Orq9}-8gG8R>4g6Q;YHf& z9)5H-5msEiZh7!*G7B1~&o^zth~_lHKbxf7h|0eA{FS1SDO0lTwk-74b-3W-N!3%c ztxc4-eI5m}VoK$scYzK(y4IBuDY^KamQ`OxBKp2(?C(p`9_eS3R*d3kwnZ*OgFZEI_5XJ=<+Wo2VyV_#oiU0q#SSy@+CS4~Y#{{H^_{QOBt zN&5Qw`1ttt_V)Dj^g%&E^78UOKR@vB@I5^}?(Xh8J3H*`>^V6(>gwt@H#g|$=ruJp z=H})zGc)Amrlz8zqM)Fln3$N9l$4T^l8}&)ii(Peh=_)UhJb*8e0+R*dU|$tc64-f za&mHTaByH?U|d{WT3T9ISXfq8R!~q-PEJn$|Nl%(O#S`+N=i!m`}_I%`9?-Y_xJZi zL`3!V_4D)dKtMq8@$o)BKJV}EJUl$@?d|L9>o_<#>FMblq$Hcoiszh!tzClvYq`i(IxaZLH{p_rHj?Ka?8K;@fsx1NHntwj zK$8D941=_Q6|BIkid=4NIhd&;+bxp`%NuAJDFKr$N5PKj7^MxgHJB1G2z00_(2`3V zs1(u!rUUm+X#Frb4d%9-VFrJ0N3R*>lTBm|}jyg8BKBCkaEdLqF< zUZAtkI93p=841R{cP1q^z@o+$p9nBhXk-!t(+v?f0ajVDk0>!PF?R-*fr%eV5X=r- zIoeeIZW1hf0n#~FW-H{jPBBLT9NzaoknL-ES&YhCG zShGFHFjGDkZ;o%aqfH8EVB^J!vy9jYHL246{AFr%fCg5)`~8N_C_w`{7&EIwkI<~y z{_z%yn+jGej{o@gxfO%4vO27654C6vFt=zYI~$%)CYW0^N>+y%I`WDZ6)aNG*kE4K z_LD_pr=i@UbrVHngGDGB1x&6dBi}6&MGLzXpZi9zXcRDC>hk3)+@evy{QDuZI(&Ec z&I^7w|1$FG>=dtP4Z!AzfD_+6(A%}mR|Y=VZ~Z;f7ui|324J=qaO#W-HnhL5duRQ0 z^10JeB&;ri@_s9?7b9x#3DV|*}l^wvAqjFo~dj~*O|4t5*|mOA-h zdzX$4_N^G~#Fz*ev1;7_Y2a`txz)adP>0qUh4Y6}90;W@r#RS8&H4i$NghM;G zQA)u|lk(_bn%i4;BpCwW;D%s|W~a$u$;LOIh6<)07+gzrurJ^ROTdz zH3xX}fSQ|rDhfn>Wuu}za(W~ z8CV9Efn{L#3m8uh3Fh$K1enEhHv)t3!tQ}vV<#9Qz{;Vc4_Iz8bkuR_%KYJ_O5^GE zL31Rqkx_<5XkeJ-UZjCl-OsiW?%R#QhK89M3WM2f_suX^&HePlqYOz-;LDAF9LO@c12y zo4In=R8mDuO+9@}QmF+~(+WmgwP9-&!H_26UOlh^z#`d+q`*ufbd*zEDy)HA)GSgm zV0okwk9G?s1_KjWB=*zfM8K5jF&=~UT}=WkFBC7*=+D%X0250W<>+rC0Wd=-Q3Xx< zD3Sn}Sg3?GkI2B-%D_?tCI^Od)r<7-Vt*q`MS4kN_^rib#l>RX(2C}<A9in3r8){J;tgEEEw*4y;&g|BjxLqJnw3n!~;s zR+3<>qA|dNMN1Tnk&R@{t?Jkf7gl$rrMHR3f2UABn+nLp!#3RIH$6b_zCn#7|eF`oETWO zM`B>eiy1-aR6}LlQ)zo(!5&G0nT`$>w*XpgEs6zZX_DfVi|CQ?$ZuG+@K(f;zuF^V zFjQZ>iwIWjkuaEVi6A0awa5K+5zoLfuna5%yH~*!{pVL+`yK72>vIxJ)?fPN*Vmc$ z7{MUyoEaGYcbOp)48n8MeK!}6Gwd-=c*|hN78yE51v|>JFa8xT*uo%F3ly*eZ2Mqr zYZo5ao@+dXz^-!bF@hNlM1bvVV2=%Ka#JIT+W!L#ldz(#ZAae#0000CQ%qo1FjmzS53k&%y&kByCuiHV7a zhlhWEe|>#@dwY9%d3kqtcXM-dadB~PZ*OaBYiVg|XJ=<)V`E=mUtL{YTU%RMSy@$8 zRZmY(O-)Vy{{Bl#OZ@!&Nl8ii`uh0z`1bbp^z`&WK|%8J@;^U6@bK_GJw5L3?mIg> z?Ck70IXUX;>Nhtx=;-J*H8tku<}))hU3P#KgkF z!VeD*z`(%1zP<|!3%tC%y1Kf!xVW~qwzRagva+(Uu&}JGtg5Q2sHmu*prD?fo}8SV zl$4Z^kdTg!j*5zkh=_=QfPj8}etdj+3i;IO*x>Ha0fr=jSvuH09;x zGBPsbCDW?00001 zVoOIv0Eh)0NB{r;32;bRa{vGf5&!@T5&_cPe*6Fc00(qQO+^RP0}Bx&JI9<}N&o;1 zlu1NERCt{2or`1B#vR9Hx~;5xdTZ8Y%hsi7Xn;TxUW2TLgwj$5EzP6LN|tWw;w>uM zn788cm?i?W!BXXrQV3Bv)`eLSEx1Aj{O|2fb{swKPV!5ZH+{*)LDu;``uV4me7dj2 z2rVe4`l_txQnG$vG}Qpj8O|lf%?qFw7{977bo--!{-L|G79L-!Gju*b^ZZIzEkJ%$ zcj)}1pMCR#1_!(T&;bOy5zsK$e{5*5>)d;^m-N!MgR`|@(N$My*(mF&_qH@H*mZ@r z$Qbzd_A8Cb?1n*K6yI6MG^o#R9Q5=@mxrXr#JXY7+v4$#4|i>9NT?eI9haoS&fNAF z8qtX~6uOw#)we)WL!sOAZRdx3>z~&(Lnm3wBCY(F3B8)lX73)Ue}7#oG^bdgV=45C z40=ry8Ww5i-umZtjnF_z1Hq8tA1KIa_zS4!lV#}L!%KC~>l&e1T}>*gF0;DM34$o- zNkcV5UxvPUWaY(O(xrOwnyNKDM2=Mjl~q~zprwVR1~?rhNg4XqgU?@nQ4Sk4C&FKh zVK71}W-gD}ayoHh^p)^ICsjdVbvCBL><~1V-Z5RULKhx{5L(t1Mdoys1w4E?E-C6L zsY4B|0eBV-!>eh+)D()eY?z}6p@t?Yf_5r`wkU#jDuT8sf_5r`wkU#jsut*{46>dI zDfBq^?w^0UExxAJxJ`v{LJLBd{9D9TR912-g0|}a5&B_YU*7>VCX>yMm5N0hLkYbF zQps<}%aL|RJABZcv$L~ZQj0+&&9)}=!>d;ZcJBW9uM&v_DzE=1Vb!ytgwDvad~N?h zEipMciOQL8P1+Pj=+3ULu1njOZXZ&{$H!4gC&%sjB7D$DoxRtWZr?b3_%JH({r<2+ zVH(R@S7&DX!k&)-0H~zC3Y;1YCG^~tjMO(jKaa}yelzbiKRmQY)~IX&=E96^@CP~)`JG z#ei)CQB7A|mE+Wkx>-Cl$8(fXe!M^_VAKl)B&mEQZ!s1+UG0&$>chAQ4{H9`#z9xu zYuehben*`0-zpATsiM_#+ts~IYae_32?t&M0S47nS`b>(TMt_1Q!NH9D;y81KDg8a z8dUsQK;%`UhQoLrpr@)iNv);Js{?eU=jH2dHxat3-Kp8o)$NQ;hOX|Y7)6?_2s(nM zh)LN8xKuRARnaRr+x7?TFrDkLS;qI#jB(R(7vGl~4vn#mUfew8vl$%p^oGq(Y^}-$ zR1FnqH*Ef$AJY^8+HZBum71bj12l}*Pp*3hn*{B% zx)FEHN;&qt=2?y6--glhG`W(YeO1Rm?|XFa-EPm#C7aHDL<`${thv9BUGS=ogU;ut zKfLdC1)pX*zc}_4xIRv3r0{?)6bc>R=qKkj2D(tz%vp&TY&vuYto^SAVq$tgLx}i4R%Bvz z473IRz{LC&La;rjxl20-7f5;S1G;VV+r;X0=yT`3e@((4SiPZdtbkp;_;<<=^z^>d z!x{YhOozTW-F{#K?;H1q-uK$ew-@o1OVAwt@_`B65s!DAlkwd>9U9HOzdMBO1t2tP z6WA^QXx3M~_2vECGJa<)K{NIZ7n$M$6B^C#|J!vL+uhTl&D31#@4>VTp-~ft^^;TC zc5W1Bi;sFi$B+r!K-NvPxog*L%FuuRbT78Q_J-bla2c1^2pYDDpf!LFhl0g+?iX6o zIYCqv0SzPa0+W>O(5E%nHYTsVp>KYEXa64eWI_ZD+l0_*l`%A3717x^&zrV$zt9G& z3&N9(A@ay8%PEQ-`o|BBt}GIvHx|gyx8A&mn`>&O2df(lU_crQK4@v!v}rr{4GpWS zDF|KMGh|0jpLu+r0-bfnJDV*-6DEC|&<2D437iO9WsG&(x&KJ3oG6>n0Oc5?RRmoa zlm=lLDZpQF^)Y|YtZFbC15#-|Ei(X;pr&KGZ)j2HrgZpG2||maA*#h`AAX@%SF_SH ziLu->S!QHxM#|3kf)>r37FAU<7$uEt=b~uZ&V51~sMF8@>^lJ3T%*)u`i^vt8IeZD z;?l;fG&53ouHXk6wTXHSbgdV5T*!6~fN4AT2~CjyoMsBy3#)Ny744GGUFa|$J)p@7 z2s+1XWTZqqenFB(1~Oi6i8|qG%((rqme=!LJJI(2HGBTi6`0u8ut z$Iope)hy7VUxUs5^#`ZlKXc~H>!o7R(^Tk9Jy88m<3CZC-e?lE#m!6*8TtxrR$4rC z|E%001sV3Do-kG_+*VI6%IJ8KI-Xcl8dxlnyJ|^@8WatbG zXYb<5@wW&yPtc%yO7923-Y;cn(CAwYHtkp*%6&0P&~XB^`F#kP#g%)cilcdoZ+y0- zt)=1;eo%e=&kyFWFAe30B0!tq5Sm;ucgNc|UiHkH?%wSSdzQ)CLxHB%TV7sj9CX** z3q6udQ4bNihgJ>B^D9EDhDO;r+eH)cRj9R)ye{z9H1VogilBp11Ra#tOy~X-5@>X_ zq}8BVbkCg@gO+)8;j^WnO*gZgPWqo`9z3+cJB;Ne-}sbjU##%Nsi%QMr&1)pq%%F_ zB*_61G&IG)=gw)8c{XTh%HD=~Dvf_v0*0m;k1^1;J149wVCZCw{2T_Fu#EvjQ--BM zD?+C+JzTh;Wy3j;uHe!)Owe-5?Mug6FTw;Z`kBj)6e4K<_MH$x`#&=Z547h08)m`- zUBTCJM9@_$f(}Y80&V{cg}%c}p+URtk(eV<0!=XvV*PJUqfc|7^ZB;3c$X%@v}bo!H4B;)Y?9N^7VM@$6MTncd*t+o zWmi=*pr=bZdDrdI#6Y)|R-bukE!a(fW-W81Mx6#L_v+)8)xTD}%WM;%txvjc8%tk( zu;@N%GIZPdVY};xzWSm4d(bU?n+!dD@|W-Qf8cxdd#?-+F3dF>8r@Q5qQ??y`sxoy zj(mEp>CkA#1lX}<-OWZ{ee&VakU$>-7B^d~Kp)Qy?VX?VwR)h?GGTPagnszO;h`NC zX!Ay`05>unEHtMJGP-Z<+QL-n)ZT=iocPQJ&6$^Pd9?OAIs7mXc%%WcOp4{RdF9FC z*c}-f$OdDvSjxI#1RiOTV;K08W&oF-;swTHvvNbLx&k*)WEl99P74g+rwqmXUd(`@ zOOaM$JPV;kecjOJhE`;q6}e)hV~VB<{FEj#Y}24qoEb7fW2iX|<6MH4nOJfAl6upi z4Y7FZW?|i=iGx;>YtV2HERMFDe+Lb%^MF^z1(+8}9dP`*9Tt<*DF%p~#-!knkYs?M zC&xJ@6*TlXD;OLA+_<0`f|dlF#dz$39-m4Y0y_@RyUicCB&iu3ig%Nah$;KnG#1(> zO|=Y?Gzr=w3BIpR3))4i{2)ce!XkS{dxS^@5 z2L;V>-#vAgWbTT)pjqzZU)p~7qceB~1uY0yc705<9ND1-Vbj9UkuOgW6lUl*oHnkq zLJNKS&dX#41%2)G)vH%`-uMOH+?8-aFHyB45a<_BJa-IzHbHWTI-qH93sNA^$UZX% zp+_GOG-`v!Ik@Z!>ViIm&b>lZ&I;{Afk6+_%w2<_gx=&~?vld@P4|TPFn8JXUvRWV UjvLU=`2YX_07*qoM6N<$f)T8qS^xk5 diff --git a/doc/svnbook/stylesheets/chm-import.tmpl.xsl b/doc/svnbook/stylesheets/chm-import.tmpl.xsl deleted file mode 100644 index b3c841f..0000000 --- a/doc/svnbook/stylesheets/chm-import.tmpl.xsl +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/doc/svnbook/stylesheets/chm.xsl b/doc/svnbook/stylesheets/chm.xsl deleted file mode 100644 index 8ec682e..0000000 --- a/doc/svnbook/stylesheets/chm.xsl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - 0 - 0 - 0 - 0 - - - - - - - Version Control with Subversion - - - diff --git a/doc/svnbook/stylesheets/fo-import.tmpl.xsl b/doc/svnbook/stylesheets/fo-import.tmpl.xsl deleted file mode 100644 index 3785b9c..0000000 --- a/doc/svnbook/stylesheets/fo-import.tmpl.xsl +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/doc/svnbook/stylesheets/fo.xsl b/doc/svnbook/stylesheets/fo.xsl deleted file mode 100644 index 88d3860..0000000 --- a/doc/svnbook/stylesheets/fo.xsl +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - 1 - 1 - 1 - 1 - - 1 - 0 - - - - - images/ - .png - - - - - - - - - - - sans-serif - sans - monospace - sans - - - - - blue - blue - blue - red - - - - - diff --git a/doc/svnbook/stylesheets/html-import.tmpl.xsl b/doc/svnbook/stylesheets/html-import.tmpl.xsl deleted file mode 100644 index 7243adf..0000000 --- a/doc/svnbook/stylesheets/html-import.tmpl.xsl +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/doc/svnbook/stylesheets/html.xsl b/doc/svnbook/stylesheets/html.xsl deleted file mode 100644 index 012472d..0000000 --- a/doc/svnbook/stylesheets/html.xsl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - 0 - 0 - 0 - 0 - - diff --git a/doc/svnbook/stylesheets/zh_CN/chm.xsl b/doc/svnbook/stylesheets/zh_CN/chm.xsl deleted file mode 100644 index 3b52194..0000000 --- a/doc/svnbook/stylesheets/zh_CN/chm.xsl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - Subversion 权威指南 - - - diff --git a/doc/svnbook/stylesheets/zh_CN/fo.xsl b/doc/svnbook/stylesheets/zh_CN/fo.xsl deleted file mode 100644 index c0d52fc..0000000 --- a/doc/svnbook/stylesheets/zh_CN/fo.xsl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - false - - - simsun - 12 - simhei - CourierNew - simhei - - - - - simsun - 10102 - - - - - diff --git a/doc/svnbook/stylesheets/zh_CN/html.xsl b/doc/svnbook/stylesheets/zh_CN/html.xsl deleted file mode 100644 index ccf90e7..0000000 --- a/doc/svnbook/stylesheets/zh_CN/html.xsl +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/doc/svnbook/version b/doc/svnbook/version deleted file mode 100644 index 11f34cc..0000000 --- a/doc/svnbook/version +++ /dev/null @@ -1 +0,0 @@ -Version Control with Subversion 1.5(Compiled from r2881, 2007-11-02 15:44:24 +0800) diff --git a/doc/svnbook/xml2po/xml2po-modes/docbook.py b/doc/svnbook/xml2po/xml2po-modes/docbook.py deleted file mode 100644 index 5633b65..0000000 --- a/doc/svnbook/xml2po/xml2po-modes/docbook.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2004, 2005, 2006 Danilo Segan . -# -# This file is part of xml2po. -# -# xml2po is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# xml2po is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with xml2po; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# - -# This implements special instructions for handling DocBook XML documents -# in a better way. -# -# This means: -# — better handling of nested complicated tags (i.e. definitions of -# ignored-tags and final-tags) -# — support for merging translator-credits back into DocBook articles -# — support for setting a language -# - -# We use "currentXmlMode" class name for all modes -# -- it might be better to have it named docbookXmlMode, but it will make loading harder; -# it is also not necessary until we start supporting extracting strings from more -# than one document type at the same time -# -import re -import libxml2 -import os -import md5 -import sys - -class docbookXmlMode: - """Class for special handling of DocBook document types. - - It sets lang attribute on article elements, and adds translators - to articleinfo/copyright.""" - def __init__(self): - self.lists = ['itemizedlist', 'orderedlist', 'variablelist', - 'segmentedlist', 'simplelist', 'calloutlist', 'varlistentry' ] - self.objects = [ 'figure', 'textobject', 'imageobject', 'mediaobject', - 'screenshot' ] - - def getIgnoredTags(self): - "Returns array of tags to be ignored." - return self.objects + self.lists - - def getFinalTags(self): - "Returns array of tags to be considered 'final'." - return ['para', 'formalpara', 'simpara', - 'releaseinfo', 'revnumber', 'title', - 'date', 'term', 'programlisting'] + self.objects + self.lists - - def getSpacePreserveTags(self): - "Returns array of tags in which spaces are to be preserved." - return [ - 'classsynopsisinfo', - 'computeroutput', - 'funcsynopsisinfo', - 'literallayout', - 'programlisting', - 'screen', - 'synopsis', - 'userinput' - ] - - def getTreatedAttributes(self): - "Returns array of tag attributes which content is to be translated" - return [] - - def getStringForTranslators(self): - """Returns string which will be used to credit translators.""" - return "translator-credits" - - def getCommentForTranslators(self): - """Returns a comment to be added next to string for crediting translators.""" - return """Put one translator per line, in the form of NAME , YEAR1, YEAR2.""" - - def _find_articleinfo(self, node): - if node.name == 'articleinfo' or node.name == 'bookinfo' or node.name == 'info': - return node - child = node.children - while child: - ret = self._find_articleinfo(child) - if ret: - return ret - child = child.next - return None - - def _find_lastcopyright(self, node): - if not node.children: - return None - last = node.lastChild() - tmp = last - while tmp: - if tmp.name == "copyright": - last = tmp - break - tmp = tmp.prev - return last - - def _md5_for_file(self, filename): - hash = md5.new() - input = open(filename, "rb") - read = input.read(4096) - while read: - hash.update(read) - read = input.read(4096) - input.close() - return hash.hexdigest() - - def _output_images(self, node, msg): - if node and node.type=='element' and node.name=='imagedata': - # Use .fileref to construct new message - attr = node.prop("fileref") - if attr: - dir = os.path.dirname(msg.filename) - fullpath = os.path.join(dir, attr) - if os.path.exists(fullpath): - hash = self._md5_for_file(fullpath) - else: - hash = "THIS FILE DOESN'T EXIST" - print >>sys.stderr, "Warning: image file '%s' not found." % fullpath - - msg.outputMessage("@@image: '%s'; md5=%s" % (attr, hash), node.lineNo(), - "When image changes, this message will be marked fuzzy or untranslated for you.\n"+ - "It doesn't matter what you translate it to: it's not used at all.") - elif node and node.children: - child = node.children - while child: - self._output_images(child,msg) - child = child.next - - - def preProcessXml(self, doc, msg): - """Add additional messages of interest here.""" - root = doc.getRootElement() - self._output_images(root,msg) - - def postProcessXmlTranslation(self, doc, language, translators): - """Sets a language and translators in "doc" tree. - - "translators" is a string consisted of "Name , years" pairs - of each translator, separated by newlines.""" - - root = doc.getRootElement() - # DocBook documents can be something other than article, handle that as well in the future - while root and root.name != 'article' and root.name != 'book': - root = root.next - if root and (root.name == 'article' or root.name == 'book'): - root.setProp('lang', language) - else: - return - - if translators == self.getStringForTranslators(): - return - elif translators: - # Now, lets find 'articleinfo' (it can be something else, but this goes along with 'article') - ai = self._find_articleinfo(root) - if not ai: - return - - # Now, lets do one translator at a time - lines = translators.split("\n") - for line in lines: - line = line.strip() - match = re.match(r"^([^<,]+)\s*(?:<([^>,]+)>)?,\s*(.*)$", line) - if match: - last = self._find_lastcopyright(ai) - copy = libxml2.newNode("copyright") - if last: - copy = last.addNextSibling(copy) - else: - ai.addChild(copy) - if match.group(3): - copy.newChild(None, "year", match.group(3).encode('utf-8')) - if match.group(1) and match.group(2): - holder = match.group(1)+"(%s)" % match.group(2) - elif match.group(1): - holder = match.group(1) - elif match.group(2): - holder = match.group(2) - else: - holder = "???" - copy.newChild(None, "holder", holder.encode('utf-8')) - -# Perform some tests when ran standalone -if __name__ == '__main__': - test = docbookXmlMode() - print "Ignored tags : " + repr(test.getIgnoredTags()) - print "Final tags : " + repr(test.getFinalTags()) - print "Space-preserve tags: " + repr(test.getSpacePreserveTags()) - - print "Credits from string: '%s'" % test.getStringForTranslators() - print "Explanation for credits:\n\t'%s'" % test.getCommentForTranslators() - diff --git a/doc/svnbook/xml2po/xml2po.py b/doc/svnbook/xml2po/xml2po.py deleted file mode 100644 index da230c2..0000000 --- a/doc/svnbook/xml2po/xml2po.py +++ /dev/null @@ -1,889 +0,0 @@ -#!/usr/bin/python -u -# -*- encoding: utf-8 -*- -# Copyright (c) 2004, 2005, 2006 Danilo Šegan . -# -# This file is part of xml2po. -# -# xml2po is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# xml2po is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with xml2po; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# - -# xml2po -- translate XML documents -VERSION = "1.0.5" - -# Versioning system (I use this for a long time, so lets explain it to -# those Linux-versioning-scheme addicts): -# 1.0.* are unstable, development versions -# 1.1 will be first stable release (release 1), and 1.1.* bugfix releases -# 2.0.* will be unstable-feature-development stage (milestone 1) -# 2.1.* unstable development betas (milestone 2) -# 2.2 second stable release (release 2), and 2.2.* bugfix releases -# ... -# -import sys -import libxml2 -import gettext -import os -import re - -class NoneTranslations: - def gettext(self, message): - return None - - def lgettext(self, message): - return None - - def ngettext(self, msgid1, msgid2, n): - return None - - def lngettext(self, msgid1, msgid2, n): - return None - - def ugettext(self, message): - return None - - def ungettext(self, msgid1, msgid2, n): - return None - - - -class MessageOutput: - def __init__(self, with_translations = 0): - self.messages = [] - self.comments = {} - self.linenos = {} - self.nowrap = {} - if with_translations: - self.translations = [] - self.do_translations = with_translations - self.output_msgstr = 0 # this is msgid mode for outputMessage; 1 is for msgstr mode - - def translationsFollow(self): - """Indicate that what follows are translations.""" - self.output_msgstr = 1 - - def setFilename(self, filename): - self.filename = filename - - def outputMessage(self, text, lineno = 0, comment = None, spacepreserve = 0, tag = None): - """Adds a string to the list of messages.""" - if (text.strip() != ''): - t = escapePoString(normalizeString(text, not spacepreserve)) - if self.output_msgstr: - self.translations.append(t) - return - - if self.do_translations or (not t in self.messages): - self.messages.append(t) - if spacepreserve: - self.nowrap[t] = 1 - if t in self.linenos.keys(): - self.linenos[t].append((self.filename, tag, lineno)) - else: - self.linenos[t] = [ (self.filename, tag, lineno) ] - if (not self.do_translations) and comment and not t in self.comments: - self.comments[t] = comment - else: - if t in self.linenos.keys(): - self.linenos[t].append((self.filename, tag, lineno)) - else: - self.linenos[t] = [ (self.filename, tag, lineno) ] - if comment and not t in self.comments: - self.comments[t] = comment - - def outputHeader(self, out): - from time import gmtime, strftime - out.write("""msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\\n" -"POT-Creation-Date: %s\\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" -"Last-Translator: FULL NAME \\n" -"Language-Team: LANGUAGE \\n" -"MIME-Version: 1.0\\n" -"Content-Type: text/plain; charset=UTF-8\\n" -"Content-Transfer-Encoding: 8bit\\n" - -""" % (strftime("%Y-%m-%d %H:%M +0000", gmtime()))) - - def outputAll(self, out): - self.outputHeader(out) - - for k in self.messages: - if k in self.comments: - out.write("#. %s\n" % (self.comments[k].replace("\n","\n#. "))) - references = "" - tagstr = "" - tags = [] - for reference in self.linenos[k]: - references += "%s:%d " % (reference[0], reference[2]) - if(reference[1] not in tags): - tags.append(reference[1]) - tagstr += "(" + str(reference[1]) + "), " - out.write("#.%s\n" % (tagstr[0 : len(tagstr) - 2])) - out.write("#: %s\n" % (references[0 : len(references) - 1])) - if k in self.nowrap and self.nowrap[k]: - out.write("#, no-wrap\n") - out.write("msgid \"%s\"\n" % (k)) - translation = "" - if self.do_translations: - if len(self.translations)>0: - translation = self.translations.pop(0) - if translation == k: - translation = "" - out.write("msgstr \"%s\"\n\n" % (translation)) - - -def normalizeNode(node): - #print >>sys.stderr, "<%s> (%s) [%s]" % (node.name, node.type, node.serialize('utf-8')) - if not node: - return - elif isSpacePreserveNode(node): - return - elif node.isText(): - if node.isBlankNode(): - if expand_entities or ( not (node.prev and not node.prev.isBlankNode() - and node.next and not node.next.isBlankNode()) ): - #print >>sys.stderr, "BLANK" - node.setContent('') - else: - node.setContent(re.sub('\s+',' ', node.content)) - - elif node.children and node.type == 'element': - child = node.children - while child: - normalizeNode(child) - child = child.next - -def normalizeString(text, ignorewhitespace = 1): - """Normalizes string to be used as key for gettext lookup. - - Removes all unnecessary whitespace.""" - if not ignorewhitespace: - return text - try: - # Lets add document DTD so entities are resolved - dtd = doc.intSubset() - tmp = dtd.serialize('utf-8') - tmp = tmp + '%s' % text - except: - tmp = '%s' % text - - try: - ctxt = libxml2.createDocParserCtxt(tmp) - if expand_entities: - ctxt.replaceEntities(1) - ctxt.parseDocument() - tree = ctxt.doc() - newnode = tree.getRootElement() - except: - print >> sys.stderr, """Error while normalizing string as XML:\n"%s"\n""" % (text) - return text - - normalizeNode(newnode) - - result = '' - child = newnode.children - while child: - result += child.serialize('utf-8') - child = child.next - - result = re.sub('^ ','', result) - result = re.sub(' $','', result) - - return result - -def stringForEntity(node): - """Replaces entities in the node.""" - text = node.serialize('utf-8') - try: - # Lets add document DTD so entities are resolved - dtd = node.doc.intSubset() - tmp = dtd.serialize('utf-8') + '%s' % text - next = 1 - except: - tmp = '%s' % text - next = 0 - - ctxt = libxml2.createDocParserCtxt(tmp) - if expand_entities: - ctxt.replaceEntities(1) - ctxt.parseDocument() - tree = ctxt.doc() - if next: - newnode = tree.children.next - else: - newnode = tree.children - - result = '' - child = newnode.children - while child: - result += child.serialize('utf-8') - child = child.next - - return result - - -def escapePoString(text): - return text.replace('\\','\\\\').replace('"', "\\\"").replace("\n","\\n").replace("\t","\\t") - -def unEscapePoString(text): - return text.replace('\\"', '"').replace('\\\\','\\') - -def getTranslation(text, spacepreserve = 0): - """Returns a translation via gettext for specified snippet. - - text should be a string to look for, spacepreserve set to 1 - when spaces should be preserved. - """ - #print >>sys.stderr,"getTranslation('%s')" % (text.encode('utf-8')) - text = normalizeString(text, not spacepreserve) - if (text.strip() == ''): - return text - global gt - if gt: - res = gt.ugettext(text.decode('utf-8')) - return res - - return text - -def myAttributeSerialize(node): - result = '' - if node.children: - child = node.children - while child: - if child.type=='text': - result += doc.encodeEntitiesReentrant(child.content) - elif child.type=='entity_ref': - if not expand_entities: - result += '&' + child.name + ';' - else: - result += child.content.decode('utf-8') - else: - result += myAttributeSerialize(child) - child = child.next - else: - result = node.serialize('utf-8') - return result - -def startTagForNode(node): - if not node: - return 0 - - result = node.name - params = '' - if node.properties: - for p in node.properties: - if p.type == 'attribute': - try: - nsprop = p.ns().name + ":" + p.name - except: - nsprop = p.name - params += " %s=\"%s\"" % (nsprop, myAttributeSerialize(p)) - return result+params - -def endTagForNode(node): - if not node: - return 0 - - result = node.name - return result - -def isFinalNode(node): - if automatic: - auto = autoNodeIsFinal(node) - # Check if any of the parents is also autoNodeIsFinal, - # and if it is, don't consider this node a final one - parent = node.parent - while parent and auto: - auto = not autoNodeIsFinal(parent) - parent = parent.parent - return auto - #node.type =='text' or not node.children or - if node.type == 'element' and node.name in ultimate_tags: - return 1 - elif node.children: - final_children = 1 - child = node.children - while child and final_children: - if not child.isBlankNode() and child.type != 'comment' and not isFinalNode(child): - final_children = 0 - child = child.next - if final_children: - return 1 - return 0 - -def ignoreNode(node): - if automatic: - if node.type in ('dtd', 'comment'): - return 1 - else: - return 0 - else: - if isFinalNode(node): - return 0 - if node.name in ignored_tags or node.type in ('dtd', 'comment'): - return 1 - return 0 - -def isSpacePreserveNode(node): - pres = node.getSpacePreserve() - if pres == 1: - return 1 - else: - if CurrentXmlMode and (node.name in CurrentXmlMode.getSpacePreserveTags()): - return 1 - else: - return 0 - -def getCommentForNode(node): - """Walk through previous siblings until a comment is found, or other element. - - Only whitespace is allowed between comment and current node.""" - prev = node.prev - while prev and prev.type == 'text' and prev.content.strip() == '': - prev = prev.prev - if prev and prev.type == 'comment': - return prev.content.strip() - else: - return None - -def replaceAttributeContentsWithText(node,text): - node.setContent(text) - -def replaceNodeContentsWithText(node,text): - """Replaces all subnodes of a node with contents of text treated as XML.""" - - if node.children: - starttag = startTagForNode(node) - endtag = endTagForNode(node) - - # Lets add document DTD so entities are resolved - tmp = '' - try: - dtd = doc.intSubset() - tmp = tmp + dtd.serialize('utf-8') - except libxml2.treeError: - pass - - content = '<%s>%s' % (starttag, text, endtag) - tmp = tmp + content.encode('utf-8') - - newnode = None - try: - ctxt = libxml2.createDocParserCtxt(tmp) - ctxt.replaceEntities(0) - ctxt.parseDocument() - newnode = ctxt.doc() - except: - pass - - if not newnode: - print >> sys.stderr, """Error while parsing translation as XML:\n"%s"\n""" % (text.encode('utf-8')) - return - - newelem = newnode.getRootElement() - - if newelem and newelem.children: - free = node.children - while free: - next = free.next - free.unlinkNode() - free = next - - if node: - copy = newelem.copyNodeList() - next = node.next - node.replaceNode(newelem.copyNodeList()) - node.next = next - - else: - # In practice, this happens with tags such as " " (only whitespace in between) - pass - else: - node.setContent(text) - -def autoNodeIsFinal(node): - """Returns 1 if node is text node, contains non-whitespace text nodes or entities.""" - if hasattr(node, '__autofinal__'): - return node.__autofinal__ - if node.name in ignored_tags: - node.__autofinal__ = 0 - return 0 - if node.isText() and node.content.strip()!='': - node.__autofinal__ = 1 - return 1 - final = 0 - child = node.children - while child: - if child.type in ['text'] and child.content.strip()!='': - final = 1 - break - child = child.next - - node.__autofinal__ = final - return final - - -def worthOutputting(node, noauto = 0): - """Returns 1 if node is "worth outputting", otherwise 0. - - Node is "worth outputting", if none of the parents - isFinalNode, and it contains non-blank text and entities. - """ - if noauto and hasattr(node, '__worth__'): - return node.__worth__ - elif not noauto and hasattr(node, '__autoworth__'): - return node.__autoworth__ - worth = 1 - parent = node.parent - final = isFinalNode(node) and node.name not in ignored_tags - while not final and parent: - if isFinalNode(parent): - final = 1 # reset if we've got to one final tag - if final and (parent.name not in ignored_tags) and worthOutputting(parent): - worth = 0 - break - parent = parent.parent - if not worth: - node.__worth__ = 0 - return 0 - - if noauto: - node.__worth__ = worth - return worth - else: - node.__autoworth__ = autoNodeIsFinal(node) - return node.__autoworth__ - -def processAttribute(node, attr): - if not node or not attr or not worthOutputting(node=node, noauto=1): - return - - outtxt = attr.content - if mode=='merge': - translation = getTranslation(outtxt, 0) - replaceAttributeContentsWithText(attr, translation.encode('utf-8')) - else: - msg.outputMessage(outtxt, node.lineNo(), "", 0, - node.name + ":" + attr.name) - -def processElementTag(node, replacements, restart = 0): - """Process node with node.type == 'element'.""" - if node.type == 'element': - # Translate attributes if needed - if node.properties and len(treated_attributes): - for p in node.properties: - if p.name in treated_attributes: - processAttribute(node, p) - - outtxt = '' - if restart: - myrepl = [] - else: - myrepl = replacements - - submsgs = [] - - child = node.children - while child: - if (isFinalNode(child)) or (child.type == 'element' and worthOutputting(child)): - myrepl.append(processElementTag(child, myrepl, 1)) - outtxt += '' % (len(myrepl)) - else: - if child.type == 'element': - (starttag, content, endtag, translation) = processElementTag(child, myrepl, 0) - outtxt += '<%s>%s' % (starttag, content, endtag) - else: - outtxt += doSerialize(child) - - child = child.next - - if mode == 'merge': - translation = getTranslation(outtxt, isSpacePreserveNode(node)) - else: - translation = outtxt.decode('utf-8') - - starttag = startTagForNode(node) - endtag = endTagForNode(node) - - worth = worthOutputting(node) - if not translation: - translation = outtxt.decode('utf-8') - if worth and mark_untranslated: node.setLang('C') - - if restart or worth: - i = 0 - while i < len(myrepl): - replacement = '<%s>%s' % (myrepl[i][0], myrepl[i][3], myrepl[i][2]) - i += 1 - translation = translation.replace('' % (i), replacement) - - if worth: - if mode == 'merge': - replaceNodeContentsWithText(node, translation) - else: - msg.outputMessage(outtxt, node.lineNo(), getCommentForNode(node), isSpacePreserveNode(node), tag = node.name) - - return (starttag, outtxt, endtag, translation) - else: - raise Exception("You must pass node with node.type=='element'.") - - -def isExternalGeneralParsedEntity(node): - if (node and node.type=='entity_ref'): - try: - # it would be nice if debugDumpNode could use StringIO, but it apparently cannot - tmp = file(".xml2po-entitychecking","w+") - node.debugDumpNode(tmp,0) - tmp.seek(0) - tmpstr = tmp.read() - tmp.close() - os.remove(".xml2po-entitychecking") - except: - # We fail silently, and replace all entities if we cannot - # write .xml2po-entitychecking - # !!! This is not very nice thing to do, but I don't know if - # raising an exception is any better - return 0 - if tmpstr.find('EXTERNAL_GENERAL_PARSED_ENTITY') != -1: - return 1 - else: - return 0 - else: - return 0 - -def doSerialize(node): - """Serializes a node and its children, emitting PO messages along the way. - - node is the node to serialize, first indicates whether surrounding - tags should be emitted as well. - """ - - if ignoreNode(node): - return '' - elif not node.children: - return node.serialize("utf-8") - elif node.type == 'entity_ref': - if isExternalGeneralParsedEntity(node): - return node.serialize('utf-8') - else: - return stringForEntity(node) #content #content #serialize("utf-8") - elif node.type == 'entity_decl': - return node.serialize('utf-8') #'<%s>%s' % (startTagForNode(node), node.content, node.name) - elif node.type == 'text': - return node.serialize('utf-8') - elif node.type == 'element': - repl = [] - (starttag, content, endtag, translation) = processElementTag(node, repl, 1) - return '<%s>%s' % (starttag, content, endtag) - else: - child = node.children - outtxt = '' - while child: - outtxt += doSerialize(child) - child = child.next - return outtxt - - -def read_finaltags(filelist): - if CurrentXmlMode: - return CurrentXmlMode.getFinalTags() - else: - defaults = ['para', 'title', 'releaseinfo', 'revnumber', - 'date', 'itemizedlist', 'orderedlist', - 'variablelist', 'varlistentry', 'term' ] - return defaults - -def read_ignoredtags(filelist): - if CurrentXmlMode: - return CurrentXmlMode.getIgnoredTags() - else: - defaults = ['itemizedlist', 'orderedlist', 'variablelist', - 'varlistentry' ] - return defaults - -def read_treatedattributes(filelist): - if CurrentXmlMode: - return CurrentXmlMode.getTreatedAttributes() - else: - return [] - - -def tryToUpdate(allargs, lang): - # Remove "-u" and "--update-translation" - print >>sys.stderr, "OVDI!" - command = allargs[0] - args = allargs[1:] - opts, args = getopt.getopt(args, 'avhm:ket:o:p:u:', - ['automatic-tags','version', 'help', 'keep-entities', 'extract-all-entities', 'merge', 'translation=', - 'output=', 'po-file=', 'update-translation=' ]) - for opt, arg in opts: - if opt in ('-a', '--automatic-tags'): - command += " -a" - elif opt in ('-k', '--keep-entities'): - command += " -k" - elif opt in ('-e', '--extract-all-entities'): - command += " -e" - elif opt in ('-m', '--mode'): - command += " -m %s" % arg - elif opt in ('-o', '--output'): - sys.stderr.write("Error: Option '-o' is not yet supported when updating translations directly.\n") - sys.exit(8) - elif opt in ('-v', '--version'): - print VERSION - sys.exit(0) - elif opt in ('-h', '--help'): - sys.stderr.write("Error: If you want help, please use `%s --help' without '-u' option.\n" % (allargs[0])) - sys.exit(9) - elif opt in ('-u', '--update-translation'): - pass - else: - sys.stderr.write("Error: Option `%s' is not supported with option `-u'.\n" % (opt)) - sys.exit(9) - - while args: - command += " " + args.pop() - - file = lang - - sys.stderr.write("Merging translations for %s: " % (lang)) - result = os.system("%s | msgmerge -o .tmp.%s.po %s -" % (command, lang, file)) - if result: - sys.exit(10) - else: - result = os.system("mv .tmp.%s.po %s" % (lang, file)) - if result: - sys.stderr.write("Error: cannot rename file.\n") - sys.exit(11) - else: - os.system("msgfmt -cv -o %s %s" % (NULL_STRING, file)) - sys.exit(0) - -def load_mode(modename): - #import imp - #found = imp.find_module(modename, submodes_path) - #module = imp.load_module(modename, found[0], found[1], found[2]) - try: - sys.path.append(submodes_path) - module = __import__(modename) - modeModule = '%sXmlMode' % modename - return getattr(module, modeModule) - except: - return None - -def xml_error_handler(arg, ctxt): - pass - -libxml2.registerErrorHandler(xml_error_handler, None) - - -# Main program start -if __name__ != '__main__': raise NotImplementedError - -# Parameters -submodes_path = os.path.dirname(os.path.realpath(sys.argv[0])) + "/xml2po-modes" -default_mode = 'docbook' - -filename = '' -origxml = '' -mofile = '' -gt = None -ultimate = [ ] -ignored = [ ] -filenames = [ ] -translationlanguage = '' - -mode = 'pot' # 'pot' or 'merge' -automatic = 0 -expand_entities = 1 -mark_untranslated = 0 -expand_all_entities = 0 - -output = '-' # this means to stdout - -NULL_STRING = '/dev/null' -if not os.path.exists('/dev/null'): NULL_STRING = 'NUL' - -import getopt, fileinput - -def usage (with_help = False): - print >> sys.stderr, "Usage: %s [OPTIONS] [XMLFILE]..." % (sys.argv[0]) - if (with_help): - print >> sys.stderr, """ -OPTIONS may be some of: - -a --automatic-tags Automatically decides if tags are to be considered - "final" or not - -k --keep-entities Don't expand entities - -e --expand-all-entities Expand ALL entities (including SYSTEM ones) - -m --mode=TYPE Treat tags as type TYPE (default: docbook) - -o --output=FILE Print resulting text (XML or POT) to FILE - -p --po-file=FILE Specify PO file containing translation, and merge - Overwrites temporary file .xml2po.mo. - -r --reuse=FILE Specify translated XML file with the same structure - -t --translation=FILE Specify MO file containing translation, and merge - -u --update-translation=LANG.po Updates a PO file using msgmerge program - - -l --language=LANG Set language of the translation to LANG - --mark-untranslated Set 'xml:lang="C"' on untranslated tags - - -v --version Output version of the xml2po program - - -h --help Output this message - -EXAMPLES: - To create a POTemplate book.pot from input files chapter1.xml and - chapter2.xml, run the following: - %s -o book.pot chapter1.xml chapter2.xml - - After translating book.pot into de.po, merge the translations back, - using -p option for each XML file: - %s -p de.po chapter1.xml > chapter1.de.xml - %s -p de.po chapter2.xml > chapter2.de.xml -""" % (sys.argv[0], sys.argv[0], sys.argv[0]) - sys.exit(0) - -if len(sys.argv) < 2: usage() - -args = sys.argv[1:] -try: opts, args = getopt.getopt(args, 'avhkem:t:o:p:u:r:l:', - ['automatic-tags','version', 'help', 'keep-entities', 'expand-all-entities', 'mode=', 'translation=', - 'output=', 'po-file=', 'update-translation=', 'reuse=', 'language=', 'mark-untranslated' ]) -except getopt.GetoptError: usage(True) - -for opt, arg in opts: - if opt in ('-m', '--mode'): - default_mode = arg - if opt in ('-a', '--automatic-tags'): - automatic = 1 - elif opt in ('-k', '--keep-entities'): - expand_entities = 0 - elif opt in ('--mark-untranslated',): - mark_untranslated = 1 - elif opt in ('-e', '--expand-all-entities'): - expand_all_entities = 1 - elif opt in ('-l', '--language'): - translationlanguage = arg - elif opt in ('-t', '--translation'): - mofile = arg - mode = 'merge' - if translationlanguage == '': translationlanguage = os.path.split(os.path.splitext(mofile)[0])[1] - elif opt in ('-r', '--reuse'): - origxml = arg - elif opt in ('-u', '--update-translation'): - tryToUpdate(sys.argv, arg) - elif opt in ('-p', '--po-file'): - mofile = ".xml2po.mo" - pofile = arg - if translationlanguage == '': translationlanguage = os.path.split(os.path.splitext(pofile)[0])[1] - os.system("msgfmt -o %s %s >%s" % (mofile, pofile, NULL_STRING)) and sys.exit(7) - mode = 'merge' - elif opt in ('-o', '--output'): - output = arg - elif opt in ('-v', '--version'): - print VERSION - sys.exit(0) - elif opt in ('-h', '--help'): - usage(True) - -# Treat remaining arguments as XML files -while args: - filenames.append(args.pop()) - -if len(filenames) > 1 and mode=='merge': - print >> sys.stderr, "Error: You can merge translations with only one XML file at a time." - sys.exit(2) - -try: - CurrentXmlMode = load_mode(default_mode)() -except: - CurrentXmlMode = None - print >> sys.stderr, "Warning: cannot load module '%s', using automatic detection (-a)." % (default_mode) - automatic = 1 - -if mode=='merge' and mofile=='': - print >> sys.stderr, "Error: You must specify MO file when merging translations." - sys.exit(3) - -if mofile: - try: - mfile = open(mofile, "rb") - - gt = gettext.GNUTranslations(mfile) - gt.add_fallback(NoneTranslations()) - except: - print >> sys.stderr, "Can't open MO file '%s'." % (mofile) - -ultimate_tags = read_finaltags(ultimate) -ignored_tags = read_ignoredtags(ignored) -treated_attributes = read_treatedattributes(ignored) - -# I'm not particularly happy about making any of these global, -# but I don't want to bother too much with it right now -semitrans = {} -PlaceHolder = 0 -if origxml == '': - msg = MessageOutput() -else: - filenames.append(origxml) - msg = MessageOutput(1) - -for filename in filenames: - try: - if filename == origxml: - msg.translationsFollow() - ctxt = libxml2.createFileParserCtxt(filename) - ctxt.lineNumbers(1) - if expand_all_entities: - ctxt.replaceEntities(1) - ctxt.parseDocument() - doc = ctxt.doc() - if doc.name != filename: - print >> sys.stderr, "Error: I tried to open '%s' but got '%s' -- how did that happen?" % (filename, doc.name) - sys.exit(4) - except: - print >> sys.stderr, "Error: cannot open file '%s'." % (filename) - sys.exit(1) - - msg.setFilename(filename) - if CurrentXmlMode and origxml=='': - CurrentXmlMode.preProcessXml(doc,msg) - doSerialize(doc) - -if output == '-': - out = sys.stdout -else: - try: - out = file(output, 'w') - except: - print >> sys.stderr, "Error: cannot open file %s for writing." % (output) - sys.exit(5) - -if mode != 'merge': - if CurrentXmlMode: - tcmsg = CurrentXmlMode.getStringForTranslators() - tccom = CurrentXmlMode.getCommentForTranslators() - if tcmsg: - msg.outputMessage(tcmsg, 0, tccom) - - msg.outputAll(out) -else: - if CurrentXmlMode: - tcmsg = CurrentXmlMode.getStringForTranslators() - if tcmsg: - outtxt = getTranslation(tcmsg) - else: - outtxt = '' - CurrentXmlMode.postProcessXmlTranslation(doc, translationlanguage, outtxt) - out.write(doc.serialize('utf-8', 1)) -- 2.11.4.GIT