我们如何跟踪工作副本的分支? [英] How do we keep track of our working copy's branch?

查看:89
本文介绍了我们如何跟踪工作副本的分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有什么好的技术可以帮助我们了解我们的工作副本来自哪个分支(或主干)?我们最近转换为Subversion,并且正在使用发行版分支.我有两个开发人员将对发布分支的更改提交到了应该已经提交到干线的分支.我们正在使用CI(TeamCity),因此我立即意识到了问题,并能够还原更改,但我想防止再次发生.特别是在Visual Studio中,很容易犯一个错误并提交到错误的分支.

Are there any good techniques to help us know which branch (or trunk) our working copy is from? We recently converted to Subversion and we're using release branches. I had two developers commit changes to the release branch that should have been committed to the trunk. We're using CI (TeamCity), so I recognized the problem right away and was able to revert the changes but I'd like to prevent it from happening again. From within Visual Studio, especially, it's easy to make a mistake and commit to the wrong branch.

我们正在使用TortoiseSVN和AnkhSVN.

We're using TortoiseSVN and AnkhSVN.

编辑后添加: 为了澄清起见,我正在寻找一种防止粗心大意的错误的方法,我已经知道如何查找此信息.我试图防止两个粗心的错误:

Edited to add: Just to clarify, I'm looking for a method to prevent careless mistakes, I already know how to find this information. There are two careless mistakes I'm trying to prevent:

  1. 在错误的分支上进行工作.如果在提交之前发现了该错误,则开发人员必须将更改合并回正确的分支中.
  2. 致力于错误的分支.这将点1的痛苦与必须还原Subversion的更改结合在一起.

编辑后添加:我们刚刚切换到VisualSVN VS插件,它有一个工具栏,可显示当前工作副本的路径.我非常喜欢我在正确的分支机构工作的保证.

Edited to add: We just made the switch to the VisualSVN VS plugin and it has a toolbar that displays the path of the current working copy. I really like the reassurance that I'm working on the right branch.

推荐答案

在AnkhSVN(在Visual Studio中)中,您的工作副本的项目网址来自待更改"窗口的正在使用"字段(查看- >待更改).

In AnkhSVN (in Visual Studio) the project url of your working copy is from is displayed in the 'Working on' field of the Pending Changes Window (View->Pending Changes).

在挂起的更改"窗口或工作副本资源管理器"中选择文件时,文件/文件夹的URL也会显示在Visual Studio项目窗口中(即使在许多情况下,即使在解决方案资源管理器"中选择了文件,也是如此);但是这取决于项目类型.

The url of a file/folder is also displayed in the Visual Studio project window when you select a file in the Pending Changes Window or Working Copy Explorer (and in many cases even when you select a file in the Solution explorer; but this depends on the project type).

[更新:我刚刚添加了AnkhSVN issue#581 来扩展提交对话框. ]

[Update: I just added AnkhSVN issue #581 for extension of the commit dialog.]

这篇关于我们如何跟踪工作副本的分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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