Fossil SCM
Even more experimental: just shun all clusters and see what happens.
Commit
ab422c39e1332ef68e81bd2b29c0712537d4330e
Parent
abda198efa6eba8…
1 file changed
+9
-13
+9
-13
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -353,11 +353,11 @@ | ||
| 353 | 353 | char cType; |
| 354 | 354 | char *z; |
| 355 | 355 | int n; |
| 356 | 356 | char *zUuid; |
| 357 | 357 | int sz = 0; |
| 358 | - int isRepeat, hasSelfRefTag = 0, hasShunnedMCard = 0; | |
| 358 | + int isRepeat, hasSelfRefTag = 0; | |
| 359 | 359 | static Bag seen; |
| 360 | 360 | const char *zErr = 0; |
| 361 | 361 | |
| 362 | 362 | if( rid==0 ){ |
| 363 | 363 | isRepeat = 1; |
| @@ -642,13 +642,10 @@ | ||
| 642 | 642 | i = p->nCChild++; |
| 643 | 643 | p->azCChild[i] = zUuid; |
| 644 | 644 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 645 | 645 | SYNTAX("M-card in the wrong order"); |
| 646 | 646 | } |
| 647 | - if( !hasShunnedMCard ){ | |
| 648 | - hasShunnedMCard = uuid_is_shunned(zUuid); | |
| 649 | - } | |
| 650 | 647 | break; |
| 651 | 648 | } |
| 652 | 649 | |
| 653 | 650 | /* |
| 654 | 651 | ** N <uuid> |
| @@ -882,19 +879,10 @@ | ||
| 882 | 879 | || p->zWiki |
| 883 | 880 | ){ |
| 884 | 881 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 885 | 882 | } |
| 886 | 883 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 887 | - if( hasShunnedMCard) { | |
| 888 | - zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); | |
| 889 | - db_begin_transaction(); | |
| 890 | - db_multi_exec( | |
| 891 | - "INSERT OR IGNORE INTO shun(uuid,mtime)" | |
| 892 | - " VALUES('%s', now())", zUuid); | |
| 893 | - db_end_transaction(0); | |
| 894 | - SYNTAX("shunned M-card on cluster"); | |
| 895 | - } | |
| 896 | 884 | p->type = CFTYPE_CLUSTER; |
| 897 | 885 | }else if( p->zEventId ){ |
| 898 | 886 | if( p->rDate<=0.0 ) SYNTAX("missing date on event"); |
| 899 | 887 | if( p->nFile>0 ) SYNTAX("F-card in event"); |
| 900 | 888 | if( p->zRepoCksum ) SYNTAX("R-card in event"); |
| @@ -1675,10 +1663,18 @@ | ||
| 1675 | 1663 | } |
| 1676 | 1664 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1677 | 1665 | manifest_destroy(p); |
| 1678 | 1666 | assert( blob_is_reset(pContent) ); |
| 1679 | 1667 | return 0; |
| 1668 | + } | |
| 1669 | + if( p->type==CFTYPE_CLUSTER ){ | |
| 1670 | + const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); | |
| 1671 | + db_begin_transaction(); | |
| 1672 | + db_multi_exec( | |
| 1673 | + "INSERT OR IGNORE INTO shun(uuid,mtime)" | |
| 1674 | + " VALUES('%s', now())", zUuid); | |
| 1675 | + db_end_transaction(0); | |
| 1680 | 1676 | } |
| 1681 | 1677 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1682 | 1678 | manifest_destroy(p); |
| 1683 | 1679 | assert( blob_is_reset(pContent) ); |
| 1684 | 1680 | return 0; |
| 1685 | 1681 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -353,11 +353,11 @@ | |
| 353 | char cType; |
| 354 | char *z; |
| 355 | int n; |
| 356 | char *zUuid; |
| 357 | int sz = 0; |
| 358 | int isRepeat, hasSelfRefTag = 0, hasShunnedMCard = 0; |
| 359 | static Bag seen; |
| 360 | const char *zErr = 0; |
| 361 | |
| 362 | if( rid==0 ){ |
| 363 | isRepeat = 1; |
| @@ -642,13 +642,10 @@ | |
| 642 | i = p->nCChild++; |
| 643 | p->azCChild[i] = zUuid; |
| 644 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 645 | SYNTAX("M-card in the wrong order"); |
| 646 | } |
| 647 | if( !hasShunnedMCard ){ |
| 648 | hasShunnedMCard = uuid_is_shunned(zUuid); |
| 649 | } |
| 650 | break; |
| 651 | } |
| 652 | |
| 653 | /* |
| 654 | ** N <uuid> |
| @@ -882,19 +879,10 @@ | |
| 882 | || p->zWiki |
| 883 | ){ |
| 884 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 885 | } |
| 886 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 887 | if( hasShunnedMCard) { |
| 888 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 889 | db_begin_transaction(); |
| 890 | db_multi_exec( |
| 891 | "INSERT OR IGNORE INTO shun(uuid,mtime)" |
| 892 | " VALUES('%s', now())", zUuid); |
| 893 | db_end_transaction(0); |
| 894 | SYNTAX("shunned M-card on cluster"); |
| 895 | } |
| 896 | p->type = CFTYPE_CLUSTER; |
| 897 | }else if( p->zEventId ){ |
| 898 | if( p->rDate<=0.0 ) SYNTAX("missing date on event"); |
| 899 | if( p->nFile>0 ) SYNTAX("F-card in event"); |
| 900 | if( p->zRepoCksum ) SYNTAX("R-card in event"); |
| @@ -1675,10 +1663,18 @@ | |
| 1675 | } |
| 1676 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1677 | manifest_destroy(p); |
| 1678 | assert( blob_is_reset(pContent) ); |
| 1679 | return 0; |
| 1680 | } |
| 1681 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1682 | manifest_destroy(p); |
| 1683 | assert( blob_is_reset(pContent) ); |
| 1684 | return 0; |
| 1685 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -353,11 +353,11 @@ | |
| 353 | char cType; |
| 354 | char *z; |
| 355 | int n; |
| 356 | char *zUuid; |
| 357 | int sz = 0; |
| 358 | int isRepeat, hasSelfRefTag = 0; |
| 359 | static Bag seen; |
| 360 | const char *zErr = 0; |
| 361 | |
| 362 | if( rid==0 ){ |
| 363 | isRepeat = 1; |
| @@ -642,13 +642,10 @@ | |
| 642 | i = p->nCChild++; |
| 643 | p->azCChild[i] = zUuid; |
| 644 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 645 | SYNTAX("M-card in the wrong order"); |
| 646 | } |
| 647 | break; |
| 648 | } |
| 649 | |
| 650 | /* |
| 651 | ** N <uuid> |
| @@ -882,19 +879,10 @@ | |
| 879 | || p->zWiki |
| 880 | ){ |
| 881 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 882 | } |
| 883 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 884 | p->type = CFTYPE_CLUSTER; |
| 885 | }else if( p->zEventId ){ |
| 886 | if( p->rDate<=0.0 ) SYNTAX("missing date on event"); |
| 887 | if( p->nFile>0 ) SYNTAX("F-card in event"); |
| 888 | if( p->zRepoCksum ) SYNTAX("R-card in event"); |
| @@ -1675,10 +1663,18 @@ | |
| 1663 | } |
| 1664 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1665 | manifest_destroy(p); |
| 1666 | assert( blob_is_reset(pContent) ); |
| 1667 | return 0; |
| 1668 | } |
| 1669 | if( p->type==CFTYPE_CLUSTER ){ |
| 1670 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1671 | db_begin_transaction(); |
| 1672 | db_multi_exec( |
| 1673 | "INSERT OR IGNORE INTO shun(uuid,mtime)" |
| 1674 | " VALUES('%s', now())", zUuid); |
| 1675 | db_end_transaction(0); |
| 1676 | } |
| 1677 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1678 | manifest_destroy(p); |
| 1679 | assert( blob_is_reset(pContent) ); |
| 1680 | return 0; |
| 1681 |