Ответ 1
hg branch X
делает ничего, кроме как сказать Mercurial, следующее совершение, которое я делаю, должно быть на ветке X. "Он фактически не" создает" ветвь. Ветвь не существует, пока на ней не будет зафиксировано хотя бы одно сообщение:
sjl at ecgtheow in ~/Desktop/test on default at tip
$ hg branch a
marked working directory as branch a
sjl at ecgtheow in ~/Desktop/test on a at tip
$ hg branch b
marked working directory as branch b
sjl at ecgtheow in ~/Desktop/test on b at tip
$ hg branches
default 0:aae011bc1b00
sjl at ecgtheow in ~/Desktop/test on b at tip
$ echo foo >> x
sjl at ecgtheow in ~/Desktop/test on b at tip!
$ hg com -m1
sjl at ecgtheow in ~/Desktop/test on b at tip
$ hg branches
b 1:b66106035d8d
default 0:aae011bc1b00 (inactive)
sjl at ecgtheow in ~/Desktop/test on b at tip
$
Итак, ответ на ваш вопрос: "используйте hg branch branch-A
, чтобы отметить следующее коммит как находящееся на ветке-A".