通知开发人员文件被覆盖 [英] Notify developer that the file got overwritten

查看:29
本文介绍了通知开发人员文件被覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 Microsoft Team Foundation Server 进行版本控制,其中多个开发人员在一个分支上工作并签入和签出代码.

We are using Microsoft Team foundation server for version control where multiple developers are working on a branch and check in and check out the code.

如何通过电子邮件或短信通知开发者 A,他的代码在开发者 B 签入期间被覆盖.

How can a developer A be notified via email or SMS that his code got overwritten during the checkin by developer B.

开发人员 A 需要尽快知道这一点,因为开发人员 A 的代码更改在部署到 QA 时将不起作用.

Developer A needs to know this ASAP because the code changes of developer A will not work when its deployed into QA.

我们正在努力在快节奏的开发环境中节省时间,并努力避免代码覆盖问题.

We are tring to save time in a fast paced development environment and trying to avoid code overwrite issues.

推荐答案

允许持续并行开发并防止签入破坏他人代码的最简单方法是使用 CI 服务器.TFS 通过 Team Build 支持这一点.

The easiest way to allow continuous parallel development and prevent a checkin from one person breaking the code of others, is to use a CI server. TFS supports this through Team Build.

尽管更喜欢在专用构建服务器上运行团队构建,但它可以并排安装在主 TFS 服务器上,并且可以集中安装控制器组件并将开发人员的工作站用作代理.

Though it's preferred to run team build on a dedicated build server, it can be installed side-by-side on your main TFS server and it's possible to install the Controller component centrally and use your developer's workstations as agents.

有两种类型的构建触发器可以帮助您:

There are two types of build triggers that can help you out here:

  1. 持续集成 - 这会在每次签入后直接触发所有代码的构建.它会很快告诉你有些东西没有编译.如果您正在进行单元测试,它甚至可以运行这些并告诉您测试失败.

  1. Continuous Integration - this triggers a build of all code directly after every checkin. It will tell you quickly that something did not compile. If you are doing unit tests it can even run these and tell you that a test is failing.

Gated - 这将迫使开发人员搁置他的代码,并且只有在最新版本的构建加上搁置集中的更改成功时才会签入代码.这可能看起来更好,因为源代码控制中的代码永远不会处于损坏状态,但实际上我更喜欢 ci 触发器.我们认为 Gated 构建不能并行发生的主要原因(由于它们的性质)并且实际上可以延迟代码损坏的通知.

Gated - this will force a developer to shelve his code and will only check in the code when the build of the latest version plus the changes in the shelveset succeed. This may seem even better, as the code in source control will never be in a broken state, but in reality I prefer the ci trigger. The main reason for that us that Gated builds can't happen in parallel (due to their nature) and can actually delay the notification that the code is broken.

您可以通过 webaccess 轻松配置特定构建结果的电子邮件警报.您还可以配置有关源更改的警报,但没有选项仅警告以前编辑过这些特定文件的人.

You can easily configure email alerts through webaccess on specific build outcomes. You can also configure alerts on source changes, but there is no option to only warn people who have edited these specific files before.

您还可以从任务托盘运行构建通知工具以在 Windows 中显示通知.

You can also run the Build Notification tool from the task tray to show a notification in Windows.

虽然这不会告诉代码刚刚被覆盖的人它不再工作,但它会告诉我重写代码的人他在签入时应该多加注意;).

Though this will not tell the person whose code has just been overwritten that it's no longer working, it will tell the person I rewriting that code that he should pay more attention when checking in ;).

当然,您可以配置一个团队警报,在构建中断时通知所有人(通常称为),并且有一些有趣的方法可以通过耻辱警报器",它提供了一个构建监控服务,可以连接到一个 USB 警报灯,当有人做一些愚蠢的事情时,该警报灯就会打开并发出噪音.

Of course you can configure a team alert that notifies everyone when the build breaks (as that's generally called), and there are funny ways to show the build status through small apps like "siren of shame", which provides a build monitor service that can be connected to a USB alarm-light that turns on and provides noise whenever someone does something stupid.

这篇关于通知开发人员文件被覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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