[Buildbot-devel] [path] mercurial hook

Brian Warner warner-buildbot at lothar.com
Mon Jul 2 09:38:08 UTC 2007


Brian Warner <warner-buildbot at lothar.com> writes:

> This line is problematic: the Change object expects a list of filenames,
> whereas 'hg log' emits a single line in which the filenames are separated by
> spaces. I added a .split() to that line to fix it, otherwise the Change
> things we have a bunch of one-character-long filenames.

Oh, duh, it just occurred to me that since Mercurial is written in python, we
can use an in-process hook and bypass the shell+parsing step entirely.
Something which could be used like this:

[hooks]
commit.buildbot = python:buildbot.changes.hghook.hghook

buildbot/changes/hghook.py:

def hghook(ui, repo, **args):
    # not sure what else goes here



I've created ticket #50 to track this one.

cheers,
 -Brian




More information about the devel mailing list