shell script hook

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

shell script hook

cheng mike
Hi All,
I add a shell script hook to auto update the central repository in hgrc. It report below error message but the central repo is updated. Does anyone know the reason? The mercurial is 0.93 and the OS is opensolaris.

hgrc:
[hooks]
changegroup = hg update

$ hg push
pushing to http://ns-x4200-15.sfbay/hg/mytag/
searching for changes
abort: HTTP Error 500: Internal Server Error


$more error_log
[Wed Jul 11 02:36:25 2007] [error] [client 192.168.16.190] malformed header from script. Bad header=1 files updated, 0 files merge: hgwebdir.cgi

thanks
Mike



_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: shell script hook

Matt Mackall
On Wed, Jul 11, 2007 at 05:57:21PM +0800, cheng mike wrote:

> Hi All,
> I add a shell script hook to auto update the central repository in hgrc. It
> report below error message but the central repo is updated. Does anyone know
> the reason? The mercurial is 0.93 and the OS is opensolaris.
>
> hgrc:
> [hooks]
> changegroup = hg update
>
> $ hg push
> pushing to http://ns-x4200-15.sfbay/hg/mytag/
> searching for changes
> abort: HTTP Error 500: Internal Server Error
>
>
> $more error_log
> [Wed Jul 11 02:36:25 2007] [error] [client 192.168.16.190] malformed header
> from script. Bad header=1 files updated, 0 files merge: hgwebdir.cgi

The output of your hook went to the web server as part of the CGI
script's output.

Perhaps we ought to redirect that output. But it's not clear to where..

--
Mathematics is the supreme nostalgia of our time.
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: shell script hook

cheng mike


2007/7/13, Matt Mackall <[hidden email]>:
On Wed, Jul 11, 2007 at 05:57:21PM +0800, cheng mike wrote:

> Hi All,
> I add a shell script hook to auto update the central repository in hgrc. It
> report below error message but the central repo is updated. Does anyone know
> the reason? The mercurial is 0.93 and the OS is opensolaris.
>
> hgrc:
> [hooks]
> changegroup = hg update
>
> $ hg push
> pushing to http://ns-x4200-15.sfbay/hg/mytag/
> searching for changes
> abort: HTTP Error 500: Internal Server Error
>
>
> $more error_log
> [Wed Jul 11 02:36:25 2007] [error] [client 192.168.16.190] malformed header
> from script. Bad header=1 files updated, 0 files merge: hgwebdir.cgi

The output of your hook went to the web server as part of the CGI
script's output.

Perhaps we ought to redirect that output. But it's not clear to where..

Hi Matt,
Thanks for your reply. Based on your hint, I have fixed it. See below,
changegroup = hg update > /dev/null
Now it works fine.

cheers,
Mike




_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial