# HG changeset patch # User Pierre-Yves David # Date 2017-02-24 20:31:47 # Node ID 75c4aafee4906ee7a989e69278ee207c4041e332 # Parent 894bdcdc75df1da72ba245d6512759e37da3e673 color: clarify name of an argument of 'win32print' In the current code, the function called to write happens to the 'orig' version of the method calling 'win32print' (obtained with a 'super' call). However, the variable could have a better name. That will be useful when we'll stop having inheritance in play. diff --git a/mercurial/color.py b/mercurial/color.py --- a/mercurial/color.py +++ b/mercurial/color.py @@ -288,7 +288,7 @@ if pycompat.osname == 'nt': ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)', re.MULTILINE | re.DOTALL) - def win32print(text, orig, **opts): + def win32print(text, writefunc, **opts): label = opts.get('label', '') attr = origattr @@ -325,7 +325,7 @@ if pycompat.osname == 'nt': if sattr: attr = mapcolor(int(sattr), attr) _kernel32.SetConsoleTextAttribute(stdout, attr) - orig(m.group(2), **opts) + writefunc(m.group(2), **opts) m = re.match(ansire, m.group(3)) finally: # Explicitly reset original attributes