summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorZac Livingston <zacl@codeaurora.org>2017-06-13 08:29:04 -0600
committerDavid Pursehouse <dpursehouse@collab.net>2017-08-25 09:10:29 +0900
commit9ead97bb51f5b1ad1d0a45e0c5442f15e1e38fd7 (patch)
tree4edd8cc4d061a3c8971fd6d55a547320120ad10b /subcmds
parente43322625a423c2dc7aa8b0648c172ccbe7aefa7 (diff)
downloadgit-repo-9ead97bb51f5b1ad1d0a45e0c5442f15e1e38fd7.tar.gz
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
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/start.py10
1 files changed, 5 insertions, 5 deletions
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
18import sys 18import sys
19 19
20from command import Command 20from command import Command
21from git_config import IsId 21from git_config import IsImmutable
22from git_command import git 22from git_command import git
23import gitc_utils 23import gitc_utils
24from progress import Progress 24from progress import Progress
@@ -96,11 +96,11 @@ revision specified in the manifest.
96 project.Sync_LocalHalf(sync_buf) 96 project.Sync_LocalHalf(sync_buf)
97 project.revisionId = gitc_project.old_revision 97 project.revisionId = gitc_project.old_revision
98 98
99 # If the current revision is a specific SHA1 then we can't push back 99 # If the current revision is immutable, such as a SHA1, a tag or
100 # to it; so substitute with dest_branch if defined, or with manifest 100 # a change, then we can't push back to it. Substitute with
101 # default revision instead. 101 # dest_branch, if defined; or with manifest default revision instead.
102 branch_merge = '' 102 branch_merge = ''
103 if IsId(project.revisionExpr): 103 if IsImmutable(project.revisionExpr):
104 if project.dest_branch: 104 if project.dest_branch:
105 branch_merge = project.dest_branch 105 branch_merge = project.dest_branch
106 else: 106 else: