Show More
@@ -707,6 +707,14 b' def _forgetunknownfiles(repo, shelvectx,' | |||||
707 | toforget = (addedafter & shelveunknown) - addedbefore |
|
707 | toforget = (addedafter & shelveunknown) - addedbefore | |
708 | repo[None].forget(toforget) |
|
708 | repo[None].forget(toforget) | |
709 |
|
709 | |||
|
710 | def _finishunshelve(repo, oldtiprev, tr): | |||
|
711 | # The transaction aborting will strip all the commits for us, | |||
|
712 | # but it doesn't update the inmemory structures, so addchangegroup | |||
|
713 | # hooks still fire and try to operate on the missing commits. | |||
|
714 | # Clean up manually to prevent this. | |||
|
715 | repo.unfiltered().changelog.strip(oldtiprev, tr) | |||
|
716 | _aborttransaction(repo) | |||
|
717 | ||||
710 | @command('unshelve', |
|
718 | @command('unshelve', | |
711 | [('a', 'abort', None, |
|
719 | [('a', 'abort', None, | |
712 | _('abort an incomplete unshelve operation')), |
|
720 | _('abort an incomplete unshelve operation')), | |
@@ -846,16 +854,8 b' def _dounshelve(ui, repo, *shelved, **op' | |||||
846 | _forgetunknownfiles(repo, shelvectx, addedbefore) |
|
854 | _forgetunknownfiles(repo, shelvectx, addedbefore) | |
847 |
|
855 | |||
848 | shelvedstate.clear(repo) |
|
856 | shelvedstate.clear(repo) | |
849 |
|
857 | _finishunshelve(repo, oldtiprev, tr) | ||
850 | # The transaction aborting will strip all the commits for us, |
|
|||
851 | # but it doesn't update the inmemory structures, so addchangegroup |
|
|||
852 | # hooks still fire and try to operate on the missing commits. |
|
|||
853 | # Clean up manually to prevent this. |
|
|||
854 | repo.unfiltered().changelog.strip(oldtiprev, tr) |
|
|||
855 |
|
||||
856 | unshelvecleanup(ui, repo, basename, opts) |
|
858 | unshelvecleanup(ui, repo, basename, opts) | |
857 |
|
||||
858 | _aborttransaction(repo) |
|
|||
859 | finally: |
|
859 | finally: | |
860 | ui.quiet = oldquiet |
|
860 | ui.quiet = oldquiet | |
861 | if tr: |
|
861 | if tr: |
General Comments 0
You need to be logged in to leave comments.
Login now