Show More
@@ -31,11 +31,11 b' should be used from d74fc8dec2b4 onward ' | |||||
31 | > input = stringio() |
|
31 | > input = stringio() | |
32 | > |
|
32 | > | |
33 | > def startrsp(status, headers): |
|
33 | > def startrsp(status, headers): | |
34 |
> print |
|
34 | > print('---- STATUS') | |
35 |
> print |
|
35 | > print(status) | |
36 |
> print |
|
36 | > print('---- HEADERS') | |
37 |
> print |
|
37 | > print([i for i in headers if i[0] != 'ETag']) | |
38 |
> print |
|
38 | > print('---- DATA') | |
39 | > return output.write |
|
39 | > return output.write | |
40 | > |
|
40 | > | |
41 | > env = { |
|
41 | > env = { | |
@@ -59,8 +59,8 b' should be used from d74fc8dec2b4 onward ' | |||||
59 | > sys.stdout.write(output.getvalue()) |
|
59 | > sys.stdout.write(output.getvalue()) | |
60 | > sys.stdout.write(''.join(content)) |
|
60 | > sys.stdout.write(''.join(content)) | |
61 | > getattr(content, 'close', lambda : None)() |
|
61 | > getattr(content, 'close', lambda : None)() | |
62 |
> print |
|
62 | > print('---- ERRORS') | |
63 |
> print |
|
63 | > print(errors.getvalue()) | |
64 | > |
|
64 | > | |
65 | > output = stringio() |
|
65 | > output = stringio() | |
66 | > env['QUERY_STRING'] = 'style=atom' |
|
66 | > env['QUERY_STRING'] = 'style=atom' |
@@ -31,11 +31,11 b' should be used from d74fc8dec2b4 onward ' | |||||
31 | > input = stringio() |
|
31 | > input = stringio() | |
32 | > |
|
32 | > | |
33 | > def startrsp(status, headers): |
|
33 | > def startrsp(status, headers): | |
34 |
> print |
|
34 | > print('---- STATUS') | |
35 |
> print |
|
35 | > print(status) | |
36 |
> print |
|
36 | > print('---- HEADERS') | |
37 |
> print |
|
37 | > print([i for i in headers if i[0] != 'ETag']) | |
38 |
> print |
|
38 | > print('---- DATA') | |
39 | > return output.write |
|
39 | > return output.write | |
40 | > |
|
40 | > | |
41 | > env = { |
|
41 | > env = { | |
@@ -58,8 +58,8 b' should be used from d74fc8dec2b4 onward ' | |||||
58 | > sys.stdout.write(output.getvalue()) |
|
58 | > sys.stdout.write(output.getvalue()) | |
59 | > sys.stdout.write(''.join(content)) |
|
59 | > sys.stdout.write(''.join(content)) | |
60 | > getattr(content, 'close', lambda : None)() |
|
60 | > getattr(content, 'close', lambda : None)() | |
61 |
> print |
|
61 | > print('---- ERRORS') | |
62 |
> print |
|
62 | > print(errors.getvalue()) | |
63 | > |
|
63 | > | |
64 | > output = stringio() |
|
64 | > output = stringio() | |
65 | > env['PATH_INFO'] = '/' |
|
65 | > env['PATH_INFO'] = '/' |
@@ -41,11 +41,11 b' by the WSGI standard and strictly implem' | |||||
41 | > output = stringio() |
|
41 | > output = stringio() | |
42 | > |
|
42 | > | |
43 | > def startrsp(status, headers): |
|
43 | > def startrsp(status, headers): | |
44 |
> print |
|
44 | > print('---- STATUS') | |
45 |
> print |
|
45 | > print(status) | |
46 |
> print |
|
46 | > print('---- HEADERS') | |
47 |
> print |
|
47 | > print([i for i in headers if i[0] != 'ETag']) | |
48 |
> print |
|
48 | > print('---- DATA') | |
49 | > return output.write |
|
49 | > return output.write | |
50 | > |
|
50 | > | |
51 | > env = { |
|
51 | > env = { | |
@@ -68,13 +68,13 b' by the WSGI standard and strictly implem' | |||||
68 | > i = hgweb('.') |
|
68 | > i = hgweb('.') | |
69 | > for c in i(env, startrsp): |
|
69 | > for c in i(env, startrsp): | |
70 | > pass |
|
70 | > pass | |
71 |
> print |
|
71 | > print('---- ERRORS') | |
72 |
> print |
|
72 | > print(errors.getvalue()) | |
73 |
> print |
|
73 | > print('---- OS.ENVIRON wsgi variables') | |
74 |
> print |
|
74 | > print(sorted([x for x in os.environ if x.startswith('wsgi')])) | |
75 |
> print |
|
75 | > print('---- request.ENVIRON wsgi variables') | |
76 | > with i._obtainrepo() as repo: |
|
76 | > with i._obtainrepo() as repo: | |
77 |
> print |
|
77 | > print(sorted([x for x in repo.ui.environ if x.startswith('wsgi')])) | |
78 | > EOF |
|
78 | > EOF | |
79 | $ $PYTHON request.py |
|
79 | $ $PYTHON request.py | |
80 | ---- STATUS |
|
80 | ---- STATUS |
@@ -4,7 +4,7 b'' | |||||
4 | > import sys |
|
4 | > import sys | |
5 | > for entry in sys.stdin.read().split('\n'): |
|
5 | > for entry in sys.stdin.read().split('\n'): | |
6 | > if entry: |
|
6 | > if entry: | |
7 |
> print |
|
7 | > print(entry.split('\x00')[0]) | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | $ echo "[extensions]" >> $HGRCPATH |
|
10 | $ echo "[extensions]" >> $HGRCPATH |
General Comments 0
You need to be logged in to leave comments.
Login now