[openstack-dev] Gerrit shortcut question
Lowery, Mathew
mlowery at ebay.com
Mon May 12 18:23:51 UTC 2014
Thanks Sean and Jay.
The point in asking was to understand if I was doing something wrong
because the behavior I wanted wasn't in Gerrit UI. Both of you suggested
git review -d which makes sense.
Thanks again.
On 5/12/14, 1:10 PM, "Sean Dague" <sean at dague.net> wrote:
>On 05/12/2014 01:03 PM, Lowery, Mathew wrote:
>> Gerrit supplies the following "shortcuts" for any change (in the "new
>> screen", there's a Download drop down in the top right or for the "old
>> screen", it's just under the Patch Set heading):
>>
>> Checkoutgit fetch https://review.openstack.org/openstack/trove
>> refs/changes/09/88709/11 && git checkout FETCH_HEAD
>> Cherry-Pickgit fetch https://review.openstack.org/openstack/trove
>> refs/changes/09/88709/11 && git cherry-pick FETCH_HEAD
>> Format-Patchgit fetch https://review.openstack.org/openstack/trove
>> refs/changes/09/88709/11 && git format-patch -1 --stdout FETCH_HEAD
>> Pullgit pull https://review.openstack.org/openstack/trove
>> refs/changes/09/88709/11
>> Patch-File629016b.diff.base64 | 629016b.diff.zip
>>
>> I have questions regarding these shortcuts, specifically in the context
>> of Gerrit dependencies (i.e. one Gerrit change depends on another Gerrit
>> change) Let's say my ultimate goal is to get the patch set including its
>> dependencies and apply those to the latest master because I want to do
>> some manual testing. Below is my understanding of the existing options
>> (feel free to correct any incorrect statements):
>>
>> * Checkout grabs the original sequence of commits as they were at
>> submit time. In other words, all the parent commits are the same as
>> when the patch set was submitted. The master and the parent
>> dependencies could have all advanced or changed.
>> * Cherry-pick applies the diff introduced by the named patch set
>> alone. Parent dependencies are not involved.\
>> * Format-patch: I don't know when to use this.
>> * Pull: By default this will merge the two branches (and create a
>> merge commit). However, I have pulls configured to always rebase.
>> When the pull does a rebase, the patch set and its dependencies do
>> not appear as the most recent commits which I find not ideal.
>> * Patch-File: Isn't this a portable cherry-pick? How does it relate to
>> format-patch?
>>
>> So that summarizes my understanding of the current shortcuts.
>>
>> What (I think) I want (that is not provided) is this:
>>
>> git fetch https://review.openstack.org/openstack/trove
>> refs/changes/09/88709/11 && git checkout FETCH_HEAD && git
>> fetch https://review.openstack.org/openstack/trove master && git rebase
>> FETCH_HEAD
>>
>> In other words, fetch the patch set with dependencies then check it out
>> (detached head). Fetch the latest master then rebase the patch set (and
>> dependencies) on the latest master. End result: latest master with patch
>> set and all dependencies as the most recent commits.
>>
>> Am I missing something fundamental or would this be a useful shortcut to
>> have?
>
>Is there a reason you aren't just using git-review for this?
>
>git review -d 88709 && git rebase master
>
> -Sean
>
>--
>Sean Dague
>http://dague.net
>
More information about the OpenStack-dev
mailing list