tests/test-newbranch
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 16 Mar 2007 00:22:55 -0300
changeset 4228 c52b7176af94
parent 4207 7e1c8a565a4f
child 4209 dbc3846c09a1
child 4231 83153299aab5
permissions -rwxr-xr-x
hgweb: handle IOErrors and OSErrors during unbundle This allows the client to display a reasonable message to the user (e.g. "Permission denied: .hg/lock"), instead of the current "<url> does not appear to be an hg repository".

#!/bin/sh

hg init t
cd t
hg branches

echo foo > a
hg add a
hg ci -m "initial" -d "1000000 0"
hg branch foo
hg branch
hg ci -m "add branch name" -d "1000000 0"
hg branch bar
hg ci -m "change branch name" -d "1000000 0"
hg branch default
hg ci -m "clear branch name" -d "1000000 0"

hg co foo
hg branch
echo bleah > a
hg ci -m "modify a branch" -d "1000000 0"

hg merge
hg branch
hg ci -m "merge" -d "1000000 0"
hg log

hg branches
hg branches -q

echo % test for invalid branch cache
hg rollback
cp .hg/branch.cache .hg/bc-invalid
hg log -r foo
cp .hg/bc-invalid .hg/branch.cache
hg --debug log -r foo
rm .hg/branch.cache
echo corrupted > .hg/branch.cache
hg log -qr foo
cat .hg/branch.cache

echo % update with no arguments: tipmost revision of the current branch
hg up -q -C 0
hg up -q
hg id
hg up -q 1
hg up -q
hg id