简体   繁体   English

源核心存储库和便签

[英]Source core repositories and sticky notes

An interesting problem occured recently, and I've been thinking of the "best" way (for a given value of "best") to implement this. 最近发生了一个有趣的问题,我一直在考虑实现这一目标的“最佳”方式(对于给定的“最佳”值)。

In essence, it's one of tracking notes against source code. 实质上,它是跟踪源代码的注释之一。 The example that flagged this was getting a problem fixed in live within SLAs, and how to best achieve this. 标记为此的示例在SLA中实时修复了问题,以及如何最好地实现此目的。 Without going into all the details, it came down to finding a function that's used in a number of places which may or may not be buggy, yet the problem was being reporting only in a single location. 在没有详述所有细节的情况下,它找到了一个在许多地方使用的功能,可能有也可能没有错误,但问题是只在一个地方报告。

The fix to meet the SLAs was simply to add a check into the location where the problem was reported, rather than tweaking the common code and having to test everything that touches that function. 满足SLA的修复只是添加一个检查报告问题的位置,而不是调整公共代码并且必须测试触及该功能的所有内容。

The interesting issue is then for upstreaming. 然后有趣的问题是上游。 The "correct" method would then be to go back and check the original function, validate it's correct for everywhere it's called and then make the change "properly" if its determined the library function is wrong. 然后,“正确”的方法是返回并检查原始函数,验证它在所调用的任何地方是否正确,然后如果确定库函数错误则进行“正确”更改。

The problem is this takes time, so upstreaming may simply take the workaround, etc. However if the problem occurs again (say six months later) in another location calling the same library function, there isn't an easy way to link the two problems together. 问题是这需要时间,所以上游可能只是采取解决方法等。但是如果问题再次发生(例如六个月后)在调用相同库函数的另一个位置,则没有一种简单的方法来链接这两个问题一起。 You can search the bug tracking database, but this isn't guranteed to help - it depends if a note's been added saying something along the lines of "this library function needs more thorough checking, but no time to investigate now". 您可以搜索错误跟踪数据库,但这并不能保证提供帮助 - 这取决于是否添加了一个注释,说明“此库函数需要更彻底的检查,但现在没有时间进行调查”。

So the question is this: within a large team of developers (30 plus, split into teams of both support and on-going development), what methods do you use to manage (what are effectively) "sticky notes" against source code, short of adding a comment to the suspicious function's source code saying "this might be a bit dodgy"? 所以问题是:在一个庞大的开发团队中(30多个,分成支持和正在进行的开发的团队),你使用什么方法来管理(有效的)针对源代码的“粘滞便笺”,简短添加评论到可疑功能的源代码说“这可能有点狡猾”?

The problem with the commiting a comment is one of process: a change is a change, so committing a zero-change change (ie, one where just comments are added) is not ideal; 提交评论的问题是过程之一:变更是一种变化,因此提交零变化变更(即只添加评论的变更)并不理想; developers can make mistakes even adding a comment (hit a stray key or something) so it's always (IMO) better to commit only where actual changes are made. 开发人员甚至可以通过添加注释(点击一个流浪键或其他东西)来犯错误,因此只有在实际进行更改的地方才能提交(IMO)。

Now a wiki could be used to track per-file notes, but we've got a minimum of four branches and inexcess of a few hundred files (SQL objects, source code, XML files, etc), so a wiki will get unmangable quite quickly. 现在可以使用wiki来跟踪每个文件的注释,但是我们至少有四个分支并且没有几百个文件(SQL对象,源代码,XML文件等),所以wiki会变得无法解决很快。

This is the sort of thing that it would be nice if SCM's could support - bits of metadata against files that are simply notes, but don't add to the SCM's version history - that can be displayed when doing (say) an svn update , or manually viewed. 如果SCM可以支持这种情况,那将是很好的事情 - 对于简单注释的文件,但不添加到SCM的版本历史记录中的元数据 - 可以在执行(比如说) svn update ,或手动查看。

There may already be solutions out there -- so how do you manage this type of knowledge sharing? 可能已经存在解决方案 - 那么您如何管理这种类型的知识共享?

Well we're now using this method: in each folder checked into SVN, we've created a .url shortcut (this is Windows we're dev'ing on) that links to a page on our development wiki about that folder. 好吧,我们现在正在使用这种方法:在每个检入SVN的文件夹中,我们创建了一个.url快捷方式(这是我们正在开发的Windows)链接到我们开发维基上关于该文件夹的页面。 Thus we can update the Wiki info freely, and on checkout/update everyone gets a link that will take them to the appropriate Wiki page for that folder/module. 因此,我们可以自由更新Wiki信息,在结账/更新时,每个人都会获得一个链接,将他们带到该文件夹​​/模块的相应Wiki页面。

We've not long instigated it so we'll have to see how well it works long term -- but it's better than what we had before (ie, nothing :-) ). 我们不长时间煽动它所以我们必须看到它长期有效 - 但它比我们以前更好(即,没有:-))。

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

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