summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/start.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/subcmds/start.py b/subcmds/start.py
index 940c3413..d1430a9d 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -57,10 +57,15 @@ revision specified in the manifest.
57 print("error: at least one project must be specified", file=sys.stderr) 57 print("error: at least one project must be specified", file=sys.stderr)
58 sys.exit(1) 58 sys.exit(1)
59 59
60 all_projects = self.GetProjects(projects,
61 missing_ok=bool(self.gitc_manifest))
62
63 # This must happen after we find all_projects, since GetProjects may need
64 # the local directory, which will disappear once we save the GITC manifest.
60 if self.gitc_manifest: 65 if self.gitc_manifest:
61 all_projects = self.GetProjects(projects, manifest=self.gitc_manifest, 66 gitc_projects = self.GetProjects(projects, manifest=self.gitc_manifest,
62 missing_ok=True) 67 missing_ok=True)
63 for project in all_projects: 68 for project in gitc_projects:
64 if project.old_revision: 69 if project.old_revision:
65 project.already_synced = True 70 project.already_synced = True
66 else: 71 else:
@@ -70,8 +75,10 @@ revision specified in the manifest.
70 # Save the GITC manifest. 75 # Save the GITC manifest.
71 gitc_utils.save_manifest(self.gitc_manifest) 76 gitc_utils.save_manifest(self.gitc_manifest)
72 77
73 all_projects = self.GetProjects(projects, 78 # Make sure we have a valid CWD
74 missing_ok=bool(self.gitc_manifest)) 79 if not os.path.exists(os.getcwd()):
80 os.chdir(self.manifest.topdir)
81
75 pm = Progress('Starting %s' % nb, len(all_projects)) 82 pm = Progress('Starting %s' % nb, len(all_projects))
76 for project in all_projects: 83 for project in all_projects:
77 pm.update() 84 pm.update()