tests/test-stats
author Alexander Solovyov <piranha@piranha.org.ua>
Fri, 03 Oct 2008 00:07:38 +0300
changeset 7065 9bc46d069a76
permissions -rwxr-xr-x
churn: generalisation, now it is possible to see statistics grouped by custom template
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7065
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     1
#!/bin/sh
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     2
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     4
echo "churn=" >> $HGRCPATH
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     5
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     6
COLUMNS=80; export COLUMNS
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     7
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     8
echo % create test repository
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     9
hg init repo
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    10
cd repo
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    11
echo a > a
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    12
hg ci -Am adda -u user1 -d 6:00
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    13
echo b >> a
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    14
echo b > b
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    15
hg ci -m changeba -u user2 -d 9:00 a
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    16
hg ci -Am addb -u user2 -d 9:30
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    17
echo c >> a
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    18
echo c >> b
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    19
echo c > c
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    20
hg ci -m changeca -u user3 -d 12:00 a
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    21
hg ci -m changecb -u user3 -d 12:15 b
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    22
hg ci -Am addc -u user3 -d 12:30
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    23
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    24
echo % all stats
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    25
hg stats
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    26
echo % stats by hour
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    27
hg stats -f '%H' -s
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    28
echo % stats with aliases
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    29
cat > ../aliases <<EOF
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    30
06 09
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    31
EOF
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    32
hg stats -f '%H' -s --aliases ../aliases
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    33
echo % stats with column specifier
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    34
COLUMNS=40 hg stats -f '%Y' -s
9bc46d069a76 churn: generalisation, now it is possible to see statistics grouped by custom template
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    35