Liuw's Thinkpad

想要赢就先学会输,想要成功就先学会失败

Archive for the ‘vcs’ tag

关于开发管理的一些思考

with 2 comments

目前我们组内对开发的管理还十分初级。Wiki刚刚开始用,没有用trac、bugzilla之类的工程控制工具,只用了Mercurial进行了版本控制,交流主要靠每周例会。

学生开发组织,我觉得是比较难做到规范化开发的。一则因为外围工具的学习成本高,项目等不及;二则因为学生组织与公司不一样,至少不会因为开发流程不规范而被fire掉。在学校里面,老板要的是效果、演示,不管你用什么方法去做。

在目前开发的过程中,也出现了一些问题。原来使用Mercurial的原因,就是一个DVCS看起来更适合我们项目。组内对于Xen都处于摸索的状态,需要做大量的实验,会产生大量的commit。使用svn的话,必须等到特性稳定之后才可以commit,不合适。

当然,实际使用过程中,我们仍然保持有一个“主”版本库,其中含有稳定的代码。原则上来说,主版本库更新之后,每个人都应该与之保持同步。

现在问题来了,大家都没有及时与主版本进行同步,所以现在diverge得越来越远了。到时再想merge的话,conflict将是一个很头痛的问题。但是用svn的话,这种情况就不会出现了。

当然,只要DVCS的使用者注意同步,这也不会是什么大问题。CVCS的好处是,这个步骤是强制的,不能有意无意的略过,大家必须保持一致。

现在我已经预见到以后merge会遇到的痛苦了。

UPDATE:和小胖聊了一下,发现其实还是工作流的问题。人是活的,工具是死的。工作流做好了,活用branch,CVCS也可以解决“不稳定的新特性commit”的问题。所以最现实的,就是把工作流做好。我们缺的不是工具,而是完整的工作流。

Written by liuw

April 19th, 2010 at 11:18 am

Git and Mercurial

without comments

I use Git and Mercurial. Take a note on some of my configurations.

Git is configured via git(1) command. Configurations eventually go into .gitconfig, which can be edited by hand.

# note "--global" means per user
# system wide setting is set with "--system"
# if cd into project dir and without "--global", settings will be in project scope
$ git config --global user.name 'Wei Liu'
$ git config --global user.email liuw@liuw.name

# if use windows, better set
$ git config --global core.autocrlf true
$ git config --global core.safecrlf true

Mercurial is configured via ~/.hgrc or project specified .hgrc.

[ui]
username = Wei Liu <liuw@liuw.name>

As far as I can see, Git is more powerful while Mercurial is easier to use. There’s still more to learn about DVCS. Some interesting stuffs:

http://www.python.org/dev/peps/pep-0374/

This article provides several usage scenarios on several VCS, quite useful to green hand like me.

http://code.google.com/p/support/wiki/DVCSAnalysis

Google’s analysis of Git and Mercurial. But I got the sense that the reviewer’s biased towards Mercurial. Anyway, Google is a Python company.

Written by liuw

February 9th, 2010 at 10:38 pm

Posted in Tech

Tagged with , , ,