##// 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 class progressui(ui.__class__):
271 class progressui(ui.__class__):
272 _progbar = None
272 _progbar = None
273
273
274 def _quiet(self):
275 return self.debugflag or self.quiet
276
274 def progress(self, *args, **opts):
277 def progress(self, *args, **opts):
275 self._progbar.progress(*args, **opts)
278 if not self._quiet():
279 self._progbar.progress(*args, **opts)
276 return super(progressui, self).progress(*args, **opts)
280 return super(progressui, self).progress(*args, **opts)
277
281
278 def write(self, *args, **opts):
282 def write(self, *args, **opts):
279 if self._progbar.printed:
283 if not self._quiet() and self._progbar.printed:
280 self._progbar.clear()
284 self._progbar.clear()
281 return super(progressui, self).write(*args, **opts)
285 return super(progressui, self).write(*args, **opts)
282
286
283 def write_err(self, *args, **opts):
287 def write_err(self, *args, **opts):
284 if self._progbar.printed:
288 if not self._quiet() and self._progbar.printed:
285 self._progbar.clear()
289 self._progbar.clear()
286 return super(progressui, self).write_err(*args, **opts)
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