<div dir="ltr">Sounds interesting... the link <a href="https://docs.openstack.org/infra/git-restack/" style="color:rgb(85,26,139);text-decoration:none;border-bottom-width:1px;border-bottom-style:dashed;border-bottom-color:rgb(204,204,204);font-family:Arial,Verdana,Geneva,'Bitstream Vera Sans',Helvetica,sans-serif;font-size:14.6404px;line-height:21.9606px">https://docs.openstack.org/infra/git-restack/</a> referenced as the home page in PyPI is a broken link.<div><br></div><div>Regards,</div><div><br></div><div>PCM</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 2, 2016 at 12:54 PM James E. Blair <<a href="mailto:corvus@inaugust.com">corvus@inaugust.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm pleased to announce a new and very simple tool to help with managing<br>
large patch series with our Gerrit workflow.<br>
<br>
In our workflow we often find it necessary to create a series of<br>
dependent changes in order to make a larger change in manageable chunks,<br>
or because we have a series of related changes. Because these are part<br>
of larger efforts, it often seems like they are even more likely to have<br>
to go through many revisions before they are finally merged. Each step<br>
along the way reviewers look at the patches in Gerrit and leave<br>
comments. As a reviewer, I rely heavily on looking at the difference<br>
between patchsets to see how the series evolves over time.<br>
<br>
Occasionally we also find it necessary to re-order the patch series, or<br>
to include or exclude a particular patch from the series. Of course the<br>
interactive git rebase command makes this easy -- but in order to use<br>
it, you need to supply a base upon which to "rebase". A simple choice<br>
would be to rebase the series on master, however, that creates<br>
difficulties for reviewers if master has moved on since the series was<br>
begun. It is very difficult to see any actual intended changes between<br>
different patch sets when they have different bases which include<br>
unrelated changes.<br>
<br>
The best thing to do to make it easy for reviewers (and yourself as you<br>
try to follow your own changes) is to keep the same "base" for the<br>
entire patch series even as you "rebase" it. If you know how long your<br>
patch series is, you can simply run "git rebase -i HEAD~N" where N is<br>
the patch series depth. But if you're like me and have trouble with<br>
numbers other than 0 and 1, then you'll like this new command.<br>
<br>
The git-restack command is very simple -- it looks for the most recent<br>
commit that is both in your current branch history and in the branch it<br>
was based on. It uses that as the base for an interactive rebase<br>
command. This means that any time you are editing a patch series, you<br>
can simply run:<br>
<br>
git restack<br>
<br>
and you will be placed in an interactive rebase session with all of the<br>
commits in that patch series staged. Git-restack is somewhat<br>
branch-aware as well -- it will read a .gitreview file to find the<br>
remote branch to compare against. If your stack was based on a<br>
different branch, simply run:<br>
<br>
git restack <branchname><br>
<br>
and it will use that branch for comparison instead.<br>
<br>
Git-restack is on pypi so you can install it with:<br>
<br>
pip install git-restack<br>
<br>
The source code is based heavily on git-review and is in Gerrit under<br>
openstack-infra/git-restack.<br>
<br>
<a href="https://pypi.python.org/pypi/git-restack/1.0.0" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/git-restack/1.0.0</a><br>
<a href="https://git.openstack.org/cgit/openstack-infra/git-restack" rel="noreferrer" target="_blank">https://git.openstack.org/cgit/openstack-infra/git-restack</a><br>
<br>
I hope you find this useful,<br>
<br>
Jim<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>