1. 程式人生 > >TortoiseSVN的設定,如何檢視更多的log記錄

TortoiseSVN的設定,如何檢視更多的log記錄

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 or svn: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.

僅在設定了 tsvn:projectlanguage 時才進行拼寫檢查

若你不願意在所有提交操作時都進行拼寫檢查,就選擇該選項。而後拼寫檢查功能將在專案屬性做出明確要求時才生效。

日誌中保留的最大條目數量

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 屬性,那麼不管你如何設定,都會看到加鎖對話方塊,因為此專案需要加鎖資訊。

TortoiseSVN Dialog Settings 3

圖 4.72. The Settings Dialog, Dialogs 3 Page

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

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

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

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 = nativethe 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 ShiftContext 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-typeproperty 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:

開始提交

PATHMESSAGEFILECWD

提交之前

PATHDEPTHMESSAGEFILECWD

提交之後

PATHDEPTHMESSAGEFILEREVISIONERRORCWD

開始更新

PATHCWD

更新之前

PATHDEPTHREVISIONCWD

更新之後

PATHDEPTHREVISIONERRORCWD

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

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:provideruuidbugtraq: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 IB