Run Mercurial as Windows Service

António Mertens antonio.mertens at gmail.com
Thu Jun 28 05:03:18 CDT 2007


I all. First time I'm trying to contribute to opensource projects so be
gentle :)

Story so far...

  I've just recently "met" Mercurial and started using it right away.
  I'm mostly and windows programmer and wanted to use the hg serve option,
but to do that, in Windows, you have to leave the terminal window opened (hg
crashes with -d but even so I think the terminal has to remain opened). So I
created a Windows Service. I thought of it because SVNServer also has the
same problem and solved it with a windows service.

What does it work...

  What the service does: basically it runs hg serve in a hidden terminal
window with the supplied command-line parameters and that's it. When you
stop the service it just kills the terminal window (I'm still trying to send
a Ctrl+C to hg serve so it can shutdown normally).
  I've also done a configuration program that allows to configure some of
mercurial server parameters such as repository folder (-R), port number
(-p), location of hg.exe, name of the project (-n). I'm still trying to
workout how to integrate the other parameters...

Conclusion...

  I don't know if you'll find it useful or not. I can provide free the
source code (C# .NET 2.0) and the compiled binaries. I've made a small msi
installer but it doesn't installs the service automatically. I'll try to put
it online and on a mercurial repos by the end of the day or tomorrow...
  Please tell me what you think :) Thankx

  António Mertens aka bckspc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20070628/50f95247/attachment.htm 


More information about the Mercurial-devel mailing list