Set default branch in .gitreview files when creating project

When jeepyb creates a project we need to set the defaultbranch value in
.gitreview as it may not be the default that git review expects which is
currently master. In the future git review may have a different default
than the gerrit server as well. This covers all the bases by setting
it always.

Change-Id: Ib7ebe658f2d37bbc3ac8eb6054a1fc6d27618475
This commit is contained in:
Clark Boylan 2020-10-16 09:25:16 -07:00
parent 6efdfe9f87
commit b7292d1a59

View File

@ -162,7 +162,8 @@ def make_local_copy(repo_path, project, default_branch, project_list,
host=%s
port=%s
project=%s
""" % (GERRIT_HOST, GERRIT_PORT, project_git))
defaultbranch=%s
""" % (GERRIT_HOST, GERRIT_PORT, project_git, default_branch))
git_command(repo_path, "add .gitreview")
cmd = ("commit -a -m'Added .gitreview' --author='%s'"
% GERRIT_GITID)