diff tests/test-http.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 73da729ccfef
children 549af2fa089f
line wrap: on
line diff
--- a/tests/test-http.t	Thu Dec 27 21:27:43 2018 -0500
+++ b/tests/test-http.t	Thu Dec 27 21:46:03 2018 -0500
@@ -181,7 +181,7 @@
   >                 [(b'WWW-Authenticate', b'Basic Realm="mercurial"')])
   >     if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', b'pass']:
   >         raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no')
-  > def extsetup():
+  > def extsetup(ui):
   >     common.permhooks.insert(0, perform_authentication)
   > EOT
   $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
@@ -526,7 +526,7 @@
   >     if not cookie:
   >         raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie')
   >     raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie)
-  > def extsetup():
+  > def extsetup(ui):
   >     common.permhooks.insert(0, perform_authentication)
   > EOF