On Wed, 7 Feb 2018 15:58:14 +0100, Denis Laxalde wrote: > Yuya Nishihara a écrit : > > # HG changeset patch > > # User Yuya Nishihara <y...@tcha.org> > > # Date 1516517658 -32400 > > # Sun Jan 21 15:54:18 2018 +0900 > > # Node ID 5f9dcb5d72da427abbfa2c304bdbe4dd555e0c7d > > # Parent f95d0d1e012a512550de945350e08f3dc7db090f > > log: pack filematcher and hunksfilter into changesetdiffer object > > > > This is just a way of getting rid of clumsy makefilematcher/makehunksfilter > > arguments. There might be a better abstraction, but I don't think this is > > bad. > > Alternatively we could have a makediffer(makefilematcher=None, > makehunksfilter=None) factory function returning the showdiff function > with capture context; that would avoid setting _make<attribute> in > client code.
Yeah, that's doable. But I slightly prefer a class over a set of closures. I mean it might be possible to factor out makefilematcher/makehunksfilter to a class holding a repo, instead of overwriting object attributes. Anyway, thanks for reviewing. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel