Fossil SCM

Update the manifest parser so that it accepts remark artifacts.

drh 2017-01-07 19:29 UTC remarks-on-checkins
Commit e40143aaffd6df688c922e582c1ee93e392ae0b9
+1 -1
--- src/attach.c
+++ src/attach.c
@@ -752,11 +752,11 @@
752752
}
753753
rid = wiki_technote_to_rid(zETime);
754754
if( rid<0 ){
755755
fossil_fatal("ambiguous tech note id: %s", zETime);
756756
}
757
- if( (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0 ){
757
+ if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
758758
zBody = pWiki->zWiki;
759759
}
760760
if( zBody==0 ){
761761
fossil_fatal("technote [%s] not found",zETime);
762762
}
763763
--- src/attach.c
+++ src/attach.c
@@ -752,11 +752,11 @@
752 }
753 rid = wiki_technote_to_rid(zETime);
754 if( rid<0 ){
755 fossil_fatal("ambiguous tech note id: %s", zETime);
756 }
757 if( (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0 ){
758 zBody = pWiki->zWiki;
759 }
760 if( zBody==0 ){
761 fossil_fatal("technote [%s] not found",zETime);
762 }
763
--- src/attach.c
+++ src/attach.c
@@ -752,11 +752,11 @@
752 }
753 rid = wiki_technote_to_rid(zETime);
754 if( rid<0 ){
755 fossil_fatal("ambiguous tech note id: %s", zETime);
756 }
757 if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
758 zBody = pWiki->zWiki;
759 }
760 if( zBody==0 ){
761 fossil_fatal("technote [%s] not found",zETime);
762 }
763
+2 -1
--- src/content.c
+++ src/content.c
@@ -1049,11 +1049,12 @@
10491049
case CFTYPE_CLUSTER: zCFType = "cluster"; break;
10501050
case CFTYPE_CONTROL: zCFType = "tag"; break;
10511051
case CFTYPE_WIKI: zCFType = "wiki"; break;
10521052
case CFTYPE_TICKET: zCFType = "ticket"; break;
10531053
case CFTYPE_ATTACHMENT: zCFType = "attachment"; break;
1054
- case CFTYPE_EVENT: zCFType = "event"; break;
1054
+ case CFTYPE_TECHNOTE: zCFType = "technote"; break;
1055
+ case CFTYPE_REMARK: zCFType = "remark"; break;
10551056
}
10561057
zSrc = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", p->rid);
10571058
if( p->rDate>0.0 ){
10581059
zDate = db_text(0, "SELECT datetime(%.17g)", p->rDate);
10591060
}else{
10601061
--- src/content.c
+++ src/content.c
@@ -1049,11 +1049,12 @@
1049 case CFTYPE_CLUSTER: zCFType = "cluster"; break;
1050 case CFTYPE_CONTROL: zCFType = "tag"; break;
1051 case CFTYPE_WIKI: zCFType = "wiki"; break;
1052 case CFTYPE_TICKET: zCFType = "ticket"; break;
1053 case CFTYPE_ATTACHMENT: zCFType = "attachment"; break;
1054 case CFTYPE_EVENT: zCFType = "event"; break;
 
1055 }
1056 zSrc = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", p->rid);
1057 if( p->rDate>0.0 ){
1058 zDate = db_text(0, "SELECT datetime(%.17g)", p->rDate);
1059 }else{
1060
--- src/content.c
+++ src/content.c
@@ -1049,11 +1049,12 @@
1049 case CFTYPE_CLUSTER: zCFType = "cluster"; break;
1050 case CFTYPE_CONTROL: zCFType = "tag"; break;
1051 case CFTYPE_WIKI: zCFType = "wiki"; break;
1052 case CFTYPE_TICKET: zCFType = "ticket"; break;
1053 case CFTYPE_ATTACHMENT: zCFType = "attachment"; break;
1054 case CFTYPE_TECHNOTE: zCFType = "technote"; break;
1055 case CFTYPE_REMARK: zCFType = "remark"; break;
1056 }
1057 zSrc = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", p->rid);
1058 if( p->rDate>0.0 ){
1059 zDate = db_text(0, "SELECT datetime(%.17g)", p->rDate);
1060 }else{
1061
+3 -3
--- src/event.c
+++ src/event.c
@@ -128,11 +128,11 @@
128128
}
129129
verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
130130
131131
/* Extract the event content.
132132
*/
133
- pTNote = manifest_get(rid, CFTYPE_EVENT, 0);
133
+ pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
134134
if( pTNote==0 ){
135135
fossil_fatal("Object #%d is not a tech-note", rid);
136136
}
137137
zMimetype = wiki_filter_mimetypes(PD("mimetype",pTNote->zMimetype));
138138
blob_init(&fullbody, pTNote->zWiki, -1);
@@ -418,12 +418,12 @@
418418
*/
419419
if( rid
420420
&& (zBody==0 || zETime==0 || zComment==0 || zTags==0 || zMimetype==0)
421421
){
422422
Manifest *pTNote;
423
- pTNote = manifest_get(rid, CFTYPE_EVENT, 0);
424
- if( pTNote && pTNote->type==CFTYPE_EVENT ){
423
+ pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
424
+ if( pTNote && pTNote->type==CFTYPE_TECHNOTE ){
425425
if( zBody==0 ) zBody = pTNote->zWiki;
426426
if( zETime==0 ){
427427
zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate);
428428
}
429429
if( zComment==0 ) zComment = pTNote->zComment;
430430
--- src/event.c
+++ src/event.c
@@ -128,11 +128,11 @@
128 }
129 verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
130
131 /* Extract the event content.
132 */
133 pTNote = manifest_get(rid, CFTYPE_EVENT, 0);
134 if( pTNote==0 ){
135 fossil_fatal("Object #%d is not a tech-note", rid);
136 }
137 zMimetype = wiki_filter_mimetypes(PD("mimetype",pTNote->zMimetype));
138 blob_init(&fullbody, pTNote->zWiki, -1);
@@ -418,12 +418,12 @@
418 */
419 if( rid
420 && (zBody==0 || zETime==0 || zComment==0 || zTags==0 || zMimetype==0)
421 ){
422 Manifest *pTNote;
423 pTNote = manifest_get(rid, CFTYPE_EVENT, 0);
424 if( pTNote && pTNote->type==CFTYPE_EVENT ){
425 if( zBody==0 ) zBody = pTNote->zWiki;
426 if( zETime==0 ){
427 zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate);
428 }
429 if( zComment==0 ) zComment = pTNote->zComment;
430
--- src/event.c
+++ src/event.c
@@ -128,11 +128,11 @@
128 }
129 verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
130
131 /* Extract the event content.
132 */
133 pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
134 if( pTNote==0 ){
135 fossil_fatal("Object #%d is not a tech-note", rid);
136 }
137 zMimetype = wiki_filter_mimetypes(PD("mimetype",pTNote->zMimetype));
138 blob_init(&fullbody, pTNote->zWiki, -1);
@@ -418,12 +418,12 @@
418 */
419 if( rid
420 && (zBody==0 || zETime==0 || zComment==0 || zTags==0 || zMimetype==0)
421 ){
422 Manifest *pTNote;
423 pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
424 if( pTNote && pTNote->type==CFTYPE_TECHNOTE ){
425 if( zBody==0 ) zBody = pTNote->zWiki;
426 if( zETime==0 ){
427 zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate);
428 }
429 if( zComment==0 ) zComment = pTNote->zComment;
430
+44 -13
--- src/manifest.c
+++ src/manifest.c
@@ -33,11 +33,12 @@
3333
#define CFTYPE_CLUSTER 2
3434
#define CFTYPE_CONTROL 3
3535
#define CFTYPE_WIKI 4
3636
#define CFTYPE_TICKET 5
3737
#define CFTYPE_ATTACHMENT 6
38
-#define CFTYPE_EVENT 7
38
+#define CFTYPE_TECHNOTE 7
39
+#define CFTYPE_REMARK 8
3940
4041
/*
4142
** File permissions used by Fossil internally.
4243
*/
4344
#define PERM_REG 0 /* regular file */
@@ -77,10 +78,11 @@
7778
char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
7879
char *zWiki; /* Text of the wiki page. W card. */
7980
char *zWikiTitle; /* Name of the wiki page. L card. */
8081
char *zMimetype; /* Mime type of wiki or comment text. N card. */
8182
double rEventDate; /* Date of an event. E card. */
83
+ char *zRemCkin; /* UUID of checkin to which remark attached. G card */
8284
char *zEventId; /* UUID for an event. E card. */
8385
char *zTicketUuid; /* UUID for a ticket. K card. */
8486
char *zAttachName; /* Filename of an attachment. A card. */
8587
char *zAttachSrc; /* UUID of document being attached. A card. */
8688
char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
@@ -571,10 +573,25 @@
571573
if( i>0 && fossil_strcmp(p->aFile[i-1].zName, zName)>=0 ){
572574
SYNTAX("incorrect F-card sort order");
573575
}
574576
break;
575577
}
578
+
579
+ /*
580
+ ** G <uuid>
581
+ **
582
+ ** The G card records the UUID of a check-in to which a remark is
583
+ ** attached.
584
+ */
585
+ case 'G': {
586
+ if( p->zRemCkin ) SYNTAX("more than one G-card");
587
+ p->zRemCkin = next_token(&x, &sz);
588
+ if( sz!=UUID_SIZE || !validate16(p->zRemCkin, UUID_SIZE) ){
589
+ SYNTAX("malformed UUID on G-card");
590
+ }
591
+ break;
592
+ }
576593
577594
/*
578595
** J <name> ?<value>?
579596
**
580597
** Specifies a name value pair for ticket. If the first character
@@ -765,16 +782,16 @@
765782
if( zUuid==0 ) SYNTAX("missing UUID on T-card");
766783
zValue = next_token(&x, 0);
767784
if( zValue ) defossilize(zValue);
768785
if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
769786
/* A valid uuid */
770
- if( p->zEventId ) SYNTAX("non-self-referential T-card in event");
787
+ if( p->zEventId ) SYNTAX("non-self-referential T-card in technote");
771788
}else if( sz==1 && zUuid[0]=='*' ){
772789
zUuid = 0;
773790
hasSelfRefTag = 1;
774791
if( p->zEventId && zName[0]!='+' ){
775
- SYNTAX("propagating T-card in event");
792
+ SYNTAX("propagating T-card in technote");
776793
}
777794
}else{
778795
SYNTAX("malformed UUID on T-card");
779796
}
780797
defossilize(zName);
@@ -880,10 +897,11 @@
880897
if( p->zAttachName
881898
|| p->zBaseline
882899
|| p->zComment
883900
|| p->rDate>0.0
884901
|| p->zEventId
902
+ || p->zRemCkin
885903
|| p->nFile>0
886904
|| p->nField>0
887905
|| p->zTicketUuid
888906
|| p->zWikiTitle
889907
|| p->zMimetype
@@ -896,22 +914,35 @@
896914
){
897915
SYNTAX("cluster contains a card other than M- or Z-");
898916
}
899917
if( !seenZ ) SYNTAX("missing Z-card on cluster");
900918
p->type = CFTYPE_CLUSTER;
919
+ }else if( p->zRemCkin ){
920
+ if( p->zAttachName ) SYNTAX("A-card in remark");
921
+ if( p->zBaseline ) SYNTAX("B-card in remark");
922
+ if( p->rDate<=0.0 ) SYNTAX("missing date on remark");
923
+ if( p->zEventId ) SYNTAX("E-card in remark");
924
+ if( p->nFile>0 ) SYNTAX("F-card in remark");
925
+ if( p->nField>0 ) SYNTAX("J-card in remark");
926
+ if( p->zTicketUuid ) SYNTAX("K-card in remark");
927
+ if( p->zWikiTitle!=0 ) SYNTAX("L-card in remark");
928
+ if( p->zRepoCksum ) SYNTAX("R-card in remark");
929
+ if( p->zWiki==0 ) SYNTAX("missing W-card on remark");
930
+ if( !seenZ ) SYNTAX("missing Z-card on event");
931
+ p->type = CFTYPE_REMARK;
901932
}else if( p->zEventId ){
902
- if( p->zAttachName ) SYNTAX("A-card in event");
903
- if( p->zBaseline ) SYNTAX("B-card in event");
933
+ if( p->zAttachName ) SYNTAX("A-card in technote");
934
+ if( p->zBaseline ) SYNTAX("B-card in technote");
904935
if( p->rDate<=0.0 ) SYNTAX("missing date on event");
905
- if( p->nFile>0 ) SYNTAX("F-card in event");
906
- if( p->nField>0 ) SYNTAX("J-card in event");
907
- if( p->zTicketUuid ) SYNTAX("K-card in event");
908
- if( p->zWikiTitle!=0 ) SYNTAX("L-card in event");
909
- if( p->zRepoCksum ) SYNTAX("R-card in event");
936
+ if( p->nFile>0 ) SYNTAX("F-card in technote");
937
+ if( p->nField>0 ) SYNTAX("J-card in technote");
938
+ if( p->zTicketUuid ) SYNTAX("K-card in technote");
939
+ if( p->zWikiTitle!=0 ) SYNTAX("L-card in technote");
940
+ if( p->zRepoCksum ) SYNTAX("R-card in technote");
910941
if( p->zWiki==0 ) SYNTAX("missing W-card on event");
911942
if( !seenZ ) SYNTAX("missing Z-card on event");
912
- p->type = CFTYPE_EVENT;
943
+ p->type = CFTYPE_TECHNOTE;
913944
}else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
914945
if( p->zAttachName ) SYNTAX("A-card in wiki");
915946
if( p->zBaseline ) SYNTAX("B-card in wiki");
916947
if( p->rDate<=0.0 ) SYNTAX("missing date on wiki");
917948
if( p->nFile>0 ) SYNTAX("F-card in wiki");
@@ -2013,11 +2044,11 @@
20132044
}
20142045
}
20152046
}
20162047
if( p->type==CFTYPE_CONTROL
20172048
|| p->type==CFTYPE_MANIFEST
2018
- || p->type==CFTYPE_EVENT
2049
+ || p->type==CFTYPE_TECHNOTE
20192050
){
20202051
for(i=0; i<p->nTag; i++){
20212052
int tid;
20222053
int type;
20232054
if( p->aTag[i].zUuid ){
@@ -2081,11 +2112,11 @@
20812112
TAG_USER, rid,
20822113
TAG_COMMENT, rid
20832114
);
20842115
fossil_free(zComment);
20852116
}
2086
- if( p->type==CFTYPE_EVENT ){
2117
+ if( p->type==CFTYPE_TECHNOTE ){
20872118
char *zTag = mprintf("event-%s", p->zEventId);
20882119
int tagid = tag_findid(zTag, 1);
20892120
int prior, subsequent;
20902121
int nWiki;
20912122
char zLength[40];
20922123
--- src/manifest.c
+++ src/manifest.c
@@ -33,11 +33,12 @@
33 #define CFTYPE_CLUSTER 2
34 #define CFTYPE_CONTROL 3
35 #define CFTYPE_WIKI 4
36 #define CFTYPE_TICKET 5
37 #define CFTYPE_ATTACHMENT 6
38 #define CFTYPE_EVENT 7
 
39
40 /*
41 ** File permissions used by Fossil internally.
42 */
43 #define PERM_REG 0 /* regular file */
@@ -77,10 +78,11 @@
77 char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
78 char *zWiki; /* Text of the wiki page. W card. */
79 char *zWikiTitle; /* Name of the wiki page. L card. */
80 char *zMimetype; /* Mime type of wiki or comment text. N card. */
81 double rEventDate; /* Date of an event. E card. */
 
82 char *zEventId; /* UUID for an event. E card. */
83 char *zTicketUuid; /* UUID for a ticket. K card. */
84 char *zAttachName; /* Filename of an attachment. A card. */
85 char *zAttachSrc; /* UUID of document being attached. A card. */
86 char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
@@ -571,10 +573,25 @@
571 if( i>0 && fossil_strcmp(p->aFile[i-1].zName, zName)>=0 ){
572 SYNTAX("incorrect F-card sort order");
573 }
574 break;
575 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
577 /*
578 ** J <name> ?<value>?
579 **
580 ** Specifies a name value pair for ticket. If the first character
@@ -765,16 +782,16 @@
765 if( zUuid==0 ) SYNTAX("missing UUID on T-card");
766 zValue = next_token(&x, 0);
767 if( zValue ) defossilize(zValue);
768 if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
769 /* A valid uuid */
770 if( p->zEventId ) SYNTAX("non-self-referential T-card in event");
771 }else if( sz==1 && zUuid[0]=='*' ){
772 zUuid = 0;
773 hasSelfRefTag = 1;
774 if( p->zEventId && zName[0]!='+' ){
775 SYNTAX("propagating T-card in event");
776 }
777 }else{
778 SYNTAX("malformed UUID on T-card");
779 }
780 defossilize(zName);
@@ -880,10 +897,11 @@
880 if( p->zAttachName
881 || p->zBaseline
882 || p->zComment
883 || p->rDate>0.0
884 || p->zEventId
 
885 || p->nFile>0
886 || p->nField>0
887 || p->zTicketUuid
888 || p->zWikiTitle
889 || p->zMimetype
@@ -896,22 +914,35 @@
896 ){
897 SYNTAX("cluster contains a card other than M- or Z-");
898 }
899 if( !seenZ ) SYNTAX("missing Z-card on cluster");
900 p->type = CFTYPE_CLUSTER;
 
 
 
 
 
 
 
 
 
 
 
 
 
901 }else if( p->zEventId ){
902 if( p->zAttachName ) SYNTAX("A-card in event");
903 if( p->zBaseline ) SYNTAX("B-card in event");
904 if( p->rDate<=0.0 ) SYNTAX("missing date on event");
905 if( p->nFile>0 ) SYNTAX("F-card in event");
906 if( p->nField>0 ) SYNTAX("J-card in event");
907 if( p->zTicketUuid ) SYNTAX("K-card in event");
908 if( p->zWikiTitle!=0 ) SYNTAX("L-card in event");
909 if( p->zRepoCksum ) SYNTAX("R-card in event");
910 if( p->zWiki==0 ) SYNTAX("missing W-card on event");
911 if( !seenZ ) SYNTAX("missing Z-card on event");
912 p->type = CFTYPE_EVENT;
913 }else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
914 if( p->zAttachName ) SYNTAX("A-card in wiki");
915 if( p->zBaseline ) SYNTAX("B-card in wiki");
916 if( p->rDate<=0.0 ) SYNTAX("missing date on wiki");
917 if( p->nFile>0 ) SYNTAX("F-card in wiki");
@@ -2013,11 +2044,11 @@
2013 }
2014 }
2015 }
2016 if( p->type==CFTYPE_CONTROL
2017 || p->type==CFTYPE_MANIFEST
2018 || p->type==CFTYPE_EVENT
2019 ){
2020 for(i=0; i<p->nTag; i++){
2021 int tid;
2022 int type;
2023 if( p->aTag[i].zUuid ){
@@ -2081,11 +2112,11 @@
2081 TAG_USER, rid,
2082 TAG_COMMENT, rid
2083 );
2084 fossil_free(zComment);
2085 }
2086 if( p->type==CFTYPE_EVENT ){
2087 char *zTag = mprintf("event-%s", p->zEventId);
2088 int tagid = tag_findid(zTag, 1);
2089 int prior, subsequent;
2090 int nWiki;
2091 char zLength[40];
2092
--- src/manifest.c
+++ src/manifest.c
@@ -33,11 +33,12 @@
33 #define CFTYPE_CLUSTER 2
34 #define CFTYPE_CONTROL 3
35 #define CFTYPE_WIKI 4
36 #define CFTYPE_TICKET 5
37 #define CFTYPE_ATTACHMENT 6
38 #define CFTYPE_TECHNOTE 7
39 #define CFTYPE_REMARK 8
40
41 /*
42 ** File permissions used by Fossil internally.
43 */
44 #define PERM_REG 0 /* regular file */
@@ -77,10 +78,11 @@
78 char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */
79 char *zWiki; /* Text of the wiki page. W card. */
80 char *zWikiTitle; /* Name of the wiki page. L card. */
81 char *zMimetype; /* Mime type of wiki or comment text. N card. */
82 double rEventDate; /* Date of an event. E card. */
83 char *zRemCkin; /* UUID of checkin to which remark attached. G card */
84 char *zEventId; /* UUID for an event. E card. */
85 char *zTicketUuid; /* UUID for a ticket. K card. */
86 char *zAttachName; /* Filename of an attachment. A card. */
87 char *zAttachSrc; /* UUID of document being attached. A card. */
88 char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */
@@ -571,10 +573,25 @@
573 if( i>0 && fossil_strcmp(p->aFile[i-1].zName, zName)>=0 ){
574 SYNTAX("incorrect F-card sort order");
575 }
576 break;
577 }
578
579 /*
580 ** G <uuid>
581 **
582 ** The G card records the UUID of a check-in to which a remark is
583 ** attached.
584 */
585 case 'G': {
586 if( p->zRemCkin ) SYNTAX("more than one G-card");
587 p->zRemCkin = next_token(&x, &sz);
588 if( sz!=UUID_SIZE || !validate16(p->zRemCkin, UUID_SIZE) ){
589 SYNTAX("malformed UUID on G-card");
590 }
591 break;
592 }
593
594 /*
595 ** J <name> ?<value>?
596 **
597 ** Specifies a name value pair for ticket. If the first character
@@ -765,16 +782,16 @@
782 if( zUuid==0 ) SYNTAX("missing UUID on T-card");
783 zValue = next_token(&x, 0);
784 if( zValue ) defossilize(zValue);
785 if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
786 /* A valid uuid */
787 if( p->zEventId ) SYNTAX("non-self-referential T-card in technote");
788 }else if( sz==1 && zUuid[0]=='*' ){
789 zUuid = 0;
790 hasSelfRefTag = 1;
791 if( p->zEventId && zName[0]!='+' ){
792 SYNTAX("propagating T-card in technote");
793 }
794 }else{
795 SYNTAX("malformed UUID on T-card");
796 }
797 defossilize(zName);
@@ -880,10 +897,11 @@
897 if( p->zAttachName
898 || p->zBaseline
899 || p->zComment
900 || p->rDate>0.0
901 || p->zEventId
902 || p->zRemCkin
903 || p->nFile>0
904 || p->nField>0
905 || p->zTicketUuid
906 || p->zWikiTitle
907 || p->zMimetype
@@ -896,22 +914,35 @@
914 ){
915 SYNTAX("cluster contains a card other than M- or Z-");
916 }
917 if( !seenZ ) SYNTAX("missing Z-card on cluster");
918 p->type = CFTYPE_CLUSTER;
919 }else if( p->zRemCkin ){
920 if( p->zAttachName ) SYNTAX("A-card in remark");
921 if( p->zBaseline ) SYNTAX("B-card in remark");
922 if( p->rDate<=0.0 ) SYNTAX("missing date on remark");
923 if( p->zEventId ) SYNTAX("E-card in remark");
924 if( p->nFile>0 ) SYNTAX("F-card in remark");
925 if( p->nField>0 ) SYNTAX("J-card in remark");
926 if( p->zTicketUuid ) SYNTAX("K-card in remark");
927 if( p->zWikiTitle!=0 ) SYNTAX("L-card in remark");
928 if( p->zRepoCksum ) SYNTAX("R-card in remark");
929 if( p->zWiki==0 ) SYNTAX("missing W-card on remark");
930 if( !seenZ ) SYNTAX("missing Z-card on event");
931 p->type = CFTYPE_REMARK;
932 }else if( p->zEventId ){
933 if( p->zAttachName ) SYNTAX("A-card in technote");
934 if( p->zBaseline ) SYNTAX("B-card in technote");
935 if( p->rDate<=0.0 ) SYNTAX("missing date on event");
936 if( p->nFile>0 ) SYNTAX("F-card in technote");
937 if( p->nField>0 ) SYNTAX("J-card in technote");
938 if( p->zTicketUuid ) SYNTAX("K-card in technote");
939 if( p->zWikiTitle!=0 ) SYNTAX("L-card in technote");
940 if( p->zRepoCksum ) SYNTAX("R-card in technote");
941 if( p->zWiki==0 ) SYNTAX("missing W-card on event");
942 if( !seenZ ) SYNTAX("missing Z-card on event");
943 p->type = CFTYPE_TECHNOTE;
944 }else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
945 if( p->zAttachName ) SYNTAX("A-card in wiki");
946 if( p->zBaseline ) SYNTAX("B-card in wiki");
947 if( p->rDate<=0.0 ) SYNTAX("missing date on wiki");
948 if( p->nFile>0 ) SYNTAX("F-card in wiki");
@@ -2013,11 +2044,11 @@
2044 }
2045 }
2046 }
2047 if( p->type==CFTYPE_CONTROL
2048 || p->type==CFTYPE_MANIFEST
2049 || p->type==CFTYPE_TECHNOTE
2050 ){
2051 for(i=0; i<p->nTag; i++){
2052 int tid;
2053 int type;
2054 if( p->aTag[i].zUuid ){
@@ -2081,11 +2112,11 @@
2112 TAG_USER, rid,
2113 TAG_COMMENT, rid
2114 );
2115 fossil_free(zComment);
2116 }
2117 if( p->type==CFTYPE_TECHNOTE ){
2118 char *zTag = mprintf("event-%s", p->zEventId);
2119 int tagid = tag_findid(zTag, 1);
2120 int prior, subsequent;
2121 int nWiki;
2122 char zLength[40];
2123
+2 -1
--- src/rebuild.c
+++ src/rebuild.c
@@ -668,11 +668,12 @@
668668
{ CFTYPE_CLUSTER, "Clusters:" },
669669
{ CFTYPE_CONTROL, "Tags:" },
670670
{ CFTYPE_WIKI, "Wikis:" },
671671
{ CFTYPE_TICKET, "Tickets:" },
672672
{ CFTYPE_ATTACHMENT,"Attachments:" },
673
- { CFTYPE_EVENT, "Events:" },
673
+ { CFTYPE_TECHNOTE, "Technotes:" },
674
+ { CFTYPE_REMARK, "Remarks:" },
674675
};
675676
int i;
676677
int subtotal = 0;
677678
for(i=0; i<count(aStat); i++){
678679
int k = aStat[i].idx;
679680
--- src/rebuild.c
+++ src/rebuild.c
@@ -668,11 +668,12 @@
668 { CFTYPE_CLUSTER, "Clusters:" },
669 { CFTYPE_CONTROL, "Tags:" },
670 { CFTYPE_WIKI, "Wikis:" },
671 { CFTYPE_TICKET, "Tickets:" },
672 { CFTYPE_ATTACHMENT,"Attachments:" },
673 { CFTYPE_EVENT, "Events:" },
 
674 };
675 int i;
676 int subtotal = 0;
677 for(i=0; i<count(aStat); i++){
678 int k = aStat[i].idx;
679
--- src/rebuild.c
+++ src/rebuild.c
@@ -668,11 +668,12 @@
668 { CFTYPE_CLUSTER, "Clusters:" },
669 { CFTYPE_CONTROL, "Tags:" },
670 { CFTYPE_WIKI, "Wikis:" },
671 { CFTYPE_TICKET, "Tickets:" },
672 { CFTYPE_ATTACHMENT,"Attachments:" },
673 { CFTYPE_TECHNOTE, "Technotes:" },
674 { CFTYPE_REMARK, "Remarks:" },
675 };
676 int i;
677 int subtotal = 0;
678 for(i=0; i<count(aStat); i++){
679 int k = aStat[i].idx;
680
+2 -2
--- src/wiki.c
+++ src/wiki.c
@@ -1269,11 +1269,11 @@
12691269
}
12701270
rid = wiki_technote_to_rid(zETime);
12711271
if ( rid==-1 ){
12721272
fossil_fatal("ambiguous tech note id: %s", zETime);
12731273
}
1274
- if( (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0 ){
1274
+ if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
12751275
zBody = pWiki->zWiki;
12761276
}
12771277
if( zBody==0 ){
12781278
fossil_fatal("technote [%s] not found",zETime);
12791279
}
@@ -1320,11 +1320,11 @@
13201320
&& (pWiki->zMimetype && *pWiki->zMimetype) ){
13211321
zMimeType = pWiki->zMimetype;
13221322
}
13231323
}else{
13241324
rid = wiki_technote_to_rid(zETime);
1325
- if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0
1325
+ if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0
13261326
&& (pWiki->zMimetype && *pWiki->zMimetype) ){
13271327
zMimeType = pWiki->zMimetype;
13281328
}
13291329
}
13301330
}else{
13311331
--- src/wiki.c
+++ src/wiki.c
@@ -1269,11 +1269,11 @@
1269 }
1270 rid = wiki_technote_to_rid(zETime);
1271 if ( rid==-1 ){
1272 fossil_fatal("ambiguous tech note id: %s", zETime);
1273 }
1274 if( (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0 ){
1275 zBody = pWiki->zWiki;
1276 }
1277 if( zBody==0 ){
1278 fossil_fatal("technote [%s] not found",zETime);
1279 }
@@ -1320,11 +1320,11 @@
1320 && (pWiki->zMimetype && *pWiki->zMimetype) ){
1321 zMimeType = pWiki->zMimetype;
1322 }
1323 }else{
1324 rid = wiki_technote_to_rid(zETime);
1325 if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0
1326 && (pWiki->zMimetype && *pWiki->zMimetype) ){
1327 zMimeType = pWiki->zMimetype;
1328 }
1329 }
1330 }else{
1331
--- src/wiki.c
+++ src/wiki.c
@@ -1269,11 +1269,11 @@
1269 }
1270 rid = wiki_technote_to_rid(zETime);
1271 if ( rid==-1 ){
1272 fossil_fatal("ambiguous tech note id: %s", zETime);
1273 }
1274 if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
1275 zBody = pWiki->zWiki;
1276 }
1277 if( zBody==0 ){
1278 fossil_fatal("technote [%s] not found",zETime);
1279 }
@@ -1320,11 +1320,11 @@
1320 && (pWiki->zMimetype && *pWiki->zMimetype) ){
1321 zMimeType = pWiki->zMimetype;
1322 }
1323 }else{
1324 rid = wiki_technote_to_rid(zETime);
1325 if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0
1326 && (pWiki->zMimetype && *pWiki->zMimetype) ){
1327 zMimeType = pWiki->zMimetype;
1328 }
1329 }
1330 }else{
1331

Keyboard Shortcuts

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