| 260 | return "origin/candidates" |
| 261 | |
| 262 | def RemoteBranch(self, name): |
| 263 | # Assume that if someone "fully qualified" the ref, they know what they |
| 264 | # want. |
| 265 | if name.startswith('refs/'): |
| 266 | return name |
| 267 | if name in ["candidates", "main"]: |
| 268 | return "refs/remotes/origin/%s" % name |
| 269 | try: |
| 270 | # Check if branch is in heads. |
| 271 | if self.step.Git("show-ref refs/remotes/origin/%s" % name).strip(): |
| 272 | return "refs/remotes/origin/%s" % name |
| 273 | except GitFailedException: |
| 274 | pass |
| 275 | try: |
| 276 | # Check if branch is in branch-heads. |
| 277 | if self.step.Git("show-ref refs/remotes/branch-heads/%s" % name).strip(): |
| 278 | return "refs/remotes/branch-heads/%s" % name |
| 279 | except GitFailedException: |
| 280 | pass |
| 281 | self.Die("Can't find remote of %s" % name) |
| 282 | |
| 283 | def Tag(self, tag, remote, message): |
| 284 | # Wait for the commit to appear. Assumes unique commit message titles (this |