view tests/test-http-proxy.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 60b42f318a6d
children
line wrap: on
line source

adding a
%% url for proxy, stream
streaming all changes
XXX files to transfer, XXX bytes of data
transferred XXX bytes in XXX seconds (XXX XB/sec)
updating to branch default
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
%% url for proxy, pull
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
%% host:port for proxy
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
%% proxy url with user name and password
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
%% url with user name and password
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
%% bad host:port for proxy
abort: error: Connection refused
%% do not use the proxy if it is in the no list
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
XXX "GET http://localhost:/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=capabilities HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=stream_out HTTP/1.1" - -
XXX "GET http://localhost:/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=heads HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - -
XXX "GET http://localhost:/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=heads HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - -
XXX "GET http://localhost:/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=heads HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - -
XXX "GET http://localhost:/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=heads HTTP/1.1" - -
XXX "GET http://localhost:/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - -