summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-04-18 14:53:39 -0700
committerShawn O. Pearce <sop@google.com>2009-04-18 14:53:39 -0700
commit0f0dfa3930bc16078ef0b1a00ff6849333038fc7 (patch)
treee802a68c96d4132199aa2a9d721a56403e0d12d2 /subcmds
parent76ca9f8145f367f83df19981da4dd934fdda471b (diff)
downloadgit-repo-0f0dfa3930bc16078ef0b1a00ff6849333038fc7.tar.gz
Add progress meter to 'repo start'
This is mostly useful if the number of projects to switch is many (e.g. all of Android) and a large number of them are behind the current manifest revision. We wind up needing to run git just to make the working tree match, and that often makes the command take a couple of seconds longer than we'd like. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/start.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/subcmds/start.py b/subcmds/start.py
index d30949f7..49bb0e1a 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -16,6 +16,7 @@
16import sys 16import sys
17from command import Command 17from command import Command
18from git_command import git 18from git_command import git
19from progress import Progress
19 20
20class Start(Command): 21class Start(Command):
21 common = True 22 common = True
@@ -38,9 +39,14 @@ revision specified in the manifest.
38 sys.exit(1) 39 sys.exit(1)
39 40
40 err = [] 41 err = []
41 for project in self.GetProjects(args[1:]): 42 all = self.GetProjects(args[1:])
43
44 pm = Progress('Starting %s' % nb, len(all))
45 for project in all:
46 pm.update()
42 if not project.StartBranch(nb): 47 if not project.StartBranch(nb):
43 err.append(project) 48 err.append(project)
49 pm.end()
44 50
45 if err: 51 if err:
46 err.sort() 52 err.sort()