views:

58

answers:

2

Is there a way to associate a bunch of Mercurial changesets with a named branch after they have been committed, i.e. retroactively ?

+2  A: 

No, branch names are part of the changeset (it's really like a label you add to the commit), it means the changeset hash depens on the branch name.

So the only way to change it retroactively is by rewriting history (which doesn't play well if you pushed your changes elsewhere, since you'll have to rewrite every repo which has the changes).

To rewrite history, you could use for example mq.

tonfa
A: 

Not a complete solution but, without re-writing history; you could tag the last change set in the unnamed branch. If you never rebranch from this the tag should surfice. If you do need to rebranch you can move on to a named branch after the tagged changeset.

jk