comparison tests/test-hgweb-auth.py @ 37942:32bc3815efae

stringutil: flip the default of pprint() to bprefix=False If we use pprint() as a drop-in replacement for repr(), bprefix=False is more appropriate. Let's make it the default to remove bprefix=False noise.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 10 May 2018 21:08:32 +0900
parents 31c37e703cee
children c53f0ead5781
comparison
equal deleted inserted replaced
37941:af83a0ed0afb 37942:32bc3815efae
26 for name, value in items.items(): 26 for name, value in items.items():
27 ui.setconfig('auth', name, value) 27 ui.setconfig('auth', name, value)
28 return ui 28 return ui
29 29
30 def test(auth, urls=None): 30 def test(auth, urls=None):
31 print('CFG:', pycompat.sysstr(stringutil.pprint(auth))) 31 print('CFG:', pycompat.sysstr(stringutil.pprint(auth, bprefix=True)))
32 prefixes = set() 32 prefixes = set()
33 for k in auth: 33 for k in auth:
34 prefixes.add(k.split('.', 1)[0]) 34 prefixes.add(k.split('.', 1)[0])
35 for p in prefixes: 35 for p in prefixes:
36 for name in ('.username', '.password'): 36 for name in ('.username', '.password'):