Mixing branches

Jonathan Leighton j at jonathanleighton.com
Mon Feb 11 15:52:03 GMT 2008


Hi all,

I am new to DVCS and Bazaar, so apologies if I say anything stupid in my
email ;)

Basically I would like to use DVCS for websites I do. Specifically, I am
a Rails developer. Rails makes heavy use of plugins and these go in a
directory called vendor/plugins/.

The "basic" way to do this would have been to literally get the raw code
for a plugin and stick it in vendor/plugins/my_plugin, and check it into
your VCS.

The step up from that, using Subversion (basically every Rails project
uses Subversion at the moment), is to set an svn:externals property. The
downside is it automatically pulls the latest code whenever you do an
"svn up", so you might get changes you don't want yet.

Then someone came up with Piston: http://piston.rubyforge.org/. Piston
also uses svn properties, but it tracks what repository version you have
checked out, and only updates the third party code when you ask it.

Piston solves most of the problem as you can freely make your own
modifications without too much trouble, and you don't get updates to
third party code without asking for it. What it doesn't do is allow you
to, for instance, generate a diff and contribute your changes back to
the upstream project.

So I thought I'd check out DVCS and thought, perhaps wrongly, because
there is so much noise about ease of branching etc, it would be a doddle
to do this type of thing.

I note two sort-of-solutions:
 * config-manager - This seems somewhat like piston but not as good,
frankly.
 * Have a "pristine" branch of the third party code and then merge it
into my project. However you can't merge into a particular directory of
a working tree so this makes it more difficult. Also it's a very manual
solution.

I also note a wiki page on "Nested Tree Support" which appears to be the
functionality I am after: http://bazaar-vcs.org/NestedTreeSupport.
Unfortunately this seems to have been around a while (since 2005)...

Basically my questions are:
 1) Have I missed something? Is there an easy way to achieve my goals?
(Note my main goal is to manage merging of upstream third party code
into my own project, like Piston. Making my own changes to that code is
only a secondary goal.)
 2) Do other DVCS's support this type of thing better/differently?
 3) Is this much of a priority in the DVCS world? I realise not
everybody needs the same thing from version control...

As it is I am quite tempted to switch back to Subversion. DVCS seems
great but I really need to be able to manage the third party code well
and Piston is the best thing I've found so far.

Thanks guys,

Jon

-- 
Jonathan Leighton
http://jonathanleighton.com/




More information about the bazaar mailing list