comparison hgext/pager.py @ 20790:49f2d5644f04

config: set a 'source' in most cases where config don't come from file but code Some extensions set configuration settings that showed up in 'hg showconfig --debug' with 'none' as source. That was confusing. Instead, they will now tell which extension they come from. This change tries to be consistent and specify a source everywhere - also where it perhaps is less relevant.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 19 Mar 2014 02:45:14 +0100
parents 7d99bff0f77c
children 2bc778e2f9b3
comparison
equal deleted inserted replaced
20789:d19c9bdbbf35 20790:49f2d5644f04
127 ignore = ui.configlist('pager', 'ignore') 127 ignore = ui.configlist('pager', 'ignore')
128 for cmd in cmds: 128 for cmd in cmds:
129 if (always or auto and 129 if (always or auto and
130 (cmd in attend or 130 (cmd in attend or
131 (cmd not in ignore and not attend))): 131 (cmd not in ignore and not attend))):
132 ui.setconfig('ui', 'formatted', ui.formatted()) 132 ui.setconfig('ui', 'formatted', ui.formatted(), 'pager')
133 ui.setconfig('ui', 'interactive', False) 133 ui.setconfig('ui', 'interactive', False, 'pager')
134 if util.safehasattr(signal, "SIGPIPE"): 134 if util.safehasattr(signal, "SIGPIPE"):
135 signal.signal(signal.SIGPIPE, signal.SIG_DFL) 135 signal.signal(signal.SIGPIPE, signal.SIG_DFL)
136 _runpager(ui, p) 136 _runpager(ui, p)
137 break 137 break
138 return orig(ui, options, cmd, cmdfunc) 138 return orig(ui, options, cmd, cmdfunc)