[openstack-dev] Issues with "git review" for a dependent commit

Kyle Mestery (kmestery) kmestery at cisco.com
Wed Jul 3 02:24:01 UTC 2013


On Jul 2, 2013, at 6:23 PM, Jeremy Stanley <fungi at yuggoth.org> wrote:
> On 2013-07-02 21:05:21 +0000 (+0000), Kyle Mestery (kmestery) wrote:
> [...]
>> remote: New Changes:
>> remote:   https://review.openstack.org/35384
>> remote: 
>> To ssh://mestery@review.openstack.org:29418/openstack/quantum.git
>> ! [remote rejected] HEAD -> refs/publish/master/bp/ml2-vxlan (no changes made)
>> error: failed to push some refs to 'ssh://mestery@review.openstack.org:29418/openstack/quantum.git'
> [...]
>> In addition, my commit seen at the review URL above does not show
>> the dependancy. Any ideas now?
> [...]
> 
> Based on your description of what transpired, it sounds like you
> also rebased 33297 (the change on which your 35384 change was
> supposed to depend), but it was rejected with the above error while
> not being the same actual commit which Gerrit had. 35384 claims its
> parent commit is 91e0850, which is not a gitsha Gerrit knows for
> 33297 (latest patchset for it is 4421cc1).
> 
> I believe, but would need to test to confirm, that Aaron's mentioned
> the other piece of this puzzle and the "no rebase" -R flag is
> incompatible with attempting to push multiple changes which have
> been updated. It used to be the case that git-review always tried to
> rebase unless you used -R, but with more recent releases it will
> avoid rebasing except when absolutely necessary. I pretty much never
> use -R at this point.
> 
> Of course now attempting to re-submit that top patch probably isn't
> going to work anyway without making some minor change to it, since
> Gerrit will see that it hasn't changed. I tried downloading 35384
> and then rewinding with 'git checkout 91e0850' and resubmitting that
> via git review, but it seems Gerrit still sees that as the same as
> 4421cc1 and refuses it. Instead I retrieved and stacked them as they
> stand now with...
> 
>    git review -d 33297
>    git review -x 35384
>    git review
> 
> ...and that seems to have worked...
> 
>    fungi at hastur:~/work/openstack/quantum$ git review
>    You are about to submit multiple commits. This is expected if you are submitting a commit that is dependant on one or more in-review commits. Otherwise you should consider squashing your changes into one commit before submitting.
>    The outstanding commits are:
> 
>    a453866 (HEAD, review/mathieu_rohon/bp/ml2-vxlan) Add VXLAN tunneling support for the ML2 plugin
>    4421cc1 Add gre tunneling support for the ML2 plugin
> 
>    Do you really want to submit the above commits?
>    Type 'yes' to confirm, other to cancel: yes
>    remote: Resolving deltas: 100% (12/12)
>    remote: Processing changes: updated: 1, done    
>    remote: (W) a453866: no files changed, was rebased
>    To ssh://fungi@review.openstack.org:29418/openstack/quantum.git
>     * [new branch]      HEAD -> refs/publish/master/bp/ml2-vxlan
> 
> Hope that helps?

That really helps a lot, thanks for the detailed analysis Jeremy! I see where
I went wrong. I'll try to condense this down a bit and update the wiki page I
referenced earlier in this thread, as it still recommends using "git review -R"
for this type of operation.

Appreciate the help!

Kyle


More information about the OpenStack-dev mailing list