##// END OF EJS Templates
context: stop catching RepoLookupError from namespace.singlenode()...
context: stop catching RepoLookupError from namespace.singlenode() As pointed out by Yuya, the RepoLookupError was there for catching errors from repo.branchtip(). However, since 885c0290f7d5 (localrepo: add ignoremissing parameter to branchtip, 2014-10-16), that should no longer happen. I think it should now be an error if a namespace raises a RepoLookupError, so we propagate the exception up and and make it easy to fix, rather than trying to interpret the changeid as nodeid prefix and raise a general "unknown revision '...'" error. I also don't think we should catch FilteredLookupError and LookupError from the changelog.rev() call, for the same reason as above: If a namespace returns a node that doesn't exist, we should provide a more helpful exception than "unknown revision '...'". Differential Revision: https://phab.mercurial-scm.org/D3145

File last commit:

r33262:8e6f4939 default
r37409:3198d5a2 default
Show More
test-clone-cgi.t
39 lines | 1.1 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: replace exit 80 with #require
r22046 #require no-msys # MSYS will translate web paths as if they were file paths
Mads Kiilerich
tests: introduce 'hghave msys' to skip tests that would fail because of msys
r15567
Matt Mackall
tests: unify test-clone-cgi
r12410 This is a test of the wire protocol over CGI-based hgweb.
initialize repository
$ hg init test
$ cd test
$ echo a > a
$ hg ci -Ama
adding a
$ cd ..
$ cat >hgweb.cgi <<HGWEB
> #
> # An example CGI script to use hgweb, edit as necessary
> import cgitb
> cgitb.enable()
> from mercurial import demandimport; demandimport.enable()
> from mercurial.hgweb import hgweb
> from mercurial.hgweb import wsgicgi
> application = hgweb("test", "Empty test repository")
> wsgicgi.launch(application)
> HGWEB
$ chmod 755 hgweb.cgi
try hgweb request
StevenGBrown
tests: remove duplication of the CGI environment variables
r13269 $ . "$TESTDIR/cgienv"
Matt Mackall
tests: unify test-clone-cgi
r12410 $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON hgweb.cgi >page1 2>&1
Augie Fackler
cleanup: use $PYTHON to run python in many more tests...
r32940 $ $PYTHON "$TESTDIR/md5sum.py" page1
Matt Mackall
tests: unify test-clone-cgi
r12410 1f424bb22ec05c3c6bc866b6e67efe43 page1
Mads Kiilerich
hgweb.cgi: fix internal WSGI emulation (issue3804)...
r18552
make sure headers are sent even when there is no body
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" $PYTHON hgweb.cgi
Mads Kiilerich
hgweb.cgi: fix internal WSGI emulation (issue3804)...
r18552 Status: 200 Script output follows\r (esc)
Content-Type: application/mercurial-0.1\r (esc)
Content-Length: 0\r (esc)
\r (esc)