2016-09-19 158 views
0

我正在修复Openstack中的错误。我做了我的更改,因为这是一个文档任务,我按照通常的方式运行测试。我将修改提交给Gerrit。当我正在研究另一个bug时,它从评论员那里回来了。OpenStack:Gerit错误与git rebase和merge

我切换了分支机构并处理了较旧的错误。当我做了一个git review,它抛出了以下错误。

You are about to submit multiple commits. This is expected if you are 

提交的提交是依赖于一个或多个审查 提交。否则,您应该考虑在提交之前将更改压缩到一个 提交中。

The outstanding commits are: 

cd6bbfa (HEAD -> master) Documentation updated on panel definition using plugin files 
5503c89 Merge branch 'master' of git://git.openstack.org/openstack/horizon 
85b63be Change-ID:Ic0844d967d519f57246b8220f9a863faf85351d2 Closes-Bug:#1519386 
74cc524 Merge branch 'master' of git://git.openstack.org/openstack/horizon 
377fb7e Closes-Bug: #1597302 

Do you really want to submit the above commits? 
Type 'yes' to confirm, other to cancel: 

我以为我必须做的是,我做的是。然后Gerrit再次抛出这个错误。

remote: Processing changes: refs: 1, done   
To ssh://[email protected]:29418/openstack/horizon.git 
! [remote rejected] HEAD -> refs/publish/master/bug/1597302 (you are not allowed to upload merges) 
error: failed to push some refs to 'ssh://[email protected]:29418/openstack/horizon.git' 

我试图通过做一个rebase来修复它。

$ git rebase -i 377fb7e 

The previous cherry-pick is now empty, possibly due to conflict resolution. 
If you wish to commit it anyway, use: 

git commit --allow-empty 

Otherwise, please use 'git reset' interactive rebase in progress; onto 377fb7e 
Last commands done (190 commands done): 
pick 15909be modify the home-page info with the developer documentation 
pick 5a39ad7 Update the home-page in setup.cfg 
    Next commands to do (137 remaining commands): 
pick 21b723e Fix typo 
pick 41e9d62 Remove embedded CSS 
You are currently rebasing branch 'master' on '377fb7e'. 

nothing to commit, working directory clean 
Could not apply 5a39ad78233546a01ae3da6efd10b104231d1d8b... Update the home-page in setup.cfg 

这就是我想要实现的。我想回到我的老bug 1597302并提交它审查,并继续工作我当前的错误是1519386

感谢任何人谁可以帮助我这个。

+0

什么是例如'git log --all --oneline --decorate --graph'? –

回答

0

错误“你不允许上传合并”是自我解释的:你无法上传你的代码,因为你没有推送合并提交的权限。 Gerrit指的是提交5503c89和/或74cc524。

您需要做的第一件事是验证您是否应该向Gerrit推送这些提交或存储库中存在问题。您是创建这些提交还是由其他人创建的?你是否以正确的承诺为基础?你是否遵循OpenStack开发流程(我不知道)?

如果您确实需要将这些合并提交推送到Gerrit,那么您可能需要向管理员要求推送合并提交的权限。