Hi Evgeny, I’m not sure I’m doing it in the most efficient way, so I’d love to hear pointers, but what I’ve been doing:
First, to setup the dependent commit, the command is “git review –d”. I’ve been using this guide: http://www.mediawiki.org/wiki/Gerrit/Advanced_usage#Create_a_dependency Second, when the dependent review changes, there is a ‘rebase’ button on gerrit that’ll get things back in sync automatically. Third, if you need to change your code after rebasing from gerrit, this is the only sequence I’ve tried that doesn’t result in something weird (rebasing overwrites the dependent commits, silently, so I’m clearly doing something wrong): 1. Re-clone vanilla neutron 2. Cd into new clone, setup for gerrit review 3. Redo dependent commit setup 4. Create your topic branch 5. Cherry-pick your commit from gerrit into your new topic branch 6. Use "git log -n5 --decorate --pretty=oneline”, and verify that your dependency commit hashes match what’s in gerrit. 7. Git review Thanks, doug From: Evgeny Fedoruk <[email protected]<mailto:[email protected]>> Reply-To: "OpenStack Development Mailing List (not for usage questions)" <[email protected]<mailto:[email protected]>> Date: Tuesday, July 29, 2014 at 7:12 AM To: "OpenStack Development Mailing List (not for usage questions)" <[email protected]<mailto:[email protected]>> Subject: [openstack-dev] [Neutron] Managing change in gerrit which depends on multiple other changes in review Hi folks, I’m working on a change for neutron LBaaS service. Since there is a massive work done for LBaaS these days, my change depends on other changes being reviewed in parallel in gerrit. I don’t have a big git knowledge and I’m failing in figuring out the right procedure that should be followed for managing such a multi-dependent patch. So, I sending my question to you guys, in hope to find the right way to manage such patches in gerrit. Here is the situation: There are 4 patches on review in gerrit 1. A – No dependencies 2. B – Depends on A 3. C – Depends on A 4. D – No dependencies My change, let’s call it “X”, is already on review in gerrit. It should depend on all four other changes, A, B, C and D. I tried to two ways of managing those dependencies, 1) by doing a cherry-pick for each one of them, and 2) by doing git review and git rebase for each one of them. It does not work for me well, my change commit message is replaced by other changes’ commit messages and when I commit my patch, it commit’s other changes patches too. So, my question is: Is this scenario supported by gerrit system? If it does – what is the right procedure to follow in order to manage those dependencies and how to rebase my change when some of dependencies was commited with a new patch to keep the dependencies up-to-date? Thank you! Evg
_______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
