Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2012-06-25 07:56:56
Size: 1328
Editor: 93-172-104-238
Comment: Branch Renaming Proposal
Revision 6 as of 2012-10-25 21:06:08
Size: 0
Editor: mpm
Comment: dead, non-canonical
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers 2

= Branch Renaming =

A recurring compliant against [[NamedBranches|named branches]] is that the name is permanent. This page describes a backward-compatible proposal to separate a branch's identity from its name.

<<TableOfContents>>

== Visioning Branch Names ==

An .hgbranches file in the working directory will keep a mapping of branch IDs to their names. When a new branch is created, the changeset's branch field will be set to a unique ID. An entry will then be made in .hgbranches, mapping the branch's ID to its name.

== Local Branches ==

If the user creates a local branch which they do not intend pushing, it can be recorded in .hg/localbranches. Mercurial should warn the user if they attempt to push a changeset whose branch name is recorded in localbranches, and tell them how to move it to .hgbranches.

== Backwards Compatibility ==

If a branch ID is not recorded in .hgbranches or .hg/localbranches, the ID will be used as the branch name. Thus, existing branches can be used (and renamed) without any modifications. If the branch is renamed, older clients will continue to use the old name.

== Forwards Compatibility ==

Future development could add other fields to .hgbranches, such as description or owner.

----
CategoryNewFeatures CategoryDeveloper

MutableBranches (last edited 2019-08-22 10:56:57 by gidyn)