[PATCH 2 of 8] localrepo: debug log of filter name when filtering through a function

Yuya Nishihara yuya at tcha.org
Mon Oct 14 00:12:13 EDT 2019


On Mon, 14 Oct 2019 02:13:36 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1570970400 -7200
> #      Sun Oct 13 14:40:00 2019 +0200
> # Node ID 2b91375a812ce3c694efa35a98a1777709387962
> # Parent  57f88532f7005eeb13cb06418ae3a3b156085adf
> localrepo: debug log of filter name when filtering through a function

> @@ -1907,7 +1909,8 @@ class localrepository(object):
>      def _filter(self, filterpats, filename, data):
>          for mf, fn, cmd in filterpats:
>              if mf(filename):
> -                self.ui.debug(b"filtering %s through %s\n" % (filename, cmd))
> +                self.ui.debug(b"filtering %s through %s\n" %
> +                              (filename, cmd or pycompat.bytestr(fn.__name__)))

Nit: changed pycompat.bytestr() to pycompat.sysbytes() in flight.
Function names should be ascii in general, but that isn't guaranteed.


More information about the Mercurial-devel mailing list