hgext/histedit.py
changeset 36409 72da480db4a5
parent 36404 6905c4ec312c
child 36413 f493829b74dd
--- a/hgext/histedit.py	Sat Feb 24 11:20:24 2018 -0800
+++ b/hgext/histedit.py	Sat Feb 24 11:04:21 2018 -0800
@@ -1356,11 +1356,12 @@
     When keep is false, the specified set can't have children."""
     ctxs = list(repo.set('%n::%n', old, new))
     if ctxs and not keep:
+        revs = [ctx.rev() for ctx in ctxs]
         if (not obsolete.isenabled(repo, obsolete.allowunstableopt) and
-            repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
+            repo.revs('(%ld::) - (%ld)', revs, revs)):
             raise error.Abort(_('can only histedit a changeset together '
                                 'with all its descendants'))
-        if repo.revs('(%ld) and merge()', ctxs):
+        if repo.revs('(%ld) and merge()', revs):
             raise error.Abort(_('cannot edit history that contains merges'))
         root = ctxs[0] # list is already sorted by repo.set
         if not root.mutable():