Mercurial > hg
comparison tests/test-lfs-serve-access.t @ 41068:28a4fb793ba1
extensions: deprecate extsetup without a `ui` argument (API)
9.5 years should be enough time, but there were some tests for the old style
still (which are now updated). Exthelper doesn't fallback to the old API, so
this is for consistency.
.. api::
The extension hook ``extsetup`` without a `ui` argument has been deprecated,
and will be removed in the next version. Add a `ui` argument to avoid the
deprecation warning.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 27 Dec 2018 21:46:03 -0500 |
parents | 8695fbe17f7c |
children | 2a1bb442593b f2f538725d07 |
comparison
equal
deleted
inserted
replaced
41067:f2601cbce209 | 41068:28a4fb793ba1 |
---|---|
402 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', | 402 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', |
403 > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) | 403 > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
404 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', | 404 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
405 > b'pass']: | 405 > b'pass']: |
406 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') | 406 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
407 > def extsetup(): | 407 > def extsetup(ui): |
408 > common.permhooks.insert(0, perform_authentication) | 408 > common.permhooks.insert(0, perform_authentication) |
409 > EOF | 409 > EOF |
410 | 410 |
411 $ hg --config extensions.x=$TESTTMP/userpass.py \ | 411 $ hg --config extensions.x=$TESTTMP/userpass.py \ |
412 > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ | 412 > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ |