Sly
Sly

Reputation: 77

Change branch name of Revision 0 in Mercurial repo

The Mercurial repository has two branches that originate from revision 0. Branch names are 2x and 4x. Rev. 0 itself belongs to branch 4x.

How can I move Rev. 0 to branch 2x keeping everything else the same?

PS. I assume its is totally possible, since the Rev. 0 does not have any dependencies on previous revisions. PPS. This situation happend after converting the whole repository from incorrectly organized SVN.

Upvotes: 0

Views: 124

Answers (1)

Martin Geisler
Martin Geisler

Reputation: 73808

You cannot change a branch name without also changing the changeset hash (ID). Changing a changeset hash will also require a change to all descendant changesets. So it doesn't help that revision 0 doesn't have any ancestor changesets — it's the child changesets that complicate things.

My advice: just leave it as it is. Be sure to read the recommendations on named branches for some good workflow advices.

Upvotes: 2

Related Questions