2016-09-19 53 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,那麼您可能需要向管理員要求推送合併提交的權限。

相關問題