Get a 404 Error when clone, pull mercurial repository

7.7k views Asked by At

I have a repository in here http://repos.joomlaguruteam.com/

I using hgweb.cgi this is my hgweb.config file

[web]
baseurl = 
#allowpull = true
allow_push = *
push_ssl = false
allow_archive = bz2 gz zip

[paths]
/ = /home/repos/*

I can browse it but I can't clone it. Every time I clone it I have this error

hg clone http://repos.joomlaguruteam.com/hello
destination directory: hello
requesting all changes
abort: HTTP Error 404: Not Found

and the access log have that

115.5.95.59 - - [10/Feb/2011:04:20:33 -0600] "GET /hello?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" 200 1 "-" "mercurial/proto-1.0"
115.5.95.59 - - [10/Feb/2011:04:20:34 -0600] "GET /hello?cmd=heads HTTP/1.1" 200 41 "-" "mercurial/proto-1.0"
115.5.95.59 - - [10/Feb/2011:04:20:34 -0600] "GET /hello?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" 404 597 "-" "mercurial/proto-1.0"

But I can clone it using uncompressed transfer

hg clone --uncompressed http://repos.joomlaguruteam.com/hello

But now I don't know how to pull the from the repository, because when I pull from it. it have the same problem like clone. also for incoming.

Here is my .htaccess file

Options +ExecCGI
RewriteEngine On
#write base depending on where the base url lives
#RewriteBase /hg
RewriteRule ^$ hgweb.cgi  [L]
# Send requests for files that exist to those files.
RewriteCond %{REQUEST_FILENAME} !-f
# Send requests for directories that exist to those directories.
RewriteCond %{REQUEST_FILENAME} !-d
# Send requests to hgweb.cgi, appending the rest of url.
RewriteRule (.*) hgweb.cgi/$1  [QSA,L]

I can push revison to the repository but can't pull from it.

Is there anyway to configure this or something to make it work.

Thank you very much for helping me.

Thanks, Yuan

5

There are 5 answers

1
Yuan Chen On BEST ANSWER

OK I have found out the problem.

comment out the following line in /home/my_username/.hgrc

#verbose = True

more detail here

3
Tyler Smith On

Question: are you running a hgweb.cgi and aliasing it via your web server?

If so http://url/hello might actually be pointing to http://url/hgweb.cgi/hello and that might be the path its looking for. Typically you have a cgi script serving the mercurial web interface.

0
Chris Eldredge On

This can also happen when you are hosting hgweb in IIS and a pull request exceeds the maximum query string length on the server. The default of 2048 bytes can be increased by configuring the system.webServer/security/requestFilters/requestLimits config section.

2
hipyhop On

This may sound obvious but have you tried uncommenting the #allowpull = true line in your hgweb.config file?

1
Valery Viktorovsky On
  1. upgrade mercurial to lates version

  2. try to replace [paths] section to

    [collections]
    / = /home/repos
    
    [web]
    baseurl =
    
  3. update hgrc for all your repos

    [web]
    allow_read = YOUR_USER1, YOUR_USER2
    allow_push = YOUR_USER1
    push_ssl = false