changeset 6831:4f02e7f8d56c stable

evolve: check that the evolved revisions are indeed in the repo during abort Otherwise we might trigger an error while trying to access a revision that was saved into evolvestate, but wasn't yet created in the repo for whatever reason.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 23 Aug 2024 17:00:28 +0400
parents 08947ff0c019
children 9c70bdc92cdb
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Fri Jun 28 17:57:28 2024 +0400
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Aug 23 17:00:28 2024 +0400
@@ -1897,10 +1897,10 @@
         cleanup = True
         startnode = evolvestate[b'startnode']
         for old, new in evolvestate[b'replacements'].items():
-            if new:
+            if new and new in repo:
                 evolvedctx.append(repo[new])
         for temp in evolvestate[b'temprevs']:
-            if temp:
+            if temp and temp in repo:
                 evolvedctx.append(repo[temp])
         evolvedrevs = [c.rev() for c in evolvedctx]