evolve: provide cache to successorssets() in _possibledestination()
Since we're using obsutil.successorssets() in a loop, it may help performance
to have cache.
--- a/hgext3rd/evolve/evolvecmd.py Sun Mar 29 17:41:48 2020 +0700
+++ b/hgext3rd/evolve/evolvecmd.py Wed Apr 29 00:28:15 2020 +0800
@@ -1198,11 +1198,12 @@
torev = repo.changelog.rev
dest = set()
tovisit = list(parents(rev))
+ cache = {}
while tovisit:
r = tovisit.pop()
if r == -1:
continue
- succsets = obsutil.successorssets(repo, tonode(r))
+ succsets = obsutil.successorssets(repo, tonode(r), cache=cache)
if not succsets:
tovisit.extend(parents(r))
else: