Mon, 27 Aug 2018 13:30:08 +0300 tests: add test to show widening is broken without ellipsis
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 27 Aug 2018 13:30:08 +0300] rev 39355
tests: add test to show widening is broken without ellipsis This patch adds a test to show that widening a narrow clone is broken if ellipsis is disabled. I don't think I can add cases to existing test-narrow-widen.t and check-in a failing version of that. So I created a copy. Once the test is fixed, we can merge this new test file back into the original one using testcases. Also, this is just testing treemanifest case because having two cases and both or are failing with different outputs is a bit hard to manage. This is important because upcoming patches will try to fix the broken part. Differential Revision: https://phab.mercurial-scm.org/D4382
Mon, 27 Aug 2018 09:05:56 -0700 stringutil: emit multiple chunks when pretty printing
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 27 Aug 2018 09:05:56 -0700] rev 39354
stringutil: emit multiple chunks when pretty printing This avoids concatenating output inside pprintgen() itself. But the real reason for this is it will make it easier to add indentation, as we'll need to account for indentation when emitting each individual object in a collection. The verbosity of this code compared to the original is a bit unfortunate. But I suppose this is the price to pay for having nice things (streaming and indenting). We could probably abstract the "print a collection" bits into a generic function to avoid some duplication. But I'm not overly inclined to do this. Differential Revision: https://phab.mercurial-scm.org/D4398
Mon, 27 Aug 2018 09:02:39 -0700 stringutil: refactor core of pprint so it emits chunks
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 27 Aug 2018 09:02:39 -0700] rev 39353
stringutil: refactor core of pprint so it emits chunks This commit splits the core of pprint() to a new function that is a generator of chunks instead of a function returning a single value. This will make it possible to stream output without waiting for all data to be formatted first. And it will make it easier to implement support for indenting. Differential Revision: https://phab.mercurial-scm.org/D4397
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip