comparison mercurial/shelve.py @ 51097:ae6722dbb575

shelve: drop some weird manually stripping before transaction abort I cannot find a case where this is actually useful, so lets triggering strip in the middle of uncommitted transaction.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 24 Oct 2023 11:06:04 +0200
parents d718eddf01d9
children 54b1a3738530
comparison
equal deleted inserted replaced
51096:eba138890c64 51097:ae6722dbb575
1121 repo[None].forget(toforget) 1121 repo[None].forget(toforget)
1122 1122
1123 1123
1124 def _finishunshelve(repo, oldtiprev, tr, activebookmark): 1124 def _finishunshelve(repo, oldtiprev, tr, activebookmark):
1125 _restoreactivebookmark(repo, activebookmark) 1125 _restoreactivebookmark(repo, activebookmark)
1126 # The transaction aborting will strip all the commits for us, 1126 # We used to manually strip the commit to update inmemory structure and
1127 # but it doesn't update the inmemory structures, so addchangegroup 1127 # prevent some issue around hooks. This no longer seems to be the case, so
1128 # hooks still fire and try to operate on the missing commits. 1128 # we simply abort the transaction.
1129 # Clean up manually to prevent this.
1130 repo.unfiltered().changelog.strip(oldtiprev, tr)
1131 _aborttransaction(repo, tr) 1129 _aborttransaction(repo, tr)
1132 1130
1133 1131
1134 def _checkunshelveuntrackedproblems(ui, repo, shelvectx): 1132 def _checkunshelveuntrackedproblems(ui, repo, shelvectx):
1135 """Check potential problems which may result from working 1133 """Check potential problems which may result from working