comparison tests/test-branches.t @ 25295:701df761aa94

branch: don't warn about branches if repository has multiple branches already This warning exists to prevent git users from prematurely polluting their namespace when trying out Mercurial. But for repos that already have multiple branches, understanding what branches are is not optional so we should just shut up.
author Matt Mackall <mpm@selenic.com>
date Fri, 22 May 2015 17:08:59 -0500
parents 9347c15d8136
children cfa0037448f4
comparison
equal deleted inserted replaced
25293:ab618e52788a 25295:701df761aa94
11 (branches are permanent and global, did you want a bookmark?) 11 (branches are permanent and global, did you want a bookmark?)
12 $ hg commit -d '1 0' -m "Adding a branch" 12 $ hg commit -d '1 0' -m "Adding a branch"
13 13
14 $ hg branch q 14 $ hg branch q
15 marked working directory as branch q 15 marked working directory as branch q
16 (branches are permanent and global, did you want a bookmark?)
17 $ echo 'aa' >a 16 $ echo 'aa' >a
18 $ hg branch -C 17 $ hg branch -C
19 reset working directory to branch a 18 reset working directory to branch a
20 $ hg commit -d '2 0' -m "Adding to a branch" 19 $ hg commit -d '2 0' -m "Adding to a branch"
21 20
23 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 22 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
24 $ echo 'b' >b 23 $ echo 'b' >b
25 $ hg add b 24 $ hg add b
26 $ hg branch b 25 $ hg branch b
27 marked working directory as branch b 26 marked working directory as branch b
28 (branches are permanent and global, did you want a bookmark?)
29 $ hg commit -d '2 0' -m "Adding b branch" 27 $ hg commit -d '2 0' -m "Adding b branch"
30 28
31 $ echo 'bh1' >bh1 29 $ echo 'bh1' >bh1
32 $ hg add bh1 30 $ hg add bh1
33 $ hg commit -d '3 0' -m "Adding b branch head 1" 31 $ hg commit -d '3 0' -m "Adding b branch head 1"
40 38
41 $ echo 'c' >c 39 $ echo 'c' >c
42 $ hg add c 40 $ hg add c
43 $ hg branch c 41 $ hg branch c
44 marked working directory as branch c 42 marked working directory as branch c
45 (branches are permanent and global, did you want a bookmark?)
46 $ hg commit -d '5 0' -m "Adding c branch" 43 $ hg commit -d '5 0' -m "Adding c branch"
47 44
48 reserved names 45 reserved names
49 46
50 $ hg branch tip 47 $ hg branch tip
99 96
100 $ echo 'd' >d 97 $ echo 'd' >d
101 $ hg add d 98 $ hg add d
102 $ hg branch 'a branch name much longer than the default justification used by branches' 99 $ hg branch 'a branch name much longer than the default justification used by branches'
103 marked working directory as branch a branch name much longer than the default justification used by branches 100 marked working directory as branch a branch name much longer than the default justification used by branches
104 (branches are permanent and global, did you want a bookmark?)
105 $ hg commit -d '6 0' -m "Adding d branch" 101 $ hg commit -d '6 0' -m "Adding d branch"
106 102
107 $ hg branches 103 $ hg branches
108 a branch name much longer than the default justification used by branches 7:10ff5895aa57 104 a branch name much longer than the default justification used by branches 7:10ff5895aa57
109 b 4:aee39cd168d0 105 b 4:aee39cd168d0
599 .hg/cache/rbc-revs-v1: size=120 595 .hg/cache/rbc-revs-v1: size=120
600 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| 596 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....|
601 cache is updated when committing 597 cache is updated when committing
602 $ hg branch i-will-regret-this 598 $ hg branch i-will-regret-this
603 marked working directory as branch i-will-regret-this 599 marked working directory as branch i-will-regret-this
604 (branches are permanent and global, did you want a bookmark?)
605 $ hg ci -m regrets 600 $ hg ci -m regrets
606 $ f --size .hg/cache/rbc-* 601 $ f --size .hg/cache/rbc-*
607 .hg/cache/rbc-names-v1: size=106 602 .hg/cache/rbc-names-v1: size=106
608 .hg/cache/rbc-revs-v1: size=128 603 .hg/cache/rbc-revs-v1: size=128
609 update after rollback - the cache will be correct but rbc-names will will still 604 update after rollback - the cache will be correct but rbc-names will will still