diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2015-07-11 14:01:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-11 14:01:16 +0000 |
| commit | 80e3a37ab546984bd8494a12204ea10d734e6958 (patch) | |
| tree | 1a5914b71f582f8cfa931df5018aec315e62add8 /subcmds/forall.py | |
| parent | bb4a1b5274240235812fe4d533a946b16d6e387e (diff) | |
| parent | 6944cdb8d1b4765b4e9e6b3f3a09b65495da7ff3 (diff) | |
| download | git-repo-80e3a37ab546984bd8494a12204ea10d734e6958.tar.gz | |
Merge changes Iaefcbe14,I697a0f64,I19bfe9fe,I06e942c4
* changes:
forall: use smart sync override manifest if it exists
sync: Remove smart sync override manifest when not in smart sync mode
forall: Don't try to get lrev of projects in mirror workspace
sync: Improve error message when writing smart sync manifest fails
Diffstat (limited to 'subcmds/forall.py')
| -rw-r--r-- | subcmds/forall.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index ebc8beca..b93cd6d0 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
| @@ -151,11 +151,15 @@ without iterating through the remaining projects. | |||
| 151 | attributes that we need. | 151 | attributes that we need. |
| 152 | 152 | ||
| 153 | """ | 153 | """ |
| 154 | if not self.manifest.IsMirror: | ||
| 155 | lrev = project.GetRevisionId() | ||
| 156 | else: | ||
| 157 | lrev = None | ||
| 154 | return { | 158 | return { |
| 155 | 'name': project.name, | 159 | 'name': project.name, |
| 156 | 'relpath': project.relpath, | 160 | 'relpath': project.relpath, |
| 157 | 'remote_name': project.remote.name, | 161 | 'remote_name': project.remote.name, |
| 158 | 'lrev': project.GetRevisionId(), | 162 | 'lrev': lrev, |
| 159 | 'rrev': project.revisionExpr, | 163 | 'rrev': project.revisionExpr, |
| 160 | 'annotations': dict((a.name, a.value) for a in project.annotations), | 164 | 'annotations': dict((a.name, a.value) for a in project.annotations), |
| 161 | 'gitdir': project.gitdir, | 165 | 'gitdir': project.gitdir, |
| @@ -201,6 +205,13 @@ without iterating through the remaining projects. | |||
| 201 | mirror = self.manifest.IsMirror | 205 | mirror = self.manifest.IsMirror |
| 202 | rc = 0 | 206 | rc = 0 |
| 203 | 207 | ||
| 208 | smart_sync_manifest_name = "smart_sync_override.xml" | ||
| 209 | smart_sync_manifest_path = os.path.join( | ||
| 210 | self.manifest.manifestProject.worktree, smart_sync_manifest_name) | ||
| 211 | |||
| 212 | if os.path.isfile(smart_sync_manifest_path): | ||
| 213 | self.manifest.Override(smart_sync_manifest_path) | ||
| 214 | |||
| 204 | if not opt.regex: | 215 | if not opt.regex: |
| 205 | projects = self.GetProjects(args) | 216 | projects = self.GetProjects(args) |
| 206 | else: | 217 | else: |
