Hello,<br><br>I&#39;m getting slightly dizzy thinking about interoperability of the three
big distributed VCSs [Git, Bazaar, Mercurial] for open source packages that interrelate. I use Bazaar for my own stuff at the moment. <br><br>I&#39;ve just spent a couple of hours getting to know Mercurial just now, as I&#39;m using an upstream package that uses it for version control. This got me thinking, and here&#39;s a situation I&#39;d dearly love your thoughts on as I&#39;d like to keep in Bazaar as much as possible:<br>
<br><b>Assumptions</b><br>- I use several upstream packages in my project [let&#39;s assume they variously do and don&#39;t use Bazaar]<br>- I would like to pull updates to this upstream code on an occasional basis<br>- I need to make a non-trivial number of modifications to those packages for my project<br>
- These modifications would be distributed as part of the project<br>- I would like to contribute my modifications to the upstream package [being open source], but there is no guarantee that they will be used<br><br><b>A Bazaar Solution</b><br>
I&#39;ve read this article &lt;<a href="http://jameswestby.net/tips/tips/hacking-a-project-with-bzr.html">http://jameswestby.net/tips/tips/hacking-a-project-with-bzr.html</a>&gt; and that&#39;s how I would envision it would best be done in Bazaar:<br>
<br>Upstream: one branch for current upstream code.<br>Patches: a branch per &#39;patch&#39;, which inherits from upstream branch.<br>Final code: one branch for the final code to use in the project, which inherits from upstream branch and all the patches - theoretically this branch would be published.<br>
<br>1. Branches are cheap, but spending time issuing lots of pulls from a non-trivial batch of patches [needed each time you update the upstream code] is not.<br>?Solution: put all patch branches into a folder and bzr pull them all at once [via a shell script or otherwise per-directory  command]. <br>
<br>2. Being asked to revise your patch by the upstream controller is a matter
of simply working on the relevant branch. On acceptance of a patch by
the upstream, you would simply update the upstream code and remove the branch that hitherto resolved the problem. You would then be left with the final code branch fixing the problem twice.<br>?Solution: reverse cherrypick [as it&#39;s a published branch] the final code branch. <br>
<br>3. Patches not accepted by upstream provider = stale branches hanging around<br>?Solution: merge such rejects into one branch for local changes. This would make things difficult if the upstream was patched later on - a reverse cherrypick again. <br>
<br>Am I thinking about this wrongly? Is there something I&#39;ve missed? Are reverse cherrypicks as tortuous as I make out?<br><br>Many thanks,<br><br clear="all">Fergus Ross Ferrier<br><br>