Show More
@@ -358,6 +358,10 b' def checkparents(repo, state):' | |||
|
358 | 358 | raise util.Abort(_('working directory parents do not match unshelve ' |
|
359 | 359 | 'state')) |
|
360 | 360 | |
|
361 | def pathtofiles(repo, files): | |
|
362 | cwd = repo.getcwd() | |
|
363 | return [repo.pathto(f, cwd) for f in files] | |
|
364 | ||
|
361 | 365 | def unshelveabort(ui, repo, state, opts): |
|
362 | 366 | """subcommand that abort an in-progress unshelve""" |
|
363 | 367 | wlock = repo.wlock() |
@@ -372,7 +376,8 b' def unshelveabort(ui, repo, state, opts)' | |||
|
372 | 376 | revertfiles = readshelvedfiles(repo, state.name) |
|
373 | 377 | wctx = repo.parents()[0] |
|
374 | 378 | cmdutil.revert(ui, repo, wctx, [wctx.node(), nullid], |
|
375 |
* |
|
|
379 | *pathtofiles(repo, revertfiles), | |
|
380 | **{'no_backup': True}) | |
|
376 | 381 | # fix up the weird dirstate states the merge left behind |
|
377 | 382 | mf = wctx.manifest() |
|
378 | 383 | dirstate = repo.dirstate |
@@ -532,7 +537,8 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
532 | 537 | revertfiles = set(parents[1].files()).difference(ms) |
|
533 | 538 | cmdutil.revert(ui, repo, parents[1], |
|
534 | 539 | (parents[0].node(), nullid), |
|
535 |
* |
|
|
540 | *pathtofiles(repo, revertfiles), | |
|
541 | **{'no_backup': True}) | |
|
536 | 542 | raise error.InterventionRequired( |
|
537 | 543 | _("unresolved conflicts (see 'hg resolve', then " |
|
538 | 544 | "'hg unshelve --continue')")) |
@@ -540,7 +546,8 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
540 | 546 | else: |
|
541 | 547 | parent = tip.parents()[0] |
|
542 | 548 | hg.update(repo, parent.node()) |
|
543 |
cmdutil.revert(ui, repo, tip, repo.dirstate.parents(), |
|
|
549 | cmdutil.revert(ui, repo, tip, repo.dirstate.parents(), | |
|
550 | *pathtofiles(repo, tip.files()), | |
|
544 | 551 | **{'no_backup': True}) |
|
545 | 552 | |
|
546 | 553 | prevquiet = ui.quiet |
General Comments 0
You need to be logged in to leave comments.
Login now