diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-09-09 21:44:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-09-09 21:44:11 +0000 |
commit | 5cc384034d144c339d2e5822c36c5ca4529ac487 (patch) | |
tree | e2a5cb35a8ea85984c7e4f92bac9fffd4d1e617c /subcmds/start.py | |
parent | c32ba1961e3451101ce94a26f83cf56681ff6414 (diff) | |
parent | 037552333182497e9e38bff984de44df0f93e54b (diff) | |
download | git-repo-5cc384034d144c339d2e5822c36c5ca4529ac487.tar.gz |
Merge "Revert "GITC: Always update the gitc manifest from the repo manifest""v1.12.30.1
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 940c3413..188fd7c6 100644 --- a/subcmds/start.py +++ b/subcmds/start.py | |||
@@ -57,6 +57,7 @@ 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 = {} | ||
60 | if self.gitc_manifest: | 61 | if self.gitc_manifest: |
61 | all_projects = self.GetProjects(projects, manifest=self.gitc_manifest, | 62 | all_projects = self.GetProjects(projects, manifest=self.gitc_manifest, |
62 | missing_ok=True) | 63 | missing_ok=True) |
@@ -66,6 +67,7 @@ revision specified in the manifest. | |||
66 | else: | 67 | else: |
67 | project.already_synced = False | 68 | project.already_synced = False |
68 | project.old_revision = project.revisionExpr | 69 | project.old_revision = project.revisionExpr |
70 | proj_name_to_gitc_proj_dict[project.name] = project | ||
69 | project.revisionExpr = None | 71 | project.revisionExpr = None |
70 | # Save the GITC manifest. | 72 | # Save the GITC manifest. |
71 | gitc_utils.save_manifest(self.gitc_manifest) | 73 | gitc_utils.save_manifest(self.gitc_manifest) |
@@ -75,10 +77,9 @@ revision specified in the manifest. | |||
75 | pm = Progress('Starting %s' % nb, len(all_projects)) | 77 | pm = Progress('Starting %s' % nb, len(all_projects)) |
76 | for project in all_projects: | 78 | for project in all_projects: |
77 | pm.update() | 79 | pm.update() |
78 | |||
79 | if self.gitc_manifest: | 80 | if self.gitc_manifest: |
80 | gitc_project = self.gitc_manifest.paths[project.relpath] | 81 | gitc_project = proj_name_to_gitc_proj_dict[project.name] |
81 | # Sync projects that have not been opened. | 82 | # Sync projects that have already been opened. |
82 | if not gitc_project.already_synced: | 83 | if not gitc_project.already_synced: |
83 | proj_localdir = os.path.join(self.gitc_manifest.gitc_client_dir, | 84 | proj_localdir = os.path.join(self.gitc_manifest.gitc_client_dir, |
84 | project.relpath) | 85 | project.relpath) |
@@ -88,7 +89,7 @@ revision specified in the manifest. | |||
88 | project.Sync_NetworkHalf() | 89 | project.Sync_NetworkHalf() |
89 | sync_buf = SyncBuffer(self.manifest.manifestProject.config) | 90 | sync_buf = SyncBuffer(self.manifest.manifestProject.config) |
90 | project.Sync_LocalHalf(sync_buf) | 91 | project.Sync_LocalHalf(sync_buf) |
91 | project.revisionId = gitc_project.old_revision | 92 | project.revisionExpr = gitc_project.old_revision |
92 | 93 | ||
93 | # If the current revision is a specific SHA1 then we can't push back | 94 | # If the current revision is a specific SHA1 then we can't push back |
94 | # to it; so substitute with dest_branch if defined, or with manifest | 95 | # to it; so substitute with dest_branch if defined, or with manifest |
@@ -99,7 +100,6 @@ revision specified in the manifest. | |||
99 | branch_merge = project.dest_branch | 100 | branch_merge = project.dest_branch |
100 | else: | 101 | else: |
101 | branch_merge = self.manifest.default.revisionExpr | 102 | 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() |