[openstack-dev] Gerrit shortcut question

Jay Pipes jaypipes at gmail.com
Mon May 12 18:08:06 UTC 2014


You can do that with:

git fetch --all
git review -d <PATCH_NUM>
git rebase master

Best,
-jay


On Mon, May 12, 2014 at 1:03 PM, Lowery, Mathew <mlowery at ebay.com> 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):
>
>  Checkout git fetch https://review.openstack.org/openstack/troverefs/changes/09/88709/11 && git checkout FETCH_HEAD
> Cherry-Pick git fetch https://review.openstack.org/openstack/troverefs/changes/09/88709/11 && git cherry-pick FETCH_HEAD
> Format-Patch git fetch https://review.openstack.org/openstack/troverefs/changes/09/88709/11 && git format-patch -1 --stdout FETCH_HEAD
> Pull git pull https://review.openstack.org/openstack/troverefs/changes/09/88709/11
> Patch-File 629016b.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/troverefs/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?
>
>  Thanks for any help,
> Mat
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140512/443ac952/attachment.html>


More information about the OpenStack-dev mailing list