Questions about branching in Mercurial

Mark A. Flacy mflacy at verizon.net
Sun May 6 00:15:30 CDT 2007


On 2007.05.05 21:03, Tim Allen wrote:
> On Sat, May 05, 2007 at 02:25:43PM -0500, Mark A. Flacy wrote:
>>
>> 
>> Why do you think that named branches are a better solution than
>> a cloned repository? 
> 
> I'll admit I don't have an iron-clad religious conviction about it, but
> a number of smaller reasons add up to this overall preference:
> 
>     - That's how CVS does it, so it's less of a mental leap to use a new
>       VCS that operates on the same model.

There are some other mental leaps that you'll have to do.

>     - I'm greatly attached to the idea of cloning a repository and
>       having every bit of the project's history right at my fingertips,
>       directly examinable via my VCS tool.

Yeah, everybody seems to thinks that's a great idea for some reason.  On a large project, I think that's an insane position to take but I appear to be in the minority around here.


>     - If the VCS tool handles branches, our internal documentation for
>       branching will probably look something like 'branch && push',
>       which is very hard to get wrong.

So which type of branches do you mean?  A local branch for the developer to make and test changes prior to submission?  Or a branch that describes a version of the product?

If it's the latter, why do you want to give individual developers the ability to make them?


>     - If the VCS tool does not handle branches, our internal
>       documentation will involve sshing to the server, finding the
>       correct repository, cloning it to the correct name in the correct
>       location, and recording the existence of the branch in some
>       documentation somewhere. Everything done manually is a thing that
>       can be done wrong.

Well, only if you don't set a policy of some type.  Or set up the directory structure beforehand.  Or write a script to do it all for you.

You should look at the hgwebdir.cgi script that's part of the distribution.  It makes it very simple to document, browse and even retrieve a rooted tree of repositories.  You can clone from the links too.

Ah, here's a couple of examples:

 http://hg.omnifarious.org/~hopper/

http://hg.kublai.com/





More information about the Mercurial mailing list