Fossil SCM

Even more experimental: just shun all clusters and see what happens.

jan.nijtmans 2013-08-31 14:47 UTC shun-clusters
Commit ab422c39e1332ef68e81bd2b29c0712537d4330e
1 file changed +9 -13
+9 -13
--- src/manifest.c
+++ src/manifest.c
@@ -353,11 +353,11 @@
353353
char cType;
354354
char *z;
355355
int n;
356356
char *zUuid;
357357
int sz = 0;
358
- int isRepeat, hasSelfRefTag = 0, hasShunnedMCard = 0;
358
+ int isRepeat, hasSelfRefTag = 0;
359359
static Bag seen;
360360
const char *zErr = 0;
361361
362362
if( rid==0 ){
363363
isRepeat = 1;
@@ -642,13 +642,10 @@
642642
i = p->nCChild++;
643643
p->azCChild[i] = zUuid;
644644
if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){
645645
SYNTAX("M-card in the wrong order");
646646
}
647
- if( !hasShunnedMCard ){
648
- hasShunnedMCard = uuid_is_shunned(zUuid);
649
- }
650647
break;
651648
}
652649
653650
/*
654651
** N <uuid>
@@ -882,19 +879,10 @@
882879
|| p->zWiki
883880
){
884881
SYNTAX("cluster contains a card other than M- or Z-");
885882
}
886883
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
- }
896884
p->type = CFTYPE_CLUSTER;
897885
}else if( p->zEventId ){
898886
if( p->rDate<=0.0 ) SYNTAX("missing date on event");
899887
if( p->nFile>0 ) SYNTAX("F-card in event");
900888
if( p->zRepoCksum ) SYNTAX("R-card in event");
@@ -1675,10 +1663,18 @@
16751663
}
16761664
if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){
16771665
manifest_destroy(p);
16781666
assert( blob_is_reset(pContent) );
16791667
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);
16801676
}
16811677
if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){
16821678
manifest_destroy(p);
16831679
assert( blob_is_reset(pContent) );
16841680
return 0;
16851681
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button