Mercurial > hg
comparison tests/test-mq-qfold.t @ 30431:8c0c75aa3ff4
bdiff: give slight preference to longest matches in the middle of the B side
We already have a slight preference for matches close to the middle on the A
side. Now, do the same on the B side.
j is iterating the b range backwards and we thus accept a new j if the previous
match was in the upper half.
This makes the test-bhalf diff "correct". It obviously also gives more
preference to balanced recursion than to appending to sequences. That is kind
of correct, but will also unfortunately make some bundles bigger. No doubt, we
can also create examples where it will make them smaller ...
The bundle size for 4.0 (hg bundle --base null -r 4.0 x.hg) happens to go from
22803824 to 22806817 bytes - an 0.01% increase.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 08 Nov 2016 18:37:33 +0100 |
parents | 4414d500604f |
children | 3633403888ae |
comparison
equal
deleted
inserted
replaced
30430:5c4e2636c1a9 | 30431:8c0c75aa3ff4 |
---|---|
49 $ hg qdiff | 49 $ hg qdiff |
50 diff -r 07f494440405 a | 50 diff -r 07f494440405 a |
51 --- a/a | 51 --- a/a |
52 +++ b/a | 52 +++ b/a |
53 @@ -1,1 +1,3 @@ | 53 @@ -1,1 +1,3 @@ |
54 a | 54 +a |
55 +a | 55 a |
56 +b | 56 +b |
57 | 57 |
58 Fold with local changes: | 58 Fold with local changes: |
59 | 59 |
60 $ echo d >> a | 60 $ echo d >> a |
65 $ hg diff -c . | 65 $ hg diff -c . |
66 diff -r 07f494440405 -r ???????????? a (glob) | 66 diff -r 07f494440405 -r ???????????? a (glob) |
67 --- a/a | 67 --- a/a |
68 +++ b/a | 68 +++ b/a |
69 @@ -1,1 +1,3 @@ | 69 @@ -1,1 +1,3 @@ |
70 a | 70 +a |
71 +a | 71 a |
72 +b | 72 +b |
73 | 73 |
74 $ hg revert -a --no-backup | 74 $ hg revert -a --no-backup |
75 reverting a | 75 reverting a |
76 | 76 |