Mercurial > hg
annotate tests/test-rebase-check-restore.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 | 7a9cf012dddc |
children |
rev | line source |
---|---|
7952
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
1 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
2 % - Rebasing B onto E - check keep |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
3 @ 5:F:notdefault |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
4 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
5 | o 4:E: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
6 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
7 | o 3:D: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
8 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
9 | o 2:C: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
10 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
11 | o 1:B: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
12 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
13 o 0:A: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
14 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
15 warning: conflicts during merge. |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
16 merging A failed! |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
17 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
11197
diff
changeset
|
18 merging A |
7952
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
19 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
20 % - Solve the conflict and go on |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
21 @ 7:C: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
22 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
23 o 6:B: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
24 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
25 | o 5:F:notdefault |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
26 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
27 o | 4:E: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
28 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
29 o | 3:D: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
30 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
31 | o 2:C: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
32 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
33 | o 1:B: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
34 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
35 o 0:A: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
36 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
37 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
38 % - Rebase F onto E - check keepbranches |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
39 @ 5:F:notdefault |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
40 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
41 | o 4:E: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
42 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
43 | o 3:D: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
44 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
45 | o 2:C: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
46 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
47 | o 1:B: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
48 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
49 o 0:A: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
50 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
51 warning: conflicts during merge. |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
52 merging A failed! |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
53 abort: fix unresolved conflicts with hg resolve then run hg rebase --continue |
11198
b345b1cc124f
rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents:
11197
diff
changeset
|
54 merging A |
7952
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
55 |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
56 % - Solve the conflict and go on |
11201
34023f2ca305
Fix up rebase's handling of strip backups
Matt Mackall <mpm@selenic.com>
parents:
11198
diff
changeset
|
57 saved backup bundle to |
7952
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
58 @ 5:F:notdefault |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
59 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
60 o 4:E: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
61 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
62 o 3:D: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
63 | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
64 | o 2:C: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
65 | | |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
66 | o 1:B: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
67 |/ |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
68 o 0:A: |
b214066b7e1d
rebase: store/restore arguments correctly
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
69 |