5

我在这里有一个存储库http://repos.joomlaguruteam.com/

我使用 hgweb.cgi 这是我的 hgweb.config 文件

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

[paths]
/ = /home/repos/*

我可以浏览它,但我不能克隆它。每次我克隆它时都会出现此错误

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

并且访问日志有

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"

但我可以使用未压缩传输克隆它

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

但是现在我不知道如何从存储库中提取,因为当我从它中提取时。它有与克隆相同的问题。也为传入。

这是我的 .htaccess 文件

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]

我可以将修订推送到存储库,但不能从中提取。

无论如何要配置它或使其工作。

非常感谢你帮助我。

谢谢,袁

4

5 回答 5

4

好的,我发现了问题。

注释掉 /home/my_username/.hgrc 中的以下行

#verbose = True

更多细节在这里

于 2011-02-11T14:17:50.877 回答
1

这听起来很明显,但您是否尝试过取消注释文件中的#allowpull = truehgweb.config

于 2011-02-13T10:34:33.950 回答
0

问题:您是否正在运行 hgweb.cgi 并通过您的 Web 服务器对其进行别名处理?

如果是这样,http://url/hello实际上可能指向http://url/hgweb.cgi/hello,这可能是它正在寻找的路径。通常,您有一个服务于 mercurial Web 界面的 cgi 脚本。

于 2011-02-11T14:09:03.527 回答
0

当您在 IIS 中托管 hgweb 并且拉取请求超过服务器上的最大查询字符串长度时,也会发生这种情况。可以通过配置system.webServer/security/requestFilters/requestLimits配置部分来增加 2048 字节的默认值。

于 2011-12-22T20:22:34.617 回答
0
  1. 将 mercurial 升级到最新版本

  2. 尝试将 [paths] 部分替换为

    [collections]
    / = /home/repos
    
    [web]
    baseurl =
    
  3. 为您的所有存储库更新 hgrc

    [web]
    allow_read = YOUR_USER1, YOUR_USER2
    allow_push = YOUR_USER1
    push_ssl = false
    
于 2011-02-13T12:08:20.930 回答