Serving HG repositories on Windows 2012 R2 Server.

Matt Mackall mpm at selenic.com
Wed Sep 23 17:06:22 UTC 2015


On Wed, 2015-09-23 at 14:37 +0000, Anders Ishoey (INT) wrote:
> Hi,
> 
> I'm trying to set up a 2012 R2 windows server with mercurial HG.
> browsing, pull, clone,add,commit works. push doesn't work.
> 
> Setup:
> 
> Basic authentication, pass-through, SSL
> Python 2.7 (had to modify random.py. line 114 to make it work)

A very bad sign indeed. Python has orders of magnitude more Windows
users than we do and should not need any hacks to run.

Are you literally using 2.7<no trailing number> as released in July
2010?

> Or, with more detailed output:
> 
> abort: 'https://slasvn02/hgweb.cgi/TestRepo' does not appear to be an hg repository:
> ---%<--- (text/html)
> <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
> <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
> </font> </font> </font> </script> </object> </blockquote> </pre>
> </table> </table> </table> </table> </table> </font> </font> </font><pre>Traceback (most recent call last):
>   File "C:\Users\Public\hgweb\hgweb.cgi", line 57, in <module>
>     application = hgweb(config)
>   File "c:\Python27\lib\site-packages\mercurial\hgweb\__init__.py", line 26, in hgweb
>     return hgwebdir_mod.hgwebdir(config, baseui=baseui)
>   File "c:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 89, in __init__
>     self.refresh()
>   File "c:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 98, in refresh
>     u = ui.ui()
>   File "c:\Python27\lib\site-packages\mercurial\demandimport.py", line 114, in __getattribute__
>     self._load()
>   File "c:\Python27\lib\site-packages\mercurial\demandimport.py", line 86, in _load
>     mod = _hgextimport(_import, head, globals, locals, None, level)
> 
> ---%<---

The latter one shows that you have cgitb enabled and are getting
tracebacks on the server. Disable cgitb in the .cgi file and check your
logs to get the full traceback.

Python 3.x is a different, incompatible language that won't run
Mercurial any time soon.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list