deleting a named branch
Martin Geisler
mg at daimi.au.dk
Mon Jun 9 03:19:49 CDT 2008
"Michael P. Soulier" <msoulier at digitaltorque.ca> writes:
> Martin Geisler wrote:
>> 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.
>
> I would have hoped that Mercurial would be flexible enough to allow
> me to determine how to use its features.
Yeah... I do find Mercurial very flexible, here it's just that a named
branch does something different from what people expect. I actually
quoted most of my reply from an earlier one:
http://article.gmane.org/gmane.comp.version-control.mercurial.general/7000
I was just about to suggest to you to use several heads in your
repositories -- Mercurial allows that, but it is not the normal way to
do things and you will have to push them with '--force'. The nice
thing about several heads is that I think the mental model fits nicely
to what you are trying to do with branches.
I ended up with this list of things that could be better when using
several heads in a repository:
* I would expect to be able to "travel" around the revision tree
freely as long as I don't have any local modifications. Currently I
have to use 'hg update -C' to "cross branches" even though
hg update 0; hg update R
will succesfully bring me to revision R by going to the root of the
tree and following the right path to the node R.
* Going to a branch head should be easy. Currently something like 'hg
update' tries to go to the repository tip which might be the head of
another branch, and so one gets the same error as above.
* One should be able to name a branch with a floating tag that always
points to the head of the branch. The tag should disappear when the
head is merged with another head.
The strange thing is that all three points on this list is adressed by
the named branches functionality. Except that instead of removing the
tag when merged, the branch is marked as inactive in 'hg branches'.
So I'm a bit surpriced to say that I actually think named branches
might work for you (and me!), assuming that this is the only problem.
For if that is the case, then adding
[defaults]
branches = --active
to your ~/.hgrc file will make them hidden by default. Does this solve
your problem?
At least I think it has solved mine :-)
--
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