Does anyone use named branches?

Steve Borho steve at borho.org
Wed Oct 14 20:17:12 CDT 2009


On Wed, Oct 14, 2009 at 7:46 PM, Augie Fackler <lists at durin42.com> wrote:
>
> On Oct 14, 2009, at 6:18 PM, Bryan O'Sullivan wrote:
>
>> I keep wanting to like named branches, but I get consistently pushed
>> away from them.
>>
>> In a world without branch naming, anonymous branches are implicitly
>> named "default".
>
> I personally find the named-ness of branches to be obnoxious clutter
> when they're used. I've stopped using them on anything except
> hgsubversion clones, where I find it to be necessary.
>
>> Approximately 100% of the time, except during occasional brief
>> merges, I want to have just one named branch active in any given
>> repository. So if I check out my "1.2" branch, I want it to contain
>> the named branch "1.2", and I'd really like Mercurial to update to
>> the tip of that branch when I clone it. But instead, it updates to
>> the tip of the "default" branch, and I then have to manually update
>> to the tip of "1.2" by hand afterwards.
>>
>> I find that this behaviour makes named branches sufficiently
>> unappealing and surprising that I never use them and always advocate
>> against their use, even though they're notionally extremely useful
>> in a medium-to-large team. Basically, the "clone, then remember to
>> update by hand" requirement screams to me "and here's where you'll
>> make lots of mistakes because you'll forget to take this step 40% of
>> the time".
>>
>> Am I alone? Does anyone actually like the current behaviour?
>
> To be perfectly honest, I have found I really like the way bookmarks
> work, except for the part where I can't easily share them - it's not
> interesting to me years from now what branch some work was done on,
> especially when my branch name for something now might be "single-
> clone-hacking" or some bug ID from a bts. The temporary nature of
> bookmarks "feels" more right to me.

The TortoiseHg has adopted a single 'stable' named branch for tracking
the current stable release, while all new development is done on the
default branch.  It has worked well for us thus far.

--
Steve Borho


More information about the Mercurial mailing list