版本库浏览器

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

图 5.45. 版本库浏览器

版本库浏览器


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

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

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

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

目录的上下文菜单允许你:

如果你在右窗格选择两个文件夹,你可以用统一差异,或者是一个可以用默认比较工具可视化显示差异的文件改变列表来查看其区别。

如果你在右边窗格中选择了多个目录,你可以将它们同时检出到同一个父目录之下。

如果你选择两个拥有相同历史的标签(特别是/主干/),你可以使用右键菜单显示日志...来查看

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, Ctrl-left 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 Ctrl-right 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.