Mercurial > hg
annotate tests/test-rename-dir-merge2.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 | a3d73b3e1f8a |
children |
rev | line source |
---|---|
4115
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
1 adding a/f |
9611
a3d73b3e1f8a
hg.clone: report branch name on update
Adrian Buehlmann <adrian@cadifra.com>
parents:
6338
diff
changeset
|
2 updating to branch default |
4115
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5610
2493a478f395
copy: handle rename internally
Matt Mackall <mpm@selenic.com>
parents:
4416
diff
changeset
|
4 moving a/f to b/f |
4115
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
5 adding a/aa/g |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
6 pulling from ../r2 |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
7 searching for changes |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
8 adding changesets |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
9 adding manifests |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
10 adding file changes |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
11 added 1 changesets with 1 changes to 1 files (+1 heads) |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
12 (run 'hg heads' to see heads, 'hg merge' to merge) |
4416
bb1800a7d7e1
merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents:
4304
diff
changeset
|
13 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
4115
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
14 (branch merge, don't forget to commit) |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
15 M b/f |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
16 A b/aa/g |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
17 a/aa/g |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
18 R a/aa/g |
c95060a5391a
merge: fix renaming of subdirectories under renamed directories
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
19 R a/f |