tests/test-annotate.t
author Augie Fackler <augie@google.com>
Tue, 20 Jan 2015 13:38:07 -0500
changeset 24018 26d6a6a78c1d
parent 23705 28a302e9225d
child 24421 77881cade20e
permissions -rw-r--r--
obsolete: use parsers.fm1readmarker if it exists for a ~38% perf win This moves perfloadmarkers on my linux workstation (63494 markers from mpm, crew, and myself) performance from ! wall 0.357657 comb 0.360000 user 0.350000 sys 0.010000 (best of 28) to ! wall 0.222345 comb 0.220000 user 0.210000 sys 0.010000 (best of 41) which is a pretty good improvement. On my BSD machine, which is ancient and slow, before: ! wall 3.584964 comb 3.578125 user 3.539062 sys 0.039062 (best of 3) after: ! wall 2.267974 comb 2.265625 user 2.195312 sys 0.070312 (best of 5) I feel like we could do better by moving the whole generator function into C, but I didn't want to tackle that right away.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     1
  $ HGMERGE=true; export HGMERGE
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     2
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     3
init
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     4
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
     5
  $ hg init repo
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
     6
  $ cd repo
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
     7
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     8
commit
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
     9
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    10
  $ echo 'a' > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    11
  $ hg ci -A -m test -u nobody -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    12
  adding a
4365
46280c004f22 change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3405
diff changeset
    13
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    14
annotate -c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    15
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    16
  $ hg annotate -c a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    17
  8435f90966e4: a
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    18
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    19
annotate -cl
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    20
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    21
  $ hg annotate -cl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    22
  8435f90966e4:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    23
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    24
annotate -d
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    25
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    26
  $ hg annotate -d a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    27
  Thu Jan 01 00:00:01 1970 +0000: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    28
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    29
annotate -n
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    30
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    31
  $ hg annotate -n a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    32
  0: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    33
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    34
annotate -nl
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    35
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    36
  $ hg annotate -nl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    37
  0:1: a
4857
2192001e4bb4 Add --line-number option to hg annotate (issue506)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4659
diff changeset
    38
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    39
annotate -u
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    40
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    41
  $ hg annotate -u a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    42
  nobody: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    43
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    44
annotate -cdnu
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    45
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    46
  $ hg annotate -cdnu a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    47
  nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    48
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    49
annotate -cdnul
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    50
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    51
  $ hg annotate -cdnul a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    52
  nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    53
22480
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    54
annotate (JSON)
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    55
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    56
  $ hg annotate -Tjson a
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    57
  [
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    58
   {
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    59
    "line": "a\n",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    60
    "rev": 0
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    61
   }
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    62
  ]
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    63
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    64
  $ hg annotate -Tjson -cdfnul a
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    65
  [
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    66
   {
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    67
    "date": [1.0, 0],
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    68
    "file": "a",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    69
    "line": "a\n",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    70
    "line_number": 1,
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    71
    "node": "8435f90966e442695d2ded29fdade2bac5ad8065",
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    72
    "rev": 0,
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    73
    "user": "nobody"
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    74
   }
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    75
  ]
dff638170c48 annotate: port to generic templater enabled by hidden -T option
Yuya Nishihara <yuya@tcha.org>
parents: 18993
diff changeset
    76
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    77
  $ cat <<EOF >>a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    78
  > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    79
  > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    80
  > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    81
  $ hg ci -ma1 -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    82
  $ hg cp a b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    83
  $ hg ci -mb -d '1 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    84
  $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    85
  > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    86
  > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    87
  > b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    88
  > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    89
  $ hg ci -mb2 -d '2 0'
2923
cd47230a4eb9 tests: new test for "hg annotate"
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    90
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    91
annotate -n b
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
    92
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    93
  $ hg annotate -n b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    94
  0: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    95
  1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    96
  1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    97
  3: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    98
  3: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
    99
  3: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   100
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   101
annotate --no-follow b
4857
2192001e4bb4 Add --line-number option to hg annotate (issue506)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4659
diff changeset
   102
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   103
  $ hg annotate --no-follow b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   104
  2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   105
  2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   106
  2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   107
  3: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   108
  3: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   109
  3: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   110
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   111
annotate -nl b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   112
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   113
  $ hg annotate -nl b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   114
  0:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   115
  1:2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   116
  1:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   117
  3:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   118
  3:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   119
  3:6: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   120
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   121
annotate -nf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   122
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   123
  $ hg annotate -nf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   124
  0 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   125
  1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   126
  1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   127
  3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   128
  3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   129
  3 b: b6
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   130
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   131
annotate -nlf b
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
   132
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   133
  $ hg annotate -nlf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   134
  0 a:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   135
  1 a:2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   136
  1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   137
  3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   138
  3 b:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   139
  3 b:6: b6
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
   140
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   141
  $ hg up -C 2
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   142
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   143
  $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   144
  > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   145
  > c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   146
  > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   147
  > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   148
  $ hg ci -mb2.1 -d '2 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   149
  created new head
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   150
  $ hg merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   151
  merging b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   152
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   153
  (branch merge, don't forget to commit)
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   154
  $ hg ci -mmergeb -d '3 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   155
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   156
annotate after merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   157
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   158
  $ hg annotate -nf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   159
  0 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   160
  1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   161
  1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   162
  3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   163
  4 b: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   164
  3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   165
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   166
annotate after merge with -l
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   167
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   168
  $ hg annotate -nlf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   169
  0 a:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   170
  1 a:2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   171
  1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   172
  3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   173
  4 b:5: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   174
  3 b:5: b5
3172
5c93dd0ae413 Refactor annotate copy support.
Brendan Cully <brendan@kublai.com>
parents: 2925
diff changeset
   175
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   176
  $ hg up -C 1
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   177
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   178
  $ hg cp a b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   179
  $ cat <<EOF > b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   180
  > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   181
  > z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   182
  > a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   183
  > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   184
  $ hg ci -mc -d '3 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   185
  created new head
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   186
  $ hg merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   187
  merging b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   188
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   189
  (branch merge, don't forget to commit)
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   190
  $ cat <<EOF >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   191
  > b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   192
  > c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   193
  > b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   194
  > EOF
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   195
  $ echo d >> b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   196
  $ hg ci -mmerge2 -d '4 0'
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   197
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   198
annotate after rename merge
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   199
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   200
  $ hg annotate -nf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   201
  0 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   202
  6 b: z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   203
  1 a: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   204
  3 b: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   205
  4 b: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   206
  3 b: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   207
  7 b: d
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   208
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   209
annotate after rename merge with -l
3405
2e1d8b238b6c Test annotate using named rev instead of linkrev
Brendan Cully <brendan@kublai.com>
parents: 3202
diff changeset
   210
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   211
  $ hg annotate -nlf b
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   212
  0 a:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   213
  6 b:2: z
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   214
  1 a:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   215
  3 b:4: b4
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   216
  4 b:5: c
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   217
  3 b:5: b5
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   218
  7 b:7: d
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   219
14358
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   220
Issue2807: alignment of line numbers with -l
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   221
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   222
  $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   223
  $ hg ci -mmore -d '5 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   224
  $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   225
  $ hg ci -mmore -d '6 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   226
  $ echo more >> b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   227
  $ hg ci -mmore -d '7 0'
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   228
  $ hg annotate -nlf b
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   229
   0 a: 1: a
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   230
   6 b: 2: z
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   231
   1 a: 3: a
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   232
   3 b: 4: b4
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   233
   4 b: 5: c
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   234
   3 b: 5: b5
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   235
   7 b: 7: d
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   236
   8 b: 8: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   237
   9 b: 9: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   238
  10 b:10: more
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   239
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   240
linkrev vs rev
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   241
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   242
  $ hg annotate -r tip -n a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   243
  0: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   244
  1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   245
  1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   246
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   247
linkrev vs rev with -l
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
   248
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   249
  $ hg annotate -r tip -nl a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   250
  0:1: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   251
  1:2: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   252
  1:3: a
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   253
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 11852
diff changeset
   254
Issue589: "undelete" sequence leads to crash
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   255
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   256
annotate was crashing when trying to --follow something
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   257
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   258
like A -> B -> A
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   259
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   260
generate ABA rename configuration
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
   261
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   262
  $ echo foo > foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   263
  $ hg add foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   264
  $ hg ci -m addfoo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   265
  $ hg rename foo bar
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   266
  $ hg ci -m renamefoo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   267
  $ hg rename bar foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   268
  $ hg ci -m renamebar
4639
c7371aa0c153 test-annotate: add a test for issue 589.
Patrick Mezard <pmezard@gmail.com>
parents: 3405
diff changeset
   269
11852
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   270
annotate after ABA with follow
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   271
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   272
  $ hg annotate --follow foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   273
  foo: foo
b2f91119bf8c tests: unify test-annotate
Martin Geisler <mg@lazybytes.net>
parents: 10369
diff changeset
   274
13697
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
   275
missing file
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
   276
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
   277
  $ hg ann nosuchfile
14358
bf93e78f2638 annotate: fix alignment of columns in front of line numbers (issue2807)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13697
diff changeset
   278
  abort: nosuchfile: no such file in rev e9e6b4fa872f
13697
eaee75036725 annotate: catch nonexistent files using match.bad callback (issue1590)
Matt Mackall <mpm@selenic.com>
parents: 12399
diff changeset
   279
  [255]
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   280
15829
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   281
annotate file without '\n' on last line
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   282
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   283
  $ printf "" > c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   284
  $ hg ci -A -m test -u nobody -d '1 0'
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   285
  adding c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   286
  $ hg annotate c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   287
  $ printf "a\nb" > c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   288
  $ hg ci -m test
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   289
  $ hg annotate c
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   290
  [0-9]+: a (re)
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   291
  [0-9]+: b (re)
2c480532f36e annotate: append newline after non newline-terminated file listings
Ion Savin <ion.savin@tora.com>
parents: 15528
diff changeset
   292
18993
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   293
Issue3841: check annotation of the file of which filelog includes
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   294
merging between the revision and its ancestor
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   295
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   296
to reproduce the situation with recent Mercurial, this script uses (1)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   297
"hg debugsetparents" to merge without ancestor check by "hg merge",
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   298
and (2) the extension to allow filelog merging between the revision
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   299
and its ancestor by overriding "repo._filecommit".
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   300
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   301
  $ cat > ../legacyrepo.py <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   302
  > from mercurial import node, util
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   303
  > def reposetup(ui, repo):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   304
  >     class legacyrepo(repo.__class__):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   305
  >         def _filecommit(self, fctx, manifest1, manifest2,
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   306
  >                         linkrev, tr, changelist):
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   307
  >             fname = fctx.path()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   308
  >             text = fctx.data()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   309
  >             flog = self.file(fname)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   310
  >             fparent1 = manifest1.get(fname, node.nullid)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   311
  >             fparent2 = manifest2.get(fname, node.nullid)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   312
  >             meta = {}
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   313
  >             copy = fctx.renamed()
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   314
  >             if copy and copy[0] != fname:
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   315
  >                 raise util.Abort('copying is not supported')
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   316
  >             if fparent2 != node.nullid:
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   317
  >                 changelist.append(fname)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   318
  >                 return flog.add(text, meta, tr, linkrev,
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   319
  >                                 fparent1, fparent2)
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   320
  >             raise util.Abort('only merging is supported')
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   321
  >     repo.__class__ = legacyrepo
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   322
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   323
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   324
  $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   325
  > 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   326
  > 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   327
  > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   328
  > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   329
  > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   330
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   331
  $ hg add baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   332
  $ hg commit -m "baz:0"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   333
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   334
  $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   335
  > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   336
  > 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   337
  > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   338
  > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   339
  > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   340
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   341
  $ hg commit -m "baz:1"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   342
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   343
  $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   344
  > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   345
  > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   346
  > 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   347
  > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   348
  > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   349
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   350
  $ hg debugsetparents 17 17
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   351
  $ hg --config extensions.legacyrepo=../legacyrepo.py  commit -m "baz:2"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   352
  $ hg debugindexdot .hg/store/data/baz.i
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   353
  digraph G {
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   354
  	-1 -> 0
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   355
  	0 -> 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   356
  	1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   357
  	1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   358
  }
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   359
  $ hg annotate baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   360
  17: 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   361
  18: 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   362
  16: 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   363
  16: 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   364
  16: 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   365
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   366
  $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   367
  > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   368
  > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   369
  > 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   370
  > 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   371
  > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   372
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   373
  $ hg commit -m "baz:3"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   374
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   375
  $ cat > baz <<EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   376
  > 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   377
  > 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   378
  > 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   379
  > 4 baz:4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   380
  > 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   381
  > EOF
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   382
  $ hg debugsetparents 19 18
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   383
  $ hg --config extensions.legacyrepo=../legacyrepo.py  commit -m "baz:4"
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   384
  $ hg debugindexdot .hg/store/data/baz.i
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   385
  digraph G {
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   386
  	-1 -> 0
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   387
  	0 -> 1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   388
  	1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   389
  	1 -> 2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   390
  	2 -> 3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   391
  	3 -> 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   392
  	2 -> 4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   393
  }
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   394
  $ hg annotate baz
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   395
  17: 1 baz:1
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   396
  18: 2 baz:2
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   397
  19: 3 baz:3
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   398
  20: 4 baz:4
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   399
  16: 5
0fd0612dc855 annotate: increase refcount of each revisions correctly (issue3841)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17347
diff changeset
   400
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   401
Test annotate with whitespace options
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   402
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   403
  $ cd ..
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   404
  $ hg init repo-ws
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   405
  $ cd repo-ws
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   406
  $ cat > a <<EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   407
  > aa
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   408
  > 
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   409
  > b b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   410
  > EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   411
  $ hg ci -Am "adda"
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   412
  adding a
17347
2da47de36b6f check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   413
  $ sed 's/EOL$//g' > a <<EOF
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   414
  > a  a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   415
  > 
17347
2da47de36b6f check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   416
  >  EOL
15528
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   417
  > b  b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   418
  > EOF
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   419
  $ hg ci -m "changea"
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   420
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   421
Annotate with no option
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   422
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   423
  $ hg annotate a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   424
  1: a  a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   425
  0: 
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   426
  1:  
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   427
  1: b  b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   428
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   429
Annotate with --ignore-space-change
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   430
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   431
  $ hg annotate --ignore-space-change a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   432
  1: a  a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   433
  1: 
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   434
  0:  
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   435
  0: b  b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   436
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   437
Annotate with --ignore-all-space
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   438
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   439
  $ hg annotate --ignore-all-space a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   440
  0: a  a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   441
  0: 
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   442
  1:  
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   443
  0: b  b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   444
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   445
Annotate with --ignore-blank-lines (similar to no options case)
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   446
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   447
  $ hg annotate --ignore-blank-lines a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   448
  1: a  a
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   449
  0: 
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   450
  1:  
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   451
  1: b  b
a84698badf0b annotate: support diff whitespace filtering flags (issue3030)
Patrick Mezard <pmezard@gmail.com>
parents: 14358
diff changeset
   452
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15829
diff changeset
   453
  $ cd ..
23702
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   454
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   455
Annotate with linkrev pointing to another branch
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   456
------------------------------------------------
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   457
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   458
create history with a filerev whose linkrev points to another branch
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   459
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   460
  $ hg init branchedlinkrev
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   461
  $ cd branchedlinkrev
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   462
  $ echo A > a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   463
  $ hg commit -Am 'contentA'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   464
  adding a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   465
  $ echo B >> a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   466
  $ hg commit -m 'contentB'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   467
  $ hg up --rev 'desc(contentA)'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   468
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   469
  $ echo unrelated > unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   470
  $ hg commit -Am 'unrelated'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   471
  adding unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   472
  created new head
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   473
  $ hg graft -r 'desc(contentB)'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   474
  grafting 1:fd27c222e3e6 "contentB"
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   475
  $ echo C >> a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   476
  $ hg commit -m 'contentC'
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   477
  $ hg log -G
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   478
  @  changeset:   4:072f1e8df249
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   479
  |  tag:         tip
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   480
  |  user:        test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   481
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   482
  |  summary:     contentC
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   483
  |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   484
  o  changeset:   3:ff38df03cc4b
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   485
  |  user:        test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   486
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   487
  |  summary:     contentB
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   488
  |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   489
  o  changeset:   2:62aaf3f6fc06
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   490
  |  parent:      0:f0932f74827e
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   491
  |  user:        test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   492
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   493
  |  summary:     unrelated
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   494
  |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   495
  | o  changeset:   1:fd27c222e3e6
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   496
  |/   user:        test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   497
  |    date:        Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   498
  |    summary:     contentB
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   499
  |
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   500
  o  changeset:   0:f0932f74827e
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   501
     user:        test
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   502
     date:        Thu Jan 01 00:00:00 1970 +0000
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   503
     summary:     contentA
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   504
  
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   505
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   506
Annotate should list ancestor of starting revision only
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   507
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   508
  $ hg annotate a
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   509
  0: A
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   510
  3: B
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   511
  4: C
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   512
23705
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   513
Even when the starting revision is the linkrev-shadowed one:
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   514
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   515
  $ hg annotate a -r 3
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   516
  0: A
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   517
  3: B
28a302e9225d linkrev: also adjust linkrev when bootstrapping annotate (issue4305)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23702
diff changeset
   518
23702
c48924787eaa filectx.parents: enforce changeid of parent to be in own changectx ancestors
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22480
diff changeset
   519
  $ cd ..