From 04e52d616625cc61d897a92d5e9a2c068465f8fc Mon Sep 17 00:00:00 2001 From: Nasser Grainawi Date: Tue, 30 Sep 2014 13:34:52 -0600 Subject: [PATCH] Always fetch the specific revision given Don't assume the revision is in refs/heads/. Change-Id: I1f71be222ed3ed940d2265aad43d1f2d601fc03a --- project.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/project.py b/project.py index e501cc26..fdd96182 100644 --- a/project.py +++ b/project.py @@ -1817,14 +1817,14 @@ class Project(object): elif tag_name is not None: spec.append('tag') spec.append(tag_name) - else: - branch = self.revisionExpr - if is_sha1: - branch = self.upstream - if branch is not None and branch.strip(): - if not branch.startswith('refs/'): - branch = R_HEADS + branch - spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch))) + + branch = self.revisionExpr + if is_sha1: + branch = self.upstream + if branch is not None and branch.strip(): + if not branch.startswith('refs/'): + branch = R_HEADS + branch + spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch))) cmd.extend(spec) shallowfetch = self.config.GetString('repo.shallowfetch')