hgweb serve behind apache

Jérôme Godbout jerome at bodycad.com
Tue Jan 17 21:21:53 UTC 2017


Hi,

I'm currently moving our hgweb server from Window to Linux (CentOS 7). I
have a working pull but cannot push through http:

*hg push http://10.1.30.67/TestRepos <http://10.1.30.67/TestRepos>*
*pushing to http://10.1.30.67/TestRepos <http://10.1.30.67/TestRepos>*
*searching for changes*
*'http://10.1.30.67/TestRepos <http://10.1.30.67/TestRepos>' does not
appear to be an hg repository:*
*---%<--- (text/html; charset=UTF-8)*
*<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><body
bgcolor="#f0f0f8">*
*<table width="100%" cellspacing=0 cellpadding=2 border=0
summary="heading">*
*<tr bgcolor="#6622aa">*
*<td valign=bottom> <br>*
*<font color="#ffffff" face="helvetica,
arial"> <br><big><big><strong><type
'exceptions.OSError'></strong></big></big></font></td*
*><td align=right valign=bottom*
*><font color="#ffffff" face="helvetica, arial">Python 2.7.5:
/usr/bin/python<br>Tue Jan 17 16:05:36 2017</font></td></tr></table>*

*<p>A problem occurred in a Python script.  Here is the sequence of*
*function calls leading up to the error, in the order they occurred.</p>*
*<table width="100%" cellspacing=0 cellpadding=0 border=0>*
*<tr><td bgcolor="#d8bbff"><big> </big><a
href="file:///var/www/cgi-bin/hgweb.cgi">/var/www/cgi-bin/hgweb*
*---%<---*


I can browse the repos on the web interface.
Here's the current .cgi file (I will try to migrate to wsgi after
everything work):

*#!/usr/bin/env python*

*# Path to repo or hgweb config to serve (see 'hg help hgweb')*
*config = "/var/www/cgi-bin/hgserve.config"*

*# Uncomment to send python tracebacks to the browser if an error occurs:*
*import cgitb; cgitb.enable()*

*from mercurial import demandimport; demandimport.enable()*
*from mercurial.hgweb import hgweb, wsgicgi*

*application = hgweb(config)*
*wsgicgi.launch(application)*


Here the hgserve.config

*[paths]*
*TestRepos = /mnt/hg/TestRepos/**

*[web]*
*contact = cad at bodycad.com <cad at bodycad.com>*
*description = Laboratoire Bodycad repositories*
*allow_archive = zip*
*push_ssl = False*
*allow_push = **
*allow_pull = True*
*allow_read = **
*baseurl = /*
*staticurl = /static/*
*verbose = True*


This config file work under our Window installation (only the drive is not
mount but access directly //host/TestRepos/* with credential already save
under windows). The pull work as expected.

The drive is mounted and *sudo -u apache touch
/mnt/hg/TestRepos/myFileTouch* does work so permission seem to be fine. I
try disabling selinux s=just to make sure I wasn't having any trouble. The
/mnt/hg is an NTFS file server mount with cifs.

The only trace into the apache log is a return code 200 OK:

"GET / HTTP/1.1" 200 2281
"GET /static/hgicon.png HTTP/1.1" 200 792
"GET /TestRepos/ HTTP/1.1" 200 3465
"GET /TestRepos?cmd=capabilities HTTP/1.1" 200 356
"GET /TestRepos?cmd=batch HTTP/1.1" 200 43
"GET /TestRepos?cmd=listkeys HTTP/1.1" 200 58
"GET /TestRepos?cmd=listkeys HTTP/1.1" 200 -
"GET /TestRepos?cmd=branchmap HTTP/1.1" 200 48
"GET /TestRepos?cmd=branchmap HTTP/1.1" 200 48
"GET /TestRepos?cmd=listkeys HTTP/1.1" 200 -
"POST /TestRepos?cmd=unbundle HTTP/1.1" 200 33470


Anybody have an idea of what is going on?
Thanks,

[image: bodycad] <https://www.bodycad.com/>
Jerome Godbout
Software Developer
2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7
T:  +1 418 527-1388
E: jerome at bodycad.com
www.bodycad.com

The contents of this email message and any attachments are intended solely
for the addressee(s) and may contain confidential and/or privileged
information and may be legally protected from disclosure. If you are not
the intended recipient of this message or their agent, or if this message
has been addressed to you in error, please immediately alert the sender by
reply email and then delete this message and any attachments. If you are
not the intended recipient, you are hereby notified that any use,
dissemination, copying, or storage of this message or its attachments is
strictly prohibited.

Le contenu de ce message et les pièces jointes sont destinés uniquement
pour le(s) destinataire(s) et peuvent contenir des informations
confidentielles et / ou privilégiées qui peuvent être protégées légalement
contre toute divulgation. Si vous n'êtes pas le destinataire de ce message
ou son agent, ou si ce message vous a été adressé par erreur, s’il vous
plaît avertir immédiatement l'expéditeur par courriel de réponse, puis
supprimer ce message et les pièces jointes. Si vous n'êtes pas le
destinataire prévu, vous êtes par la présente informé que toute
utilisation, diffusion, copie, ou stockage de ce message ou de ses pièces
jointes est strictement interdit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20170117/9fc529b5/attachment.html>


More information about the Mercurial mailing list