检出工作副本

为了得到一个工作副本,需要进行从版本库检出的操作。

在Windows资源管理器里选择一个存放工作副本的目录。右键点击弹出右键菜单,选择TortoiseSVN检出…命令。然后就会看到下面的对话框:

图 5.7. 检出对话框

检出对话框


如果输入一个并不存在的目录名,那么这个名字的目录就会被创建出来。

Checkout Depth

You can choose the depth you want to checkout, which allows you to specify the depth of recursion into child folders. If you want just a few sections of a large tree, You can checkout the top level folder only, then update selected folders recursively.

Fully recursive

Checkout the entire tree, including all child folders and sub-folders.

Immediate children, including folders

Checkout the specified directory, including all files and child folders, but do not populate the child folders.

Only file children

Checkout the specified directory, including all files but do not checkout any child folders.

Only this item

Checkout the directory only. Do not populate it with files or child folders.

工作副本

Retain the depth specified in the working copy. This option is not used in the checkout dialog, but it is the default in all other dialogs which have a depth setting.

If you check out a sparse working copy (i.e., by choosing something other than fully recursive for the checkout depth), you can fetch additional sub-folders by using the repository browser (“版本库浏览器”一节) or the check for modifications dialog (“本地与远程状态”一节).

In the repository browser, Right click on the checked out folder, then use TortoiseSVNRepo-Browser to bring up the repository browser. Find the sub-folder you would like to add to your working copy, then use Context menuUpdate 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.

In the check for modifications dialog, first click on the button Check repository. The dialog will show all the files and folders which are in the repository but which you have not checked out as remotely added. Right click on the folder(s) you would like to add to your working copy, then use Context menuUpdate.

如果项目含有外部项目的引用,而这个引用你不希望同时检出,请选中忽略外部的复选框。

重要

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 TortoiseSVNUpdate to Revision... instead of TortoiseSVNUpdate. The standard update will include all externals and keep the existing depth.

It is recommended that you check out only the trunk part of the directory tree, or lower. If you specify the parent path of the directory tree in the URL then you might end up with a full hard disk since you will get a copy of the entire repository tree including every branch and tag of your project!

关于导出

有时你可能想要建立一个没有.svn目录的本地的副本,比如建立一个源代码压缩包。要达到这个目的,请参考“导出一个Subversion工作副本”一节