Show More
@@ -18,11 +18,8 b' should be used from d74fc8dec2b4 onward ' | |||||
18 | > from __future__ import absolute_import |
|
18 | > from __future__ import absolute_import | |
19 | > import os |
|
19 | > import os | |
20 | > import sys |
|
20 | > import sys | |
21 |
> from mercurial |
|
21 | > from mercurial import ( | |
22 | > hgweb, |
|
22 | > hgweb, | |
23 | > hgwebdir, |
|
|||
24 | > ) |
|
|||
25 | > from mercurial import ( |
|
|||
26 | > util, |
|
23 | > util, | |
27 | > ) |
|
24 | > ) | |
28 | > stringio = util.stringio |
|
25 | > stringio = util.stringio | |
@@ -72,11 +69,11 b' should be used from d74fc8dec2b4 onward ' | |||||
72 | > |
|
69 | > | |
73 | > output = stringio() |
|
70 | > output = stringio() | |
74 | > env['QUERY_STRING'] = 'style=atom' |
|
71 | > env['QUERY_STRING'] = 'style=atom' | |
75 | > process(hgweb(b'.', name=b'repo')) |
|
72 | > process(hgweb.hgweb(b'.', name=b'repo')) | |
76 | > |
|
73 | > | |
77 | > output = stringio() |
|
74 | > output = stringio() | |
78 | > env['QUERY_STRING'] = 'style=raw' |
|
75 | > env['QUERY_STRING'] = 'style=raw' | |
79 | > process(hgwebdir({b'repo': b'.'})) |
|
76 | > process(hgweb.hgwebdir({b'repo': b'.'})) | |
80 | > EOF |
|
77 | > EOF | |
81 | $ "$PYTHON" request.py |
|
78 | $ "$PYTHON" request.py | |
82 | ---- STATUS |
|
79 | ---- STATUS |
@@ -18,12 +18,9 b' should be used from d74fc8dec2b4 onward ' | |||||
18 | > from __future__ import absolute_import |
|
18 | > from __future__ import absolute_import | |
19 | > import os |
|
19 | > import os | |
20 | > import sys |
|
20 | > import sys | |
21 | > from mercurial.hgweb import ( |
|
|||
22 | > hgweb, |
|
|||
23 | > hgwebdir, |
|
|||
24 | > ) |
|
|||
25 | > from mercurial import ( |
|
21 | > from mercurial import ( | |
26 | > encoding, |
|
22 | > encoding, | |
|
23 | > hgweb, | |||
27 | > util, |
|
24 | > util, | |
28 | > ) |
|
25 | > ) | |
29 | > stringio = util.stringio |
|
26 | > stringio = util.stringio | |
@@ -65,22 +62,22 b' should be used from d74fc8dec2b4 onward ' | |||||
65 | > output = stringio() |
|
62 | > output = stringio() | |
66 | > env['PATH_INFO'] = '/' |
|
63 | > env['PATH_INFO'] = '/' | |
67 | > env['QUERY_STRING'] = 'style=atom' |
|
64 | > env['QUERY_STRING'] = 'style=atom' | |
68 | > process(hgweb(b'.', name = b'repo')) |
|
65 | > process(hgweb.hgweb(b'.', name = b'repo')) | |
69 | > |
|
66 | > | |
70 | > output = stringio() |
|
67 | > output = stringio() | |
71 | > env['PATH_INFO'] = '/file/tip/' |
|
68 | > env['PATH_INFO'] = '/file/tip/' | |
72 | > env['QUERY_STRING'] = 'style=raw' |
|
69 | > env['QUERY_STRING'] = 'style=raw' | |
73 | > process(hgweb(b'.', name = b'repo')) |
|
70 | > process(hgweb.hgweb(b'.', name = b'repo')) | |
74 | > |
|
71 | > | |
75 | > output = stringio() |
|
72 | > output = stringio() | |
76 | > env['PATH_INFO'] = '/' |
|
73 | > env['PATH_INFO'] = '/' | |
77 | > env['QUERY_STRING'] = 'style=raw' |
|
74 | > env['QUERY_STRING'] = 'style=raw' | |
78 | > process(hgwebdir({b'repo': b'.'})) |
|
75 | > process(hgweb.hgwebdir({b'repo': b'.'})) | |
79 | > |
|
76 | > | |
80 | > output = stringio() |
|
77 | > output = stringio() | |
81 | > env['PATH_INFO'] = '/repo/file/tip/' |
|
78 | > env['PATH_INFO'] = '/repo/file/tip/' | |
82 | > env['QUERY_STRING'] = 'style=raw' |
|
79 | > env['QUERY_STRING'] = 'style=raw' | |
83 | > process(hgwebdir({b'repo': b'.'})) |
|
80 | > process(hgweb.hgwebdir({b'repo': b'.'})) | |
84 | > EOF |
|
81 | > EOF | |
85 | $ "$PYTHON" request.py |
|
82 | $ "$PYTHON" request.py | |
86 | ---- STATUS |
|
83 | ---- STATUS |
@@ -19,9 +19,7 b' by the WSGI standard and strictly implem' | |||||
19 | > util, |
|
19 | > util, | |
20 | > ) |
|
20 | > ) | |
21 | > ui = uimod.ui |
|
21 | > ui = uimod.ui | |
22 |
> from mercurial.hgweb |
|
22 | > from mercurial.hgweb import hgweb_mod | |
23 | > hgweb, |
|
|||
24 | > ) |
|
|||
25 | > stringio = util.stringio |
|
23 | > stringio = util.stringio | |
26 | > |
|
24 | > | |
27 | > class FileLike(object): |
|
25 | > class FileLike(object): | |
@@ -67,7 +65,7 b' by the WSGI standard and strictly implem' | |||||
67 | > 'SERVER_PROTOCOL': 'HTTP/1.0' |
|
65 | > 'SERVER_PROTOCOL': 'HTTP/1.0' | |
68 | > } |
|
66 | > } | |
69 | > |
|
67 | > | |
70 | > i = hgweb(b'.') |
|
68 | > i = hgweb_mod.hgweb(b'.') | |
71 | > for c in i(env, startrsp): |
|
69 | > for c in i(env, startrsp): | |
72 | > pass |
|
70 | > pass | |
73 | > sys.stdout.flush() |
|
71 | > sys.stdout.flush() |
General Comments 0
You need to be logged in to leave comments.
Login now