##// END OF EJS Templates
tests: add test for rebase template showing wrong behavior...
Pulkit Goyal -
r35122:c157bb01 default
parent child Browse files
Show More
@@ -1,44 +1,58 b''
1 Testing templating for rebase command
1 Testing templating for rebase command
2
2
3 Setup
3 Setup
4
4
5 $ cat >> $HGRCPATH <<EOF
5 $ cat >> $HGRCPATH <<EOF
6 > [extensions]
6 > [extensions]
7 > rebase=
7 > rebase=
8 > [experimental]
8 > [experimental]
9 > evolution=createmarkers
9 > evolution=createmarkers
10 > EOF
10 > EOF
11
11
12 $ hg init repo
12 $ hg init repo
13 $ cd repo
13 $ cd repo
14 $ for ch in a b c d; do echo foo > $ch; hg commit -Aqm "Added "$ch; done
14 $ for ch in a b c d; do echo foo > $ch; hg commit -Aqm "Added "$ch; done
15
15
16 $ hg log -G -T "{rev}:{node|short} {desc}"
16 $ hg log -G -T "{rev}:{node|short} {desc}"
17 @ 3:62615734edd5 Added d
17 @ 3:62615734edd5 Added d
18 |
18 |
19 o 2:28ad74487de9 Added c
19 o 2:28ad74487de9 Added c
20 |
20 |
21 o 1:29becc82797a Added b
21 o 1:29becc82797a Added b
22 |
22 |
23 o 0:18d04c59bb5d Added a
23 o 0:18d04c59bb5d Added a
24
24
25 Getting the JSON output for nodechanges
25 Getting the JSON output for nodechanges
26
26
27 $ hg rebase -s 2 -d 0 -q -Tjson
27 $ hg rebase -s 2 -d 0 -q -Tjson
28 [
28 [
29 {
29 {
30 "nodechanges": {"28ad74487de9599d00d81085be739c61fc340652": ["849767420fd5519cf0026232411a943ed03cc9fb"], "62615734edd52f06b6fb9c2beb429e4fe30d57b8": ["df21b32134ba85d86bca590cbe9b8b7cbc346c53"]}
30 "nodechanges": {"28ad74487de9599d00d81085be739c61fc340652": ["849767420fd5519cf0026232411a943ed03cc9fb"], "62615734edd52f06b6fb9c2beb429e4fe30d57b8": ["df21b32134ba85d86bca590cbe9b8b7cbc346c53"]}
31 }
31 }
32 ]
32 ]
33
33
34 $ hg log -G -T "{rev}:{node|short} {desc}"
34 $ hg log -G -T "{rev}:{node|short} {desc}"
35 @ 5:df21b32134ba Added d
35 @ 5:df21b32134ba Added d
36 |
36 |
37 o 4:849767420fd5 Added c
37 o 4:849767420fd5 Added c
38 |
38 |
39 | o 1:29becc82797a Added b
39 | o 1:29becc82797a Added b
40 |/
40 |/
41 o 0:18d04c59bb5d Added a
41 o 0:18d04c59bb5d Added a
42
42
43 $ hg rebase -s 1 -d 5 -q -T "{nodechanges|json}"
43 $ hg rebase -s 1 -d 5 -q -T "{nodechanges|json}"
44 {"29becc82797a4bc11ec8880b58eaecd2ab3e7760": ["d9d6773efc831c274eace04bc13e8e6412517139"]} (no-eol)
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