tests/test-stats
changeset 7070 2627ef59195d
parent 7069 852f39691a0a
child 7071 643c751e60b2
equal deleted inserted replaced
7069:852f39691a0a 7070:2627ef59195d
     1 #!/bin/sh
       
     2 
       
     3 echo "[extensions]" >> $HGRCPATH
       
     4 echo "churn=" >> $HGRCPATH
       
     5 
       
     6 COLUMNS=80; export COLUMNS
       
     7 
       
     8 echo % create test repository
       
     9 hg init repo
       
    10 cd repo
       
    11 echo a > a
       
    12 hg ci -Am adda -u user1 -d 6:00
       
    13 echo b >> a
       
    14 echo b > b
       
    15 hg ci -m changeba -u user2 -d 9:00 a
       
    16 hg ci -Am addb -u user2 -d 9:30
       
    17 echo c >> a
       
    18 echo c >> b
       
    19 echo c > c
       
    20 hg ci -m changeca -u user3 -d 12:00 a
       
    21 hg ci -m changecb -u user3 -d 12:15 b
       
    22 hg ci -Am addc -u user3 -d 12:30
       
    23 
       
    24 echo % all stats
       
    25 hg stats
       
    26 echo % stats by hour
       
    27 hg stats -f '%H' -s
       
    28 echo % stats with aliases
       
    29 cat > ../aliases <<EOF
       
    30 06 09
       
    31 EOF
       
    32 hg stats -f '%H' -s --aliases ../aliases
       
    33 echo % stats with column specifier
       
    34 COLUMNS=40 hg stats -f '%Y' -s
       
    35