Show More
@@ -1,44 +1,58 b'' | |||
|
1 | 1 | Testing templating for rebase command |
|
2 | 2 | |
|
3 | 3 | Setup |
|
4 | 4 | |
|
5 | 5 | $ cat >> $HGRCPATH <<EOF |
|
6 | 6 | > [extensions] |
|
7 | 7 | > rebase= |
|
8 | 8 | > [experimental] |
|
9 | 9 | > evolution=createmarkers |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | $ hg init repo |
|
13 | 13 | $ cd repo |
|
14 | 14 | $ for ch in a b c d; do echo foo > $ch; hg commit -Aqm "Added "$ch; done |
|
15 | 15 | |
|
16 | 16 | $ hg log -G -T "{rev}:{node|short} {desc}" |
|
17 | 17 | @ 3:62615734edd5 Added d |
|
18 | 18 | | |
|
19 | 19 | o 2:28ad74487de9 Added c |
|
20 | 20 | | |
|
21 | 21 | o 1:29becc82797a Added b |
|
22 | 22 | | |
|
23 | 23 | o 0:18d04c59bb5d Added a |
|
24 | 24 | |
|
25 | 25 | Getting the JSON output for nodechanges |
|
26 | 26 | |
|
27 | 27 | $ hg rebase -s 2 -d 0 -q -Tjson |
|
28 | 28 | [ |
|
29 | 29 | { |
|
30 | 30 | "nodechanges": {"28ad74487de9599d00d81085be739c61fc340652": ["849767420fd5519cf0026232411a943ed03cc9fb"], "62615734edd52f06b6fb9c2beb429e4fe30d57b8": ["df21b32134ba85d86bca590cbe9b8b7cbc346c53"]} |
|
31 | 31 | } |
|
32 | 32 | ] |
|
33 | 33 | |
|
34 | 34 | $ hg log -G -T "{rev}:{node|short} {desc}" |
|
35 | 35 | @ 5:df21b32134ba Added d |
|
36 | 36 | | |
|
37 | 37 | o 4:849767420fd5 Added c |
|
38 | 38 | | |
|
39 | 39 | | o 1:29becc82797a Added b |
|
40 | 40 | |/ |
|
41 | 41 | o 0:18d04c59bb5d Added a |
|
42 | 42 | |
|
43 | 43 | $ hg rebase -s 1 -d 5 -q -T "{nodechanges|json}" |
|
44 | 44 | {"29becc82797a4bc11ec8880b58eaecd2ab3e7760": ["d9d6773efc831c274eace04bc13e8e6412517139"]} (no-eol) |
|
45 | ||
|
46 | $ hg log -G -T "{rev}:{node|short} {desc}" | |
|
47 | o 6:d9d6773efc83 Added b | |
|
48 | | | |
|
49 | @ 5:df21b32134ba Added d | |
|
50 | | | |
|
51 | o 4:849767420fd5 Added c | |
|
52 | | | |
|
53 | o 0:18d04c59bb5d Added a | |
|
54 | ||
|
55 | ||
|
56 | $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}" | |
|
57 | d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol) (false !) | |
|
58 | d9d6773efc831c274eace04bc13e8e6412517139 (no-eol) |
General Comments 0
You need to be logged in to leave comments.
Login now