跟踪每天的变化,作为一个peon,在一个明确的商店 [英] tracking daily changes, as a peon, in a clearcase shop
问题描述
我在跟踪所有更改之间发生冲突,所以我可以找出昨天我破坏代码的位置,并且有一个控制(高开销)的代码审查过程,可以让事情保持健全。
我在一家非常传统的ClearCase商店工作。所有签到需要代码审查,我缺乏建立私人分支机构的权力。为了满足控制我所有日常工作版本的原始愿望,我在clearcase视图中使用了mercurial,这只是一种作品
我寻求集体智慧,以便跟踪最佳方式的日常变化,同时尽可能地与明确的病例玩家一起玩。
我对ClearCase并不熟悉,因此我的答案范围仅为 mercurial 。
我认为您的下列问题:我在本地跟踪更改,即使步骤不完整/已损坏,也能保存我的步骤,然后提交整个图片以供审查,但通常情况下,提交的内容太大而且不易审查。我是否正确?
为了解决这个问题,我使用 Mercurial Queues 。这些队列允许你基本上编辑你的本地unpushed提交,重新排序和折叠几个补丁到一个单一/或拆分一个提交到可读的小块。在阅读更多关于它的信息之前,我有关于如何使用它们的建议:
折叠
类似的补丁。例如,如果连续尝试n,n + 1和n + 2,其中n + 1部分取消n,并且n + 1是一个打字错误,那么只需将三个提交合并为一个有意义的提交这个提交完全修复了问题#1212313做这个和那个。
I am struggling with a perceived conflict between tracking all my changes so I can figure out where I broke the code yesterday, and having a controlled (high overhead) code review process that keeps things sane.
I work in a very traditional ClearCase shop. All checkins require code review and I lack the authority to create private branches. In order to satisfy a primal urge for version controlling all my daily work I use mercurial from with in the clearcase view this only sort of works
I seek the collective wisdom as to what is the best way to keep track of my daily changes while playing as nicely as possible with the clear case folks.
I am not familiar with ClearCase, hence the scope of my answer will only be mercurial.
I consider your following problem: I track changes locally to be able to save my steps even if steps are incomplete/broken, and then I submit the whole picture for review, but it often turns out being commits that are too big and not easily reviewable. Am I correct?
To solve this particular problem, I use Mercurial Queues. These queues allow you to basically edit your local unpushed commits, to reorder and to fold several patches into a single one/or split one commit into small readable chunks. Before reading more about it, here is my suggestion on how you would use them:
- You do your usual work. Do small easy commits, as you wish, according to your own personal standards because the commits will not be seen by your coworkers. Break the build if you have to, do whatever you want to do.
- Once you get the whole big picture, the 4780-lines long patch, pause.
- Import your local commits in your mercurial queue.
- Review your successive commits locally, and ask yourself "how can I make this readable?". For example, you will identify groups of commits on the same feature. Or several attempts at fixing the same problem.
- Once you have identified meaningful commit groups, reorder your patches (reorder your commits: that's what Mercurial Queues allow you to do). After this,
fold
similar patches together. For example, if you have successive attempts n, n+1, and n+2, where n+1 partially undoes n, and n+1 is a typo oneliner... well just merge the three commits into one single meaningful commit "this commit completely fixes issue #1212313 doing this and that". - After reorganizing your pile/queue of commits, you will end up having a serie of small meaningful patches. Because they are small, they are easily readable. Just submit the serie of meaningful patches to your coworkers: if each patch is clean, small, and addresses a single issue, review time will be very small.
这篇关于跟踪每天的变化,作为一个peon,在一个明确的商店的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!