Fossil SCM
Tweak to the side-by-side diff alignment algorithm. Add diff test cases to the release checklist.
Commit
3be264b57fc46fb81d47ef2fc5188a588e7bab08
Parent
6b08628c7865f5f…
3 files changed
+1
+5
+1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -721,10 +721,11 @@ | ||
| 721 | 721 | while( nB>0 && fossil_isspace(zB[nB-1]) ){ nB--; } |
| 722 | 722 | if( nA>250 ) nA = 250; |
| 723 | 723 | if( nB>250 ) nB = 250; |
| 724 | 724 | avg = (nA+nB)/2; |
| 725 | 725 | if( avg==0 ) return 0; |
| 726 | + if( nA==nB && memcmp(zA, zB, nA)==0 ) return 0; | |
| 726 | 727 | memset(aFirst, 0, sizeof(aFirst)); |
| 727 | 728 | zA--; zB--; /* Make both zA[] and zB[] 1-indexed */ |
| 728 | 729 | for(i=nB; i>0; i--){ |
| 729 | 730 | c = (unsigned char)zB[i]; |
| 730 | 731 | aNext[i] = aFirst[c]; |
| 731 | 732 | |
| 732 | 733 | ADDED test/diff-test-1.wiki |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -721,10 +721,11 @@ | |
| 721 | while( nB>0 && fossil_isspace(zB[nB-1]) ){ nB--; } |
| 722 | if( nA>250 ) nA = 250; |
| 723 | if( nB>250 ) nB = 250; |
| 724 | avg = (nA+nB)/2; |
| 725 | if( avg==0 ) return 0; |
| 726 | memset(aFirst, 0, sizeof(aFirst)); |
| 727 | zA--; zB--; /* Make both zA[] and zB[] 1-indexed */ |
| 728 | for(i=nB; i>0; i--){ |
| 729 | c = (unsigned char)zB[i]; |
| 730 | aNext[i] = aFirst[c]; |
| 731 | |
| 732 | DDED test/diff-test-1.wiki |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -721,10 +721,11 @@ | |
| 721 | while( nB>0 && fossil_isspace(zB[nB-1]) ){ nB--; } |
| 722 | if( nA>250 ) nA = 250; |
| 723 | if( nB>250 ) nB = 250; |
| 724 | avg = (nA+nB)/2; |
| 725 | if( avg==0 ) return 0; |
| 726 | if( nA==nB && memcmp(zA, zB, nA)==0 ) return 0; |
| 727 | memset(aFirst, 0, sizeof(aFirst)); |
| 728 | zA--; zB--; /* Make both zA[] and zB[] 1-indexed */ |
| 729 | for(i=nB; i>0; i--){ |
| 730 | c = (unsigned char)zB[i]; |
| 731 | aNext[i] = aFirst[c]; |
| 732 | |
| 733 | DDED test/diff-test-1.wiki |
No diff available
| --- test/release-checklist.wiki | ||
| +++ test/release-checklist.wiki | ||
| @@ -13,10 +13,15 @@ | ||
| 13 | 13 | <li><p> |
| 14 | 14 | Click on each of the links in in the |
| 15 | 15 | [./graph-test-1.wiki] document and verify that all graphs are |
| 16 | 16 | rendered correctly. |
| 17 | 17 | |
| 18 | +<li><p> | |
| 19 | +Click on each of the links in in the | |
| 20 | +[./diff-test-1.wiki] document and verify that all diffs are | |
| 21 | +rendered correctly. | |
| 22 | + | |
| 18 | 23 | <li><p> |
| 19 | 24 | Verify correct name-change tracking behavior (no net changes) for: |
| 20 | 25 | <blockquote><b> |
| 21 | 26 | fossil test-name-changes --debug b120bc8b262ac 374920b20944b |
| 22 | 27 | </b></blockquote> |
| 23 | 28 |
| --- test/release-checklist.wiki | |
| +++ test/release-checklist.wiki | |
| @@ -13,10 +13,15 @@ | |
| 13 | <li><p> |
| 14 | Click on each of the links in in the |
| 15 | [./graph-test-1.wiki] document and verify that all graphs are |
| 16 | rendered correctly. |
| 17 | |
| 18 | <li><p> |
| 19 | Verify correct name-change tracking behavior (no net changes) for: |
| 20 | <blockquote><b> |
| 21 | fossil test-name-changes --debug b120bc8b262ac 374920b20944b |
| 22 | </b></blockquote> |
| 23 |
| --- test/release-checklist.wiki | |
| +++ test/release-checklist.wiki | |
| @@ -13,10 +13,15 @@ | |
| 13 | <li><p> |
| 14 | Click on each of the links in in the |
| 15 | [./graph-test-1.wiki] document and verify that all graphs are |
| 16 | rendered correctly. |
| 17 | |
| 18 | <li><p> |
| 19 | Click on each of the links in in the |
| 20 | [./diff-test-1.wiki] document and verify that all diffs are |
| 21 | rendered correctly. |
| 22 | |
| 23 | <li><p> |
| 24 | Verify correct name-change tracking behavior (no net changes) for: |
| 25 | <blockquote><b> |
| 26 | fossil test-name-changes --debug b120bc8b262ac 374920b20944b |
| 27 | </b></blockquote> |
| 28 |