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