# svn使用

TortoiseSVN

• 你是否在一个团队中工作？
• 是否发生过这样的情况: 当你在修改一个文件时，其他人也在修改这个文件？而你是否因此丢失过自己所作的修改呢？
• 是否曾经保存完一个修改，然后又想把个文件恢复到修改以前的状态？是否曾经希望能够看到一个文件以前某个时间点的状态？
• 是否曾经在项目中发现了一个 BUG，然后想调查它是什么时候产生的？

TortoiseSVN 是完全免费的！
TortoiseSVN 是免费的，你不需要为使用它而付费，可以用任何你希望的方式使用它，它开发的许可证是 GNU General Public License (GPL)。

TortoiseSVN 和 Subversion 由工作在这些项目的社区成员开发。他们来自全世界不同的国家，联合起来创造美妙的程序。
Tim Kemp
TortoiseSVN 项目的发起者
Stefan Küng
TortoiseSVN 的主要开发者
Lübbe Onken

Simon Large

Subversion 手册

Tigris 样式项目

User Actions are indicated using a bold font. Alt+A: press the Alt-Key on your keyboard and while holding it down press the A-Key as well. Right-drag: press the right mouse button and while holding it down drag the items to the new location.

TortoiseSVN 是 Subversion 版本控制系统的一个免费开源客户端，可以超越时间的管理文件和目录。文件保存在中央版本库，除了能记住文件和目录的每次修改以外，版本库非常像普通的文件服务器。你可以将文件恢复到过去的版本，并且可以通过检查历史知道数据做了哪些修改，谁做的修改。这就是为什么许多人将 Subversion 和版本控制系统看作一种“时间机器”。

TortoiseSVN 的历史

Tim 学习了 TortoiseCVS 的源代码，将其作为 TortoiseSVN 的基础，然后开始这个项目，注册了域名 tortoisesvn.org，并将源代码提交到网上。此时 Stefan Küng 正在寻找一个好的免费版本控制系统，他发现了 Subversion 和 TortoiseSVN，由于 TortoiseSVN 还不能够使用，他加入了这个项目并开始编程。很快他便重写了大多数代码，并且开始添加命令和特性，此时，最初的代码都已经不复存在了。

TortoiseSVN 的特性

TortoiseSVN 与Windows 外壳(例如资源管理器)无缝集成，你可以保持在熟悉的工具上工作，不需要在每次使用版本控制功能时切换应用程序。

Subversion 命令的简便访问

CVS 只能追踪单个文件的历史，但是 Subversion 实现了一个“虚拟”文件系统，可以追踪整个目录树的修改，文件和目录都是版本控制的，结果就是可以在客户端对文件和目录执行移动和复制命令。

Subversion 在版本库访问方面有一个抽象概念，利于人们去实现新的网络机制，Subversion 的“高级”服务器是 Apache 网络服务器的一个模块，使用 HTTP 的变种协议 WebDAV/DeltaV 通讯，这给了 Subversion 在稳定性和交互性方面很大的好处，可以直接使用服务器的特性，例如认证、授权、传输压缩和版本库浏览等等。也有一个轻型的，单独运行的 Subversion 服务器，这个服务器使用自己的协议，可以轻松的用 SSH 封装。

Subversion 使用二进制文件差异算法展现文件的区别，对于文本(人类可读)和二进制(人类不可读)文件具备一致的操作方式，两种类型的文件都压缩存放在版本库中，差异在网络上双向传递。

Subversion 没有历史负担，它由一系列良好的共享 C 库实现，具有定义良好的 API，这使 Subversion 非常容易维护，可以轻易的被其他语言和程序使用。

TortoiseSVN 可以运行在 Windows 2000 SP2，Windows XP 或更高的版本。TortoiseSVN 1.2.0 以后不再支持 Windows 98, Windows ME 和 Windows NT4，但是如果需要的话，你仍旧可以下载以前的版本。

TortoiseSVN 提供一个容易使用的安装程序。双击安装程序文件并按照提示操作。安装程序将会完成剩余的步骤。

TortoiseSVN 的界面已经翻译成了许多种语言，所以你可以下载符合你要求的语言包。你可以在我们的翻译状态页里看到语言包。如果没有你需要的，为什么不加入我们的团队并且提交你的翻译呢？-)

TortoiseSVN 包括了一个拼写检查器，可以检查你的提交日志信息，当你的项目语言不是你的本地语言时尤其有用，拼写检查器使用 OpenOffice 和 Mozilla 相同的词典。

• en_US.aff
• en_US.dic

1. 检查 tsvn:projectlanguage 设置，关于设置项目属性可以参考“项目设置”一节。
2. 如果没有设置项目语言，或者那个语言没有安装，尝试使用对应 Windows 区域信息的语言。
3. 如果精确的 Windows 区域信息不起作用，可以试一下“基础”语言，例如将 de_CH(Swiss-German) 修改为 de_DE (German)。
4. 如果以上都没有效果，则缺省语言是英语，包含在标准安装中。

Many version control systems use a lock-modify-unlock model to address this problem, which is a very simple solution. In such a system, the repository allows only one person to change a file at a time. First Harry must lock the file before he can begin making changes to it. Locking a file is a lot like borrowing a book from the library; if Harry has locked a file, then Sally cannot make any changes to it. If she tries to lock the file, the repository will deny the request. 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, his turn is over, and now Sally can take her turn by locking and editing.
• 锁定可能导致管理问题。有时候 Harry 会锁住文件然后忘了此事，这就是说 Sally 一直等待解锁来编辑这些文件，她在这里僵住了。然后 Harry 去旅行了，现在 Sally 只好去找管理员放开锁，这种情况会导致不必要的耽搁和时间浪费。
• 锁定可能导致不必要的线性化开发。如果 Harry 编辑一个文件的开始，Sally 想编辑同一个文件的结尾，这种修改不会冲突，设想修改可以正确的合并到一起，他们可以轻松的并行工作而没有太多的坏处，没有必要让他们轮流工作。
• 锁定可能导致错误的安全状态。假设 Harry 锁定和编辑一个文件 A，同时 Sally 锁定并编辑文件 B，如果 A 和 B 互相依赖，这种变化是必须同时作的，这样 A 和 B 不能正确的工作了，锁定机制对防止此类问题将无能为力—从而产生了一种处于安全状态的假相。很容易想象 Harry 和 Sally 都以为自己锁住了文件，而且从一个安全，孤立的情况开始工作，因而没有尽早发现他们不匹配的修改。

Subversion，CVS 和一些版本控制系统使用复制-修改-合并模型，在这种模型里，每一个客户读取项目版本库建立一个私有工作副本—版本库中文件和目录的本地映射。用户并行工作，修改各自的工作副本，最终，各个私有的复制合并在一起，成为最终的版本，这种系统通常可以辅助合并操作，但是最终要靠人工去确定正误。
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.

Subversion 怎么做？
Subversion 缺省使用复制-修改-合并模型，大多数情况下可以满足你的需求。然而，Subversion 1.2 后还是支持锁定，如果你有不可合并的文件，或者你只是想实行强制管理策略，Subversion 仍然会提供你需要的特性。

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).

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).

Subversion 可以通过多种方式访问－本地磁盘访问，或各种各样不同的网络协议，但一个版本库地址永远都是一个 URL，URL 方案反映了访问方法。

For the most part, Subversion's URLs use the standard syntax, allowing for server names and port numbers to be specified as part of the URL. The file:// access method is normally used for local access, although it can be used with UNC paths to a networked host. The URL therefore takes the form file://hostname/path/to/repos. For the local machine, the hostname portion of the URL is required to be either absent or localhost. For this reason, local paths normally appear with three slashes, file:///path/to/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:
file:///X:/path/to/repos

...

file:///X|/path/to/repos

...

svn commit 操作可以作为一个原子事务操作发布任意数量文件和目录的修改。在你的工作副本中，你可以改变文件内容，创建、删除、改名和复制文件和目录，然后作为一个整体提交。

calc/Makefile:4

integer.c:4

button.c:4

calc/Makefile:4

integer.c:4

button.c:5

calc/Makefile:6

integer.c:6

button.c:6

Sally 对 integer.c 的改变会出现在你的工作副本，你对 button.c 的改变还在，在这个例子里，Makefile 在 4、5、6 版本都是一样的，但是 Subversion 会把 Makefile 的版本设为 6 来表明它是最新的，所以你在工作副本顶级目录作一次干净的更新，会使所有内容对应版本库的同一修订版本。
• 工作文件的基准版本(叫做文件的工作版本)和
• 一个本地副本最后更新的时间戳。

The file has been changed both in the working directory, and in the repository. A commit of the file will fail with an out-of-date error. The file should be updated first; an 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.
• 我们介绍了中央版本库、客户工作副本和版本库中版本树队列的概念。
• 我们介绍了两个协作者如何使用使用“复制-修改-合并”模型，用 Subversion 发布和获得对方的修改。
• 我们讨论了一些 Subversion 跟踪和管理工作副本信息的方式。

You can create a repository with the FSFS backend or with the older Berkeley Database (BDB) format. The FSFS format is generally faster and easier to administer, and it works on network shares and Windows 98 without problems. The BDB format was once considered more stable simply because it has been in use for longer, but since FSFS has now been in use in the field for several years, that argument is now rather weak. Read Choosing a Data Store in the Subversion book for more information.
1. 创建一个名为SVN(例如D:\SVN\)的空文件夹，作为你的所有版本库的根。
2. 在D:\SVN\里创建另一个目录MyNewRepository。
3. 打开命令行窗口(或DOS窗口)，进入D:\SVN\目录，输入
4. svnadmin create --fs-type bdb MyNewRepository
5.

6. 打开资源管理器
7. 创建一个新的文件夹，命名为SVNRepository
8. 右键点击新创建的目录，选择TortoiseSVN → 在此创建版本库...。

TortoiseSVN 不再给你创建 BDB 版本库的选择，尽管你仍旧可以使用命令行工具创建。FSFS 版本库通常很容易维护，也让我们维护 TortoiseSVN 变得更容易，因为我们不再需要处理不同 BDB 版本之间的兼容性问题。
Future versions of TortoiseSVN will not support file:// access to BDB repositories due to these compatibility issues, although it will of course always support this repository format when accessed via a server through the svn://, http:// or https:// protocols. For this reason, we strongly recommend that any new repository which must be accessed using file:// protocol is created as FSFS.
Of course we also recommend that you don't use file:// access at all, apart from local testing purposes. Using a server is more secure and more reliable for all but single-developer use.

file:// 访问是为本机工作而准备的，只能单用户访问，特别是测试和调试。当你打算共享版本库的时候，你真的需要设置一个适当的服务器，而且它并不像你想象的那样困难。阅读“Accessing the Repository”一节获得选择指南，并配置服务器。

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

/trunk/paint

/trunk/calc

/branches/paint

/branches/calc

/tags/paint

/tags/calc

……或者按项目:
/paint/trunk

/paint/branches

/paint/tags

/calc/trunk

/calc/branches

/calc/tags

1. 在你的硬盘上创建一个空的文件夹
2. 在那个文件夹下创建你想要的顶级目录－－千万不要放任何文件进去！
3. 通过在那个文件夹右键，选择TortoiseSVN → 导入... 将这个结构导入到版本库中。这将导入临时文件夹到版本库的根目录形成一个基本的版本库布局。

C:\Temp\New\trunk

C:\Temp\New\branches

C:\Temp\New\tags

/trunk

/branches

/tags

，用一种安全的方式创建版本库的备份，备份是一个副本，--clean-logs选项并不必须，但是通过删除BDB版本库中多余的日志文件可以节省一些空间。
The svnadmin tool is installed automatically when you install the Subversion command line client. If you are installing the command line tools on a Windows PC, the best way is to download the Windows installer version. It is compressed more efficiently than the .zip version, so the download is smaller, and it takes care of setting the paths for you. You can download the latest version of the Subversion command line client from http://subversion.apache.org/getting.html.

A hook script is a program triggered by some repository event, such as the creation of a new revision or the modification of an unversioned property. Each hook is handed enough information to tell what that event is, what target(s) it's operating on, and the username of the person who triggered the event. Depending on the hook's output or return status, the hook program may continue the action, stop it, or suspend it in some way. Please refer to the chapter on Hook Scripts in the Subversion Book for full details about the hooks which are implemented.

rem Only allow log messages to be changed.

if "%4" == "svn:log" exit 0

echo Property '%4' cannot be changed >&2

exit 1

To include such a link in your own html page, you need to add code which looks something like this:
<a href="tsvn:http://project.domain.org/svn/trunk">

</a>

Of course it would look even better if you included a suitable picture. You can use the TortoiseSVN logo or you can provide your own image.
<a href="tsvn:http://project.domain.org/svn/trunk">

<img src=TortoiseCheckout.png></a>

<a href="tsvn:http://project.domain.org/svn/trunk?100">

</a>

Accessing the Repository
To use TortoiseSVN (or any other Subversion client), you need a place where your repositories are located. You can either store your repositories locally and access them using the file:// protocol or you can place them on a server and access them with the http:// or svn:// protocols. The two server protocols can also be encrypted. You use https:// or svn+ssh://, or you can use svn:// with SASL.

If you don't have a server and you work alone, or if you are just evaluating Subversion and TortoiseSVN in isolation, then local repositories are probably your best choice. Just create a repository on your own PC as described earlier in 第 3 章 版本库. You can skip the rest of this chapter and go directly to 第 4 章 日常使用指南 to find out how to start using it.

The next sections are a step-by-step guide on how you can set up such a server on a Windows machine. Of course you can also set up a server on a Linux machine, but that is beyond the scope of this guide. More detailed information on the Subversion server options, and how to choose the best architecture for your situation, can be found in the Subversion book under Server Configuration.

In most cases svnserve is easier to setup and runs faster than the Apache based server, although it doesn't have some of the advanced features. And now that SASL support is included it is easy to secure as well.
4. 可以从这里获取最新版本的 Subversion http://subversion.apache.org/getting.html。另外，也可以从 ColabNet 获取一个打包好的安装程序 http://www.collab.net/downloads/subversion 。这个安装程序将会把 svnserve 设置为 Windows 服务，并且还包含了一些你需要的工具，如果你为了安全而使用 SASL。
5. 如果你已经安装了 Subversion，svnserve 已经运行，你需要在继续之前把它停下来。
6. 运行 Subversion 安装程序，如果你在你的服务器(推荐)上运行，可以跳过第 4 步。
7. 打开资源管理器，进入Subversion的安装目录(通常是C:\Program Files\Subversion)的bin目录，找到文件svnserve.exe，intl3_svn.dll，libapr.dll，libapriconv.dll，libapriutil.dll，libdb*.dll，libeay32.dll和ssleay32.dll，复制这些文件，或所有bin目录内的文件到你的服务器目录，例如c:\svnserve。

svnserve.exe --daemon

svnserve将会在端口3690等待请求，--daemon选项告诉svnserve以守护进程方式运行，这样在手动终止之前不会退出。

svn://localhost/repos/TestRepo

svnserve.exe --daemon --root drive:\path\to\repository\root

svnserve.exe --daemon --root c:\repos

svn://localhost/TestRepo

Svnserve 可以提供任意数量的版本库服务。只要将这些版本库放到你刚才定义的根目录下即可，然后使用相对于根的URL访问它们。

To install svnserve as a native windows service, execute the following command all on one line to create a service which is automatically started when windows starts.
sc create svnserve binpath= "c:\svnserve\svnserve.exe --service

--root c:\repos" displayname= "Subversion" depend= tcpip

start= auto

If any of the paths include spaces, you have to use (escaped) quotes around the path, like this:
sc create svnserve binpath= "

\"C:\Program Files\Subversion\bin\svnserve.exe\"

--service --root c:\repos" displayname= "Subversion"

depend= tcpip start= auto

You can also add a description after creating the service. This will show up in the Windows Services Manager.
sc description svnserve "Subversion server (svnserve)"

Microsoft 现在建议服务程序使用本地服务或网络服务帐户运行，参考 The Services and Service Accounts Security Planning Guide。以本地服务帐户创建服务，需要在上面的例子里追加下面几行。
obj= "NT AUTHORITY\LocalService"

svnservice -remove

svnserve 与基本认证
The default svnserve setup provides anonymous read-only access. This means that you can use an svn:// URL to checkout and update, or use the repo-browser in TortoiseSVN to view the repository, but you won't be able to commit any changes.

[general]

anon-access = write

[general]

anon-access = none

auth-access = write

[general]

anon-access = none

auth-access = write

If you maintain multiple repositories using the same password database, the use of an authentication realm will make life easier for users, as TortoiseSVN can cache your credentials so that you only have to enter them once. More information can be found in the Subversion book, specifically in the sections Create a 'users' file and realm and Client Credentials Caching

Cyrus 简单的认证和安全层(The Cyrus Simple Authentication and Security Layer)是一个由卡耐基梅隆大学编写的开源软件。它可以为任何网络协议增加通用认证和加密的能力，并且从 Subversion 1.5 开始所有的后续版本，包括 svnserve 服务器和 TortoiseSVN 客户端知道如何使用这个库。

SASL 认证

use-sasl = true

pwcheck_method: auxprop

auxprop_plugin: sasldb

mech_list: DIGEST-MD5

sasldb_path: C:\TortoiseSVN\sasldb

saslpasswd2 -c -f C:\TortoiseSVN\sasldb -u realm username

SASL 加密

[sasl]

use-sasl = true

min-encryption = 128

max-encryption = 256

svnserve 基于路径的授权

[general]

authz-db = authz

WebDAV
The Apache based Subversion server uses the WebDAV protocol which is supported by many other programs as well. You could e.g. mount such a repository as a “Web folder” in the Windows explorer and then access it like any other folder in the file system.

9. 一旦你有了 Apache2 安装程序，你可以双击它，然后它会指导你的安装过程。请确认你输入的服务器 URL 正确(如果你的服务器没有 DNS 名称，请直接输入 IP 地址)。我建议为所有用户在 80 端口安装 Apache 服务。注意: 如果你已经有了 IIS 或其他监听 80 端口的程序，安装会失败。如果发生这种情况，直接到程序的安装目录 \Apache Group\Apache2\conf，打开 httpd.conf。编辑文件的 Listen 80 为其他可用的端口，例如 Listen 81，然后重新启动 － 这样就不会那个问题了。
10. 现在可以测试 Apache 服务器是否正确运行，将浏览器指向 http://localhost/ － 将会看到一个预先配置的网站。

1. Download the latest version of the Subversion Win32 binaries for Apache. Be sure to get the right version to integrate with your version of Apache, otherwise you will get an obscure error message when you try to restart. If you have Apache 2.2.x go to http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100.
2. 运行Subversion安装程序，并根据指导安装，如果Subversion认识到你安装了Apache，你就几乎完成了工作，如果它没有找到Apache服务器，你还有额外的步骤。
3. 使用Windwos资源管理器，来到Subversion的安装目录(通常是c:\program files\Subversion)，找到文件/httpd/mod_dav_svn.so和mod_authz_svn.so，复制这些文件到Apache的模块目录(通常是c:\program files\apache group\apache2\modules )。
4. 从 Subversion 安装目录将 /bin/libdb*.dll 和 /bin/intl3_svn.dll 复制到 Apache 的 bin 目录。
5. 使用记事本之类的文本编辑器修改Apache的配置文件(通常是 C:\Program Files\Apache Group\Apache2\conf\httpd.conf)，做出如下修改:

6. At the end of the config file add the following lines:
7. <Location /svn>
8.
9. DAV svn
10.
11. SVNListParentPath on
12.
13. SVNParentPath D:\SVN
14.
15. #SVNIndexXSLT "/svnindex.xsl"
16.
17. AuthType Basic
18.
19. AuthName "Subversion repositories"
20.
21. AuthUserFile passwd
22.
23. #AuthzSVNAccessFile svnaccessfile
24.
25. Require valid-user
26.
27. </Location>
28.
This configures Apache so that all your Subversion repositories are physically located below D:\SVN. The repositories are served to the outside world from the URL: http://MyServer/svn/ . Access is restricted to known users/passwords listed in the passwd file.
29. 为了创建 passwd 文件，再次打开命令行提示符(DOS 窗口)，进入 apache2 目录(通常是 c:\program files\apache group\apache2)，通过输入下面的命令创建文件
31.

32. 再次重启Apache服务。
33. 将浏览器指向http://MyServer/svn/MyNewRepository(MyNewRepository是你此前创建的版本库名)，如果一切正常，你会被提示输入用户名和密码，然后你会看到版本库的内容。

<Location /svn> 意思是Subversion版本库的URL是http://MyServer/svn/
DAV svn 告诉Apache是哪个模块响应那个URL的请求－此刻是Subversion模块。
SVNListParentPath on 对于 Subversion 1.3 或者更高版本，这个指示会列出所有 SVNParentPath 中的版本库。
SVNParentPath D:\SVN 告诉Subversion需要查看的版本库位于D:\SVN之下
SVNIndexXSLT "/svnindex.xsl" 使用它可以在用浏览器浏览时更好看。
AuthType Basic 激活基本认证，就是用户名/密码
AuthName "Subversion repositories" 用来说明何时弹出要求用户输入认证信息的认证对话框
AuthUserFile passwd 指定使用的认证密码文件
AuthzSVNAccessFile 位置Subversion版本库的访问控制文件的路径
Require valid-user 指定只有输入了正确的用户/密码的用户可以访问URL

• 如果你希望所有人可以读你的版本库，但是只有特定用户可以写，你可以修改下面几行
• Require valid-user

to
<LimitExcept GET PROPFIND OPTIONS REPORT>

Require valid-user

</LimitExcept>

• 使用 passwd 可以整体的控制对版本库的访问，但是如果你希望精确的控制版本库目录访问，你可以去掉下行的注释
• #AuthzSVNAccessFile svnaccessfile

，并且创建 Subversion 的访问控制文件。Apache 将会确保只有有效的用户可以访问你的 /svn 目录，然后将用户名传递给 Subversion 的 AuthzSVNAccessFile 模块，这样就可以根据 Subversion 访问控制文件内的规则实现更细粒度的访问控制。请注意路径可以是 repos:path 或简单的 path，如果你不指定特定的版本库，访问控制规则会应用到 SVNParentPath 下所有的版本库。使用的授权策略文件的格式在“路径为基础的授权”一节描述。
• 如果要使浏览器浏览仓库时更“漂亮”，请将去掉下行注释
• #SVNIndexXSLT "/svnindex.xsl"

，将文件 svnindex.xsl, svnindex.css 和 menucheckout.ico 放到你的文档根目录中(通常是 C:/Program Files/Apache Group/Apache2/htdocs)。 这个目录在 Apache 配置文件中用 DocumentRoot 指示设置。
You can get those three files directly from our source repository at http://tortoisesvn.googlecode.com/svn/trunk/contrib/svnindex. (“TortoiseSVN 是完全免费的！”一节 explains how to access the TortoiseSVN source repository).
TortoiseSVN 版本库中的 XSL 文件有个特性：如果你用浏览器浏览版本库，那么每个版本库中的目录右边会有个图标。如果你点击此图标，那么 TortoiseSVN 会为此 URL 启动检出对话框。

mod_authz_svn 模块可以根据用户名和路径实现细粒度的权限控制，它对 Apache 服务器有效，在 Subversion 1.3 以上版本的 svnserve 中也实现了基于路径的授权。

[groups]

devteam1 = john, rachel, sally

devteam2 = kate, peter, mark

docs = bob, jane, mike

training = zak

# Default access rule for ALL repositories

[/]

* = r

dangerman =

[proj1:/]

@devteam1 = rw

[proj2:/]

@devteam2 = rw

[bigproj:/]

@devteam1 = rw

@devteam2 = rw

trevor = rw

# Give the doc people write access to all the docs folders

[/trunk/doc]

@docs = rw

# Give trainees write access in the training repository only

[TrainingRepos:/]

@training = rw

• 下载此匹配你的 Apache 版本的模块，将文件mod_auth_sspi.so复制到 Apache 的 modules 目录。
• 编辑 Apache 的配置文件: 增加一行

• 为了让 Subversion 领域使用此认证类型，你需要将
• AuthType Basic

AuthType SSPI

SSPIAuth On

SSPIAuthoritative On

SSPIDomain <domaincontroller>

SSPIOmitDomain on

SSPIPerRequestAuth on

SSPIOfferBasic On

Subversion 的 AuthzSVNAccessFile 文件对用户名大小写敏感(JUser 与 juser 不同)。

Apache 的错误和访问日志是你最好的朋友，例如帮助你检测传递给 Subversion 的 AuthzSVNAccessFile 模块的用户名，你或许需要试验 svnaccessfile 中用户字符串的精确格式(例如 DOMAIN\user 还是 DOMAIN//user)来使一切工作正常。

• To enable both Windows domain and passwd file authentication, add the following entries within the <Location> block of your Apache config file:
• AuthBasicAuthoritative Off

• SSPIAuthoritative Off

Here is an example of the full Apache configuration for combined Windows domain and passwd file authentication:
<Location /svn>

DAV svn

SVNListParentPath on

SVNParentPath D:\SVN

AuthName "Subversion repositories"

AuthzSVNAccessFile svnaccessfile.txt

AuthType SSPI

SSPIAuth On

SSPIAuthoritative Off

SSPIDomain <domaincontroller>

SSPIOfferBasic On

AuthType Basic

AuthBasicAuthoritative Off

AuthUserFile passwd

Require valid-user

</Location>

55. 在 apache 配置文件中，取消这些行的注释:
57.

#Include conf/extra/httpd-ssl.conf

SSLMutex "file:C:/Program Files/Apache Software Foundation/\

Apache2.2/logs/ssl_mutex"

SSLMutex default

58. Next you need to create an SSL certificate. To do that open a command prompt (DOS-Box) and change to the Apache folder (e.g. C:\program files\apache group\apache2) and type the following command:
59. bin\openssl req -config conf\openssl.cnf -new -out my-server.csr
60.
You will be asked for a passphrase. Please don't use simple words but whole sentences, e.g. a part of a poem. The longer the phrase the better. Also you have to enter the URL of your server. All other questions are optional but we recommend you fill those in too.
Normally the privkey.pem file is created automatically, but if it isn't you need to type this command to generate it:
bin\openssl genrsa -out conf\privkey.pem 2048

Next type the commands
bin\openssl rsa -in conf\privkey.pem -out conf\server.key

and (on one line)
bin\openssl req -new -key conf\server.key -out conf\server.csr \

-config conf\openssl.cnf

and then (on one line)
bin\openssl x509 -in conf\server.csr -out conf\server.crt

-req -signkey conf\server.key -days 4000

This will create a certificate which will expire in 4000 days. And finally enter (on one line):
bin\openssl x509 -in conf\server.cert -out conf\server.der.crt

-outform DER

These commands created some files in the Apache conf folder (server.der.crt, server.csr, server.key, .rnd, privkey.pem, server.cert).
61. 重启 apache 服务。
62. 将你的浏览器指向https://servername/svn/project ...

SSL 和 Internet Explorer

• 在 Apache 的配置文件定义一个单独的 <Location /path> 指示，增加 SSPIBasicPreferred On。这将使 IE 能够认证，但是其他浏览器和 Subversion 不能对这个领域认证。
• 也提供未加密(没有SSL)认证的浏览，奇怪的IE在没有使用SSL的认证时没有任何问题。
• 在 SSL 的“标准”配置中，通常在 apache 的虚拟 SSL 主机内有下面的内容:
• SetEnvIf User-Agent ".*MSIE.*" \

• nokeepalive ssl-unclean-shutdown \

An example <Location> block would look like this:
<Location /svn>

DAV svn

SVNParentPath D:\SVN

SSLRequireSSL

AuthType Basic

AuthName "Subversion repositories"

AuthUserFile passwd

#AuthzSVNAccessFile svnaccessfile

Require valid-user

</Location>

SSLRequire %{SSL_CLIENT_VERIFY} eq "SUCCESS"

SSLVerifyClient Optional

### 公共访问虚拟主机

### (不需要客户端证书)

<VirtualHost 127.0.0.1:443>

<Directory "pathtopublicfileroot">

</Directory>

</VirtualHost>

### SUBVERSION 虚拟主机

### (需要客户端证书)

<VirtualHost 127.0.0.1:443>

<Directory "subversion host root path">

SSLRequire %{SSL_CLIENT_VERIFY} eq "SUCCESS"

</Directory>

<Location /svn>

DAV svn

SVNParentPath /pathtorepository

</Location>

</VirtualHost>

TortoiseSVN 最明显的特性之一就是图标重载，重载的图标显示在你的工作副本文件上。你一眼就可以看到文件被修改过了。参考 “图标重载”一节 查阅不同的重载图标含义。

F1

F5

Ctrl-A

Ctrl-C
... 复制选中的文本。

• svn.simple 里包含了基本认证方式所需要的认证信息(用户名/密码)。
• svn.ssl.server 里包含了SSL服务器证书。

@echo off

rmdir /s /q "%APPDATA%\Subversion\auth"

• 不能选择包括哪些文件或文件夹，除非使用全局忽略设置。
• 导入的文件夹不能变成工作副本。你必须通过签出操作从服务器拿回文件。
• 很容易导入到版本库中错误的文件夹层次。

16. 删除所有构建工程不需要的文件(临时文件，编译器产生的文件，例如 *.obj，生成的二进制文件，...)
17. 组织目录和子目录内的文件。尽管以后可以改名/删除文件，我们还是建议你在导入之前使你的项目结构组织良好！

C:\Projects\Widget\source

C:\Projects\Widget\doc

C:\Projects\Widget\images

18. 使用版本库浏览器直接在版本库中创建项目文件夹。
19. 在你要导入的文件夹检出新目录。你会得到一个本地目录为空的警告。现在你有一个版本控制的顶级目录，含有未版本控制的内容。
20. 在此受版本控制的文件夹上使用TortoiseSVN → 增加...增加部分或全部内容。你可以增加或删除文件，在文件夹上设置svn:ignore属性，或者你需要的其它修改。
21. 提交顶级目录，你有一个新的版本树，一份从你已有目录创建的本地工作副本。

In the repository browser, Right click on the checked out folder, then use TortoiseSVN → Repo-Browser to bring up the repository browser. Find the sub-folder you would like to add to your working copy, then use Context menu → Update item to revision... That menu will only be visible if the selected item does not exist yet in your working copy, but the parent item does exist.

This feature is very useful when you only want to checkout parts of a large tree, but you want the convenience of updating a single working copy. Suppose you have a large tree which has sub-folders Project01 to Project99, and you only want to checkout Project03, Project25 and Project76/SubProj. Use these steps:
1. 检出父文件夹时检出深度使用“仅此项”。现在，你获得一个空的顶级文件夹。
2. Select the new folder and use TortoiseSVN → Repo browser to display the repository content.
3. 右键单击 Project03 然后选择右键菜单 → 更新项目至版本...。保持默认设置并单击 确定。现在这个文件夹就位于你的工作副本中了。

4. 定位至 Project76/SubProj 并且进行相同的操作。这次需要注意，Project76 文件夹中除了新增的 SubProj 没有其它内容。Subversion 创建了相关的文件夹并没有拿出其全部内容。

1.5 版之前的服务器不支持设置工作副本深度的请求，所以它们不能有效的处理请求。不过该命令仍然可以工作，但是旧版的服务器会发送全部数据，由客户端过滤掉不需要的内容，这意味着会产生很多的网络数据流量。如果可能，应该升级服务器到 1.5 版

If Omit externals is checked, or if you wish to increase the depth value, you will have to perform updates to your working copy using TortoiseSVN → Update to Revision... instead of TortoiseSVN → Update. The standard update will include all externals and keep the existing depth.

• 将文件(或是通配符扩展)加入到设置页的排除列表中。这对每个工作副本都起作用。
• 使用TortoiseSVN → 加入忽略列表，将文件加入svn:ignore列表。 这只对你设置了svn:ignore属性的路径有效。使用SVN属性对话框，你可以改变一个目录的svn:ignore属性。

You can select or deselect items by clicking on the checkbox to the left of the item. For directories you can use Shift-select to make the action recursive.

TortoiseSVN包含了一个拼写检查器帮助你正确地书写日志信息。对任何错误拼写的词都高亮显示。使用右键菜单可以获得修改建议。当然它不会知道所有的技术术语，所以有时一些拼写正确的词会被当作错误。但不用担心，你可以使用右键菜单将它们加入你的个人字典中。
The log message window also includes a filename and function auto-completion facility. This uses regular expressions to extract class and function names from the (text) files you are committing, as well as the filenames themselves. If a word you are typing matches anything in the list (after you have typed at least 3 characters, or pressed Ctrl+Space), a drop-down appears allowing you to select the full name. The regular expressions supplied with TortoiseSVN are held in the TortoiseSVN installation bin folder. You can also define your own regexes and store them in %APPDATA%\TortoiseSVN\autolist.txt. Of course your private autolist will not be overwritten when you update your installation of TortoiseSVN. If you are unfamiliar with regular expressions, take a look at the introduction at http://en.wikipedia.org/wiki/Regular_expression, and the online documentation and tutorial at http://www.regular-expressions.info/.

If you want to include the checked paths in your log message, you can use the command Context Menu → Paste filename list in the edit control.

If you have activated the bug tracking system, you can set one or more Issues in the Bug-ID / Issue-Nr: text box. Multiple issues should be comma separated. Alternatively, if you are using regex-based bug tracking support, just add your issue references as part of the log message. Learn more in “与 BUG 跟踪系统/问题跟踪集成”一节.

Periodically, you should ensure that changes done by others get incorporated in your local working copy. The process of getting changes from the server to your local copy is known as updating. Updating may be done on single files, a set of selected files, or recursively on entire directory hierarchies. To update, select the files and/or directories you want, right click and select TortoiseSVN → Update in the explorer context menu. A window will pop up displaying the progress of the update as it runs. Changes done by others will be merged into your files, keeping any changes you may have done to the same files. The repository is not affected by an update.

If you get any conflicts during an update (this can happen if others changed the same lines in the same file as you did and those changes don't match) then the dialog shows those conflicts in red. You can double click on these lines to start the external merge tool to resolve the conflicts.
When the update is complete, the progress dialog shows a summary of the number of items updated, added, removed, conflicted, etc. below the file list. This summary information can be copied to the clipboard using Ctrl+C.
The standard Update command has no options and just updates your working copy to the HEAD revision of the repository, which is the most common use case. If you want more control over the update process, you should use TortoiseSVN → Update to Revision... instead. This allows you to update your working copy to a specific revision, not only to the most recent one. Suppose your working copy is at revision 100, but you want it to reflect the state which it had in revision 50 - then simply update to revision 50. In the same dialog you can also choose the depth at which to update the current folder. The terms used are described in “检出深度”一节. The default depth is Working copy, which preserves the existing depth setting. You can also choose whether to ignore any external projects in the update (i.e. projects referenced using svn:externals).

If you update a file or folder to a specific revision, you should not make changes to those files. You will get “out of date” error messages when you try to commit them! If you want to undo changes to a file and start afresh from an earlier revision, you can rollback to a previous revision from the revision log dialog. Take a look at “Roll back (Undo) revisions in the repository”一节 for further instructions, and alternative methods.
Update to Revision can occasionally be useful to see what your project looked like at some earlier point in its history. But in general, updating individual files to an earlier revision is not a good idea as it leaves your working copy in an inconsistent state. If the file you are updating has changed name, you may even find that the file just disappears from your working copy because no file of that name existed in the earlier revision. You should also note that the item will show a normal green overlay, so it is indistinguishable from files which are up-to-date.
If you simply want a local copy of an old version of a file it is better to use the Context Menu → Save revision to... command from the log dialog for that file.

<<<<<<< 文件名

=======

>>>>>>> 版本

TortoiseSVN 能够协助找到合并更改的正确位置，但是需要作一些额外的工作来整理冲突。请牢记: 当进行一次更新操作后，工作副本的基础文件将会包括每一个项目在执行更新操作时版本库中的版本。如果你在进行更新后再撤销更改，工作副本将返回到版本库的状态，而不是你开始进行更改前的状态。

3. 开发人员 A 修改 Foo.c 并将其提交至版本库中
4. 开发人员 B 同时在他的工作副本中将文件 Foo.c 改名为 Bar.c，或者仅仅是删除了 Foo.c 或它的父文件夹。

• 在工作副本中，Foo.c 被删除了，但是被标记为树冲突。
• 如果冲突是由于更改文件名引起的而不是删除文件引起的，那么 Bar.c 被标记为添加，但是其中却不包括开发人员 A 修改的内容。

7. 开发人员 A 将文件 Foo.c 改名为 Bar.c 并将其提交至版本库中。
8. 开发人员 B 在他的工作副本中修改文件 Foo.c。

9. 开发人员 A 将父文件夹 FooFolder 改名为 BarFolder 并将其提交至版本库中。
10. 开发人员 B 在他的工作副本中修改文件 Foo.c。

• Bar.c 被当作一个正常文件添加到工作副本中。
• Foo.c 被标记为添加(包括其历史记录)并且产生树冲突。

• BarFolder 被当作一个正常文件夹添加到工作副本中。
• FooFolder 被标记为添加(包括其历史记录)并且产生树冲突。
Foo.c 被标记为已修改。

15. 开发人员 A 将文件 Foo.c 改名为 Bar.c 并将其提交至版本库中。
16. 开发人员 B 将文件 Foo.c 改名为 Bix.c

• Bix.c 被标记为添加(包括其历史记录)。
• Bar.c 被添加到工作副本中，其状态为‘正常’。
• Foo.c 被标记为删除并且产生一个树冲突。

Windows 资源管理器中的附加列在 Vista 系统中不可用，因为微软决定除了特定的文件类型外，不再允许为所有类型的文件显示这样的列。

If you click on the Check Repository then you can also look for changes in the repository. That way you can check before an update if there's a possible conflict. You can also update selected files from the repository without updating the whole folder. By default, the Check Repository button only fetches the remote status with the checkout depth of the working copy. If you want to see all files and folders in the repository, even those you have not checked out, then you have to hold down the Shift key when you click on the Check Repository button.

You can also revert changes in individual files. If you have deleted a file accidentally, it will show up as Missing and you can use Revert to recover it.

At the bottom of the dialog you can see a summary of the range of repository revisions in use in your working copy. These are the commit revisions, not the update revisions; they represent the range of revisions where these files were last committed, not the revisions to which they have been updated. Note that the revision range shown applies only to the items displayed, not to the entire working copy. If you want to see that information for the whole working copy you must check the Show unmodified files checkbox.

TortoiseSVN 中的修改列表依赖一个不存在于 Windows 2000 的外壳特性，所以它只能用于 Windows XP 或更新的系统。抱歉，但是现在 Windows 2000 真的很古老了，请不要抱怨。

TortoiseSVN 保留了一个它自己使用的修改列表名称--ignore-on-commit。这个列表用于标记某些版本控制的文件，它们在本地被修改你却不打算提交他们。这个特性在 “从提交列表中排除项目”一节 中有描述。

Changelists are purely a local client feature. Creating and removing changelists will not affect the repository, nor anyone else's working copy. They are simply a convenient way for you to organise your files.

• 最上方的面板显示了版本的列表。这其中包含了日期和时间，以及提交的用户和日志信息开头的部分内容。

• 中间的面板显示了被选中的版本的完整的日志信息。
• 最下面的面板显示了被选中版本中都对哪里文件和文件夹进行了修改。

• 从右键菜单的TortoiseSVN子菜单中调用
• 从属性页中调用
• 在更新结束后，从进度对话框中调用。在这里，日志对话框只显示你上一次更新以来的版本变化。

Compare with previous revision

Subversion 使用版本号表达两个意思。版本号通常意味着版本库在那个时间的状态，也用来表达那个版本创建的结果集，例如 “r1234 所做” 意味着 r1234 版本提交的改变实现了特性 X。为了能更清晰的知道使用了哪个语义，我们使用两个不同的术语。

• 对于一个大的库，可能存在几百上千个改动，全部得到它们可能要花上很久的时间。通常你只关心最近的修改。默认情况下，日志消息限制只获取100条，但你可以在TortoiseSVN → 设置中修改这个值 (“TSVN对话框设置一”一节)，
• 当复制/重命名时停止复选框被选中时， 如果选中的文件或文件夹是从版本库中的其他地方复制而来的，显示日志将停止在该点。这对于查看分支(或标记)时很有用，因为它会停在分支的根节点上，可以快速查看该分支的修改。

When you show the log for a folder the revision highlighted is the highest revision found anywhere within that folder, which requires a crawl of the working copy. This can be a slow operation for large working copies, and the log messages are not displayed until the crawl completes. If you want to disable or limit this feature you need to set a registry key HKCU\Software\TortoiseSVN\RecursiveLogRev as described in “注册表设置”一节.

Subversion 1.5 及以后的版本使用属性保留合并记录。关于已合并的修改，我们可以获得更详细的历史。例如，你在分支中开发了一个新特性并且将此分支合并到主干，此特性开发将会以一次合并提交的形式显示在主干的日志中，即使在分支开发中可能有 1000 次提交。

Subversion允许你在任何时候修改日志消息和作者。但这种改变不可还原(不在版本控制之下)，正因如此，这些功能默认是不可用的，如果要开启它，必须设置一个pre-revprop-change钩子。具体如何做，请参考《使用 Subversion 进行版本管理》的相关章节钩子脚本。在Windows机器上实现钩子的注意事项请阅读“服务器端钩子脚本”一节。

WC文件/文件夹与URL之间的比较差异

TortoiseSVN 自带的内置工具不支持查看多级目录之间的差异，但你可以使用支持该功能的外置工具来替代。在 “其他的比较/合并工具”一节 介绍了一些我们使用过的工具。

TortoiseSVN → 比较差异 会启动 TortoiseIDiff 显示常用格式的图像差异。一般情况下是左右对称地显示两个图像，但你也可以通过视图菜单或者工具栏切换为上下显示的模式，或者如果你愿意，也可以重叠显示图像。

WinMerge
WinMergeWinMerge也是一款很好的能处理目录的开源软件。
Perforce Merge
Perforce 是一款商业 RCS，但是你也可以免费下载到。可以从Perforce获得更多信息。
KDiff3
KDiff3也是一款能处理目录的免费比较工具。你可以从here下载。
ExamDiff
ExamDiff Standard是免费软件。它能处理文件但不能处理目录。ExamDiff Pro是共享软件，拥有一系列的功能包括目录比较和编辑的能力。对于以上体验，3.2及以上版本能处理二进制。你可以从PrestoSoft下载它们。
Beyond Compare

Araxis Merge
Araxis Merge是一款能对文件和文件夹进行比较和合并的商业软件。在合并时它进行三路比较，而且在你修改函数的顺序时可以进行异步链接。可以从这里下载 Araxis。
SciTE

“外部程序设置”一节这里可以了解到怎样起用TortoiseSVN来使用这些工具。

28. 选择你要添加的文件
29. 用鼠标右键拖拽它们到工作副本的新位置
30. 松开鼠标右键
31. 选择右键菜单 → SVN 增加文件到工作副本。这些文件会被复制到工作副本，加入版本控制。

Subversion 的忽略模式使用了文件匹配，一种原先在Unix系统中使用meta字符作为通配符的技术。下面的字符有着特殊的意思:
*

?

[...]

TortoiseSVN 提供了使用扩展上下文菜单 → 删除未版本控制的项目...来清理工作副本。你可以在目录上右键操作时，保持 Shift按下，就可以看到这个上下文菜单。它会出现一个对话框，列出工作副本中的所有未版本控制的文件。你可以选择或取消删除的项目。

Revert仅能撤消你本地的变更。他不能撤消已经提交的的变更。如果你想撤消所有的包括已经提交到一个特定版本的变更，请阅读 “版本日志对话框”一节 获得更多信息。

Subversion的一些早期发布中存在一个bug，当你使用使用提交时戳选项检出的时候会造成时戳混乱。使用清理命令可以修正工作副本中的这些问题。

svn:keywords

Subversion 支持类似 CVS 的关键字扩展，用来在文件中嵌入文件名称和版本信息。当前支持的关键字有：
$Date$

$Revision$

$Author$

$HeadURL$

$Id$

TortoiseSVN可以处理文件的二进制属性。使用保存...到文件读取二进制属性值。使用十六进制编辑器或其它适当的工具创建文件，然后用从文件加载...设置二进制值为此文件的内容。

Subversion 属性是受版本控制的。在你改变或增加属性后必须提交。

TortoiseSVN 项目属性

TortoiseSVN 有自己专用的几个属性，它们都有tsvn:前缀。
• tsvn:logminsize设置提交日志的最小长度。如果你输入的日志短于预设值，提交会被禁止。这个属性对于提醒你为每次提交提供一个适当的描述信息非常有用。如果不设置这个属性，或者设置为0，那么就允许空提交信息。
tsvn:lockmsgminsize设置锁定日志的最小长度。如果你输入的日志短于预设值，加锁会被禁止。这个属性对于提醒你为每次加锁提供一个适当的描述信息非常有用。如果不设置这个属性，或者设置为0，那么就允许空加锁信息。
• tsvn:logwidthmarker用在要求日志信息被格式化为在最大宽度(典型是80字符)处换行非常有用。设置此属性为大于0的值会在日志消息对话框中做两件事: 放置一个标记指示最大宽度，和禁止自动换行，于是你可以看到输入的信息是否太长。注意: 这个特性仅在你选择的消息使用固定宽度字体时才能正确工作。
• tsvn:logtemplate在需要定义日志消息格式化规则的工程中使用。在你开始提交时，这个属性的多行消息会被插入日志消息编辑框。你可以编辑它以便包含需要的信息。注意: 如果你使用了tsvn:logminsize属性，请确认这个长度大于模版的长度，不然就会失去其保护作用。
• Subversion 允许你设置 “自动属性(autoprops)”，它基于文件扩展名，对新增文件或导入的文件生效。这依赖于每个客户端在 Subversion 配置文件中设置适当的自动属性。tsvn:autoprops 可以对文件夹设置，当新增文件或导入文件时，它会与用户的本地自动属性合并。其格式与 subversion 的自动属性相同，例如，*.sh = svn:eol-style=native;svn:executable为扩展名为 .sh 的文件设置两个属性。

• 在提交对话框，你可以粘贴修改的文件列表，包含每个文件的状态(增加，修改等)。tsvn:logfilelistenglish定义了文件状态用英文插入，还是用本机语言插入。如果此属性没有设置，默认值是 true。
• TortoiseSVN可以使用OpenOffice和Mozilla使用的拼写检查模块。如果你安装了这些模块，那么这个属性将检测使用哪个拼写检查模块。也就是，你的项目的日志信息用的语言。tsvn:projectlanguage设置拼写检查引擎在你输入日志消息的时候应该使用什么语言模块。你可以在这个页面找到你的语言的取值: MSDN: 语言标示符。

• 属性 tsvn:logsummary 用于摘录日志的一部分，在日志对话框中显示为日志摘要。

• 当你想增加新属性时，你可以从组合框的下拉列表选取，也可以输入你喜欢的任何属性名称。如果你的项目使用了自定义属性，并且想让这些属性出现在组合框的下拉列表中(避免输入时拼写错误)，你可以使用tsvn:userfileproperties和tsvn:userdirproperties创建自定义属性列表。对目录应用这些属性，当你编辑其任何子项属性时，你自定义的属性将会在预定义属性名称列表中出现。

TortoiseSVN 可以与一些 BUG 跟踪工具集成。它使用 bugtraq: 开始的项目属性。阅读“与 BUG 跟踪系统/问题跟踪集成”一节以获得更多信息。

http://sounds.red-bean.com/repos sounds

http://graphics.red-bean.com/repos/fast%20graphics "quick graphs"

-r21 http://svn.red-bean.com/repos/skin-maker skins/toolkit

URL 必须使用转义字符，否则它们不能正常工作，例如，你必须使用 %20 替代每一个空格符，就像在上面示范的第二条那样。

../../widgets/foo common/foo-widget

^/widgets/foo common/foo-widget

^/../repos-2/hammers/claw common/claw-hammer

//example.com/svn/repos-1/widgets/foo common/foo-widget

/svn/repos-1/widgets/foo common/foo-widget

• 外部文件的路径必须将文件放置在一个存在的版本控制的文件夹下。通常情况下，将文件放在设置 svn:externals 属性的文件夹下是一个非常明智的举措，不过，如果需要，它可以放在一个版本控制的子文件夹下。相比之下，外部目录将会根据需要自动创建内部的未版本控制的文件夹。
• 外部文件的 URL 必须和插入外部文件的 URL 位于同一个版本库；不同版本库之间的外部文件不被支持。

Subversion 没有用于建立分支和标记的特殊命令，但是使用所谓的便宜复制来代替。便宜复制类似于 Unix 里的硬连接，它意思是代替一个版本库里的完整的复制，创建一个内部的链接，指向一个具体的版本树。结果分支和标记迅速被创建，并且几乎没有在版本库里占据任何额外的空间。

http://svn.collab.net/repos/ProjectName/trunk

http://svn.collab.net/repos/ProjectName/tags/Release_1.10

...这是个小问题。当从版本库中预期的分支检出所有数据到你的工作副本目录时，TortoiseSVN → 切换... 仅仅传输已经被修改的数据到你的工作副本中。有利于减轻网络负担，也有利于你的耐心。 :-)

• TortoiseSVN → 检出一个最新的工作副本在一个空目录下。你可以在你的本地磁盘上的任意位置进行检出操作，同时你可以从版本库中按照你的意愿建立出任意数量的工作副本。
• 将你当前的工作副本切换到在版本库中新建立的副本。再一次选择你的项目所处的顶级文件夹然后在右键菜单中使用TortoiseSVN → 切换...。

• 如果你需要在主干和分支上工作，但是又不想耗费资源来进行一个全新的检出操作，你可以使用 Windows 资源管理器来将你的主干工作副本复制到另一个文件夹，然后使用TortoiseSVN → 切换...这样就会复制新的分支。

• 标记被用来建立一个项目在某个特殊的阶段的静态映像。通常情况下他们本不是用来进行开发的 - 分支是用来进行开发的，这就是我们推荐 /trunk /branches /tags 这样的版本库结构的原因。在标记上工作并不是一个好想法，因为你的本地文件没有写保护，没有什么办法防止你误操作。然而，如果你试着提交一个包含 /tags/ 的路径到版本库，TortoiseSVN 会警告你。
• 如果你需要在一个已经标记的发布版上做更多的修改。正确的操作方法是先从标记处建立一个新分支然后提交这个分支。在这个分支的基础上进行修改后再从这个新分支上建立一个新标记，例如 Version_1.0.1。
• 如果你修改了一个从分支建立的工作副本然后又提交了这个副本，那么所有的修改会转到一个新分支里而不是 主干。仅仅是存储了修改的数据。其余的数据还是便宜复制。

If you want to merge changes back out of your working copy, to revert a change which has already been committed, select the revisions to revert and make sure the Reverse merge box is checked.

To merge a feature branch back into the trunk you must start the merge wizard from within a working copy of the trunk.
In the From URL: field enter the full folder URL of the branch that you want to merge back. You may also click ... to browse the repository.
There are some conditions which apply to a reintegrate merge. Firstly, the server must support merge tracking. The working copy must be of depth infinite (no sparse checkouts), and it must not have any local modifications, switched items or items that have been updated to revisions other than HEAD. All changes to trunk made during branch development must have been merged across to the branch (or marked as having been merged). The range of revisions to merge will be calculated automatically.

If you are using this method to merge a feature branch back to trunk, you need to start the merge wizard from within a working copy of trunk.
In the From: field enter the full folder URL of the trunk. This may sound wrong, but remember that the trunk is the start point to which you want to add the branch changes. You may also click ... to browse the repository.

This page of the wizard lets you specify advanced options, before starting the merge process. Most of the time you can just use the default settings.
You can specify the depth to use for the merge, i.e. how far down into your working copy the merge should go. The depth terms used are described in “检出深度”一节. The default depth is Working copy, which uses the existing depth setting, and is almost always what you want.
Most of the time you want merge to take account of the file's history, so that changes relative to a common ancestor are merged. Sometimes you may need to merge files which are perhaps related, but not in your repository. For example you may have imported versions 1 and 2 of a third party library into two separate directories. Although they are logically related, Subversion has no knowledge of this because it only sees the tarballs you imported. If you attempt to merge the difference between these two trees you would see a complete removal followed by a complete add. To make Subversion use only path-based differences rather than history-based differences, check the Ignore ancestry box. Read more about this topic in the Subversion book, Noticing or Ignoring Ancestry
You can specify the way that line ending and whitespace changes are handled. These options are described in “行结束符和空白选项”一节. The default behaviour is to treat all whitespace and line-end differences as real changes to be merged.
If you are using merge tracking and you want to mark a revision as having been merged, without actually doing the merge here, check the Only record the merge checkbox. There are two possible reasons you might want to do this. It may be that the merge is too complicated for the merge algorithms, so you code the changes by hand, then mark the change as merged so that the merge tracking algorithm is aware of it. Or you might want to prevent a particular revision from being merged. Marking it as already merged will prevent the merge occurring with merge-tracking-aware clients.
Now everything is set up, all you have to do is click on the Merge button. If you want to preview the results Test Merge performs the merge operation, but does not modify the working copy at all. It shows you a list of the files that will be changed by a real merge, and notes those areas where conflicts will occur.
The merge progress dialog shows each stage of the merge, with the revision ranges involved. This may indicate one more revision than you were expecting. For example if you asked to merge revision 123 the progress dialog will report “Merging revisions 122 through 123”. To understand this you need to remember that Merge is closely related to Diff. The merge process works by generating a list of differences between two points in the repository, and applying those differences to your working copy. The progress dialog is simply showing the start and end points for the diff.

The merge is now complete. It's a good idea to have a look at the merge and see if it's as expected. Merging is usually quite complicated. Conflicts often arise if the branch has drifted far from the trunk.
For Subversion clients and servers prior to 1.5, no merge information is stored and merged revisions have to be tracked manually. When you have tested the changes and come to commit this revision, your commit log message should always include the revision numbers which have been ported in the merge. If you want to apply another merge at a later time you will need to know what you have already merged, as you do not want to port a change more than once. For more information about this, refer to Best Practices for Merging in the Subversion book.

If you have just merged a feature branch back into the trunk, the trunk now contains all the new feature code, and the branch is obsolete. You can now delete it from the repository if required.

Subversion can't merge a file with a folder and vice versa - only folders to folders and files to files. If you click on a file and open up the merge dialog, then you have to give a path to a file in that dialog. If you select a folder and bring up the dialog, then you must specify a folder URL for the merge.

Subversion 1.5 引入了合并跟踪特性。当你合并版本树时，版本号会被保存，此信息可以用于几个目的。
• You can avoid the danger of merging the same revision twice (repeated merge problem). Once a revision is marked as having been merged, future merges which include that revision in the range will skip over it.
• When you merge a branch back into trunk, the log dialog can show you the branch commits as part of the trunk log, giving better traceability of changes.
• When you show the log dialog from within the merge dialog, revisions already merged are shown in grey.
• When showing blame information for a file, you can choose to show the original author of merged revisions, rather than the person who did the merge.
• You can mark revisions as do not merge by including them in the list of merged revisions without actually doing the merge.
Merge tracking information is stored in the svn:mergeinfo property by the client when it performs a merge. When the merge is committed the server stores that information in a database, and when you request merge, log or blame information, the server can respond appropriately. For the system to work properly you must ensure that the server, the repository and all clients are upgraded. Earlier clients will not store the svn:mergeinfo property and earlier servers will not provide the information requested by new clients.
Find out more about merge tracking from Subversion's Merge tracking documentation.

Merging does not always go smoothly. Sometimes there is a conflict, and if you are merging multiple ranges, you generally want to resolve the conflict before merging of the next range starts. TortoiseSVN helps you through this process by showing the merge conflict callback dialog.

When a conflict occurs during the merge, you have three ways to handle it.
6. You may decide that your local changes are much more important, so you want to discard the version from the repository and keep your local version. Or you might discard your local changes in favour of the repository version. Either way, no attempt is made to merge the changes - you choose one or the other.
7. Normally you will want to look at the conflicts and resolve them. In that case, choose the Edit Conflict which will start up your merge tool. When you are satisfied with the result, click Resolved.
8. The last option is to postpone resolution and continue with merging. You can choose to do that for the current conflicted file, or for all files in the rest of the merge. However, if there are further changes in that file, it will not be possible to complete the merge.
If you do not want to use this interactive callback, there is a checkbox in the merge progress dialog Merge non-interactive. If this is set for a merge and the merge would result in a conflict, the file is marked as in conflict and the merge goes on. You will have to resolve the conflicts after the whole merge is finished. If it is not set, then before a file is marked as conflicted you get the chance to resolve the conflict during the merge. This has the advantage that if a file gets multiple merges (multiple revisions apply a change to that file), subsequent merges might succeed depending on which lines are affected. But of course you can't walk away to get a coffee while the merge is running ;)
Merge a Completed Branch

If you want to merge all changes from a feature branch back to trunk, then you can use the TortoiseSVN → Merge reintegrate... from the extended context menu (hold down the Shift key while you right click on the file).

This dialog is very easy. All you have to do is set the options for the merge, as described in “合并选项”一节. The rest is done by TortoiseSVN automatically using merge tracking.
Feature Branch Maintenance
When you develop a new feature on a separate branch it is a good idea to work out a policy for re-integration when the feature is complete. If other work is going on in trunk at the same time you may find that the differences become significant over time, and merging back becomes a nightmare.
If the feature is relatively simple and development will not take long then you can adopt a simple approach, which is to keep the branch entirely separate until the feature is complete, then merge the branch changes back into trunk. In the merge wizard this would be a simple Merge a range of revisions, with the revision range being the revision span of the branch.
If the feature is going to take longer and you need to account for changes in trunk, then you need to keep the branch synchronised. This simply means that periodically you merge trunk changes into the branch, so that the branch contains all the trunk changes plus the new feature. The synchronisation process uses Merge a range of revisions. When the feature is complete then you can merge it back to trunk using either Reintegrate a branch or Merge two different trees.

• 例如，你使用图形文件等“不能合并”的文件。如果两个人修改同一个这样的文件，合并是不可能的，所以你丢失其中一个的修改。
• Your company has always used a locking revision control system in the past and there has been a management decision that “locking is best”.
Firstly you need to ensure that your Subversion server is upgraded to at least version 1.2. Earlier versions do not support locking at all. If you are using file:// access, then of course only your client needs to be updated.

If you select a folder and then use TortoiseSVN → Get Lock... the lock dialog will open with every file in every sub-folder selected for locking. If you really want to lock an entire hierarchy, that is the way to do it, but you could become very unpopular with your co-workers if you lock them out of the whole project. Use with care ...

If you operate a policy where every file has to be locked then you may find it easier to use Subversion's auto-props feature to set the property automatically every time you add new files. Read “自动属性设置”一节 for further information.

Patch files are applied to your working copy. This should be done from the same folder level as was used to create the patch. If you are not sure what this is, just look at the first line of the patch file. For example, if the first file being worked on was doc/source/english/chapter1.xml and the first line in the patch file is Index: english/chapter1.xml then you need to apply the patch to the doc/source/ folder. However, provided you are in the correct working copy, if you pick the wrong folder level, TortoiseSVN will notice and suggest the correct level.

From the context menu for that folder, click on TortoiseSVN → Apply Patch... This will bring up a file open dialog allowing you to select the patch file to apply. By default only .patch or .diff files are shown, but you can opt for “All files”. If you previously saved a patch to the clipboard, you can use Open from clipboard... in the file open dialog.

TortoiseBlame,包含在TortoiseSVN中,使得追溯文件更加容易阅读。当你的鼠标在追溯信息列的某一行上盘旋时，所有和该列具有相同版本号的行都会用一个比较暗的背景色显示。同一作者修改的其他版本的行会用一个亮一些的背景色显示。如果你的显示设置为256色模式，那么颜色显示的可能不会很清楚。

If you need a better visual indicator of where the oldest and newest changes are, select View → Color age of lines. This will use a colour gradient to show newer lines in red and older lines in blue. The default colouring is quite light, but you can change it using the TortoiseBlame settings.
If you are using Merge Tracking, where lines have changed as a result of merging from another path, TortoiseBlame will show the revision and author of the last change in the original file rather than the revision where the merge took place. These lines are indicated by showing the revision and author in italics. If you do not want merged lines shown in this way, uncheck the Include merge info checkbox.
If you want to see the paths involved in the merge, select View → Merge paths.
The settings for TortoiseBlame can be accessed using TortoiseSVN → Settings... on the TortoiseBlame tab. Refer to “TortoiseBlame 的设置”一节.

Select one revision in the top pane, then pick one file in the bottom pane and select Context menu → Blame changes. This will fetch the blame data for the selected revision and the previous revision, then use the diff viewer to compare the two blame files.

• 用默认查看器或你指定的程序打开选中文件的选中版本。
• 在你的硬盘上保存此文件的一个未版本控制的副本。
• 显示此文件的版本日志，或者显示所有版本图，从而你可以知道其来源。
• 追溯这个文件，查看是谁在何时修改哪些行。
• 删除或改名文件。
• 复制这个文件，目的可以是版本库中的其它地方，也可以是同一版本库中的工作副本。
• View/Edit the file's properties.

• 显示此目录的版本日志，或者显示所有版本图，从而你可以知道其来源。
• 导出此目录的未版本控制副本到你的本地硬盘。
• 检出此目录到你的硬盘，产生一个本地工作副本。
• 在版本库创建新目录。
• 直接向版本库增加文件或目录。
• 删除或改名文件夹。
• 复制这个目录，目的可以是版本库中的其它地方，也可以是同一版本库中的工作副本。
• 察看/编辑目录的属性
• 为比较标记目录。已标记的目录用粗体显示。
• 将此文件夹与以前标记的文件夹比较，用统一差异，或者是一个可以用默认比较工具可视化显示差异的文件改变列表。它对于比较两个标签，或者最新版本与分支，查看修改详情时尤其有用。

You can use F5 to refresh the view as usual. This will refresh everything which is currently displayed. If you want to pre-fetch or refresh the information for nodes which have not been opened yet, use Ctrl-F5. After that, expanding any node will happen instantly without a network delay while the information is fetched.
You can also use the repository browser for drag-and-drop operations. If you drag a folder from explorer into the repo-browser, it will be imported into the repository. Note that if you drag multiple items, they will be imported in separate commits.
If you want to move an item within the repository, just left drag it to the new location. If you want to create a copy rather than moving the item, Ctrl-left drag instead. When copying, the cursor has a “plus” symbol on it, just as it does in Explorer.
If you want to copy/move a file or folder to another location and also give it a new name at the same time, you can right drag or Ctrl-right drag the item instead of using left drag. In that case, a rename dialog is shown where you can enter a new name for the file or folder.

Sometimes when you try to open a path you will get an error message in place of the item details. This might happen if you specified an invalid URL, or if you don't have access permission, or if there is some other server problem. If you need to copy this message to include it in an email, just right click on it and use Context Menu → Copy error message to clipboard, or simply use Ctrl+C.

In order to generate the graph, TortoiseSVN must fetch all log messages from the repository root. Needless to say this can take several minutes even with a repository of a few thousand revisions, depending on server speed, network bandwidth, etc. If you try this with something like the Apache project which currently has over 500,000 revisions you could be waiting for some time.
The good news is that if you are using log caching, you only have to suffer this delay once. After that, log data is held locally. Log caching is enabled in TortoiseSVN's settings.

Each revision graph node represents a revision in the repository where something changed in the tree you are looking at. Different types of node can be distinguished by shape and colour. The shapes are fixed, but colours can be set using TortoiseSVN → Settings
Items which have been added, or created by copying another file/folder are shown using a rounded rectangle. The default colour is green. Tags and trunks are treated as a special case and use a different shade, depending on the TortoiseSVN → Settings
Deleted items
Deleted items eg. a branch which is no longer required, are shown using an octagon (rectangle with corners cut off). The default colour is red.
Renamed items
Renamed items are also shown using an octagon, but the default colour is blue.

The graph is normally restricted to showing branch points, but it is often useful to be able to see the respective HEAD revision for each branch too. If you select Show HEAD revisions, each HEAD revision nodes will be shown as an ellipse. Note that HEAD here refers to the last revision committed on that path, not to the HEAD revision of the repository.
Working copy revision
If you invoked the revision graph from a working copy, you can opt to show the BASE revision on the graph using Show WC revision, which marks the BASE node with a bold outline.
Modified working copy
If you invoked the revision graph from a working copy, you can opt to show an additional node representing your modified working copy using Show WC modifications. This is an elliptical node with a bold outline in red by default.
Normal item

Note that by default the graph only shows the points at which items were added, copied or deleted. Showing every revision of a project will generate a very large graph for non-trivial cases. If you really want to see all revisions where changes were made, there is an option to do this in the View menu and on the toolbar.
The default view (grouping off) places the nodes such that their vertical position is in strict revision order, so you have a visual cue for the order in which things were done. Where two nodes are in the same column the order is very obvious. When two nodes are in adjacent columns the offset is much smaller because there is no need to prevent the nodes from overlapping, and as a result the order is a little less obvious. Such optimisations are necessary to keep complex graphs to a reasonable size. Please note that this ordering uses the edge of the node on the older side as a reference, i.e. the bottom edge of the node when the graph is shown with oldest node at the bottom. The reference edge is significant because the node shapes are not all the same height.
Changing the View

The default behavior (grouping off) has all rows sorted strictly by revision. As a result, long-living branches with sparse commits occupy a whole column for only a few changes and the graph becomes very broad.
This mode groups changes by branch, so that there is no global revision ordering: Consecutive revisions on a branch will be shown in (often) consecutive lines. Sub-branches, however, are arranged in such a way that later branches will be shown in the same column above older branches to keep the graph slim. As a result, a given row may contain changes from different revisions.

Align trees on top
When a graph is broken into several smaller trees, the trees may appear either in natural revision order, or aligned at the bottom of the window, depending on whether you are using the Group Branches option. Use this option to grow all trees down from the top instead.

If the layout of the graph has produced a lot of crossing lines, use this option to clean it up. This may make the layout columns appear in less logical places, for example in a diagonal line rather than a column, and the graph may require a larger area to draw.
Differential path names
Long path names can take a lot of space and make the node boxes very large. Use this option to show only the changed part of a path, replacing the common part with dots. E.g. if you create a branch /branches/1.2.x/doc/html from /trunk/doc/html the branch could be shown in compact form as /branches/1.2.x/.. because the last two levels, doc and html, did not change.
Show all revisions
This does just what you expect and shows every revision where something (in the tree that you are graphing) has changed. For long histories this can produce a truly huge graph.

When a branch/tag is made, the default behaviour is to show the branch as taken from the last node where a change was made. Strictly speaking this is inaccurate since the branches are often made from the current HEAD rather than a specific revision. So it is possible to show the more correct (but less useful) revision that was used to create the copy. Note that this revision may be younger than the HEAD revision of the source branch.

When a project has many tags, showing every tag as a separate node on the graph takes a lot of space and obscures the more interesting development branch structure. At the same time you may need to be able to access the tag content easily so that you can compare revisions. This option hides the nodes for tags and shows them instead in the tooltip for the node that they were copied from. A tag icon on the right side of the source node indicates that tags were made.
Hide deleted paths
Hides paths which are no longer present at the HEAD revision of the repository, e.g. deleted branches.
Hide unchanged branches
Hides branches where no changes were committed to the respective file or sub-folder. This does not necessarily indicate that the branch was not used, just that no changes were made to this part of it.
Show WC revision
Marks the revision on the graph which corresponds to the update revision of the item you fetched the graph for. If you have just updated, this will be HEAD, but if others have committed changes since your last update your WC may be a few revisions lower down. The node is marked by giving it a bold outline.
Show WC modifications
If your WC contains local changes, this option draws it as a separate elliptical node, linked back to the node that your WC was last updated to. The default outline colour is red. You may need to refresh the graph using F5 to capture recent changes.

Sometimes the revision graph contains more revisions than you want to see. This option opens a dialog which allows you to restrict the range of revisions displayed, and to hide particular paths by name.
Tree stripes
Where the graph contains several trees, it is sometimes useful to use alternating colours on the background to help distinguish between trees.
Show overview
Shows a small picture of the entire graph, with the current view window as a rectangle which you can drag. This allows you to navigate the graph more easily. Note that for very large graphs the overview may become useless due to the extreme zoom factor and will therefore not be shown in such cases.

If you select two revisions (Use Ctrl-left click), you can use the context menu to show the differences between these revisions. You can choose to show differences as at the branch creation points, but usually you will want to show the differences at the branch end points, i.e. at the HEAD revision.

You can also merge changes in the selected revision(s) into a different working copy. A folder selection dialog allows you to choose the working copy to merge into, but after that there is no confirmation dialog, nor any opportunity to try a test merge. It is a good idea to merge into an unmodified working copy so that you can revert the changes if it doesn't work out! This is a useful feature if you want to merge selected revisions from one branch to another.
Learn to Read the Revision Graph
First-time users may be surprised by the fact that the revision graph shows something that does not match the user's mental model. If a revision changes multiple copies or branches of a file or folder, for instance, then there will be multiple nodes for that single revision. It is a good practice to start with the leftmost options in the toolbar and customize the graph step-by-step until it comes close to your mental model.
All filter options try lose as little information as possible. That may cause some nodes to change their color, for instance. Whenever the result is unexpected, undo the last filter operation and try to understand what is special about that particular revision or branch. In most cases, the initially expected outcome of the filter operation would either be inaccurate or misleading.

If you want to check the server again for newer information, you can simply refresh the view using F5. If you are using the log cache (enabled by default), this will check the repository for newer commits and fetch only the new ones. If the log cache was in offline mode, this will also attempt to go back online.
If you are using the log cache and you think the message content or author may have changed, you should use the log dialog to refresh the messages you need. Since the revision graph works from the repository root, we would have to invalidate the entire log cache, and refilling it could take a very long time.
Pruning Trees
A large tree can be difficult to navigate and sometimes you will want to hide parts of it, or break it down into a forest of smaller trees. If you hover the mouse over the point where a node link enters or leaves the node you will see one or more popup buttons which allow you to do this.

Click on the minus button to collapse the attached sub-tree.

Click on the plus button to expand a collapsed tree. When a tree has been collapsed, this button remains visible to indicate the hidden sub-tree.

Click on the cross button to split the attached sub-tree and show it as a separate tree on the graph.

Click on the circle button to reattach a split tree. When a tree has been split away, this button remains visible to indicate that there is a separate sub-tree.
Click on the graph background for the main context menu, which offers options to Expand all and Join all. If no branch has been collapsed or split, the context menu will not be shown.

Sometimes you have a working copy which you want to convert back to a normal folder without the .svn directories. What you really need is an export-in-place command, that just removes the control directories rather than generating a new clean directory tree.
The answer is surprisingly simple - export the folder to itself! TortoiseSVN detects this special case and asks if you want to make the working copy unversioned. If you answer yes the control directories will be removed and you will have a plain, unversioned directory tree.

If your repository has for some reason changed it's location (IP/URL). Maybe you're even stuck and can't commit and you don't want to checkout your working copy again from the new location and to move all your changed data back into the new working copy, TortoiseSVN → Relocate is the command you are looking for. It basically does very little: it scans all entries files in the .svn folder and changes the URL of the entries to the new value.
You may be surprised to find that TortoiseSVN contacts the repository as part of this operation. All it is doing is performing some simple checks to make sure that the new URL really does refer to the same repository as the existing working copy.

• 服务器的IP地址已更改。
• 协议已更改(比如从http://改为 https://)。
• 版本库在服务器的路径已更改。

• 你要移到一个完全不同的版本库。这种情况下，你必须从新的版本库里执行一次干净的检出。
• 你要在同一个版本库中切换一个分支或目录。这么做你可以用TortoiseSVN → 切换....

TortoiseSVN可以在两个方面帮助用户:

33. 当用户输入日志信息时，一个定义良好，包含问题编号，与此提交相关的的行，会自动增加。这样减少了用户输入的问题编号不能比bug跟踪系统正确分析的风险。

34. 当用户浏览日志信息，TortoiseSVN在日志信息中创建指向每个bug标示的链接，它可以用浏览器打开。
Adding Issue Numbers to Log Messages
You can integrate a bug tracking tool of your choice in TortoiseSVN. To do this, you have to define some properties, which start with bugtraq:. They must be set on Folders: (“项目设置”一节)
There are two ways to integrate TortoiseSVN with issue trackers. One is based on simple strings, the other is based on regular expressions. The properties used by both approaches are:
bugtraq:url
Set this property to the URL of your bug tracking tool. It must be properly URI encoded and it has to contain %BUGID%. %BUGID% is replaced with the Issue number you entered. This allows TortoiseSVN to display a link in the log dialog, so when you are looking at the revision log you can jump directly to your bug tracking tool. You do not have to provide this property, but then TortoiseSVN shows only the issue number and not the link to it. e.g the TortoiseSVN project is using http://issues.tortoisesvn.net/?do=details&id=%BUGID%
You can also use relative URLs instead of absolute ones. This is useful when your issue tracker is on the same domain/server as your source repository. In case the domain name ever changes, you don't have to adjust the bugtraq:url property. There are two ways to specify a relative URL:
If it begins with the string ^/ it is assumed to be relative to the repository root. For example, ^/../?do=details&id=%BUGID% will resolve to http://tortoisesvn.net/?do=details&id=%BUGID% if your repository is located on http://tortoisesvn.net/svn/trunk/.
A URL beginning with the string / is assumed to be relative to the server's hostname. For example /?do=details&id=%BUGID% will resolve to http://tortoisesvn.net/?do=details&id=%BUGID% if your repository is located anywhere on http://tortoisesvn.net.
bugtraq:warnifnoissue
Set this to true, if you want TortoiseSVN to warn you because of an empty issue-number text field. Valid values are true/false. If not defined, false is assumed.
Issue Number in Text Box

bugtraq:message
This property activates the bug tracking system in Input field mode. If this property is set, then TortoiseSVN will prompt you to enter an issue number when you commit your changes. It's used to add a line at the end of the log message. It must contain %BUGID%, which is replaced with the issue number on commit. This ensures that your commit log contains a reference to the issue number which is always in a consistent format and can be parsed by your bug tracking tool to associate the issue number with a particular commit. As an example you might use Issue : %BUGID%, but this depends on your Tool.
bugtraq:append

bugtraq:label
This text is shown by TortoiseSVN on the commit dialog to label the edit box where you enter the issue number. If it's not set, Bug-ID / Issue-Nr: will be displayed. Keep in mind though that the window will not be resized to fit this label, so keep the size of the label below 20-25 characters.
bugtraq:number
If set to true only numbers are allowed in the issue-number text field. An exception is the comma, so you can comma separate several numbers. Valid values are true/false. If not defined, true is assumed.
Issue Numbers Using Regular Expressions
In the approach with regular expressions, TortoiseSVN doesn't show a separate input field but marks the part of the log message the user enters which is recognized by the issue tracker. This is done while the user writes the log message. This also means that the bug ID can be anywhere inside a log message! This method is much more flexible, and is the one used by the TortoiseSVN project itself.
bugtraq:logregex
This property activates the bug tracking system in Regex mode. It contains either a single regular expressions, or two regular expressions separated by a newline.
If two expressions are set, then the first expression is used as a pre-filter to find expressions which contain bug IDs. The second expression then extracts the bare bug IDs from the result of the first regex. This allows you to use a list of bug IDs and natural language expressions if you wish. e.g. you might fix several bugs and include a string something like this: “This change resolves issues #23, #24 and #25”
If you want to catch bug IDs as used in the expression above inside a log message, you could use the following regex strings, which are the ones used by the TortoiseSVN project: [Ii]ssues?:?(\s*(,|and)?\s*#\d+)+ and (\d+)
The first expression picks out “issues #23, #24 and #25” from the surrounding log message. The second regex extracts plain decimal numbers from the output of the first regex, so it will return “23”, “24” and “25” to use as bug IDs.
Breaking the first regex down a little, it must start with the word “issue”, possibly capitalised. This is optionally followed by an “s” (more than one issue) and optionally a colon. This is followed by one or more groups each having zero or more leading whitespace, an optional comma or “and” and more optional space. Finally there is a mandatory “#” and a mandatory decimal number.
If only one expression is set, then the bare bug IDs must be matched in the groups of the regex string. Example: [Ii]ssue(?:s)? #?(\d+) This method is required by a few issue trackers, e.g. trac, but it is harder to construct the regex. We recommend that you only use this method if your issue tracker documentation tells you to.
If you are unfamiliar with regular expressions, take a look at the introduction at http://en.wikipedia.org/wiki/Regular_expression, and the online documentation and tutorial at http://www.regular-expressions.info/.

And even if you don't need the links, the issue numbers show up as a separate column in the log dialog, making it easier to find the changes which relate to a particular issue.

These properties must be set on folders for the system to work. When you commit a file or folder the properties are read from that folder. If the properties are not found there, TortoiseSVN will search upwards through the folder tree to find them until it comes to an unversioned folder, or the tree root (eg. C:\) is found. If you can be sure that each user checks out only from e.g trunk/ and not some sub-folder, then it's enough if you set the properties on trunk/. If you can't be sure, you should set the properties recursively on each sub-folder. A property setting deeper in the project hierarchy overrides settings on higher levels (closer to trunk/).
For tsvn: properties only you can use the Recursive checkbox to set the property to all sub-folders in the hierarchy, without also setting it on all files.
No Issue Tracker Information from Repository Browser
Because the issue tracker integration depends upon accessing subversion properties, you will only see the results when using a checked out working copy. Fetching properties remotely is a slow operation, so you will not see this feature in action from the repo browser.
This issue tracker integration is not restricted to TortoiseSVN; it can be used with any Subversion client. For more information, read the full Issue Tracker Integration Specification in the TortoiseSVN source repository. (“TortoiseSVN 是完全免费的！”一节 explains how to access the repository).
Getting Information from the Issue Tracker
The previous section deals with adding issue information to the log messages. But what if you need to get information from the issue tracker? The commit dialog has a COM interface which allows integration an external program that can talk to your tracker. Typically you might want to query the tracker to get a list of open issues assigned to you, so that you can pick the issues that are being addressed in this commit.
Any such interface is of course highly specific to your issue tracker system, so we cannot provide this part, and describing how to create such a program is beyond the scope of this manual. The interface definition and sample plugins in C# and C++/ATL can be obtained from the contrib folder in the TortoiseSVN repository. (“TortoiseSVN 是完全免费的！”一节 explains how to access the repository). A summary of the API is also given in 第 6 章 IBugtraqProvider interface Another (working) example plugin in C# is Gurtle which implements the required COM interface to interact with the Google Code issue tracker.
For illustration purposes, let's suppose that your system administrator has provided you with an issue tracker plugin which you have installed, and that you have set up some of your working copies to use the plugin in TortoiseSVN's settings dialog. When you open the commit dialog from a working copy to which the plugin has been assigned, you will see a new button at the top of the dialog.

In this example you can select one or more open issues. The plugin can then generate specially formatted text which it adds to your log message.

You can integrate a repo viewer of your choice in TortoiseSVN. To do this, you have to define some properties which define the linkage. They must be set on Folders: (“项目设置”一节)

webviewer:revision
Set this property to the URL of your repo viewer to view all changes in a specific revision. It must be properly URI encoded and it has to contain %REVISION%. %REVISION% is replaced with the revision number in question. This allows TortoiseSVN to display a context menu entry in the log dialog Context Menu → View revision in webviewer
webviewer:pathrevision
Set this property to the URL of your repo viewer to view changes to a specific file in a specific revision. It must be properly URI encoded and it has to contain %REVISION% and %PATH%. %PATH% is replaced with the path relative to the repository root. This allows TortoiseSVN to display a context menu entry in the log dialog Context Menu → View revision and path in webviewer For example, if you right-click in the log dialog bottom pane on a file entry /trunk/src/file then the %PATH% in the URL will be replaced with /trunk/src/file.
You can also use relative URLs instead of absolute ones. This is useful in case your web viewer is on the same domain/server as your source repository. In case the domain name ever changes, you don't have to adjust the webviewer:revision and webviewer:pathrevision property. The format is the same as for the bugtraq:url property. See “与 BUG 跟踪系统/问题跟踪集成”一节.

These properties must be set on folders for the system to work. When you commit a file or folder the properties are read from that folder. If the properties are not found there, TortoiseSVN will search upwards through the folder tree to find them until it comes to an unversioned folder, or the tree root (eg. C:\) is found. If you can be sure that each user checks out only from e.g trunk/ and not some sub-folder, then it's enough if you set the properties on trunk/. If you can't be sure, you should set the properties recursively on each sub-folder. A property setting deeper in the project hierarchy overrides settings on higher levels (closer to trunk/).
For tsvn: properties only you can use the Recursive checkbox to set the property to all sub-folders in the hierarchy, without also setting it on all files.
No Repo Viewer Links from Repository Browser
Because the repo viewer integration depends upon accessing subversion properties, you will only see the results when using a checked out working copy. Fetching properties remotely is a slow operation, so you will not see this feature in action from the repo browser.
TortoiseSVN的设置

TSVN已经默认安装了三个自定义声音。

• 错误
• 提示
• 警告

Global ignore patterns are used to prevent unversioned files from showing up e.g. in the commit dialog. Files matching the patterns are also ignored by an import. Ignore files or directories by typing in the names or extensions. Patterns are separated by spaces e.g. bin obj *.bak *.~?? *.jar *.[Tt]mp. These patterns should not include any path separators. Note also that there is no way to differentiate between files and directories. Read “忽略列表中的模式匹配”一节 for more information on the pattern-matching syntax.

Set file dates to the “last commit time”
This option tells TortoiseSVN to set the file dates to the last commit time when doing a checkout or an update. Otherwise TortoiseSVN will use the current date. If you are developing software it is generally best to use the current date because build systems normally look at the date stamps to decide which files need compiling. If you use “last commit time” and revert to an older file revision, your project may not compile as you expect it to.
Subversion配置文件
Use Edit to edit the Subversion configuration file directly. Some settings cannot be modified directly by TortoiseSVN, and need to be set here instead. For more information about the Subversion config file see the Runtime Configuration Area. The section on Automatic Property Setting is of particular interest, and that is configured here. Note that Subversion can read configuration information from several places, and you need to know which one takes priority. Refer to Configuration and the Windows Registry to find out more.
Use _svn instead of .svn directories

If there are some paths on your computer where you just don't want TortoiseSVN's context menu to appear at all, you can list them in the box at the bottom.

Limits the number of log messages that TortoiseSVN fetches when you first select TortoiseSVN → Show Log Useful for slow server connections. You can always use Show All or Next 100 to get more messages.

Can double-click in log list to compare with previous revision
If you frequently find yourself comparing revisions in the top pane of the log dialog, you can use this option to allow that action on double-click. It is not enabled by default because fetching the diff is often a long process, and many people prefer to avoid the wait after an accidental double-click, which is why this option is not enabled by default.

Use recycle bin when reverting
When you revert local modifications, your changes are discarded. TortoiseSVN gives you an extra safety net by sending the modified file to the recycle bin before bringing back the pristine copy. If you prefer to skip the recycle bin, uncheck this option.
Use URL of WC as the default “From:” URL

The commit dialog includes a facility to parse the list of filenames being committed. When you type the first 3 letters of an item in the list, the auto-completion box pops up, and you can press Enter to complete the filename. Check the box to enable this feature.

The auto-completion parser can be quite slow if there are a lot of large files to check. This timeout stops the commit dialog being held up for too long. If you are missing important auto-completion information, you can extend the timeout.

When you type in a log message in the commit dialog, TortoiseSVN stores it for possible re-use later. By default it will keep the last 25 log messages for each repository, but you can customize that number here. If you have many different repositories, you may wish to reduce this to avoid filling your registry.
Note that this setting applies only to messages that you type in on this computer. It has nothing to do with the log cache.

The normal behaviour in the commit dialog is for all modified (versioned) items to be selected for commit automatically. If you prefer to start with nothing selected and pick the items for commit manually, uncheck this box.

“检查修改”对话框将默认检查工作副本，但仅当你点击 检查版本库 时才连接你的版本库做检查。若你想总是去检查版本库，就可以使用该设置来使版本库检查的动作每次都自动启动。

Classification Patterns
The revision graph attempts to show a clearer picture of your repository structure by distinguishing between trunk, branches and tags. As there is no such classification built into Subversion, this information is extracted from the path names. The default settings assume that you use the conventional English names as suggested in the Subversion documentation, but of course your usage may vary.
Specify the patterns used to recognise these paths in the three boxes provided. The patterns will be matched case-insensitively, but you must specify them in lower case. Wild cards * and ? will work as usual, and you can use ; to separate multiple patterns. Do not include any extra white space as it will be included in the matching specification.
Modify Colors
Colors are used in the revision graph to indicate the node type, i.e. whether a node is added, deleted, renamed. In order to help pick out node classifications, you can allow the revision graph to blend colors to give an indication of both node type and classification. If the box is checked, blending is used. If the box is unchecked, color is used to indicate node type only. Use the color selection dialog to allocate the specific colors used.

This page allows you to configure the colors used. Note that the color specified here is the solid color. Most nodes are colored using a blend of the node type color, the background color and optionally the classification color.
Deleted Node
Items which have been deleted and not copied anywhere else in the same revision.
Renamed Node
Items deleted from one location and added in another in the same revision.
Modified Node
Simple modifications without any add or delete.
Unchanged Node
May be used to show the revision used as the source of a copy, even when no change (to the item being graphed) took place in that revision.
Current HEAD revision in the repository.
WC Node
If you opt to show an extra node for your modified working copy, attached to its last-commit revision on the graph, use this color.
WC Node Border
If you opt to show whether the working copy is modified, use this color border on the WC node when modifications are found.
Tag Nodes
Nodes classified as tags may be blended with this color.
Trunk Nodes
Nodes classified as trunk may be blended with this color.
Folded Tag Markers
If you use tag folding to save space, tags are marked on the copy source using a block in this color.
Selected Node Markers
When you left click on a node to select it, the marker used to indicate selection is a block in this color.
Stripes
These colors are used when the graph is split into sub-trees and the background is colored in alternating stripes to help pick out the separate trees.

This page allows you to choose the items for which TortoiseSVN will display icon overlays.
By default, overlay icons and context menus will appear in all open/save dialogs as well as in Windows Explorer. If you want them to appear only in Windows Explorer, check the Show overlays and context menu only in explorer box.
Ignored items and Unversioned items are not usually given an overlay. If you want to show an overlay in these cases, just check the boxes.
You can also choose to mark folders as modified if they contain unversioned items. This could be useful for reminding you that you have created new files which are not yet versioned. This option is only available when you use the default status cache option (see below).
Since it takes quite a while to fetch the status of a working copy, TortoiseSVN uses a cache to store the status so the explorer doesn't get hogged too much when showing the overlays. You can choose which type of cache TortoiseSVN should use according to your system and working copy size here:

Caches all status information in a separate process (TSVNCache.exe). That process watches all drives for changes and fetches the status again if files inside a working copy get modified. The process runs with the least possible priority so other programs don't get hogged because of it. That also means that the status information is not real time but it can take a few seconds for the overlays to change.
Advantage: the overlays show the status recursively, i.e. if a file deep inside a working copy is modified, all folders up to the working copy root will also show the modified overlay. And since the process can send notifications to the shell, the overlays on the left tree view usually change too.

Windows 外壳

Disadvantage: Status information of files and folders is not shown in Explorer. To see if your working copies are modified, you have to use the “Check for modifications” dialog.
The next group allows you to select which classes of storage should show overlays. By default, only hard drives are selected. You can even disable all icon overlays, but where's the fun in that?
Network drives can be very slow, so by default icons are not shown for working copies located on network shares.
USB闪存看上去是个特殊情况，因为驱动类型是设备自主标识的。于是有些显示为固定驱动器，而有些显示为可移动磁盘。

Users sometimes ask how these three settings interact, and the definitive answer is:
if (path is in include list)

show overlays

if (path is allowed drive type) AND (path is not in exclude list)

show overlays

The include list always makes the overlays show. Otherwise, overlays are shown for all marked drive types unless the path is excluded.
TSVNCache.exe 同样使用这些路径来限制它的扫描。如果你想让它仅仅在某些特定文件夹里监视，就取消所有的驱动器类型，并仅仅包含你允许被扫描的文件夹。

It is often convenient to use a SUBST drive to access your working copies, e.g. using the command
subst T: C:\TortoiseSVN\trunk\doc

However this can cause the overlays not to update, as TSVNCache will only receive one notification when a file changes, and that is normally for the original path. This means that your overlays on the subst path may never be updated.
An easy way to work around this is to exclude the original path from showing overlays, so that the overlays show up on the subst path instead.
Sometimes you will exclude areas that contain working copies, which saves TSVNCache from scanning and monitoring for changes, but you still want a visual indication that such folders are versioned. The Show excluded folders as 'normal' checkbox allows you to do this. With this option, versioned folders in any excluded area (drive type not checked, or specifically excluded) will show up as normal and up-to-date, with a green check mark. This reminds you that you are looking at a working copy, even though the folder overlays may not be correct. Files do not get an overlay at all. Note that the context menus still work, even though the overlays are not shown.
As a special exception to this, drives A: and B: are never considered for the Show excluded folders as 'normal' option. This is because Windows is forced to look on the drive, which can result in a delay of several seconds when starting Explorer, even if your PC does have a floppy drive.

<placeholder-1> 如果需要穿透你公司的防火墙，在这里可以配置你的代理服务器。</placeholder-1>
If you need to set up per-repository proxy settings, you will need to use the Subversion servers file to configure this. Use Edit to get there directly. Consult the Runtime Configuration Area for details on how to use this file.

You must specify the full path to the executable. For TortoisePlink.exe this is the standard TortoiseSVN bin directory. Use the Browse button to help locate it. Note that if the path contains spaces, you must enclose it in quotes, e.g.

TortoisePlink does not have any documentation of its own because it is just a minor variant of Plink. Find out about command line parameters from the PuTTY website
To avoid being prompted for a password repeatedly, you might also consider using a password caching tool such as Pageant. This is also available for download from the PuTTY website.
Finally, setting up SSH on server and clients is a non-trivial process which is beyond the scope of this help file. However, you can find a guide in the TortoiseSVN FAQ listed under Subversion/TortoiseSVN SSH How-To.

%base

%bname

%mine

%yname

For example, with ExamDiff Pro:
C:\Path-To\ExamDiff.exe %base %mine --left_display_name:%bname

--right_display_name:%yname

or with KDiff3:
C:\Path-To\kdiff3.exe %base %mine --L1 %bname --L2 %yname

or with WinMerge:
C:\Path-To\WinMerge.exe -e -ub -dl %bname -dr %yname %base %mine

or with Araxis:
C:\Path-To\compare.exe /max /wait /title1:%bname /title2:%yname

%base %mine

If you use the svn:keywords property to expand keywords, and in particular the revision of a file, then there may be a difference between files which is purely due to the current value of the keyword. Also if you use svn:eol-style = native the BASE file will have pure LF line endings whereas your file will have CR-LF line endings. TortoiseSVN will normally hide these differences automatically by first parsing the BASE file to expand keywords and line endings before doing the diff operation. However, this can take a long time with large files. If Convert files when diffing against BASE is unchecked then TortoiseSVN will skip pre-processing the files.

If you have configured an alternate diff tool, you can access TortoiseMerge and the third party tool from the context menus. Context menu → Diff uses the primary diff tool, and Shift+ Context menu → Diff uses the secondary diff tool.

%base

%bname

%mine

%yname

%theirs

%tname

%merged

%mname

For example, with Perforce Merge:
C:\Path-To\P4Merge.exe %base %theirs %mine %merged

or with KDiff3:
C:\Path-To\kdiff3.exe %base %mine %theirs -o %merged

--L1 %bname --L2 %yname --L3 %tname

or with Araxis:
C:\Path-To\compare.exe /max /wait /3 /title1:%tname /title2:%bname

/title3:%yname %theirs %base %mine %merged /a2

or with WinMerge (2.8 or later):
C:\Path-To\WinMerge.exe %merged

In the advanced settings, you can define a different diff and merge program for every file extension. For instance you could associate Photoshop as the “Diff” Program for .jpg files :-) You can also associate the svn:mime-type property with a diff or merge program.

URL历史记录

If you want to remove a single item from one of the combo boxes you can do that in-place. Just click on the arrow to drop the combo box down, move the mouse over the item you want to remove and type Shift+Del.

TortoiseSVN同时也储存你最近提交时填写的日志信息。对应每个版本库都要储存这些信息，所以如果你访问过很多版本库，这个列表将变得非常大。

TortoiseSVN caches log messages fetched by the Show Log dialog to save time when you next show the log. If someone else edits a log message and you already have that message cached, you will not see the change until you clear the cache. Log message caching is enabled on the Log Cache tab.

If you want to clear authentication data for one particular server only, read “认证”一节 for instructions on how to find the cached data.

TortoiseSVN keeps a log of everything written to its progress dialogs. This can be useful when, for example, you want to check what happened in a recent update command.
The log file is limited in length and when it grows too big the oldest content is discarded. By default 4000 lines are kept, but you can customize that number.
From here you can view the log file content, and also clear it.

This dialog allows you to configure the log caching feature of TortoiseSVN, which retains a local copy of log messages and changed paths to avoid time-consuming downloads from the server. Using the log cache can dramatically speed up the log dialog and the revision graph. Another useful feature is that the log messages can still be accessed when offline.

Enables log caching whenever log data is requested. If checked, data will be retrieved from the cache when available, and any messages not in the cache will be retrieved from the server and added to the cache.
If caching is disabled, data will always be retrieved directly from the server and not stored locally.
Allow ambiguous URLs
Occasionally you may have to connect to a server which uses the same URL for all repositories. Older versions of svnbridge would do this. If you need to access such repositories you will have to check this option. If you don't, leave it unchecked to improve performance.
Allow ambiguous UUIDs
Some hosting services give all their repositories the same UUID. You may even have done this yourself by copying a repository folder to create a new one. For all sorts of reasons this is a bad idea - a UUID should be unique. However, the log cache will still work in this situation if you check this box. If you don't need it, leave it unchecked to improve performance.

If you are working offline, or if the repository server is down, the log cache can still be used to supply log messages already held in the cache. Of course the cache may not be up-to-date, so there are options to allow you to select whether this feature should be used.
When log data is being taken from the cache without contacting the server, the dialog using those message will show the offline state in its title bar.
Timeout before updating the HEAD revision
When you invoke the log dialog you will normally want to contact the server to check for any newer log messages. If the timeout set here is non-zero then the server will only be contacted when the timeout has elapsed since the last time contact. This can reduce server round-trips if you open the log dialog frequently and the server is slow, but the data shown may not be completely up-to-date. If you want to use this feature we suggest using a value of 300 (5 minutes) as a compromise.
Days of inactivity until small caches get removed
If you browse around a lot of repositories you will accumulate a lot of log caches. If you're not actively using them, the cache will not grow very big, so TortoiseSVN purges them after a set time by default. Use this item to control cache purging.
Maximum size of removed inactive caches
Larger caches are more expensive to reacquire, so TortoiseSVN only purges small caches. Fine tune the threshold with this value.
Maximum number of tool failures before cache removal
Occasionally something goes wrong with the caching and causes a crash. If this happens the cache is normally deleted automatically to prevent a recurrence of the problem. If you use the less stable nightly build you may opt to keep the cache anyway.

Cached Repositories
On this page you can see a list of the repositories that are cached locally, and the space used for the cache. If you select one of the repositories you can then use the buttons underneath.
Click on the Update to completely refresh the cache and fill in any holes. For a large repository this could be very time consuming, but useful if you are about to go offline and want the best available cache.
Click on the Export button to export the entire cache as a set of CSV files. This could be useful if you want to process the log data using an external program, although it is mainly useful to the developers.
Click on Delete to remove all cached data for the selected repositories. This does not disable caching for the repository so the next time you request log data, a new cache will be created.

Click on the Details button to see detailed statistics for a particular cache. Many of the fields shown here are mainly of interest to the developers of TortoiseSVN, so they are not all described in detail.
RAM
The amount of memory required to service this cache.

The amount of disk space used for the cache. Data is compressed, so disk usage is generally fairly modest.

Shows whether the repository was available last time the cache was used.

The last time the cache content was changed.
The last time we requested the HEAD revision from the server.

The number of different authors with messages recorded in the cache.

The number of paths listed, as you would see using svn log -v.
Skip ranges
The number of revision ranges which we have not fetched, simply because they haven't been requested. This is a measure of the number of holes in the cache.

The highest revision number stored in the cache.

The number of revisions stored in the cache. This is another measure of cache completeness.

Called before the commit dialog is shown. You might want to use this if the hook modifies a versioned file and affects the list of files that need to be committed and/or commit message. However you should note that because the hook is called at an early stage, the full list of objects selected for commit is not available.

Called after the user clicks OK in the commit dialog, and before the actual commit begins. This hook has a list of exactly what will be committed.

The command line includes several parameters which get filled in by TortoiseSVN. The parameters passed depend upon which hook is called. Each hook has its own parameters which are passed in the following order:

PATHMESSAGEFILECWD

PATHDEPTHMESSAGEFILECWD

PATHDEPTHMESSAGEFILEREVISIONERRORCWD

PATHCWD

PATHDEPTHREVISIONCWD

PATHDEPTHREVISIONERRORCWD
The meaning of each of these parameters is described here:

PATH

DEPTH

-2
svn_depth_unknown
-1
svn_depth_exclude
0
svn_depth_empty
1
svn_depth_files
2
svn_depth_immediates
3
svn_depth_infinity

MESSAGEFILE
Path to a file containing the log message for the commit. The file contains the text in UTF-8 encoding. After successful execution of the start-commit hook, the log message is read back, giving the hook a chance to modify it.
REVISION

ERROR
Path to a file containing the error message. If there was no error, the file will be empty.
CWD
The current working directory with which the script is run. This is set to the common root directory of all affected paths.
Note that although we have given these parameters names for convenience, you do not have to refer to those names in the hook settings. All parameters listed for a particular hook are always passed, whether you want them or not ;-)

Normally you will want to hide ugly DOS boxes when the script runs, so Hide the script while running is checked by default.
Sample client hook scripts can be found in the contrib folder in the TortoiseSVN repository. (“TortoiseSVN 是完全免费的！”一节 explains how to access the repository).
Issue Tracker Integration
TortoiseSVN can use a COM plugin to query issue trackers when in the commit dialog. The use of such plugins is described in “Getting Information from the Issue Tracker”一节. If your system administrator has provided you with a plugin, which you have already installed and registered, this is the place to specify how it integrates with your working copy.

Click on Add... to use the plugin with a particular working copy. Here you can specify the working copy path, choose which plugin to use from a drop down list of all registered issue tracker plugins, and any parameters to pass. The parameters will be specific to the plugin, but might include your user name on the issue tracker so that the plugin can query for issues which are assigned to you.
If you want all users to use the same COM plugin for your project, you can specify the plugin also with the properties bugtraq:provideruuid and bugtraq:providerparams.
bugtraq:provideruuid
This property specifies the COM UUID of the IBugtraqProvider, for example {91974081-2DC7-4FB1-B3BE-0DE1C8D6CE4E}. (this example is the UUID of the Gurtle bugtraq provider, which is a provider for the Google Code issue tracker).
bugtraq:providerparams
This property specifies the parameters passed to the IBugtraqProvider.
Please check the documentation of your IBugtraqProvider plugin to find out what to specify in these two properties.

TortoiseBlame 使用的配置被主上下文菜单控制，不是被 TortoiseBlame 自己直接控制。

TortoiseBlame 可以使用背景色指示文件中行的年龄。你设置最新和最旧版本的颜色后，TortoiseBlame 使用线性插补算法根据每行的版本设置其颜色。

A few infrequently used settings are available only by editing the registry directly. It goes without saying that you should only edit registry values if you know what you are doing.

Debug
To show the command line parameters passed from the shell extension to TortoiseProc.exe create a DWORD key with a value of 1 at HKCU\Software\TortoiseSVN\Debug.
This can be useful if you use something other than the windows explorer or if you get problems with the context menu displaying correctly. create a DWORD key with a value of 0 at HKCU\Software\TortoiseSVN\ShowContextMenuIcons if you don't want TortoiseSVN to not show icons for the shell context menu items. Set this value to 1 to show the icons again.
Block Overlay Status
If you don't want the explorer to update the status overlays while another TortoiseSVN command is running (e.g. Update, Commit, ...) then create a DWORD key with a value of 1 at HKCU\Software\TortoiseSVN\BlockStatus.
Update Check URL
HKCU\Software\TortoiseSVN\UpdateCheckURL contains the URL from which TortoiseSVN tries to download a text file to find out if there are updates available. You can also set this under HKLM instead of HKCU if you want, but HKCU overwrites the setting in HKLM. This might be useful for company admins who don't want their users to update TortoiseSVN until they approve it.

The auto-completion list shown in the commit message editor displays the names of files listed for commit. To also include these names with extensions removed, create a DWORD key with a value of 1 at HKCU\Software\TortoiseSVN\AutocompleteRemovesExtensions.
Explorer columns everywhere
The extra columns the TortoiseSVN adds to the details view in Windows Explorer are normally only active in a working copy. If you want those to be accessible everywhere, not just in working copies, create a DWORD key with a value of 1 at HKCU\Software\TortoiseSVN\ColumnsEveryWhere.

When you merge revisions from another branch, and merge tracking information is available, the log messages from the revisions you merge will be collected to make up a commit log message. A pre-defined string is used to separate the individual log messages of the merged revisions. If you prefer, you can create a SZ key at HKCU\Software\TortoiseSVN\MergeLogSeparator containing a separator string of your choice.

TortoiseSVN allows you to assign external diff viewer. Most such viewers, however, are not suited for change blaming (“追溯不同点”一节), so you might wish to fall back to TortoiseMerge in this case. To do so, create a DWORD key with a value of 1 at HKCU\Software\TortoiseSVN\DiffBlamesWithTortoiseMerge.
Current revision highlighting for folders in log dialog
The log dialog highlights the current working copy revision when the log is shown for a file. To do the same thing for a folder requires a working copy crawl, which is the default action, but it can be a slow operation for large working copies. If you want to change the operation of this feature you must create a DWORD registry key at HKCU\Software\TortoiseSVN\RecursiveLogRev. A value of 0 disables the feature (no highlighting for folders), a value of 1 (default) will fetch the status recursively (find the highest revision in the working copy tree), and a value of 2 will check the revision of the selected folder itself, but will not check any child items.
Make checkout fail if an item of the same name exists
By default, if you checkout a working copy over an existing unversioned folder structure, as you might do after import, then any existing which differ from the repository content will be left unchanged and marked as modified. When you come to commit, it is your local copy which will then be sent back to the repository. Some people would prefer the checkout to fail if the existing content differs, so that if two people add the same file the second person's version does not overwrite the original version by mistake. If you want to force checkouts to fail in this instance you must create a DWORD registry key with value 0 at HKCU\Software\TortoiseSVN\AllowUnversionedObstruction.
Subversion 的工作文件夹

VS.NET 2003 when used with web projects can't handle the .svn folders that Subversion uses to store its internal information. This is not a bug in Subversion. The bug is in VS.NET 2003 and the frontpage extensions it uses.
Note that the bug is fixed in VS2005 and later versions.
As of Version 1.3.0 of Subversion and TortoiseSVN, you can set the environment variable SVN_ASP_DOT_NET_HACK. If that variable is set, then Subversion will use _svn folders instead of .svn folders. You must restart your shell for that environment variable to take effect. Normally that means rebooting your PC. To make this easier, you can now do this from the general settings page using a simple checkbox - refer to “常规设置”一节.

While working on TortoiseSVN we love to listen to music. And since we spend many hours on the project we need a lot of music. Therefore we have set up some wish-lists with our favourite music CDs and DVDs: http://tortoisesvn.tigris.org/donate.html Please also have a look at the list of people who contributed to the project by sending in patches or translations.
SubWCRev是Windows的命令行工具，可以阅读Subversion工作副本的状态，可以在模版中随意执行关键字替换。这通常是构建过程的一部分，将工作副本信息结合到创建的对象当中。通常情况下，可能是用来将修订版本号存入“关于”窗口。

$WCREV$ 用工作副本中最高的提交版本来替换
$WCDATE$ 用最高提交版本的日期/时间替换。默认使用国际化格式：yyyy-mm-dd hh:mm:ss。作为选择，你可以指定 strftime() 使用自定义格式，例如：$WCDATE=%a %b %d %I:%M:%S %p$。格式字符的列表参见 在线引用。

$WCNOW$ Replaced with the current system date/time. This can be used to indicate the build time. Time formatting can be used as described for $WCDATE$.
$WCRANGE$ 在工作目录用更新版本范围替换。如果工作目录处于一致的状态，它是一个单一版本。如果工作目录包含混合版本，或者是过时，或者是故意更新到版本，那么这个范围会用象100:200这样的格式来显示。
$WCMIXED$ 当有混合版本时用 TText 替换 $WCMIXED?TText:FText$，否则用 FText 替换。
$WCMODS$ 若本地存在修改，就用 TText 替换 $WCMODS?TText:FText$，否则用 FText 替换。
$WCURL$ 用传递给SubWCRev的工作目录的版本库地址替换。
$WCINSVN$ $WCINSVN?TText:FText$ is replaced with TText if the entry is versioned, or FText if not.
$WCNEEDSLOCK$ $WCNEEDSLOCK?TText:FText$ is replaced with TText if the entry has the svn:needs-lock property set, or FText if not.
$WCISLOCKED$ $WCISLOCKED?TText:FText$ is replaced with TText if the entry is locked, or FText if not.
$WCLOCKDATE$ Replaced with the lock date. Time formatting can be used as described for $WCDATE$.
$WCLOCKOWNER$ Replaced with the name of the lock owner.
$WCLOCKCOMMENT$ Replaced with the comment of the lock.

Some of these keywords apply to single files rather than to an entire working copy, so it only makes sense to use these when SubWCRev is called to scan a single file. This applies to $WCINSVN$, $WCNEEDSLOCK$, $WCISLOCKED$, $WCLOCKDATE$, $WCLOCKOWNER$ and $WCLOCKCOMMENT$.

// Test file for SubWCRev: testfile.tmpl

char *Revision = "$WCREV$";

char *Modified = "$WCMODS?Modified:Not modified$";

char *Date = "$WCDATE$";

char *Range = "$WCRANGE$";

char *Mixed = "$WCMIXED?Mixed revision WC:Not mixed$";

char *URL = "$WCURL$";

#if $WCMODS?1:0$

#error Source is modified

#endif

// End of file

After running SubWCRev.exe path\to\workingcopy testfile.tmpl testfile.txt, the output file testfile.txt would looks like this:
// Test file for SubWCRev: testfile.txt

char *Revision = "3701";

char *Modified = "Modified";

char *Date = "2005/06/15 11:15:12";

char *Range = "3699:3701";

char *Mixed = "Mixed revision WC";

char *URL = "http://project.domain.org/svn/trunk/src";

#if 1

#error Source is modified

#endif

// End of file

A file like this will be included in the build so you would expect it to be versioned. Be sure to version the template file, not the generated file, otherwise each time you regenerate the version file you need to commit the change, which in turn means the version file needs to be updated.

.GetWCInfo This method traverses the working copy gathering the revision information. Naturally you must call this before you can access the information using the remaining methods. The first parameter is the path. The second parameter should be true if you want to include folder revisions. Equivalent to the -f command line switch. The third parameter should be true if you want to include svn:externals. Equivalent to the -e command line switch.
.Revision 工作副本中的最高提交版本。等价于 $WCREV$
.Date 最高提交版本的提交日期/时间。等价于 $WCDATE$
.Author 最高提交版本的作者，也就是工作副本中最后提交修改的人。
.MinRev 最小的更新版本，在 $WCRANGE$ 中描述
.MaxRev 最大的更新版本，在 $WCRANGE$ 中描述
.HasModifications 若本地存在修改，就为真
.Url 在 GetWCInfo 中使用，用工作副本的版本库之 URL 替换。等价于 $WCURL$
.IsSvnItem True if the item is versioned.
.NeedsLocking True if the item has the svn:needs-lock property set.
.IsLocked True if the item is locked.
.LockCreationDate String representing the date when the lock was created, or an empty string if the item is not locked.
.LockOwner String representing the lock owner, or an empty string if the item is not locked.
.LockComment The message entered when the lock was created.

// testCOM.js - javascript file

// test script for the SubWCRev COM/Automation-object

filesystem = new ActiveXObject("Scripting.FileSystemObject");

revObject1 = new ActiveXObject("SubWCRev.object");

revObject2 = new ActiveXObject("SubWCRev.object");

revObject3 = new ActiveXObject("SubWCRev.object");

revObject4 = new ActiveXObject("SubWCRev.object");

revObject1.GetWCInfo(

filesystem.GetAbsolutePathName("."), 1, 1);

revObject2.GetWCInfo(

filesystem.GetAbsolutePathName(".."), 1, 1);

revObject3.GetWCInfo(

filesystem.GetAbsolutePathName("SubWCRev.cpp"), 1, 1);

revObject4.GetWCInfo(

filesystem.GetAbsolutePathName("..\\.."), 1, 1);

wcInfoString1 = "Revision = " + revObject1.Revision +

"\nMin Revision = " + revObject1.MinRev +

"\nMax Revision = " + revObject1.MaxRev +

"\nDate = " + revObject1.Date +

"\nURL = " + revObject1.Url + "\nAuthor = " +

revObject1.Author + "\nHasMods = " +

revObject1.HasModifications + "\nIsSvnItem = " +

revObject1.IsSvnItem + "\nNeedsLocking = " +

revObject1.NeedsLocking + "\nIsLocked = " +

revObject1.IsLocked + "\nLockCreationDate = " +

revObject1.LockCreationDate + "\nLockOwner = " +

revObject1.LockOwner + "\nLockComment = " +

revObject1.LockComment;

wcInfoString2 = "Revision = " + revObject2.Revision +

"\nMin Revision = " + revObject2.MinRev +

"\nMax Revision = " + revObject2.MaxRev +

"\nDate = " + revObject2.Date +

"\nURL = " + revObject2.Url + "\nAuthor = " +

revObject2.Author + "\nHasMods = " +

revObject2.HasModifications + "\nIsSvnItem = " +

revObject2.IsSvnItem + "\nNeedsLocking = " +

revObject2.NeedsLocking + "\nIsLocked = " +

revObject2.IsLocked + "\nLockCreationDate = " +

revObject2.LockCreationDate + "\nLockOwner = " +

revObject2.LockOwner + "\nLockComment = " +

revObject2.LockComment;

wcInfoString3 = "Revision = " + revObject3.Revision +

"\nMin Revision = " + revObject3.MinRev +

"\nMax Revision = " + revObject3.MaxRev +

"\nDate = " + revObject3.Date +

"\nURL = " + revObject3.Url + "\nAuthor = " +

revObject3.Author + "\nHasMods = " +

revObject3.HasModifications + "\nIsSvnItem = " +

revObject3.IsSvnItem + "\nNeedsLocking = " +

revObject3.NeedsLocking + "\nIsLocked = " +

revObject3.IsLocked + "\nLockCreationDate = " +

revObject3.LockCreationDate + "\nLockOwner = " +

revObject3.LockOwner + "\nLockComment = " +

revObject3.LockComment;

wcInfoString4 = "Revision = " + revObject4.Revision +

"\nMin Revision = " + revObject4.MinRev +

"\nMax Revision = " + revObject4.MaxRev +

"\nDate = " + revObject4.Date +

"\nURL = " + revObject4.Url + "\nAuthor = " +

revObject4.Author + "\nHasMods = " +

revObject4.HasModifications + "\nIsSvnItem = " +

revObject4.IsSvnItem + "\nNeedsLocking = " +

revObject4.NeedsLocking + "\nIsLocked = " +

revObject4.IsLocked + "\nLockCreationDate = " +

revObject4.LockCreationDate + "\nLockOwner = " +

revObject4.LockOwner + "\nLockComment = " +

revObject4.LockComment;

WScript.Echo(wcInfoString1);

WScript.Echo(wcInfoString2);

WScript.Echo(wcInfoString3);

WScript.Echo(wcInfoString4);

To get a tighter integration with issue trackers than by simply using the bugtraq: properties, TortoiseSVN can make use of COM plugins. With such plugins it is possible to fetch information directly from the issue tracker, interact with the user and provide information back to TortoiseSVN about open issues, verify log messages entered by the user and even run actions after a successful commit to e.g, close an issue.
We can't provide information and tutorials on how you have to implement a COM object in your preferred programming language, but we have example plugins in C++/ATL and C# in our repository in the contrib/issue-tracker-plugins folder. In that folder you can also find the required include files you need to build your plugin. (“TortoiseSVN 是完全免费的！”一节 explains how to access the repository).
The IBugtraqProvider interface
TortoiseSVN 1.5 can use plugins which implement the IBugtraqProvider interface. The interface provides a few methods which plugins can use to interact with the issue tracker.
HRESULT ValidateParameters (

// Parent window for any UI that needs to be

// displayed during validation.

[in] HWND hParentWnd,

// The parameter string that needs to be validated.

[in] BSTR parameters,

// Is the string valid?

[out, retval] VARIANT_BOOL *valid

);

This method is called from the settings dialog where the user can add and configure the plugin. The parameters string can be used by a plugin to get additional required information, e.g., the URL to the issue tracker, login information, etc. The plugin should verify the parameters string and show an error dialog if the string is not valid. The hParentWnd parameter should be used for any dialog the plugin shows as the parent window. The plugin must return TRUE if the validation of the parameters string is successful. If the plugin returns FALSE, the settings dialog won't allow the user to add the plugin to a working copy path.

// Parent window for any (error) UI that needs to be displayed.

[in] HWND hParentWnd,

// The parameter string, just in case you need to talk to your

// web service (e.g.) to find out what the correct text is.

[in] BSTR parameters,

// What text do you want to display?

// Use the current thread locale.

);

The plugin can provide a string here which is used in the TortoiseSVN commit dialog for the button which invokes the plugin, e.g., "Choose issue" or "Select ticket". Make sure the string is not too long, otherwise it might not fit into the button. If the method returns an error (e.g., E_NOTIMPL), a default text is used for the button.
HRESULT GetCommitMessage (

// Parent window for your provider's UI.

[in] HWND hParentWnd,

[in] BSTR parameters,

[in] BSTR commonRoot,

[in] SAFEARRAY(BSTR) pathList,

// The text already present in the commit message.

// Your provider should include this text in the new message,

// where appropriate.

[in] BSTR originalMessage,

// The new text for the commit message.

// This replaces the original message.

[out, retval] BSTR *newMessage

);

This is the main method of the plugin. This method is called from the TortoiseSVN commit dialog when the user clicks on the plugin button. The parameters string is the string the user has to enter in the settings dialog when he configures the plugin. Usually a plugin would use this to find the URL of the issue tracker and/or login information or more. The commonRoot string contains the parent path of all items selected to bring up the commit dialog. Note that this is not the root path of all items which the user has selected in the commit dialog. The pathList parameter contains an array of paths (as strings) which the user has selected for the commit. The originalMessage parameter contains the text entered in the log message box in the commit dialog. If the user has not yet entered any text, this string will be empty. The newMessage return string is copied into the log message edit box in the commit dialog, replacing whatever is already there. If a plugin does not modify the originalMessage string, it must return the same string again here, otherwise any text the user has entered will be lost.
The IBugtraqProvider2 interface
In TortoiseSVN 1.6 a new interface was added which provides more functionality for plugins. This IBugtraqProvider2 interface inherits from IBugtraqProvider.
HRESULT GetCommitMessage2 (

// Parent window for your provider's UI.

[in] HWND hParentWnd,

[in] BSTR parameters,

// The common URL of the commit

[in] BSTR commonURL,

[in] BSTR commonRoot,

[in] SAFEARRAY(BSTR) pathList,

// The text already present in the commit message.

// Your provider should include this text in the new message,

// where appropriate.

[in] BSTR originalMessage,

// You can assign custom revision properties to a commit

// by setting the next two params.

// note: Both safearrays must be of the same length.

// For every property name there must be a property value!

// The content of the bugID field (if shown)

[in] BSTR bugID,

// Modified content of the bugID field

[out] BSTR * bugIDOut,

// The list of revision property names.

[out] SAFEARRAY(BSTR) * revPropNames,

// The list of revision property values.

[out] SAFEARRAY(BSTR) * revPropValues,

// The new text for the commit message.

// This replaces the original message

[out, retval] BSTR * newMessage

);

This method is called from the TortoiseSVN commit dialog when the user clicks on the plugin button. This method is called instead of GetCommitMessage(). Please refer to the documentation for GetCommitMessage for the parameters that are also used there. The parameter commonURL is the parent URL of all items selected to bring up the commit dialog. This is basically the URL of the commonRoot path. The parameter bugID contains the content of the bug-ID field (if it is shown, configured with the property bugtraq:message). The return parameter bugIDOut is used to fill the bug-ID field when the method returns. The revPropNames and revPropValues return parameters can contain name/value pairs for revision properties that the commit should set. A plugin must make sure that both arrays have the same size on return! Each property name in revPropNames must also have a corresponding value in revPropValues. If no revision properties are to be set, the plugin must return empty arrays.
HRESULT CheckCommit (

[in] HWND hParentWnd,

[in] BSTR parameters,

[in] BSTR commonURL,

[in] BSTR commonRoot,

[in] SAFEARRAY(BSTR) pathList,

[in] BSTR commitMessage,

[out, retval] BSTR * errorMessage

);

This method is called right before the commit dialog is closed and the commit begins. A plugin can use this method to validate the selected files/folders for the commit and/or the commit message entered by the user. The parameters are the same as for GetCommitMessage2(), with the difference that commonURL is now the common URL of all checked items, and commonRoot the root path of all checked items. The return parameter errorMessage must either contain an error message which TortoiseSVN shows to the user or be empty for the commit to start. If an error message is returned, TortoiseSVN shows the error string in a dialog and keeps the commit dialog open so the user can correct whatever is wrong. A plugin should therefore return an error string which informs the user what is wrong and how to correct it.
HRESULT OnCommitFinished (

// Parent window for any (error) UI that needs to be displayed.

[in] HWND hParentWnd,

// The common root of all paths that got committed.

[in] BSTR commonRoot,

// All the paths that got committed.

[in] SAFEARRAY(BSTR) pathList,

// The text already present in the commit message.

[in] BSTR logMessage,

// The revision of the commit.

[in] ULONG revision,

// An error to show to the user if this function

// returns something else than S_OK

[out, retval] BSTR * error

);

This method is called after a successful commit. A plugin can use this method to e.g., close the selected issue or add information about the commit to the issue. The parameters are the same as for GetCommitMessage2.
HRESULT HasOptions(

// Whether the provider provides options

[out, retval] VARIANT_BOOL *ret

);

This method is called from the settings dialog where the user can configure the plugins. If a plugin provides its own configuration dialog with ShowOptionsDialog, it must return TRUE here, otherwise it must return FALSE.
HRESULT ShowOptionsDialog(

// Parent window for the options dialog

[in] HWND hParentWnd,

[in] BSTR parameters,

// The parameters string

[out, retval] BSTR * newparameters

);

This method is called from the settings dialog when the user clicks on the "Options" button that is shown if HasOptions returns TRUE. A plugin can show an options dialog to make it easier for the user to configure the plugin. The parameters string contains the plugin parameters string that is already set/entered. The newparameters return parameter must contain the parameters string which the plugin constructed from the info it gathered in its options dialog. That paramameters string is passed to all other IBugtraqProvider and IBugtraqProvider2 methods.
Because TortoiseSVN is being developed all the time it is sometimes hard to keep the documentation completely up to date. We maintain an online FAQ which contains a selection of the questions we are asked the most on the TortoiseSVN mailing lists <dev@tortoisesvn.tigris.org> and <users@tortoisesvn.tigris.org>.
We also maintain a project Issue Tracker which tells you about some of the things we have on our To-Do list, and bugs which have already been fixed. If you think you have found a bug, or want to request a new feature, check here first to see if someone else got there before you.
If you have a question which is not answered anywhere else, the best place to ask it is on one of the mailing lists. <users@tortoisesvn.tigris.org> is the one to use if you have questions about using TortoiseSVN. If you want to help out with the development of TortoiseSVN, then you should take part in discussions on <dev@tortoisesvn.tigris.org>.

The recommended way is by right-dragging the files to the new location. Simply right-click on the files you want to move/copy without releasing the mouse button. Then drag the files to the new location and release the mouse button. A context menu will appear where you can either choose Context Menu → SVN Copy versioned files here. or Context Menu → SVN Move versioned files here.

In the repository folder on the server, there's a sub-folder hooks which contains some example hook scripts you can use. The file pre-commit.tmpl contains a sample script which will reject commits if no log message is supplied, or the message is too short. The file also contains comments on how to install/use this script. Just follow the instructions in that file.

TortoiseSVN 使用属性来控制它的一些特性。这其中有一个 tsvn:logminsize 属性。

4. 选中想要恢复变更的文件或者文件夹。如果想要恢复所有的变更，需要选中最顶层的文件夹。
5. Select TortoiseSVN → Show Log to display a list of revisions. You may need to use Show All or Next 100 to show the revision(s) you are interested in.
6. Select the revision you wish to revert. If you want to undo a range of revisions, select the first one and hold the Shift key while selecting the last one. Note that for multiple revisions, the range must be unbroken with no gaps. Right click on the selected revision(s), then select Context Menu → Revert changes from this revision.
7. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision. This will discard all changes after the selected revision.

8. 在工作副本上选择TortoiseSVN → 合并。
9. In the From: field enter the full folder URL of the branch or tag containing the changes you want to revert in your working copy. This should come up as the default URL.
10. 在起始版本文本框里输入当前工作副本的版本号。如果能够保证没有其他人会提交变更，可以使用最新版本。
11. 确认使用“起始: ”的 URL检查框处于被选中的状态。
12. In the To Revision field enter the revision number that you want to revert to, namely the one before the first revision to be reverted.
13. 点击合并按钮完成合并。

The only way to remove data from the repository is to use the Subversion command line tool svnadmin. You can find a description of how this works in the Repository Maintenance.
Compare two revisions of a file or folder

If you want to compare two revisions in an item's history, for example revisions 100 and 200 of the same file, just use TortoiseSVN → Show Log to list the revision history for that file. Pick the two revisions you want to compare then use Context Menu → Compare Revisions.
If you want to compare the same item in two different trees, for example the trunk and a branch, you can use the repository browser to open up both trees, select the file in both places, then use Context Menu → Compare Revisions.
If you want to compare two trees to see what has changed, for example the trunk and a tagged release, you can use TortoiseSVN → Revision Graph Select the two nodes to compare, then use Context Menu → Compare HEAD Revisions. This will show a list of changed files, and you can then select individual files to view the changes in detail. You can also export a tree structure containing all the changed files, or simply a list of all changed files. Read “比较文件夹”一节 for more information. Alternatively use Context Menu → Unified Diff of HEAD Revisions to see a summary of all differences, with minimal context.

Set the svn:externals property for a folder in your project. This property consists of one or more lines; each line has the name of a sub-folder which you want to use as the checkout folder for common code, and the repository URL that you want to be checked out there. For full details refer to “外部条目”一节.
Commit the new folder. Now when you update, Subversion will pull a copy of that project from its repository into your working copy. The sub-folders will be created automatically if required. Each time you update your main working copy, you will also receive the latest version of all external projects.

C:\Projects\Proj1

C:\Projects\Proj2

C:\Projects\Proj3

C:\Projects\Common

SUBST X: "D:\Documents\framework"

#include "X:\superio\superio.h"

TortoiseProc.exe /command:repobrowser /path:"url/to/repository"

14. 用 Shift 键获得扩展上下文菜单，使用 TortoiseSVN → 删除(保留版本副本) 标记文件/目录从版本库删除，但是保留版本副本。
15. TortoiseSVN → 提交父目录。
16. 将文件/目录增加到忽略列表，所以你不会再遇到同样的麻烦。

If you have a working copy which you want to convert back to a plain folder tree without the .svn directories, you can simply export it to itself. Read “从版本控制里移除删除工作副本”一节 to find out how.

TortoiseSVN会每隔几天检查是否有新版本可以下载，如果有新版本存在，会给用户显示相关信息的对话框。

Versions 1.4.0 and later of TortoiseSVN allow you to redirect that upgrade check to your intranet server. You can set the registry key HKCU\Software\TortoiseSVN\UpdateCheckURL (string value) to an URL pointing to a text file in your intranet. That text file must have the following format:
1.4.1.6000

The first line in that file is the version string. You must make sure that it matches the exact version string of the TortoiseSVN installation package. The second line is a custom text, shown in the upgrade dialog. You can write there whatever you want. Just note that the space in the upgrade dialog is limited. Too long messages will get truncated! The third line is the URL to the new installation package. This URL is opened when the user clicks on the custom message label in the upgrade dialog. You can also just point the user to a web page instead of the MSI file directly. The URL is opened with the default web browser, so if you specify a web page, that page is opened and shown to the user. If you specify the MSI package, the browser will ask the user to save the MSI file locally.

As of version 1.4.0 and later, the TortoiseSVN installer doesn't provide the user with the option to set the SVN_ASP_DOT_NET_HACK environment variable anymore, since that caused many problems and confusions with users which always install everything no matter if they know what it is for.
But that option is only hidden for the user. You still can force the TortoiseSVN installer to set that environment variable by setting the ASPDOTNETHACK property to TRUE. For example, you can start the installer like this:
msiexec /i TortoiseSVN-1.4.0.msi ASPDOTNETHACK=TRUE

As of version 1.5.0 and later, TortoiseSVN allows you to disable (actually, hide) context menu entries. Since this is a feature which should not be used lightly but only if there is a compelling reason, there is no GUI for this and it has to be done directly in the registry. This can be used to disable certain commands for users who should not use them. But please note that only the context menu entries in the explorer are hidden, and the commands are still available through other means, e.g. the command line or even other dialogs in TortoiseSVN itself!

0x0000000000000001 检出
0x0000000000000002 更新
0x0000000000000004 提交
0x0000000000000008 添加
0x0000000000000010 恢复
0x0000000000000020 清理
0x0000000000000040 解决
0x0000000000000080 切换
0x0000000000000100 导入
0x0000000000000200 输出
0x0000000000000400 在当前位置创建版本库
0x0000000000000800 分支/标记
0x0000000000001000 合并
0x0000000000002000 删除
0x0000000000004000 改名
0x0000000000008000 更新到版本
0x0000000000010000 差异
0x0000000000020000 显示日志
0x0000000000040000 编辑冲突
0x0000000000080000 重新定位
0x0000000000100000 检查修改
0x0000000000200000 忽略
0x0000000000400000 版本库浏览器
0x0000000000800000 追溯
0x0000000001000000 创建补丁
0x0000000002000000 应用补丁(Apply Patch)
0x0000000004000000 版本图
0x0000000008000000 锁
0x0000000010000000 删除锁
0x0000000020000000 属性
0x0000000040000000 与 URL 比较
0x0000000080000000 删除未版本控制的项目
0x2000000000000000 设置
0x4000000000000000 帮助
0x8000000000000000 关于

Example: to disable the “Relocate” the “Delete unversioned items” and the “Settings” menu entries, add the values assigned to the entries like this:
0x0000000000080000

+ 0x0000000080000000

+ 0x2000000000000000

= 0x2000000080080000

:log 打开日志对话框，/path 指定了显示日志的文件或目录，另外还有三个选项可以设置: /startrev:xxx、/endrev:xxx和/strict
:checkout 打开检出对话框，/path指定了目标路径，而/url制定了检出的URL。
:import 打开导入对话框，/path 指定了数据导入路径。
:commit 打开提交对话框，/path 指定了目标路径或需要提交的文件列表，你也可以使用参数 /logmsg 给提交窗口传递预定义的日志信息，或者你不希望将日志传递给命令行，你也可以使用 /logmsgfile:path，path 指向了保存日志信息的文件。为了预先填入bug的ID(如果你设置了集成bug追踪属性)，你可以使用/bugid:"the bug id here"完成这个任务。
:revert 恢复工作副本的本地修改，/path说明恢复哪些条目。
:cleanup 清理中断和终止的操作，将工作副本的/path解锁。
:resolve 将/path指定文件的冲突标示为解决，如果给定/noquestion，解决不会向用户确认操作。
:repocreate 在/path创建一个版本库。
:switch 打开选项对话框。/path 指定目标目录。
:export 将/path的工作副本导出到另一个目录，如果/path指向另一个未版本控制目录，对话框会询问要导出到/path的URL。
:merge Opens the merge dialog. The /path specifies the target directory. For merging a revision range, the following options are available: /fromurl:URL, /revrange:string. For merging two repository trees, the following options are available: /fromurl:URL, /tourl:URL, /fromrev:xxx and /torev:xxx. These pre-fill the relevant fields in the merge dialog.
:mergeall Opens the merge all dialog. The /path specifies the target directory.
:copy Brings up the branch/tag dialog. The /path is the working copy to branch/tag from. And the /url is the target URL. You can also specify the /logmsg switch to pass a predefined log message to the branch/tag dialog. Or, if you don't want to pass the log message on the command line, use /logmsgfile:path, where path points to a file containing the log message.
:settings 打开设置对话框。
:remove 从版本控制里移除/path中的文件。
:rename 重命名/path的文件，会在对话框中询问新文件，为了防止一个步骤中询问相似文件，传递/noquestion。
:diff Starts the external diff program specified in the TortoiseSVN settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is omitted, then the diff is done between the file in /path and its BASE. To explicitly set the revision numbers use /startrev:xxx and /endrev:xxx. If /blame is set and /path2 is not set, then the diff is done by first blaming the files with the given revisions.
:showcompare Depending on the URLs and revisions to compare, this either shows a unified diff (if the option unified is set), a dialog with a list of files that have changed or if the URLs point to files starts the diff viewer for those two files.
The options url1, url2, revision1 and revision2 must be specified. The options pegrevision, ignoreancestry, blame and unified are optional.
:conflicteditor Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path.
:relocate 打开重定位对话框，/path指定了重定位的工作副本路径。
:help 打开帮助文件
:repostatus 打开为修改检出对话框，/path 指定了工作副本目录。
:repobrowser Starts the repository browser dialog, pointing to the URL of the working copy given in /path or /path points directly to an URL. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD. If /path points to an URL, the /projectpropertiespath:path/to/wc specifies the path from where to read and use the project properties.
:ignore 将/path中的对象加入到忽略列表，也就是将这些文件添加到 svn:ignore 属性。
:blame 为 /path 选项指定的文件打开追溯对话框。

:cat 将/path指定的工作副本或URL的文件保存到/savepath:path，修订版本号在/revision:xxx，这样可以得到特定修订版本的文件。
:createpatch 创建/path下的补丁文件。
:revisiongraph 显示/path目录下的版本变化图。
:lock Locks a file or all files in a directory given in /path. The 'lock' dialog is shown so the user can enter a comment for the lock.
:unlock Unlocks a file or all files in a directory given in /path.
:rebuildiconcache Rebuilds the windows icon cache. Only use this in case the windows icons are corrupted. A side effect of this (which can't be avoided) is that the icons on the desktop get rearranged. To suppress the message box, pass /noquestion.
:properties 显示 /path 给出的路径之属性对话框。

Examples (which should be entered on one line):
TortoiseProc.exe /command:commit

/path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"

/logmsg:"test log message" /closeonend:0

TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0

TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"

/startrev:50 /endrev:60 /closeonend:0

If you think you have found a bug in TortoiseSVN, we may ask you to try to reproduce it using the CLI, so that we can distinguish TortoiseSVN issues from Subversion issues. This reference tells you which command to try.

In the descriptions which follow, the URL for a repository location is shown simply as URL, and an example might be http://tortoisesvn.googlecode.com/svn/trunk. The working copy path is shown simply as PATH, and an example might be C:\TortoiseSVN\trunk.

svn info URL_of_WC

svn update [-r rev] [-N] [--ignore-externals] PATH

svn status -v PATH

svn commit -m "LogMessage" [-N] [--no-unlock] PATH...

svn diff PATH

If you use Diff from the main context menu, you are diffing a modified file against its BASE revision. The output from the CLI command above also does this and produces output in unified-diff format. However, this is not what TortoiseSVN is using. TortoiseSVN uses TortoiseMerge (or a diff program of your choosing) to display differences visually between full-text files, so there is no direct CLI equivalent.

svn log -v -r 0:N --limit 100 [--stop-on-copy] PATH

svn log -v -r M:N [--stop-on-copy] PATH

svn status -v PATH

svn status -u -v PATH

TortoiseSVN执行了这些操作
svn info URL_of_WC

svn log -v URL

svn info URL_of_WC

svn list [-r rev] -v URL

svn status -v PATH

svn revert [-R] PATH...

svn status -v PATH

svn lock -m "LockMessage" [--force] PATH...

svn copy -m "LogMessage" URL URL

svn copy -m "LogMessage" URL@rev URL@rev

svn copy -m "LogMessage" PATH URL

Every file and folder has a Subversion status value as reported by the Subversion library. In the command line client, these are represented by single letter codes, but in TortoiseSVN they are shown graphically using the icon overlays. Because the number of overlays is very limited, each overlay may represent one of several status values.

The Conflicted overlay is used to represent the conflicted state, where an update or switch results in conflicts between local changes and changes downloaded from the repository. It is also used to indicate the obstructed state, which can occur when an operation is unable to complete.

The Modified overlay represents the modified state, where you have made local modifications, the merged state, where changes from the repository have been merged with local changes, and the replaced state, where a file has been deleted and replaced by another different file with the same name.

The Deleted overlay represents the deleted state, where an item is scheduled for deletion, or the missing state, where an item is not present. Naturally an item which is missing cannot have an overlay itself, but the parent folder can be marked if one of its child items is missing.

The Added overlay is simply used to represent the added status when an item has been added to version control.

The In Subversion overlay is used to represent an item which is in the normal state, or a versioned item whose state is not yet known. Because TortoiseSVN uses a background caching process to gather status, it may take a few seconds before the overlay updates.

The Needs Lock overlay is used to indicate when a file has the svn:needs-lock property set. For working copies which were created using Subversion 1.4.0 and later, the svn:needs-lock status is cached locally by Subversion and this is used to determine when to show this overlay. For working copies which are in pre-1.4.x format, TortoiseSVN shows this overlay when the file has read-only status. Note that Subversion automatically upgrades working copies when you update them, although the caching of the svn:needs-lock property may not happen until the file itself is updated.

The Ignored overlay is used to represent an item which is in the ignored state, either due to a global ignore pattern, or the svn:ignore property of the parent folder. This overlay is optional.

The Unversioned overlay is used to represent an item which is in the unversioned state. This is an item in a versioned folder, but which is not under version control itself. This overlay is optional.
If an item has subversion status none (the item is not within a working copy) then no overlay is shown. If you have chosen to disable the Ignored and Unversioned overlays then no overlay will be shown for those files either.

In fact, you may find that not all of these icons are used on your system. This is because the number of overlays allowed by Windows is limited to 15. Windows uses 4 of those, and the remaining 11 can be used by other applications. If there are not enough overlay slots available, TortoiseSVN tries to be a “Good Citizen (TM)” and limits its use of overlays to give other apps a chance.

• Normal, Modified and Conflicted are always loaded and visible.
• Deleted is loaded if possible, but falls back to Modified if there are not enough slots.
• Read-Only is loaded if possible, but falls back to Normal if there are not enough slots.
• Locked is only loaded if there are fewer than 13 overlays already loaded. It falls back to Normal if there are not enough slots.
• Added is only loaded if there are fewer than 14 overlays already loaded. It falls back to Modified if there are not enough slots.

10-29 4万+
07-11 1万+

05-08 30万+
07-22 3万+
01-13 4710
10-06 1886
01-28
09-02 7109
09-24 705
09-13 3164