test-glog
193 lines
| 4.3 KiB
| text/plain
|
TextLexer
/ tests / test-glog
Joel Rosdahl
|
r4344 | #!/bin/sh | ||
# @ (34) head | ||||
# | | ||||
# | o (33) head | ||||
# | | | ||||
# o | (32) expand | ||||
# |\ \ | ||||
# | o \ (31) expand | ||||
# | |\ \ | ||||
# | | o \ (30) expand | ||||
# | | |\ \ | ||||
# | | | o | (29) regular commit | ||||
# | | | | | | ||||
# | | o | | (28) merge zero known | ||||
# | | |\ \ \ | ||||
# o | | | | | (27) collapse | ||||
# |/ / / / / | ||||
# | | o---+ (26) merge one known; far right | ||||
# | | | | | | ||||
# +---o | | (25) merge one known; far left | ||||
# | | | | | | ||||
# | | o | | (24) merge one known; immediate right | ||||
# | | |\| | | ||||
# | | o | | (23) merge one known; immediate left | ||||
# | |/| | | | ||||
# +---o---+ (22) merge two known; one far left, one far right | ||||
# | | / / | ||||
# o | | | (21) expand | ||||
# |\ \ \ \ | ||||
# | o---+-+ (20) merge two known; two far right | ||||
# | / / / | ||||
# o | | | (19) expand | ||||
# |\ \ \ \ | ||||
# +---+---o (18) merge two known; two far left | ||||
# | | | | | ||||
# | o | | (17) expand | ||||
# | |\ \ \ | ||||
# | | o---+ (16) merge two known; one immediate right, one near right | ||||
# | | |/ / | ||||
# o | | | (15) expand | ||||
# |\ \ \ \ | ||||
# | o-----+ (14) merge two known; one immediate right, one far right | ||||
# | |/ / / | ||||
# o | | | (13) expand | ||||
# |\ \ \ \ | ||||
# +---o | | (12) merge two known; one immediate right, one far left | ||||
# | | |/ / | ||||
# | o | | (11) expand | ||||
# | |\ \ \ | ||||
# | | o---+ (10) merge two known; one immediate left, one near right | ||||
# | |/ / / | ||||
# o | | | (9) expand | ||||
# |\ \ \ \ | ||||
# | o-----+ (8) merge two known; one immediate left, one far right | ||||
# |/ / / / | ||||
# o | | | (7) expand | ||||
# |\ \ \ \ | ||||
# +---o | | (6) merge two known; one immediate left, one far left | ||||
# | |/ / / | ||||
# | o | | (5) expand | ||||
# | |\ \ \ | ||||
# | | o | | (4) merge two known; one immediate left, one immediate right | ||||
# | |/|/ / | ||||
# | o / / (3) collapse | ||||
# |/ / / | ||||
# o / / (2) collapse | ||||
# |/ / | ||||
# o / (1) collapse | ||||
# |/ | ||||
# o (0) root | ||||
Mads Kiilerich
|
r7429 | "$TESTDIR/hghave" no-outer-repo || exit 80 | ||
Joel Rosdahl
|
r4344 | set -e | ||
commit() | ||||
{ | ||||
rev=$1 | ||||
msg=$2 | ||||
shift 2 | ||||
if [ "$#" -gt 0 ]; then | ||||
hg debugsetparents "$@" | ||||
fi | ||||
Matt Mackall
|
r8397 | echo $rev > a | ||
hg commit -Aqd "$rev 0" -m "($rev) $msg" | ||||
Joel Rosdahl
|
r4344 | } | ||
echo "[extensions]" >> $HGRCPATH | ||||
echo "graphlog=" >> $HGRCPATH | ||||
echo % init | ||||
hg init repo | ||||
cd repo | ||||
echo % empty repo | ||||
hg glog | ||||
echo % building tree | ||||
commit 0 "root" | ||||
commit 1 "collapse" 0 | ||||
commit 2 "collapse" 1 | ||||
commit 3 "collapse" 2 | ||||
commit 4 "merge two known; one immediate left, one immediate right" 1 3 | ||||
commit 5 "expand" 3 4 | ||||
commit 6 "merge two known; one immediate left, one far left" 2 5 | ||||
commit 7 "expand" 2 5 | ||||
commit 8 "merge two known; one immediate left, one far right" 0 7 | ||||
commit 9 "expand" 7 8 | ||||
commit 10 "merge two known; one immediate left, one near right" 0 6 | ||||
commit 11 "expand" 6 10 | ||||
commit 12 "merge two known; one immediate right, one far left" 1 9 | ||||
commit 13 "expand" 9 11 | ||||
commit 14 "merge two known; one immediate right, one far right" 0 12 | ||||
commit 15 "expand" 13 14 | ||||
commit 16 "merge two known; one immediate right, one near right" 0 1 | ||||
commit 17 "expand" 12 16 | ||||
commit 18 "merge two known; two far left" 1 15 | ||||
commit 19 "expand" 15 17 | ||||
commit 20 "merge two known; two far right" 0 18 | ||||
commit 21 "expand" 19 20 | ||||
commit 22 "merge two known; one far left, one far right" 18 21 | ||||
commit 23 "merge one known; immediate left" 1 22 | ||||
commit 24 "merge one known; immediate right" 0 23 | ||||
commit 25 "merge one known; far left" 21 24 | ||||
commit 26 "merge one known; far right" 18 25 | ||||
commit 27 "collapse" 21 | ||||
commit 28 "merge zero known" 1 26 | ||||
commit 29 "regular commit" 0 | ||||
commit 30 "expand" 28 29 | ||||
commit 31 "expand" 21 30 | ||||
commit 32 "expand" 27 31 | ||||
commit 33 "head" 18 | ||||
commit 34 "head" 32 | ||||
echo % glog -q | ||||
hg glog -q | ||||
echo % glog | ||||
hg glog | ||||
Thomas Arendsen Hein
|
r4735 | |||
Steve Borho
|
r5939 | echo % file glog | ||
Matt Mackall
|
r8397 | hg glog a | ||
Steve Borho
|
r5939 | |||
Thomas Arendsen Hein
|
r4735 | echo % unused arguments | ||
Steve Borho
|
r5939 | hg glog -q foo bar || echo failed | ||
Patrick Mezard
|
r6969 | |||
echo % from outer space | ||||
cd .. | ||||
hg glog -l1 repo | ||||
Matt Mackall
|
r8397 | hg glog -l1 repo/a | ||
Patrick Mezard
|
r6969 | hg glog -l1 repo/missing | ||
Peter Arrenbrecht
|
r7383 | echo % file log with revs != cset revs | ||
hg init flog | ||||
cd flog | ||||
echo one >one | ||||
hg add one | ||||
hg commit -mone | ||||
echo two >two | ||||
hg add two | ||||
hg commit -mtwo | ||||
echo more >two | ||||
hg commit -mmore | ||||
hg glog two | ||||
Joel Rosdahl
|
r9728 | echo "% file log with explicit style (issue 1896)" | ||
hg glog --style=default one | ||||
Dirkjan Ochtman
|
r7714 | echo % incoming and outgoing | ||
cd .. | ||||
hg clone -U -r31 repo repo2 | ||||
cd repo2 | ||||
Benoit Boissinot
|
r9176 | hg incoming --graph ../repo | ||
Dirkjan Ochtman
|
r7714 | cd .. | ||
hg -R repo outgoing --graph repo2 | ||||
Nicolas Dumazet
|
r10084 | |||
cd repo | ||||
echo % file + limit with revs != cset revs | ||||
touch b | ||||
hg ci -Aqm0 | ||||
# this used to show only one cset | ||||
hg glog -l2 a | ||||
echo "% file + limit + -ra:b, (b - a) < limit" | ||||
hg glog -l3000 -r32:tip a | ||||
echo "% file + limit + -ra:b, b < tip" | ||||
hg glog -l1 -r32:34 a | ||||
echo "% file + limit + -ra:b, b < tip, (b - a) < limit" | ||||
hg glog -l10 -r33:34 a | ||||