##// END OF EJS Templates
tests: simplify test-rebase-named-branches...
Nicolas Dumazet -
r14120:d7f80dbb default
parent child Browse files
Show More
@@ -1,157 +1,122
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
2 > [extensions]
3 > graphlog=
3 > graphlog=
4 > rebase=
4 > rebase=
5 >
5 >
6 > [alias]
6 > [alias]
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
8 > EOF
8 > EOF
9
9
10 $ hg init a
10 $ hg init a
11 $ cd a
11 $ cd a
12 $ hg unbundle $TESTDIR/bundles/rebase.hg
12 $ hg unbundle $TESTDIR/bundles/rebase.hg
13 adding changesets
13 adding changesets
14 adding manifests
14 adding manifests
15 adding file changes
15 adding file changes
16 added 8 changesets with 7 changes to 7 files (+2 heads)
16 added 8 changesets with 7 changes to 7 files (+2 heads)
17 (run 'hg heads' to see heads, 'hg merge' to merge)
17 (run 'hg heads' to see heads, 'hg merge' to merge)
18 $ hg up tip
18 $ hg up tip
19 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 $ cd ..
20 $ cd ..
21
21
22
22
23 Rebasing descendant onto ancestor across different named branches
23 Rebasing descendant onto ancestor across different named branches
24
24
25 $ hg clone -q -u . a a1
25 $ hg clone -q -u . a a1
26
26
27 $ cd a1
27 $ cd a1
28
28
29 $ hg branch dev
29 $ hg branch dev
30 marked working directory as branch dev
30 marked working directory as branch dev
31
31
32 $ echo x > x
32 $ echo x > x
33
33
34 $ hg add x
34 $ hg add x
35
35
36 $ hg ci -m 'extra named branch'
36 $ hg ci -m 'extra named branch'
37
37
38 $ hg tglog
38 $ hg tglog
39 @ 8: 'extra named branch' dev
39 @ 8: 'extra named branch' dev
40 |
40 |
41 o 7: 'H'
41 o 7: 'H'
42 |
42 |
43 | o 6: 'G'
43 | o 6: 'G'
44 |/|
44 |/|
45 o | 5: 'F'
45 o | 5: 'F'
46 | |
46 | |
47 | o 4: 'E'
47 | o 4: 'E'
48 |/
48 |/
49 | o 3: 'D'
49 | o 3: 'D'
50 | |
50 | |
51 | o 2: 'C'
51 | o 2: 'C'
52 | |
52 | |
53 | o 1: 'B'
53 | o 1: 'B'
54 |/
54 |/
55 o 0: 'A'
55 o 0: 'A'
56
56
57
58
59 $ hg rebase -s 7 -d 8
60 abort: source is ancestor of destination
61 [255]
62
57 $ hg rebase -s 8 -d 7
63 $ hg rebase -s 8 -d 7
58 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
64 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
59
65
60 $ hg tglog
66 $ hg tglog
61 @ 8: 'extra named branch'
67 @ 8: 'extra named branch'
62 |
68 |
63 o 7: 'H'
69 o 7: 'H'
64 |
70 |
65 | o 6: 'G'
71 | o 6: 'G'
66 |/|
72 |/|
67 o | 5: 'F'
73 o | 5: 'F'
68 | |
74 | |
69 | o 4: 'E'
75 | o 4: 'E'
70 |/
76 |/
71 | o 3: 'D'
77 | o 3: 'D'
72 | |
78 | |
73 | o 2: 'C'
79 | o 2: 'C'
74 | |
80 | |
75 | o 1: 'B'
81 | o 1: 'B'
76 |/
82 |/
77 o 0: 'A'
83 o 0: 'A'
78
84
79 $ cd ..
85 $ cd ..
80
86
81 Rebasing descendant onto ancestor across the same named branches
87 Rebasing descendant onto ancestor across the same named branches
82
88
83 $ hg clone -q -u . a a2
89 $ hg clone -q -u . a a2
84
90
85 $ cd a2
91 $ cd a2
86
92
87 $ echo I > I
93 $ echo I > I
88
94
89 $ hg ci -AmI
95 $ hg ci -AmI
90 adding I
96 adding I
91
97
92 $ hg tglog
98 $ hg tglog
93 @ 8: 'I'
99 @ 8: 'I'
94 |
100 |
95 o 7: 'H'
101 o 7: 'H'
96 |
102 |
97 | o 6: 'G'
103 | o 6: 'G'
98 |/|
104 |/|
99 o | 5: 'F'
105 o | 5: 'F'
100 | |
106 | |
101 | o 4: 'E'
107 | o 4: 'E'
102 |/
108 |/
103 | o 3: 'D'
109 | o 3: 'D'
104 | |
110 | |
105 | o 2: 'C'
111 | o 2: 'C'
106 | |
112 | |
107 | o 1: 'B'
113 | o 1: 'B'
108 |/
114 |/
109 o 0: 'A'
115 o 0: 'A'
110
116
111 $ hg rebase -s 8 -d 7
117 $ hg rebase -s 8 -d 7
112 abort: source is descendant of destination
118 abort: source is descendant of destination
113 [255]
119 [255]
114
120
115 $ cd ..
121 $ cd ..
116
122
117 Rebasing ancestor onto descendant across different named branches
118
119 $ hg clone -q -u . a a3
120
121 $ cd a3
122
123 $ hg branch dev
124 marked working directory as branch dev
125
126 $ echo x > x
127
128 $ hg add x
129
130 $ hg ci -m 'extra named branch'
131
132 $ hg tglog
133 @ 8: 'extra named branch' dev
134 |
135 o 7: 'H'
136 |
137 | o 6: 'G'
138 |/|
139 o | 5: 'F'
140 | |
141 | o 4: 'E'
142 |/
143 | o 3: 'D'
144 | |
145 | o 2: 'C'
146 | |
147 | o 1: 'B'
148 |/
149 o 0: 'A'
150
151 $ hg rebase -s 7 -d 8
152 abort: source is ancestor of destination
153 [255]
154
155 $ cd ..
156
157
General Comments 0
You need to be logged in to leave comments. Login now