comparison tests/test-stabilize-result.t @ 742:760d01a549a6

amend: use core mechanism for amend Evolve used its own code for amending. This was introduced before mercurial includes commit --amend. The evolve code is now older and buggier. So we just use the core cod when amend is called. Message of the temporary commit is different, all test hash changed \o/. Test change are been carefully checked.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 16 Oct 2013 00:37:29 +0200
parents 06cd220141ba
children af74a5cdf96b
comparison
equal deleted inserted replaced
741:892a6d708c8f 742:760d01a549a6
29 $ hg amend -m changea 29 $ hg amend -m changea
30 1 new unstable changesets 30 1 new unstable changesets
31 $ hg evolve -v 31 $ hg evolve -v
32 move:[2] changea 32 move:[2] changea
33 atop:[4] changea 33 atop:[4] changea
34 hg rebase -r cce2c55b8965 -d 1447e1c4828d 34 hg rebase -r cce2c55b8965 -d fb9d051ec0a4
35 resolving manifests 35 resolving manifests
36 $ glog --hidden 36 $ glog --hidden
37 @ 4:1447e1c4828d@default(draft) bk:[changea] changea 37 @ 4:fb9d051ec0a4@default(draft) bk:[changea] changea
38 | 38 |
39 | x 3:41ad4fe8c795@default(draft) bk:[] amends 102a90ea7b4a3361e4082ed620918c261189a36a 39 | x 3:c5727dbded3c@default(draft) bk:[] temporary amend commit for 102a90ea7b4a
40 | | 40 | |
41 | | x 2:cce2c55b8965@default(draft) bk:[] changea 41 | | x 2:cce2c55b8965@default(draft) bk:[] changea
42 | |/ 42 | |/
43 | x 1:102a90ea7b4a@default(draft) bk:[] addb 43 | x 1:102a90ea7b4a@default(draft) bk:[] addb
44 |/ 44 |/
45 o 0:07f494440405@default(draft) bk:[] adda 45 o 0:07f494440405@default(draft) bk:[] adda
46 46
47 $ hg debugobsolete 47 $ hg debugobsolete
48 102a90ea7b4a3361e4082ed620918c261189a36a 1447e1c4828d2347df8f858aa041305fa4cf7db1 0 {'date': '* *', 'user': 'test'} (glob) 48 102a90ea7b4a3361e4082ed620918c261189a36a fb9d051ec0a450a4aa2ffc8c324979832ef88065 0 {'date': '* *', 'user': 'test'} (glob)
49 41ad4fe8c79565a06c89f032ef0937b3cbd68a04 0 {'date': '* *', 'user': 'test'} (glob) 49 c5727dbded3c3a6877cf60d6bb552a76812cb844 0 {'date': '* *', 'user': 'test'} (glob)
50 cce2c55b896511e0b6e04173c9450ba822ebc740 0 {'date': '* *', 'user': 'test'} (glob) 50 cce2c55b896511e0b6e04173c9450ba822ebc740 0 {'date': '* *', 'user': 'test'} (glob)
51 51
52 Test evolve with conflict 52 Test evolve with conflict
53 53
54 $ ls 54 $ ls
79 fix conflict and run "hg evolve --continue" 79 fix conflict and run "hg evolve --continue"
80 abort: unresolved merge conflicts (see hg help resolve) 80 abort: unresolved merge conflicts (see hg help resolve)
81 [255] 81 [255]
82 $ hg revert -r 'unstable()' a 82 $ hg revert -r 'unstable()' a
83 $ hg diff 83 $ hg diff
84 diff -r e8cc1b534401 a 84 diff -r 66719795a494 a
85 --- a/a * (glob) 85 --- a/a * (glob)
86 +++ b/a * (glob) 86 +++ b/a * (glob)
87 @@ -1,1 +1,3 @@ 87 @@ -1,1 +1,3 @@
88 a 88 a
89 +a 89 +a
100 ================================================== 100 ==================================================
101 101
102 (the same parent case is handled in test-evolve.t) 102 (the same parent case is handled in test-evolve.t)
103 103
104 $ glog 104 $ glog
105 @ 8:e3183e9c0961@default(draft) bk:[] newer a 105 @ 8:1cf0aacfd363@default(draft) bk:[] newer a
106 | 106 |
107 o 7:e8cc1b534401@default(draft) bk:[changea] changea 107 o 7:66719795a494@default(draft) bk:[changea] changea
108 | 108 |
109 o 0:07f494440405@default(draft) bk:[] adda 109 o 0:07f494440405@default(draft) bk:[] adda
110 110
111 Add another commit 111 Add another commit
112 112
130 Make precursors public 130 Make precursors public
131 131
132 $ hg phase --hidden --public 8 132 $ hg phase --hidden --public 8
133 1 new bumped changesets 133 1 new bumped changesets
134 $ glog 134 $ glog
135 @ 12:15c83af6f3a3@default(draft) bk:[] newer a 135 @ 12:73b15c7566e9@default(draft) bk:[] newer a
136 | 136 |
137 o 9:355c5cda4de1@default(draft) bk:[] add c 137 o 9:7bc2f5967f5e@default(draft) bk:[] add c
138 | 138 |
139 | o 8:e3183e9c0961@default(public) bk:[] newer a 139 | o 8:1cf0aacfd363@default(public) bk:[] newer a
140 |/ 140 |/
141 o 7:e8cc1b534401@default(public) bk:[changea] changea 141 o 7:66719795a494@default(public) bk:[changea] changea
142 | 142 |
143 o 0:07f494440405@default(public) bk:[] adda 143 o 0:07f494440405@default(public) bk:[] adda
144 144
145 145
146 Stabilize ! 146 Stabilize !
147 147
148 $ hg evolve --any --dry-run 148 $ hg evolve --any --dry-run
149 recreate:[12] newer a 149 recreate:[12] newer a
150 atop:[8] newer a 150 atop:[8] newer a
151 hg rebase --rev 15c83af6f3a3 --dest e8cc1b534401; 151 hg rebase --rev 73b15c7566e9 --dest 66719795a494;
152 hg update e3183e9c0961; 152 hg update 1cf0aacfd363;
153 hg revert --all --rev 15c83af6f3a3; 153 hg revert --all --rev 73b15c7566e9;
154 hg commit --msg "bumped update to %s" (no-eol) 154 hg commit --msg "bumped update to %s" (no-eol)
155 $ hg evolve --any 155 $ hg evolve --any
156 recreate:[12] newer a 156 recreate:[12] newer a
157 atop:[8] newer a 157 atop:[8] newer a
158 rebasing to destination parent: e8cc1b534401 158 rebasing to destination parent: 66719795a494
159 computing new diff 159 computing new diff
160 commited as 503ef784bae6 160 commited as a7cabd7bd9c2
161 $ glog 161 $ glog
162 @ 14:503ef784bae6@default(draft) bk:[] bumped update to e3183e9c0961: 162 @ 14:a7cabd7bd9c2@default(draft) bk:[] bumped update to 1cf0aacfd363:
163 | 163 |
164 | o 9:355c5cda4de1@default(draft) bk:[] add c 164 | o 9:7bc2f5967f5e@default(draft) bk:[] add c
165 | | 165 | |
166 o | 8:e3183e9c0961@default(public) bk:[] newer a 166 o | 8:1cf0aacfd363@default(public) bk:[] newer a
167 |/ 167 |/
168 o 7:e8cc1b534401@default(public) bk:[changea] changea 168 o 7:66719795a494@default(public) bk:[changea] changea
169 | 169 |
170 o 0:07f494440405@default(public) bk:[] adda 170 o 0:07f494440405@default(public) bk:[] adda
171 171
172 172
173 Stabilize conflicting changesets with same parent 173 Stabilize conflicting changesets with same parent
184 > less 184 > less
185 > conflict 185 > conflict
186 > EOF 186 > EOF
187 $ hg ci -m 'More addition' 187 $ hg ci -m 'More addition'
188 $ glog 188 $ glog
189 @ 15:7391601a4bfa@default(draft) bk:[] More addition 189 @ 15:3932c176bbaa@default(draft) bk:[] More addition
190 | 190 |
191 | o 14:503ef784bae6@default(draft) bk:[] bumped update to e3183e9c0961: 191 | o 14:a7cabd7bd9c2@default(draft) bk:[] bumped update to 1cf0aacfd363:
192 | | 192 | |
193 o | 9:355c5cda4de1@default(draft) bk:[] add c 193 o | 9:7bc2f5967f5e@default(draft) bk:[] add c
194 | | 194 | |
195 | o 8:e3183e9c0961@default(public) bk:[] newer a 195 | o 8:1cf0aacfd363@default(public) bk:[] newer a
196 |/ 196 |/
197 o 7:e8cc1b534401@default(public) bk:[changea] changea 197 o 7:66719795a494@default(public) bk:[changea] changea
198 | 198 |
199 o 0:07f494440405@default(public) bk:[] adda 199 o 0:07f494440405@default(public) bk:[] adda
200 200
201 $ echo 'babar' >> a 201 $ echo 'babar' >> a
202 $ hg amend 202 $ hg amend
208 $ cat a.old >> a 208 $ cat a.old >> a
209 $ rm a.old 209 $ rm a.old
210 $ hg amend 210 $ hg amend
211 2 new divergent changesets 211 2 new divergent changesets
212 $ glog 212 $ glog
213 @ 19:3883461cc228@default(draft) bk:[] More addition 213 @ 19:eacc9c8240fe@default(draft) bk:[] More addition
214 | 214 |
215 | o 17:4754d61bc2db@default(draft) bk:[] More addition 215 | o 17:d2f173e25686@default(draft) bk:[] More addition
216 |/ 216 |/
217 | o 14:503ef784bae6@default(draft) bk:[] bumped update to e3183e9c0961: 217 | o 14:a7cabd7bd9c2@default(draft) bk:[] bumped update to 1cf0aacfd363:
218 | | 218 | |
219 o | 9:355c5cda4de1@default(draft) bk:[] add c 219 o | 9:7bc2f5967f5e@default(draft) bk:[] add c
220 | | 220 | |
221 | o 8:e3183e9c0961@default(public) bk:[] newer a 221 | o 8:1cf0aacfd363@default(public) bk:[] newer a
222 |/ 222 |/
223 o 7:e8cc1b534401@default(public) bk:[changea] changea 223 o 7:66719795a494@default(public) bk:[changea] changea
224 | 224 |
225 o 0:07f494440405@default(public) bk:[] adda 225 o 0:07f494440405@default(public) bk:[] adda
226 226
227 227
228 Stabilize It 228 Stabilize It
229 229
230 $ hg evolve -qn --traceback 230 $ hg evolve -qn --traceback
231 hg update -c 3883461cc228 && 231 hg update -c eacc9c8240fe &&
232 hg merge 4754d61bc2db && 232 hg merge d2f173e25686 &&
233 hg commit -m "auto merge resolving conflict between 3883461cc228 and 4754d61bc2db"&& 233 hg commit -m "auto merge resolving conflict between eacc9c8240fe and d2f173e25686"&&
234 hg up -C 7391601a4bfa && 234 hg up -C 3932c176bbaa &&
235 hg revert --all --rev tip && 235 hg revert --all --rev tip &&
236 hg commit -m "`hg log -r 3883461cc228 --template={desc}`"; 236 hg commit -m "`hg log -r eacc9c8240fe --template={desc}`";
237 $ hg evolve -v 237 $ hg evolve -v
238 merge:[19] More addition 238 merge:[19] More addition
239 with: [17] More addition 239 with: [17] More addition
240 base: [15] More addition 240 base: [15] More addition
241 merging divergent changeset 241 merging divergent changeset
242 resolving manifests 242 resolving manifests
243 merging a 243 merging a
244 0 files updated, 1 files merged, 0 files removed, 0 files unresolved 244 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
245 amending changeset eacc9c8240fe
245 a 246 a
247 copying changeset 283ccd10e2b8 to 7bc2f5967f5e
246 a 248 a
249 committed changeset 21:f344982e63c4
247 $ hg st 250 $ hg st
248 $ hg amend -d '0 0' -m 'More addition' # kill date variation XXX should be done in evolve 251 $ glog
249 $ glog 252 @ 21:f344982e63c4@default(draft) bk:[] More addition
250 @ 22:ac6d600735a4@default(draft) bk:[] More addition 253 |
251 | 254 | o 14:a7cabd7bd9c2@default(draft) bk:[] bumped update to 1cf0aacfd363:
252 | o 14:503ef784bae6@default(draft) bk:[] bumped update to e3183e9c0961: 255 | |
253 | | 256 o | 9:7bc2f5967f5e@default(draft) bk:[] add c
254 o | 9:355c5cda4de1@default(draft) bk:[] add c 257 | |
255 | | 258 | o 8:1cf0aacfd363@default(public) bk:[] newer a
256 | o 8:e3183e9c0961@default(public) bk:[] newer a 259 |/
257 |/ 260 o 7:66719795a494@default(public) bk:[changea] changea
258 o 7:e8cc1b534401@default(public) bk:[changea] changea
259 | 261 |
260 o 0:07f494440405@default(public) bk:[] adda 262 o 0:07f494440405@default(public) bk:[] adda
261 263
262 $ hg summary 264 $ hg summary
263 parent: 22:ac6d600735a4 tip 265 parent: 21:f344982e63c4 tip
264 More addition 266 More addition
265 branch: default 267 branch: default
266 commit: (clean) 268 commit: (clean)
267 update: 2 new changesets, 2 branch heads (merge) 269 update: 2 new changesets, 2 branch heads (merge)
268 $ hg export . 270 $ hg export .
269 # HG changeset patch 271 # HG changeset patch
270 # User test 272 # User test
271 # Date 0 0 273 # Date 0 0
272 # Thu Jan 01 00:00:00 1970 +0000 274 # Thu Jan 01 00:00:00 1970 +0000
273 # Node ID ac6d600735a49ee377e29d1f74a0576e8c972e7b 275 # Node ID f344982e63c462b1e44c0371c804685389e673a9
274 # Parent 355c5cda4de162658ed9f961a98a73a10b3167b1 276 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
275 More addition 277 More addition
276 278
277 diff -r 355c5cda4de1 -r ac6d600735a4 a 279 diff -r 7bc2f5967f5e -r f344982e63c4 a
278 --- a/a Thu Jan 01 00:00:00 1970 +0000 280 --- a/a Thu Jan 01 00:00:00 1970 +0000
279 +++ b/a Thu Jan 01 00:00:00 1970 +0000 281 +++ b/a Thu Jan 01 00:00:00 1970 +0000
280 @@ -1,1 +1,9 @@ 282 @@ -1,1 +1,9 @@
281 +jungle 283 +jungle
282 a 284 a
296 Working directory parent is obsolete 298 Working directory parent is obsolete
297 $ echo 'gotta break' >> a 299 $ echo 'gotta break' >> a
298 $ hg amend 300 $ hg amend
299 2 new divergent changesets 301 2 new divergent changesets
300 $ hg phase 'divergent()' 302 $ hg phase 'divergent()'
301 22: draft 303 21: draft
302 24: draft 304 23: draft
303 $ hg evolve -qn 305 $ hg evolve -qn
304 hg update -c c956a4b140b6 && 306 hg update -c 36e188246d67 &&
305 hg merge ac6d600735a4 && 307 hg merge f344982e63c4 &&
306 hg commit -m "auto merge resolving conflict between c956a4b140b6 and ac6d600735a4"&& 308 hg commit -m "auto merge resolving conflict between 36e188246d67 and f344982e63c4"&&
307 hg up -C 7391601a4bfa && 309 hg up -C 3932c176bbaa &&
308 hg revert --all --rev tip && 310 hg revert --all --rev tip &&
309 hg commit -m "`hg log -r c956a4b140b6 --template={desc}`"; 311 hg commit -m "`hg log -r 36e188246d67 --template={desc}`";
310 $ hg evolve 312 $ hg evolve
311 merge:[24] More addition 313 merge:[23] More addition
312 with: [22] More addition 314 with: [21] More addition
313 base: [15] More addition 315 base: [15] More addition
314 merging a 316 merging a
315 warning: conflicts during merge. 317 warning: conflicts during merge.
316 merging a incomplete! (edit conflicts, then use 'hg resolve --mark') 318 merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
317 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 319 0 files updated, 0 files merged, 0 files removed, 1 files unresolved