Ask Your Question
0

Unable to send code into Gerrit for code review

asked 2016-04-04 07:35:38 -0600

Bhargavi gravatar image

updated 2016-04-04 07:47:54 -0600

I need to send code to Gerrit for review.

Executed the below command for the sending the code into Gerrit.

Command: “git review”

Got an error “missing or invalid Change-Id line format in commit message footer” after the execution of the above command.

Please find the below detailed error:

root@bhagi:~/glance/python-glanceclient# git review
Password for 'https://bharc@review.openstack.org':
remote: Processing changes: refs: 1, done
remote: ERROR: missing or invalid Change-Id line format in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 bharc@review.openstack.org:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote:   git commit --amend
remote:
To https://bharc@review.openstack.org/openstack/python-glanceclient.git
! [remote rejected] HEAD -> refs/publish/master/bug/1555662 (missing or invalid Change-Id line format in commit message footer)
error: failed to push some refs to 'https://bharc@review.openstack.org/openstack/python-glanceclient.git'

Please help me to resolve the issue.

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-04-04 22:22:04 -0600

hieulq gravatar image

Please following http://docs.openstack.org/infra/manual/developers.html (this guide)

You are missing remote branch named gerrit in upstream, run the command

git review -s

in each repo you want to start working. This command create a gerrit branch and took an commit hook to append ChangeId each time you commit. So, basically the workflow is:

git clone <OpenStack repo>
git review -s
<make some changes>
git add <changed file>
git commit -a or git commit --amend
git review
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-04-04 07:35:38 -0600

Seen: 207 times

Last updated: Apr 04 '16