Issue #12 resolved

Error on Cloning Repo through http

rider_pie
created an issue

If I try to clone repository through http URL like that: hg clone --verbose http://webserver:8080/scm/hg/HGPie I got Client and Server error:

<Client-Error> % hg clone --verbose http://webserver:8080/scm/hg/HGPie 'content-type' [command returned code 255 Thu Apr 21 10:01:48 2011] <Client-Error/>

<Server-Error>

10:09:16.604 [qtp8918249-22] WARN sonia.scm.web.cgi.DefaultCGIExecutor - Traceback (most recent call last): File "C:\Programmi\scm-server1.1\scm-server\bin..\confapp\cgi-bin\hgweb.py", line 13, in <module> from mercurial import demandimport; demandimport.enable() ImportError: Bad magic number in C:\Python27\lib\mercurial__init__.pyc 10:09:16.604 [qtp8918249-22] WARN sonia.scm.web.cgi.DefaultCGIExecutor - process ends with exit code 1 <Server-Error/>

Any suggestions to avoid this?

Thanks in advance.

Comments (14)

  1. rider_pie reporter

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config> <repositoryDirectory>
    nas01\prog\mercurial\HGCentralRepo</repositoryDirectory> <hgBinary>C:\Programmi\Mercurial\hg.exe</hgBinary> <pythonBinary>C:\Python26\python.exe</pythonBinary> <pythonPath></pythonPath> <useOptimizedBytecode>false</useOptimizedBytecode> </config>

  2. Sebastian Sdorra repo owner

    The mercurial configuration on windows is very complicated, see #1. The easiest way is to use the auto configuration. If the auto configuration does not work for you, then you have to do the following steps:

    • unpack the library.zip from your mercurial installation
    • copy the templates folder from your mercurial installation in the same folder
    • check the "Optimized Bytecode" checkbox if the folder contains .pyo files
    • set this folder as "Python Module Search Path"
    • set your hg.exe as "HG Binary"
    • set your python 2.6 exe as "Python Binary"

    Note: Tested with the "Mercurial 1.x Python 2.6 package" and "TortoiseHg with Mercurial"

    I will create a wiki page for this problem in the next few days.

  3. rider_pie reporter

    Hi, I've followed the steps but I've got this error: I think I've missed something in configuration.....

    Client Side: % hg clone --verbose http://webserver:8080/scm/hg/HgTestProject 'content-type' [command returned code 255 Tue Apr 26 09:45:27 2011]

    Server Side: 09:45:27.114 [qtp8918249-17] WARN sonia.scm.web.cgi.DefaultCGIExecutor - Traceback (most recent call last): File "C:\Programmi\scm-server1.1\scm-server\bin\..\confapp\cgi-bin\hgweb.py", line 13, in <module> from mercurial import demandimport; demandimport.enable() ImportError: No module named mercurial 09:45:27.114 [qtp8918249-17] WARN sonia.scm.web.cgi.DefaultCGIExecutor - process ends with exit code 1

  4. rider_pie reporter

    thanks, I' ve followed your configuration and now it works fine

    (I have: TortoiseHg version 2.0.2 - mercurial 1.8.2 -python 2.6)

  5. rider_pie reporter

    I've reconfigured my previous mercurial (1.8.2) installation, Python 2.6, TortoiseHg version 2.0.2 and now all works fine. Thanks for your advice.

    my hg.xml is:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <config>
        <repositoryDirectory>\\nas01\mercurial\HGCentralRepo</repositoryDirectory>
        <hgBinary>C:\Programmi\Mercurial\hg.exe</hgBinary>
        <pythonBinary>C:\Python26\python.exe</pythonBinary>
        <pythonPath>C:\Programmi\Mercurial\lib</pythonPath>
        <useOptimizedBytecode>false</useOptimizedBytecode>
    </config>
    
  6. Log in to comment