D964: python3: move from using func_name to __name__
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Oct 14 06:52:20 UTC 2017
durin42 updated this revision to Diff 2721.
durin42 retitled this revision from "python3: add and use adapter for func_name attr, now known as __name__" to "python3: move from using func_name to __name__".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D964?vs=2525&id=2721
REVISION DETAIL
https://phab.mercurial-scm.org/D964
AFFECTED FILES
mercurial/peer.py
mercurial/templater.py
CHANGE DETAILS
diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -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):
diff --git a/mercurial/peer.py b/mercurial/peer.py
--- a/mercurial/peer.py
+++ b/mercurial/peer.py
@@ -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
To: durin42, #hg-reviewers, pulkit, indygreg, yuja
Cc: yuja, indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list