From: Thanh Ha Date: Sun, 11 Mar 2018 05:06:12 +0000 (-0500) Subject: How to update patches with dependent changes X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=bc9d2cea7c5e82cebfef74e84955ca0d8bc63499;p=releng%2Fdocs.git How to update patches with dependent changes Add details on how to update patches that have dependent changes in Gerrit. Issue: https://jira.opendaylight.org/browse/DOCS-21 Change-Id: Id4cd47bcb6e6aee08ae64a2d6e19153e14c3c5f4 Signed-off-by: Thanh Ha --- diff --git a/docs/gerrit.rst b/docs/gerrit.rst index 2b05a47..266f449 100644 --- a/docs/gerrit.rst +++ b/docs/gerrit.rst @@ -312,6 +312,32 @@ You will receive 2 emails from Gerrit Code Review: the first indicating that a b to incorporate your changes has started; and the second indicating the creation of the build. +Update a patch with dependent changes +===================================== + +In the case where a patch depends on another in review Gerrit patch, we will +need to rebase the commit against the latest patchset of the dependent change +in Gerrit. The best way to do this is to retrieve the latest version of the +dependent change and then cherry-pick our patch on top of the change. + +#. Fetch latest parent patch set + + .. code-block:: bash + + git review -d + +#. Cherry-pick out patch on top + + .. code-block:: bash + + git review -x + +#. Push patch back up to Gerrit + + .. code-block:: bash + + git review -R + Code Review ===========