Mercurial > hg
diff hgext/rebase.py @ 35997:24f05489377b
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.
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Sat, 10 Feb 2018 19:33:19 +0100 |
parents | b7e2cf114e85 |
children | 6eb7d95f8970 |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Feb 10 21:14:41 2018 +0900 +++ b/hgext/rebase.py Sat Feb 10 19:33:19 2018 +0100 @@ -1805,10 +1805,10 @@ 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: