Re: File filter - Add inclusive filter, instead of exclusive



On 6 January 2018 at 03:19, Santiago Serebrinsky <sserebrinsky gmail com> wrote:
Hi all,

Is there any way of adding a file pattern of files to be included in a
comparison, instead of a pattern of files to be excluded?

No, there's isn't.

You could hack this yourself pretty easily, just by changing the
filtering line in meld/dirdiff.py from:
                    entries = [e for e in entries if f.filter.match(e) is None]
to:
                    entries = [e for e in entries if f.filter.match(e)
is not None]
at which point *all* of your patterns are now inclusive instead of
exclusive. I'm not sure whether that's actually helpful or not for
your case.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]