diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -1307,6 +1307,9 @@ coreconfigitem('web', 'archivesubrepos', coreconfigitem('web', 'cache', default=True, ) +coreconfigitem('web', 'comparisoncontext', + default=5, +) coreconfigitem('web', 'contact', default=None, ) diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -858,7 +858,7 @@ def comparison(web): if 'context' in web.req.qsparams: context = parsecontext(web.req.qsparams['context']) else: - context = parsecontext(web.config('web', 'comparisoncontext', '5')) + context = parsecontext(web.config('web', 'comparisoncontext')) def filelines(f): if f.isbinary(): diff --git a/tests/test-http-bad-server.t b/tests/test-http-bad-server.t --- a/tests/test-http-bad-server.t +++ b/tests/test-http-bad-server.t @@ -72,7 +72,7 @@ Failure to read all bytes in initial HTT $ cat hg.pid > $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ clone - abort: error: bad HTTP status line: '' + abort: error: bad HTTP status line: * (glob) [255] $ killdaemons.py $DAEMON_PIDS @@ -88,7 +88,7 @@ Same failure, but server reads full HTTP $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log $ cat hg.pid > $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ clone - abort: error: bad HTTP status line: '' + abort: error: bad HTTP status line: * (glob) [255] $ killdaemons.py $DAEMON_PIDS @@ -105,7 +105,7 @@ Failure on subsequent HTTP request on th $ hg serve --config badserver.closeafterrecvbytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log $ cat hg.pid > $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ clone - abort: error: bad HTTP status line: '' + abort: error: bad HTTP status line: * (glob) [255] $ killdaemons.py $DAEMON_PIDS @@ -144,7 +144,7 @@ Failure to read getbundle HTTP request $ cat hg.pid > $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ clone requesting all changes - abort: error: bad HTTP status line: '' + abort: error: bad HTTP status line: * (glob) [255] $ killdaemons.py $DAEMON_PIDS @@ -203,7 +203,7 @@ Now do a variation using POST to send ar $ cat hg.pid > $DAEMON_PIDS $ hg clone http://localhost:$HGPORT/ clone - abort: error: bad HTTP status line: '' + abort: error: bad HTTP status line: * (glob) [255] $ killdaemons.py $DAEMON_PIDS