2010-01-23 13 views
5

Desidero configurare un server Mercurial SC e ho seguito le istruzioni trovate qui: http // stackoverflow.com/questions/818571/how-to-setup-mercurial-and- hgwebdir-on-iisErrore nell'impostazione di Mercurial su Windows Server 2008

Ho controllato tutte le mie impostazioni più volte e non riesco a superare questo errore dopo aver completato la configurazione. Qualsiasi consiglio sarebbe utile. Grazie.

Server Error in Application "DEFAULT WEB SITE/HG"Internet Information Services 7.5 

Error Summary 
HTTP Error 502.2 - Bad Gateway 
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Traceback (most recent call last): File "C:\inetpub\hgcgi\hgwebdir.cgi", line 12, in <module> from mercurial import demandimport; demandimport.enable() ImportError: No module named mercurial ". Detailed Error InformationModule CgiModule 
Notification ExecuteRequestHandler 
Handler Python 2.5 
**Error Code 0x00000001** 
Requested URL http://localhost:80/hg/hgwebdir.cgi 
Physical Path C:\inetpub\hgcgi\hgwebdir.cgi 
Logon Method Anonymous 
Logon User Anonymous 
Most likely causes: 
The CGI process was shut down or terminated unexpectedly before it finished processing the request. 
The CGI process has a flaw and does not return a complete set of HTTP headers. 
Things you can try: 
Check the event logs on the system to see whether the CGI process is shutting down unexpectedly. 
Troubleshoot the CGI application to determine why it is not sending a complete set of HTTP headers. 

risposta

6

Il traceback nel lunghissimo riga dice che Mercurial non si trova nel vostro PYTHON_PATH. Prova a eseguire la modifica hgwebdir.cgi come mostrato nel passaggio 5.1 dalla pagina HgWebDirStopByStep.

# adjust python path if not a system-wide install: 
import sys 
sys.path.insert(0, "c:/dev/Mercurial/lib") 

Dove, naturalmente, l'elemento di percorso che viene inserito è regolato per fare riferimento ovunque siano i file di libreria mercurial.

+0

Ho installato mercurail 1.4.2 e posso eseguirlo dalla mia riga di comando. Ho il cgi e la directory virtuale registrati in IIS e seguite attentamente le istruzioni ... altri suggerimenti? – amadib

+0

Ho regolato la risposta in modo da includere esplicitamente il percorso dei file della libreria mercurial sul file .cgi. –

+0

Grazie. Questo l'ha risolto :) – amadib

Problemi correlati