bug跟踪器/版本控制集成如何与典型的git工作流配合使用? [英] How does bug tracker/version control integration work with typical git workflows?

查看:193
本文介绍了bug跟踪器/版本控制集成如何与典型的git工作流配合使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是git工作流程示例:



假设您想利用错误跟踪器与您的版本控制系统集成。哪里/如何适合这些工作流程。你会在跟踪器中看到什么?



我是BugTracker.NET的作者,跟很多其他bug跟踪器(Trac,Redmine,FogBugz)集成了svn。我们都以同样的方式做了或多或少的事情。但是使用git,我很难想象与git的整合是怎么样的。

编辑:我看了一下 github-fogbugz 集成,但即使是这样的作者也说:很显然,FogBugz是为更传统的CVS / SVN编写的SCM系统,因此,提交列表显示并不真正与jQuery混合。



编辑2:关于 Redmine / git工作流程
看起来最典型的设置是Redmine使用本地克隆无论什么被认为是中央存储库,所以它看到的变化,当它到这个克隆。触发器或预定作业自动化推送到Redmine的克隆。



EDIT3:即使使用Linux和Linus,也最终成为一个主要的git存储库,可以被视为仁慈的独裁者存储库:请参阅 http:// git .kernel.org /?p = linux / kernel / git / torvalds / linux-2.6.git; a = summary

EPILOGUE:谢谢大家。根据我们的指导,我的 BugTracker.NET 现在包含git集成。

解决方案

Trac和Redmine都支持与Git的集成。它看起来或多或少与Subversion支持完全相同。错误跟踪器跟随一个回购作为仁慈的独裁者回购,它不必关心这个地方的所有其他克隆。



我认为值得一提的是,任何错误跟踪器都需要正确支持git分支。在分支机构工作是Git方法的重要组成部分,它需要在bug跟踪器中得到支持。 Redmine可以通过一个补丁来完成,但最后我看了(大约一个月前),它不在主源代码树中(你只能跟随主人)。



其他有用的功能将是分支如何创建和合并的图形表示,类似于gitk的外观。我不知道有任何bug跟踪器可以做这种可视化。



编辑:Corey Trager。我在这里复制/粘贴了@ Squelch的答案(我也赞成@Squelch):

由于Git的分布式性质与SVN的集中性相关,所以很可能每个用户或版本库的副本都有不同的分支。现存的追踪者通常拥有一个本地版本库,作为中央参考(仁慈的独裁者),可以被视为所有用户的工作拷贝。

用户在本地副本中具有与追踪器不同的分支结构是非常可行的。他们可能会选择保持一些私密性,只从他们感兴趣的远程分支中提取分支,或者将新分支推送到远程(跟踪器)。用户甚至可以在他们自己之间共享远程可能永远不会看到的分支。



错误跟踪器实际上只能引用它有权访问的存储库。通常这是跟踪器本地的,但它也可能从存储器拉到跟踪器的远端,而且难以管理。如果它正在访问一个远程,它只能跟踪它已经知道的分支,并且除了一个计划的任务之外,还没有一种真正的启动这个任务的方法。这也假设用户也在服务他们的本地副本。



正如您已经注意到的那样,可以使用计划任务或事件挂接来更新跟踪器提交日志的细节。这些细节可以跟踪跟踪器问题匹配,以便按照要求进行查看,并在上面提到。



简而言之,跟踪器通常会看到当前分支上所做的任何更改有权访问。随着钩子,这些变化立即被看到,包括创建一个新的分支。它不会查看或跟踪对用户(离线)存储库所做的更改,直到他们推送这些更改。



@Squelch结束


Here's are examples of git workflows:

Let's say you wanted to take advantage of bug tracker integration with your version control system. Where/how would that fit into these workflows. What would you actually see in the tracker?

I'm the author of BugTracker.NET which like many other bug trackers (Trac, Redmine, FogBugz) integrates with svn. We all do it more or less the same way. But with git, I have trouble imagining what integration with git would look like.

EDIT: I've taken a look at one attempt at github-fogbugz integration, but even the author of that says "It's fairly obvious that FogBugz was written for a more traditional CVS/SVN SCM system in mind. As such, the commit list display doesn't really jive with git".

EDIT2: A thread about Redmine/git workflow: It seems that the most typical setup is that Redmine works with a local clone of whatever is considered to be the "central" repository, so it sees changes when they make it to this clone. Triggers or scheduled jobs automate the pushing to Redmine's clone.

EDIT3: Seems even with linux and Linus, there ultimately IS a main git repository that could be considered the benevolent dictator repository: See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary

EPILOGUE: Thanks everybody. My BugTracker.NET now includes git integration, according to the guidance you folks gave me.

解决方案

Trac and Redmine both support integration with Git. It looks more or less exactly the same as the Subversion support. The bug tracker follows one repo as the benevolent dictator repo, it doesn't have to care about all the other clones around the place.

One thing I do think is worth mentioning is that any bug tracker needs to support git branches properly. Working on branches is such an important part of the Git methodology, it needs to be supported in the bug tracker. Redmine can do this through a patch, but last I looked (about a month ago), it wasn't in the main source tree (you could only follow master).

Other useful features would be a graphical representation of how branches are created and merged, similar to how gitk looks. I don't know of any bug tracker that does this kind of visualisation.

EDIT by Corey Trager. I copy/pasted @Squelch's answer here (I upvoted @Squelch too):

Due to the distributed nature of Git against the centralized nature of SVN, it is quite possible for every user or copy of the repository to have different branches. The exisitnig trackers typically have a local copy of the repository that is used as a central reference ("benevolent dictator") that can be regarded as the working copy for all users.

It is quite feasible for users to have a different branch structure in their local copy from that of the tracker. They might choose to keep some private, pull only the branches from the remote that they are interested in, or push a new branch to the remote (tracker). Users can even share branches between themselves that the remote may never see.

The bug tracker can really only reference repositories it has access to. Commonly this is local to the tracker, but it is also possible to pull from repositories remote to the tracker, and far harder to manage. If it is accessing a remote, it can only track branches that it has knowledge of, and there is not really a method of initiating this task apart from a scheduled task. This also assumes that users are serving their local copy too.

As you have already noted, a scheduled task, or an event hook can be used to update the tracker using the commit log for details. These details can then be matched to the tracker issues for viewing as required and noted above.

In short, the tracker will typically see whatever changes are made on the branches it currently has access to. With a hook these changes are seen immediately including the creation of a new branch. It will not see or track changes made to users (offline) repositories until they push those changes.

END OF @Squelch

这篇关于bug跟踪器/版本控制集成如何与典型的git工作流配合使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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