##// END OF EJS Templates
test-static-http: show all files accessed over HTTP...
Yuya Nishihara -
r34926:8b95e420 stable
parent child Browse files
Show More
@@ -41,6 +41,7 b" if __name__ == '__main__':"
41 help='TCP port to listen on', metavar='PORT')
41 help='TCP port to listen on', metavar='PORT')
42 parser.add_option('-H', '--host', dest='host', default='localhost',
42 parser.add_option('-H', '--host', dest='host', default='localhost',
43 help='hostname or IP to listen on', metavar='HOST')
43 help='hostname or IP to listen on', metavar='HOST')
44 parser.add_option('--logfile', help='file name of access/error log')
44 parser.add_option('--pid', dest='pid',
45 parser.add_option('--pid', dest='pid',
45 help='file name where the PID of the server is stored')
46 help='file name where the PID of the server is stored')
46 parser.add_option('-f', '--foreground', dest='foreground',
47 parser.add_option('-f', '--foreground', dest='foreground',
@@ -52,6 +53,9 b" if __name__ == '__main__':"
52
53
53 signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
54 signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
54
55
56 if options.foreground and options.logfile:
57 parser.error("options --logfile and --foreground are mutually "
58 "exclusive")
55 if options.foreground and options.pid:
59 if options.foreground and options.pid:
56 parser.error("options --pid and --foreground are mutually exclusive")
60 parser.error("options --pid and --foreground are mutually exclusive")
57
61
@@ -60,4 +64,5 b" if __name__ == '__main__':"
60 'daemon_postexec': options.daemon_postexec}
64 'daemon_postexec': options.daemon_postexec}
61 service = simplehttpservice(options.host, options.port)
65 service = simplehttpservice(options.host, options.port)
62 server.runservice(opts, initfn=service.init, runfn=service.run,
66 server.runservice(opts, initfn=service.init, runfn=service.run,
67 logfile=options.logfile,
63 runargs=[sys.executable, __file__] + sys.argv[1:])
68 runargs=[sys.executable, __file__] + sys.argv[1:])
@@ -9,7 +9,8 b''
9 This server doesn't do range requests so it's basically only good for
9 This server doesn't do range requests so it's basically only good for
10 one pull
10 one pull
11
11
12 $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
12 $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid \
13 > --logfile server.log
13 $ cat dumb.pid >> $DAEMON_PIDS
14 $ cat dumb.pid >> $DAEMON_PIDS
14 $ hg init remote
15 $ hg init remote
15 $ cd remote
16 $ cd remote
@@ -214,3 +215,62 b' Clone a specific tag works'
214 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
215 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
215
216
216 $ killdaemons.py
217 $ killdaemons.py
218
219 List of files accessed over HTTP:
220
221 $ cat server.log | sed -n -e 's|.*GET \(/[^ ]*\).*|\1|p' | sort -u
222 /.hg/bookmarks
223 /.hg/bookmarks.current
224 /.hg/cache/hgtagsfnodes1
225 /.hg/dirstate
226 /.hg/requires
227 /.hg/store/00changelog.i
228 /.hg/store/00manifest.i
229 /.hg/store/data/%7E2ehgsub.i
230 /.hg/store/data/%7E2ehgsubstate.i
231 /.hg/store/data/a.i
232 /notarepo/.hg/00changelog.i
233 /notarepo/.hg/requires
234 /remote-with-names/.hg/bookmarks
235 /remote-with-names/.hg/bookmarks.current
236 /remote-with-names/.hg/cache/branch2-served
237 /remote-with-names/.hg/cache/hgtagsfnodes1
238 /remote-with-names/.hg/cache/tags2-served
239 /remote-with-names/.hg/dirstate
240 /remote-with-names/.hg/localtags
241 /remote-with-names/.hg/requires
242 /remote-with-names/.hg/store/00changelog.i
243 /remote-with-names/.hg/store/00manifest.i
244 /remote-with-names/.hg/store/data/%7E2ehgtags.i
245 /remote-with-names/.hg/store/data/foo.i
246 /remote/.hg/bookmarks
247 /remote/.hg/bookmarks.current
248 /remote/.hg/cache/branch2-base
249 /remote/.hg/cache/branch2-immutable
250 /remote/.hg/cache/branch2-served
251 /remote/.hg/cache/hgtagsfnodes1
252 /remote/.hg/cache/rbc-names-v1
253 /remote/.hg/cache/tags2-served
254 /remote/.hg/dirstate
255 /remote/.hg/localtags
256 /remote/.hg/requires
257 /remote/.hg/store/00changelog.i
258 /remote/.hg/store/00manifest.i
259 /remote/.hg/store/data/%7E2edotfile%20with%20spaces.i
260 /remote/.hg/store/data/%7E2ehgtags.i
261 /remote/.hg/store/data/bar.i
262 /remote/.hg/store/data/quux.i
263 /remotempty/.hg/bookmarks
264 /remotempty/.hg/bookmarks.current
265 /remotempty/.hg/requires
266 /remotempty/.hg/store/00changelog.i
267 /remotempty/.hg/store/00manifest.i
268 /sub/.hg/bookmarks
269 /sub/.hg/bookmarks.current
270 /sub/.hg/cache/hgtagsfnodes1
271 /sub/.hg/dirstate
272 /sub/.hg/requires
273 /sub/.hg/store/00changelog.i
274 /sub/.hg/store/00manifest.i
275 /sub/.hg/store/data/%7E2ehgtags.i
276 /sub/.hg/store/data/test.i
General Comments 0
You need to be logged in to leave comments. Login now