tests/test-newbranch
changeset 6160 3ee3bc5d06c5
parent 5988 ee317dbfb9d0
child 6723 1fe6f365df2e
equal deleted inserted replaced
6159:bc784304fea1 6160:3ee3bc5d06c5
     1 #!/bin/sh
     1 #!/bin/sh
       
     2 
       
     3 branchcache=.hg/branch.cache
     2 
     4 
     3 hg init t
     5 hg init t
     4 cd t
     6 cd t
     5 hg branches
     7 hg branches
     6 
     8 
    30 hg branches
    32 hg branches
    31 hg branches -q
    33 hg branches -q
    32 
    34 
    33 echo % test for invalid branch cache
    35 echo % test for invalid branch cache
    34 hg rollback
    36 hg rollback
    35 cp .hg/branch.cache .hg/bc-invalid
    37 cp $branchcache .hg/bc-invalid
    36 hg log -r foo
    38 hg log -r foo
    37 cp .hg/bc-invalid .hg/branch.cache
    39 cp .hg/bc-invalid $branchcache
    38 hg --debug log -r foo
    40 hg --debug log -r foo
    39 rm .hg/branch.cache
    41 rm $branchcache
    40 echo corrupted > .hg/branch.cache
    42 echo corrupted > $branchcache
    41 hg log -qr foo
    43 hg log -qr foo
    42 cat .hg/branch.cache
    44 cat $branchcache
    43 
    45 
    44 echo % push should update the branch cache
    46 echo % push should update the branch cache
    45 hg init ../target
    47 hg init ../target
    46 echo % pushing just rev 0
    48 echo % pushing just rev 0
    47 hg push -qr 0 ../target
    49 hg push -qr 0 ../target
    48 cat ../target/.hg/branch.cache
    50 cat ../target/$branchcache
    49 echo % pushing everything
    51 echo % pushing everything
    50 hg push -qf ../target
    52 hg push -qf ../target
    51 cat ../target/.hg/branch.cache
    53 cat ../target/$branchcache
    52 
    54 
    53 echo % update with no arguments: tipmost revision of the current branch
    55 echo % update with no arguments: tipmost revision of the current branch
    54 hg up -q -C 0
    56 hg up -q -C 0
    55 hg up -q
    57 hg up -q
    56 hg id
    58 hg id