[PATCH 0 of 3] Make hg serve --daemon work on Windows (issue421)

Patrick Mezard pmezard at gmail.com
Wed Jan 6 14:59:36 CST 2010


Here are incremental fixes for issue421: 'hg serve --daemon' crashes on windows.

I would like to validate the following points:
- The file based synchronization is not brain damaged. It passes hgweb and serve tests on Windows and MacOSX. I don't know other portable solutions to this. It can be implemented with named mutexes or similar "named" stuff on Windows, but that would be available on pywin32 builds only.
- util.hgcmd() adds to the ways to get some kind of hg executable. Unfortunately it seems necessary under the constraints put by util.spawndetacted() on Windows. It's not elegant but its use should be pretty limited.

I have been running the test suite on Windows with the first two patches for more than two years now and I have seen peculiar things with child processes. The third patch finally made the ghost console disappear. So I think this is good enough to pretend it works. I tested with py2exe binary too.

As a side note, making cmdutil.service() work on Windows is a little step toward inotify on Windows.


More information about the Mercurial-devel mailing list