Show More
@@ -526,13 +526,13 def unshelve(ui, repo, *shelved, **opts) | |||
|
526 | 526 | tr = repo.transaction('unshelve', report=lambda x: None) |
|
527 | 527 | oldtiprev = len(repo) |
|
528 | 528 | |
|
529 |
|
|
|
530 |
tmpwctx = |
|
|
529 | pctx = repo['.'] | |
|
530 | tmpwctx = pctx | |
|
531 | 531 | # The goal is to have a commit structure like so: |
|
532 |
# ...-> |
|
|
532 | # ...-> pctx -> tmpwctx -> shelvectx | |
|
533 | 533 | # where tmpwctx is an optional commit with the user's pending changes |
|
534 | 534 | # and shelvectx is the unshelved changes. Then we merge it all down |
|
535 |
# to the original |
|
|
535 | # to the original pctx. | |
|
536 | 536 | |
|
537 | 537 | # Store pending changes in a commit |
|
538 | 538 | m, a, r, d = repo.status()[:4] |
@@ -587,7 +587,7 def unshelve(ui, repo, *shelved, **opts) | |||
|
587 | 587 | |
|
588 | 588 | stripnodes = [repo.changelog.node(rev) |
|
589 | 589 | for rev in xrange(oldtiprev, len(repo))] |
|
590 |
shelvedstate.save(repo, basename, |
|
|
590 | shelvedstate.save(repo, basename, pctx, tmpwctx, stripnodes) | |
|
591 | 591 | |
|
592 | 592 | util.rename(repo.join('rebasestate'), |
|
593 | 593 | repo.join('unshelverebasestate')) |
@@ -602,7 +602,7 def unshelve(ui, repo, *shelved, **opts) | |||
|
602 | 602 | # rebase was a no-op, so it produced no child commit |
|
603 | 603 | shelvectx = tmpwctx |
|
604 | 604 | |
|
605 |
mergefiles(ui, repo, |
|
|
605 | mergefiles(ui, repo, pctx, shelvectx) | |
|
606 | 606 | shelvedstate.clear(repo) |
|
607 | 607 | |
|
608 | 608 | # The transaction aborting will strip all the commits for us, |
General Comments 0
You need to be logged in to leave comments.
Login now