简体   繁体   English

不同TFS项目中的代码审查,变更集和看板工作项

[英]Code Review, Change Sets & Kanban Work Items in Different TFS Projects

Where I work, the Kanban is in a different TFS Project than the code (I know...don't ask). 在我工作的地方,看板与代码位于不同的TFS项目中(我知道...不要问)。 Of course, this means the underlying change set & the work item are in DIFFERENT TFS Projects. 当然,这意味着基础变更集和工作项位于不同的TFS项目中。

Now... 现在...

I know merging code between TFS Projects is Baseless & that Baseless merges should be avoided, because, unlike a merge, they disregard the history of either side on the merge. 我知道合并代码之间 TFS项目是Baseless和应该避免毫无根据的合并,因为不像合并,他们不顾对合并两边的历史。

So my questions are: 所以我的问题是:

Q: Does associating a check-in to a WORK-ITEM in a DIFFERENT PROJECT make it "baseless" in some manner? 问:将签入与不同项目中的WORK-ITEM相关联是否会以某种方式使其“无基础”?
Q: Does associating a check-in to a CODE REVIEW in a DIFFERENT PROJECT make it "baseless" in some manner? 问:将签入与不同项目中的CODE REVIEW关联是否会以某种方式使其“无基础”?

Doing so isn't breaking anything. 这样做并没有破坏任何东西。

I get no exceptions, but what is the affect? 我没有例外,但是有什么影响呢?

Associating a changeset from Project A with a Work Item in Project B is fine. 将项目A中的变更集与项目B中的工作项相关联就可以了。 There will simply be a Changeset link added to the Work Item which points to the code stored in the other project. 将仅在工作项上添加一个Changeset链接,该链接指向另一个项目中存储的代码。 It won't attempt to do any weird merging of the code change into Project B. 它不会尝试将任何代码更改奇怪地合并到Project B中。

Under the covers, a Code Review is really just a Work Item that points to a Shelveset so it's the same as the above scenario, no problem having them in separate projects and it won't affect Project B's source code. 在幕后,“代码审查”实际上只是一个指向Shelveset的工作项,因此与上述情形相同,将它们放在单独的项目中没有问题,并且不会影响项目B的源代码。 The trick here is that you likely want to create the Code Review work item in Project B and the easiest way is to make sure that Team Explorer is pointing at Project B rather than Project A. 这里的技巧是您可能想在Project B中创建代码审查工作项,最简单的方法是确保Team Explorer指向Project B而不是ProjectA。

Having Work Items and code in separate projects isn't ideal but it is pretty common. 在单独的项目中使用工作项和代码并不理想,但这很普遍。 Some of the biggest pains I find are: 我发现一些最大的麻烦是:

  • When you open a .sln in Project A, Team Explorer always connects to that Team Project and you have to manually switch it to Project B where your Work Items are stored. 在项目A中打开.sln时,团队资源管理器始终连接到该团队项目,并且您必须手动将其切换到存储工作项目的项目B。
  • Where do your builds live? 您的建筑住在哪里? It's easiest to have them in Project A with the code but then you can't see them easily on the Project B dashboard where people will be monitoring project progress. 使用代码将它们包含在Project A中是最容易的,但是那样一来,您将无法在Project B仪表板上轻松地看到它们,人们将监视项目进度。
  • Test Cases, Reporting and other things have some inconveniences.... 测试用例,报告和其他内容带来一些不便。

If it is confusing for devs, you might want to lock down Project A so that you can't create Work Items in it, then lock down Project B so it can't store any code. 如果这对开发人员造成困扰,则可能需要锁定Project A,以使其无法在其中创建工作项,然后锁定Project B,使其无法存储任何代码。 This of course, assumes that Project B has no code and Project A has no Work Items. 当然,这假定项目B没有代码,项目A没有工作项。

Hey, it could be worse, WIs and code could be in separate Project Collections :-) 嘿,情况可能更糟,WI和代码可能在单独的Project Collection中:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM