tests/test-issue2137.out
author Steve Losh <steve@stevelosh.com>
Wed, 18 Aug 2010 18:18:26 -0400
changeset 11988 8380ed691df8
parent 10917 bce47e253b61
permissions -rw-r--r--
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.

% setup
adding a
new tip: 553596fad57b

% test that new changesets are visible to repo.lookup()
new tip: 799ae3599e0e
changeset:   1:799ae3599e0e
tag:         tip
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     one more commit to demonstrate the bug