From 47020ba249c39783a66c0031fd9200caecfbbdc8 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Thu, 10 Nov 2022 00:11:51 +0000 Subject: trace: restore Progress indicator. If we are not tracing to stderr, then we should still have progress indication. Change-Id: Ifc9678e1fccbd92251e972fcf25aad6369d60e15 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351195 Reviewed-by: Sam Saccone Tested-by: LaMont Jones Reviewed-by: Xin Li --- progress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'progress.py') diff --git a/progress.py b/progress.py index f9ac53a1..526ce6c1 100644 --- a/progress.py +++ b/progress.py @@ -15,7 +15,7 @@ import os import sys from time import time -from repo_trace import IsTrace +from repo_trace import IsTraceToStderr _NOT_TTY = not os.isatty(2) @@ -80,7 +80,7 @@ class Progress(object): def update(self, inc=1, msg=''): self._done += inc - if _NOT_TTY or IsTrace(): + if _NOT_TTY or IsTraceToStderr(): return if not self._show: @@ -113,7 +113,7 @@ class Progress(object): sys.stderr.flush() def end(self): - if _NOT_TTY or IsTrace() or not self._show: + if _NOT_TTY or IsTraceToStderr() or not self._show: return duration = duration_str(time() - self._start) -- cgit v1.2.3-54-g00ecf