view tests/test-push-warn @ 3349: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 e506c14382fd
children 975c2469c316
line wrap: on
line source

#!/bin/sh

mkdir a
cd a
hg init
echo foo > t1
hg add t1
hg commit -m "1" -d "1000000 0"

cd ..
hg clone a b

cd a
echo foo > t2
hg add t2
hg commit -m "2" -d "1000000 0"

cd ../b
echo foo > t3
hg add t3
hg commit -m "3" -d "1000000 0"

hg push ../a
hg pull ../a
hg push ../a
hg merge
hg commit -m "4" -d "1000000 0"
hg push ../a
cd ..

hg init c
cd c
for i in 0 1 2; do
    echo $i >> foo
    hg ci -Am $i -d "1000000 0"
done
cd ..

hg clone c d
cd d
for i in 0 1; do
    hg co -C $i
    echo d-$i >> foo
    hg ci -m d-$i -d "1000000 0"
done

HGMERGE=true hg merge 3
hg ci -m c-d -d "1000000 0"

hg push ../c
hg push -r 2 ../c
hg push -r 3 -r 4 ../c
hg push -r 5 ../c

exit 0