[openstack-dev] [Neutron][LBaaS] Failure when trying to rebase to latest v2 patches

Brandon Logan brandon.logan at RACKSPACE.COM
Mon Aug 18 06:31:00 UTC 2014


Hey Vijay,
The reason that didn't work is because the netscaler-lbaas-driver-v2 had an older patch set of the 105610 change.  That means it was an entirely different commit so after you rebased you ended up having two commits with a duplicate commit message (which means duplicate Change-IDs).  Git doesn't know that they are duplicate because they have different commit hashes, so to git it looks like two totally different commits.

I pretty much do exactly what Doug said, except I don't reclone.  When you do git review -d it essentially just does a git checkout of that review and creates a new local branch.  If you just copied the checkout link in gerrit and ran that it would just put you in a detached head state.  Either one works, because you can still cherry-pick commits from either state and git review will still work as well.

The gerrit UI's rebase button is easy to use but you should probably only use it if you have nothing to change.  Otherwise, do the git review -d and cherry-pick method.

Thanks,
Brandon
________________________________________
From: Vijay Venkatachalam [Vijay.Venkatachalam at citrix.com]
Sent: Sunday, August 17, 2014 11:51 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [Neutron][LBaaS] Failure when trying to rebase to latest v2 patches

This worked. Thanks!

But this procedure requires to clone again.

I wonder why rebase didn’t work and cherry pick worked. May be I should tried the gerrit UI.

As said in the earlier mail to Brandon, this is what I did.

# netscaler-lbaas-driver-v2  == the topic branch where I had my original changes.
git checkout netscaler-lbaas-driver-v2
git review -d 105610
# the above command pulls the latest dependent changes into "review/brandon_logan/bp/lbaas-api-and-objmodel-improvement"
git checkout netscaler-lbaas-driver-v2
git rebase -i "review/brandon_logan/bp/lbaas-api-and-objmodel-improvement"
# At this point the rebase didn’t succeed, I resolved the conflicts
git add <files_that_are_resolved>
git commit -a --amend
git review
#At this point I got the errors.

Thanks,
Vijay V.
-----Original Message-----
From: Doug Wiegley [mailto:dougw at a10networks.com]
Sent: 18 August 2014 08:54
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [Neutron][LBaaS] Failure when trying to rebase to latest v2 patches

>From the looks of your error, you at least have a problem with more than one commit in your topic branch.

Here¹s the process that I use.  I¹m not claiming it¹s the best, but it works without rewriting Brandon¹s commits.  Watch the git log at the end, and make sure the dependent hashes match what¹s in gerrit, before the Œgit
review¹:

git clone https://review.openstack.org/openstack/neutron
neutron-juno-update1
cd neutron-juno-update1/
git review -d 105610
git checkout -b bp/a10-lbaas-driver
*cherry-pick your commit from gerrit* (e.g. git fetch https://review.openstack.org/openstack/neutron refs/changes/37/106937/26 && git cherry-pick FETCH_HEAD) *resolve conflicts* git cherry-pick ‹continue *make changes* git commit -a --amend git log -n5 --decorate --pretty=oneline git review

If you¹re not making any changes, then you can just hit the Œrebase¹ button in the gerrit ui.

Thanks,
doug



On 8/17/14, 8:19 PM, "Vijay Venkatachalam"
<Vijay.Venkatachalam at citrix.com> wrote:

>Hi Brandon,
>
>I am trying to rebase Netscaler driver to the latest v2 patches as
>mentioned in https://wiki.openstack.org/wiki/GerritWorkflow
>But it failed during review submit
>
>It failed with the following error
>========
>remote: Processing changes: refs: 1, done To
>ssh://vijayvenkatachalam@review.openstack.org:29418/openstack/neutron.g
>it
> ! [remote rejected] HEAD ->
>refs/publish/master/bp/netscaler-lbass-v2-driver (squash commits first)
>error: failed to push some refs to
>'ssh://vijayvenkatachalam@review.openstack.org:29418/openstack/neutron.
>git
>'
>========
>
>Any clues on how to proceed?
>
>Thanks,
>Vijay V.
>_______________________________________________
>OpenStack-dev mailing list
>OpenStack-dev at lists.openstack.org
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list