deleting a named branch
Martin Geisler
mg at daimi.au.dk
Fri Jun 13 04:14:44 CDT 2008
Adrian Buehlmann <adrian at cadifra.com> writes:
> On 09.06.2008 10:19, Martin Geisler wrote:
>> * 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.
>
> http://www.selenic.com/mercurial/wiki/index.cgi/Bookmarks ? (concept
> by Matt Mackall)
>
> (I just pasted Matt's posting to that new wiki page for a start)
I like this idea. It seems lightweight and I think it would be perfect
if there was a good way to move bookmarks back and forth between
repositories.
This includes deleting them in one repository and having the deletion
propagate to other repositories. But this of course goes against the
nice append-only design of Mercurial.
Maybe the best solution is to use a "shadow" repository which keeps
track of such meta data outside of the normal repository. This is
basically what a versioned MQ does: it lets you push and pull some
meta data without affecting the base repository.
I think such a meta data repository migth be a powerful concept if the
user interface is good enough. I have not yet taken the time to use a
versioned queue since it seems cumbersome to do stuff like
hg -R $(hg root)/.hg/patches pull
and so on. Maybe a 'meta' command could change this to
hg meta pull
where this would affect the meta data repository associated with the
repository. A meta data repository could be used for:
* MQ, .hg/patches would be in the meta data repository.
* local tags, .hg/localtags would be in the meta data repository.
* local named branches or bookmarks. I think this could simply be a
file with the same format as .hg/localtags which associates a name
to a changeset. The difference would simply be that if changeset C
has the name N, then C is the root of a branch named N. Everything
reachable from C would be on the branch. And 'hg update N' should go
to the single head reachable from C or give an error if there are
several reachable heads.
If C accuires several reachable heads it is simply a matter of
updating the association of N to some changeset after the branching
point, and then 'hg update N' will work again.
I think the important point is to make it as easy as possible to
commit and update the meta data.
--
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