0

Hosting Mercurial on a windows box thru IIS.

I have a root directory where I put all of my repos

d:\repos
   - ProjectA
       - .hg
          - hgrc
   - ProjectB
       - .hg
          - hgrc
   - ProjectC
       - .hg
          - hgrc

All of the repos' hgrc files setup the notify extension with:

config =d:\hg\Repositories\NotificationList.txt

That way I have a single file to manage all of the notification recipients, like the wiki describes: https://www.mercurial-scm.org/wiki/NotifyExtension

But the wiki makes mention of controlling that NotificationList.txt file thru it's own repository? How can I do that? If I create a separate repo at d:\repos\HgNotify and have the NotificationList.txt file in there, users can change, commit and push back, but when the push occurs, NotificationList.txt does not get updated on the hg server.

Is there a way to update that file somehow? Am I missing a key setup on my Hg server? Or do I need to use a post-push hook to deploy that file?

Update 1

I added the details from Tim's answer and I kept getting HTTP 500: Server Error on the push. I finally figure out how to trace the python calls (python -m win32traceutil), and here is what seems to be the problem:

 File "C:\Python27\lib\site-packages\mercurial\util.py", line 402, in hgexecutable
 exe = findexe('hg') or os.path.basename(sys.argv[0]) AttributeError: 'module' object has no attribute 'argv'

It doesn't seem to be able to find hg.exe.

Update 2

I installed TortoiseHg and rebooted the system. Now I get: emote: added 1 changesets with 1 changes to 1 files remote: notify: sending 1 subscribers 1 changes remote: warning: changegroup.update hook exited with status 1

So that makes be think that it has found the hg.exe, but it is not doing its job, because the file does not get updated

Update 3

Found my solution here: https://stackoverflow.com/a/8023594/698

The command line I ended up using was:

 changegroup = cmd /c hg update

I also added: [ui] debug=true

To my hgrc. Those two combined gave me a lot more meaningful messages. In the end I saw "Access denied". I gave Users full permission, but I am not sure why giving IUSR full permission didn't work. Something I'll have to dig into at a later time.

4

1 回答 1

1

在包含通知列表的服务器存储库中,您需要添加一个更改组挂钩:

[hooks]
changegroup.update = hg update -C

或者如果您想确保存储库始终是干净的:

[extensions]
purge =

[hooks]
changegroup.update = hg update -C && hg purge --all
于 2013-02-07T20:26:28.870 回答