[Buildbot-devel] [path] mercurial hook

Frederic Leroy fredo at starox.org
Mon Jul 2 10:01:40 UTC 2007


On Mon, Jul 02, 2007 at 02:38:08AM -0700, Brian Warner wrote:
> 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.
I catch this one :)
I'm fairly new to python and mercurial, but I'm motivated.
It's the best way to have file changes in good shape.

Cheers, 

-- 
Frederic Leroy




More information about the devel mailing list