diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2015-05-07 15:01:15 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2015-07-06 16:18:06 +0900 |
commit | 30d13eea862bdc9df1b0bcd32318f24250dd96ea (patch) | |
tree | 0013a0160ef6a57eb474cf746d0f8466133ddf40 | |
parent | 727cc3e32424886b90df2094063549189cbbb390 (diff) | |
download | git-repo-30d13eea862bdc9df1b0bcd32318f24250dd96ea.tar.gz |
forall: Don't try to get lrev of projects in mirror workspace
git rev-parse fails for projects that don't have an explicit revision
specified, and don't have a branch of the same name as the default
revision. This can be the case in a workspace synced with the smart
sync (-s) or smart tag (-t) option.
Change-Id: I19bfe9fe7396170379415d85f10f6440dc6ea08f
-rw-r--r-- | subcmds/forall.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index ebc8beca..3ddc3c3d 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, |