Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

hglib: allow to omit '_ui' argument

Changeset 38a40fc31edf

Parent 341b73e44634

by Yuki KODAMA

Changes to one file · Browse files at 38a40fc31edf Showing diff from parent 341b73e44634 Diff from another changeset...

 
128
129
130
131
 
132
133
 
 
134
135
136
137
138
139
140
 
141
142
143
 
128
129
130
 
131
132
133
134
135
136
137
138
139
140
141
 
142
143
144
145
@@ -128,16 +128,18 @@
  return line[0] + line[1:].expandtabs(_tabwidth)    _fontconfig = None -def getfontconfig(ui): +def getfontconfig(_ui=None):   global _fontconfig   if _fontconfig is None: + if _ui is None: + _ui = ui.ui()   # defaults   _fontconfig = {'fontcomment': 'monospace 10',   'fontdiff': 'monospace 10',   'fontlist': 'sans 9',   'fontlog': 'monospace 10'}   # overwrite defaults with configured values - for name, val in ui.configitems('gtools'): + for name, val in _ui.configitems('gtools'):   if val and name.startswith('font'):   _fontconfig[name] = val   return _fontconfig