tests/test-mq-qdiff.t
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 13 Oct 2016 12:50:27 +0200
changeset 30155 b7a966ce89ed
parent 23172 e955549cd045
permissions -rw-r--r--
changelog: disable delta chains This patch disables delta chains on changelogs. After this patch, new entries on changelogs - including existing changelogs - will be stored as the fulltext of that data (likely compressed). No delta computation will be performed. An overview of delta chains and data justifying this change follows. Revlogs try to store entries as a delta against a previous entry (either a parent revision in the case of generaldelta or the previous physical revision when not using generaldelta). Most of the time this is the correct thing to do: it frequently results in less CPU usage and smaller storage. Delta chains are most effective when the base revision being deltad against is similar to the current data. This tends to occur naturally for manifests and file data, since only small parts of each tend to change with each revision. Changelogs, however, are a different story. Changelog entries represent changesets/commits. And unless commits in a repository are homogonous (same author, changing same files, similar commit messages, etc), a delta from one entry to the next tends to be relatively large compared to the size of the entry. This means that delta chains tend to be short. How short? Here is the full vs delta revision breakdown on some real world repos: Repo % Full % Delta Max Length hg 45.8 54.2 6 mozilla-central 42.4 57.6 8 mozilla-unified 42.5 57.5 17 pypy 46.1 53.9 6 python-zstandard 46.1 53.9 3 (I threw in python-zstandard as an example of a repo that is homogonous. It contains a small Python project with changes all from the same author.) Contrast this with the manifest revlog for these repos, where 99+% of revisions are deltas and delta chains run into the thousands. So delta chains aren't as useful on changelogs. But even a short delta chain may provide benefits. Let's measure that. Delta chains may require less CPU to read revisions if the CPU time spent reading smaller deltas is less than the CPU time used to decompress larger individual entries. We can measure this via `hg perfrevlog -c -d 1` to iterate a revlog to resolve each revision's fulltext. Here are the results of that command on a repo using delta chains in its changelog and on a repo without delta chains: hg (forward) ! wall 0.407008 comb 0.410000 user 0.410000 sys 0.000000 (best of 25) ! wall 0.390061 comb 0.390000 user 0.390000 sys 0.000000 (best of 26) hg (reverse) ! wall 0.515221 comb 0.520000 user 0.520000 sys 0.000000 (best of 19) ! wall 0.400018 comb 0.400000 user 0.390000 sys 0.010000 (best of 25) mozilla-central (forward) ! wall 4.508296 comb 4.490000 user 4.490000 sys 0.000000 (best of 3) ! wall 4.370222 comb 4.370000 user 4.350000 sys 0.020000 (best of 3) mozilla-central (reverse) ! wall 5.758995 comb 5.760000 user 5.720000 sys 0.040000 (best of 3) ! wall 4.346503 comb 4.340000 user 4.320000 sys 0.020000 (best of 3) mozilla-unified (forward) ! wall 4.957088 comb 4.950000 user 4.940000 sys 0.010000 (best of 3) ! wall 4.660528 comb 4.650000 user 4.630000 sys 0.020000 (best of 3) mozilla-unified (reverse) ! wall 6.119827 comb 6.110000 user 6.090000 sys 0.020000 (best of 3) ! wall 4.675136 comb 4.670000 user 4.670000 sys 0.000000 (best of 3) pypy (forward) ! wall 1.231122 comb 1.240000 user 1.230000 sys 0.010000 (best of 8) ! wall 1.164896 comb 1.160000 user 1.160000 sys 0.000000 (best of 9) pypy (reverse) ! wall 1.467049 comb 1.460000 user 1.460000 sys 0.000000 (best of 7) ! wall 1.160200 comb 1.170000 user 1.160000 sys 0.010000 (best of 9) The data clearly shows that it takes less wall and CPU time to resolve revisions when there are no delta chains in the changelogs, regardless of the direction of traversal. Furthermore, not using a delta chain means that fulltext resolution in reverse is as fast as iterating forward. So not using delta chains on the changelog is a clear CPU win for reading operations. An example of a user-visible operation showing this speed-up is revset evaluation. Here are results for `hg perfrevset 'author(gps) or author(mpm)'`: hg ! wall 1.655506 comb 1.660000 user 1.650000 sys 0.010000 (best of 6) ! wall 1.612723 comb 1.610000 user 1.600000 sys 0.010000 (best of 7) mozilla-central ! wall 17.629826 comb 17.640000 user 17.600000 sys 0.040000 (best of 3) ! wall 17.311033 comb 17.300000 user 17.260000 sys 0.040000 (best of 3) What about 00changelog.i size? Repo Delta Chains No Delta Chains hg 7,033,250 6,976,771 mozilla-central 82,978,748 81,574,623 mozilla-unified 88,112,349 86,702,162 pypy 20,740,699 20,659,741 The data shows that removing delta chains from the changelog makes the changelog smaller. Delta chains are also used during changegroup generation. This operation essentially converts a series of revisions to one large delta chain. And changegroup generation is smart: if the delta in the revlog matches what the changegroup is emitting, it will reuse the delta instead of recalculating it. We can measure the impact removing changelog delta chains has on changegroup generation via `hg perfchangegroupchangelog`: hg ! wall 1.589245 comb 1.590000 user 1.590000 sys 0.000000 (best of 7) ! wall 1.788060 comb 1.790000 user 1.790000 sys 0.000000 (best of 6) mozilla-central ! wall 17.382585 comb 17.380000 user 17.340000 sys 0.040000 (best of 3) ! wall 20.161357 comb 20.160000 user 20.120000 sys 0.040000 (best of 3) mozilla-unified ! wall 18.722839 comb 18.720000 user 18.680000 sys 0.040000 (best of 3) ! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3) pypy ! wall 4.828317 comb 4.830000 user 4.820000 sys 0.010000 (best of 3) ! wall 5.415455 comb 5.420000 user 5.410000 sys 0.010000 (best of 3) The data shows eliminating delta chains makes the changelog part of changegroup generation slower. This is expected since we now have to compute deltas for revisions where we could recycle the delta before. It is worth putting this regression into context of overall changegroup times. Here is the rough total CPU time spent in changegroup generation for various repos while using delta chains on the changelog: Repo CPU Time (s) CPU Time w/ compression hg 4.50 7.05 mozilla-central 111.1 222.0 pypy 28.68 75.5 Before compression, removing delta chains from the changegroup adds ~4.4% overhead to hg changegroup generation, 1.3% to mozilla-central, and 2.0% to pypy. When you factor in zlib compression, these percentages are roughly divided by 2. While the increased CPU usage for changegroup generation is unfortunate, I think it is acceptable because the percentage is small, server operators (those likely impacted most by this) have other mechanisms to mitigate CPU consumption (namely reducing zlib compression level and pre-generated clone bundles), and because there is room to optimize this in the future. For example, we could use the nullid as the base revision, effectively encoding the full revision for each entry in the changegroup. When doing this, `hg perfchangegroupchangelog` nearly halves: mozilla-unified ! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3) ! wall 11.196461 comb 11.200000 user 11.190000 sys 0.010000 (best of 3) This looks very promising as a future optimization opportunity. It's worth that the changes in test-acl.t to the changegroup part size. This is because revision 6 in the changegroup had a delta chain of length 2 before and after this patch the base revision is nullrev. When the base revision is nullrev, cg2packer.deltaparent() hardcodes the *previous* revision from the changegroup as the delta parent. This caused the delta in the changegroup to switch base revisions, the delta to change, and the size to change accordingly. While the size increased in this case, I think sizes will remain the same on average, as the delta base for changelog revisions doesn't matter too much (as this patch shows). So, I don't consider this a regression.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     1
  $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     2
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     3
  > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     4
  > [mq]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     5
  > git = keep
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
     6
  > EOF
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
     7
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
     8
  $ hg init a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
     9
  $ cd a
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    10
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    11
  $ echo 'base' > base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    12
  $ hg ci -Ambase
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    13
  adding base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    14
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    15
  $ hg qnew -mmqbase mqbase
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    16
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    17
  $ echo 'patched' > base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    18
  $ hg qrefresh
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    19
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    20
qdiff:
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    21
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12324
diff changeset
    22
  $ hg qdiff
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    23
  diff -r d20a80d4def3 base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    24
  --- a/base	Thu Jan 01 00:00:00 1970 +0000
12377
a5b77eb0409b tests: various fixes for new unified test pattern format
Matt Mackall <mpm@selenic.com>
parents: 12366
diff changeset
    25
  +++ b/base* (glob)
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    26
  @@ -1,1 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    27
  -base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    28
  +patched
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    29
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    30
qdiff dirname:
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    31
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    32
  $ hg qdiff --nodates .
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    33
  diff -r d20a80d4def3 base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    34
  --- a/base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    35
  +++ b/base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    36
  @@ -1,1 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    37
  -base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    38
  +patched
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    39
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    40
qdiff filename:
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    41
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    42
  $ hg qdiff --nodates base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    43
  diff -r d20a80d4def3 base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    44
  --- a/base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    45
  +++ b/base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    46
  @@ -1,1 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    47
  -base
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    48
  +patched
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    49
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    50
  $ hg revert -a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    51
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    52
  $ hg qpop
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    53
  popping mqbase
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    54
  patch queue now empty
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    55
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    56
  $ hg qdelete mqbase
2916
8ca608c1eb02 tests: new test for mq qdiff command
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
diff changeset
    57
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    58
  $ printf '1\n2\n3\n4\nhello world\ngoodbye world\n7\n8\n9\n' > lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    59
  $ hg ci -Amlines -d '2 0'
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    60
  adding lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    61
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    62
  $ hg qnew -mmqbase2 mqbase2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    63
  $ printf '\n\n1\n2\n3\n4\nhello  world\n     goodbye world\n7\n8\n9\n' > lines
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
    64
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    65
  $ hg qdiff --nodates -U 1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    66
  diff -r b0c220e1cf43 lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    67
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    68
  +++ b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    69
  @@ -1,1 +1,3 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    70
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    71
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    72
   1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    73
  @@ -4,4 +6,4 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    74
   4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    75
  -hello world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    76
  -goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    77
  +hello  world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    78
  +     goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    79
   7
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
    80
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    81
  $ hg qdiff --nodates -b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    82
  diff -r b0c220e1cf43 lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    83
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    84
  +++ b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    85
  @@ -1,9 +1,11 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    86
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    87
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    88
   1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    89
   2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    90
   3
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    91
   4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    92
   hello world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    93
  -goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    94
  +     goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    95
   7
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    96
   8
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    97
   9
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
    98
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
    99
  $ hg qdiff --nodates -U 1 -B
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   100
  diff -r b0c220e1cf43 lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   101
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   102
  +++ b/lines
16089
2e8f4b82c551 mdiff: adjust hunk offsets with --ignore-blank-lines (issue3234)
Patrick Mezard <patrick@mezard.eu>
parents: 13929
diff changeset
   103
  @@ -4,4 +4,4 @@
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   104
   4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   105
  -hello world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   106
  -goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   107
  +hello  world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   108
  +     goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   109
   7
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
   110
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   111
  $ hg qdiff --nodates -w
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   112
  diff -r b0c220e1cf43 lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   113
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   114
  +++ b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   115
  @@ -1,3 +1,5 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   116
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   117
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   118
   1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   119
   2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   120
   3
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
   121
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   122
  $ hg qdiff --nodates --reverse
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   123
  diff -r b0c220e1cf43 lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   124
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   125
  +++ b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   126
  @@ -1,11 +1,9 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   127
  -
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   128
  -
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   129
   1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   130
   2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   131
   3
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   132
   4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   133
  -hello  world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   134
  -     goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   135
  +hello world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   136
  +goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   137
   7
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   138
   8
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   139
   9
6668
034f444902d9 mq: qdiff: support all diffopts
Jason Orendorff <jorendorff@mozilla.com>
parents: 2990
diff changeset
   140
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   141
qdiff preserve existing git flag:
9725
3f522d2fa633 diff: add --inverse option
Yannick Gingras <ygingras@ygingras.net>
parents: 6668
diff changeset
   142
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   143
  $ hg qrefresh --git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   144
  $ echo a >> lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   145
  $ hg qdiff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   146
  diff --git a/lines b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   147
  --- a/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   148
  +++ b/lines
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   149
  @@ -1,9 +1,12 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   150
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   151
  +
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   152
   1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   153
   2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   154
   3
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   155
   4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   156
  -hello world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   157
  -goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   158
  +hello  world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   159
  +     goodbye world
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   160
   7
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   161
   8
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   162
   9
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   163
  +a
10191
99d285ac5da4 mq: qdiff with the same diff options than qrefresh (issue1350)
Patrick Mezard <pmezard@gmail.com>
parents: 9857
diff changeset
   164
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   165
  $ hg qdiff --stat
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   166
   lines |  7 +++++--
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11049
diff changeset
   167
   1 files changed, 5 insertions(+), 2 deletions(-)
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   168
  $ hg qrefresh
10191
99d285ac5da4 mq: qdiff with the same diff options than qrefresh (issue1350)
Patrick Mezard <pmezard@gmail.com>
parents: 9857
diff changeset
   169
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   170
qdiff when file deleted (but not removed) in working dir:
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   171
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   172
  $ hg qnew deleted-file
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   173
  $ echo a > newfile
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   174
  $ hg add newfile
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   175
  $ hg qrefresh
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   176
  $ rm newfile
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents: 12377
diff changeset
   177
  $ hg qdiff
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16089
diff changeset
   178
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16089
diff changeset
   179
  $ cd ..