<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>upstreaming Archives &#8211; Structured Procrastination</title>
	<atom:link href="https://blog.adamspiers.org/tag/upstreaming/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.adamspiers.org/tag/upstreaming/</link>
	<description>because there&#039;s always something more interesting than what you should be doing</description>
	<lastBuildDate>Tue, 19 Jun 2018 13:18:19 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://blog.adamspiers.org/wp-content/uploads/2018/12/cropped-IMG_20160907_193859-PANO-c-7-32x32.jpg</url>
	<title>upstreaming Archives &#8211; Structured Procrastination</title>
	<link>https://blog.adamspiers.org/tag/upstreaming/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</title>
		<link>https://blog.adamspiers.org/2018/06/14/git-auto-magic/</link>
					<comments>https://blog.adamspiers.org/2018/06/14/git-auto-magic/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 14 Jun 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[backporting]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forward-porting]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[upstreaming]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1655</guid>

					<description><![CDATA[<p>For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous HackWeek policy to work on building four tools supporting higher-level workflows on top of git. I&#8217;d already (quietly) announced three of them: git-splice, git-transplant, git-deps (more details below). But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: git-explode ! [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous <a href="https://hackweek.suse.com/about">HackWeek</a> policy to work on building four tools supporting higher-level workflows on top of <code>git</code>.  I&#8217;d already (quietly) announced three of them: <code>git-splice</code>, <code>git-transplant</code>, <code>git-deps</code> (more details below).  But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: <a href="https://github.com/aspiers/git-explode"><code>git-explode</code></a> ! </p>
<p> <code>git-explode</code> automatically explodes a large topic branch into a set of smaller, independent topic branches.  It does this by harnessing <code>git-deps</code> to automatically detect inter-dependencies between commits in the large source branch and using that dependency tree to construct the smaller topic branches. </p>
<p> I recently presented all four tools at a Meetup of the <a href="http://londongit.org/">Git London User Group</a>, and thanks to the awesome services of the host venue <a href="https://skillsmatter.com/">Skills Matter</a>, I&#8217;m delighted to announce that the <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">talk is now online</a>: </p>
<div class="figure">
<p><a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic" width="99%" align="center" alt="video of my talk on git auto-magic at the Git London User Group Meetup" title="my talk on git auto-magic at the Git London User Group Meetup"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2018/06/automagic.png" alt="video of my talk on git auto-magic at the Git London User Group Meetup" width="99%" align="center" title="my talk on git auto-magic at the Git London User Group Meetup" /></a> </p>
</p></div>
<p> If you don&#8217;t have time to watch the whole thing, you can look at <a href="https://aspiers.github.io/london-git-automagic-may-2018/">the slides</a>, or just keep on reading to see which ones you might be interested in.  I&#8217;ll list them first, and then talk about the motivation for writing them. </p>
<p><span id="more-1655"></span></p>
<div id="outline-container-orge9751bc" class="outline-2">
<h2 id="orge9751bc">The tools</h2>
<div class="outline-text-2" id="text-orge9751bc">
<p> The first pair are available as patches to <code>git</code> itself: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/git/git/compare/master...aspiers:splice">git-splice</a> &#8211; splices commits onto/into/out of current branch </p>
<p> Jump to 08:44 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/splice-transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/splice/Documentation/git-splice.txt">read the man page</a> for example usage. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git/compare/splice...transplant">git-transplant</a> &#8211; transplants commits from current branch onto/into another </p>
<p> Jump to 32:22 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/transplant/Documentation/git-transplant.txt">read the man page</a> for example usage. </p>
</li>
</ul>
<p> The second pair are available as Python modules on PyPI, but both have a command-line interface too: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/aspiers/git-deps">git-deps</a> &#8211; automatically detects textual dependencies between commits </p>
<p> Jump to 41:28 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/deps">look at the slides</a>, or <a href="https://github.com/aspiers/git-deps/blob/master/README.md">read the README</a> (which has a couple of short YouTube videos demoing the tool including the fancy web interface), or read <a href="https://blog.adamspiers.org/git-deps">my previous blog post about this</a>. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git-explode">git-explode</a> &#8211; explodes a linear sequence of git commits into new independent topic branches </p>
<p> Jump to 51:10 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/firework">look at the slides</a>, or <a href="https://github.com/aspiers/git-explode/blob/master/README.rst">read the README</a>. </p>
</li>
</ul>
<p> It&#8217;s taken a while to get them to a reasonable degree of polish, during which this work has been mostly under the radar, but now I&#8217;m now going to make a more concerted effort to advertise the tools, hence this blog post. </p>
</div>
</div>
<div id="outline-container-org7927f37" class="outline-2">
<h2 id="org7927f37">The Big Idea</h2>
<div class="outline-text-2" id="text-org7927f37">
<p> (Jump to 02:27 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me talk about this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/problems">look at the slides</a>.) </p>
<p> All developers face common problems: </p>
<ul class="org-ul">
<li>It&#8217;s difficult to predict what you&#8217;ll be doing next.  One minute you might be working on a feature, the next you find a bug you need to fix, and the next you find some technical debt which requires refactoring.</li>
<li>Multi-tasking is almost unavoidable.</li>
<li>We&#8217;re human, so we sometimes screw up when trying to follow best practice workflow.</li>
</ul>
<p> What does this mean when using <code>git</code>?  Typically it means we are constantly juggling branches, and often need to manipulate the history of branches for various reasons, for example: </p>
<ul class="org-ul">
<li>Maintaining clean separation of topics between branches to facilitate code reviews: one branch for a refactoring, one for a bugfix, one for a feature, and so on.</li>
<li><a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">Backporting or forward-porting series of patches between branches.</a></li>
</ul>
<p> My feeling is that while the <code>git</code> ecosystem has continued to evolve incrementally over the last few years, not much progress has been made in terms of automating this janitorial work, and that most people either do it by hand, or don&#8217;t bother doing it at all.  This leads to unclean history, and/or more work and frustration for reviewers. </p>
<p> So I wrote these tools (<a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">and others</a>) in an attempt to push the boundaries of automating git workflows to higher levels, <a href="https://public-inbox.org/git/20170801011421.veyuviur3mi4hjir@pacific.linksys.moosehall/">as I explained on the <code>git</code> mailing list last year</a>.  Even if all the use cases they can cover have yet to be discovered, I hope you find them useful, or at least thought-provoking enough that you might join the effort! </p>
<p> I&#8217;d love some feedback, so do let me know what you think in the comments below. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2018%2F06%2F14%2Fgit-auto-magic%2F&#038;title=git%20branch%20auto-magic%3A%20git-splice%2C%20git-transplant%2C%20git-deps%2C%20and%20announcing%20git-explode%21" data-a2a-url="https://blog.adamspiers.org/2018/06/14/git-auto-magic/" data-a2a-title="git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2018/06/14/git-auto-magic/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title>Easier upstreaming / back-porting of patch series with git</title>
		<link>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/</link>
					<comments>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 19 Sep 2013 20:22:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[backporting]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forward-porting]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[upstreaming]]></category>
		<category><![CDATA[version control]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=981</guid>

					<description><![CDATA[<p>Have you ever needed to port a selection of commits from one git branch to another, but without doing a full merge? This is a common challenge, e.g. forward-porting / upstreaming bugfixes from a stable release branch to a development branch, or back-porting features from a development branch to a stable release branch. Of course, [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/">Easier upstreaming / back-porting of patch series with git</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Have you ever needed to port a selection of commits from one <a href="http://git-scm.com/">git</a> branch to another, but without doing a full merge?  This is a common challenge, e.g. </p>
<ul class="org-ul">
<li>forward-porting / upstreaming bugfixes from a stable release branch to a development branch, or
</li>
<li>back-porting features from a development branch to a stable release branch.
</li>
</ul>
<p> Of course, git already goes quite some way to making this possible: </p>
<ul class="org-ul">
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html"><code>git cherry-pick</code></a> can port individual commits, or even a range of commits (since git 1.7.2) from anywhere, into the current branch.
</li>
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry.html"><code>git cherry</code></a> can compare a branch with its upstream branch and find which commits have been upstreamed and which haven&#8217;t.  This command is particularly clever because, thanks to <a href="https://www.kernel.org/pub/software/scm/git/docs/git-patch-id.html"><code>git patch-id</code></a>, it can correctly spot when a commit has been upstreamed, even when the upstreaming process resulted in changes to the commit message, line numbers, or whitespace.
</li>
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-rebase.html"><code>git rebase --onto</code></a> can transplant a contiguous series of commits onto another branch.
</li>
</ul>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">It&#8217;s not always that easy &#x2026;</h2>
<div class="outline-text-2" id="text-1">
<p> However, on the occasions when you need to sift through a larger number of commits on one branch, and port them to another branch, complications can arise: </p>
<ul class="org-ul">
<li>If cherry-picking a commit results in changes to its patch context, <code>git patch-id</code> will return a different SHA-1, and subsequent invocations of <code>git cherry</code> will incorrectly tell you that you haven&#8217;t yet ported that commit.
</li>
<li>If you mess something up in the middle of a <code>git rebase</code>, recovery can be awkward, and <code>git rebase --abort</code> will land you back at square one, undoing a lot of your hard work.
</li>
<li>If the porting process is big enough, it could take days or even weeks, so you need some way of reliably tracking which commits have already been ported and which still need porting.  In this case you may well want to adopt a divide-and-conquer approach by sharing out the porting workload between team-mates.
</li>
<li>The more the two branches have diverged, the more likely it is that conflicts will be encountered during cherry-picking.
</li>
<li>There may be commits within the range you are looking at which after reviewing, you decide should be excluded from the port, or at least porting them needs to be postponed to a later point.
</li>
</ul>
<p> It could be argued that all of these problems can be avoided with the right branch and release management workflows, and I don&#8217;t want to debate that in this post.  However, this is the real world, and sometimes it just happens that you have to deal with a porting task which is less than trivial.  Well, that happened to me and my team not so long ago, so I&#8217;m here to tell you that I have written and published some tools to solve these problems.  If that&#8217;s of interest, then read on! </p>
<p><span id="more-981"></span>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Building tools around <code>git notes</code></h2>
<div class="outline-text-2" id="text-2">
<p> Since <code>git patch-id</code> doesn&#8217;t guarantee to return an SHA-1 which is stable enough for us to always depend on, we need some other way of reliably tracking which commits have been upstreamed, and where upstreamed commits came from.  It would also be useful to be able to mark selected commits as <i>blacklisted</i>, i.e. permanently excluded from the current porting process, or at least as <i>deferred</i>, i.e. <i>temporarily</i> excluded. </p>
<p> Of course, we could do that simply by maintaining an out-of-band text file somewhere outside the repositories in question, but that doesn&#8217;t integrate at all with existing git workflows.  Whilst pondering these challenges, I discovered a little-known and seldom-used feature of git, which is the ability to attach arbitrary text as notes on a given commit, via the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-notes.html"><code>git notes</code></a> command.  &#8220;This sounds perfect!&#8221;, I thought, and actually as it turned out, it served as a pretty nice foundation for some higher-level tools which needed building: </p>
<ul class="org-ul">
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-icing">git-icing</a> &#8211; an &#8220;interface-candy&#8221; wrapper around git cherry which adds a splash of colour, and checks for specially formatted notes attached to commits which indicate that those commits are temporarily or permanently excluded from the upstreaming backlog
</li>
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-cherry-menu">git-cherry-menu</a> &#8211; an interactive wrapper around <code>git-icing</code> and <code>git-notes</code> which makes it easy to cherry-pick and/or blacklist non-upstreamed commits
</li>
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes">git-rnotes</a> &#8211; a wrapper around <code>git notes</code> which makes it easier to share notes to and from remote repositories
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">A &#8220;real world&#8221; example</h2>
<div class="outline-text-2" id="text-3">
<p> Let&#8217;s see how this works in practice, by pretending we need to backport a bunch of commits from <a href="https://github.com/openstack/nova">OpenStack Nova</a>&#8216;s <code>master</code> branch to its <code>stable/grizzly</code> release branch. </p>
<div class="org-src-container">
<pre class="src src-text">$ git clone git@github.com:openstack/nova.git
Cloning into 'nova'...
remote: Counting objects: 208984, done.
remote: Compressing objects: 100% (54766/54766), done.
remote: Total 208984 (delta 167220), reused 188334 (delta 148279)
Receiving objects: 100% (208984/208984), 124.50 MiB | 4.42 MiB/s, done.
Resolving deltas: 100% (167220/167220), done.
$ cd nova
</pre>
</div>
<p> Now, <code>master</code> has changed a <b>lot</b> since <code>grizzly</code> was released, so let&#8217;s keep our pretend project to a manageable size by only attempting to backport only commits which appeared in the first few days after the stable branch was established: </p>
<div class="org-src-container">
<pre class="src src-text">$ git describe $( git merge-base origin/stable/grizzly master )
2013.1.rc1
$ git show 2013.1.rc1 | head -n3
tag 2013.1.rc1
Tagger: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
Date:   Wed Mar 20 17:13:32 2013 +0100
</pre>
</div>
<p> OK, so <code>grizzly</code> was branched at the point where the first release candidate was tagged.  That makes sense.  Now let&#8217;s choose a point about 5 days later: </p>
<div class="org-src-container">
<pre class="src src-text">$ git rev-list --no-merges --before='25 March 2013' origin/stable/grizzly..master | head -n1
d6a9d38a0b7488dd77d3a01ae9c4171c271d7314
$ git tag to-backport d6a9d38
</pre>
</div>
<p> &#x2026; and get ready to backport commits from <code>to-backport</code> back into our local <code>stable/grizzly</code> branch: </p>
<div class="org-src-container">
<pre class="src src-text">$ git checkout stable/grizzly
Branch stable/grizzly set up to track remote branch stable/grizzly from origin.
Switched to a new branch 'stable/grizzly'
</pre>
</div>
<p> (If you are following along at home, your <code>rev-list</code> will give a different result, since <code>origin/stable/grizzly</code> will have changed since I wrote this.  Don&#8217;t worry &#8211; just copy the <code>git tag</code> command above verbatim, and create your local grizzly branch via <code>git checkout -b stable/grizzly fc9af8f0a9</code> so that it points to the same place mind did when writing this article.) </p>
<p> At this point, two quick clarifications are needed, because things can get a bit confusing. </p>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">A quick aside: some observations on terminology</h2>
<div class="outline-text-2" id="text-4">
<p> Firstly, if you read the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry.html"><code>git cherry</code> man page</a> or <code>-h</code> usage text, it is described as a tool to &#8220;find commits not merged upstream&#8221;, with the expectation that you would cherry-pick the commits it finds <i>onto</i> the upstream branch.  But if you happen to be backporting, then the cherry-picking will happen in the <i>opposite</i> direction, so the &#8220;upstream&#8221; referred to by the man page is actually the real downstream, and vice-versa.  Confused yet?  If so, wherever you read the word &#8220;upstream&#8221; in the <code>git cherry</code> documentation / help text, pretend that you actually read &#8220;target&#8221;.  Then just think of &#8220;source&#8221; and &#8220;target&#8221; branches, and remember that the process is always to look for commits in the source which are not yet in the target, and then cherry-pick those into the target (or decide that you don&#8217;t want to). The same applies for the <code>git icing</code> and <code>cherry-menu</code> help text. </p>
<p> Secondly, normally we&#8217;d be porting from one branch to another, not from a tag to a branch.  But in this artificially constructed scenario, it wouldn&#8217;t make much sense to create a <code>to-backport</code> <i>branch</i> pointing to <code>d6a9d38</code>, because that branch isn&#8217;t going to move; the only branch which will be changing is our <code>stable/grizzly</code> branch, as we cherry-pick stuff into it.  In other words, the target has to be a branch, because that will change during the cherry-picking, but the source can be a branch / tag / ref / commit SHA-1 &#x2026; basically anything which <a href="https://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html"><code>git rev-parse</code></a> understands. </p>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5">How far behind?</h2>
<div class="outline-text-2" id="text-5">
<p> When embarking on a porting project, the first question is usually &#8220;how much work is this going to be?&#8221;  Fortunately <code>git-icing</code> is here to help! </p>
<p> (By the way, if you want to follow along with the below by trying this yourself, simply download the three scripts either from the links above or </p>
<div class="org-src-container">
<pre class="src src-text">git clone https://github.com/aspiers/git-config
</pre>
</div>
<p> and then copy them to any directory on your <code>$PATH</code>, making sure that they are executable.) </p>
<p> <code>git-icing</code> is designed to be invoked in exactly the same way as <code>git cherry</code>, but it has some extra options, including the convenient <code>--summary</code> option, and a verbosity parameter which controls which categories of commits are displayed: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -h
usage: git icing [options] [git cherry args]

    -v, --verbosity [N]              Set verbosity level
    -s, --summary                    Show summary

first | verbosity | description of
field |   level   | classification
------+-----------+-----------------------------------------------------
  +   |     1     | not yet upstream
  !   |     1     | still needs to be upstreamed, tracked on a TODO list
  .?  |     1     | upstream *and* blacklisted?!
  !?  |     1     | upstream *and* marked as a TODO?
  .   |     2     | blacklisted - should not be pushed to this upstream
  ?   |     2     | not yet upstream, with unparseable note
  -   |     3     | already upstream
  #   |     3     | already upstream with an annotation note
</pre>
</div>
<p> (When you run that on a colour-capable terminal, you&#8217;ll also see that the classifications are also nicely colour-coded so that commits which require attention naturally capture your eye more than those which don&#8217;t.) </p>
<p> Let&#8217;s see all commits (basically a colour-coded version of what <code>git cherry</code> would show us), plus a summary of the status quo: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 --summary stable/grizzly to-backport
+ 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
+ f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list
+ dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb Enable tox use of site-packages for libvirt.
- 76844433f69a7c29ed4566ad34d7e9740feaf660 Add caching for ec2 mapping ids.
+ def5fa1e0e1c0426d973e4d8e3935c6eb18698dc Set version to 2013.2
+ 3aa80834e6aab2456f0f5229a63c2dcef007cb36 Change type of ssh_port option from Str to Int
+ 26aa01094a79939320d58f2fe2d5731f169987b1 Change arguments to volume_detach()
+ b52a2157bedba693c5da7dcb783b7a151769d6b1 Add placeholder migrations to allow backports.
+ 8d5159dd6dd36d6f3d1aadc1123574c5b0aa0614 Don't actually connect to libvirtd in unit tests.
+ 8cd5f862ac071023d5a7984f07513e5aa91f7d3d Bring back sexy colorized test results.
- 45e65d8c0301da689de1afcbc9f45756e71097ab Update instance network info cache to include vif_type.
- b8f9815c5ab61466009c0447f54abc4c309e4e3f nova-manage vm list fails looking 'instance_type'
+ c199fd6fa39311305b5b5d94c2e3732b826a6414 Remove outdated try except block in ec2 code
- 03a2463be8034ee4764ac97e8020fc3d3a32f1fd Make nova.virt.fake.FakeDriver useable in integration testing
- 67628c56caf9d84588a92448880ecdb33eea08b4 Fixes passing arbitrary conductor_api argument
+ e136de1aea8d1469465272942fa3d2769cbe3a80 xenapi: fix console for rescued instance
+ 5df18f6b915cf49ac8559274a631f1366eab00fd Add a comment to placeholder migrations.
- 9075069098e32b47bd5011e2653a23b61c18d4a3 Initialize compute manager before loading driver.
- 3801a4d2f4c59dbfda49131ddde22fcb3976d651 translate cinder BadRequest exception
- 132a0c1fd1eb127e393e5794ffa6d4a3a4950567 Don't log traceback on rpc timeout.
+ 81204d4020712cf5b5b368b75d934d637b2c001b Sync rpc from oslo-incubator.
+ f665d798234c19cccc148a178e94c3717ba8bd6e Sync everything from oslo-incubator.
- 12f7d6332a731421d6e2a190ac60828c1cf98910 Reset ec2 image cache between S3 tests.
+ 7a9ce26aaf03459a7ea367fbdb91d91626a1ee93 py2.6 doesn't support TextTestRunner resultclass
- 5908b60b0420f1ad528e56b0c147a330e9a1a5d6 Make _downsize_quota_delta() use stashed instance types
+ 91b9c208f0c6e21759c7828aa42b3216853be425 disable colorizer as it swallows fails
+ df0560f0353bc0837cc62cfaa9029d21d45c529e Imported Translations from Transifex
+ d6a9d38a0b7488dd77d3a01ae9c4171c271d7314 set up FakeLogger for root logger.

Summary
=======

11 commits processed:
    11 already upstream

18 commits remaining:
    18 not yet upstream

Progress: 11 / 29 commits (37%)
</pre>
</div>
<p> OK, not bad!  We didn&#8217;t even do any real work yet, we&#8217;re already 37% of the way through.  That&#8217;s because some of the commits (the ones prefixed by <code>-</code>) have already been cherry-picked into <code>stable/grizzly</code>.  Let&#8217;s prove this for the first commit prefixed by <code>-</code> in the above output, which was <code>775e3b02</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log -n1 775e3b02
commit 775e3b02b2afbf101db22b87a1c3b189d68532e1
Author: Kieran Spear <a href="mailto:kispear%40CENSORED.com">&lt;kispear@CENSORED.com&gt;</a>
Date:   Mon Mar 18 17:32:26 2013 +1100

    Pass project id in quantum driver secgroup list

    The quantum driver is always returning security groups from every tenant
    a user has access to, even when the "project" filter is supplied.

    Make sure we pass along the project value when we call
    quantum.list_security_groups() so it's properly filtered.

    Fixes bug 1155381.

    Change-Id: I682c66a1f3f9db18b5f9924a37b45c759ff259f7
</pre>
</div>
<p> This commit appears to be only on <code>master</code>, not on <code>stable/grizzly</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git branch --all --contains 775e3b02
  master
  remotes/origin/HEAD -&gt; origin/master
  remotes/origin/master
</pre>
</div>
<p> Let&#8217;s try to find the commit which cherry-picked it into <code>stable/grizzly</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log --format=fuller --no-merges --grep='Pass project id' stable/grizzly
commit 989435822e5841bc1355e75bbdb003b10a3baf58
Author:     Kieran Spear <a href="mailto:kispear%40CENSORED.com">&lt;kispear@CENSORED.com&gt;</a>
AuthorDate: Mon Mar 18 17:32:26 2013 +1100
Commit:     Chuck Short <a href="mailto:chuck.short%40CENSORED.com">&lt;chuck.short@CENSORED.com&gt;</a>
CommitDate: Tue Mar 26 10:09:40 2013 -0500

    Pass project id in quantum driver secgroup list

    The quantum driver is always returning security groups from every tenant
    a user has access to, even when the "project" filter is supplied.

    Make sure we pass along the project value when we call
    quantum.list_security_groups() so it's properly filtered.

    Fixes bug 1155381.

    Change-Id: I682c66a1f3f9db18b5f9924a37b45c759ff259f7
    (cherry picked from commit 775e3b02b2afbf101db22b87a1c3b189d68532e1)
$ git branch --all --contains 9894358
* stable/grizzly
  remotes/origin/stable/grizzly
</pre>
</div>
<p> There it is!  Notice that it was committed 6 days after RC1 was tagged, but it has the same <code>patch-id</code> as the original, even though the commit message/date and committer are all different: </p>
<div class="org-src-container">
<pre class="src src-text">$ git patch-id &lt; &lt;(git show 9894358)
42dd410cf36ad1c16ceb1bb7f6ed6e3f01cc28bf 989435822e5841bc1355e75bbdb003b10a3baf58
$ git patch-id &lt; &lt;(git show 775e3b02)
42dd410cf36ad1c16ceb1bb7f6ed6e3f01cc28bf 775e3b02b2afbf101db22b87a1c3b189d68532e1
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-6" class="outline-2">
<h2 id="sec-6"><code>git cherry-menu</code> &#8211; let the picking commence</h2>
<div class="outline-text-2" id="text-6">
<p> Now we can actually start porting the remaining commits. <a href="https://github.com/aspiers/git-config/blob/master/bin/git-cherry-menu"><code>git-cherry-menu</code></a> provides an interactive interface to make this process less tedious: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu -h
usage: git [options] cherry-menu &lt;command&gt; [&lt;args&gt;...]
suggested options:

[... snipped ...]

&lt;command&gt; &lt;args&gt; are typically "git icing -v3" or "git cherry", but
can be anything which gives output in the same format.  This allows
more control over which commits constitute the upstreaming backlog,
e.g.

    git icing -v2 $upstream $downstream | grep ... &gt; tmpfile
    # Could edit tmpfile here if we want
    git-cherry-menu cat tmpfile

Provides an interactive wrapper around git-icing (or git cherry).  For
each commit provided on STDIN by COMMAND which has not yet been
upstreamed, asks the user whether they want to cherry-pick the commit,
blacklist it, or skip it.  After a successful cherry-pick, the source
commit will be automatically blacklisted if the patch-id changed.

You can quit the process at any time and safely re-run it later - it
will resume from where you left off.

Invoking icing with "-v2" ensures that previously blacklisted /
upstreamed commits are also processed.
</pre>
</div>
<p> Let&#8217;s give it a go &#x2026; </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu git icing -v3 stable/grizzly to-backport
commit 348cfedfcadc377fa91029b932b2a93d16475822
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove redundant 'dest' args

    Includes a hack to calculate 'dest' from the argument name. This hack is
    removed in a later commit.

    Change-Id: I60567ff232ab7699f3234b3bfc1618a17a648976

diff --git a/bin/nova-manage b/bin/nova-manage
index 0fde8ba..4919d88 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -127,10 +127,10 @@ def param2id(object_id):
 class VpnCommands(object):
     """Class for managing VPNs."""

-    @args('--project', dest="project_id", metavar='&lt;Project name&gt;',
+    @args('--project', dest='project_id', metavar='&lt;Project name&gt;',

[... snipped ...]

Cherry-pick / blacklist / skip 348cfedfca, or quit ?
</pre>
</div>
<p> It&#8217;s showing us the first commit in the porting backlog, and asking us to decide whether to cherry-pick it, blacklist it (i.e. permanently exclude it from the porting process), or defer the decision by skipping it and moving onto the next commit in backlog.  (<code>q</code> quits the whole process, of course.) </p>
<p> Let&#8217;s try cherry-picking it: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip 348cfedfca, or quit ? c

error: could not apply 348cfed... nova-manage: remove redundant 'dest' args
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add &lt;paths&gt;' or 'git rm &lt;paths&gt;'
hint: and commit the result with 'git commit'

Spawning a shell so you can fix; exit the shell when done.
$
</pre>
</div>
<p> Oh dear, this one&#8217;s going to need some further thought.  Let&#8217;s skip it for now: </p>
<div class="org-src-container">
<pre class="src src-text">$ git reset --hard
HEAD is now at ddb676d Merge "Typo: certicates=&gt;certificates in nova.conf"
$ exit
Warning: HEAD did not change; no action taken.
Press enter to continue ... 

-----------------------------------------------------------------------

commit f16534db22d63ce9f762ee6f7a9245126e9f28ed
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove unused import

    Unused since commit 9ff3121b

    Change-Id: I76bb49669d1cdfc3bf5b1c20087b4bd77420cd91

diff --git a/bin/nova-manage b/bin/nova-manage
index 4919d88..e93c3d8 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -88,7 +88,6 @@ from nova.openstack.common import timeutils
 from nova import quota
 from nova.scheduler import rpcapi as scheduler_rpcapi
 from nova import servicegroup
-from nova import utils
 from nova import version

 CONF = cfg.CONF

Cherry-pick / blacklist / skip f16534db22, or quit ?
</pre>
</div>
<p> <code>cherry-menu</code> presents the next commit in the backlog, which in this case is removing an unused import from <code>bin/nova-manage</code>.  Sounds pretty straight-forward, so let&#8217;s cherry-pick: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip f16534db22, or quit ? c

[stable/grizzly 3f013e4] nova-manage: remove unused import
 Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
 1 file changed, 1 deletion(-)
</pre>
</div>
<p> Looks like this worked fine.  The output continues: </p>
<div class="org-src-container">
<pre class="src src-text">-----------------------------------------------------------------------

Already upstream: 775e3b02b2 - Pass project id in quantum driver secgroup list
</pre>
</div>
<p> Here <code>cherry-menu</code> is telling us it automatically skipped over a commit which is already in our target branch.  The output continues with the next commit in the backlog, which we can also successfully pick: </p>
<div class="org-src-container">
<pre class="src src-text">commit dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb
Author: Clark Boylan <a href="mailto:clark.boylan%40CENSORED.com">&lt;clark.boylan@CENSORED.com&gt;</a>
Date:   Thu Feb 7 21:39:31 2013 -0800

    Enable tox use of site-packages for libvirt.

    Enable the use of site-packages in tox which will allow the use of the
    system install of libvirt while testing.

    Hardcode the libvirt host UUID for tests that check this UUID when
    system libvirt is being used. Without this hardcoding eight tests
    would fail when using the system libvirt install.

    Partially fixes bug #1113181

    Change-Id: I59c5fbd45639962c0963298203c39759b6ca2d11

[... snipped ...]

Cherry-pick / blacklist / skip dbbbbf4ecb, or quit ? c

[stable/grizzly b4fdf14] Enable tox use of site-packages for libvirt.
 Author: Clark Boylan <a href="mailto:clark.boylan%40CENSORED.com">&lt;clark.boylan@CENSORED.com&gt;</a>
 2 files changed, 8 insertions(+)

-----------------------------------------------------------------------

Already upstream: 76844433f6 - Add caching for ec2 mapping ids.
commit def5fa1e0e1c0426d973e4d8e3935c6eb18698dc
Author: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
Date:   Wed Mar 20 16:21:48 2013 +0100

    Set version to 2013.2

    Open Havana development by setting version to 2013.2.

    Change-Id: I37917d28a1f9e0adc2fe3e382412ebc4ed0f3bee

diff --git a/setup.py b/setup.py
index fd968ee..e4bc7d4 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@

 setuptools.setup(
       name=project,
-      version=common_setup.get_version(project, '2013.1'),
+      version=common_setup.get_version(project, '2013.2'),
       description='cloud computing fabric controller',
       author='OpenStack',
       author_email='nova@CENSORED.launchpad.net',

Cherry-pick / blacklist / skip def5fa1e0e, or quit ?
</pre>
</div>
<p> Now, obviously we don&#8217;t want to backport this version change, so let&#8217;s blacklist it in order to permanently excluded it from the porting backlog: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip def5fa1e0e, or quit ? b
</pre>
</div>
<p> At this point, your favourite <code>$EDITOR</code> will be launched via an invocation of <code>git notes edit</code>, and you&#8217;ll be presented with a text buffer which looks like this: </p>
<div class="org-src-container">
<pre class="src src-text">skip: all
XXX  (you can optionally change the "all" above to the name of the
XXX  upstream branch if you want to limit blacklisting to that upstream)

XXX  Enter your justification for blacklisting here or
XXX  remove the whole note to cancel blacklisting.

#
# Write/edit the notes for the following object:

# commit def5fa1e0e1c0426d973e4d8e3935c6eb18698dc
# Author: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
# Date:   Wed Mar 20 16:21:48 2013 +0100
#
#     Set version to 2013.2
#     
#     Open Havana development by setting version to 2013.2.
#     
#     Change-Id: I37917d28a1f9e0adc2fe3e382412ebc4ed0f3bee
#
#  setup.py | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
</pre>
</div>
<p> At this point you should remove all the lines beginning <code>XXX</code>, and decide whether you want this commit to be blacklisted from <b>any</b> future porting operation.  If so, you can leave the <code>skip: all</code> line as is and simply save the buffer and quit the editor, although it&#8217;s best practice to also give a sentence or two justifying why you&#8217;re blacklisting the commit. </p>
<p> Alternatively you can change <code>all</code> to the name of the branch to which this commit should never be ported, which in this case is <code>stable/grizzly</code>.  It is also permitted to use Ruby regular expressions here, by surrounding the regexp with forward slashes, e.g. </p>
<div class="org-src-container">
<pre class="src src-text">skip: /stable/

It never makes sense to port version number changes back to
stable releases.
</pre>
</div>
<p> Once the editor has been quit, we see: </p>
<div class="org-src-container">
<pre class="src src-text">Blacklisted def5fa1e0e
Press enter to continue ...
</pre>
</div>
<p> Behind the scenes, <code>cherry-menu</code> has attached a note to this commit within the <code>refs/notes/upstreaming</code> namespace: </p>
<div class="org-src-container">
<pre class="src src-text">$ git notes --ref=upstreaming show def5fa
skip: all
</pre>
</div>
<p> and you can even see the complete history of your note-editing: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log notes/upstreaming
commit ed6cf5fa75921f23088656b7a8d8a96faa9d769d
Author: Adam Spiers <a href="mailto:aspiers%40CENSORED.com">&lt;aspiers@CENSORED.com&gt;</a>
Date:   Fri Sep 20 15:59:04 2013 +0100

    Notes added by 'git notes edit'

commit c1f6ba13e643de4da354375b479470599f92b272
Author: Adam Spiers <a href="mailto:aspiers%40CENSORED.com">&lt;aspiers@CENSORED.com&gt;</a>
Date:   Fri Sep 20 15:44:15 2013 +0100

    Notes added by 'git notes add'

[... snipped ...]
</pre>
</div>
<p> After all this hard work, maybe it&#8217;s time for lunch.  We can safely quit <code>cherry-menu</code> via <code>Control-C</code> or <code>q</code>, and resume it later. Before tucking into a tasty sandwich, let&#8217;s quickly review our progress: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 -s stable/grizzly to-backport
+ 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
- f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list
- dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb Enable tox use of site-packages for libvirt.
- 76844433f69a7c29ed4566ad34d7e9740feaf660 Add caching for ec2 mapping ids.
. def5fa1e0e1c0426d973e4d8e3935c6eb18698dc Set version to 2013.2
+ 3aa80834e6aab2456f0f5229a63c2dcef007cb36 Change type of ssh_port option from Str to Int
+ 26aa01094a79939320d58f2fe2d5731f169987b1 Change arguments to volume_detach()

[... snipped ...]

Summary
=======

14 commits processed:
    13 already upstream
     1 blacklisted - should not be pushed to this upstream

15 commits remaining:
    15 not yet upstream

Progress: 14 / 29 commits (48%)
</pre>
</div>
<p> Wow, almost half-way!  Notice also how the prefix by <code>def5fa1</code> has changed to a period sign to indicate that it&#8217;s now blacklisted. </p>
<p> After lunch, we can resume the process: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu git icing -v3 stable/grizzly to-backport
commit 348cfedfcadc377fa91029b932b2a93d16475822
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove redundant 'dest' args

[... snipped ...]

Cherry-pick / blacklist / skip 348cfedfca, or quit ?
</pre>
</div>
<p> This is the same commit which caused conflicts last time we tried to pick it.  Let&#8217;s officially postpone resolving conflicts by adding it to a &#8220;TODO&#8221; blacklist.  Press <code>b</code>, then as before, remove the <code>XXX</code>, and also replace the <code>skip: all</code> line with: </p>
<div class="org-src-container">
<pre class="src src-text">TODO: fix conflicts next week
</pre>
</div>
<div class="org-src-container">
<pre class="src src-text">Blacklisted 348cfedfca
Press enter to continue ... 

-----------------------------------------------------------------------

Already upstream: f16534db22 - nova-manage: remove unused import
Already upstream: 775e3b02b2 - Pass project id in quantum driver secgroup list
Already upstream: dbbbbf4ecb - Enable tox use of site-packages for libvirt.
Already upstream: 76844433f6 - Add caching for ec2 mapping ids.
Blacklisted: def5fa1e0e - Set version to 2013.2
commit 3aa80834e6aab2456f0f5229a63c2dcef007cb36
Author: Devananda van der Veen <a href="mailto:devananda.vdv%40CENSORED.com">&lt;devananda.vdv@CENSORED.com&gt;</a>
Date:   Wed Mar 20 09:19:44 2013 -0700

    Change type of ssh_port option from Str to Int

    The type of CONF option virtual_power_ssh_port was incorrectly defaulted
    to Str. This can cause Paramiko to raise when casting to %d.

    Fixes bug 1157824.

    Change-Id: I30ddd1ff0da45f8392085249f1bd2a539b201a7e
</pre>
</div>
<p> Now we are taken immediately to where we left off just before lunch, because <code>git-icing</code> automatically detected the cherry-picks we did earlier, and also that we blacklisted the 2013.2 version change commit. </p>
<p> If we run <code>git-icing</code> again, we&#8217;ll see that it understands the significance of the <code>TODO</code> attached to the first commit in the backlog: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 -s stable/grizzly to-backport                                                        
! 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
- f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list

[... snipped ...]

Summary
=======

14 commits processed:
    13 already upstream
     1 blacklisted - should not be pushed to this upstream

15 commits remaining:
    14 not yet upstream
     1 still needs to be upstreamed, tracked on a TODO list

Progress: 14 / 29 commits (48%)
</pre>
</div>
<p> On subsequent invocations of <code>git cherry-menu</code>, it will offer the option of editing existing notes.  There is also an option to automatically skip any notes including the word <code>TODO</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu -h
usage: git [&lt;options&gt;] cherry-menu &lt;command&gt; [&lt;args&gt;...]
suggested options:

[... snipped ...]

-c cherry-menu.skip-todos=true
      Skip commits which have notes including 'TODO'.  This allows
      unresolved upstreaming tasks to be tracked via an external
      issue tracker without getting in the way during repeated
      runs of cherry-menu.

[... snipped ...]
</pre>
</div>
<p> So that&#8217;s the majority of <code>cherry-menu</code>&#8216;s functionality explained. It&#8217;s not rocket science, just a quick hack of a shell-script, but it gets the job done pretty well. </p>
<p> There&#8217;s one more important feature I didn&#8217;t cover: if the <code>patch-id</code> changes during cherry-picking, <code>cherry-menu</code> will notice, and automatically add the old commit to the blacklist: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip 81204d4020, or quit ? c

[stable/grizzly 65cd526] Sync rpc from oslo-incubator.
 Author: Russell Bryant <a href="mailto:rbryant%40CENSORED.com">&lt;rbryant@CENSORED.com&gt;</a>
 4 files changed, 47 insertions(+), 21 deletions(-)
The git patch-id changed during cherry-picking.  This is normal when
the diff context changes or merge conflicts are resolved.
Blacklisted 81204d4020 so future runs won't attempt to duplicate the upstreaming.
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-7" class="outline-2">
<h2 id="sec-7"><code>git rnotes</code> &#8211; sharing the fruits of your labours</h2>
<div class="outline-text-2" id="text-7">
<p> Maybe our project manager comes over and says &#8220;hey, we need those features backported to stable ASAP &#8211; I&#8217;ve asked Joe and Fred to help you out, OK?&#8221; </p>
<p> So far, all the work has happened in a local repository.  Of course we can push our updated <code>stable/grizzly</code> branch to a public repository somewhere, so that Joe and Fred can see what we already cherry-picked. But they&#8217;d be still missing some valuable meta-data, i.e. the git notes we created which mark which commits to exclude from porting, and why.  Unfortunately, git doesn&#8217;t yet natively provide a convenient way for pushing/pulling notes between repositories, because <a href="http://thread.gmane.org/gmane.comp.version-control.git/222644/focus%3D222812">the <code>refs/*</code> namespace hasn&#8217;t been sufficiently standardized yet</a>. To work around that, I wrote <a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes"><code>git-rnotes</code></a> to avoid having to remember a slightly arcane sequence of git commands. </p>
<p> Usage is very simple, and mimics <code>git fetch/push/merge/pull</code>: </p>
<div class="org-src-container">
<pre class="src src-text">Usage: git-rnotes [options] SUBCOMMAND REMOTE
Options:
  -h, --help     Show this help and exit

Subcommands:

  fetch
  push
  merge
  pull
</pre>
</div>
<p> For example, if you have a remote called <code>public</code>: </p>
<div class="org-src-container">
<pre class="src src-text">export GIT_NOTES_REF=refs/notes/upstreaming
git rnotes push public
</pre>
</div>
<p> or if Joe has updated his notes and pushed them to <code>public</code> whilst you also updated yours, simply do a <code>pull</code>, which is equivalent to a <code>fetch</code> followed by a <code>merge</code>: </p>
<div class="org-src-container">
<pre class="src src-text">export GIT_NOTES_REF=refs/notes/upstreaming
git rnotes pull public
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-8" class="outline-2">
<h2 id="sec-8">Wrapping up</h2>
<div class="outline-text-2" id="text-8">
<p> Sorry that was so long.  But hopefully you agree it&#8217;s relatively simple once you try it out.  I&#8217;d love to know if anyone finds this useful &#8211; if you do, please leave a comment below!  Of course pull requests against <a href="https://github.com/aspiers/git-config">my <code>git-config</code> repository</a> are always welcome. There are many other git-related hacks in that repository which you may also find useful. </p>
<p> Thanks for reading! </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2013%2F09%2F19%2Feasier-upstreaming-with-git%2F&#038;title=Easier%20upstreaming%20%2F%20back-porting%20of%20patch%20series%20with%20git" data-a2a-url="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/" data-a2a-title="Easier upstreaming / back-porting of patch series with git"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/">Easier upstreaming / back-porting of patch series with git</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
			</item>
	</channel>
</rss>
