hgext/histedit.py
changeset 17130 0a48f3d54543
parent 17129 ead4eb5b03c9
child 17131 4fb2d3d16743
--- a/hgext/histedit.py	Fri Jul 06 11:06:57 2012 -0500
+++ b/hgext/histedit.py	Fri Jul 06 11:39:02 2012 -0500
@@ -307,7 +307,11 @@
             new = repo.commit(text=message, user=oldctx.user(),
                               date=oldctx.date(), extra=oldctx.extra())
 
-        if action in ('f', 'fold'):
+        # If we're resuming a fold and we have new changes, mark the
+        # replacements and finish the fold. If not, it's more like a
+        # drop of the changesets that disappeared, and we can skip
+        # this step.
+        if action in ('f', 'fold') and (new or newchildren):
             if new:
                 tmpnodes.append(new)
             else: