Subversion 开关:如何查看当前的分支? [英] Subversion switch: How can I see which branch is current?

查看:72
本文介绍了Subversion 开关:如何查看当前的分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在试验 Subversion 作为我们当前 Starteam 2005 SCM 的可能替代品,(因此我们的 SVN 知识是目前有限:-)).

We're experimenting with Subversion as a possible replacement of our current Starteam 2005 SCM, (so our SVN knowledge is limited at the moment :-)).

我一直在试验 switch 命令(使用 TortoiseSVN 客户端),但很惊讶的是,在我将本地主干文件夹切换到某个分支后,无法查看我最后切换到哪个分支.或者至少我找不到确定这一点的方法.

I've been experimenting with the switch command (using the TortoiseSVN client) and was surprised that, after I switched my local trunk folder to a certain branch there is no way to see which branch I switched to last. Or at least I can't find a way to ascertain that.

通过将本地主干文件夹切换到分支,我在这里做错了什么吗?如何查看当前本地主干文件夹指的是哪个分支?

Am I doing something wrong here by switching a local trunk folder to a branch? How can I see which branch the current local trunk-folder is referring to?

推荐答案

虽然已经提供了几个正确的答案,但我想指出还有一些技术可以用来了解您在 Subversion 中的位置.完整列表如下:

Though a couple of correct answers have already been provided, I want to point out that there are several more techniques one may use to see where you are in Subversion. Here is the complete list:

  1. Windows 资源管理器 -- Windows 资源管理器可以灵活地从标准名称、大小、类型和修改日期之外的大量选项中添加列.右键单击列标题栏,从上下文菜单中选择更多,然后向下滚动到 SVN 选项.SVN 短 URL 是此问题的最佳选择,因为它以主干或分支开始路径.需要安装 TortoiseSVN.警告:适用于 Windows XP,但不适用于更高版本(Windows Vista、Windows 7 等).叹息...
  1. Windows Explorer -- Windows Explorer has the flexibility to add columns from a large set of choices beyond the standard name, size, type, and modified date. Right click on the column headers bar, select More from the context menu, then scroll down to the SVN choice. SVN short URL is the best choice for this question since it begins the path with either trunk or branches. Requires TortoiseSVN installed. Caveat: Available in Windows XP but not later ones (Windows Vista, Windows 7, etc.). Sigh...

  1. TortoiseSVN 修订图 -- 修订图显然并不为人所知,但它是一个很好的可视化工具,可以回答许多问题,包括这个问题.您必须使用工具栏中指示的按钮启用当前修订的显示.一旦你这样做了,TortoiseSVN 在你正在检查的对象的当前版本周围添加一条粗线,无论是在主干还是分支上.警告:TortoiseSVN 并不总能找到当前版本.在我准备这张插图时,当我在树枝上时,它没有突出显示图中的任何内容.
  1. TortoiseSVN Revision Graph -- The revision graph is apparently not well known but is a great visual tool for answering many questions, including this one. You have to enable the display of the current revision with the indicated button in the tool bar. Once you do that, TortoiseSVN adds a bold line around the current version of the object you are examining, whether on the trunk or a branch. Caveat: TortoiseSVN does not always find the current version. As I was preparing this illustration, it did not highlight anything in the graph when I was on the branch.

  1. TortoiseSVN Repo-Browser -- 在文件或文件夹上打开 repo 浏览器并检查顶部的 URL 或左侧导航窗格中的路径.(任何其他显示 URL 的 TortoiseSVN 对话框都将显示与@fsonmezay 指出的类似的信息.)

  1. TortoiseSVN Repo-Browser -- Open the repo browser on a file or folder and examine either the URL at the top or the path in the left hand navigation pane. (Any other TortoiseSVN dialogs displaying a URL will show the information similarly as pointed out by @fsonmezay.)

文件属性 -- 从 Windows 资源管理器或等效工具中,打开 标准 文件属性对话框 -- 不是 TortoiseSVN 属性!然后选择 Subversion 选项卡以查看命令行中可用的所有信息,包括指示路径中主干或分支的 URL.它需要安装 TortoiseSVN(之前@Cedric 提到过).

File properties -- From Windows Explorer or equivalent, open the standard file properties dialog--not the TortoiseSVN properties! Then select the Subversion tab to see all the information available from the command line, including the URL that indicates trunk or branch in the path. It requires TortoiseSVN to be installed (previously mentioned by @Cedric).

  1. 命令行 -- svn infosvn info filename 分别提供当前目录或指定文件的详细信息,包括 URL表示路径中的主干或分支(之前由@Cedric 提到).
  1. Command-line -- svn info or svn info filename provides details of your current directory or specified file, respectively, including the URL that indicates trunk or branch in the path (previously mentioned by @Cedric).

这篇关于Subversion 开关:如何查看当前的分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆