# HG changeset patch # User Pierre-Yves David # Date 1412665456 25200 # Node ID 65ccc733d58eeea36e67ce2afc5fa1ce67812ef6 # Parent e74245b79901a7efc0d1cfd95f2e3939eab97030 getlogrevs: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point. diff -r e74245b79901 -r 65ccc733d58e mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Oct 08 00:55:09 2014 -0700 +++ b/mercurial/cmdutil.py Tue Oct 07 00:04:16 2014 -0700 @@ -1901,7 +1901,7 @@ revs.sort(reverse=True) if limit is not None: count = 0 - limitedrevs = revset.baseset([]) + limitedrevs = [] it = iter(revs) while count < limit: try: @@ -1909,7 +1909,7 @@ except (StopIteration): break count += 1 - revs = limitedrevs + revs = revset.baseset(limitedrevs) return revs, expr, filematcher