2006-08-15 22:22:26 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-04-17 03:17:39 +04:00
|
|
|
HGMERGE=true; export HGMERGE
|
|
|
|
|
2006-08-15 22:22:26 +04:00
|
|
|
echo % init
|
|
|
|
hg init
|
|
|
|
|
|
|
|
echo % commit
|
|
|
|
echo 'a' > a
|
|
|
|
hg ci -A -m test -u nobody -d '1 0'
|
|
|
|
|
|
|
|
echo % annotate -c
|
|
|
|
hg annotate -c a
|
|
|
|
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate -cl
|
|
|
|
hg annotate -cl a
|
|
|
|
|
2006-08-15 22:22:26 +04:00
|
|
|
echo % annotate -d
|
|
|
|
hg annotate -d a
|
|
|
|
|
|
|
|
echo % annotate -n
|
|
|
|
hg annotate -n a
|
|
|
|
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate -nl
|
|
|
|
hg annotate -nl a
|
|
|
|
|
2006-08-15 22:22:26 +04:00
|
|
|
echo % annotate -u
|
|
|
|
hg annotate -u a
|
|
|
|
|
|
|
|
echo % annotate -cdnu
|
|
|
|
hg annotate -cdnu a
|
2006-09-27 20:10:21 +04:00
|
|
|
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate -cdnul
|
|
|
|
hg annotate -cdnul a
|
|
|
|
|
2006-09-27 20:10:21 +04:00
|
|
|
cat <<EOF >>a
|
|
|
|
a
|
|
|
|
a
|
|
|
|
EOF
|
|
|
|
hg ci -ma1 -d '1 0'
|
|
|
|
hg cp a b
|
|
|
|
hg ci -mb -d '1 0'
|
|
|
|
cat <<EOF >> b
|
2007-07-08 21:59:02 +04:00
|
|
|
b4
|
|
|
|
b5
|
|
|
|
b6
|
2006-09-27 20:10:21 +04:00
|
|
|
EOF
|
|
|
|
hg ci -mb2 -d '2 0'
|
|
|
|
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate -n b
|
|
|
|
hg annotate -n b
|
|
|
|
echo % annotate -nl b
|
|
|
|
hg annotate -nl b
|
2006-09-27 20:10:21 +04:00
|
|
|
echo % annotate -nf b
|
|
|
|
hg annotate -nf b
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate -nlf b
|
|
|
|
hg annotate -nlf b
|
2006-09-27 20:10:21 +04:00
|
|
|
|
|
|
|
hg up -C 2
|
|
|
|
cat <<EOF >> b
|
2007-07-08 21:59:02 +04:00
|
|
|
b4
|
2006-09-27 20:10:21 +04:00
|
|
|
c
|
2007-07-08 21:59:02 +04:00
|
|
|
b5
|
2006-09-27 20:10:21 +04:00
|
|
|
EOF
|
|
|
|
hg ci -mb2.1 -d '2 0'
|
|
|
|
hg merge
|
|
|
|
hg ci -mmergeb -d '3 0'
|
|
|
|
echo % annotate after merge
|
|
|
|
hg annotate -nf b
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate after merge with -l
|
|
|
|
hg annotate -nlf b
|
2006-09-27 20:10:21 +04:00
|
|
|
|
|
|
|
hg up -C 1
|
|
|
|
hg cp a b
|
|
|
|
cat <<EOF > b
|
|
|
|
a
|
|
|
|
z
|
|
|
|
a
|
|
|
|
EOF
|
|
|
|
hg ci -mc -d '3 0'
|
|
|
|
hg merge
|
|
|
|
cat <<EOF >> b
|
2007-07-08 21:59:02 +04:00
|
|
|
b4
|
2006-09-27 20:10:21 +04:00
|
|
|
c
|
2007-07-08 21:59:02 +04:00
|
|
|
b5
|
2006-09-27 20:10:21 +04:00
|
|
|
EOF
|
|
|
|
echo d >> b
|
|
|
|
hg ci -mmerge2 -d '4 0'
|
|
|
|
echo % annotate after rename merge
|
|
|
|
hg annotate -nf b
|
2007-07-08 21:59:02 +04:00
|
|
|
echo % annotate after rename merge with -l
|
|
|
|
hg annotate -nlf b
|
2006-10-16 07:57:30 +04:00
|
|
|
|
|
|
|
echo % linkrev vs rev
|
2007-07-08 21:59:02 +04:00
|
|
|
hg annotate -r tip -n a
|
|
|
|
echo % linkrev vs rev with -l
|
|
|
|
hg annotate -r tip -nl a
|
2007-06-20 02:10:21 +04:00
|
|
|
|
|
|
|
# test issue 589
|
2007-06-21 11:25:49 +04:00
|
|
|
# annotate was crashing when trying to --follow something
|
2007-06-20 02:10:21 +04:00
|
|
|
# like A -> B -> A
|
|
|
|
echo % generate ABA rename configuration
|
|
|
|
echo foo > foo
|
|
|
|
hg add foo
|
|
|
|
hg ci -m addfoo
|
|
|
|
hg rename foo bar
|
|
|
|
hg ci -m renamefoo
|
|
|
|
hg rename bar foo
|
|
|
|
hg ci -m renamebar
|
|
|
|
|
|
|
|
echo % annotate after ABA with follow
|
|
|
|
hg annotate --follow foo
|
|
|
|
|