diff options
| -rw-r--r-- | project.py | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -1214,6 +1214,9 @@ class Project(object): | |||
| 1214 | (self.revisionExpr, self.name)) | 1214 | (self.revisionExpr, self.name)) |
| 1215 | 1215 | ||
| 1216 | def SetRevisionId(self, revisionId): | 1216 | def SetRevisionId(self, revisionId): |
| 1217 | if self.clone_depth or self.manifest.manifestProject.config.GetString('repo.depth'): | ||
| 1218 | self.upstream = self.revisionExpr | ||
| 1219 | |||
| 1217 | self.revisionId = revisionId | 1220 | self.revisionId = revisionId |
| 1218 | 1221 | ||
| 1219 | def Sync_LocalHalf(self, syncbuf, force_sync=False, submodules=False): | 1222 | def Sync_LocalHalf(self, syncbuf, force_sync=False, submodules=False): |
| @@ -2134,6 +2137,8 @@ class Project(object): | |||
| 2134 | # Shallow checkout of a specific commit, fetch from that commit and not | 2137 | # Shallow checkout of a specific commit, fetch from that commit and not |
| 2135 | # the heads only as the commit might be deeper in the history. | 2138 | # the heads only as the commit might be deeper in the history. |
| 2136 | spec.append(branch) | 2139 | spec.append(branch) |
| 2140 | if self.upstream: | ||
| 2141 | spec.append(self.upstream) | ||
| 2137 | else: | 2142 | else: |
| 2138 | if is_sha1: | 2143 | if is_sha1: |
| 2139 | branch = self.upstream | 2144 | branch = self.upstream |
