# HG changeset patch # User Gilles Moris # Date 1230223748 -3600 # Node ID 986012d03ed399e5c8954c3e43247a2499d34101 # Parent 3f3c9472c0b66a20aca3a5e4ec7966ae79475b51 test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py Note that other sed replacement commands are also filtering get-with-headers.py, but they seem to be more test specific, hence not handled here. [ original upstream message ] diff -r 3f3c9472c0b6 -r 986012d03ed3 tests/get-with-headers.py --- a/tests/get-with-headers.py Sun Jun 07 19:18:59 2009 +0200 +++ b/tests/get-with-headers.py Thu Dec 25 17:49:08 2008 +0100 @@ -3,7 +3,7 @@ __doc__ = """This does HTTP get requests given a host:port and path and returns a subset of the headers plus the body of the result.""" -import httplib, sys +import httplib, sys, re try: import msvcrt, os @@ -21,7 +21,9 @@ if response.getheader(h, None) is not None: print "%s: %s" % (h, response.getheader(h)) print -sys.stdout.write(response.read()) +data = response.read() +data = re.sub('\d+ years', 'many years', data) +sys.stdout.write(data) if 200 <= response.status <= 299: sys.exit(0)