managing multi-version development with mercurial
Adrian Buehlmann
adrian at cadifra.com
Wed Dec 2 03:31:50 CST 2009
On 02.12.2009 04:25, Greg Ward wrote:
> Named branches have one huge advantage over both git and
> separate-hg-repos: you can tell where the fix was first done.
>
> OTOH, renaming or removing a named branch is extremely difficult. (It
> might as well be impossible.) So using them for git-style topic
> branches (e.g. one branch per bug fix) would be madness.
>
Sorry for butting in here.
The lack of ability to rename branches made me thinking
up to the point that I started hacking on a new concept for
separating branch -name- from branch -identity-.
The branchident extension:
http://bitbucket.org/abuehl/hgext-branchident/wiki/Home
This concept would allow to change the name of a branch.
Only branches that have been created (or extended) while
this extension was enabled can be renamed.
(...in case anyone would be interested to play with this new
concept. Note that the extension requires Mercurial 1.4)
Example usage:
$ hg log
changeset: 3:3b8011fe22a5
branch: green
tag: tip
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: another tweak
changeset: 2:face4c569e0d
branch: green
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: hacked something
changeset: 1:c4e3f51005d1
branch: green
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: create green branch
changeset: 0:d84beb0b6d77
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: start
$ hg branch blue
marked working directory as branch blue
$ hg ci -m"change branch name of green to blue" --rename-branch
$ hg log
changeset: 4:a792e1b2b8f9
branch: blue
tag: tip
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: change branch name of green to blue
changeset: 3:3b8011fe22a5
branch: blue
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: another tweak
changeset: 2:face4c569e0d
branch: blue
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: hacked something
changeset: 1:c4e3f51005d1
branch: blue
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: create green branch
changeset: 0:d84beb0b6d77
user: Joe Tester <joe at example.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: start
More information about the Mercurial
mailing list