Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gclient.py

Issue 564051: Add progress indicator for sync (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/repo/COPYING » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index df2085eb950bf3566365983fcf4d548f81baaf26..aae1ac06735f5e9fe996ba3024023ce28c935434 100755
--- a/gclient.py
+++ b/gclient.py
@@ -72,6 +72,7 @@ import breakpad
import gclient_scm
import gclient_utils
+from third_party.repo.progress import Progress
# default help text
DEFAULT_USAGE_TEXT = (
@@ -684,7 +685,11 @@ class GClient(object):
deps_to_process.sort()
# First pass for direct dependencies.
+ if command == 'update' and not self._options.verbose:
+ pm = Progress('Syncing projects', len(deps_to_process))
for d in deps_to_process:
+ if command == 'update' and not self._options.verbose:
+ pm.update()
if type(deps[d]) == str:
url = deps[d]
entries[d] = url
@@ -693,6 +698,8 @@ class GClient(object):
scm = gclient_scm.CreateSCM(url, self._root_dir, d)
scm.RunCommand(command, self._options, args, file_list)
self._options.revision = None
+ if command == 'update' and not self._options.verbose:
+ pm.end()
# Second pass for inherited deps (via the From keyword)
for d in deps_to_process:
« no previous file with comments | « no previous file | third_party/repo/COPYING » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698