# HG changeset patch # User Denis Laxalde # Date 2018-02-10 18:33:19 # Node ID 24f05489377b8c38a58325bc6f229a3bd698e1ac # Parent de0666564bde7c67c4d40a44dcf50515fef2f367 rebase: make "successors" a set in _computeobsoletenotrebased() There's no apparent reason for this variable to be a list and this avoids converting it to a set when needed. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1805,10 +1805,10 @@ def _computeobsoletenotrebased(repo, reb srcnode = cl.node(srcrev) destnode = cl.node(destmap[srcrev]) # XXX: more advanced APIs are required to handle split correctly - successors = list(obsutil.allsuccessors(repo.obsstore, [srcnode])) + successors = set(obsutil.allsuccessors(repo.obsstore, [srcnode])) # obsutil.allsuccessors includes node itself successors.remove(srcnode) - if set(successors).issubset(extinctnodes): + if successors.issubset(extinctnodes): # all successors are extinct obsoleteextinctsuccessors.add(srcrev) if not successors: