diff options
Diffstat (limited to 'subcmds/start.py')
| -rw-r--r-- | subcmds/start.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/start.py b/subcmds/start.py index 188fd7c6..940c3413 100644 --- a/subcmds/start.py +++ b/subcmds/start.py | |||
| @@ -57,7 +57,6 @@ 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 | proj_name_to_gitc_proj_dict = {} | ||
| 61 | if self.gitc_manifest: | 60 | if self.gitc_manifest: |
| 62 | all_projects = self.GetProjects(projects, manifest=self.gitc_manifest, | 61 | all_projects = self.GetProjects(projects, manifest=self.gitc_manifest, |
| 63 | missing_ok=True) | 62 | missing_ok=True) |
| @@ -67,7 +66,6 @@ revision specified in the manifest. | |||
| 67 | else: | 66 | else: |
| 68 | project.already_synced = False | 67 | project.already_synced = False |
| 69 | project.old_revision = project.revisionExpr | 68 | project.old_revision = project.revisionExpr |
| 70 | proj_name_to_gitc_proj_dict[project.name] = project | ||
| 71 | project.revisionExpr = None | 69 | project.revisionExpr = None |
| 72 | # Save the GITC manifest. | 70 | # Save the GITC manifest. |
| 73 | gitc_utils.save_manifest(self.gitc_manifest) | 71 | gitc_utils.save_manifest(self.gitc_manifest) |
| @@ -77,9 +75,10 @@ revision specified in the manifest. | |||
| 77 | pm = Progress('Starting %s' % nb, len(all_projects)) | 75 | pm = Progress('Starting %s' % nb, len(all_projects)) |
| 78 | for project in all_projects: | 76 | for project in all_projects: |
| 79 | pm.update() | 77 | pm.update() |
| 78 | |||
| 80 | if self.gitc_manifest: | 79 | if self.gitc_manifest: |
| 81 | gitc_project = proj_name_to_gitc_proj_dict[project.name] | 80 | gitc_project = self.gitc_manifest.paths[project.relpath] |
| 82 | # Sync projects that have already been opened. | 81 | # Sync projects that have not been opened. |
| 83 | if not gitc_project.already_synced: | 82 | if not gitc_project.already_synced: |
| 84 | proj_localdir = os.path.join(self.gitc_manifest.gitc_client_dir, | 83 | proj_localdir = os.path.join(self.gitc_manifest.gitc_client_dir, |
| 85 | project.relpath) | 84 | project.relpath) |
| @@ -89,7 +88,7 @@ revision specified in the manifest. | |||
| 89 | project.Sync_NetworkHalf() | 88 | project.Sync_NetworkHalf() |
| 90 | sync_buf = SyncBuffer(self.manifest.manifestProject.config) | 89 | sync_buf = SyncBuffer(self.manifest.manifestProject.config) |
| 91 | project.Sync_LocalHalf(sync_buf) | 90 | project.Sync_LocalHalf(sync_buf) |
| 92 | project.revisionExpr = gitc_project.old_revision | 91 | project.revisionId = gitc_project.old_revision |
| 93 | 92 | ||
| 94 | # If the current revision is a specific SHA1 then we can't push back | 93 | # If the current revision is a specific SHA1 then we can't push back |
| 95 | # to it; so substitute with dest_branch if defined, or with manifest | 94 | # to it; so substitute with dest_branch if defined, or with manifest |
| @@ -100,6 +99,7 @@ revision specified in the manifest. | |||
| 100 | branch_merge = project.dest_branch | 99 | branch_merge = project.dest_branch |
| 101 | else: | 100 | else: |
| 102 | branch_merge = self.manifest.default.revisionExpr | 101 | branch_merge = self.manifest.default.revisionExpr |
| 102 | |||
| 103 | if not project.StartBranch(nb, branch_merge=branch_merge): | 103 | if not project.StartBranch(nb, branch_merge=branch_merge): |
| 104 | err.append(project) | 104 | err.append(project) |
| 105 | pm.end() | 105 | pm.end() |
