##// END OF EJS Templates
tests: add test showing crash when shelving ghosted rename target...
Martin von Zweigbergk -
r44690:ae4d729e default
parent child Browse files
Show More
@@ -171,6 +171,8 set up some more complex changes to shel
171 171 $ hg mv b b.rename
172 172 moving b/b to b.rename/b
173 173 $ hg cp c c.copy
174 $ hg mv d ghost
175 $ rm ghost
174 176 $ hg status -C
175 177 M a/a
176 178 A b.rename/b
@@ -178,12 +180,20 set up some more complex changes to shel
178 180 A c.copy
179 181 c
180 182 R b/b
183 R d
184 ! ghost
185 d
181 186
182 187 the common case - no options or filenames
183 188
184 $ hg shelve
185 shelved as default-01
186 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
189 $ hg shelve 2>&1 | grep KeyError
190 KeyError: 'No such manifest entry.' (no-pure !)
191 raise KeyError (pure !)
192 KeyError (pure !)
193 # Get out of the broken state so later tests work
194 $ hg forget b.rename/b c.copy ghost
195 $ hg revert a/a b/b d
196 $ rm a/a.orig b.rename/b c.copy
187 197 $ hg status -C
188 198
189 199 ensure that our shelved changes exist
@@ -254,6 +264,7 removed, even though there are more than
254 264 A c.copy
255 265 c
256 266 R b/b
267 R d
257 268 $ hg shelve -l
258 269
259 270 (both of default.hg and default-1.hg should be still kept, because it
@@ -287,6 +298,7 named shelves, specific filenames, and "
287 298 A c.copy
288 299 c
289 300 R b/b
301 R d
290 302 $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a
291 303 wat
292 304
@@ -306,6 +318,7 expect "a" to no longer be present, but
306 318 A c.copy
307 319 c
308 320 R b/b
321 R d
309 322 $ hg shelve -l --stat
310 323 wibble (*) wat (glob)
311 324 a/a | 1 +
@@ -323,6 +336,7 and now "a/a" should reappear
323 336 A c.copy
324 337 c
325 338 R b/b
339 R d
326 340
327 341 ensure old shelve backups are being deleted automatically
328 342
@@ -363,6 +377,7 force a conflicted merge to occur
363 377 M b.rename/b
364 378 M c.copy
365 379 R b/b
380 R d
366 381 ? a/a.orig
367 382 # The repository is in an unfinished *unshelve* state.
368 383
@@ -381,10 +396,10 ensure that we have a merge with unresol
381 396 #if phasebased
382 397 $ hg heads -q --template '{rev}\n'
383 398 8
384 5
399 6
385 400 $ hg parents -q --template '{rev}\n'
386 401 8
387 5
402 6
388 403 #endif
389 404
390 405 #if stripbased
@@ -401,6 +416,7 ensure that we have a merge with unresol
401 416 M b.rename/b
402 417 M c.copy
403 418 R b/b
419 R d
404 420 ? a/a.orig
405 421 $ hg diff
406 422 diff --git a/a/a b/a/a
@@ -412,13 +428,19 ensure that we have a merge with unresol
412 428 c
413 429 +=======
414 430 +a
415 +>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch
431 +>>>>>>> working-copy: 203c9f771d2b - shelve: changes to: [mq]: second.patch
416 432 diff --git a/b/b b/b.rename/b
417 433 rename from b/b
418 434 rename to b.rename/b
419 435 diff --git a/c b/c.copy
420 436 copy from c
421 437 copy to c.copy
438 diff --git a/d b/d
439 deleted file mode 100644
440 --- a/d
441 +++ /dev/null
442 @@ -1,1 +0,0 @@
443 -d
422 444 $ hg resolve -l
423 445 U a/a
424 446
@@ -434,6 +456,7 abort the unshelve and be happy
434 456 M b.rename/b
435 457 M c.copy
436 458 R b/b
459 R d
437 460 ? a/a.orig
438 461 $ hg unshelve -a
439 462 unshelve of 'default' aborted
@@ -512,6 +535,7 ensure the repo is as we hope
512 535 c
513 536 A foo/foo
514 537 R b/b
538 R d
515 539 ? a/a.orig
516 540
517 541 there should be no shelves left
General Comments 0
You need to be logged in to leave comments. Login now