From 5fb8ed217c1f7ddfdaa54bdb8384888998734a84 Mon Sep 17 00:00:00 2001 From: Max Liu Date: Mon, 23 Jun 2014 14:48:16 +0800 Subject: [PATCH] If revision is sha hash and dest-branch is defined, use it for starting branch Change-Id: I538c7d216f72b87629b61aee547d374a398c95da --- subcmds/start.py | 8 ++++++-- 1 file 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. for project in all_projects: pm.update() # If the current revision is a specific SHA1 then we can't push back - # to it so substitute the manifest default revision instead. + # to it; so substitute with dest_branch if defined, or with manifest + # default revision instead. if IsId(project.revisionExpr): - project.revisionExpr = self.manifest.default.revisionExpr + if project.dest_branch: + project.revisionExpr = project.dest_branch + else: + project.revisionExpr = self.manifest.default.revisionExpr if not project.StartBranch(nb): err.append(project) pm.end()