Mercurial hook - hg update

Mohammed, Khursheed khursheed.mohammed at intel.com
Mon Aug 3 11:57:53 CDT 2009


Thanks Martin for your reply

On Windows IIS the hgwebdir.cgi script is configured to run as "Integrated Window authentication" with basic authentication.

Thanks 
Khursheed

-----Original Message-----
From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Martin Geisler
Sent: Thursday, July 30, 2009 10:15 AM
To: mercurial at selenic.com
Subject: Re: Mercurial hook - hg update

"Mohammed, Khursheed" <khursheed.mohammed at intel.com> writes:

> Hi
>
> I'm trying to make a hook to run when a "push" operation takes place.
>
> I have the .hg\hgrc file as below:
> ------------------------------------------------------------------
> [web]
> description = SSD_Test
> accesslog = D:/wwwroot_virtual/hgweb/logs/SSD/Test.access.log
> errorlog = D:/wwwroot_virtual/hgweb/logs/SSD/Test.error.log
> allow_archive = bz2, gz, zip
> allowpull = True
> push_ssl = false
> allow_push = *
>
> [hooks]
> changegroup = hg update
> ------------------------------------------------------------------
>
> I get the below error "warning: changegroup hook exited with status
> -1". Not sure what the error means? I can run the "hg update" inside
> the repository without any errors. And I have the admin rights to the
> machine and the repository.

The webserver must be able to write to the working directory. So are you
sure you run the webserver (the hgwebdir.cgi script) as the same user as
when you tested?

This is different from when you push to a server using SSH -- in that
case you log in with your own user and gain the rights of that user.
With HTTP, all operations are done as the webserver user.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.



More information about the Mercurial mailing list