annotate tests/test-serve.out @ 11988:8380ed691df8

util: add an interpolate() function to for replacing multiple values util.interpolate can be used to replace multiple items in a string all at once (and optionally apply a function to the replacement), without worrying about recursing: >>> import util >>> s = '$foo, $spam' >>> util.interpolate(r'\$', { 'foo': 'bar', 'spam': 'eggs' }, s) 'bar, eggs' >>> util.interpolate(r'\$', { 'foo': 'spam', 'spam': 'foo' }, s) 'spam, foo' >>> util.interpolate(r'\$', { 'foo': 'spam', 'spam': 'foo' }, s, lambda s: s.upper()) 'SPAM, FOO' The patch also changes filemerge.py to use this new function.
author Steve Losh <steve@stevelosh.com>
date Wed, 18 Aug 2010 18:18:26 -0400
parents 3318431f2ab4
children 49463314c24f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4504
c68e6486f295 Add test reproducing a bug in "hg serve -v"
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
1 % Without -v
4835
9858477ed74c serve: respect settings from .hg/hgrc
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4506
diff changeset
2 access log created - .hg/hgrc respected
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
3 % errors
4504
c68e6486f295 Add test reproducing a bug in "hg serve -v"
Joel Rosdahl <joel@rosdahl.net>
parents:
diff changeset
4 % With -v
10633
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
5 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
6 % errors
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
7 % With -v and -p HGPORT2
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
8 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
9 % errors
5971
6d5ecf824a65 tests for hg serve prefix option
Michele Cella <michele.cella@gmail.com>
parents: 5384
diff changeset
10 % With --prefix foo
10633
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
11 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
12 % errors
5971
6d5ecf824a65 tests for hg serve prefix option
Michele Cella <michele.cella@gmail.com>
parents: 5384
diff changeset
13 % With --prefix /foo
10633
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
14 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
15 % errors
5971
6d5ecf824a65 tests for hg serve prefix option
Michele Cella <michele.cella@gmail.com>
parents: 5384
diff changeset
16 % With --prefix foo/
10633
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
17 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
18 % errors
5971
6d5ecf824a65 tests for hg serve prefix option
Michele Cella <michele.cella@gmail.com>
parents: 5384
diff changeset
19 % With --prefix /foo/
10633
3318431f2ab4 test-serve: Show if port config and option are correctly used
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6461
diff changeset
20 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
6461
eb69e7989145 tests: easier error diagnostics for test-serve
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6419
diff changeset
21 % errors