shelve: drop some weird manually stripping before transaction abort
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 24 Oct 2023 11:06:04 +0200
changeset 51100 ae6722dbb575
parent 51099 eba138890c64
child 51101 045b5f745f93
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.
mercurial/shelve.py
--- 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)