##// END OF EJS Templates
tests: conditionally display obsfate in test-rebase-obsolete log output...
Denis Laxalde -
r35047:235d58aa default
parent child Browse files
Show More
@@ -1,1376 +1,1376 b''
1 ==========================
1 ==========================
2 Test rebase with obsolete
2 Test rebase with obsolete
3 ==========================
3 ==========================
4
4
5 Enable obsolete
5 Enable obsolete
6
6
7 $ cat >> $HGRCPATH << EOF
7 $ cat >> $HGRCPATH << EOF
8 > [ui]
8 > [ui]
9 > logtemplate= {rev}:{node|short} {desc|firstline}
9 > logtemplate= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')}
10 > [experimental]
10 > [experimental]
11 > evolution.createmarkers=True
11 > evolution.createmarkers=True
12 > evolution.allowunstable=True
12 > evolution.allowunstable=True
13 > [phases]
13 > [phases]
14 > publish=False
14 > publish=False
15 > [extensions]
15 > [extensions]
16 > rebase=
16 > rebase=
17 > drawdag=$TESTDIR/drawdag.py
17 > drawdag=$TESTDIR/drawdag.py
18 > EOF
18 > EOF
19
19
20 Setup rebase canonical repo
20 Setup rebase canonical repo
21
21
22 $ hg init base
22 $ hg init base
23 $ cd base
23 $ cd base
24 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
24 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
25 adding changesets
25 adding changesets
26 adding manifests
26 adding manifests
27 adding file changes
27 adding file changes
28 added 8 changesets with 7 changes to 7 files (+2 heads)
28 added 8 changesets with 7 changes to 7 files (+2 heads)
29 new changesets cd010b8cd998:02de42196ebe
29 new changesets cd010b8cd998:02de42196ebe
30 (run 'hg heads' to see heads, 'hg merge' to merge)
30 (run 'hg heads' to see heads, 'hg merge' to merge)
31 $ hg up tip
31 $ hg up tip
32 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 $ hg log -G
33 $ hg log -G
34 @ 7:02de42196ebe H
34 @ 7:02de42196ebe H
35 |
35 |
36 | o 6:eea13746799a G
36 | o 6:eea13746799a G
37 |/|
37 |/|
38 o | 5:24b6387c8c8c F
38 o | 5:24b6387c8c8c F
39 | |
39 | |
40 | o 4:9520eea781bc E
40 | o 4:9520eea781bc E
41 |/
41 |/
42 | o 3:32af7686d403 D
42 | o 3:32af7686d403 D
43 | |
43 | |
44 | o 2:5fddd98957c8 C
44 | o 2:5fddd98957c8 C
45 | |
45 | |
46 | o 1:42ccdea3bb16 B
46 | o 1:42ccdea3bb16 B
47 |/
47 |/
48 o 0:cd010b8cd998 A
48 o 0:cd010b8cd998 A
49
49
50 $ cd ..
50 $ cd ..
51
51
52 simple rebase
52 simple rebase
53 ---------------------------------
53 ---------------------------------
54
54
55 $ hg clone base simple
55 $ hg clone base simple
56 updating to branch default
56 updating to branch default
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 $ cd simple
58 $ cd simple
59 $ hg up 32af7686d403
59 $ hg up 32af7686d403
60 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
60 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
61 $ hg rebase -d eea13746799a
61 $ hg rebase -d eea13746799a
62 rebasing 1:42ccdea3bb16 "B"
62 rebasing 1:42ccdea3bb16 "B"
63 rebasing 2:5fddd98957c8 "C"
63 rebasing 2:5fddd98957c8 "C"
64 rebasing 3:32af7686d403 "D"
64 rebasing 3:32af7686d403 "D"
65 $ hg log -G
65 $ hg log -G
66 @ 10:8eeb3c33ad33 D
66 @ 10:8eeb3c33ad33 D
67 |
67 |
68 o 9:2327fea05063 C
68 o 9:2327fea05063 C
69 |
69 |
70 o 8:e4e5be0395b2 B
70 o 8:e4e5be0395b2 B
71 |
71 |
72 | o 7:02de42196ebe H
72 | o 7:02de42196ebe H
73 | |
73 | |
74 o | 6:eea13746799a G
74 o | 6:eea13746799a G
75 |\|
75 |\|
76 | o 5:24b6387c8c8c F
76 | o 5:24b6387c8c8c F
77 | |
77 | |
78 o | 4:9520eea781bc E
78 o | 4:9520eea781bc E
79 |/
79 |/
80 o 0:cd010b8cd998 A
80 o 0:cd010b8cd998 A
81
81
82 $ hg log --hidden -G
82 $ hg log --hidden -G
83 @ 10:8eeb3c33ad33 D
83 @ 10:8eeb3c33ad33 D
84 |
84 |
85 o 9:2327fea05063 C
85 o 9:2327fea05063 C
86 |
86 |
87 o 8:e4e5be0395b2 B
87 o 8:e4e5be0395b2 B
88 |
88 |
89 | o 7:02de42196ebe H
89 | o 7:02de42196ebe H
90 | |
90 | |
91 o | 6:eea13746799a G
91 o | 6:eea13746799a G
92 |\|
92 |\|
93 | o 5:24b6387c8c8c F
93 | o 5:24b6387c8c8c F
94 | |
94 | |
95 o | 4:9520eea781bc E
95 o | 4:9520eea781bc E
96 |/
96 |/
97 | x 3:32af7686d403 D
97 | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33)
98 | |
98 | |
99 | x 2:5fddd98957c8 C
99 | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063)
100 | |
100 | |
101 | x 1:42ccdea3bb16 B
101 | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2)
102 |/
102 |/
103 o 0:cd010b8cd998 A
103 o 0:cd010b8cd998 A
104
104
105 $ hg debugobsolete
105 $ hg debugobsolete
106 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
106 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
107 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
107 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
108 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
108 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
109
109
110
110
111 $ cd ..
111 $ cd ..
112
112
113 empty changeset
113 empty changeset
114 ---------------------------------
114 ---------------------------------
115
115
116 $ hg clone base empty
116 $ hg clone base empty
117 updating to branch default
117 updating to branch default
118 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
119 $ cd empty
119 $ cd empty
120 $ hg up eea13746799a
120 $ hg up eea13746799a
121 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
121 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
122
122
123 We make a copy of both the first changeset in the rebased and some other in the
123 We make a copy of both the first changeset in the rebased and some other in the
124 set.
124 set.
125
125
126 $ hg graft 42ccdea3bb16 32af7686d403
126 $ hg graft 42ccdea3bb16 32af7686d403
127 grafting 1:42ccdea3bb16 "B"
127 grafting 1:42ccdea3bb16 "B"
128 grafting 3:32af7686d403 "D"
128 grafting 3:32af7686d403 "D"
129 $ hg rebase -s 42ccdea3bb16 -d .
129 $ hg rebase -s 42ccdea3bb16 -d .
130 rebasing 1:42ccdea3bb16 "B"
130 rebasing 1:42ccdea3bb16 "B"
131 note: rebase of 1:42ccdea3bb16 created no changes to commit
131 note: rebase of 1:42ccdea3bb16 created no changes to commit
132 rebasing 2:5fddd98957c8 "C"
132 rebasing 2:5fddd98957c8 "C"
133 rebasing 3:32af7686d403 "D"
133 rebasing 3:32af7686d403 "D"
134 note: rebase of 3:32af7686d403 created no changes to commit
134 note: rebase of 3:32af7686d403 created no changes to commit
135 $ hg log -G
135 $ hg log -G
136 o 10:5ae4c968c6ac C
136 o 10:5ae4c968c6ac C
137 |
137 |
138 @ 9:08483444fef9 D
138 @ 9:08483444fef9 D
139 |
139 |
140 o 8:8877864f1edb B
140 o 8:8877864f1edb B
141 |
141 |
142 | o 7:02de42196ebe H
142 | o 7:02de42196ebe H
143 | |
143 | |
144 o | 6:eea13746799a G
144 o | 6:eea13746799a G
145 |\|
145 |\|
146 | o 5:24b6387c8c8c F
146 | o 5:24b6387c8c8c F
147 | |
147 | |
148 o | 4:9520eea781bc E
148 o | 4:9520eea781bc E
149 |/
149 |/
150 o 0:cd010b8cd998 A
150 o 0:cd010b8cd998 A
151
151
152 $ hg log --hidden -G
152 $ hg log --hidden -G
153 o 10:5ae4c968c6ac C
153 o 10:5ae4c968c6ac C
154 |
154 |
155 @ 9:08483444fef9 D
155 @ 9:08483444fef9 D
156 |
156 |
157 o 8:8877864f1edb B
157 o 8:8877864f1edb B
158 |
158 |
159 | o 7:02de42196ebe H
159 | o 7:02de42196ebe H
160 | |
160 | |
161 o | 6:eea13746799a G
161 o | 6:eea13746799a G
162 |\|
162 |\|
163 | o 5:24b6387c8c8c F
163 | o 5:24b6387c8c8c F
164 | |
164 | |
165 o | 4:9520eea781bc E
165 o | 4:9520eea781bc E
166 |/
166 |/
167 | x 3:32af7686d403 D
167 | x 3:32af7686d403 D (pruned using rebase)
168 | |
168 | |
169 | x 2:5fddd98957c8 C
169 | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac)
170 | |
170 | |
171 | x 1:42ccdea3bb16 B
171 | x 1:42ccdea3bb16 B (pruned using rebase)
172 |/
172 |/
173 o 0:cd010b8cd998 A
173 o 0:cd010b8cd998 A
174
174
175 $ hg debugobsolete
175 $ hg debugobsolete
176 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
176 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
177 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
177 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
178 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
178 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
179
179
180
180
181 More complex case where part of the rebase set were already rebased
181 More complex case where part of the rebase set were already rebased
182
182
183 $ hg rebase --rev 'desc(D)' --dest 'desc(H)'
183 $ hg rebase --rev 'desc(D)' --dest 'desc(H)'
184 rebasing 9:08483444fef9 "D"
184 rebasing 9:08483444fef9 "D"
185 $ hg debugobsolete
185 $ hg debugobsolete
186 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
186 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
187 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
187 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
188 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
188 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
189 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
189 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
190 $ hg log -G
190 $ hg log -G
191 @ 11:4596109a6a43 D
191 @ 11:4596109a6a43 D
192 |
192 |
193 | o 10:5ae4c968c6ac C
193 | o 10:5ae4c968c6ac C
194 | |
194 | |
195 | x 9:08483444fef9 D
195 | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43)
196 | |
196 | |
197 | o 8:8877864f1edb B
197 | o 8:8877864f1edb B
198 | |
198 | |
199 o | 7:02de42196ebe H
199 o | 7:02de42196ebe H
200 | |
200 | |
201 | o 6:eea13746799a G
201 | o 6:eea13746799a G
202 |/|
202 |/|
203 o | 5:24b6387c8c8c F
203 o | 5:24b6387c8c8c F
204 | |
204 | |
205 | o 4:9520eea781bc E
205 | o 4:9520eea781bc E
206 |/
206 |/
207 o 0:cd010b8cd998 A
207 o 0:cd010b8cd998 A
208
208
209 $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True
209 $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True
210 rebasing 8:8877864f1edb "B"
210 rebasing 8:8877864f1edb "B"
211 note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip)
211 note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip)
212 rebasing 10:5ae4c968c6ac "C"
212 rebasing 10:5ae4c968c6ac "C"
213 $ hg debugobsolete
213 $ hg debugobsolete
214 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
214 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
215 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
215 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
216 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
216 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'}
217 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
217 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
218 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
218 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
219 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
219 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
220 $ hg log --rev 'contentdivergent()'
220 $ hg log --rev 'contentdivergent()'
221 $ hg log -G
221 $ hg log -G
222 o 13:98f6af4ee953 C
222 o 13:98f6af4ee953 C
223 |
223 |
224 o 12:462a34d07e59 B
224 o 12:462a34d07e59 B
225 |
225 |
226 @ 11:4596109a6a43 D
226 @ 11:4596109a6a43 D
227 |
227 |
228 o 7:02de42196ebe H
228 o 7:02de42196ebe H
229 |
229 |
230 | o 6:eea13746799a G
230 | o 6:eea13746799a G
231 |/|
231 |/|
232 o | 5:24b6387c8c8c F
232 o | 5:24b6387c8c8c F
233 | |
233 | |
234 | o 4:9520eea781bc E
234 | o 4:9520eea781bc E
235 |/
235 |/
236 o 0:cd010b8cd998 A
236 o 0:cd010b8cd998 A
237
237
238 $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003
238 $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003
239 changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003
239 changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003
240 phase: draft
240 phase: draft
241 parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6
241 parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6
242 parent: -1:0000000000000000000000000000000000000000
242 parent: -1:0000000000000000000000000000000000000000
243 manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905
243 manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905
244 user: Nicolas Dumazet <nicdumz.commits@gmail.com>
244 user: Nicolas Dumazet <nicdumz.commits@gmail.com>
245 date: Sat Apr 30 15:24:48 2011 +0200
245 date: Sat Apr 30 15:24:48 2011 +0200
246 files+: D
246 files+: D
247 extra: branch=default
247 extra: branch=default
248 extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c
248 extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c
249 extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a
249 extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a
250 description:
250 description:
251 D
251 D
252
252
253
253
254 $ hg up -qr 'desc(G)'
254 $ hg up -qr 'desc(G)'
255 $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003
255 $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003
256 grafting 11:4596109a6a43 "D"
256 grafting 11:4596109a6a43 "D"
257 $ hg up -qr 'desc(E)'
257 $ hg up -qr 'desc(E)'
258 $ hg rebase -s tip -d .
258 $ hg rebase -s tip -d .
259 rebasing 14:9e36056a46e3 "D" (tip)
259 rebasing 14:9e36056a46e3 "D" (tip)
260 $ hg log --style default --debug -r tip
260 $ hg log --style default --debug -r tip
261 changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab
261 changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab
262 tag: tip
262 tag: tip
263 phase: draft
263 phase: draft
264 parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba
264 parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba
265 parent: -1:0000000000000000000000000000000000000000
265 parent: -1:0000000000000000000000000000000000000000
266 manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42
266 manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42
267 user: Nicolas Dumazet <nicdumz.commits@gmail.com>
267 user: Nicolas Dumazet <nicdumz.commits@gmail.com>
268 date: Sat Apr 30 15:24:48 2011 +0200
268 date: Sat Apr 30 15:24:48 2011 +0200
269 files+: D
269 files+: D
270 extra: branch=default
270 extra: branch=default
271 extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003
271 extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003
272 extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f
272 extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f
273 extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a
273 extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a
274 description:
274 description:
275 D
275 D
276
276
277
277
278 Start rebase from a commit that is obsolete but not hidden only because it's
278 Start rebase from a commit that is obsolete but not hidden only because it's
279 a working copy parent. We should be moved back to the starting commit as usual
279 a working copy parent. We should be moved back to the starting commit as usual
280 even though it is hidden (until we're moved there).
280 even though it is hidden (until we're moved there).
281
281
282 $ hg --hidden up -qr 'first(hidden())'
282 $ hg --hidden up -qr 'first(hidden())'
283 $ hg rebase --rev 13 --dest 15
283 $ hg rebase --rev 13 --dest 15
284 rebasing 13:98f6af4ee953 "C"
284 rebasing 13:98f6af4ee953 "C"
285 $ hg log -G
285 $ hg log -G
286 o 16:294a2b93eb4d C
286 o 16:294a2b93eb4d C
287 |
287 |
288 o 15:627d46148090 D
288 o 15:627d46148090 D
289 |
289 |
290 | o 12:462a34d07e59 B
290 | o 12:462a34d07e59 B
291 | |
291 | |
292 | o 11:4596109a6a43 D
292 | o 11:4596109a6a43 D
293 | |
293 | |
294 | o 7:02de42196ebe H
294 | o 7:02de42196ebe H
295 | |
295 | |
296 +---o 6:eea13746799a G
296 +---o 6:eea13746799a G
297 | |/
297 | |/
298 | o 5:24b6387c8c8c F
298 | o 5:24b6387c8c8c F
299 | |
299 | |
300 o | 4:9520eea781bc E
300 o | 4:9520eea781bc E
301 |/
301 |/
302 | @ 1:42ccdea3bb16 B
302 | @ 1:42ccdea3bb16 B (pruned using rebase)
303 |/
303 |/
304 o 0:cd010b8cd998 A
304 o 0:cd010b8cd998 A
305
305
306
306
307 $ cd ..
307 $ cd ..
308
308
309 collapse rebase
309 collapse rebase
310 ---------------------------------
310 ---------------------------------
311
311
312 $ hg clone base collapse
312 $ hg clone base collapse
313 updating to branch default
313 updating to branch default
314 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
314 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
315 $ cd collapse
315 $ cd collapse
316 $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse
316 $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse
317 rebasing 1:42ccdea3bb16 "B"
317 rebasing 1:42ccdea3bb16 "B"
318 rebasing 2:5fddd98957c8 "C"
318 rebasing 2:5fddd98957c8 "C"
319 rebasing 3:32af7686d403 "D"
319 rebasing 3:32af7686d403 "D"
320 $ hg log -G
320 $ hg log -G
321 o 8:4dc2197e807b Collapsed revision
321 o 8:4dc2197e807b Collapsed revision
322 |
322 |
323 | @ 7:02de42196ebe H
323 | @ 7:02de42196ebe H
324 | |
324 | |
325 o | 6:eea13746799a G
325 o | 6:eea13746799a G
326 |\|
326 |\|
327 | o 5:24b6387c8c8c F
327 | o 5:24b6387c8c8c F
328 | |
328 | |
329 o | 4:9520eea781bc E
329 o | 4:9520eea781bc E
330 |/
330 |/
331 o 0:cd010b8cd998 A
331 o 0:cd010b8cd998 A
332
332
333 $ hg log --hidden -G
333 $ hg log --hidden -G
334 o 8:4dc2197e807b Collapsed revision
334 o 8:4dc2197e807b Collapsed revision
335 |
335 |
336 | @ 7:02de42196ebe H
336 | @ 7:02de42196ebe H
337 | |
337 | |
338 o | 6:eea13746799a G
338 o | 6:eea13746799a G
339 |\|
339 |\|
340 | o 5:24b6387c8c8c F
340 | o 5:24b6387c8c8c F
341 | |
341 | |
342 o | 4:9520eea781bc E
342 o | 4:9520eea781bc E
343 |/
343 |/
344 | x 3:32af7686d403 D
344 | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b)
345 | |
345 | |
346 | x 2:5fddd98957c8 C
346 | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b)
347 | |
347 | |
348 | x 1:42ccdea3bb16 B
348 | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b)
349 |/
349 |/
350 o 0:cd010b8cd998 A
350 o 0:cd010b8cd998 A
351
351
352 $ hg id --debug -r tip
352 $ hg id --debug -r tip
353 4dc2197e807bae9817f09905b50ab288be2dbbcf tip
353 4dc2197e807bae9817f09905b50ab288be2dbbcf tip
354 $ hg debugobsolete
354 $ hg debugobsolete
355 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
355 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
356 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
356 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
357 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
357 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'}
358
358
359 $ cd ..
359 $ cd ..
360
360
361 Rebase set has hidden descendants
361 Rebase set has hidden descendants
362 ---------------------------------
362 ---------------------------------
363
363
364 We rebase a changeset which has hidden descendants. Hidden changesets must not
364 We rebase a changeset which has hidden descendants. Hidden changesets must not
365 be rebased.
365 be rebased.
366
366
367 $ hg clone base hidden
367 $ hg clone base hidden
368 updating to branch default
368 updating to branch default
369 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
369 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
370 $ cd hidden
370 $ cd hidden
371 $ hg rebase -s 5fddd98957c8 -d eea13746799a
371 $ hg rebase -s 5fddd98957c8 -d eea13746799a
372 rebasing 2:5fddd98957c8 "C"
372 rebasing 2:5fddd98957c8 "C"
373 rebasing 3:32af7686d403 "D"
373 rebasing 3:32af7686d403 "D"
374 $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe
374 $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe
375 rebasing 1:42ccdea3bb16 "B"
375 rebasing 1:42ccdea3bb16 "B"
376 $ hg log -G
376 $ hg log -G
377 o 10:7c6027df6a99 B
377 o 10:7c6027df6a99 B
378 |
378 |
379 | o 9:cf44d2f5a9f4 D
379 | o 9:cf44d2f5a9f4 D
380 | |
380 | |
381 | o 8:e273c5e7d2d2 C
381 | o 8:e273c5e7d2d2 C
382 | |
382 | |
383 @ | 7:02de42196ebe H
383 @ | 7:02de42196ebe H
384 | |
384 | |
385 | o 6:eea13746799a G
385 | o 6:eea13746799a G
386 |/|
386 |/|
387 o | 5:24b6387c8c8c F
387 o | 5:24b6387c8c8c F
388 | |
388 | |
389 | o 4:9520eea781bc E
389 | o 4:9520eea781bc E
390 |/
390 |/
391 o 0:cd010b8cd998 A
391 o 0:cd010b8cd998 A
392
392
393 $ hg log --hidden -G
393 $ hg log --hidden -G
394 o 10:7c6027df6a99 B
394 o 10:7c6027df6a99 B
395 |
395 |
396 | o 9:cf44d2f5a9f4 D
396 | o 9:cf44d2f5a9f4 D
397 | |
397 | |
398 | o 8:e273c5e7d2d2 C
398 | o 8:e273c5e7d2d2 C
399 | |
399 | |
400 @ | 7:02de42196ebe H
400 @ | 7:02de42196ebe H
401 | |
401 | |
402 | o 6:eea13746799a G
402 | o 6:eea13746799a G
403 |/|
403 |/|
404 o | 5:24b6387c8c8c F
404 o | 5:24b6387c8c8c F
405 | |
405 | |
406 | o 4:9520eea781bc E
406 | o 4:9520eea781bc E
407 |/
407 |/
408 | x 3:32af7686d403 D
408 | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4)
409 | |
409 | |
410 | x 2:5fddd98957c8 C
410 | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2)
411 | |
411 | |
412 | x 1:42ccdea3bb16 B
412 | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99)
413 |/
413 |/
414 o 0:cd010b8cd998 A
414 o 0:cd010b8cd998 A
415
415
416 $ hg debugobsolete
416 $ hg debugobsolete
417 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
417 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
418 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
418 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
419 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
419 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
420
420
421 Test that rewriting leaving instability behind is allowed
421 Test that rewriting leaving instability behind is allowed
422 ---------------------------------------------------------------------
422 ---------------------------------------------------------------------
423
423
424 $ hg log -r 'children(8)'
424 $ hg log -r 'children(8)'
425 9:cf44d2f5a9f4 D (no-eol)
425 9:cf44d2f5a9f4 D (no-eol)
426 $ hg rebase -r 8
426 $ hg rebase -r 8
427 rebasing 8:e273c5e7d2d2 "C"
427 rebasing 8:e273c5e7d2d2 "C"
428 $ hg log -G
428 $ hg log -G
429 o 11:0d8f238b634c C
429 o 11:0d8f238b634c C
430 |
430 |
431 o 10:7c6027df6a99 B
431 o 10:7c6027df6a99 B
432 |
432 |
433 | o 9:cf44d2f5a9f4 D
433 | o 9:cf44d2f5a9f4 D
434 | |
434 | |
435 | x 8:e273c5e7d2d2 C
435 | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c)
436 | |
436 | |
437 @ | 7:02de42196ebe H
437 @ | 7:02de42196ebe H
438 | |
438 | |
439 | o 6:eea13746799a G
439 | o 6:eea13746799a G
440 |/|
440 |/|
441 o | 5:24b6387c8c8c F
441 o | 5:24b6387c8c8c F
442 | |
442 | |
443 | o 4:9520eea781bc E
443 | o 4:9520eea781bc E
444 |/
444 |/
445 o 0:cd010b8cd998 A
445 o 0:cd010b8cd998 A
446
446
447
447
448
448
449 Test multiple root handling
449 Test multiple root handling
450 ------------------------------------
450 ------------------------------------
451
451
452 $ hg rebase --dest 4 --rev '7+11+9'
452 $ hg rebase --dest 4 --rev '7+11+9'
453 rebasing 9:cf44d2f5a9f4 "D"
453 rebasing 9:cf44d2f5a9f4 "D"
454 rebasing 7:02de42196ebe "H"
454 rebasing 7:02de42196ebe "H"
455 rebasing 11:0d8f238b634c "C" (tip)
455 rebasing 11:0d8f238b634c "C" (tip)
456 $ hg log -G
456 $ hg log -G
457 o 14:1e8370e38cca C
457 o 14:1e8370e38cca C
458 |
458 |
459 @ 13:bfe264faf697 H
459 @ 13:bfe264faf697 H
460 |
460 |
461 | o 12:102b4c1d889b D
461 | o 12:102b4c1d889b D
462 |/
462 |/
463 | o 10:7c6027df6a99 B
463 | o 10:7c6027df6a99 B
464 | |
464 | |
465 | x 7:02de42196ebe H
465 | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697)
466 | |
466 | |
467 +---o 6:eea13746799a G
467 +---o 6:eea13746799a G
468 | |/
468 | |/
469 | o 5:24b6387c8c8c F
469 | o 5:24b6387c8c8c F
470 | |
470 | |
471 o | 4:9520eea781bc E
471 o | 4:9520eea781bc E
472 |/
472 |/
473 o 0:cd010b8cd998 A
473 o 0:cd010b8cd998 A
474
474
475 $ cd ..
475 $ cd ..
476
476
477 Detach both parents
477 Detach both parents
478
478
479 $ hg init double-detach
479 $ hg init double-detach
480 $ cd double-detach
480 $ cd double-detach
481
481
482 $ hg debugdrawdag <<EOF
482 $ hg debugdrawdag <<EOF
483 > F
483 > F
484 > /|
484 > /|
485 > C E
485 > C E
486 > | |
486 > | |
487 > B D G
487 > B D G
488 > \|/
488 > \|/
489 > A
489 > A
490 > EOF
490 > EOF
491
491
492 $ hg rebase -d G -r 'B + D + F'
492 $ hg rebase -d G -r 'B + D + F'
493 rebasing 1:112478962961 "B" (B)
493 rebasing 1:112478962961 "B" (B)
494 rebasing 2:b18e25de2cf5 "D" (D)
494 rebasing 2:b18e25de2cf5 "D" (D)
495 rebasing 6:f15c3adaf214 "F" (F tip)
495 rebasing 6:f15c3adaf214 "F" (F tip)
496 abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents
496 abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents
497 [255]
497 [255]
498
498
499 $ cd ..
499 $ cd ..
500
500
501 test on rebase dropping a merge
501 test on rebase dropping a merge
502
502
503 (setup)
503 (setup)
504
504
505 $ hg init dropmerge
505 $ hg init dropmerge
506 $ cd dropmerge
506 $ cd dropmerge
507 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
507 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
508 adding changesets
508 adding changesets
509 adding manifests
509 adding manifests
510 adding file changes
510 adding file changes
511 added 8 changesets with 7 changes to 7 files (+2 heads)
511 added 8 changesets with 7 changes to 7 files (+2 heads)
512 new changesets cd010b8cd998:02de42196ebe
512 new changesets cd010b8cd998:02de42196ebe
513 (run 'hg heads' to see heads, 'hg merge' to merge)
513 (run 'hg heads' to see heads, 'hg merge' to merge)
514 $ hg up 3
514 $ hg up 3
515 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
515 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 $ hg merge 7
516 $ hg merge 7
517 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
517 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
518 (branch merge, don't forget to commit)
518 (branch merge, don't forget to commit)
519 $ hg ci -m 'M'
519 $ hg ci -m 'M'
520 $ echo I > I
520 $ echo I > I
521 $ hg add I
521 $ hg add I
522 $ hg ci -m I
522 $ hg ci -m I
523 $ hg log -G
523 $ hg log -G
524 @ 9:4bde274eefcf I
524 @ 9:4bde274eefcf I
525 |
525 |
526 o 8:53a6a128b2b7 M
526 o 8:53a6a128b2b7 M
527 |\
527 |\
528 | o 7:02de42196ebe H
528 | o 7:02de42196ebe H
529 | |
529 | |
530 | | o 6:eea13746799a G
530 | | o 6:eea13746799a G
531 | |/|
531 | |/|
532 | o | 5:24b6387c8c8c F
532 | o | 5:24b6387c8c8c F
533 | | |
533 | | |
534 | | o 4:9520eea781bc E
534 | | o 4:9520eea781bc E
535 | |/
535 | |/
536 o | 3:32af7686d403 D
536 o | 3:32af7686d403 D
537 | |
537 | |
538 o | 2:5fddd98957c8 C
538 o | 2:5fddd98957c8 C
539 | |
539 | |
540 o | 1:42ccdea3bb16 B
540 o | 1:42ccdea3bb16 B
541 |/
541 |/
542 o 0:cd010b8cd998 A
542 o 0:cd010b8cd998 A
543
543
544 (actual test)
544 (actual test)
545
545
546 $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)'
546 $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)'
547 rebasing 3:32af7686d403 "D"
547 rebasing 3:32af7686d403 "D"
548 rebasing 7:02de42196ebe "H"
548 rebasing 7:02de42196ebe "H"
549 rebasing 9:4bde274eefcf "I" (tip)
549 rebasing 9:4bde274eefcf "I" (tip)
550 $ hg log -G
550 $ hg log -G
551 @ 12:acd174b7ab39 I
551 @ 12:acd174b7ab39 I
552 |
552 |
553 o 11:6c11a6218c97 H
553 o 11:6c11a6218c97 H
554 |
554 |
555 | o 10:b5313c85b22e D
555 | o 10:b5313c85b22e D
556 |/
556 |/
557 | o 8:53a6a128b2b7 M
557 | o 8:53a6a128b2b7 M
558 | |\
558 | |\
559 | | x 7:02de42196ebe H
559 | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97)
560 | | |
560 | | |
561 o---+ 6:eea13746799a G
561 o---+ 6:eea13746799a G
562 | | |
562 | | |
563 | | o 5:24b6387c8c8c F
563 | | o 5:24b6387c8c8c F
564 | | |
564 | | |
565 o---+ 4:9520eea781bc E
565 o---+ 4:9520eea781bc E
566 / /
566 / /
567 x | 3:32af7686d403 D
567 x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e)
568 | |
568 | |
569 o | 2:5fddd98957c8 C
569 o | 2:5fddd98957c8 C
570 | |
570 | |
571 o | 1:42ccdea3bb16 B
571 o | 1:42ccdea3bb16 B
572 |/
572 |/
573 o 0:cd010b8cd998 A
573 o 0:cd010b8cd998 A
574
574
575
575
576 Test hidden changesets in the rebase set (issue4504)
576 Test hidden changesets in the rebase set (issue4504)
577
577
578 $ hg up --hidden 9
578 $ hg up --hidden 9
579 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
579 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
580 $ echo J > J
580 $ echo J > J
581 $ hg add J
581 $ hg add J
582 $ hg commit -m J
582 $ hg commit -m J
583 $ hg debugobsolete `hg log --rev . -T '{node}'`
583 $ hg debugobsolete `hg log --rev . -T '{node}'`
584 obsoleted 1 changesets
584 obsoleted 1 changesets
585
585
586 $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off
586 $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off
587 rebasing 9:4bde274eefcf "I"
587 rebasing 9:4bde274eefcf "I"
588 rebasing 13:06edfc82198f "J" (tip)
588 rebasing 13:06edfc82198f "J" (tip)
589 $ hg log -G
589 $ hg log -G
590 @ 15:5ae8a643467b J
590 @ 15:5ae8a643467b J
591 |
591 |
592 o 14:9ad579b4a5de I
592 o 14:9ad579b4a5de I
593 |
593 |
594 | o 12:acd174b7ab39 I
594 | o 12:acd174b7ab39 I
595 | |
595 | |
596 | o 11:6c11a6218c97 H
596 | o 11:6c11a6218c97 H
597 | |
597 | |
598 o | 10:b5313c85b22e D
598 o | 10:b5313c85b22e D
599 |/
599 |/
600 | o 8:53a6a128b2b7 M
600 | o 8:53a6a128b2b7 M
601 | |\
601 | |\
602 | | x 7:02de42196ebe H
602 | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97)
603 | | |
603 | | |
604 o---+ 6:eea13746799a G
604 o---+ 6:eea13746799a G
605 | | |
605 | | |
606 | | o 5:24b6387c8c8c F
606 | | o 5:24b6387c8c8c F
607 | | |
607 | | |
608 o---+ 4:9520eea781bc E
608 o---+ 4:9520eea781bc E
609 / /
609 / /
610 x | 3:32af7686d403 D
610 x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e)
611 | |
611 | |
612 o | 2:5fddd98957c8 C
612 o | 2:5fddd98957c8 C
613 | |
613 | |
614 o | 1:42ccdea3bb16 B
614 o | 1:42ccdea3bb16 B
615 |/
615 |/
616 o 0:cd010b8cd998 A
616 o 0:cd010b8cd998 A
617
617
618 $ hg up 14 -C
618 $ hg up 14 -C
619 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
619 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
620 $ echo "K" > K
620 $ echo "K" > K
621 $ hg add K
621 $ hg add K
622 $ hg commit --amend -m "K"
622 $ hg commit --amend -m "K"
623 $ echo "L" > L
623 $ echo "L" > L
624 $ hg add L
624 $ hg add L
625 $ hg commit -m "L"
625 $ hg commit -m "L"
626 $ hg up '.^'
626 $ hg up '.^'
627 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
627 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
628 $ echo "M" > M
628 $ echo "M" > M
629 $ hg add M
629 $ hg add M
630 $ hg commit --amend -m "M"
630 $ hg commit --amend -m "M"
631 $ hg log -G
631 $ hg log -G
632 @ 18:bfaedf8eb73b M
632 @ 18:bfaedf8eb73b M
633 |
633 |
634 | o 17:97219452e4bd L
634 | o 17:97219452e4bd L
635 | |
635 | |
636 | x 16:fc37a630c901 K
636 | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b)
637 |/
637 |/
638 | o 15:5ae8a643467b J
638 | o 15:5ae8a643467b J
639 | |
639 | |
640 | x 14:9ad579b4a5de I
640 | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901)
641 |/
641 |/
642 | o 12:acd174b7ab39 I
642 | o 12:acd174b7ab39 I
643 | |
643 | |
644 | o 11:6c11a6218c97 H
644 | o 11:6c11a6218c97 H
645 | |
645 | |
646 o | 10:b5313c85b22e D
646 o | 10:b5313c85b22e D
647 |/
647 |/
648 | o 8:53a6a128b2b7 M
648 | o 8:53a6a128b2b7 M
649 | |\
649 | |\
650 | | x 7:02de42196ebe H
650 | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97)
651 | | |
651 | | |
652 o---+ 6:eea13746799a G
652 o---+ 6:eea13746799a G
653 | | |
653 | | |
654 | | o 5:24b6387c8c8c F
654 | | o 5:24b6387c8c8c F
655 | | |
655 | | |
656 o---+ 4:9520eea781bc E
656 o---+ 4:9520eea781bc E
657 / /
657 / /
658 x | 3:32af7686d403 D
658 x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e)
659 | |
659 | |
660 o | 2:5fddd98957c8 C
660 o | 2:5fddd98957c8 C
661 | |
661 | |
662 o | 1:42ccdea3bb16 B
662 o | 1:42ccdea3bb16 B
663 |/
663 |/
664 o 0:cd010b8cd998 A
664 o 0:cd010b8cd998 A
665
665
666 $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True
666 $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True
667 note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K"
667 note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K"
668 rebasing 15:5ae8a643467b "J"
668 rebasing 15:5ae8a643467b "J"
669
669
670 $ cd ..
670 $ cd ..
671
671
672 Skip obsolete changeset even with multiple hops
672 Skip obsolete changeset even with multiple hops
673 -----------------------------------------------
673 -----------------------------------------------
674
674
675 setup
675 setup
676
676
677 $ hg init obsskip
677 $ hg init obsskip
678 $ cd obsskip
678 $ cd obsskip
679 $ cat << EOF >> .hg/hgrc
679 $ cat << EOF >> .hg/hgrc
680 > [experimental]
680 > [experimental]
681 > rebaseskipobsolete = True
681 > rebaseskipobsolete = True
682 > [extensions]
682 > [extensions]
683 > strip =
683 > strip =
684 > EOF
684 > EOF
685 $ echo A > A
685 $ echo A > A
686 $ hg add A
686 $ hg add A
687 $ hg commit -m A
687 $ hg commit -m A
688 $ echo B > B
688 $ echo B > B
689 $ hg add B
689 $ hg add B
690 $ hg commit -m B0
690 $ hg commit -m B0
691 $ hg commit --amend -m B1
691 $ hg commit --amend -m B1
692 $ hg commit --amend -m B2
692 $ hg commit --amend -m B2
693 $ hg up --hidden 'desc(B0)'
693 $ hg up --hidden 'desc(B0)'
694 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
694 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
695 $ echo C > C
695 $ echo C > C
696 $ hg add C
696 $ hg add C
697 $ hg commit -m C
697 $ hg commit -m C
698
698
699 Rebase finds its way in a chain of marker
699 Rebase finds its way in a chain of marker
700
700
701 $ hg rebase -d 'desc(B2)'
701 $ hg rebase -d 'desc(B2)'
702 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2"
702 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2"
703 rebasing 4:212cb178bcbb "C" (tip)
703 rebasing 4:212cb178bcbb "C" (tip)
704
704
705 Even when the chain include missing node
705 Even when the chain include missing node
706
706
707 $ hg up --hidden 'desc(B0)'
707 $ hg up --hidden 'desc(B0)'
708 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
708 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
709 $ echo D > D
709 $ echo D > D
710 $ hg add D
710 $ hg add D
711 $ hg commit -m D
711 $ hg commit -m D
712 $ hg --hidden strip -r 'desc(B1)'
712 $ hg --hidden strip -r 'desc(B1)'
713 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob)
713 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob)
714
714
715 $ hg rebase -d 'desc(B2)'
715 $ hg rebase -d 'desc(B2)'
716 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2"
716 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2"
717 rebasing 5:1a79b7535141 "D" (tip)
717 rebasing 5:1a79b7535141 "D" (tip)
718 $ hg up 4
718 $ hg up 4
719 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
719 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
720 $ echo "O" > O
720 $ echo "O" > O
721 $ hg add O
721 $ hg add O
722 $ hg commit -m O
722 $ hg commit -m O
723 $ echo "P" > P
723 $ echo "P" > P
724 $ hg add P
724 $ hg add P
725 $ hg commit -m P
725 $ hg commit -m P
726 $ hg log -G
726 $ hg log -G
727 @ 8:8d47583e023f P
727 @ 8:8d47583e023f P
728 |
728 |
729 o 7:360bbaa7d3ce O
729 o 7:360bbaa7d3ce O
730 |
730 |
731 | o 6:9c48361117de D
731 | o 6:9c48361117de D
732 | |
732 | |
733 o | 4:ff2c4d47b71d C
733 o | 4:ff2c4d47b71d C
734 |/
734 |/
735 o 2:261e70097290 B2
735 o 2:261e70097290 B2
736 |
736 |
737 o 0:4a2df7238c3b A
737 o 0:4a2df7238c3b A
738
738
739 $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true
739 $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true
740 obsoleted 1 changesets
740 obsoleted 1 changesets
741 $ hg rebase -d 6 -r "4::"
741 $ hg rebase -d 6 -r "4::"
742 rebasing 4:ff2c4d47b71d "C"
742 rebasing 4:ff2c4d47b71d "C"
743 note: not rebasing 7:360bbaa7d3ce "O", it has no successor
743 note: not rebasing 7:360bbaa7d3ce "O", it has no successor
744 rebasing 8:8d47583e023f "P" (tip)
744 rebasing 8:8d47583e023f "P" (tip)
745
745
746 If all the changeset to be rebased are obsolete and present in the destination, we
746 If all the changeset to be rebased are obsolete and present in the destination, we
747 should display a friendly error message
747 should display a friendly error message
748
748
749 $ hg log -G
749 $ hg log -G
750 @ 10:121d9e3bc4c6 P
750 @ 10:121d9e3bc4c6 P
751 |
751 |
752 o 9:4be60e099a77 C
752 o 9:4be60e099a77 C
753 |
753 |
754 o 6:9c48361117de D
754 o 6:9c48361117de D
755 |
755 |
756 o 2:261e70097290 B2
756 o 2:261e70097290 B2
757 |
757 |
758 o 0:4a2df7238c3b A
758 o 0:4a2df7238c3b A
759
759
760
760
761 $ hg up 9
761 $ hg up 9
762 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
762 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
763 $ echo "non-relevant change" > nonrelevant
763 $ echo "non-relevant change" > nonrelevant
764 $ hg add nonrelevant
764 $ hg add nonrelevant
765 $ hg commit -m nonrelevant
765 $ hg commit -m nonrelevant
766 created new head
766 created new head
767 $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true
767 $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true
768 obsoleted 1 changesets
768 obsoleted 1 changesets
769 $ hg rebase -r . -d 10
769 $ hg rebase -r . -d 10
770 note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor
770 note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor
771
771
772 If a rebase is going to create divergence, it should abort
772 If a rebase is going to create divergence, it should abort
773
773
774 $ hg log -G
774 $ hg log -G
775 @ 10:121d9e3bc4c6 P
775 @ 10:121d9e3bc4c6 P
776 |
776 |
777 o 9:4be60e099a77 C
777 o 9:4be60e099a77 C
778 |
778 |
779 o 6:9c48361117de D
779 o 6:9c48361117de D
780 |
780 |
781 o 2:261e70097290 B2
781 o 2:261e70097290 B2
782 |
782 |
783 o 0:4a2df7238c3b A
783 o 0:4a2df7238c3b A
784
784
785
785
786 $ hg up 9
786 $ hg up 9
787 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
787 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
788 $ echo "john" > doe
788 $ echo "john" > doe
789 $ hg add doe
789 $ hg add doe
790 $ hg commit -m "john doe"
790 $ hg commit -m "john doe"
791 created new head
791 created new head
792 $ hg up 10
792 $ hg up 10
793 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
793 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
794 $ echo "foo" > bar
794 $ echo "foo" > bar
795 $ hg add bar
795 $ hg add bar
796 $ hg commit --amend -m "10'"
796 $ hg commit --amend -m "10'"
797 $ hg up 10 --hidden
797 $ hg up 10 --hidden
798 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
798 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
799 $ echo "bar" > foo
799 $ echo "bar" > foo
800 $ hg add foo
800 $ hg add foo
801 $ hg commit -m "bar foo"
801 $ hg commit -m "bar foo"
802 $ hg log -G
802 $ hg log -G
803 @ 14:73568ab6879d bar foo
803 @ 14:73568ab6879d bar foo
804 |
804 |
805 | o 13:77d874d096a2 10'
805 | o 13:77d874d096a2 10'
806 | |
806 | |
807 | | o 12:3eb461388009 john doe
807 | | o 12:3eb461388009 john doe
808 | |/
808 | |/
809 x | 10:121d9e3bc4c6 P
809 x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2)
810 |/
810 |/
811 o 9:4be60e099a77 C
811 o 9:4be60e099a77 C
812 |
812 |
813 o 6:9c48361117de D
813 o 6:9c48361117de D
814 |
814 |
815 o 2:261e70097290 B2
815 o 2:261e70097290 B2
816 |
816 |
817 o 0:4a2df7238c3b A
817 o 0:4a2df7238c3b A
818
818
819 $ hg summary
819 $ hg summary
820 parent: 14:73568ab6879d tip (orphan)
820 parent: 14:73568ab6879d tip (orphan)
821 bar foo
821 bar foo
822 branch: default
822 branch: default
823 commit: (clean)
823 commit: (clean)
824 update: 2 new changesets, 3 branch heads (merge)
824 update: 2 new changesets, 3 branch heads (merge)
825 phases: 8 draft
825 phases: 8 draft
826 orphan: 1 changesets
826 orphan: 1 changesets
827 $ hg rebase -s 10 -d 12
827 $ hg rebase -s 10 -d 12
828 abort: this rebase will cause divergences from: 121d9e3bc4c6
828 abort: this rebase will cause divergences from: 121d9e3bc4c6
829 (to force the rebase please set experimental.evolution.allowdivergence=True)
829 (to force the rebase please set experimental.evolution.allowdivergence=True)
830 [255]
830 [255]
831 $ hg log -G
831 $ hg log -G
832 @ 14:73568ab6879d bar foo
832 @ 14:73568ab6879d bar foo
833 |
833 |
834 | o 13:77d874d096a2 10'
834 | o 13:77d874d096a2 10'
835 | |
835 | |
836 | | o 12:3eb461388009 john doe
836 | | o 12:3eb461388009 john doe
837 | |/
837 | |/
838 x | 10:121d9e3bc4c6 P
838 x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2)
839 |/
839 |/
840 o 9:4be60e099a77 C
840 o 9:4be60e099a77 C
841 |
841 |
842 o 6:9c48361117de D
842 o 6:9c48361117de D
843 |
843 |
844 o 2:261e70097290 B2
844 o 2:261e70097290 B2
845 |
845 |
846 o 0:4a2df7238c3b A
846 o 0:4a2df7238c3b A
847
847
848 With experimental.evolution.allowdivergence=True, rebase can create divergence
848 With experimental.evolution.allowdivergence=True, rebase can create divergence
849
849
850 $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True
850 $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True
851 rebasing 10:121d9e3bc4c6 "P"
851 rebasing 10:121d9e3bc4c6 "P"
852 rebasing 14:73568ab6879d "bar foo" (tip)
852 rebasing 14:73568ab6879d "bar foo" (tip)
853 $ hg summary
853 $ hg summary
854 parent: 16:61bd55f69bc4 tip
854 parent: 16:61bd55f69bc4 tip
855 bar foo
855 bar foo
856 branch: default
856 branch: default
857 commit: (clean)
857 commit: (clean)
858 update: 1 new changesets, 2 branch heads (merge)
858 update: 1 new changesets, 2 branch heads (merge)
859 phases: 8 draft
859 phases: 8 draft
860 content-divergent: 2 changesets
860 content-divergent: 2 changesets
861
861
862 rebase --continue + skipped rev because their successors are in destination
862 rebase --continue + skipped rev because their successors are in destination
863 we make a change in trunk and work on conflicting changes to make rebase abort.
863 we make a change in trunk and work on conflicting changes to make rebase abort.
864
864
865 $ hg log -G -r 16::
865 $ hg log -G -r 16::
866 @ 16:61bd55f69bc4 bar foo
866 @ 16:61bd55f69bc4 bar foo
867 |
867 |
868 ~
868 ~
869
869
870 Create the two changes in trunk
870 Create the two changes in trunk
871 $ printf "a" > willconflict
871 $ printf "a" > willconflict
872 $ hg add willconflict
872 $ hg add willconflict
873 $ hg commit -m "willconflict first version"
873 $ hg commit -m "willconflict first version"
874
874
875 $ printf "dummy" > C
875 $ printf "dummy" > C
876 $ hg commit -m "dummy change successor"
876 $ hg commit -m "dummy change successor"
877
877
878 Create the changes that we will rebase
878 Create the changes that we will rebase
879 $ hg update -C 16 -q
879 $ hg update -C 16 -q
880 $ printf "b" > willconflict
880 $ printf "b" > willconflict
881 $ hg add willconflict
881 $ hg add willconflict
882 $ hg commit -m "willconflict second version"
882 $ hg commit -m "willconflict second version"
883 created new head
883 created new head
884 $ printf "dummy" > K
884 $ printf "dummy" > K
885 $ hg add K
885 $ hg add K
886 $ hg commit -m "dummy change"
886 $ hg commit -m "dummy change"
887 $ printf "dummy" > L
887 $ printf "dummy" > L
888 $ hg add L
888 $ hg add L
889 $ hg commit -m "dummy change"
889 $ hg commit -m "dummy change"
890 $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true
890 $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true
891 obsoleted 1 changesets
891 obsoleted 1 changesets
892
892
893 $ hg log -G -r 16::
893 $ hg log -G -r 16::
894 @ 21:7bdc8a87673d dummy change
894 @ 21:7bdc8a87673d dummy change
895 |
895 |
896 x 20:8b31da3c4919 dummy change
896 x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51)
897 |
897 |
898 o 19:b82fb57ea638 willconflict second version
898 o 19:b82fb57ea638 willconflict second version
899 |
899 |
900 | o 18:601db7a18f51 dummy change successor
900 | o 18:601db7a18f51 dummy change successor
901 | |
901 | |
902 | o 17:357ddf1602d5 willconflict first version
902 | o 17:357ddf1602d5 willconflict first version
903 |/
903 |/
904 o 16:61bd55f69bc4 bar foo
904 o 16:61bd55f69bc4 bar foo
905 |
905 |
906 ~
906 ~
907 $ hg rebase -r ".^^ + .^ + ." -d 18
907 $ hg rebase -r ".^^ + .^ + ." -d 18
908 rebasing 19:b82fb57ea638 "willconflict second version"
908 rebasing 19:b82fb57ea638 "willconflict second version"
909 merging willconflict
909 merging willconflict
910 warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark')
910 warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark')
911 unresolved conflicts (see hg resolve, then hg rebase --continue)
911 unresolved conflicts (see hg resolve, then hg rebase --continue)
912 [1]
912 [1]
913
913
914 $ hg resolve --mark willconflict
914 $ hg resolve --mark willconflict
915 (no more unresolved files)
915 (no more unresolved files)
916 continue: hg rebase --continue
916 continue: hg rebase --continue
917 $ hg rebase --continue
917 $ hg rebase --continue
918 rebasing 19:b82fb57ea638 "willconflict second version"
918 rebasing 19:b82fb57ea638 "willconflict second version"
919 note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor"
919 note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor"
920 rebasing 21:7bdc8a87673d "dummy change" (tip)
920 rebasing 21:7bdc8a87673d "dummy change" (tip)
921 $ cd ..
921 $ cd ..
922
922
923 Rebase merge where successor of one parent is equal to destination (issue5198)
923 Rebase merge where successor of one parent is equal to destination (issue5198)
924
924
925 $ hg init p1-succ-is-dest
925 $ hg init p1-succ-is-dest
926 $ cd p1-succ-is-dest
926 $ cd p1-succ-is-dest
927
927
928 $ hg debugdrawdag <<EOF
928 $ hg debugdrawdag <<EOF
929 > F
929 > F
930 > /|
930 > /|
931 > E D B # replace: D -> B
931 > E D B # replace: D -> B
932 > \|/
932 > \|/
933 > A
933 > A
934 > EOF
934 > EOF
935
935
936 $ hg rebase -d B -s D
936 $ hg rebase -d B -s D
937 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
937 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
938 rebasing 4:66f1a38021c9 "F" (F tip)
938 rebasing 4:66f1a38021c9 "F" (F tip)
939 $ hg log -G
939 $ hg log -G
940 o 5:50e9d60b99c6 F
940 o 5:50e9d60b99c6 F
941 |\
941 |\
942 | | x 4:66f1a38021c9 F
942 | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6)
943 | |/|
943 | |/|
944 | o | 3:7fb047a69f22 E
944 | o | 3:7fb047a69f22 E
945 | | |
945 | | |
946 | | x 2:b18e25de2cf5 D
946 | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961)
947 | |/
947 | |/
948 o | 1:112478962961 B
948 o | 1:112478962961 B
949 |/
949 |/
950 o 0:426bada5c675 A
950 o 0:426bada5c675 A
951
951
952 $ cd ..
952 $ cd ..
953
953
954 Rebase merge where successor of other parent is equal to destination
954 Rebase merge where successor of other parent is equal to destination
955
955
956 $ hg init p2-succ-is-dest
956 $ hg init p2-succ-is-dest
957 $ cd p2-succ-is-dest
957 $ cd p2-succ-is-dest
958
958
959 $ hg debugdrawdag <<EOF
959 $ hg debugdrawdag <<EOF
960 > F
960 > F
961 > /|
961 > /|
962 > E D B # replace: E -> B
962 > E D B # replace: E -> B
963 > \|/
963 > \|/
964 > A
964 > A
965 > EOF
965 > EOF
966
966
967 $ hg rebase -d B -s E
967 $ hg rebase -d B -s E
968 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
968 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
969 rebasing 4:66f1a38021c9 "F" (F tip)
969 rebasing 4:66f1a38021c9 "F" (F tip)
970 $ hg log -G
970 $ hg log -G
971 o 5:aae1787dacee F
971 o 5:aae1787dacee F
972 |\
972 |\
973 | | x 4:66f1a38021c9 F
973 | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee)
974 | |/|
974 | |/|
975 | | x 3:7fb047a69f22 E
975 | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961)
976 | | |
976 | | |
977 | o | 2:b18e25de2cf5 D
977 | o | 2:b18e25de2cf5 D
978 | |/
978 | |/
979 o / 1:112478962961 B
979 o / 1:112478962961 B
980 |/
980 |/
981 o 0:426bada5c675 A
981 o 0:426bada5c675 A
982
982
983 $ cd ..
983 $ cd ..
984
984
985 Rebase merge where successor of one parent is ancestor of destination
985 Rebase merge where successor of one parent is ancestor of destination
986
986
987 $ hg init p1-succ-in-dest
987 $ hg init p1-succ-in-dest
988 $ cd p1-succ-in-dest
988 $ cd p1-succ-in-dest
989
989
990 $ hg debugdrawdag <<EOF
990 $ hg debugdrawdag <<EOF
991 > F C
991 > F C
992 > /| |
992 > /| |
993 > E D B # replace: D -> B
993 > E D B # replace: D -> B
994 > \|/
994 > \|/
995 > A
995 > A
996 > EOF
996 > EOF
997
997
998 $ hg rebase -d C -s D
998 $ hg rebase -d C -s D
999 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
999 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
1000 rebasing 5:66f1a38021c9 "F" (F tip)
1000 rebasing 5:66f1a38021c9 "F" (F tip)
1001
1001
1002 $ hg log -G
1002 $ hg log -G
1003 o 6:0913febf6439 F
1003 o 6:0913febf6439 F
1004 |\
1004 |\
1005 +---x 5:66f1a38021c9 F
1005 +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439)
1006 | | |
1006 | | |
1007 | o | 4:26805aba1e60 C
1007 | o | 4:26805aba1e60 C
1008 | | |
1008 | | |
1009 o | | 3:7fb047a69f22 E
1009 o | | 3:7fb047a69f22 E
1010 | | |
1010 | | |
1011 +---x 2:b18e25de2cf5 D
1011 +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961)
1012 | |
1012 | |
1013 | o 1:112478962961 B
1013 | o 1:112478962961 B
1014 |/
1014 |/
1015 o 0:426bada5c675 A
1015 o 0:426bada5c675 A
1016
1016
1017 $ cd ..
1017 $ cd ..
1018
1018
1019 Rebase merge where successor of other parent is ancestor of destination
1019 Rebase merge where successor of other parent is ancestor of destination
1020
1020
1021 $ hg init p2-succ-in-dest
1021 $ hg init p2-succ-in-dest
1022 $ cd p2-succ-in-dest
1022 $ cd p2-succ-in-dest
1023
1023
1024 $ hg debugdrawdag <<EOF
1024 $ hg debugdrawdag <<EOF
1025 > F C
1025 > F C
1026 > /| |
1026 > /| |
1027 > E D B # replace: E -> B
1027 > E D B # replace: E -> B
1028 > \|/
1028 > \|/
1029 > A
1029 > A
1030 > EOF
1030 > EOF
1031
1031
1032 $ hg rebase -d C -s E
1032 $ hg rebase -d C -s E
1033 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
1033 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
1034 rebasing 5:66f1a38021c9 "F" (F tip)
1034 rebasing 5:66f1a38021c9 "F" (F tip)
1035 $ hg log -G
1035 $ hg log -G
1036 o 6:c6ab0cc6d220 F
1036 o 6:c6ab0cc6d220 F
1037 |\
1037 |\
1038 +---x 5:66f1a38021c9 F
1038 +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220)
1039 | | |
1039 | | |
1040 | o | 4:26805aba1e60 C
1040 | o | 4:26805aba1e60 C
1041 | | |
1041 | | |
1042 | | x 3:7fb047a69f22 E
1042 | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961)
1043 | | |
1043 | | |
1044 o---+ 2:b18e25de2cf5 D
1044 o---+ 2:b18e25de2cf5 D
1045 / /
1045 / /
1046 o / 1:112478962961 B
1046 o / 1:112478962961 B
1047 |/
1047 |/
1048 o 0:426bada5c675 A
1048 o 0:426bada5c675 A
1049
1049
1050 $ cd ..
1050 $ cd ..
1051
1051
1052 Rebase merge where successor of one parent is ancestor of destination
1052 Rebase merge where successor of one parent is ancestor of destination
1053
1053
1054 $ hg init p1-succ-in-dest-b
1054 $ hg init p1-succ-in-dest-b
1055 $ cd p1-succ-in-dest-b
1055 $ cd p1-succ-in-dest-b
1056
1056
1057 $ hg debugdrawdag <<EOF
1057 $ hg debugdrawdag <<EOF
1058 > F C
1058 > F C
1059 > /| |
1059 > /| |
1060 > E D B # replace: E -> B
1060 > E D B # replace: E -> B
1061 > \|/
1061 > \|/
1062 > A
1062 > A
1063 > EOF
1063 > EOF
1064
1064
1065 $ hg rebase -d C -b F
1065 $ hg rebase -d C -b F
1066 rebasing 2:b18e25de2cf5 "D" (D)
1066 rebasing 2:b18e25de2cf5 "D" (D)
1067 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
1067 note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B)
1068 rebasing 5:66f1a38021c9 "F" (F tip)
1068 rebasing 5:66f1a38021c9 "F" (F tip)
1069 note: rebase of 5:66f1a38021c9 created no changes to commit
1069 note: rebase of 5:66f1a38021c9 created no changes to commit
1070 $ hg log -G
1070 $ hg log -G
1071 o 6:8f47515dda15 D
1071 o 6:8f47515dda15 D
1072 |
1072 |
1073 | x 5:66f1a38021c9 F
1073 | x 5:66f1a38021c9 F (pruned using rebase)
1074 | |\
1074 | |\
1075 o | | 4:26805aba1e60 C
1075 o | | 4:26805aba1e60 C
1076 | | |
1076 | | |
1077 | | x 3:7fb047a69f22 E
1077 | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961)
1078 | | |
1078 | | |
1079 | x | 2:b18e25de2cf5 D
1079 | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15)
1080 | |/
1080 | |/
1081 o / 1:112478962961 B
1081 o / 1:112478962961 B
1082 |/
1082 |/
1083 o 0:426bada5c675 A
1083 o 0:426bada5c675 A
1084
1084
1085 $ cd ..
1085 $ cd ..
1086
1086
1087 Rebase merge where successor of other parent is ancestor of destination
1087 Rebase merge where successor of other parent is ancestor of destination
1088
1088
1089 $ hg init p2-succ-in-dest-b
1089 $ hg init p2-succ-in-dest-b
1090 $ cd p2-succ-in-dest-b
1090 $ cd p2-succ-in-dest-b
1091
1091
1092 $ hg debugdrawdag <<EOF
1092 $ hg debugdrawdag <<EOF
1093 > F C
1093 > F C
1094 > /| |
1094 > /| |
1095 > E D B # replace: D -> B
1095 > E D B # replace: D -> B
1096 > \|/
1096 > \|/
1097 > A
1097 > A
1098 > EOF
1098 > EOF
1099
1099
1100 $ hg rebase -d C -b F
1100 $ hg rebase -d C -b F
1101 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
1101 note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B)
1102 rebasing 3:7fb047a69f22 "E" (E)
1102 rebasing 3:7fb047a69f22 "E" (E)
1103 rebasing 5:66f1a38021c9 "F" (F tip)
1103 rebasing 5:66f1a38021c9 "F" (F tip)
1104 note: rebase of 5:66f1a38021c9 created no changes to commit
1104 note: rebase of 5:66f1a38021c9 created no changes to commit
1105
1105
1106 $ hg log -G
1106 $ hg log -G
1107 o 6:533690786a86 E
1107 o 6:533690786a86 E
1108 |
1108 |
1109 | x 5:66f1a38021c9 F
1109 | x 5:66f1a38021c9 F (pruned using rebase)
1110 | |\
1110 | |\
1111 o | | 4:26805aba1e60 C
1111 o | | 4:26805aba1e60 C
1112 | | |
1112 | | |
1113 | | x 3:7fb047a69f22 E
1113 | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86)
1114 | | |
1114 | | |
1115 | x | 2:b18e25de2cf5 D
1115 | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961)
1116 | |/
1116 | |/
1117 o / 1:112478962961 B
1117 o / 1:112478962961 B
1118 |/
1118 |/
1119 o 0:426bada5c675 A
1119 o 0:426bada5c675 A
1120
1120
1121 $ cd ..
1121 $ cd ..
1122
1122
1123 Rebase merge where both parents have successors in destination
1123 Rebase merge where both parents have successors in destination
1124
1124
1125 $ hg init p12-succ-in-dest
1125 $ hg init p12-succ-in-dest
1126 $ cd p12-succ-in-dest
1126 $ cd p12-succ-in-dest
1127 $ hg debugdrawdag <<'EOS'
1127 $ hg debugdrawdag <<'EOS'
1128 > E F
1128 > E F
1129 > /| /| # replace: A -> C
1129 > /| /| # replace: A -> C
1130 > A B C D # replace: B -> D
1130 > A B C D # replace: B -> D
1131 > | |
1131 > | |
1132 > X Y
1132 > X Y
1133 > EOS
1133 > EOS
1134 $ hg rebase -r A+B+E -d F
1134 $ hg rebase -r A+B+E -d F
1135 note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C)
1135 note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C)
1136 note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D)
1136 note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D)
1137 rebasing 7:dac5d11c5a7d "E" (E tip)
1137 rebasing 7:dac5d11c5a7d "E" (E tip)
1138 abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f
1138 abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f
1139 [255]
1139 [255]
1140 $ cd ..
1140 $ cd ..
1141
1141
1142 Rebase a non-clean merge. One parent has successor in destination, the other
1142 Rebase a non-clean merge. One parent has successor in destination, the other
1143 parent moves as requested.
1143 parent moves as requested.
1144
1144
1145 $ hg init p1-succ-p2-move
1145 $ hg init p1-succ-p2-move
1146 $ cd p1-succ-p2-move
1146 $ cd p1-succ-p2-move
1147 $ hg debugdrawdag <<'EOS'
1147 $ hg debugdrawdag <<'EOS'
1148 > D Z
1148 > D Z
1149 > /| | # replace: A -> C
1149 > /| | # replace: A -> C
1150 > A B C # D/D = D
1150 > A B C # D/D = D
1151 > EOS
1151 > EOS
1152 $ hg rebase -r A+B+D -d Z
1152 $ hg rebase -r A+B+D -d Z
1153 note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C)
1153 note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C)
1154 rebasing 1:fc2b737bb2e5 "B" (B)
1154 rebasing 1:fc2b737bb2e5 "B" (B)
1155 rebasing 3:b8ed089c80ad "D" (D)
1155 rebasing 3:b8ed089c80ad "D" (D)
1156
1156
1157 $ rm .hg/localtags
1157 $ rm .hg/localtags
1158 $ hg log -G
1158 $ hg log -G
1159 o 6:e4f78693cc88 D
1159 o 6:e4f78693cc88 D
1160 |
1160 |
1161 o 5:76840d832e98 B
1161 o 5:76840d832e98 B
1162 |
1162 |
1163 o 4:50e41c1f3950 Z
1163 o 4:50e41c1f3950 Z
1164 |
1164 |
1165 o 2:96cc3511f894 C
1165 o 2:96cc3511f894 C
1166
1166
1167 $ hg files -r tip
1167 $ hg files -r tip
1168 B
1168 B
1169 C
1169 C
1170 D
1170 D
1171 Z
1171 Z
1172
1172
1173 $ cd ..
1173 $ cd ..
1174
1174
1175 $ hg init p1-move-p2-succ
1175 $ hg init p1-move-p2-succ
1176 $ cd p1-move-p2-succ
1176 $ cd p1-move-p2-succ
1177 $ hg debugdrawdag <<'EOS'
1177 $ hg debugdrawdag <<'EOS'
1178 > D Z
1178 > D Z
1179 > /| | # replace: B -> C
1179 > /| | # replace: B -> C
1180 > A B C # D/D = D
1180 > A B C # D/D = D
1181 > EOS
1181 > EOS
1182 $ hg rebase -r B+A+D -d Z
1182 $ hg rebase -r B+A+D -d Z
1183 rebasing 0:426bada5c675 "A" (A)
1183 rebasing 0:426bada5c675 "A" (A)
1184 note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C)
1184 note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C)
1185 rebasing 3:b8ed089c80ad "D" (D)
1185 rebasing 3:b8ed089c80ad "D" (D)
1186
1186
1187 $ rm .hg/localtags
1187 $ rm .hg/localtags
1188 $ hg log -G
1188 $ hg log -G
1189 o 6:1b355ed94d82 D
1189 o 6:1b355ed94d82 D
1190 |
1190 |
1191 o 5:a81a74d764a6 A
1191 o 5:a81a74d764a6 A
1192 |
1192 |
1193 o 4:50e41c1f3950 Z
1193 o 4:50e41c1f3950 Z
1194 |
1194 |
1195 o 2:96cc3511f894 C
1195 o 2:96cc3511f894 C
1196
1196
1197 $ hg files -r tip
1197 $ hg files -r tip
1198 A
1198 A
1199 C
1199 C
1200 D
1200 D
1201 Z
1201 Z
1202
1202
1203 $ cd ..
1203 $ cd ..
1204
1204
1205 Test that bookmark is moved and working dir is updated when all changesets have
1205 Test that bookmark is moved and working dir is updated when all changesets have
1206 equivalents in destination
1206 equivalents in destination
1207 $ hg init rbsrepo && cd rbsrepo
1207 $ hg init rbsrepo && cd rbsrepo
1208 $ echo "[experimental]" > .hg/hgrc
1208 $ echo "[experimental]" > .hg/hgrc
1209 $ echo "evolution=true" >> .hg/hgrc
1209 $ echo "evolution=true" >> .hg/hgrc
1210 $ echo "rebaseskipobsolete=on" >> .hg/hgrc
1210 $ echo "rebaseskipobsolete=on" >> .hg/hgrc
1211 $ echo root > root && hg ci -Am root
1211 $ echo root > root && hg ci -Am root
1212 adding root
1212 adding root
1213 $ echo a > a && hg ci -Am a
1213 $ echo a > a && hg ci -Am a
1214 adding a
1214 adding a
1215 $ hg up 0
1215 $ hg up 0
1216 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1216 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1217 $ echo b > b && hg ci -Am b
1217 $ echo b > b && hg ci -Am b
1218 adding b
1218 adding b
1219 created new head
1219 created new head
1220 $ hg rebase -r 2 -d 1
1220 $ hg rebase -r 2 -d 1
1221 rebasing 2:1e9a3c00cbe9 "b" (tip)
1221 rebasing 2:1e9a3c00cbe9 "b" (tip)
1222 $ hg log -r . # working dir is at rev 3 (successor of 2)
1222 $ hg log -r . # working dir is at rev 3 (successor of 2)
1223 3:be1832deae9a b (no-eol)
1223 3:be1832deae9a b (no-eol)
1224 $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now
1224 $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now
1225 $ hg up 2 && hg log -r . # working dir is at rev 2 again
1225 $ hg up 2 && hg log -r . # working dir is at rev 2 again
1226 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1226 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1227 2:1e9a3c00cbe9 b (no-eol)
1227 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol)
1228 $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1
1228 $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1
1229 note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip)
1229 note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip)
1230 Check that working directory and bookmark was updated to rev 3 although rev 2
1230 Check that working directory and bookmark was updated to rev 3 although rev 2
1231 was skipped
1231 was skipped
1232 $ hg log -r .
1232 $ hg log -r .
1233 3:be1832deae9a b (no-eol)
1233 3:be1832deae9a b (no-eol)
1234 $ hg bookmarks
1234 $ hg bookmarks
1235 mybook 3:be1832deae9a
1235 mybook 3:be1832deae9a
1236 $ hg debugobsolete --rev tip
1236 $ hg debugobsolete --rev tip
1237 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
1237 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'}
1238
1238
1239 Obsoleted working parent and bookmark could be moved if an ancestor of working
1239 Obsoleted working parent and bookmark could be moved if an ancestor of working
1240 parent gets moved:
1240 parent gets moved:
1241
1241
1242 $ hg init $TESTTMP/ancestor-wd-move
1242 $ hg init $TESTTMP/ancestor-wd-move
1243 $ cd $TESTTMP/ancestor-wd-move
1243 $ cd $TESTTMP/ancestor-wd-move
1244 $ hg debugdrawdag <<'EOS'
1244 $ hg debugdrawdag <<'EOS'
1245 > E D1 # rebase: D1 -> D2
1245 > E D1 # rebase: D1 -> D2
1246 > | |
1246 > | |
1247 > | C
1247 > | C
1248 > D2 |
1248 > D2 |
1249 > | B
1249 > | B
1250 > |/
1250 > |/
1251 > A
1251 > A
1252 > EOS
1252 > EOS
1253 $ hg update D1 -q
1253 $ hg update D1 -q
1254 $ hg bookmark book -i
1254 $ hg bookmark book -i
1255 $ hg rebase -r B+D1 -d E
1255 $ hg rebase -r B+D1 -d E
1256 rebasing 1:112478962961 "B" (B)
1256 rebasing 1:112478962961 "B" (B)
1257 note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2)
1257 note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2)
1258 $ hg log -G -T '{desc} {bookmarks}'
1258 $ hg log -G -T '{desc} {bookmarks}'
1259 @ B book
1259 @ B book
1260 |
1260 |
1261 | x D1
1261 | x D1
1262 | |
1262 | |
1263 o | E
1263 o | E
1264 | |
1264 | |
1265 | o C
1265 | o C
1266 | |
1266 | |
1267 o | D2
1267 o | D2
1268 | |
1268 | |
1269 | x B
1269 | x B
1270 |/
1270 |/
1271 o A
1271 o A
1272
1272
1273 Rebasing a merge with one of its parent having a hidden successor
1273 Rebasing a merge with one of its parent having a hidden successor
1274
1274
1275 $ hg init $TESTTMP/merge-p1-hidden-successor
1275 $ hg init $TESTTMP/merge-p1-hidden-successor
1276 $ cd $TESTTMP/merge-p1-hidden-successor
1276 $ cd $TESTTMP/merge-p1-hidden-successor
1277
1277
1278 $ hg debugdrawdag <<'EOS'
1278 $ hg debugdrawdag <<'EOS'
1279 > E
1279 > E
1280 > |
1280 > |
1281 > B3 B2 # amend: B1 -> B2 -> B3
1281 > B3 B2 # amend: B1 -> B2 -> B3
1282 > |/ # B2 is hidden
1282 > |/ # B2 is hidden
1283 > | D
1283 > | D
1284 > | |\
1284 > | |\
1285 > | B1 C
1285 > | B1 C
1286 > |/
1286 > |/
1287 > A
1287 > A
1288 > EOS
1288 > EOS
1289
1289
1290 $ eval `hg tags -T '{tag}={node}\n'`
1290 $ eval `hg tags -T '{tag}={node}\n'`
1291 $ rm .hg/localtags
1291 $ rm .hg/localtags
1292
1292
1293 $ hg rebase -r $D -d $E
1293 $ hg rebase -r $D -d $E
1294 rebasing 5:9e62094e4d94 "D"
1294 rebasing 5:9e62094e4d94 "D"
1295
1295
1296 $ hg log -G
1296 $ hg log -G
1297 o 7:a699d059adcf D
1297 o 7:a699d059adcf D
1298 |\
1298 |\
1299 | o 6:ecc93090a95c E
1299 | o 6:ecc93090a95c E
1300 | |
1300 | |
1301 | o 4:0dc878468a23 B3
1301 | o 4:0dc878468a23 B3
1302 | |
1302 | |
1303 o | 1:96cc3511f894 C
1303 o | 1:96cc3511f894 C
1304 /
1304 /
1305 o 0:426bada5c675 A
1305 o 0:426bada5c675 A
1306
1306
1307 For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.),
1307 For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.),
1308 rebasestate may contain hidden hashes. "rebase --abort" should work regardless.
1308 rebasestate may contain hidden hashes. "rebase --abort" should work regardless.
1309
1309
1310 $ hg init $TESTTMP/hidden-state1
1310 $ hg init $TESTTMP/hidden-state1
1311 $ cd $TESTTMP/hidden-state1
1311 $ cd $TESTTMP/hidden-state1
1312 $ cat >> .hg/hgrc <<EOF
1312 $ cat >> .hg/hgrc <<EOF
1313 > [experimental]
1313 > [experimental]
1314 > rebaseskipobsolete=0
1314 > rebaseskipobsolete=0
1315 > EOF
1315 > EOF
1316
1316
1317 $ hg debugdrawdag <<'EOS'
1317 $ hg debugdrawdag <<'EOS'
1318 > C
1318 > C
1319 > |
1319 > |
1320 > D B # prune: B, C
1320 > D B # prune: B, C
1321 > |/ # B/D=B
1321 > |/ # B/D=B
1322 > A
1322 > A
1323 > EOS
1323 > EOS
1324
1324
1325 $ eval `hg tags -T '{tag}={node}\n'`
1325 $ eval `hg tags -T '{tag}={node}\n'`
1326 $ rm .hg/localtags
1326 $ rm .hg/localtags
1327
1327
1328 $ hg update -q $C --hidden
1328 $ hg update -q $C --hidden
1329 $ hg rebase -s $B -d $D
1329 $ hg rebase -s $B -d $D
1330 rebasing 1:2ec65233581b "B"
1330 rebasing 1:2ec65233581b "B"
1331 merging D
1331 merging D
1332 warning: conflicts while merging D! (edit, then use 'hg resolve --mark')
1332 warning: conflicts while merging D! (edit, then use 'hg resolve --mark')
1333 unresolved conflicts (see hg resolve, then hg rebase --continue)
1333 unresolved conflicts (see hg resolve, then hg rebase --continue)
1334 [1]
1334 [1]
1335
1335
1336 $ cp -R . $TESTTMP/hidden-state2
1336 $ cp -R . $TESTTMP/hidden-state2
1337
1337
1338 $ hg log -G
1338 $ hg log -G
1339 @ 2:b18e25de2cf5 D
1339 @ 2:b18e25de2cf5 D
1340 |
1340 |
1341 | @ 1:2ec65233581b B
1341 | @ 1:2ec65233581b B (pruned using prune)
1342 |/
1342 |/
1343 o 0:426bada5c675 A
1343 o 0:426bada5c675 A
1344
1344
1345 $ hg summary
1345 $ hg summary
1346 parent: 2:b18e25de2cf5 tip
1346 parent: 2:b18e25de2cf5 tip
1347 D
1347 D
1348 parent: 1:2ec65233581b (obsolete)
1348 parent: 1:2ec65233581b (obsolete)
1349 B
1349 B
1350 branch: default
1350 branch: default
1351 commit: 2 modified, 1 unknown, 1 unresolved (merge)
1351 commit: 2 modified, 1 unknown, 1 unresolved (merge)
1352 update: (current)
1352 update: (current)
1353 phases: 3 draft
1353 phases: 3 draft
1354 rebase: 0 rebased, 2 remaining (rebase --continue)
1354 rebase: 0 rebased, 2 remaining (rebase --continue)
1355
1355
1356 $ hg rebase --abort
1356 $ hg rebase --abort
1357 rebase aborted
1357 rebase aborted
1358
1358
1359 Also test --continue for the above case
1359 Also test --continue for the above case
1360
1360
1361 $ cd $TESTTMP/hidden-state2
1361 $ cd $TESTTMP/hidden-state2
1362 $ hg resolve -m
1362 $ hg resolve -m
1363 (no more unresolved files)
1363 (no more unresolved files)
1364 continue: hg rebase --continue
1364 continue: hg rebase --continue
1365 $ hg rebase --continue
1365 $ hg rebase --continue
1366 rebasing 1:2ec65233581b "B"
1366 rebasing 1:2ec65233581b "B"
1367 rebasing 3:7829726be4dc "C" (tip)
1367 rebasing 3:7829726be4dc "C" (tip)
1368 $ hg log -G
1368 $ hg log -G
1369 @ 5:1964d5d5b547 C
1369 @ 5:1964d5d5b547 C
1370 |
1370 |
1371 o 4:68deb90c12a2 B
1371 o 4:68deb90c12a2 B
1372 |
1372 |
1373 o 2:b18e25de2cf5 D
1373 o 2:b18e25de2cf5 D
1374 |
1374 |
1375 o 0:426bada5c675 A
1375 o 0:426bada5c675 A
1376
1376
General Comments 0
You need to be logged in to leave comments. Login now