##// END OF EJS Templates
progress: check for ui.quiet and ui.debugflag before we write...
David Soria Parra -
r15662:06671371 stable
parent child Browse files
Show More
@@ -271,17 +271,21 b' def uisetup(ui):'
271 271 class progressui(ui.__class__):
272 272 _progbar = None
273 273
274 def _quiet(self):
275 return self.debugflag or self.quiet
276
274 277 def progress(self, *args, **opts):
278 if not self._quiet():
275 279 self._progbar.progress(*args, **opts)
276 280 return super(progressui, self).progress(*args, **opts)
277 281
278 282 def write(self, *args, **opts):
279 if self._progbar.printed:
283 if not self._quiet() and self._progbar.printed:
280 284 self._progbar.clear()
281 285 return super(progressui, self).write(*args, **opts)
282 286
283 287 def write_err(self, *args, **opts):
284 if self._progbar.printed:
288 if not self._quiet() and self._progbar.printed:
285 289 self._progbar.clear()
286 290 return super(progressui, self).write_err(*args, **opts)
287 291
General Comments 0
You need to be logged in to leave comments. Login now