tests/test-newbranch
changeset 3502 8dc14d630b29
parent 3451 196baf20232b
child 3760 aeafd80c1e78
equal deleted inserted replaced
3501:89820e9b94f2 3502:8dc14d630b29
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 hg init t
     3 hg init t
     4 cd t
     4 cd t
       
     5 hg branches
     5 
     6 
     6 echo foo > a
     7 echo foo > a
     7 hg add a
     8 hg add a
     8 hg ci -m "initial" -d "0 0"
     9 hg ci -m "initial" -d "0 0"
     9 echo foo > .hg/branch
    10 hg branch foo
       
    11 hg branch
    10 hg ci -m "add branch name" -d "0 0"
    12 hg ci -m "add branch name" -d "0 0"
    11 echo bar > .hg/branch
    13 hg branch bar
    12 hg ci -m "change branch name" -d "0 0"
    14 hg ci -m "change branch name" -d "0 0"
    13 rm .hg/branch
    15 hg branch ""
    14 hg ci -m "clear branch name" -d "0 0"
    16 hg ci -m "clear branch name" -d "0 0"
    15 
    17 
    16 hg co foo
    18 hg co foo
    17 cat .hg/branch
    19 hg branch
    18 echo bleah > a
    20 echo bleah > a
    19 hg ci -m "modify a branch" -d "0 0"
    21 hg ci -m "modify a branch" -d "0 0"
    20 
    22 
    21 hg merge
    23 hg merge
    22 cat .hg/branch
    24 hg branch
    23 HG_MERGE=true hg ci -m "merge" -d "0 0"
    25 HG_MERGE=true hg ci -m "merge" -d "0 0"
    24 hg log
    26 hg log
       
    27 
       
    28 hg branches
       
    29 hg branches -q
    25 
    30 
    26 echo % test for invalid branch cache
    31 echo % test for invalid branch cache
    27 hg rollback
    32 hg rollback
    28 hg tip
    33 hg tip