Bug 1250 - verbose set to "on" breaks cloning functionality via http
Summary: verbose set to "on" breaks cloning functionality via http
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Dirkjan Ochtman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-01 20:35 UTC by Ota Mares
Modified: 2008-09-09 03:58 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ota Mares 2008-08-01 20:35 UTC
Enabling verbose to on in the /etc/mercurial/hgrc file breaks the cloning
functionality via the http interface.

I am running the hgwebdir.cgi script on Opensuse 11 with Apache 2.2.6, Python
2.5.2 and mercurial 1.0.1.

Viewing the repository through a browser works fine.
Cloning any repo (hg clone http://repo.domain.com/test) leads to following error
of mercurial: 
abort: HTTP Error 500: Internal Server Error

The apache logs following message:
[Sat Aug 02 04:05:09 2008] [error] [client 192.168.21.45] malformed header from
script. Bad header=1 changesets found: hgwebdir.cgi

The virtual host config:
<VirtualHost *:80>
    ServerName repo-browser.domain.de
    ServerAlias repo-browser.domain
    ServerAdmin webmaster@domain.de

    DocumentRoot /www/repository-browser/htdocs
    ErrorLog /www/repository-browser/logs/error.log

    RewriteEngine on
    RewriteRule (.*) /www/repository-browser/htdocs/hgwebdir.cgi$1

    <Directory "/www/repository-browser/htdocs">
        Options +ExecCGI +FollowSymLinks
    </Directory>
</VirtualHost>

And the used hgrc config (hgwebdir.cgi also points to this file):
[ui]
username = "Servername" <om@viazenetti.de>
#uncommenting following line breaks the clonining functionality via the http
interface
#verbose = true
slash = true

[extensions]
mq=
gpg=
hgk=
acl=
purge=
fetch=
transplant=

[email]
from = "Repository Managment" <om@viazenetti.de>
method = /usr/sbin/sendmail -t -i 

[web]
allow_archive = bz2 gz zip
contact = "Ota Mares" <om@viazenetti.de>
description = No description given
encoding = UTF-8
stripes = 1
style = gitweb
baseurl = 

[paths]
test = /www/_mercurial-test-repo/
Comment 1 Dirkjan Ochtman 2008-08-04 09:06 UTC
Hmm, that's bad. I should look into this.

Though an easy workaround should be to just disable verbose in the server hgrc.
Comment 2 Ota Mares 2008-08-05 03:25 UTC
Sure, its no big issue turning verbose off, if you know the problem ;)
I, for one, searched about two hours until i found the cause and allmost went crazy.
Comment 3 Benoit Boissinot 2008-09-05 15:19 UTC
Isn't that related to the redirection of stdin/stderr ?
Comment 4 Dirkjan Ochtman 2008-09-05 16:06 UTC
Yes. stderr, probably.
Comment 5 Dirkjan Ochtman 2008-09-09 03:47 UTC
I'm going to make this the canonical bug for problems in this class.
Comment 6 Dirkjan Ochtman 2008-09-09 03:58 UTC
Ah, issue1095 is better for this. Superseding.
Comment 7 Bugzilla 2012-05-12 08:52 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:52 EDT  ---

This bug was previously known as _bug_ 1250 at http://mercurial.selenic.com/bts/issue1250