Mercurial > hg
diff mercurial/shelve.py @ 51100: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 |
line wrap: on
line diff
--- a/mercurial/shelve.py Thu Oct 19 05:19:55 2023 +0200 +++ b/mercurial/shelve.py Tue Oct 24 11:06:04 2023 +0200 @@ -1123,11 +1123,9 @@ def _finishunshelve(repo, oldtiprev, tr, activebookmark): _restoreactivebookmark(repo, activebookmark) - # The transaction aborting will strip all the commits for us, - # but it doesn't update the inmemory structures, so addchangegroup - # hooks still fire and try to operate on the missing commits. - # Clean up manually to prevent this. - repo.unfiltered().changelog.strip(oldtiprev, tr) + # We used to manually strip the commit to update inmemory structure and + # prevent some issue around hooks. This no longer seems to be the case, so + # we simply abort the transaction. _aborttransaction(repo, tr)