##// END OF EJS Templates
smartset: split generatorset classes to avoid cycle...
smartset: split generatorset classes to avoid cycle I uncovered a cycle manifesting in a memory leak by running `hgperfrevset '::tip'`. The cycle was due to generatorset.__init__ assigning a bound method to self.__contains__. Internet sleuthing revealed that assigning a bound method to an instance attribute always creates a cycle. This commit creates two new variants of generatorset for the special cases of ascending and descending generators. The special implementations of __contains__ have been extracted to these classes where they are defined as __contains__. generatorset now implements __new__ and changes the spawned type to one of the new classes if needed. Differential Revision: https://phab.mercurial-scm.org/D1780

File last commit:

r32065:dc82c977 stable
r35517:12a46ad6 default
Show More
default-tools.rc
5 lines | 62 B | text/x-stsrc | TextLexer
Augie Fackler
debian: configure editor and pager to sensible-\1 by default...
r32065 [ui]
editor = sensible-editor
[pager]
pager = sensible-pager