| 1 |
test branch selection options |
| 2 |
|
| 3 |
|
| 4 |
#testcases bm-v2 bm-v3 |
| 5 |
|
| 6 |
#if bm-v3 |
| 7 |
$ cat <<EOF >> $HGRCPATH |
| 8 |
> [experimental] |
| 9 |
> branch-cache-v3=yes |
| 10 |
> EOF |
| 11 |
#else |
| 12 |
$ cat <<EOF >> $HGRCPATH |
| 13 |
> [experimental] |
| 14 |
> branch-cache-v3=no |
| 15 |
> EOF |
| 16 |
#endif |
| 17 |
|
| 18 |
$ hg init branch |
| 19 |
$ cd branch |
| 20 |
$ hg branch a |
| 21 |
marked working directory as branch a |
| 22 |
(branches are permanent and global, did you want a bookmark?) |
| 23 |
$ echo a > foo |
| 24 |
$ hg ci -d '0 0' -Ama |
| 25 |
adding foo |
| 26 |
$ echo a2 > foo |
| 27 |
$ hg ci -d '0 0' -ma2 |
| 28 |
$ hg up 0 |
| 29 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 30 |
$ hg branch c |
| 31 |
marked working directory as branch c |
| 32 |
$ echo c > foo |
| 33 |
$ hg ci -d '0 0' -mc |
| 34 |
$ hg tag -l z |
| 35 |
$ cd .. |
| 36 |
$ hg clone -r 0 branch branch2 |
| 37 |
adding changesets |
| 38 |
adding manifests |
| 39 |
adding file changes |
| 40 |
added 1 changesets with 1 changes to 1 files |
| 41 |
new changesets 5b65ba7c951d |
| 42 |
updating to branch a |
| 43 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 44 |
$ cd branch2 |
| 45 |
$ hg up 0 |
| 46 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 47 |
$ hg branch b |
| 48 |
marked working directory as branch b |
| 49 |
$ echo b > foo |
| 50 |
$ hg ci -d '0 0' -mb |
| 51 |
$ hg up 0 |
| 52 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 53 |
$ hg --encoding utf-8 branch æ |
| 54 |
marked working directory as branch \xc3\xa6 (esc) |
| 55 |
$ echo ae1 > foo |
| 56 |
$ hg ci -d '0 0' -mae1 |
| 57 |
$ hg up 0 |
| 58 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 59 |
$ hg --encoding utf-8 branch -f æ |
| 60 |
marked working directory as branch \xc3\xa6 (esc) |
| 61 |
$ echo ae2 > foo |
| 62 |
$ hg ci -d '0 0' -mae2 |
| 63 |
created new head |
| 64 |
$ hg up 0 |
| 65 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 66 |
$ hg branch -f b |
| 67 |
marked working directory as branch b |
| 68 |
$ echo b2 > foo |
| 69 |
$ hg ci -d '0 0' -mb2 |
| 70 |
created new head |
| 71 |
|
| 72 |
unknown branch and fallback |
| 73 |
|
| 74 |
$ hg in -qbz |
| 75 |
abort: unknown branch 'z' |
| 76 |
[10] |
| 77 |
$ hg in -q ../branch#z |
| 78 |
2:f25d57ab0566 |
| 79 |
$ hg out -qbz |
| 80 |
abort: unknown branch 'z' |
| 81 |
[10] |
| 82 |
|
| 83 |
in rev c branch a |
| 84 |
|
| 85 |
$ hg in -qr c ../branch#a |
| 86 |
1:dd6e60a716c6 |
| 87 |
2:f25d57ab0566 |
| 88 |
$ hg in -qr c -b a |
| 89 |
1:dd6e60a716c6 |
| 90 |
2:f25d57ab0566 |
| 91 |
|
| 92 |
out branch . |
| 93 |
|
| 94 |
$ hg out -q ../branch#. |
| 95 |
1:b84708d77ab7 |
| 96 |
4:65511d0e2b55 |
| 97 |
$ hg out -q -b . |
| 98 |
1:b84708d77ab7 |
| 99 |
4:65511d0e2b55 |
| 100 |
|
| 101 |
out branch . non-ascii |
| 102 |
|
| 103 |
$ hg --encoding utf-8 up æ |
| 104 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 105 |
$ hg --encoding latin1 out -q ../branch#. |
| 106 |
2:df5a44224d4e |
| 107 |
3:4f4a5125ca10 |
| 108 |
$ hg --encoding latin1 out -q -b . |
| 109 |
2:df5a44224d4e |
| 110 |
3:4f4a5125ca10 |
| 111 |
|
| 112 |
clone branch b |
| 113 |
|
| 114 |
$ cd .. |
| 115 |
$ hg clone branch2#b branch3 |
| 116 |
adding changesets |
| 117 |
adding manifests |
| 118 |
adding file changes |
| 119 |
added 3 changesets with 3 changes to 1 files (+1 heads) |
| 120 |
new changesets 5b65ba7c951d:65511d0e2b55 |
| 121 |
updating to branch b |
| 122 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 123 |
$ hg -q -R branch3 heads b |
| 124 |
2:65511d0e2b55 |
| 125 |
1:b84708d77ab7 |
| 126 |
$ hg -q -R branch3 parents |
| 127 |
2:65511d0e2b55 |
| 128 |
$ rm -rf branch3 |
| 129 |
|
| 130 |
clone rev a branch b |
| 131 |
|
| 132 |
$ hg clone -r a branch2#b branch3 |
| 133 |
adding changesets |
| 134 |
adding manifests |
| 135 |
adding file changes |
| 136 |
added 3 changesets with 3 changes to 1 files (+1 heads) |
| 137 |
new changesets 5b65ba7c951d:65511d0e2b55 |
| 138 |
updating to branch a |
| 139 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 140 |
$ hg -q -R branch3 heads b |
| 141 |
2:65511d0e2b55 |
| 142 |
1:b84708d77ab7 |
| 143 |
$ hg -q -R branch3 parents |
| 144 |
0:5b65ba7c951d |
| 145 |
$ rm -rf branch3 |