Show More
@@ -517,6 +517,7 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
517 | if not shelvedfile(repo, basename, 'files').exists(): |
|
517 | if not shelvedfile(repo, basename, 'files').exists(): | |
518 | raise util.Abort(_("shelved change '%s' not found") % basename) |
|
518 | raise util.Abort(_("shelved change '%s' not found") % basename) | |
519 |
|
519 | |||
|
520 | oldquiet = ui.quiet | |||
520 | wlock = lock = tr = None |
|
521 | wlock = lock = tr = None | |
521 | try: |
|
522 | try: | |
522 | lock = repo.lock() |
|
523 | lock = repo.lock() | |
@@ -550,15 +551,12 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
550 |
|
551 | |||
551 | tempopts = {} |
|
552 | tempopts = {} | |
552 | tempopts['message'] = "pending changes temporary commit" |
|
553 | tempopts['message'] = "pending changes temporary commit" | |
553 |
|
|
554 | ui.quiet = True | |
554 | try: |
|
555 | node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) | |
555 | ui.quiet = True |
|
|||
556 | node = cmdutil.commit(ui, repo, commitfunc, [], tempopts) |
|
|||
557 | finally: |
|
|||
558 | ui.quiet = oldquiet |
|
|||
559 | tmpwctx = repo[node] |
|
556 | tmpwctx = repo[node] | |
560 |
|
557 | |||
561 | try: |
|
558 | try: | |
|
559 | ui.quiet = True | |||
562 | fp = shelvedfile(repo, basename, 'hg').opener() |
|
560 | fp = shelvedfile(repo, basename, 'hg').opener() | |
563 | gen = changegroup.readbundle(fp, fp.name) |
|
561 | gen = changegroup.readbundle(fp, fp.name) | |
564 | repo.addchangegroup(gen, 'unshelve', 'bundle:' + fp.name) |
|
562 | repo.addchangegroup(gen, 'unshelve', 'bundle:' + fp.name) | |
@@ -567,6 +565,8 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
567 | finally: |
|
565 | finally: | |
568 | fp.close() |
|
566 | fp.close() | |
569 |
|
567 | |||
|
568 | ui.quiet = oldquiet | |||
|
569 | ||||
570 | shelvectx = repo['tip'] |
|
570 | shelvectx = repo['tip'] | |
571 |
|
571 | |||
572 | # If the shelve is not immediately on top of the commit |
|
572 | # If the shelve is not immediately on top of the commit | |
@@ -609,6 +609,7 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
609 |
|
609 | |||
610 | unshelvecleanup(ui, repo, basename, opts) |
|
610 | unshelvecleanup(ui, repo, basename, opts) | |
611 | finally: |
|
611 | finally: | |
|
612 | ui.quiet = oldquiet | |||
612 | if tr: |
|
613 | if tr: | |
613 | tr.release() |
|
614 | tr.release() | |
614 | lockmod.release(lock, wlock) |
|
615 | lockmod.release(lock, wlock) |
@@ -23,10 +23,6 b' shelving in an empty repo should be poss' | |||||
23 |
|
23 | |||
24 | $ hg unshelve |
|
24 | $ hg unshelve | |
25 | unshelving change 'default' |
|
25 | unshelving change 'default' | |
26 | adding changesets |
|
|||
27 | adding manifests |
|
|||
28 | adding file changes |
|
|||
29 | added 1 changesets with 5 changes to 5 files |
|
|||
30 |
|
26 | |||
31 | $ hg commit -q -m 'initial commit' |
|
27 | $ hg commit -q -m 'initial commit' | |
32 |
|
28 | |||
@@ -104,10 +100,6 b' local edits should not prevent a shelved' | |||||
104 | $ printf "z\na\n" > a/a |
|
100 | $ printf "z\na\n" > a/a | |
105 | $ hg unshelve --keep |
|
101 | $ hg unshelve --keep | |
106 | unshelving change 'default-01' |
|
102 | unshelving change 'default-01' | |
107 | adding changesets |
|
|||
108 | adding manifests |
|
|||
109 | adding file changes |
|
|||
110 | added 1 changesets with 3 changes to 8 files (+1 heads) |
|
|||
111 | merging a/a |
|
103 | merging a/a | |
112 |
|
104 | |||
113 | $ hg revert --all -q |
|
105 | $ hg revert --all -q | |
@@ -117,10 +109,6 b' apply it and make sure our state is as e' | |||||
117 |
|
109 | |||
118 | $ hg unshelve |
|
110 | $ hg unshelve | |
119 | unshelving change 'default-01' |
|
111 | unshelving change 'default-01' | |
120 | adding changesets |
|
|||
121 | adding manifests |
|
|||
122 | adding file changes |
|
|||
123 | added 1 changesets with 3 changes to 8 files |
|
|||
124 | $ hg status -C |
|
112 | $ hg status -C | |
125 | M a/a |
|
113 | M a/a | |
126 | A b.rename/b |
|
114 | A b.rename/b | |
@@ -192,10 +180,6 b' force a conflicted merge to occur' | |||||
192 |
|
180 | |||
193 | $ hg unshelve |
|
181 | $ hg unshelve | |
194 | unshelving change 'default' |
|
182 | unshelving change 'default' | |
195 | adding changesets |
|
|||
196 | adding manifests |
|
|||
197 | adding file changes |
|
|||
198 | added 1 changesets with 3 changes to 8 files (+1 heads) |
|
|||
199 | merging a/a |
|
183 | merging a/a | |
200 | warning: conflicts during merge. |
|
184 | warning: conflicts during merge. | |
201 | merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
185 | merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
@@ -379,10 +363,6 b' if we resolve a conflict while unshelvin' | |||||
379 |
|
363 | |||
380 | $ HGMERGE=true hg unshelve |
|
364 | $ HGMERGE=true hg unshelve | |
381 | unshelving change 'default' |
|
365 | unshelving change 'default' | |
382 | adding changesets |
|
|||
383 | adding manifests |
|
|||
384 | adding file changes |
|
|||
385 | added 1 changesets with 1 changes to 6 files (+1 heads) |
|
|||
386 | merging a/a |
|
366 | merging a/a | |
387 | $ hg parents -q |
|
367 | $ hg parents -q | |
388 | 4:33f7f61e6c5e |
|
368 | 4:33f7f61e6c5e | |
@@ -403,10 +383,6 b' test keep and cleanup' | |||||
403 | default (*) changes to 'create conflict' (glob) |
|
383 | default (*) changes to 'create conflict' (glob) | |
404 | $ hg unshelve --keep |
|
384 | $ hg unshelve --keep | |
405 | unshelving change 'default' |
|
385 | unshelving change 'default' | |
406 | adding changesets |
|
|||
407 | adding manifests |
|
|||
408 | adding file changes |
|
|||
409 | added 1 changesets with 1 changes to 7 files |
|
|||
410 | $ hg shelve --list |
|
386 | $ hg shelve --list | |
411 | default (*) changes to 'create conflict' (glob) |
|
387 | default (*) changes to 'create conflict' (glob) | |
412 | $ hg shelve --cleanup |
|
388 | $ hg shelve --cleanup | |
@@ -424,10 +400,6 b' test bookmarks' | |||||
424 | * test 4:33f7f61e6c5e |
|
400 | * test 4:33f7f61e6c5e | |
425 | $ hg unshelve |
|
401 | $ hg unshelve | |
426 | unshelving change 'test' |
|
402 | unshelving change 'test' | |
427 | adding changesets |
|
|||
428 | adding manifests |
|
|||
429 | adding file changes |
|
|||
430 | added 1 changesets with 1 changes to 7 files |
|
|||
431 | $ hg bookmark |
|
403 | $ hg bookmark | |
432 | * test 4:33f7f61e6c5e |
|
404 | * test 4:33f7f61e6c5e | |
433 |
|
405 | |||
@@ -440,10 +412,6 b' shelve should still work even if mq is d' | |||||
440 | test (*) changes to 'create conflict' (glob) |
|
412 | test (*) changes to 'create conflict' (glob) | |
441 | $ hg --config extensions.mq=! unshelve |
|
413 | $ hg --config extensions.mq=! unshelve | |
442 | unshelving change 'test' |
|
414 | unshelving change 'test' | |
443 | adding changesets |
|
|||
444 | adding manifests |
|
|||
445 | adding file changes |
|
|||
446 | added 1 changesets with 1 changes to 7 files |
|
|||
447 |
|
415 | |||
448 | shelve should leave dirstate clean (issue 4055) |
|
416 | shelve should leave dirstate clean (issue 4055) | |
449 |
|
417 | |||
@@ -468,10 +436,6 b' shelve should leave dirstate clean (issu' | |||||
468 | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob) |
|
436 | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob) | |
469 | $ hg unshelve |
|
437 | $ hg unshelve | |
470 | unshelving change 'default' |
|
438 | unshelving change 'default' | |
471 | adding changesets |
|
|||
472 | adding manifests |
|
|||
473 | adding file changes |
|
|||
474 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
|||
475 | $ hg status |
|
439 | $ hg status | |
476 | M z |
|
440 | M z | |
477 |
|
441 | |||
@@ -497,10 +461,6 b' shelve should only unshelve pending chan' | |||||
497 | $ hg up -q 1 |
|
461 | $ hg up -q 1 | |
498 | $ hg unshelve |
|
462 | $ hg unshelve | |
499 | unshelving change 'default' |
|
463 | unshelving change 'default' | |
500 | adding changesets |
|
|||
501 | adding manifests |
|
|||
502 | adding file changes |
|
|||
503 | added 1 changesets with 1 changes to 3 files |
|
|||
504 | $ hg status |
|
464 | $ hg status | |
505 | A d |
|
465 | A d | |
506 |
|
466 | |||
@@ -513,10 +473,6 b' unshelve should work on an ancestor of t' | |||||
513 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
473 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
514 | $ hg unshelve |
|
474 | $ hg unshelve | |
515 | unshelving change 'default' |
|
475 | unshelving change 'default' | |
516 | adding changesets |
|
|||
517 | adding manifests |
|
|||
518 | adding file changes |
|
|||
519 | added 1 changesets with 1 changes to 3 files |
|
|||
520 | $ hg status |
|
476 | $ hg status | |
521 | A d |
|
477 | A d | |
522 |
|
478 | |||
@@ -534,10 +490,6 b' test bug 4073 we need to enable obsolete' | |||||
534 | $ hg debugobsolete `hg --debug id -i -r 1` |
|
490 | $ hg debugobsolete `hg --debug id -i -r 1` | |
535 | $ hg unshelve |
|
491 | $ hg unshelve | |
536 | unshelving change 'default' |
|
492 | unshelving change 'default' | |
537 | adding changesets |
|
|||
538 | adding manifests |
|
|||
539 | adding file changes |
|
|||
540 | added 1 changesets with 1 changes to 2 files (+1 heads) |
|
|||
541 |
|
493 | |||
542 | unshelve should leave unknown files alone (issue4113) |
|
494 | unshelve should leave unknown files alone (issue4113) | |
543 |
|
495 | |||
@@ -549,10 +501,6 b' unshelve should leave unknown files alon' | |||||
549 | ? e |
|
501 | ? e | |
550 | $ hg unshelve |
|
502 | $ hg unshelve | |
551 | unshelving change 'default' |
|
503 | unshelving change 'default' | |
552 | adding changesets |
|
|||
553 | adding manifests |
|
|||
554 | adding file changes |
|
|||
555 | added 1 changesets with 1 changes to 2 files (+1 heads) |
|
|||
556 | $ hg status |
|
504 | $ hg status | |
557 | A d |
|
505 | A d | |
558 | ? e |
|
506 | ? e | |
@@ -568,10 +516,6 b' unshelve should keep a copy of unknown f' | |||||
568 | $ echo z > e |
|
516 | $ echo z > e | |
569 | $ hg unshelve |
|
517 | $ hg unshelve | |
570 | unshelving change 'default' |
|
518 | unshelving change 'default' | |
571 | adding changesets |
|
|||
572 | adding manifests |
|
|||
573 | adding file changes |
|
|||
574 | added 1 changesets with 2 changes to 3 files (+1 heads) |
|
|||
575 | $ cat e |
|
519 | $ cat e | |
576 | e |
|
520 | e | |
577 | $ cat e.orig |
|
521 | $ cat e.orig |
General Comments 0
You need to be logged in to leave comments.
Login now