版本库浏览器

Posted on Posted in 6.日常使用指南

版本库浏览器

有时候我们需要在版本库中直接进行操作,而不是在工作副本中。这就是我们的版本库浏览器可以做到的。正如资源管理器和能浏览你的工作副本一样,版本库浏览器允许你浏览版本库的结构和状态。

图 5.45. 版本库浏览器

版本库浏览器

在版本库浏览器中你可以执行比如复制,转移,重命名、、、直接操作在版本库上。

除了版本库浏览器不是显示计算机中的文件,而是显示版本库中特定版本的内容之外,它看起来很象 Windows 资源管理器。在左边的窗格显示目录树,右边的窗格显示选定目录的内容。在版本库浏览器窗口的顶部,你可以输入你想浏览的版本库 URL和版本。

就象 Windows 资源管理器一样,如果你想设置排列顺序,可以点击右边窗格中的列首。并且所有窗格都有上下文菜单。

文件的上下文菜单允许你:

  • 用默认查看器或你指定的程序打开选中文件的选中版本。

  • 在你的硬盘上保存此文件的一个未版本控制的副本。

  • 显示此文件的版本日志,或者显示所有版本图,从而你可以知道其来源。

  • 追溯这个文件,查看是谁在何时修改哪些行。

  • 删除或改名文件。

  • 复制这个文件,目的可以是版本库中的其它地方,也可以是同一版本库中的工作副本。

  • 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, Ctrlleft 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 Ctrlright 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 MenuCopy error message to clipboard, or simply use Ctrl+C