Wed, 27 Dec 2017 11:08:32 -0700 smartset: split generatorset classes to avoid cycle
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 27 Dec 2017 11:08:32 -0700] rev 35501
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
Wed, 27 Dec 2017 13:53:21 -0600 merge: raise before running mergedriver if using IMM
Phil Cohen <phillco@fb.com> [Wed, 27 Dec 2017 13:53:21 -0600] rev 35500
merge: raise before running mergedriver if using IMM Merge driver scripts run in the working copy, so disable with IMM for now. Differential Revision: https://phab.mercurial-scm.org/D1781
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip