闂傚倸鍊峰ù鍥Υ閳ь剟鏌涚€n偅宕岄柡宀€鍠栭、娑樷堪閸愮偓姣夋俊鐐€戦崕濠氬箯閿燂拷 (0) +1 闂傚倷娴囧畷鍨叏瀹ュ拋鍚嬮柛鈩冾殢娴硷拷 (0) +1 闂傚倸鍊搁崐鎼併偑鐎涙ḿ顩查柣鎴f缁狀垶鏌ㄩ悤鍌涘 (0) +1
闂傚倸鍊峰ù鍥Υ閳ь剟鏌涚€n偅宕岄柡宀€鍠栭、娑樷堪閸愮偓姣夋俊鐐€戦崕鏌ュ垂閸ф钃熼柣鏃囥€€閸嬫挸鈽夊▍顓т簼閹便劑宕惰閺€鑺ャ亜閺囩偞顥為悗姘炬嫹闂傚倸鍊风粈渚€骞栭銈嗗仏妞ゆ劧绠戠壕鍧楁煕閹邦垼鍤嬮柤鏉挎健閺屾稑鈽夊▎鎰▏缂傚倷璁查弲鐘诲蓟閻旂⒈鏁嶆繝濠傚枤閺嗩厼顪冮妶鍐ㄥ姷闁瑰嚖鎷�>>

正在阅读:Mozilla开发组的开发策略(英文)Mozilla开发组的开发策略(英文)

2004-02-14 09:34 出处:PConline原创 作者:Seth Spitzer & Alec Flett 责任编辑:zwg
8) if you are blocked, but have something worth checking in, check in using #ifdef, prefs, or "alternative" files Sometimes you'll work on something, but you can't land it because something else is blocking you. You can still land (assuming you get reviews) if the code isn't on by default. This also makes it easier to get help on the problem. It's easier to tell someone set a pref, or apply a small patch, or set a #define then to apply a monster patch. For C++, use #define, #ifdef, #else and #endif For XUL / JS, and you're doing something major, add your new files to the tree and then have it be a simple jar.mn patch to enable it. You can also have code that checked in, but controlled with a pref and off by default. 9) make sure you have the right fix (not a "I'll fix it later hack") when you go for reviews When tempted to do a first pass fix and fix the fallout later, do it right the first time - don't assume you'll be able to file a "fix it" bug and fix stuff you know about later - chances are the reviewer will make you do the work anyway. If it takes you five extra minutes to do something the "right" way rather than twenty minutes debating it with the reviewer - you've just saved yourself and the reviewer valuable time. Obviously, when doing it the "right" way means re-engineering large amounts of code, then incremental work is better - it's a fine line. 10) don't drag out reviews by fighting the reviewer in bugzilla (or email) When getting a review, try not to belabor a point that a reviewer is debating you on. If the debate is involved, solve it in person, on IRC or over AIM. A five minute discussion is worth an hour of e-mails. 11) do thorough code reviews When you review someone else's code, review thoroughly. If another engineer checks in code that causes regressions or introduces bugs, you might be the one who has to fix it later. Save yourself (and others) time later by doing a solid code review. 12) review your own code before you ask for reviews Pratice your reviewing skills on your own patch before you seek reviews and a super review. Better that you catch something, than the reviewers or super reviewers. You might find a problem, or find that you left in some dump() or printf() statements, or have messed up the whitespace. 13) if you're working on something massive, start a branch If you are working on something big, and you want to be able to check in incrementally without getting reviews, create a branch. But having a branch means dealing with conflicts when you land, and waiting a long time for reviews. Here's how to create a branch: from your linux box: # start from your trunk tree on your local disk cd mozilla find . -type d \! -name CVS | xargs -l -P10 cvs tag -l MY_BASE_TAG > & ../taglog1.txt find . -type d \! -name CVS | xargs -l -P10 cvs tag -b -l MY_BRANCH_TAG > & ../taglog2.txt from your win32 box: cvs co -r MY_BRANCH_TAG mozilla/client.mak cd mozilla edit client.mak, putting MY_BRANCH_TAG in the right places. cvs commit client.mak nmake -f client.mak

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
闂傚倸鍊风粈浣虹礊婵犲倴缂氱憸鏃堛€侀弽顓炲耿婵$偟绮弫鐘绘⒑闁偛鑻晶鎾煙椤旀娼愰柟宄版嚇瀹曘劍绻濋崒娆愭▕濠电姷顣藉Σ鍛村磻閹捐绠柨鐕傛嫹闂傚倸鍊烽悞锕傚箖閸洖纾块柟鎯版绾剧粯绻涢幋娆忕仼闁哄嫨鍎甸幃姗€鎮欓弶鍨彑婵炲瓨绮嶇划鎾诲蓟濞戙埄鏁冮柨婵嗘椤︺儵姊洪崨濠冾棖闁瑰嚖鎷�