views:

125

answers:

1

We are starting to use Mercurial for source control. We have configured the HGRC configuration file to do an auto update after we push to the "central" repository. With some PCs we get this error msg:

warning: changegroup hook exited with status -1

HGRC looks like this:

[ui] 
username=ADMIN
verbose=true

[hooks]
changegroup = hg update >&2

Later we perform the update manually and everything works right.

+2  A: 

It might be related with the user actually executing the hook, which might not be the one with the correct privileges.

Do you have a IIS webserver managing your Mercurial repos?

(from the thread:)

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)
VonC
Hi, no, we sync using the filesystem, not using the http option. thanks for your comment.
Ezequiel
@Ezequiel: understood. Still it looks like a right issue, due either to the user which executes the hook, or the path in which it is executed.
VonC
Agreed, this is almost always a permission issue.
Tim Post