hgext/evolve.py
changeset 1415 aaccca501ae0
parent 1414 4198e2fad6ba
child 1418 ed9a8b1ee9bd
--- a/hgext/evolve.py	Sat Jun 20 02:04:37 2015 -0700
+++ b/hgext/evolve.py	Mon Jun 22 15:04:54 2015 -0700
@@ -2087,7 +2087,7 @@
             raise util.Abort('nothing to prune')
 
         if not obsolete.isenabled(repo, obsolete.allowunstableopt):
-            if len(repo.revs("(%ld::) - %ld", revs, revs)) != 0:
+            if repo.revs("(%ld::) - %ld", revs, revs):
                 raise util.Abort(_("cannot prune in the middle of a stack"))
 
         # defines successors changesets
@@ -2583,7 +2583,7 @@
     head = repo[heads.first()]
     disallowunstable = not obsolete.isenabled(repo, obsolete.allowunstableopt)
     if disallowunstable:
-        if len(repo.revs("(%ld::) - %ld", revs, revs)) != 0:
+        if repo.revs("(%ld::) - %ld", revs, revs):
             raise util.Abort(_("cannot fold chain not ending with a head "\
                                "or with branching"))
     wlock = lock = None