Commiting to hg repos with commit scripts using hgwebdir.cgi

Giorgos Keramidas keramida at
Mon Mar 24 07:29:43 CDT 2008

On Mon, 24 Mar 2008 13:47:37 +1100, Tim Groeneveld <tim at> wrote:
> On Monday 24 March 2008 2:59:32 am Giorgos Keramidas wrote:
>> > tim at timg:/tmp$ cat /var/www/hg/commitTest/.hg/hgrc
>> > [hooks]
>> > changegroup = echo `date` &> /tmp/test
>> Commit hooks which print stuff on stdout will mess the `wire protocol'
>> of Mercurial itself, IIRC.
>> Try adding commit scripts which log to a file first.  There is an open
>> issue for this:
> Well, I could be wrong about this, but if I run "echo `date` &>
> /tmp/test" in a terminal it does not output anything to STDOUT.
> tim at timg:~$ echo `date` &> /tmp/test
> tim at timg:~$ cat /tmp/test
> Mon Mar 24 13:47:24 EST 2008

I was a bit unclear.  I thought that `&>' was printing to stderr, but I
see that you already tried logging to a file from within the commit hook

Can you try pushing with:

    hg --debug push /repository

This should help tracking down what's going over the wire :)

More information about the Mercurial mailing list