summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-02-23 16:57:56 -0500
committerMike Frysinger <vapier@google.com>2021-02-25 20:13:18 +0000
commit4e05f650e0b314fa80ea5811c0abe4b71ea0758c (patch)
tree88e3ca1485726bd3edaa949f94bf0af4d71fc574 /subcmds
parent23882b33feaa0104dcbe372a9fde496cffc2b246 (diff)
downloadgit-repo-4e05f650e0b314fa80ea5811c0abe4b71ea0758c.tar.gz
progress: always enable always_print_percentage
The idea for skipping some progress updates was to avoid spending too much time on the progress bar itself. Unfortunately, for large projects (100s if not 1000s) of repos, we get into the situation with large/slow checkouts that we skip showing updates when a repo finishes, but not enough repos finished to increase the percent. Since the progress bar should be relatively fast compared to the actual network & local dick operations, have it show an update whenever the caller requests it. A test with ~1000 repos shows that the progress bar in total adds <100ms. Bug: https://crbug.com/gerrit/11293 Change-Id: I708a0c4bd923c59c7691a5b48ae33eb6fca4cd14 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297903 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/sync.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 47790cc8..0a3cde7d 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -403,8 +403,7 @@ later is required to fix a server side protocol bug.
403 def _Fetch(self, projects, opt, err_event): 403 def _Fetch(self, projects, opt, err_event):
404 fetched = set() 404 fetched = set()
405 lock = _threading.Lock() 405 lock = _threading.Lock()
406 pm = Progress('Fetching projects', len(projects), 406 pm = Progress('Fetching projects', len(projects))
407 always_print_percentage=opt.quiet)
408 407
409 objdir_project_map = dict() 408 objdir_project_map = dict()
410 for project in projects: 409 for project in projects: