# HG changeset patch # User Boris Feld # Date 1526908486 -7200 # Node ID 13b2812cff2ba93c86924d17d9d916db8612094c # Parent f9dc1d5b676b1b7b6d1fe10282c13fca2c9b9a3d 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. diff -r f9dc1d5b676b -r 13b2812cff2b mercurial/httppeer.py --- a/mercurial/httppeer.py Fri May 04 19:06:46 2018 +0200 +++ b/mercurial/httppeer.py Mon May 21 15:14:46 2018 +0200 @@ -277,9 +277,9 @@ Returns the response object. """ + dbg = ui.debug if (ui.debugflag and ui.configbool('devel', 'debug.peer-request')): - dbg = ui.debug line = 'devel-peer-request: %s\n' dbg(line % '%s %s' % (pycompat.bytesurl(req.get_method()), pycompat.bytesurl(req.get_full_url())))