httppeer: declare 'dbg' at the function level
As we just saw in the previous changeset, having the variable defined into a
branch creates bug. This is a cheap to move it at the function level.
httppeer: properly gate debug usage behind debug flag check
The "dbg" local variable is only defined if the 'debugflag' is set to True.
However, it was used indiscriminately later in the function. We hide its usage
behind the 'debugflag' value to avoid raising a NameError.
test-http-branchmap: fix encoding test to wrap the server stream
Wrapping sys.std* streams has no effect since
39d13b8c101d, "py3: bulk
replace sys.stdin/out/err by util's."
notify: add option to include function names in the diff output
This is a localized version of diff.showfunc.
Differential Revision: https://phab.mercurial-scm.org/D3553