检出工作副本

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

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

图 5.7. 检出对话框

检出对话框


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

检出深度

你可以选择要检出的深度,它允许你指定子目录递归的深度。如果你只需要大目录中的几个子条目,你可以只检出最高层目录,然后递归的更新选择的目录。

全递归

检出完整的目录树,包含所有的文件或子目录。

直接节点,包含目录。

检出目录,包含其中的文件或子目录,但是不递归展开子目录。

文件子节电

检出指定目录,包含所有文件,但是不检出任何子目录。

仅此项。

只检出目录。不包含其中的文件或子目录。

工作副本

保持工作副本指定的深度。此选项不用于检出对话框,但它是其它所有含有深度配置对话框的默认配置。

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.

强烈建议你只检出 trunk 或更低层的目录树。如果你在 URL 中指定了根路径,你的硬盘有可能被塞满,因为你将会得到整个版本库树的副本,包括项目所有的分支和标签(tag)!

关于导出

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