view tests/test-bundle @ 3347:25d270e0b27f

ui.py: untangle updateopts The code in ui.updateopts that handles ui.quiet, ui.verbose and ui.debugflag is too smart, making it somewhat hard to see what are the exact constraints placed on the values of these variables, hiding some buglets. This patch makes these constraints more explicit, fixing these buglets and changing the behaviour slightly. It also adds a test to make sure things work as expected in the future. The buglets: - setting ui.debug = True in a hgrc wouldn't turn on verbose mode - additionally, setting ui.quiet = True or using --quiet would give you a "quiet debug" mode. The behaviour change: - previously, in a hgrc file, ui.quiet wins against ui.verbose (i.e. the final result would be quiet mode), but --verbose wins against --quiet - now ui.quiet nullifies ui.verbose and --verbose nullifies --quiet. As a consequence, using -qv always gives you normal mode (unless debug mode was turned on somewhere)
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 10 Oct 2006 18:43:20 -0300
parents 400a4a502001
children b19360aa21e9
line wrap: on
line source

#!/bin/sh

hg init test
cd test
echo 0 > afile
hg add afile
hg commit -m "0.0" -d "1000000 0"
echo 1 >> afile
hg commit -m "0.1" -d "1000000 0"
echo 2 >> afile
hg commit -m "0.2" -d "1000000 0"
echo 3 >> afile
hg commit -m "0.3" -d "1000000 0"
hg update -C 0
echo 1 >> afile
hg commit -m "1.1" -d "1000000 0"
echo 2 >> afile
hg commit -m "1.2" -d "1000000 0"
echo "a line" > fred
echo 3 >> afile
hg add fred
hg commit -m "1.3" -d "1000000 0"
hg mv afile adifferentfile
hg commit -m "1.3m" -d "1000000 0"
hg update -C 3
hg mv afile anotherfile
hg commit -m "0.3m" -d "1000000 0"
hg verify
cd ..
hg init empty
hg -R test bundle full.hg empty
hg -R test unbundle full.hg
hg -R empty heads
hg -R empty verify

hg --cwd test pull ../full.hg
hg --cwd empty pull ../full.hg
hg -R empty rollback
hg --cwd empty pull ../full.hg

rm -rf empty
hg init empty
cd empty
hg -R bundle://../full.hg log
echo '[hooks]' >> .hg/hgrc
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
#doesn't work (yet ?)
#hg -R bundle://../full.hg verify
hg pull bundle://../full.hg
cd ..

rm -rf empty
hg init empty
hg clone -r 3 test partial
hg clone partial partial2
cd partial
hg -R bundle://../full.hg log
hg incoming bundle://../full.hg
hg -R bundle://../full.hg outgoing ../partial2
cd ..