summaryrefslogtreecommitdiffstats
path: root/subcmds/start.py
diff options
context:
space:
mode:
authorMax Liu <idiotmax@gmail.com>2014-06-23 14:48:16 +0800
committerHsing-Chieh Liu <idiotmax@gmail.com>2014-10-27 12:25:05 +0000
commit5fb8ed217c1f7ddfdaa54bdb8384888998734a84 (patch)
treef02063743a63964d827ae19fbfab78665cff1d64 /subcmds/start.py
parent7e12e0a2faf5e572a196e90581c1215cc8dc7551 (diff)
downloadgit-repo-5fb8ed217c1f7ddfdaa54bdb8384888998734a84.tar.gz
If revision is sha hash and dest-branch is defined, use it for starting branch
Change-Id: I538c7d216f72b87629b61aee547d374a398c95da
Diffstat (limited to 'subcmds/start.py')
-rw-r--r--subcmds/start.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/subcmds/start.py b/subcmds/start.py
index 2d723fc2..60ad41e0 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -59,9 +59,13 @@ revision specified in the manifest.
59 for project in all_projects: 59 for project in all_projects:
60 pm.update() 60 pm.update()
61 # If the current revision is a specific SHA1 then we can't push back 61 # If the current revision is a specific SHA1 then we can't push back
62 # to it so substitute the manifest default revision instead. 62 # to it; so substitute with dest_branch if defined, or with manifest
63 # default revision instead.
63 if IsId(project.revisionExpr): 64 if IsId(project.revisionExpr):
64 project.revisionExpr = self.manifest.default.revisionExpr 65 if project.dest_branch:
66 project.revisionExpr = project.dest_branch
67 else:
68 project.revisionExpr = self.manifest.default.revisionExpr
65 if not project.StartBranch(nb): 69 if not project.StartBranch(nb):
66 err.append(project) 70 err.append(project)
67 pm.end() 71 pm.end()