hgext/histedit.py
changeset 18165 0f5a0a2073a8
parent 17922 7f5dab94e48c
child 18270 48deb483a8f8
--- a/hgext/histedit.py	Mon Dec 31 17:45:52 2012 -0600
+++ b/hgext/histedit.py	Mon Dec 31 17:46:22 2012 -0600
@@ -593,7 +593,8 @@
     When keep is false, the specified set can't have children."""
     ctxs = list(repo.set('%n::%n', old, new))
     if ctxs and not keep:
-        if repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs):
+        if (not obsolete._enabled and
+            repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs)):
             raise util.Abort(_('cannot edit history that would orphan nodes'))
         root = ctxs[0] # list is already sorted by repo.set
         if not root.phase():