Fossil SCM
Better enforcement of lexicographical ordering of T cards.
Commit
2979c0827104e62b18df358b4919983166bb625e
Parent
48445291c06ccda…
1 file changed
+5
-2
+5
-2
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -769,12 +769,15 @@ | ||
| 769 | 769 | } |
| 770 | 770 | i = p->nTag++; |
| 771 | 771 | p->aTag[i].zName = zName; |
| 772 | 772 | p->aTag[i].zUuid = zUuid; |
| 773 | 773 | p->aTag[i].zValue = zValue; |
| 774 | - if( i>0 && fossil_strcmp(p->aTag[i-1].zName, zName)>0 ){ | |
| 775 | - SYNTAX("T-card in the wrong order"); | |
| 774 | + if( i>0 ){ | |
| 775 | + int c = fossil_strcmp(p->aTag[i-1].zName, zName); | |
| 776 | + if( c>0 || (c==0 && fossil_strcmp(p->aTag[i-1].zUuid, zUuid)>=0) ){ | |
| 777 | + SYNTAX("T-card in the wrong order"); | |
| 778 | + } | |
| 776 | 779 | } |
| 777 | 780 | break; |
| 778 | 781 | } |
| 779 | 782 | |
| 780 | 783 | /* |
| 781 | 784 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -769,12 +769,15 @@ | |
| 769 | } |
| 770 | i = p->nTag++; |
| 771 | p->aTag[i].zName = zName; |
| 772 | p->aTag[i].zUuid = zUuid; |
| 773 | p->aTag[i].zValue = zValue; |
| 774 | if( i>0 && fossil_strcmp(p->aTag[i-1].zName, zName)>0 ){ |
| 775 | SYNTAX("T-card in the wrong order"); |
| 776 | } |
| 777 | break; |
| 778 | } |
| 779 | |
| 780 | /* |
| 781 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -769,12 +769,15 @@ | |
| 769 | } |
| 770 | i = p->nTag++; |
| 771 | p->aTag[i].zName = zName; |
| 772 | p->aTag[i].zUuid = zUuid; |
| 773 | p->aTag[i].zValue = zValue; |
| 774 | if( i>0 ){ |
| 775 | int c = fossil_strcmp(p->aTag[i-1].zName, zName); |
| 776 | if( c>0 || (c==0 && fossil_strcmp(p->aTag[i-1].zUuid, zUuid)>=0) ){ |
| 777 | SYNTAX("T-card in the wrong order"); |
| 778 | } |
| 779 | } |
| 780 | break; |
| 781 | } |
| 782 | |
| 783 | /* |
| 784 |