comparison hgext/progress.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 646eb9337c87
children f139f34ba330
comparison
equal deleted inserted replaced
12688:8c034a825cfe 12689:c52c629ce19e
154 else: 154 else:
155 sys.stderr.write('\n') 155 sys.stderr.write('\n')
156 sys.stderr.flush() 156 sys.stderr.flush()
157 157
158 def width(self): 158 def width(self):
159 tw = util.termwidth() 159 tw = self.ui.termwidth()
160 return min(int(self.ui.config('progress', 'width', default=tw)), tw) 160 return min(int(self.ui.config('progress', 'width', default=tw)), tw)
161 161
162 def progress(self, topic, pos, item='', unit='', total=None): 162 def progress(self, topic, pos, item='', unit='', total=None):
163 if pos is None: 163 if pos is None:
164 if self.topics and self.topics[-1] == topic and self.printed: 164 if self.topics and self.topics[-1] == topic and self.printed: