# HG changeset patch # User Sushil khanchi # Date 1576151538 -19800 # Node ID 5b5cfb9b0a0bac7d872215ef3b44312749ec29d1 # Parent 04104042c6adbed6c7c2d0d0d2ad0845ca5a46a7 evolve: remove the unnecessary condition to check empty successors set I annotated the history of this "newer == [()]" condition and found that it was added in the initial stages of evolution project (more than 8 years ago) and there is no test where we get [()] as a successor set. So looks like "if not newer" is enough to check if it is empty. I also looked into obsutil.successorssets() implementation and I don't think it would give us [()] in any case. diff -r 04104042c6ad -r 5b5cfb9b0a0b hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Tue Nov 19 14:54:13 2019 -0800 +++ b/hgext3rd/evolve/evolvecmd.py Thu Dec 12 17:22:18 2019 +0530 @@ -124,7 +124,7 @@ obs = pctx newer = obsutil.successorssets(repo, obs.node()) # search of a parent which is not killed, but also isn't the orig - while not newer or newer == [()] or newer[0][0] == orig.node(): + while not newer or newer[0][0] == orig.node(): ui.debug(b"stabilize target %s is plain dead," b" trying to stabilize on its parent\n" % obs)