Show More
@@ -87,7 +87,7 b' def generate_css(web):' | |||
|
87 | 87 | ])) |
|
88 | 88 | return web.res.sendresponse() |
|
89 | 89 | |
|
90 | def extsetup(): | |
|
90 | def extsetup(ui): | |
|
91 | 91 | # monkeypatch in the new version |
|
92 | 92 | extensions.wrapfunction(webcommands, '_filerevision', |
|
93 | 93 | filerevision_highlight) |
@@ -226,6 +226,8 b' def _runextsetup(name, ui):' | |||
|
226 | 226 | except TypeError: |
|
227 | 227 | if pycompat.getargspec(extsetup).args: |
|
228 | 228 | raise |
|
229 | ui.deprecwarn("extsetup for '%s' must take a ui argument" | |
|
230 | % name, "4.9") | |
|
229 | 231 | extsetup() # old extsetup with no ui argument |
|
230 | 232 | except Exception as inst: |
|
231 | 233 | ui.traceback(force=True) |
@@ -7,7 +7,7 b' fi' | |||
|
7 | 7 | |
|
8 | 8 | cat > notcapable-$CAP.py << EOF |
|
9 | 9 | from mercurial import extensions, localrepo, repository |
|
10 | def extsetup(): | |
|
10 | def extsetup(ui): | |
|
11 | 11 | extensions.wrapfunction(repository.peer, 'capable', wrapcapable) |
|
12 | 12 | extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer) |
|
13 | 13 | def wrapcapable(orig, self, name, *args, **kwargs): |
@@ -53,7 +53,7 b' confused with a file with the exec bit s' | |||
|
53 | 53 | > context, |
|
54 | 54 | > extensions, |
|
55 | 55 | > ) |
|
56 | > def extsetup(): | |
|
56 | > def extsetup(ui): | |
|
57 | 57 | > extensions.wrapfunction(context.workingctx, '_checklookup', overridechecklookup) |
|
58 | 58 | > def overridechecklookup(orig, self, files): |
|
59 | 59 | > # make an update that changes the dirstate from underneath |
@@ -279,7 +279,7 b' limit mark, regardless of importing modu' | |||
|
279 | 279 | > NO_CHECK_EOF |
|
280 | 280 | $ cat > loadabs.py <<NO_CHECK_EOF |
|
281 | 281 | > import mod.ambigabs as ambigabs |
|
282 | > def extsetup(): | |
|
282 | > def extsetup(ui): | |
|
283 | 283 | > print('ambigabs.s=%s' % ambigabs.s, flush=True) |
|
284 | 284 | > NO_CHECK_EOF |
|
285 | 285 | $ "$PYTHON" $TESTTMP/unflush.py loadabs.py |
@@ -295,7 +295,7 b' limit mark, regardless of importing modu' | |||
|
295 | 295 | > NO_CHECK_EOF |
|
296 | 296 | $ cat > loadrel.py <<NO_CHECK_EOF |
|
297 | 297 | > import mod.ambigrel as ambigrel |
|
298 | > def extsetup(): | |
|
298 | > def extsetup(ui): | |
|
299 | 299 | > print('ambigrel.s=%s' % ambigrel.s, flush=True) |
|
300 | 300 | > NO_CHECK_EOF |
|
301 | 301 | $ "$PYTHON" $TESTTMP/unflush.py loadrel.py |
@@ -186,7 +186,7 b' test http authentication' | |||
|
186 | 186 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
187 | 187 | > b'pass']: |
|
188 | 188 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
189 | > def extsetup(): | |
|
189 | > def extsetup(ui): | |
|
190 | 190 | > common.permhooks.insert(0, perform_authentication) |
|
191 | 191 | > EOT |
|
192 | 192 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
@@ -181,7 +181,7 b' test http authentication' | |||
|
181 | 181 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
|
182 | 182 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', b'pass']: |
|
183 | 183 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
184 | > def extsetup(): | |
|
184 | > def extsetup(ui): | |
|
185 | 185 | > common.permhooks.insert(0, perform_authentication) |
|
186 | 186 | > EOT |
|
187 | 187 | $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \ |
@@ -526,7 +526,7 b' We raise HTTP 500 because its message is' | |||
|
526 | 526 | > if not cookie: |
|
527 | 527 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie') |
|
528 | 528 | > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie) |
|
529 | > def extsetup(): | |
|
529 | > def extsetup(ui): | |
|
530 | 530 | > common.permhooks.insert(0, perform_authentication) |
|
531 | 531 | > EOF |
|
532 | 532 |
@@ -430,7 +430,7 b' a large file from the server rather than' | |||
|
430 | 430 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
|
431 | 431 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', b'pass']: |
|
432 | 432 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
433 | > def extsetup(): | |
|
433 | > def extsetup(ui): | |
|
434 | 434 | > common.permhooks.insert(0, perform_authentication) |
|
435 | 435 | > EOT |
|
436 | 436 | $ hg serve --config extensions.x=userpass.py -R credentialmain \ |
@@ -404,7 +404,7 b' the GET/PUT request.' | |||
|
404 | 404 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
405 | 405 | > b'pass']: |
|
406 | 406 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
407 | > def extsetup(): | |
|
407 | > def extsetup(ui): | |
|
408 | 408 | > common.permhooks.insert(0, perform_authentication) |
|
409 | 409 | > EOF |
|
410 | 410 |
General Comments 0
You need to be logged in to leave comments.
Login now