From 9ead97bb51f5b1ad1d0a45e0c5442f15e1e38fd7 Mon Sep 17 00:00:00 2001 From: Zac Livingston Date: Tue, 13 Jun 2017 08:29:04 -0600 Subject: When starting a branch, do not use a tag or change value for branch.merge When starting a branch, branch.merge is set to project revision unless the revision is a SHA1. In that case, branch.merge is set to dest_branch if defined or manifest default revision otherwise. This special handling allows repo upload to work when the project revision is a SHA1. Extend the special handling to also happen when the project revision is a tag value or a change value so that repo upload will work in those case as well. Change-Id: Iff81ece40e770cd02535e80dcb023564d42dcf47 --- subcmds/start.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'subcmds') diff --git a/subcmds/start.py b/subcmds/start.py index 290b6897..c3ec303e 100644 --- a/subcmds/start.py +++ b/subcmds/start.py @@ -18,7 +18,7 @@ import os import sys from command import Command -from git_config import IsId +from git_config import IsImmutable from git_command import git import gitc_utils from progress import Progress @@ -96,11 +96,11 @@ revision specified in the manifest. project.Sync_LocalHalf(sync_buf) project.revisionId = gitc_project.old_revision - # If the current revision is a specific SHA1 then we can't push back - # to it; so substitute with dest_branch if defined, or with manifest - # default revision instead. + # If the current revision is immutable, such as a SHA1, a tag or + # a change, then we can't push back to it. Substitute with + # dest_branch, if defined; or with manifest default revision instead. branch_merge = '' - if IsId(project.revisionExpr): + if IsImmutable(project.revisionExpr): if project.dest_branch: branch_merge = project.dest_branch else: -- cgit v1.2.3-54-g00ecf