comparison hgext/churn.py @ 12689:c52c629ce19e

termwidth: move to ui.ui from util
author Augie Fackler <durin42@gmail.com>
date Sun, 10 Oct 2010 10:06:36 -0500
parents fddacca3202e
children 2506658c3927
comparison
equal deleted inserted replaced
12688:8c034a825cfe 12689:c52c629ce19e
147 147
148 # Be careful not to have a zero maxcount (issue833) 148 # Be careful not to have a zero maxcount (issue833)
149 maxcount = float(max(sum(v) for k, v in rate)) or 1.0 149 maxcount = float(max(sum(v) for k, v in rate)) or 1.0
150 maxname = max(len(k) for k, v in rate) 150 maxname = max(len(k) for k, v in rate)
151 151
152 ttywidth = util.termwidth() 152 ttywidth = ui.termwidth()
153 ui.debug("assuming %i character terminal\n" % ttywidth) 153 ui.debug("assuming %i character terminal\n" % ttywidth)
154 width = ttywidth - maxname - 2 - 2 - 2 154 width = ttywidth - maxname - 2 - 2 - 2
155 155
156 if opts.get('diffstat'): 156 if opts.get('diffstat'):
157 width -= 15 157 width -= 15