changeset 36036: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 de0666564bde
children dce43aaaf209
files hgext/rebase.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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: