[PATCH 1 of 3 V4] mdiff: add a "blocksinrange" function to filter diff blocks by line range

Yuya Nishihara yuya at tcha.org
Sat Jan 7 05:18:51 EST 2017


On Wed, 04 Jan 2017 17:03:47 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1483463758 -3600
> #      Tue Jan 03 18:15:58 2017 +0100
> # Node ID 7f94fa66ee380f223e4790129ff3bd03884b4a26
> # Parent  342d0cb4f446826169a83a6e773f1c767e0c977b
> # EXP-Topic linerange-log/revset
> mdiff: add a "blocksinrange" function to filter diff blocks by line range
> 
> The function filters diff blocks as generated by mdiff.allblock function based
> on whether they are contained in a given line range based on the "b-side" of
> blocks.

I scanned this quickly and looked good. Also, foozy said V3 was good, so
queued this, thanks.

> +    if lba is None or uba is None or uba < lba:
> +        raise error.Abort('line range exceeds file size')

added _() here

> +            except exctype as exc:
> +                self.assertIn('line range exceeds file size', str(exc))

and rewrote it as assertTrue(x in y) for Python 2.6.


More information about the Mercurial-devel mailing list