Mercurial > evolve
changeset 5264:6d0d9ba04a1d
evolve: provide cache to successorssets() in _possibledestination()
Since we're using obsutil.successorssets() in a loop, it may help performance
to have cache.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 29 Apr 2020 00:28:15 +0800 |
parents | 9923c6d6f0a8 |
children | 77a77d0f5441 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: