branch: warn on branching

This commit is contained in:
Matt Mackall 2011-12-08 14:32:44 -06:00
parent d91862b8e5
commit a69962e18c
44 changed files with 108 additions and 0 deletions

View File

@ -855,6 +855,8 @@ def branch(ui, repo, label=None, **opts):
hint=_("use 'hg update' to switch to it"))
repo.dirstate.setbranch(label)
ui.status(_('marked working directory as branch %s\n') % label)
ui.status(_('(branches are permanent and global, '
'did you want a bookmark?)\n'))
else:
ui.write("%s\n" % repo.dirstate.branch())

View File

@ -1360,6 +1360,7 @@ Branch acl tests setup
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch foobar
marked working directory as branch foobar
(branches are permanent and global, did you want a bookmark?)
$ hg commit -m 'create foobar'
$ echo 'foo contents' > abc.txt
$ hg add abc.txt

View File

@ -225,11 +225,13 @@ named branches
adding default
$ hg branch branch1
marked working directory as branch branch1
(branches are permanent and global, did you want a bookmark?)
$ echo branch1 > file1
$ hg ci -d '1 0' -Am file1
adding file1
$ hg branch branch2
marked working directory as branch branch2
(branches are permanent and global, did you want a bookmark?)
$ echo branch2 > file2
$ hg ci -d '2 0' -Am file2
adding file2

View File

@ -20,6 +20,7 @@
$ hg add a
$ hg branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding a branch"
$ heads
1: Adding a branch (a)
@ -36,6 +37,7 @@
$ hg add b
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding b branch"
$ heads
2: Adding b branch (b)
@ -117,6 +119,7 @@
$ hg add c
$ hg branch c
marked working directory as branch c
(branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding c branch"
$ heads
7: Adding c branch (c)
@ -287,6 +290,7 @@ Init: no msg
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo 1 > b
$ hg ci -Am "b2: Initial root for branch b"
adding b
@ -298,6 +302,7 @@ Case NN: msg
$ hg up -q null
$ hg branch -f b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo 1 > bb
$ hg ci -Am "b4 (NN): new topo root for branch b"
adding bb
@ -312,6 +317,7 @@ Case BN: msg
$ hg branch -f default
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
$ echo 1 > aa
$ hg ci -Am "a6 (BN): new branch root"
adding aa
@ -331,6 +337,7 @@ Case BB: msg
$ hg merge -q 3
$ hg branch -f default
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m "a8 (BB): weird new branch root"
created new head

View File

@ -324,6 +324,7 @@ create bundle with two heads
$ echo y > tobundle/y
$ hg -R tobundle branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ hg -R tobundle add tobundle/y
$ hg -R tobundle commit -m'y'
$ hg -R tobundle bundle tobundle.hg

View File

@ -4,6 +4,7 @@ test branch selection options
$ cd branch
$ hg branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ echo a > foo
$ hg ci -d '0 0' -Ama
adding foo
@ -13,6 +14,7 @@ test branch selection options
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch c
marked working directory as branch c
(branches are permanent and global, did you want a bookmark?)
$ echo c > foo
$ hg ci -d '0 0' -mc
$ hg tag -l z
@ -29,18 +31,21 @@ test branch selection options
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo b > foo
$ hg ci -d '0 0' -mb
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --encoding utf-8 branch æ
marked working directory as branch \xc3\xa6 (esc)
(branches are permanent and global, did you want a bookmark?)
$ echo ae1 > foo
$ hg ci -d '0 0' -mae1
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --encoding utf-8 branch -f æ
marked working directory as branch \xc3\xa6 (esc)
(branches are permanent and global, did you want a bookmark?)
$ echo ae2 > foo
$ hg ci -d '0 0' -mae2
created new head
@ -48,6 +53,7 @@ test branch selection options
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch -f b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo b2 > foo
$ hg ci -d '0 0' -mb2
created new head

View File

@ -14,6 +14,7 @@ Create a branch with the same name as the tag.
$ hg branch branchortag
marked working directory as branch branchortag
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'Create a branch with the same name as a tag.'
This is what we have:

View File

@ -8,10 +8,12 @@
$ hg add a
$ hg branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ hg commit -d '1 0' -m "Adding a branch"
$ hg branch q
marked working directory as branch q
(branches are permanent and global, did you want a bookmark?)
$ echo 'aa' >a
$ hg branch -C
reset working directory to branch a
@ -23,6 +25,7 @@
$ hg add b
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ hg commit -d '2 0' -m "Adding b branch"
$ echo 'bh1' >bh1
@ -39,6 +42,7 @@
$ hg add c
$ hg branch c
marked working directory as branch c
(branches are permanent and global, did you want a bookmark?)
$ hg commit -d '5 0' -m "Adding c branch"
$ hg branch tip
@ -55,6 +59,7 @@
$ hg add d
$ hg branch 'a branch name much longer than the default justification used by branches'
marked working directory as branch a branch name much longer than the default justification used by branches
(branches are permanent and global, did you want a bookmark?)
$ hg commit -d '6 0' -m "Adding d branch"
$ hg branches

View File

@ -6,6 +6,7 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch mine
marked working directory as branch mine
(branches are permanent and global, did you want a bookmark?)
$ echo hello > world
$ hg commit -Am hello
adding world
@ -13,6 +14,7 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch other
marked working directory as branch other
(branches are permanent and global, did you want a bookmark?)
$ echo good > bye
$ hg commit -Am other
adding bye

View File

@ -132,6 +132,7 @@ Adding some more history to repo a:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch stable
marked working directory as branch stable
(branches are permanent and global, did you want a bookmark?)
$ echo some text >a
$ hg ci -m "starting branch stable"
$ hg tag ref2

View File

@ -31,6 +31,7 @@ add initial changesets
commit bug fixes on bug fix branch
$ hg branch fixes
marked working directory as branch fixes
(branches are permanent and global, did you want a bookmark?)
$ echo fix1 > bugfix
$ echo fix1 >> file1
$ hg ci -Am"fix 1"
@ -52,6 +53,7 @@ transplant bug fixes onto release branch
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg branch release
marked working directory as branch release
(branches are permanent and global, did you want a bookmark?)
$ hg transplant 2 3
applying [0-9a-f]{12} (re)
[0-9a-f]{12} transplanted to [0-9a-f]{12} (re)

View File

@ -15,6 +15,7 @@ Add a merge with one parent in the same branch
$ hg up -qC 0
$ hg branch branch0
marked working directory as branch branch0
(branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -qAm addb
$ hg up -qC
@ -52,11 +53,13 @@ Add a merge with both parents and child in different branches
$ cd source
$ hg branch branch1
marked working directory as branch branch1
(branches are permanent and global, did you want a bookmark?)
$ echo a > file1
$ hg ci -qAm c1
$ hg up -qC mergeab
$ hg branch branch2
marked working directory as branch branch2
(branches are permanent and global, did you want a bookmark?)
$ echo a > file2
$ hg ci -qAm c2
$ hg merge branch1
@ -64,6 +67,7 @@ Add a merge with both parents and child in different branches
(branch merge, don't forget to commit)
$ hg branch branch3
marked working directory as branch branch3
(branches are permanent and global, did you want a bookmark?)
$ hg ci -qAm c3
$ cd ..

View File

@ -11,6 +11,7 @@
adding a
$ hg branch brancha
marked working directory as branch brancha
(branches are permanent and global, did you want a bookmark?)
$ echo a >> a
$ hg ci -m a1 -d '2 0'
$ echo a >> a
@ -21,6 +22,7 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchb
marked working directory as branch branchb
(branches are permanent and global, did you want a bookmark?)
$ echo b >> b
$ hg ci -Am b0 -d '6 0'
adding b

View File

@ -299,6 +299,7 @@ test branch closing revision pruning if branch is pruned
$ cd branchpruning
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ echo a > a
$ hg ci -Am adda
adding a
@ -307,12 +308,14 @@ test branch closing revision pruning if branch is pruned
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch empty
marked working directory as branch empty
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m emptybranch
$ hg ci --close-branch -m closeempty
$ hg up 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch default
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -Am addb
adding b

View File

@ -115,12 +115,15 @@ add branches/tags
$ hg branch $S
marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
(branches are permanent and global, did you want a bookmark?)
$ hg tag $S
$ hg branch $M
marked working directory as branch MIDDLE_
(branches are permanent and global, did you want a bookmark?)
$ hg tag $M
$ hg branch $L
marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
(branches are permanent and global, did you want a bookmark?)
$ hg tag $L
check alignment of branches

View File

@ -42,6 +42,7 @@ these should work
$ HGENCODING=latin-1 hg tag `cat latin-1-tag`
$ HGENCODING=latin-1 hg branch `cat latin-1-tag`
marked working directory as branch \xe9 (esc)
(branches are permanent and global, did you want a bookmark?)
$ HGENCODING=latin-1 hg ci -m 'latin1 branch'
$ rm .hg/branch

View File

@ -142,12 +142,14 @@ test fetch with named branches
adding a
$ hg -R nbase branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ echo a > nbase/a
$ hg -R nbase ci -m a
$ hg -R nbase up -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R nbase branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo b > nbase/b
$ hg -R nbase ci -Am b
adding b
@ -316,6 +318,7 @@ pull in change on different branch than dirstate
$ hg -R n1 ci -m next
$ hg -R n2 branch topic
marked working directory as branch topic
(branches are permanent and global, did you want a bookmark?)
$ hg -R n2 fetch -m merge n1
abort: working dir not at branch tip (use "hg update" to check out branch tip)
[255]
@ -334,11 +337,13 @@ test fetch with inactive branches
adding a
$ hg --cwd ib1 branch second
marked working directory as branch second
(branches are permanent and global, did you want a bookmark?)
$ echo b > ib1/b
$ hg --cwd ib1 ci -Am onsecond
adding b
$ hg --cwd ib1 branch -f default
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
$ echo c > ib1/c
$ hg --cwd ib1 ci -Am newdefault
adding c

View File

@ -20,6 +20,7 @@ Set up the repo
$ echo another > foo
$ hg branch stable
marked working directory as branch stable
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Ambranch
$ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS

View File

@ -6,6 +6,7 @@
$ hg init a
$ hg --encoding utf-8 -R a branch æ
marked working directory as branch \xc3\xa6 (esc)
(branches are permanent and global, did you want a bookmark?)
$ echo foo > a/foo
$ hg -R a ci -Am foo
adding foo

View File

@ -19,6 +19,7 @@
$ hg commit -m "No branch."
$ hg branch abranch
marked working directory as branch abranch
(branches are permanent and global, did you want a bookmark?)
$ echo "Rev 2" >rev
$ hg commit -m "With branch."

View File

@ -16,6 +16,7 @@ Test --bypass with other options
$ echo a >> a
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Am changea
$ hg export . > ../test.diff
$ hg up null

View File

@ -11,6 +11,7 @@ Initialize remote repo with branches:
$ hg branch br
marked working directory as branch br
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Amb
$ echo c > c

View File

@ -8,6 +8,7 @@ http://mercurial.selenic.com/bts/issue619
$ echo b > b
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Amb
adding b

View File

@ -31,6 +31,7 @@ Should not issue new head warning:
$ echo crap > a
$ hg branch testing
marked working directory as branch testing
(branches are permanent and global, did you want a bookmark?)
Should not issue warning:

View File

@ -1000,6 +1000,7 @@ Test restricted mode with transplant -b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ mv a a.bak
$ echo foobranch > a
$ cat a.bak >> a

View File

@ -627,6 +627,7 @@ log -r tip --stat
adding a
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -A -m "commit on test"
adding b

View File

@ -68,6 +68,7 @@ hg update -C 8
hg branch some-branch
$ hg branch some-branch
marked working directory as branch some-branch
(branches are permanent and global, did you want a bookmark?)
hg commit
$ hgcommit -m 'started some-branch'
hg commit --close-branch

View File

@ -84,6 +84,7 @@ Should fail because there is only one head:
$ echo f >> a
$ hg branch foobranch
marked working directory as branch foobranch
(branches are permanent and global, did you want a bookmark?)
$ hg commit -mf
Should fail because merge with other branch:

View File

@ -76,6 +76,7 @@ qpush warning branchheads
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo c > c
$ hg ci -Amc
adding c
@ -125,6 +126,7 @@ Testing applied patches, push and --force
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branch
marked working directory as branch branch
(branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -Am addb
adding b

View File

@ -9,11 +9,13 @@
$ hg ci -m "initial"
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ hg branch
foo
$ hg ci -m "add branch name"
$ hg branch bar
marked working directory as branch bar
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m "change branch name"
Branch shadowing:
@ -25,6 +27,7 @@ Branch shadowing:
$ hg branch -f default
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m "clear branch name"
created new head
@ -186,6 +189,7 @@ Update with no arguments: tipmost revision of the current branch:
$ hg branch foobar
marked working directory as branch foobar
(branches are permanent and global, did you want a bookmark?)
$ hg up
abort: branch foobar not found
@ -195,6 +199,7 @@ Fastforward merge:
$ hg branch ff
marked working directory as branch ff
(branches are permanent and global, did you want a bookmark?)
$ echo ff > ff
$ hg ci -Am'fast forward'
@ -256,6 +261,7 @@ Test merging, add 3 default heads and one test head:
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ echo e >> e
$ hg ci -Ame
adding e

View File

@ -1922,6 +1922,7 @@ test outgoing:
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ echo d > d
$ hg add d

View File

@ -5,6 +5,7 @@
adding foo
$ hg branch branchA
marked working directory as branch branchA
(branches are permanent and global, did you want a bookmark?)
$ echo a1 > foo
$ hg ci -ma1 # 1
@ -32,6 +33,7 @@ Create branch B:
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchB
marked working directory as branch branchB
(branches are permanent and global, did you want a bookmark?)
$ echo b1 > foo
$ hg ci -mb1 # 3
@ -139,6 +141,7 @@ Make changes on new branch on tt
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchC
marked working directory as branch branchC
(branches are permanent and global, did you want a bookmark?)
$ echo b1 > bar
$ hg ci -Am "commit on branchC on tt"
adding bar

View File

@ -393,6 +393,7 @@ Check prepush logic with merged branches:
$ hg init j
$ hg -R j branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ echo init > j/foo
$ hg -R j ci -Am init
adding foo
@ -403,6 +404,7 @@ Check prepush logic with merged branches:
$ hg -R j ci -m a1
$ hg -R k branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ echo b > k/foo
$ hg -R k ci -m b
$ hg -R k up 0
@ -466,11 +468,13 @@ Check prepush with new branch head on former topo non-head:
$ cd n
$ hg branch A
marked working directory as branch A
(branches are permanent and global, did you want a bookmark?)
$ echo a >a
$ hg ci -Ama
adding a
$ hg branch B
marked working directory as branch B
(branches are permanent and global, did you want a bookmark?)
$ echo b >b
$ hg ci -Amb
adding b
@ -543,11 +547,13 @@ Check prepush with new branch head on former topo head:
$ cd o
$ hg branch A
marked working directory as branch A
(branches are permanent and global, did you want a bookmark?)
$ echo a >a
$ hg ci -Ama
adding a
$ hg branch B
marked working directory as branch B
(branches are permanent and global, did you want a bookmark?)
$ echo b >b
$ hg ci -Amb
adding b
@ -629,6 +635,7 @@ but child is on different branch:
$ cd p
$ hg branch A
marked working directory as branch A
(branches are permanent and global, did you want a bookmark?)
$ echo a0 >a
$ hg ci -Ama0
adding a
@ -638,6 +645,7 @@ but child is on different branch:
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch B
marked working directory as branch B
(branches are permanent and global, did you want a bookmark?)
$ echo b0 >b
$ hg ci -Amb0
adding b
@ -652,6 +660,7 @@ but child is on different branch:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch -f B
marked working directory as branch B
(branches are permanent and global, did you want a bookmark?)
$ echo a3 >a
$ hg ci -ma3
created new head
@ -659,6 +668,7 @@ but child is on different branch:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch -f A
marked working directory as branch A
(branches are permanent and global, did you want a bookmark?)
$ echo b3 >b
$ hg ci -mb3
created new head

View File

@ -17,6 +17,7 @@
$ hg branch branch1
marked working directory as branch branch1
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch1'
$ echo b > b
@ -27,6 +28,7 @@
$ hg branch branch2
marked working directory as branch branch2
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch2'
$ echo c > C
@ -37,6 +39,7 @@
$ hg branch -f branch2
marked working directory as branch branch2
(branches are permanent and global, did you want a bookmark?)
$ echo d > d
$ hg ci -Am D
adding d
@ -51,6 +54,7 @@
$ hg branch branch3
marked working directory as branch branch3
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch3'
$ echo f > f

View File

@ -36,6 +36,7 @@
$ hg branch 'notdefault'
marked working directory as branch notdefault
(branches are permanent and global, did you want a bookmark?)
$ echo F >> A
$ hg ci -m F

View File

@ -452,12 +452,14 @@ Interactions between collapse and keepbranches
$ hg branch '1'
marked working directory as branch 1
(branches are permanent and global, did you want a bookmark?)
$ echo 'b' > b
$ hg ci -Am 'B'
adding b
$ hg branch '2'
marked working directory as branch 2
(branches are permanent and global, did you want a bookmark?)
$ echo 'c' > c
$ hg ci -Am 'C'
adding c

View File

@ -28,6 +28,7 @@ Rebasing descendant onto ancestor across different named branches
$ hg branch dev
marked working directory as branch dev
(branches are permanent and global, did you want a bookmark?)
$ echo x > x

View File

@ -894,6 +894,7 @@ Abort early when a merge is in progress
$ hg branch thatbranch
marked working directory as branch thatbranch
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m'new head'

View File

@ -21,6 +21,7 @@
$ hg branch stable
marked working directory as branch stable
(branches are permanent and global, did you want a bookmark?)
$ echo bar >> a
$ hg ci -qm2

View File

@ -15,22 +15,26 @@
$ echo a > a
$ hg branch a
marked working directory as branch a
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm0
$ echo b > b
$ hg branch b
marked working directory as branch b
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm1
$ rm a
$ hg branch a-b-c-
marked working directory as branch a-b-c-
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm2 -u Bob
$ hg co 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch +a+b+c+
marked working directory as branch +a+b+c+
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm3
$ hg co 2 # interleave
@ -38,12 +42,14 @@
$ echo bb > b
$ hg branch -- -a-b-c-
marked working directory as branch -a-b-c-
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm4 -d "May 12 2005"
$ hg co 3
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch /a/b/c/
marked working directory as branch /a/b/c/
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm"5 bug"
$ hg merge 4
@ -51,14 +57,17 @@
(branch merge, don't forget to commit)
$ hg branch _a_b_c_
marked working directory as branch _a_b_c_
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm"6 issue619"
$ hg branch .a.b.c.
marked working directory as branch .a.b.c.
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm7
$ hg branch all
marked working directory as branch all
(branches are permanent and global, did you want a bookmark?)
$ hg ci --close-branch -Aqm8
abort: can only close branch heads
[255]
@ -67,6 +76,7 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch é
marked working directory as branch \xc3\xa9 (esc)
(branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm9
$ hg tag -r6 1.0

View File

@ -41,6 +41,7 @@ Two changesets this time so we rollback to a real changeset
Test issue 902 (current branch is preserved)
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ hg rollback
repository tip rolled back to revision 0 (undo commit)
working directory now based on revision 0
@ -56,6 +57,7 @@ Test rollback of hg before issue 902 was fixed
$ hg commit -m "test3"
$ hg branch test
marked working directory as branch test
(branches are permanent and global, did you want a bookmark?)
$ rm .hg/undo.branch
$ hg rollback
repository tip rolled back to revision 0 (undo commit)

View File

@ -407,6 +407,7 @@ shouldn't need merging
adding a
$ hg branch br
marked working directory as branch br
(branches are permanent and global, did you want a bookmark?)
$ echo a >> a
$ hg ci -m1
$ hg up default
@ -457,6 +458,7 @@ shouldn't need merging
committing subrepository s
$ hg branch br
marked working directory as branch br
(branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg -R s up 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

View File

@ -205,6 +205,7 @@ tag and branch using same name
$ hg branch tag-and-branch-same-name
marked working directory as branch tag-and-branch-same-name
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m"discouraged"
$ hg tag tag-and-branch-same-name
warning: tag tag-and-branch-same-name conflicts with existing branch name
@ -276,6 +277,7 @@ tagging on an uncommitted merge (issue2542)
$ hg co -q 0
$ hg branch b1
marked working directory as branch b1
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m2
$ hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

View File

@ -6,6 +6,7 @@ Test basic functionality of url#rev syntax
$ hg ci -qAm 'add a'
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ echo >> a
$ hg ci -m 'change a'
$ cd ..