Search code examples
mercurialtortoisehg

How do I get Mercurial's hgwebdir working on Windows?


These are the steps I took:

  • install apache 2.2.x
  • install TortoiseHg 0.7
  • copy hgwebdir.cgi, hgweb.config to cgi-bin
  • edit hgweb.config as appropriate
  • unzip $blah\TortoiseHg\library.zip to unzip $blah\TortoiseHg\library
  • sys.path.append("$blah\TortoiseHg\library") at the beginning of hgwebdir.cgi
  • move $blah\TortoiseHg\templates to $blah\TortoiseHg\library\templates

(Edit: I forgot to add that all these steps are laid out here.)

When I run http://localhost/cgi-bin/hgwebdir.cgi/ I can see my repository. If I try browse that repository, I'm told "DLL load failed: The specified module could not be found.". The last line of the walkback says "c:\program files\apache group\apache\cgi-bin\mercurial\osutil.pyc in __load()".

I've read about people having problems with pywintypes25.dll; this lives in "c:\program files\tortoisehg" and is already in my PATH.

What DLL couldn't be found?


Solution

  • you missed the c libs of mercurial

    there are 3 ways to get out of this

    1. recent mercurial versions ship with pure python implementations you can find in mercurial/pure
    2. compile it yourself (im not exactly sure on the steps, on any unix this just works)
    3. grab win32 installer from the website
      note that i didn't yet take a look at how those are build
      (you need a distutils based install, not a py2exe based one)