Mercurial > hg
changeset 20720:5f8400efca0b
revset: added cached generated list to addset
This way when all the values have been generated the list can be sorted
without having to generate them all again.
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Tue, 11 Mar 2014 16:59:42 -0700 |
parents | cce8fbedc82a |
children | d642f176df52 |
files | mercurial/revset.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Mar 13 17:15:21 2014 -0700 +++ b/mercurial/revset.py Tue Mar 11 16:59:42 2014 -0700 @@ -2331,6 +2331,13 @@ self._r2 = revs2 self._iter = None self._ascending = ascending + self._genlist = None + + @util.propertycache + def _list(self): + if not self._genlist: + self._genlist = baseset(self._iterator()) + return self._genlist def _iterator(self): if not self._iter: