Mercurial hook - hg update
Ezra Smith
ezra.smith at bentley.com
Mon Aug 3 18:41:13 UTC 2009
Martin Geisler <mg <at> lazybytes.net> writes:
>
> "Mohammed, Khursheed" <khursheed.mohammed <at> intel.com> writes:
>
> >>> 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.
> >
> > Thanks Martin for your reply
> >
> > On Windows IIS the hgwebdir.cgi script is configured to run as
> > "Integrated Window authentication" with basic authentication.
>
> Okay, I hope someone else knows what that means I'm actually only
> using Linux so I cannot help you further.
>
It just means that, provided "Security -> Impersonate User" is set to true
(which is the IIS default), the web server process should be running as him.
>From experience with Mercurial/IIS, things I'd recommend trying:
(a) Does running a simple non-HG command work? Permissions on cmd.exe will
affect out-of-process python hooks.
(b) Does a simple hook like '"python -c "import sys; sys.exit(0)"' work?
(c) If you make it this far, can you confirm that the process is running as the
user you think it's running as, with a hook that does something like:
import win32api
username = win32api.GetUserName()
(write username to a file so you can read it)
-Ezra
More information about the Mercurial
mailing list