tests/test-diff-upgrade.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 24 Sep 2018 09:41:42 -0700
changeset 39861 db5501d93bcf
parent 39707 5abc47d4ca6b
child 46548 0492002560f3
permissions -rw-r--r--
changegroup: remove reordering control (BC) This logic - including the experimental bundle.reorder option - was originally added in a8e3931e3fb5 in 2011 and then later ported to changegroup.py. The intent of this option and associated logic is to control the ordering of revisions in deltagroups in changegroups. At the time it was implemented, only changegroup version 1 existed and generaldelta revlogs were just coming into the world. Changegroup version 1 requires that deltas be made against the last revision sent over the wire. Used with generaldelta, this created an impedance mismatch of sorts and resulted in changegroup producers spending a lot of time recomputing deltas. Revision reordering was introduced so outgoing revisions would be sent in "generaldelta order" and producers would be able to reuse internal deltas from storage. Later on, we introduced changegroup version 2. It supported denoting which revision a delta was against. So we no longer needed to sort outgoing revisions to ensure optimal delta generation from the producer. So, subsequent changegroup versions disabled reordering. We also later made the changelog not store deltas by default. And we also made the changelog send out deltas in storage order. Why we do this for changelog, I'm not sure. Maybe we want to preserve revision order across clones? It doesn't really matter for this commit. Fast forward to 2018. We want to abstract storage backends. And having changegroup code require knowledge about how deltas are stored internally interferes with that goal. This commit removes reordering control from changegroup generation. After this commit, the reordering behavior is: * The changelog is always sent out in storage order (no behavior change). * Non-changelog generaldelta revlogs are reordered to always be in DAG topological order (previously, generaldelta revlogs would be emitted in storage order for version 2 and 3 changegroups). * Non-changelog non-generaldelta revlogs are sent in storage order (no behavior change). * There exists no config option to override behavior. The big difference here is that generaldelta revlogs now *always* have their revisions sorted in DAG order before going out over the wire. This behavior was previously only done for changegroup version 1. Version 2 and version 3 changegroups disabled reordering because the interchange format supported encoding arbitrary delta parents, so reordering wasn't strictly necessary. I can think of a few significant implications for this change. Because changegroup receivers will now see non-changelog revisions in DAG order instead of storage order, the internal storage order of manifests and files may differ substantially between producer and consumer. I don't think this matters that much, since the storage order of manifests and files is largely hidden from users. Only the storage order of changelog matters (because `hg log` shows the changelog in storage order). I don't think there should be any controversy here. The reordering of revisions has implications for changegroup producers. Previously, generaldelta revlogs would be emitted in storage order. And in the common case, the internally-stored delta could effectively be copied from disk into the deltagroup delta. This meant that emitting delta groups for generaldelta revlogs would be mostly linear read I/O. This is desirable for performance. With us now reordering generaldelta revlog revisions in DAG order, the read operations may use more random I/O instead of sequential I/O. This could result in performance loss. But with the prevalence of SSDs and fast random I/O, I'm not too worried. (Note: the optimal emission order for revlogs is actually delta encoding order. But the changegroup code wasn't doing that before or after this change. We could potentially implement that in a later commit.) Changegroups in DAG order will have implications for receivers. Previously, receiving storage order might mean seeing a number of interleaved branches. This would mean long delta chains, sparse I/O, and possibly more fulltext revisions instead of deltas, blowing up storage storage. (This is the same set of problems that sparse revlogs aims to address.) With the producer now sending revisions in DAG order, the receiver also stores revisions in DAG order. That means revisions for the same DAG branch are all grouped together. And this should yield better storage outcomes. In other words, sending the reordered changegroup allows the receiver to have better storage order and for the producer to not propagate its (possibly sub-optimal) internal storage order. On the mozilla-unified repository, this change influences bundle generation: $ hg bundle -t none-v2 -a before: time: real 355.680 secs (user 256.790+0.000 sys 16.820+0.000) after: time: real 382.950 secs (user 281.700+0.000 sys 17.690+0.000) before: 7,150,228,967 bytes (uncompressed) after: 7,041,556,273 bytes (uncompressed) before: 1,669,063,234 bytes (zstd l=3) after: 1,628,598,830 bytes (zstd l=3) $ hg unbundle before: time: real 511.910 secs (user 466.750+0.000 sys 32.680+0.000) after: time: real 487.790 secs (user 443.940+0.000 sys 30.840+0.000) 00manifest.d size: source: 274,924,292 bytes before: 304,741,626 bytes after: 245,252,087 bytes .hg/store total file size: source: 2,649,133,490 before: 2,680,888,130 after: 2,627,875,673 We see the bundle size drop. That's probably because if a revlog internally isn't storing a delta, it will choose to delta against the last emitted revision. And on repos with interleaved branches (like mozilla-unified), the previous revision could be an unrelated branch and therefore be a large delta. But with this patch, the previous revision is likely p1 or p2 and a delta should be small. We also see the manifest size drop by ~50 MB. It's worth noting that the manifest actually *increased* in size by ~25 MB in the old strategy and decreased ~25 MB from its source in the new strategy. Again, my explanation for this is that the DAG ordering in the changegroup is resulting in better grouping of revisions in the receiver, which results in more compact delta chains and higher storage efficiency. Unbundle time also dropped. I suspect this is due to the revlog having to work less to compute deltas since the incoming deltas are more optimal. i.e. the receiver spends less time resolving fulltext revisions as incoming deltas bounce around between DAG branches and delta chains. We also see bundle generation time increase. This is not desirable. However, the regression is only significant on the original repository: if we generate a bundle from the repository created from the new, always reordered bundles, we're close to baseline (if not at it with expected noise): $ hg bundle -t none-v2 -a before (original): time: real 355.680 secs (user 256.790+0.000 sys 16.820+0.000) after (original): time: real 382.950 secs (user 281.700+0.000 sys 17.690+0.000) after (new repo): time: real 362.280 secs (user 260.300+0.000 sys 17.700+0.000) This regression is a bit worrying because it will impact serving canonical repositories (that don't have optimal internal storage unless they are reordered - possibly as part of running `hg debugupgraderepo`). However, this regression will only be noticed by very large changegroups. And I'm guessing/hoping that any repository that large is using clonebundles to mitigate server load. Again, sending DAG order isn't the optimal send order for servers: sending in storage-delta order is. But in order to enable storage-optimal send order, we'll need a storage API that handles sorting. Future commits will introduce such an API. Differential Revision: https://phab.mercurial-scm.org/D4721
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 19875
diff changeset
     1
#require execbit
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
     2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     3
  $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     4
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     5
  > autodiff = $TESTDIR/autodiff.py
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     6
  > [diff]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     7
  > nodates = 1
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22947
diff changeset
     8
  > EOF
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
     9
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    10
  $ hg init repo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    11
  $ cd repo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    12
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    13
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    14
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    15
make a combination of new, changed and deleted file
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    16
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    17
  $ echo regular > regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    18
  $ echo rmregular > rmregular
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35579
diff changeset
    19
  $ "$PYTHON" -c "open('bintoregular', 'wb').write(b'\0')"
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    20
  $ touch rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    21
  $ echo exec > exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    22
  $ chmod +x exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    23
  $ echo rmexec > rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    24
  $ chmod +x rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    25
  $ echo setexec > setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    26
  $ echo unsetexec > unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    27
  $ chmod +x unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    28
  $ echo binary > binary
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35579
diff changeset
    29
  $ "$PYTHON" -c "open('rmbinary', 'wb').write(b'\0')"
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    30
  $ hg ci -Am addfiles
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    31
  adding binary
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    32
  adding bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    33
  adding exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    34
  adding regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    35
  adding rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    36
  adding rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    37
  adding rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    38
  adding rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    39
  adding setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    40
  adding unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    41
  $ echo regular >> regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    42
  $ echo newregular >> newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    43
  $ rm rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    44
  $ touch newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    45
  $ rm rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    46
  $ echo exec >> exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    47
  $ echo newexec > newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    48
  $ echo bintoregular > bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    49
  $ chmod +x newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    50
  $ rm rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    51
  $ chmod +x setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    52
  $ chmod -x unsetexec
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35579
diff changeset
    53
  $ "$PYTHON" -c "open('binary', 'wb').write(b'\0\0')"
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35579
diff changeset
    54
  $ "$PYTHON" -c "open('newbinary', 'wb').write(b'\0')"
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    55
  $ rm rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    56
  $ hg addremove -s 0
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    57
  adding newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    58
  adding newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    59
  adding newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    60
  adding newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    61
  removing rmbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    62
  removing rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    63
  removing rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    64
  removing rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    65
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    66
git=no: regular diff for all files
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    67
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    68
  $ hg autodiff --git=no
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    69
  diff -r a66d19b9302d binary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    70
  Binary file binary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    71
  diff -r a66d19b9302d bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    72
  Binary file bintoregular has changed
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    73
  diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    74
  --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    75
  +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    76
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    77
   exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    78
  +exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    79
  diff -r a66d19b9302d newbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    80
  Binary file newbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    81
  diff -r a66d19b9302d newexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    82
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    83
  +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    84
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    85
  +newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    86
  diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    87
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    88
  +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    89
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    90
  +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    91
  diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    92
  --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    93
  +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    94
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    95
   regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    96
  +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    97
  diff -r a66d19b9302d rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
    98
  Binary file rmbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
    99
  diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   100
  --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   101
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   102
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   103
  -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   104
  diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   105
  --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   106
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   107
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   108
  -rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   109
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   110
git=yes: git diff for single regular file
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   111
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   112
  $ hg autodiff --git=yes regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   113
  diff --git a/regular b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   114
  --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   115
  +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   116
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   117
   regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   118
  +regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   119
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   120
git=auto: regular diff for regular files and non-binary removals
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   121
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   122
  $ hg autodiff --git=auto regular newregular rmregular rmexec
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   123
  diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   124
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   125
  +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   126
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   127
  +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   128
  diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   129
  --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   130
  +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   131
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   132
   regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   133
  +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   134
  diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   135
  --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   136
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   137
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   138
  -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   139
  diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   140
  --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   141
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   142
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   143
  -rmregular
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   144
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   145
  $ for f in exec newexec setexec unsetexec binary newbinary newempty rmempty rmbinary bintoregular; do
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   146
  >     echo
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   147
  >     echo '% git=auto: git diff for' $f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   148
  >     hg autodiff --git=auto $f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   149
  > done
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   150
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   151
  % git=auto: git diff for exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   152
  diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   153
  --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   154
  +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   155
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   156
   exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   157
  +exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   158
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   159
  % git=auto: git diff for newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   160
  diff --git a/newexec b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   161
  new file mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   162
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   163
  +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   164
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   165
  +newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   166
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   167
  % git=auto: git diff for setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   168
  diff --git a/setexec b/setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   169
  old mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   170
  new mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   171
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   172
  % git=auto: git diff for unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   173
  diff --git a/unsetexec b/unsetexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   174
  old mode 100755
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   175
  new mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   176
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   177
  % git=auto: git diff for binary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   178
  diff --git a/binary b/binary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   179
  index a9128c283485202893f5af379dd9beccb6e79486..09f370e38f498a462e1ca0faa724559b6630c04f
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   180
  GIT binary patch
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   181
  literal 2
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   182
  Jc${Nk0000200961
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   183
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   184
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   185
  % git=auto: git diff for newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   186
  diff --git a/newbinary b/newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   187
  new file mode 100644
19875
c172660eee01 patch: Fix nullid for binary git diffs (issue4054)
Johan Bjork <jbjoerk@gmail.com>
parents: 18824
diff changeset
   188
  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f76dd238ade08917e6712764a16a22005a50573d
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   189
  GIT binary patch
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   190
  literal 1
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   191
  Ic${MZ000310RR91
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   192
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   193
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   194
  % git=auto: git diff for newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   195
  diff --git a/newempty b/newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   196
  new file mode 100644
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   197
  
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   198
  % git=auto: git diff for rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   199
  diff --git a/rmempty b/rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   200
  deleted file mode 100644
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   201
  
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   202
  % git=auto: git diff for rmbinary
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   203
  diff --git a/rmbinary b/rmbinary
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   204
  deleted file mode 100644
19875
c172660eee01 patch: Fix nullid for binary git diffs (issue4054)
Johan Bjork <jbjoerk@gmail.com>
parents: 18824
diff changeset
   205
  index f76dd238ade08917e6712764a16a22005a50573d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
18824
f0d55e1b4855 diff: fix binary file removals in git mode.
Johan Bjork <jbjoerk@gmail.com>
parents: 15442
diff changeset
   206
  GIT binary patch
f0d55e1b4855 diff: fix binary file removals in git mode.
Johan Bjork <jbjoerk@gmail.com>
parents: 15442
diff changeset
   207
  literal 0
f0d55e1b4855 diff: fix binary file removals in git mode.
Johan Bjork <jbjoerk@gmail.com>
parents: 15442
diff changeset
   208
  Hc$@<O00001
f0d55e1b4855 diff: fix binary file removals in git mode.
Johan Bjork <jbjoerk@gmail.com>
parents: 15442
diff changeset
   209
  
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   210
  
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   211
  % git=auto: git diff for bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   212
  diff --git a/bintoregular b/bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   213
  index f76dd238ade08917e6712764a16a22005a50573d..9c42f2b6427d8bf034b7bc23986152dc01bfd3ab
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   214
  GIT binary patch
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   215
  literal 13
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   216
  Uc$`bh%qz(+N=+}#Ni5<5043uE82|tP
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   217
  
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   218
18824
f0d55e1b4855 diff: fix binary file removals in git mode.
Johan Bjork <jbjoerk@gmail.com>
parents: 15442
diff changeset
   219
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   220
git=warn: regular diff with data loss warnings
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   221
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   222
  $ hg autodiff --git=warn
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   223
  diff -r a66d19b9302d binary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   224
  Binary file binary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   225
  diff -r a66d19b9302d bintoregular
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   226
  Binary file bintoregular has changed
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   227
  diff -r a66d19b9302d exec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   228
  --- a/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   229
  +++ b/exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   230
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   231
   exec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   232
  +exec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   233
  diff -r a66d19b9302d newbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   234
  Binary file newbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   235
  diff -r a66d19b9302d newexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   236
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   237
  +++ b/newexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   238
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   239
  +newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   240
  diff -r a66d19b9302d newregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   241
  --- /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   242
  +++ b/newregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   243
  @@ -0,0 +1,1 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   244
  +newregular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   245
  diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   246
  --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   247
  +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   248
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   249
   regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   250
  +regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   251
  diff -r a66d19b9302d rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   252
  Binary file rmbinary has changed
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   253
  diff -r a66d19b9302d rmexec
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   254
  --- a/rmexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   255
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   256
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   257
  -rmexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   258
  diff -r a66d19b9302d rmregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   259
  --- a/rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   260
  +++ /dev/null
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   261
  @@ -1,1 +0,0 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   262
  -rmregular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   263
  data lost for: binary
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   264
  data lost for: bintoregular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   265
  data lost for: newbinary
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   266
  data lost for: newempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   267
  data lost for: newexec
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   268
  data lost for: rmbinary
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   269
  data lost for: rmempty
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   270
  data lost for: setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   271
  data lost for: unsetexec
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   272
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   273
git=abort: fail on execute bit change
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   274
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   275
  $ hg autodiff --git=abort regular setexec
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   276
  abort: losing data for setexec
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12149
diff changeset
   277
  [255]
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   278
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   279
git=abort: succeed on regular file
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   280
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   281
  $ hg autodiff --git=abort regular
12577
05210e955bef Merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 12576 12316
diff changeset
   282
  diff -r a66d19b9302d regular
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   283
  --- a/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   284
  +++ b/regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   285
  @@ -1,1 +1,2 @@
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   286
   regular
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   287
  +regular
10189
e451e599fbcf patch: support diff data loss detection and upgrade
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   288
12149
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   289
  $ cd ..
3213e56d63aa tests: unify test-diff-upgrade
Adrian Buehlmann <adrian@cadifra.com>
parents: 11551
diff changeset
   290