deleting a named branch

Martin Geisler mg at daimi.au.dk
Sun Jun 8 09:11:06 CDT 2008


"Michael P. Soulier" <msoulier at digitaltorque.ca> writes:

Hi Michael

> I'm thinking of using named branches in Hg to track work on a given
> activity. The branch would be named after a particular bug number,
> all work done on that branch, and then the work would be merged back
> to default when done.
>
> I'm not sure I want all those branches cluttering up things though,
> and I'm wondering if there's a way to delete the named branches when
> I'm done with them. Is there?

No, unfortunately not. Named branches are not meant for short-lived
branches but for long-term branches like "stable" vs. "devel".

In your case, when you want to fix a bug in its own branch, then
instead of creating a named branch, you can simply make a local clone.
That gives you two repositories which share the already committed
changesets. The two working copies are independent, of course.

The downside is that having two repositories might be impractical if
you have hard-coded the path to your repository in your build tools.
If your working copy is very large, the doubled disk space might also
be a concern.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.



More information about the Mercurial mailing list