Commiting to hg repos with commit scripts using hgwebdir.cgi

Tim Groeneveld tim at timg.ws
Sun Mar 23 07:52:45 CDT 2008


Hello everybody!

I am trying to get commit scripts working with hgwebdir.cgi, but so far have 
had very little luck so far. This is what I have done so far:

tim at timg:/tmp$ cat /var/www/hg/commitTest/.hg/hgrc
[hooks]
changegroup = echo `date` &> /tmp/test

tim at timg:/tmp$ hg clone http://127.0.0.1/hg/commitTest/
destination directory: commitTest
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
tim at timg:/tmp$ cd commitTest/
tim at timg:/tmp/commitTest$ ls
tim.txt
tim at timg:/tmp/commitTest$ nano tim.txt
tim at timg:/tmp/commitTest$ hg ci
tim at timg:/tmp/commitTest$ hg push
pushing to http://127.0.0.1/commitTest/
searching for changes
abort: 'http://myhg.timg.ws/commitTest/' does not appear to be an hg 
repository!

There are two problems:
  1 - the error that occurs after the commit (... does not appear to be an hg 
repository!). Only occurs when I have the changegroup commit script on. The 
commit actually works though, so this error message is a bit misleading :/
  2 - The commit script does not run. I don't know why. I don't think it's a 
permissions issue. It does run though if I use hg serve. So is this a problem 
with hgwebdir.cgi?

Thanks,
  - Tim G
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20080323/37739daa/attachment.pgp 


More information about the Mercurial mailing list