Mercurial > evolve
changeset 5012:5b5cfb9b0a0b
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.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Thu, 12 Dec 2019 17:22:18 +0530 |
parents | 04104042c6ad |
children | 18fe83bf7b14 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)