Mercurial hook - hg update

Martin Geisler mg at lazybytes.net
Thu Jul 30 12:14:36 CDT 2009


"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/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090730/854a5030/attachment.pgp 


More information about the Mercurial mailing list