TortoiseSVN的设置
想知道不同的设置是干什么用的,你只需将鼠标指针在编辑框/选项框上停留一秒钟...一个帮助提示气泡就会弹出来。
常规设置
图 4.68. 设置对话框,常规设置页面
这个对话框允许你指定自己喜欢的语言,同时也可做那些与Subversion相关的特殊设置。
-
语言
-
选择你TSVN的用户界面语言。不然你还期望从这里得到啥别的?
检查更新
-
TortoiseSVN will contact its download site periodically to see if there is a newer version of the program available. If there is it will show a notification link in the commit dialog. Use Check now if you want an answer right away. The new version will not be downloaded; you simply receive an information dialog telling you that the new version is available.
系统声音
-
TSVN已经默认安装了三个自定义声音。
-
错误
-
提示
-
警告
你可以使用Windows控制面板中的声音属性,来选择不同的声音(或是把这些声音完全关掉)。配置 按钮是一个打开控制面板声音属性的快捷方式。
Use Aero Dialogs
-
-
On Windows Vista and later systems this controls whether dialogs use the Aero styling.
Create Library
-
On Windows 7 you can create a Library in which to group working copies which are scattered in various places on your system.
全局忽略样式
-
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.值得注意的是,你在这里指定的忽略样式将同样作用于你本机上的其他Subversion客户端,包括命令行客户端。
小心
如果你象下面段落那样使用Subversion配置文件来设置一个
全局-忽略
样式,那么它将覆盖你在这里做的设置。该Subversion配置文件可以象下面段落描述的那样,通过 编辑 按钮来访问。This ignore pattern will affect all your projects. It is not versioned, so it will not affect other users. By contrast you can also use the versioned
svn:ignore
orsvn:global-ignores
property to exclude files or directories from version control. Read “忽略文件和目录”一节 for more information.
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.
Apply local modifications to svn:externals when updating
-
This option tells TortoiseSVN to always apply local modifications to the
svn:externals
property when updating the working copy.
右键菜单配置
图 4.69. 设置对话框,右键菜单页面
该页面允许你指定: 在TortoiseSVN的主上下文菜单中哪些条目可以直接在鼠标右键菜单显示,哪些在TortoiseSVN子菜单显示。默认情况下很多项未被勾选,只在子菜单显示。
获得锁会有一个特别的情况,你可以将其提升到顶级带但,但是大多数文件不需要锁定,这样做只是添加了混乱。然而,一个标记为svn:needs-lock
属性的文件每次编辑前都需要那个操作,所以这个菜单会进入顶级菜单会比较方便。选定这个选项,会使设置svn:needs-lock
属性的文件的Get Lock出现在顶级菜单中。
Most of the time, you won't need the TortoiseSVN context menu, apart for folders that are under version control by Subversion. For non- versioned folders, you only really need the context menu when you want to do a checkout. If you check the option Hide menus for unversioned paths
, TortoiseSVN will not add its entries to the context menu for unversioned folders. But the entries are added for all items and paths in a versioned folder. And you can get the entries back for unversioned folders by holding the Shift key down while showing the context menu.
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.
TSVN对话框设置一
图 4.70. 设置对话框,对话框一页面
此对话框允许你按照喜欢的方式去配置一些TSVN的对话框。
-
默认的日志信息数
-
限制你首次选择 TortoiseSVN → 显示日志 时,TortoiseSVN 从服务器获取的日志信息数。在服务器连接缓慢时很有用。你可以使用 全部获取 或 下100条 来获得更多信息。
日志信息字体
-
选择日志信息显示的字体样式和大小,作用域为版本日志对话框的中间窗格,以及提交对话框时填写日志信息的窗格。
日志信息使用短日期/时间格式
-
如果标准长度的日期/时间信息占在用了过多的屏幕空间,可以使用短格式。
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.
Auto-close
-
当一个动作正确无误地完成时,TSVN可以自动关闭所有的进程对话框。这项设置允许你选择在何种情况下关闭对话框。默认(推荐)的设置是 手动关闭 ,允许你重新浏览所有信息并检查发生了什么。当然,你可能会决定忽略某些类型的信息并在你的操作没做出什么重大改变的情况下让对话框自动关闭。
如无合并、添加、删除操作,自动关闭 意味着如果有简单更新的话,进程对话框将关闭。但如果版本库的更改和你的内容进行了合并,或若有任何文件被添加或删除,对话框将保持打开。若操作中发生什么冲突和错误这些对话框也将同样保持打开。
无冲突时自动关闭 更放宽了标准,即使在无合并、添加、删除操作时也同样关闭对话框。当然,如果操作发生了任何冲突或错误,对话框将保持打开。
如无错误,自动关闭 即使在有冲突发生时也会关闭。维持对话框打开的唯一条件是发生了错误,使得Subversion无法完成任务。举个例子,一个更新操作由于服务器不可达而失败了,或是一个提交操作因为工作副本已经过期而失败。
对本地操作始终关闭对话框
-
Local operations like adding files or reverting changes do not need to contact the repository and complete quickly, so the progress dialog is often of little interest. Select this option if you want the progress dialog to close automatically after these operations, unless there are errors.
在还原的时候使用回收站
-
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
-
在合并对话框里,默认行为是在每次合并中记忆 起始: 的URL。无论如何,都有某些人喜欢在他们的版本进化树中从很多不同的位置执行合并操作,他们发现从当前工作副本的URL开始更方便些。该URL可以随后被编辑来指向一个同级路径或另一个分支。
缺省检出路径
-
你可以指定缺省的检出路径。如果你保持所有检出在同一个地方,那么预先填写的路径是极为有用的,这样你只需要在路径末尾增加新的目录名称即可。
缺省检出URL
-
你可以指定缺省的检出URL。如果你经常检出一些大项目的子工程,那么预先填写的URL是极为有用的,这样你只需要在路径末尾增加新的工程名称即可。
TSVN对话框设置二
图 4.71. 设置对话框,对话框二页面
-
递归处理未进行版本控制的文件夹
-
若这个选项框被选中(默认状态),那么一个非版本控制的文件夹,不论在 添加,提交 或 检查修改 时显示的是什么状态,它的每个子文件和子文件夹都要同样显示。取消选择将减少这些对话框中的混乱程度。这样一来如果你选择添加一个非版本控制的文件夹,将会非递归地添加。
In the Check for Modifications dialog you can opt to see ignored items. If this box is checked then whenever an ignored folder is found, all child items will be shown as well.
自动完成文件路径和关键词
-
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.
如果提交失败,自动重新打开提交和分支/标签对话框
-
When a commit fails for some reason (working copy needs updating, pre-commit hook rejects commit, network error, etc), you can select this option to keep the commit dialog open ready to try again.
自动选择项目
-
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.
启动时连接版本库
-
“检查修改”对话框将默认检查工作副本,但仅当你点击 检查版本库 时才连接你的版本库做检查。若你想总是去检查版本库,就可以使用该设置来使版本库检查的动作每次都自动启动。
在锁定文件之前显示加锁对话框
-
当你选择一个或多个文件,然后选择 TortoiseSVN → 加锁 后,一些项目的惯例是写加锁信息,解释你为什么锁定这些文件。如果你不使用加锁信息,可以取消此选择框,从而略过对话框,直接锁定文件。
如果你在目录上使用加锁命令,一定会出现加锁对话框,因为它要让你选择加锁的文件。
如果你的项目使用了
tsvn:lockmsgminsize
属性,那么不管你如何设置,都会看到加锁对话框,因为此项目需要加锁信息。
tsvn:projectlanguage
时才进行拼写检查
TortoiseSVN Dialog Settings 3
图 4.72. The Settings Dialog, Dialogs 3 Page
-
预取文件夹以加速浏览
-
If this box is checked (default state), then the repository browser fetches information about shown folders in the background. That way as soon as you browse into one of those folders, the information is already available.
Some servers however can't handle the multiple requests this causes or when not configured correctly treat so many requests as something bad and start blocking them. In this case you can disable the pre-fetching here.
显示外部
-
If this box is checked (default state), then the repository browser shows files and folders that are included with the
svn:externals
property as normal files and folders, but with an overlay icon to mark them as from an external source.As with the pre-fetch feature explained above, this too can put too much stress on weak servers. In this case you can disable this feature here.
TortoiseSVN 颜色设置
图 4.73. 设置对话框,颜色页面
此对话框允许你按照你喜欢的方式来配置TSVN对话框使用的文本颜色。
-
可能或确实有冲突/问题
-
当更新时或合并时发生了冲突。如果对应于版本控制下的文件/文件夹,存在一个同名的非版本控制的文件/文件夹,此时做更新将被阻碍。
此颜色同样被用在进程对话框的错误信息中。
添加文件
-
向版本库添加的条目。
丢失/已删除/已替换
-
已从工作副本中遗失的条目;已从版本库中删除;或已经从工作副本删除并且被另一个同名文件替换。
已合并
-
从版本库所做的更改被成功地合并到工作副本,并无任何冲突产生。
已修改/已复制
-
已经增加(现在只是修改),或者在版本库中复制。也在包含复制条目的日志对话框中使用。
删除的节点
-
一个已经从版本库中删除了的条目。
添加的节点
-
一个通过添加、复制或移动操作,已经被添加到版本库的条目。
重命名的节点
-
一个在版本库中已经被重命名的条目。
替换的节点
-
该原始条目已经被删除,且有同名条目替换了的条目。
过滤器匹配
-
When using filtering in the log dialog, search terms are highlighted in the results using this colour.
Revision Graph Settings
图 4.74. The Settings Dialog, Revision Graph Page
-
分类模式
-
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.
Revision Graph Colors
图 4.75. The Settings Dialog, Revision Graph Colors Page
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.
Added Node
-
Items newly added, or copied (add with history).
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.
修剪
-
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.
图标叠加设置
图 4.76. The Settings Dialog, Icon Overlays Page
This page allows you to choose the items for which TortoiseSVN will display icon overlays.
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.
缺点: 即使你已经不在项目下工作了,该进程仍然持续运行。取决于你工作副本的数量和大小,它将占用10-50 MB的RAM内存空间。
Windows 外壳
-
缓存在外壳扩展dll中直接完成,但仅仅是为那些当前可见的文件夹。每次你浏览到其他文件夹,状态信息就会被重新获取。
优点: 仅仅需要很少的内存(大约 1 MB),并且可以 实时 显示状态。
缺点: 因为仅有一个文件夹被缓存,图标重载不会递归地显示状态。在大一些的工作副本下,它在浏览器中显示一个文件夹将比默认缓存模式花费更多时间。而且 mime-type 列将无效。
无
-
在这种设置下,TSVN在浏览器里就完全不去获取状态了。因此,版本控制下的文件将不会获得任何图标重载。文件夹也仅仅有个“正常”状态的图标重载,其他的不会显示,也不会有其他额外的列可用。
优点: 绝对不会占用任何额外的内存,也完全不会减慢浏览器的浏览速度。
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.
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.
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 defaultstatus cache option (see below).
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闪存看上去是个特殊情况,因为驱动类型是设备自主标识的。于是有些显示为固定驱动器,而有些显示为可移动磁盘。
The Exclude Paths are used to tell TortoiseSVN those paths for which it should not show icon overlays and status columns. This is useful if you have some very big working copies containing only libraries which you won't change at all and therefore don't need the overlays, or if you only want TortoiseSVN to look in specific folders.
Any path you specify here is assumed to apply recursively, so none of the child folders will show overlays either. If you want to exclude only the named folder, append ?
after the path.
包含路径 也使用同样的语法。除了有些反例: 即使该路径处在某个取消图标重载显示的特定驱动类型下,或是处在上面的排除路径之下, 也依然会显示图标重载。
Users sometimes ask how these three settings interact. For any given path check the include and exclude lists, seeking upwards through the directory structure until a match is found. When the first match is found, obey that include or exclude rule. If there is a conflict, a single directory spec takes precedence over a recursive spec, then inclusion takes precedence over exclusion.
An example will help here:
Exclude: C: C:\develop\? C:\develop\tsvn\obj C:\develop\tsvn\bin Include: C:\develop
These settings disable icon overlays for the C: drive, except for c:\develop
. All projects below that directory will show overlays, except the c:\develop
folder itself, which is specifically ignored. The high-churn binary folders are also excluded.
TSVNCache.exe 同样使用这些路径来限制它的扫描。如果你想让它仅仅在某些特定文件夹里监视,就取消所有的驱动器类型,并仅仅包含你允许被扫描的文件夹。
排除 SUBST
磁盘
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 a folder contains a working copy. The Show excluded root folders as 'normal' checkbox allows you to do this. With this option, working copy root 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.
图标集选择
图 4.77. 设置对话框,图标集页面
你可以选择你最喜欢的重载图标集。要注意的是,倘若改变了重载图标集,你可能需要重启计算机使更改生效。
启用的图标覆盖
图 4.78. The Settings Dialog, Icon Handlers Page
Because the number of overlays available is severely restricted, you can choose to disable some handlers to ensure that the ones you want will be loaded. Because TortoiseSVN uses the common TortoiseOverlays component which is shared with other Tortoise clients (e.g. TortoiseCVS, TortoiseHg) this setting will affect those clients too.
网络设置
图 4.79. 设置对话框,网络设置页面
如果需要穿透你公司的防火墙,在这里可以配置你的代理服务器。
If you need to set up per-repository proxy settings, you will need to use the Subversion servers
file to configure this. UseEdit to get there directly. Consult the Runtime Configuration Area for details on how to use this file.
你同样可以在此指定SSH客户端程序,用来支持TortoiseSVN同使用svn+ssh协议的版本库建立安全连接。我们推荐您使用TortoisePlink.exe。这是著名的Plink程序的一个定制版本, 并且业已包含在TortoiseSVN之中,但它被编译成了一个无窗口的应用,因此当你每次认证的时候将不会看到弹出的DOS窗口。
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.
"C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe"
这里有个不弹出窗口的副作用: 将没有什么错误信息可供你追踪。因此倘若认证失败你将得到一个信息说: “Unable to write to standard output”。这样一来,我们就推荐你第一次设置时使用原始的Plink程序;而当一切工作正常之时,再使用定制版的TortoisePlink,并且重复利用那些相同的参数。
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.
外部程序设置
图 4.80. 设置对话框,差异查看页面
在这里你可以定义你自己的差异查看/合并工具. 默认设置是使用与TortoiseSVN一同安装的TortoiseMerge。
阅读 “其他的比较/合并工具”一节 来了解人们为配合TortoiseSVN工作而使用的外部差异查看/合并程序列表。
差异查看器
有时你可能需要一个外部的差异查看程序来比较不同版本的文件。在为你的命令行填写各种可选参数的同时,要确保这些外部程序从中获得文件名。在TortoiseSVN编辑命令行时,使用以 %
开头的替代参数。当外部程序执行至遇到这些替代参数,它将从TortoiseSVN那里获取那些实际的值。参数的填写顺序将依赖于你使用的差异查看程序。
-
%base
-
没更改的原始文件
%bname
-
原始文件的窗口标题
%mine
-
你更改过的新文件
%yname
-
你新文件的窗口标题
%burl
-
The URL of the original file, if available
%yurl
-
The URL of the second file, if available
%brev
-
The revision of the original file, if available
%yrev
-
The revision of the second file, if available
%peg
-
The peg revision, if available
The window titles are not pure filenames. TortoiseSVN treats that as a name to display and creates the names accordingly. So e.g. if you're doing a diff from a file in revision 123 with a file in your working copy, the names will be filename : revision 123
and filename : working copy
.
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
or with UltraCompare:
C:\Path-To\uc.exe %base %mine -title1 %bname -title2 %yname
or with DiffMerge:
C:\Path-To\DiffMerge.exe -nosplash -t1=%bname -t2=%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.
你也可以使用 Subversion 属性来指定其它的比较工具。既然这些是简短的文本,你可能想要使用简单的查看器。
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.
At the bottom of the dialog you can configure a viewer program for unified-diff files (patch files). No parameters are required. The Default setting is to use TortoiseUDiff which is installed alongside TortoiseSVN, and colour-codes the added and removed lines.
Since Unified Diff is just a text format, you can use your favourite text editor if you prefer.
合并工具
外部合并程序被用来解决冲突的文件。像差异查看程序那样,替代参数同样被用在命令行中。
-
%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
or with DiffMerge:
C:\Path-To\DiffMerge.exe -caption=%mname -result=%merged -merge -nosplash -t1=%yname -t2=%bname -t3=%tname %mine %base %theirs
差异查看/合并工具的高级设置
图 4.81. 高级差异比较设置/高级合并设置的对话框
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.
为了使用文件扩展,你需要指定扩展。使用 .BMP
来描述 Windows 位图文件。如果使用svn:mime-type
属性,要指定多媒体文件类型,包含斜线,例如text/xml
。
已保存数据的设置
图 4.82. 设置对话框,已保存数据设置页面
为您方便着想,TortoiseSVN保存了很多你用过的设置,并记录你最近浏览过的地址。如果你想清空这些数据缓存,就在这里操作。
-
URL历史记录
-
每次你检出一个工作副本,合并那些更改的文件,或仅仅是在使用版本库浏览器时,TortoiseSVN都将保存一个记录,记录那些最近使用过的URL,并在一个下拉列表框中显示出来。有时列表会被逐渐增多的过期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 typeShift+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.
窗口大小及位置
-
许多对话框都可以记录你最后一次使用时的窗口大小和位置。
认证数据
-
当你在登陆某个Subversion服务器,填写认证信息时,用户名和密码也可以被保存在本地,你也就不用每次都输入了。但考虑到一些安全因素,你可能会有清除这些认证信息的愿望,或者你仅仅是想换个不同的用户名登陆...John知道你正在用他的机器么?(规范点儿,用你自己的用户名登陆版本库吧,伙计 *by Jax)
If you want to clear authentication data for one particular server only, use the Clear... instead of theClear all button.
动作日志
-
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.
日志缓存
图 4.83. 设置对话框,日志缓存页面
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.
缓存的版本库
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.
日志缓存统计
图 4.84. 设置对话框,日志缓存统计
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.
Last head update
-
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.
客户端钩子脚本
图 4.85. 设置对话框,钩子脚本页
这个对话框允许你指定当特定 Subversion 动作执行时,自动执行的钩子脚本。与 “服务器端钩子脚本”一节 中说明的钩子脚本相反,这些脚本在客户端本地执行。
应用程序,例如钩子,可能调用如SubWCRev.exe
这样的程序,来更新提交后的版本号,可能还会出发重新构建。
Note that you can also specify such hook scripts using special properties on your working copy. See the section“TortoiseSVN 项目属性”一节 for details.
图 4.86. 设置对话框,配置钩子脚本页面
要增加钩子脚本,直接点击 增加 ,然后输入脚本即可。
现在有六种钩子脚本类型可用
-
开始提交
-
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.
提交之后
-
在提交结束后调用(无论成功或失败)
开始更新
-
在更新到版本对话框显示之前调用
更新之前
-
Called before the actual Subversion update or switch begins.
更新之后
-
Called after the update, switch or checkout finishes (whether successful or not).
Pre-connect
-
Called before an attempt to contact the repository. Called at most once in five minutes.
为特定工作目录定义的钩子。你只要指定顶级路径;如果在子目录内执行提交,TortoiseSVN 会自动向上搜索匹配路径。
Next you must specify the command line to execute, starting with the path to the hook script or executable. This could be a batch file, an executable file or any other file which has a valid windows file association, e.g. a perl script. Note that the script must not be specified using a UNC path as Windows shell execute will not allow such scripts to run due to security restrictions.
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:
-
开始提交
-
PATH
MESSAGEFILE
CWD
提交之前
-
PATH
DEPTH
MESSAGEFILE
CWD
提交之后
-
PATH
DEPTH
MESSAGEFILE
REVISION
ERROR
CWD
开始更新
-
PATH
CWD
更新之前
-
PATH
DEPTH
REVISION
CWD
更新之后
-
PATH
DEPTH
REVISION
ERROR
CWD
Pre-connect
-
no parameters are passed to this script. You can pass a custom parameter by appending it to the script path.
The meaning of each of these parameters is described here:
-
PATH
-
指向临时文件的路径,此文件包含了操作开始时的所有路径。在临时文件中,每个路径占一行。
Note that for operations done remotely, e.g. in the repository browser, those paths are not local paths but the urls of the affected items.
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
-
指到包含错误信息的文件的路径, 如果没有错误的话,文件将是空的
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 ;-)
如果你想Subversion 操作直到钩子完成才结束,就选择等待脚本结束。
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. (“许可协议”一节 explains how to access the repository.)
When debugging hook scripts you may want to echo progress lines to the DOS console, or insert a pause to stop the console window disappearing when the script completes. Because I/O is redirected this will not normally work. However you can redirect input and output explicitly to CON to overcome this. e.g.
echo Checking Status > con pause < con > con
A small tool is included in the TortoiseSVN installation folder named ConnectVPN.exe
. You can use this tool configured as a pre-connect hook to connect automatically to your VPN before TortoiseSVN tries to connect to a repository. Just pass the name of the VPN connection as the first parameter to the tool.
问题跟踪器集成
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.
图 4.87. The Settings Dialog, Issue Tracker Integration Page
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
, bugtraq:provideruuid64
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 theGoogle Code issue tracker.)
bugtraq:provideruuid64
-
This is the same as
bugtraq:provideruuid
, but for the 64-bit version of the IBugtraqProvider.
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 的设置
图 4.88. 设置对话框,TortoiseBlame 页面
TortoiseBlame 使用的配置被主上下文菜单控制,不是被 TortoiseBlame 自己直接控制。
-
颜色
-
TortoiseBlame 可以使用背景色指示文件中行的年龄。你设置最新和最旧版本的颜色后,TortoiseBlame 使用线性插补算法根据每行的版本设置其颜色。
You can specify different colours to use for the locator bar. The default is to use strong contrast on the locator bar while keeping the main window background light so that you can still read the text.
字体
-
你可以选择显示文本的字体和大小。它同时对文件内容,在左窗格显示的作者和版本信息等生效。
制表
-
定义在文件中出现的制表字符用多少空格扩展。
Advanced Settings
A few infrequently used settings are available only in the advanced page of the settings dialog. These settings modify the registry directly and you have to know what each of these settings is used for and what it does. Do not modify these settings unless you are sure you need to change them.
-
AllowAuthSave
-
Sometimes multiple users use the same account on the same computer. In such situations it's not really wanted to save the authentication data. Setting this value to
false
disables thesave authentication
button in the authentication dialog.
AllowUnversionedObstruction
-
If an update adds a new file from the repository which already exists in the local working copy as an unversioned file, the default action is to keep the local file, showing it as a (possibly) modified version of the new file from the repository. If you would prefer TortoiseSVN to create a conflict in such situations, set this value to
false
.
AlwaysExtendedMenu
-
As with the explorer, TortoiseSVN shows additional commands if the Shift key is pressed while the context menu is opened. To force TortoiseSVN to always show those extended commands, set this value to
true
.
AutoCompleteMinChars
-
The minimum amount of chars from which the editor shows an auto-completion popup. The default value is
3
.
AutocompleteRemovesExtensions
-
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, set this value to
true
.
BlockStatus
-
If you don't want the explorer to update the status overlays while another TortoiseSVN command is running (e.g. Update, Commit, ...) then set this value to
true
.
CacheTrayIcon
-
To add a cache tray icon for the TSVNCache program, set this value to
true
. This is really only useful for developers as it allows you to terminate the program gracefully.
ColumnsEveryWhere
-
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, set this value to
true
. Note that the extra columns are only available in XP. Vista and later doesn't support that feature any more.
ConfigDir
-
You can specify a different location for the Subversion configuration file here. This will affect all TortoiseSVN operations.
CtrlEnter
-
In most dialogs in TortoiseSVN, you can use Ctrl+Enter to dismiss the dialog as if you clicked on the OK button. If you don't want this, set this value to
false
.
Debug
-
Set this to
true
if you want a dialog to pop up for every command showing the command line used to start TortoiseProc.exe.
DebugOutputString
-
Set this to
true
if you want TortoiseSVN to print out debug messages during execution. The messages can be captured with special debugging tools only.
DialogTitles
-
The default format (value of 0) of dialog titles is
url/path - name of dialog - TortoiseSVN
. If you set this value to 1, the format changes toname of dialog - url/path - TortoiseSVN
.
DiffBlamesWithTortoiseMerge
-
TortoiseSVN allows you to assign an 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, set this value to
true
.
FixCaseRenames
-
Some apps change the case of filenames without notice but those changes aren't really necessary nor wanted. For example a change from
file.txt
toFILE.TXT
wouldn't bother normal Windows applications, but Subversion is case sensitive in these situations. So TortoiseSVN automatically fixes such case changes.If you don't want TortoiseSVN to automatically fix such case changes for you, you can set this value to
false
.
FullRowSelect
-
The status list control which is used in various dialogs (e.g., commit, check-for-modifications, add, revert, ...) uses full row selection (i.e., if you select an entry, the full row is selected, not just the first column). This is fine, but the selected row then also covers the background image on the bottom right, which can look ugly. To disable full row select, set this value to
false
.
GroupTaskbarIconsPerRepo
-
This option determines how the Win7 taskbar icons of the various TortoiseSVN dialogs and windows are grouped together. This option has no effect on Windows XP or Vista!
-
The default value is 0. With this setting, the icons are grouped together by application type. All dialogs from TortoiseSVN are grouped together, all windows from TortoiseMerge are grouped together, ...
图 4.89. Taskbar with default grouping
-
If set to 1, then instead of all dialogs in one single group per application, they're grouped together by repository. For example, if you have a log dialog and a commit dialog open for repository
A
, and a check-for-modifications dialog and a log dialog for repositoryB
, then there are two application icon groups shown in the Win7 taskbar, one group for each repository. But TortoiseMerge windows are not grouped together with TortoiseSVN dialogs.图 4.90. Taskbar with repository grouping
-
If set to 2, then the grouping works as with the setting set to 1, except that TortoiseSVN, TortoiseMerge, TortoiseBlame, TortoiseIDiff and TortoiseUDiff windows are all grouped together. For example, if you have the commit dialog open and then double click on a modified file, the opened TortoiseMerge diff window will be put in the same icon group on the taskbar as the commit dialog icon.
图 4.91. Taskbar with repository grouping
-
If set to 3, then the grouping works as with the setting set to 1, but the grouping isn't done according to the repository but according to the working copy. This is useful if you have all your projects in the same repository but different working copies for each project.
-
If set to 4, then the grouping works as with the setting set to 2, but the grouping isn't done according to the repository but according to the working copy.
HideExternalInfo
-
-
If this is set to
false
, then everysvn:externals
is shown during an update separately.If it is set to
true
(the default), then update information for externals is only shown if the externals are affected by the update, i.e. changed in some way. Otherwise nothing is shown as with normal files and folders.
GroupTaskbarIconsPerRepoOverlay
-
This has no effect if the option
GroupTaskbarIconsPerRepo
is set to 0 (see above).If this option is set to
true
, then every icon on the Win7 taskbar shows a small colored rectangle overlay, indicating the repository the dialogs/windows are used for.图 4.92. Taskbar grouping with repository color overlays
IncludeExternals
-
By default, TortoiseSVN always runs an update with externals included. This avoids problems with inconsistent working copies. If you have however a lot of externals set, an update can take quite a while. Set this value to
false
to run the default update with externals excluded. To update with externals included, either run theUpdate to revision...
dialog or set this value totrue
again.
LogFindCopyFrom
-
When the log dialog is started from the merge wizard, already merged revisions are shown in gray, but revisions beyond the point where the branch was created are also shown. These revisions are shown in black because those can't be merged.
If this option is set to
true
then TortoiseSVN tries to find the revision where the branch was created from and hide all the revisions that are beyond that revision. Since this can take quite a while, this option is disabled by default. Also this option doesn't work with some SVN servers (e.g., Google Code Hosting, seeissue #5471).
LogStatusCheck
-
The log dialog shows the revision the working copy path is at in bold. But this requires that the log dialog fetches the status of that path. Since for very big working copies this can take a while, you can set this value to
false
to deactivate this feature.
MergeLogSeparator
-
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 set this to a value containing a separator string of your choice.
NumDiffWarning
-
If you want to show the diff at once for more items than specified with this settings, a warning dialog is shown first. The default is 10.
OldVersionCheck
-
TortoiseSVN checks whether there's a new version available about once a week. If an updated version is found, the commit dialog shows a link control with that info. If you prefer the old behavior back where a dialog pops up notifying you about the update, set this value to
true
.
ScintillaDirect2D
-
This option enables the use of Direct2D accelerated drawing in the Scintilla control which is used as the edit box in e.g. the commit dialog, and also for the unified diff viewer. With some graphic cards however this sometimes doesn't work properly so that the cursor to enter text isn't always visible. If that happens, you can turn this feature off by setting this value to
false
.
OutOfDateRetry
-
If you don't want TortoiseSVN to ask you to update the working copy automatically after an
Out of date
error, set this value tofalse
.
ShellMenuAccelerators
-
TortoiseSVN uses accelerators for its explorer context menu entries. Since this can lead to doubled accelerators (e.g. the
SVN Commit
has the Alt-C accelerator, but so does theCopy
entry of explorer). If you don't want or need the accelerators of the TortoiseSVN entries, set this value tofalse
.
ShowContextMenuIcons
-
This can be useful if you use something other than the windows explorer or if you get problems with the context menu displaying incorrectly. Set this value to
false
if you don't want TortoiseSVN to show icons for the shell context menu items. Set this value totrue
to show the icons again.
ShowAppContextMenuIcons
-
If you don't want TortoiseSVN to show icons for the context menus in its own dialogs, set this value to
false
.
StyleCommitMessages
-
The commit and log dialog use styling (e.g. bold, italic) in commit messages (see “提交日志信息”一节 for details). If you don't want to do this, set the value to
false
.
UpdateCheckURL
-
This value contains the URL from which TortoiseSVN tries to download a text file to find out if there are updates available. This might be useful for company admins who don't want their users to update TortoiseSVN until they approve it.
VersionCheck
-
TortoiseSVN checks whether there's a new version available about once a week. If you don't want TortoiseSVN to do this check, set this value to
false
.
Exporting TSVN Settings
If you want to export all your client settings to use on another computer you can do so using the Windows registry editor regedt32.exe
. Go to the registry key HKCU\Software\TortoiseSVN
and export it to a reg file. On the other computer, just import that file again (usually, a double click on the reg file will do that).
Remember to save Subversion's general settings, which you can find in the Subversion configuration file%APPDATA%\Subversion\config
.