How to "give a name" to a head
Masklinn
masklinn at masklinn.net
Wed Aug 10 09:29:54 UTC 2011
On 2011-08-10, at 11:18 , hg user wrote:
> I'm trying to clean up a repository.
>
> This repository has now several heads. They started as "let me just try this
> hack" and a couple of them had a lot of work in them.
>
> Heads were just created as commits, some were created months ago. A couple
> are also alternative implementations and cannot merged back, while I could
> quite easily merge some of them.
>
> Now I'd like to "give a name" to some of these heads so that it would be a
> lot easier to see to which head do an "update -C". I think I may use a
> branch name.
>
> There are already some branches in the repository since it is a sourceforge
> hosted open source project that I convert to hg.
>
> Is this solution possible ?
>
> hg update -C <revision of the head I want to name>
> hg branch <name of branch>
You probably want to use bookmarks instead. Bookmarks are literally names for heads, which moves along with the head (when new commits are done). Branches are commit metadata, which would be kind-of weird to see added mid-flight without any actual branching being done.
Just do `hg bookmark -r <revision of the head to name> <name to add on the revision>`, then you can `hg bookmarks` to see just the bookmarks, `hg heads` will show the bookmarks as well (although only those set on heads)
More information about the Mercurial
mailing list