Noob Question: Build number
Steve Borho
steve at borho.org
Tue Nov 27 05:04:07 UTC 2007
On Mon, 2007-11-26 at 21:57 -0600, Steve Borho wrote:
> On Mon, 2007-11-26 at 23:58 +0000, blr at robertsr.us wrote:
> > I'm in the process of switching my development teams from CVS to
> > mercurial. I have played with mercurial quite a bit, but I admit that
> > I'm still trying to wrap my brain around it.
> >
> > To start with, we'll have a central hg server that all developers push
> > to and pull from via ssh.
> >
> > One thing we had an ugly kludge for in CVS was a build number. When a
> > developer fixes a bug, they 'cvs commit' and a hook on the cvs server
> > tells them the commit number, and they put that number in the defect
> > tracker. Then the testers know any build with that number or higher
> > should have that defect fixed.
> >
> > My plan now for mercurial is to have a wrapper around 'hg push' that
> > does an 'hg outgoing', greps the output for the latest changeset, does
> > the 'hg push', then does a wget from hgweb to get the incremental
> > version number for the changeset on the shared server, and display that as
> > the build number.
> >
> > That's better than the commit hooks in CVS, but my question is, is
> > there a better way to do this in mercurial?
>
> Would it be acceptable for the programmers to simply record the
> date/time that their bug fix was pushed (or pulled) into the central
> repo? Your testors would just need to know when the automated build
> was started to know whether it contained a certain fix or not.
Alternatively, if the programmers record the bug ID in the commit
message (always a good policy anyway), then the bugs that are fixed in
certain builds are self-documenting. Assuming builds are tagged, you
can easily do things like this:
# What bugs were fixed in build_140?
hg log -k "BUG#" --rev build_139:build_140
# What revisions fixed bug 213?
hg log -k "BUG#213"
# Was bug 314 fixed before build_140?
hg log -k "BUG#314" --rev null:build_140
The revision range also accepts dates or hashes so you could do this
without tags,if need be (having thousands of auto-build tags will likely
get to be annoying).
--
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F E2E4 B0C2 5292 F2C6 2C8C
More information about the Mercurial
mailing list