IDEA and distributed version control

Rant alert: this is just a brain dump, and not much thinking has been put in the following paragraphs. I hope you can grok at least a few words out of them.

In the last couple of months I've been caught in the Distributed Version Control Systems (DVCS from now on) world. The very idea is fascinating, and actually using one of the freely available DVCS out there is enlightening. After sometime, they change the way you see a project's history significantly. It's no longer linear; it's no longer about files, but it's a rather convoluted, many-branched tree composed of lots of patches.

Some of them change not only the way you see the project, but also the way you work on it. In most DVCS, branches are cheap. Branches are, actually, the core concept for many of them. It's normal to keep at least three different branches for a project you're working on:

- The "inbox" branch. You pull any upstream changes to this branch. You don't actually work on it.
- The "work" branch. You pull selected changes from the incoming branch into the work branch, and work on it. You can see this as your personal branch; changes here are supposed to be kept private.
- The "outbox" branch. You pull selected changes from the "work" branch into the "outbox" branch, and publish it. This is the branch you usually make available to other people; changes here are supposed to go public[1]

It's not uncommon to use more than one work branch. If you're working on multiple unrelated features, you would create a branch to work on each feature. Once you get used to it, it's a very nice way to keep things simple and isolated.

One problem, thou. Managing these many branches within IDEA is quite hard, and involve a lot of manual work. Also, visualizing two branches at the same time is not as natural. Now, Demetra is coming, with lots of features related to distributed development. This should be the prime time to add full integration with a DVCS (which one would be a hot topic for another post).

In my blurry dreams, IDEA would take care of all work related to branch and changeset management. Over the rainbow, IDEA would have a way to let me see all branches within a project (a single project, not many copies of it), to select which one I'm work on, and to push and pull changesets between different branches. In dreamland, this would be a very quick and cheap operation, so I could switch branhces almost as fast as I switch files. While the Sandman is blowing dust over my eyes, IDEA would completly abstract away where and how to store these branches. I would only care about opening IDEA and working on them.

Many other things would happen after dusk. But then, I'm getting weary, and need some sleep now. Oh wait, it's still 11AM... I'll have to take coffee over sleep.

5 comments

Hello Marcus,

In fact, you don't need a DVCS to feel this pain and start dreaming of these
features - it's quite enough to have three development branches active at
the same time (5.0.2, 5.1 and 6.0). Funny how much similar your thinking
is to our own thoughts when we discussed how to improve our work with multiple
branches...

MB> One problem, thou. Managing these many branches within IDEA is quite
MB> hard, and involve a lot of manual work. Also, visualizing two
MB> branches at the same time is not as natural. Now, Demetra is coming,
MB> with lots of features related to distributed development. This
MB> should be the prime time to add full integration with a DVCS (which
MB> one would be a hot topic for another post).
MB>
MB> In my blurry dreams, IDEA would take care of all work related to
MB> branch and changeset management. Over the rainbow, IDEA would have a
MB> way to let me see all branches within a project (a single project,
MB> not many copies of it), to select which one I'm work on, and to push
MB> and pull changesets between different branches. In dreamland, this
MB> would be a very quick and cheap operation, so I could switch
MB> branhces almost as fast as I switch files. While the Sandman is
MB> blowing dust over my eyes, IDEA would completly abstract away where
MB> and how to store these branches. I would only care about opening
MB> IDEA and working on them.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

If you can pull it off, it would be amazing. There's a huge opportunity for someone who can actually make managing large multi-branch projects enjoyable, rather than infuriating.

--Dave Griffith

0

In fact, you don't need a DVCS to feel this pain and
start dreaming of these features - it's quite enough
to have three development branches active at the same
time (5.0.2, 5.1 and 6.0). Funny how much similar your
thinking is to our own thoughts when we discussed how
to improve our work with multiple branches...


Heh, I can imagine. It's just that multiple branches are much more common when using a DVCS -- these systems are supposed to make it easier to work with lots of branches, after all.

Indeed, when you're used to work with only a terminal window and a text editor, tools like Mercurial¹ or Darcs² are such a boon -- they make branching trivial and easy. When you're used to a more featured environment like IDEA, however, things get complicated.

http://www.selenic.com/mercurial
http://www.darcs.net

0

Darcs! Darcs! Darcs!

And yes, multiple branches are a pain, even with SVN or CVS. In my last job I ended up creating separate projects for each branch, just because I didn't quite understand what IDEA was doing with them, and it got dangerous. Something that makes this easier would make me weep for joy.

0

And yes, multiple branches are a pain, even with SVN
or CVS.


Specially with CVS. Subversion makes branching a little easier, but I'm yet to use something worse than CVS when it comes to branching. (I've never used VSS, thou)

0

Please sign in to leave a comment.