# HG changeset patch # User Augie Fackler # Date 1507227305 14400 # Node ID 56bb07a0b75c8c5de1bf8ac533eab65f7256f8e3 # Parent 4c322b95a6ab7edf81ec6a7971c2746340da27b0 python3: move from using func_name to __name__ Previously reviewed as D964, but required some fixups and therefore seems to need a new revision. Differential Revision: https://phab.mercurial-scm.org/D1065 diff -r 4c322b95a6ab -r 56bb07a0b75c mercurial/peer.py --- a/mercurial/peer.py Sat Oct 14 01:20:12 2017 -0400 +++ b/mercurial/peer.py Thu Oct 05 14:15:05 2017 -0400 @@ -90,7 +90,7 @@ if not encresref: return encargsorres # a local result in this case self = args[0] - encresref.set(self._submitone(f.func_name, encargsorres)) + encresref.set(self._submitone(f.__name__, encargsorres)) return next(batchable) setattr(plain, 'batchable', f) return plain diff -r 4c322b95a6ab -r 56bb07a0b75c mercurial/templater.py --- a/mercurial/templater.py Sat Oct 14 01:20:12 2017 -0400 +++ b/mercurial/templater.py Thu Oct 05 14:15:05 2017 -0400 @@ -427,9 +427,9 @@ sym = findsymbolicname(arg) if sym: msg = (_("template filter '%s' is not compatible with keyword '%s'") - % (filt.func_name, sym)) + % (filt.__name__, sym)) else: - msg = _("incompatible use of template filter '%s'") % filt.func_name + msg = _("incompatible use of template filter '%s'") % filt.__name__ raise error.Abort(msg) def buildmap(exp, context):