tests/test-churn.t
author Brodie Rao <brodie@sf.io>
Mon, 16 Sep 2013 01:08:29 -0700
changeset 20192 38fad5e76ee8
parent 18369 2150e70c0ee1
child 21163 9846b40d01e7
permissions -rw-r--r--
branches: simplify with repo.branchmap().iterbranches() Running hg branches on the PyPy repo (with 996) over a busy NFS server, before this change: $ time hg --profile branches > /dev/null CallCount Recursive Total(s) Inline(s) module:lineno(function) 1069 0 1.2955 1.2955 <open> 1063 0 0.5576 0.5576 <method 'close' of 'file' objects> 4122 0 0.1993 0.0449 mercurial.repoview:161(changelog) 8240 0 0.0771 0.0299 mercurial.changelog:133(tip) 4122 0 0.0422 0.0204 mercurial.localrepo:26(__get__) 8240 0 0.0252 0.0131 <len> 4122 0 0.0060 0.0037 mercurial.repoview:112(filterrevs) 8240 0 0.0028 0.0028 <hash> 3029 0 0.2139 0.0390 mercurial.context:202(__init__) 3029 0 0.1402 0.0339 mercurial.repoview:161(changelog) 3029 0 0.0240 0.0087 mercurial.changelog:183(rev) 9087 0 0.0067 0.0067 <isinstance> 1096 0 0.0025 0.0025 <binascii.unhexlify> 4125 0 0.0015 0.0015 <len> 4229 0 0.0344 0.0344 mercurial.revlog:296(rev) 1061 0 0.0343 0.0343 <method 'seek' of 'file' objects> 1063 0 0.0339 0.0339 <method 'read' of 'file' objects> 40476 16488 0.0479 0.0311 <len> 16488 0 0.0216 0.0168 mercurial.revlog:262(__len__) 8240 0 0.0771 0.0299 mercurial.changelog:133(tip) 8240 0 0.0281 0.0203 mercurial.changelog:190(node) 8240 0 0.0191 0.0095 <len> 1342 0 0.0278 0.0278 <zlib.decompress> 1074 0 2.2143 0.0266 mercurial.changelog:270(read) 1074 0 2.1328 0.0230 mercurial.revlog:907(revision) 1073 0 0.0208 0.0108 mercurial.changelog:28(decodeextra) 2148 0 0.0072 0.0072 <method 'split' of 'str' objects> 2148 0 0.0211 0.0038 mercurial.encoding:61(tolocal) 1074 0 0.0028 0.0028 <method 'index' of 'str' objects> 1061 0 1.9811 0.0237 mercurial.revlog:817(_loadchunk) real 0m2.742s user 0m0.811s sys 0m0.188s After this change: $ time hg --profile branches > /dev/null CallCount Recursive Total(s) Inline(s) module:lineno(function) 2092 0 0.1444 0.0292 mercurial.context:202(__init__) 2092 0 0.0908 0.0216 mercurial.repoview:161(changelog) 2092 0 0.0164 0.0057 mercurial.changelog:183(rev) 6276 0 0.0045 0.0045 <isinstance> 1096 0 0.0024 0.0024 <binascii.unhexlify> 3188 0 0.0013 0.0013 <len> 2218 0 0.0230 0.0230 mercurial.revlog:296(rev) 2111 0 0.1028 0.0218 mercurial.repoview:161(changelog) 4218 0 0.0387 0.0146 mercurial.changelog:133(tip) 2111 0 0.0238 0.0104 mercurial.localrepo:26(__get__) 4218 0 0.0122 0.0062 <len> 2111 0 0.0038 0.0021 mercurial.repoview:112(filterrevs) 4218 0 0.0014 0.0014 <hash> 20240 8444 0.0233 0.0149 <len> 8444 0 0.0110 0.0084 mercurial.revlog:262(__len__) 4218 0 0.0387 0.0146 mercurial.changelog:133(tip) 4218 0 0.0144 0.0103 mercurial.changelog:190(node) 4218 0 0.0097 0.0048 <len> 2398 1 0.0271 0.0115 mercurial.localrepo:26(__get__) 2398 1 0.0146 0.0046 mercurial.scmutil:939(__get__) 2124 0 0.0009 0.0009 mercurial.localrepo:330(unfiltered) 274 0 0.0002 0.0002 mercurial.repoview:192(unfiltered) 4 0 0.1409 0.0112 mercurial.branchmap:19(read) 1096 0 0.1113 0.0028 mercurial.localrepo:407(__contains__) 1098 0 0.0020 0.0020 <method 'split' of 'str' objects> 1097 0 0.0019 0.0019 <binascii.unhexlify> 1096 0 0.0093 0.0018 mercurial.encoding:61(tolocal) 1096 0 0.0010 0.0010 <method 'append' of 'list' objects> 4349 0 0.0150 0.0105 mercurial.changelog:190(node) 4349 0 0.0045 0.0045 mercurial.revlog:317(node) real 0m0.362s user 0m0.329s sys 0m0.024s
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     1
  $ echo "[extensions]" >> $HGRCPATH
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     2
  $ echo "churn=" >> $HGRCPATH
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     3
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     4
create test repository
6348
f8feaa665319 Make churn an official extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     5
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     6
  $ hg init repo
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     7
  $ cd repo
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     8
  $ echo a > a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
     9
  $ hg ci -Am adda -u user1 -d 6:00
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    10
  adding a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    11
  $ echo b >> a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    12
  $ echo b > b
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    13
  $ hg ci -m changeba -u user2 -d 9:00 a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    14
  $ hg ci -Am addb -u user2 -d 9:30
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    15
  adding b
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    16
  $ echo c >> a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    17
  $ echo c >> b
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    18
  $ echo c > c
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    19
  $ hg ci -m changeca -u user3 -d 12:00 a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    20
  $ hg ci -m changecb -u user3 -d 12:15 b
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    21
  $ hg ci -Am addc -u user3 -d 12:30
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    22
  adding c
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    23
  $ mkdir -p d/e
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    24
  $ echo abc > d/e/f1.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    25
  $ hg ci -Am "add d/e/f1.txt" -u user1 -d 12:45 d/e/f1.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    26
  $ mkdir -p d/g
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    27
  $ echo def > d/g/f2.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    28
  $ hg ci -Am "add d/g/f2.txt" -u user1 -d 13:00 d/g/f2.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    29
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    30
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    31
churn separate directories
6348
f8feaa665319 Make churn an official extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    32
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    33
  $ cd d
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    34
  $ hg churn e
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    35
  user1      1 ***************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    36
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    37
churn all
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    38
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    39
  $ hg churn
18369
2150e70c0ee1 churn: sort users with same churn by name
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
    40
  user1      3 ***************************************************************
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    41
  user3      3 ***************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    42
  user2      2 ******************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    43
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    44
churn excluding one dir
6348
f8feaa665319 Make churn an official extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    45
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    46
  $ hg churn -X e
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    47
  user3      3 ***************************************************************
18369
2150e70c0ee1 churn: sort users with same churn by name
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
    48
  user1      2 ******************************************
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    49
  user2      2 ******************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    50
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    51
churn up to rev 2
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    52
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    53
  $ hg churn -r :2
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    54
  user2      2 ***************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    55
  user1      1 ********************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    56
  $ cd ..
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    57
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    58
churn with aliases
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    59
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    60
  $ cat > ../aliases <<EOF
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    61
  > user1 alias1
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    62
  > user3 alias3
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    63
  > not-an-alias
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    64
  > EOF
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    65
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    66
churn with .hgchurn
12068
2e7647d25458 churn: do not crash on empty lines in alias file
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 11265
diff changeset
    67
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    68
  $ mv ../aliases .hgchurn
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    69
  $ hg churn
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    70
  skipping malformed alias: not-an-alias
18369
2150e70c0ee1 churn: sort users with same churn by name
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
    71
  alias1      3 **************************************************************
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    72
  alias3      3 **************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    73
  user2       2 *****************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    74
  $ rm .hgchurn
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    75
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    76
churn with column specifier
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    77
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    78
  $ COLUMNS=40 hg churn
18369
2150e70c0ee1 churn: sort users with same churn by name
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
    79
  user1      3 ***********************
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    80
  user3      3 ***********************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    81
  user2      2 ***************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    82
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    83
churn by hour
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    84
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    85
  $ hg churn -f '%H' -s
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    86
  06      1 *****************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    87
  09      2 *********************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    88
  12      4 ******************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    89
  13      1 *****************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    90
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    91
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    92
churn with separated added/removed lines
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    93
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    94
  $ hg rm d/g/f2.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    95
  $ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    96
  $ hg churn --diffstat
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    97
  user1           +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    98
  user3           +3/-0 +++++++++++++++++++++++++++++++++++++++++
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
    99
  user2           +2/-0 +++++++++++++++++++++++++++
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   100
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   101
churn --diffstat with color
6348
f8feaa665319 Make churn an official extension
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   102
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   103
  $ hg --config extensions.color= churn --config color.mode=ansi \
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   104
  >     --diffstat --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   105
  user1           +3/-1 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m\x1b[0;31m--------------\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   106
  user3           +3/-0 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   107
  user2           +2/-0 \x1b[0;32m+++++++++++++++++++++++++++\x1b[0m (esc)
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   108
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   109
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   110
changeset number churn
9669
9b127e888640 churn: ability to display added/removed lines separately
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9389
diff changeset
   111
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   112
  $ hg churn -c
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   113
  user1      4 ***************************************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   114
  user3      3 ***********************************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   115
  user2      2 ********************************
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   116
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   117
  $ echo 'with space = no-space' >> ../aliases
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   118
  $ echo a >> a
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   119
  $ hg commit -m a -u 'with space' -d 15:00
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   120
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   121
churn with space in alias
9670
7d56b6ffef72 churn: fix changeset count (broken by 9b127e888640)
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9669
diff changeset
   122
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   123
  $ hg churn --aliases ../aliases -r tip
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   124
  no-space      1 ************************************************************
11264
30c620e48d1c churn: support spaces in aliases (issue2222)
Alexander Solovyov <piranha@piranha.org.ua>
parents: 11141
diff changeset
   125
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   126
  $ cd ..
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   127
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   128
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12095
diff changeset
   129
Issue833: ZeroDivisionError
9388
f7968bba2307 churn: issue833 was reintroduced in 9bc46d069a76, correct it and add a test
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8254
diff changeset
   130
12095
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   131
  $ hg init issue-833
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   132
  $ cd issue-833
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   133
  $ touch foo
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   134
  $ hg ci -Am foo
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   135
  adding foo
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   136
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   137
this was failing with a ZeroDivisionError
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   138
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   139
  $ hg churn
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   140
  test      0 
80b0865b3fa5 tests: unify test-churn
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12069
diff changeset
   141
  $ cd ..
13123
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   142
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   143
Ignore trailing or leading spaces in emails
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   144
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   145
  $ cd repo
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   146
  $ touch bar
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   147
  $ hg ci -Am'bar' -u 'user4 <user4@x.com>'
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   148
  adding bar
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   149
  $ touch foo
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   150
  $ hg ci -Am'foo' -u 'user4 < user4@x.com >'
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   151
  adding foo
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   152
  $ hg log -l2 --template '[{author|email}]\n'
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   153
  [ user4@x.com ]
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   154
  [user4@x.com]
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   155
  $ hg churn -c
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   156
  user1            4 *********************************************************
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   157
  user3            3 *******************************************
18369
2150e70c0ee1 churn: sort users with same churn by name
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   158
  user2            2 *****************************
13123
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   159
  user4@x.com      2 *****************************
2506658c3927 churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12942
diff changeset
   160
  with space       1 **************
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13123
diff changeset
   161
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13123
diff changeset
   162
  $ cd ..