diff hgext/histedit.py @ 25894:54f9561088c7 stable

histedit: backout ebb5bb9bc32e The faulty changeset use obsolescence marker to roll the repository back on --abort. This is a problematic approach because --abort should be as close as an actually transaction rollback as possible stripping all created data from the repository (cf `hg rebase --abort` stripping all created changesets). Instead ebb5bb9bc32e made all content created during the aborted histedit still available in the repository adding obsolescence marker to make them hidden. This will cause trouble to evolution user as a re-run of the same histedit (with success) will likely result in the very same node to be "recreated" while obsolescence marker would be in place for them. And canceling an obsoletion is still a fairly complicated process. This also rollback using obsmarkers instead of strip to clean up temporary node on successful histedit run because the two change were not split in separated changeset. Rolling that part back does not have significant consequence a will have to be resubmitted independently
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 31 Jul 2015 15:11:07 -0700
parents 8e77e8338cae
children 4dcc9b5d786a
line wrap: on
line diff
--- a/hgext/histedit.py	Fri Jul 31 11:56:28 2015 -0500
+++ b/hgext/histedit.py	Fri Jul 31 15:11:07 2015 -0700
@@ -798,13 +798,8 @@
                 break
         else:
             pass
-        if supportsmarkers:
-            obsolete.createmarkers(repo,
-                                   ((repo[t],()) for t in sorted(tmpnodes)))
-            obsolete.createmarkers(repo, ((repo[t],()) for t in sorted(leafs)))
-        else:
-            cleanupnode(ui, repo, 'created', tmpnodes)
-            cleanupnode(ui, repo, 'temp', leafs)
+        cleanupnode(ui, repo, 'created', tmpnodes)
+        cleanupnode(ui, repo, 'temp', leafs)
         state.clear()
         return
     else:
@@ -899,10 +894,8 @@
                 obsolete.createmarkers(repo, markers)
         else:
             cleanupnode(ui, repo, 'replaced', mapping)
-    if supportsmarkers:
-        obsolete.createmarkers(repo, ((repo[t],()) for t in sorted(tmpnodes)))
-    else:
-        cleanupnode(ui, repo, 'temp', tmpnodes)
+
+    cleanupnode(ui, repo, 'temp', tmpnodes)
     state.clear()
     if os.path.exists(repo.sjoin('undo')):
         os.unlink(repo.sjoin('undo'))