bookmark: issue a single call to `allsuccessors` per loop
Update to this code was minimalist when `allsuccessors` argument were changed
from a list to a set. As this code is getting my attention again I realised we
can drastically simplify this part of the code by issue a single call to
`allsuccessors`.
--- a/mercurial/bookmarks.py Wed Oct 24 17:26:40 2012 +0200
+++ b/mercurial/bookmarks.py Wed Oct 24 17:55:21 2012 +0200
@@ -263,11 +263,8 @@
while len(validdests) != plen:
plen = len(validdests)
succs = set(c.node() for c in validdests)
- for c in validdests:
- if c.mutable():
- # obsolescence marker does not apply to public changeset
- succs.update(obsolete.allsuccessors(repo.obsstore,
- [c.node()]))
+ mutable = [c.node() for c in validdests if c.mutable()]
+ succs.update(obsolete.allsuccessors(repo.obsstore, mutable))
known = (n for n in succs if n in nm)
validdests = set(repo.set('%ln::', known))
validdests.remove(old)