Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch remarks-on-checkins Excluding Merge-Ins
This is equivalent to a diff from 241f1e2a4f to f051f1d3d1
|
2017-01-11
| ||
| 16:36 | Fix obsolete references to the legacy download page. Always refer to the new unversioned-content download page. check-in: a1d7539214 user: drh tags: trunk | |
|
2017-01-10
| ||
| 20:38 | Schema enhancements necessary to support the Remark artifact. Closed-Leaf check-in: f051f1d3d1 user: drh tags: remarks-on-checkins | |
| 20:32 | Improvements to comments and file format docs. check-in: f0c19ea170 user: mistachkin tags: remarks-on-checkins | |
| 19:09 | Merge changes from trunk. check-in: 43fa1ecc73 user: drh tags: remarks-on-checkins | |
| 13:05 | Fix the report logic so that @-bindings in the SQL work the same as $- and :-bindings. check-in: 241f1e2a4f user: drh tags: trunk | |
| 05:30 | Add the changes from check-in [3dddf7674b] to the 'makemake.tcl' tool, which is used to generate the Makefiles. check-in: 913058306f user: mistachkin tags: trunk | |
Changes to src/attach.c.
| ︙ | ︙ | |||
750 751 752 753 754 755 756 |
if( g.argc!=4 ){
usage("add FILENAME --technote DATETIME|TECHNOTE-ID");
}
rid = wiki_technote_to_rid(zETime);
if( rid<0 ){
fossil_fatal("ambiguous tech note id: %s", zETime);
}
| | | 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
if( g.argc!=4 ){
usage("add FILENAME --technote DATETIME|TECHNOTE-ID");
}
rid = wiki_technote_to_rid(zETime);
if( rid<0 ){
fossil_fatal("ambiguous tech note id: %s", zETime);
}
if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
zBody = pWiki->zWiki;
}
if( zBody==0 ){
fossil_fatal("technote [%s] not found",zETime);
}
zTarget = db_text(0,
"SELECT substr(tagname,7) FROM tag WHERE tagid=(SELECT tagid FROM event WHERE objid='%d')",
|
| ︙ | ︙ |
Changes to src/content.c.
| ︙ | ︙ | |||
1047 1048 1049 1050 1051 1052 1053 |
switch( p->type ){
case CFTYPE_MANIFEST: zCFType = "check-in"; break;
case CFTYPE_CLUSTER: zCFType = "cluster"; break;
case CFTYPE_CONTROL: zCFType = "tag"; break;
case CFTYPE_WIKI: zCFType = "wiki"; break;
case CFTYPE_TICKET: zCFType = "ticket"; break;
case CFTYPE_ATTACHMENT: zCFType = "attachment"; break;
| | > | 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
switch( p->type ){
case CFTYPE_MANIFEST: zCFType = "check-in"; break;
case CFTYPE_CLUSTER: zCFType = "cluster"; break;
case CFTYPE_CONTROL: zCFType = "tag"; break;
case CFTYPE_WIKI: zCFType = "wiki"; break;
case CFTYPE_TICKET: zCFType = "ticket"; break;
case CFTYPE_ATTACHMENT: zCFType = "attachment"; break;
case CFTYPE_TECHNOTE: zCFType = "technote"; break;
case CFTYPE_REMARK: zCFType = "remark"; break;
}
zSrc = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", p->rid);
if( p->rDate>0.0 ){
zDate = db_text(0, "SELECT datetime(%.17g)", p->rDate);
}else{
zDate = db_text(0,
"SELECT datetime(rcvfrom.mtime)"
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 |
db_begin_transaction();
db_multi_exec(
"ALTER TABLE repository.mlink ADD COLUMN pmid INTEGER DEFAULT 0;"
"ALTER TABLE repository.mlink ADD COLUMN isaux BOOLEAN DEFAULT 0;"
);
db_end_transaction(0);
}
}
/*
** Flags for the db_find_and_open_repository() function.
*/
#if INTERFACE
#define OPEN_OK_NOT_FOUND 0x001 /* Do not error out if not found */
| > > > > > > > > > > > > > > | 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 |
db_begin_transaction();
db_multi_exec(
"ALTER TABLE repository.mlink ADD COLUMN pmid INTEGER DEFAULT 0;"
"ALTER TABLE repository.mlink ADD COLUMN isaux BOOLEAN DEFAULT 0;"
);
db_end_transaction(0);
}
/* Verify that the REMARK table exists. It was added on 2017-01-10.
*/
if( !db_table_exists("repository","remark") ){
db_multi_exec(
"CREATE TABLE repository.remark(\n"
" rid INTEGER PRIMARY KEY,\n" /* The Remark artifact in BLOB table */
" ctime TIMESTAMP,\n" /* Creation date. Julian day. */
" target TEXT,\n" /* UUID for check-in or name of branch */
" uid TEXT\n" /* Name of user who entered remark */
");\n"
"CREATE INDEX repository.remarkidx1 ON remark(target,ctime);"
);
}
}
/*
** Flags for the db_find_and_open_repository() function.
*/
#if INTERFACE
#define OPEN_OK_NOT_FOUND 0x001 /* Do not error out if not found */
|
| ︙ | ︙ |
Changes to src/event.c.
| ︙ | ︙ | |||
126 127 128 129 130 131 132 |
if( !zVerbose ){
zVerbose = P("detail"); /* deprecated */
}
verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
/* Extract the event content.
*/
| | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
if( !zVerbose ){
zVerbose = P("detail"); /* deprecated */
}
verboseFlag = (zVerbose!=0) && !is_false(zVerbose);
/* Extract the event content.
*/
pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
if( pTNote==0 ){
fossil_fatal("Object #%d is not a tech-note", rid);
}
zMimetype = wiki_filter_mimetypes(PD("mimetype",pTNote->zMimetype));
blob_init(&fullbody, pTNote->zWiki, -1);
blob_init(&title, 0, 0);
blob_init(&tail, 0, 0);
|
| ︙ | ︙ | |||
416 417 418 419 420 421 422 |
/* If editing an existing event, extract the key fields to use as
** a starting point for the edit.
*/
if( rid
&& (zBody==0 || zETime==0 || zComment==0 || zTags==0 || zMimetype==0)
){
Manifest *pTNote;
| | | | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
/* If editing an existing event, extract the key fields to use as
** a starting point for the edit.
*/
if( rid
&& (zBody==0 || zETime==0 || zComment==0 || zTags==0 || zMimetype==0)
){
Manifest *pTNote;
pTNote = manifest_get(rid, CFTYPE_TECHNOTE, 0);
if( pTNote && pTNote->type==CFTYPE_TECHNOTE ){
if( zBody==0 ) zBody = pTNote->zWiki;
if( zETime==0 ){
zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate);
}
if( zComment==0 ) zComment = pTNote->zComment;
if( zMimetype==0 ) zMimetype = pTNote->zMimetype;
}
|
| ︙ | ︙ |
Changes to src/manifest.c.
| ︙ | ︙ | |||
31 32 33 34 35 36 37 | #define CFTYPE_ANY 0 #define CFTYPE_MANIFEST 1 #define CFTYPE_CLUSTER 2 #define CFTYPE_CONTROL 3 #define CFTYPE_WIKI 4 #define CFTYPE_TICKET 5 #define CFTYPE_ATTACHMENT 6 | | > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #define CFTYPE_ANY 0 #define CFTYPE_MANIFEST 1 #define CFTYPE_CLUSTER 2 #define CFTYPE_CONTROL 3 #define CFTYPE_WIKI 4 #define CFTYPE_TICKET 5 #define CFTYPE_ATTACHMENT 6 #define CFTYPE_TECHNOTE 7 #define CFTYPE_REMARK 8 /* ** File permissions used by Fossil internally. */ #define PERM_REG 0 /* regular file */ #define PERM_EXE 1 /* executable */ #define PERM_LNK 2 /* symlink */ |
| ︙ | ︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | double rDate; /* Date and time from D card. 0.0 if no D card. */ char *zUser; /* Name of the user from the U card. */ char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ char *zWiki; /* Text of the wiki page. W card. */ char *zWikiTitle; /* Name of the wiki page. L card. */ char *zMimetype; /* Mime type of wiki or comment text. N card. */ double rEventDate; /* Date of an event. E card. */ char *zEventId; /* UUID for an event. E card. */ char *zTicketUuid; /* UUID for a ticket. K card. */ char *zAttachName; /* Filename of an attachment. A card. */ char *zAttachSrc; /* UUID of document being attached. A card. */ char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ int nFile; /* Number of F cards */ int nFileAlloc; /* Slots allocated in aFile[] */ | > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | double rDate; /* Date and time from D card. 0.0 if no D card. */ char *zUser; /* Name of the user from the U card. */ char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ char *zWiki; /* Text of the wiki page. W card. */ char *zWikiTitle; /* Name of the wiki page. L card. */ char *zMimetype; /* Mime type of wiki or comment text. N card. */ double rEventDate; /* Date of an event. E card. */ char *zRemTarget; /* Checkin or branch to which remark attached. G card */ char *zEventId; /* UUID for an event. E card. */ char *zTicketUuid; /* UUID for a ticket. K card. */ char *zAttachName; /* Filename of an attachment. A card. */ char *zAttachSrc; /* UUID of document being attached. A card. */ char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ int nFile; /* Number of F cards */ int nFileAlloc; /* Slots allocated in aFile[] */ |
| ︙ | ︙ | |||
569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
p->aFile[i].zPerm = zPerm;
p->aFile[i].zPrior = zPriorName;
if( i>0 && fossil_strcmp(p->aFile[i-1].zName, zName)>=0 ){
SYNTAX("incorrect F-card sort order");
}
break;
}
/*
** J <name> ?<value>?
**
** Specifies a name value pair for ticket. If the first character
** of <name> is "+" then the <value> is appended to any preexisting
** value. If <value> is omitted then it is understood to be an
| > > > > > > > > > > > > > > | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 |
p->aFile[i].zPerm = zPerm;
p->aFile[i].zPrior = zPriorName;
if( i>0 && fossil_strcmp(p->aFile[i-1].zName, zName)>=0 ){
SYNTAX("incorrect F-card sort order");
}
break;
}
/*
** G <uuid>
** G <branchname>
**
** The G card records the UUID of a check-in or the name of a branch
** to which a remark is attached. The branchname is fossil-encoded.
*/
case 'G': {
if( p->zRemTarget ) SYNTAX("more than one G-card");
p->zRemTarget = next_token(&x, &sz);
defossilize(p->zRemTarget);
break;
}
/*
** J <name> ?<value>?
**
** Specifies a name value pair for ticket. If the first character
** of <name> is "+" then the <value> is appended to any preexisting
** value. If <value> is omitted then it is understood to be an
|
| ︙ | ︙ | |||
763 764 765 766 767 768 769 |
if( zName==0 ) SYNTAX("missing name on T-card");
zUuid = next_token(&x, &sz);
if( zUuid==0 ) SYNTAX("missing UUID on T-card");
zValue = next_token(&x, 0);
if( zValue ) defossilize(zValue);
if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
/* A valid uuid */
| | | | 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
if( zName==0 ) SYNTAX("missing name on T-card");
zUuid = next_token(&x, &sz);
if( zUuid==0 ) SYNTAX("missing UUID on T-card");
zValue = next_token(&x, 0);
if( zValue ) defossilize(zValue);
if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){
/* A valid uuid */
if( p->zEventId ) SYNTAX("non-self-referential T-card in technote");
}else if( sz==1 && zUuid[0]=='*' ){
zUuid = 0;
hasSelfRefTag = 1;
if( p->zEventId && zName[0]!='+' ){
SYNTAX("propagating T-card in technote");
}
}else{
SYNTAX("malformed UUID on T-card");
}
defossilize(zName);
if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){
SYNTAX("T-card name does not begin with '-', '+', or '*'");
|
| ︙ | ︙ | |||
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 |
if( p->nCChild>0 ){
if( p->zAttachName
|| p->zBaseline
|| p->zComment
|| p->rDate>0.0
|| p->zEventId
|| p->nFile>0
|| p->nField>0
|| p->zTicketUuid
|| p->zWikiTitle
|| p->zMimetype
|| p->nParent>0
|| p->nCherrypick>0
|| p->zRepoCksum
|| p->nTag>0
|| p->zUser
|| p->zWiki
){
SYNTAX("cluster contains a card other than M- or Z-");
}
if( !seenZ ) SYNTAX("missing Z-card on cluster");
p->type = CFTYPE_CLUSTER;
}else if( p->zEventId ){
| > > > > > > > > > > > > > > | | | | | | | | | 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 |
if( p->nCChild>0 ){
if( p->zAttachName
|| p->zBaseline
|| p->zComment
|| p->rDate>0.0
|| p->zEventId
|| p->zRemTarget
|| p->nFile>0
|| p->nField>0
|| p->zTicketUuid
|| p->zWikiTitle
|| p->zMimetype
|| p->nParent>0
|| p->nCherrypick>0
|| p->zRepoCksum
|| p->nTag>0
|| p->zUser
|| p->zWiki
){
SYNTAX("cluster contains a card other than M- or Z-");
}
if( !seenZ ) SYNTAX("missing Z-card on cluster");
p->type = CFTYPE_CLUSTER;
}else if( p->zRemTarget ){
if( p->zAttachName ) SYNTAX("A-card in remark");
if( p->zBaseline ) SYNTAX("B-card in remark");
if( p->rDate<=0.0 ) SYNTAX("missing date on remark");
if( p->zEventId ) SYNTAX("E-card in remark");
if( p->nFile>0 ) SYNTAX("F-card in remark");
if( p->nField>0 ) SYNTAX("J-card in remark");
if( p->zTicketUuid ) SYNTAX("K-card in remark");
if( p->zWikiTitle!=0 ) SYNTAX("L-card in remark");
if( p->zRepoCksum ) SYNTAX("R-card in remark");
if( p->zWiki==0 ) SYNTAX("missing W-card on remark");
if( !seenZ ) SYNTAX("missing Z-card on event");
p->type = CFTYPE_REMARK;
}else if( p->zEventId ){
if( p->zAttachName ) SYNTAX("A-card in technote");
if( p->zBaseline ) SYNTAX("B-card in technote");
if( p->rDate<=0.0 ) SYNTAX("missing date on event");
if( p->nFile>0 ) SYNTAX("F-card in technote");
if( p->nField>0 ) SYNTAX("J-card in technote");
if( p->zTicketUuid ) SYNTAX("K-card in technote");
if( p->zWikiTitle!=0 ) SYNTAX("L-card in technote");
if( p->zRepoCksum ) SYNTAX("R-card in technote");
if( p->zWiki==0 ) SYNTAX("missing W-card on event");
if( !seenZ ) SYNTAX("missing Z-card on event");
p->type = CFTYPE_TECHNOTE;
}else if( p->zWiki!=0 || p->zWikiTitle!=0 ){
if( p->zAttachName ) SYNTAX("A-card in wiki");
if( p->zBaseline ) SYNTAX("B-card in wiki");
if( p->rDate<=0.0 ) SYNTAX("missing date on wiki");
if( p->nFile>0 ) SYNTAX("F-card in wiki");
if( p->nField>0 ) SYNTAX("J-card in wiki");
if( p->zTicketUuid ) SYNTAX("K-card in wiki");
|
| ︙ | ︙ | |||
2011 2012 2013 2014 2015 2016 2017 |
db_step(&del1);
db_reset(&del1);
}
}
}
if( p->type==CFTYPE_CONTROL
|| p->type==CFTYPE_MANIFEST
| | | 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 |
db_step(&del1);
db_reset(&del1);
}
}
}
if( p->type==CFTYPE_CONTROL
|| p->type==CFTYPE_MANIFEST
|| p->type==CFTYPE_TECHNOTE
){
for(i=0; i<p->nTag; i++){
int tid;
int type;
if( p->aTag[i].zUuid ){
tid = uuid_to_rid(p->aTag[i].zUuid, 1);
}else{
|
| ︙ | ︙ | |||
2079 2080 2081 2082 2083 2084 2085 |
p->rDate, rid, p->zUser, zComment,
TAG_BGCOLOR, rid,
TAG_USER, rid,
TAG_COMMENT, rid
);
fossil_free(zComment);
}
| | | 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 |
p->rDate, rid, p->zUser, zComment,
TAG_BGCOLOR, rid,
TAG_USER, rid,
TAG_COMMENT, rid
);
fossil_free(zComment);
}
if( p->type==CFTYPE_TECHNOTE ){
char *zTag = mprintf("event-%s", p->zEventId);
int tagid = tag_findid(zTag, 1);
int prior, subsequent;
int nWiki;
char zLength[40];
Stmt qatt;
while( fossil_isspace(p->zWiki[0]) ) p->zWiki++;
|
| ︙ | ︙ | |||
2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 |
db_multi_exec(
"REPLACE INTO event(type,mtime,objid,user,comment)"
"VALUES('g',%.17g,%d,%Q,%Q)",
p->rDate, rid, p->zUser, blob_str(&comment)+1
);
blob_reset(&comment);
}
db_end_transaction(0);
if( permitHooks ){
rc = xfer_run_common_script();
if( rc==TH_OK ){
rc = xfer_run_script(zScript, zUuid, 0);
}
}
| > > > > > | 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 |
db_multi_exec(
"REPLACE INTO event(type,mtime,objid,user,comment)"
"VALUES('g',%.17g,%d,%Q,%Q)",
p->rDate, rid, p->zUser, blob_str(&comment)+1
);
blob_reset(&comment);
}
if( p->type==CFTYPE_REMARK ){
db_multi_exec(
"INSERT OR IGNORE INTO remark(rid,target,ctime,uid)"
"VALUES(%d,%Q,%.17g,%Q)", p->rid, p->zRemTarget, p->rDate, p->zUser);
}
db_end_transaction(0);
if( permitHooks ){
rc = xfer_run_common_script();
if( rc==TH_OK ){
rc = xfer_run_script(zScript, zUuid, 0);
}
}
|
| ︙ | ︙ |
Changes to src/rebuild.c.
| ︙ | ︙ | |||
666 667 668 669 670 671 672 |
{ CFTYPE_ANY, "Artifacts:" },
{ CFTYPE_MANIFEST, "Manifests:" },
{ CFTYPE_CLUSTER, "Clusters:" },
{ CFTYPE_CONTROL, "Tags:" },
{ CFTYPE_WIKI, "Wikis:" },
{ CFTYPE_TICKET, "Tickets:" },
{ CFTYPE_ATTACHMENT,"Attachments:" },
| > | | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 |
{ CFTYPE_ANY, "Artifacts:" },
{ CFTYPE_MANIFEST, "Manifests:" },
{ CFTYPE_CLUSTER, "Clusters:" },
{ CFTYPE_CONTROL, "Tags:" },
{ CFTYPE_WIKI, "Wikis:" },
{ CFTYPE_TICKET, "Tickets:" },
{ CFTYPE_ATTACHMENT,"Attachments:" },
{ CFTYPE_TECHNOTE, "Technotes:" },
{ CFTYPE_REMARK, "Remarks:" },
};
int i;
int subtotal = 0;
for(i=0; i<count(aStat); i++){
int k = aStat[i].idx;
fossil_print("%-15s %6d\n", aStat[i].zLabel, g.parseCnt[k]);
if( k>0 ) subtotal += g.parseCnt[k];
|
| ︙ | ︙ |
Changes to src/schema.c.
| ︙ | ︙ | |||
43 44 45 46 47 48 49 | ** changes. The aux tables have an arbitrary version number (typically ** a date) which can change frequently. When the content schema changes, ** we have to execute special procedures to update the schema. When ** the aux schema changes, all we need to do is rebuild the database. */ #define CONTENT_SCHEMA "2" #define AUX_SCHEMA_MIN "2011-04-25 19:50" | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ** changes. The aux tables have an arbitrary version number (typically ** a date) which can change frequently. When the content schema changes, ** we have to execute special procedures to update the schema. When ** the aux schema changes, all we need to do is rebuild the database. */ #define CONTENT_SCHEMA "2" #define AUX_SCHEMA_MIN "2011-04-25 19:50" #define AUX_SCHEMA_MAX "2017-01-10" /* NB: Some features require the latest schema. Warning or error messages ** will appear if an older schema is used. However, the older schemas are ** adequate for many common functions. */ #endif /* INTERFACE */ |
| ︙ | ︙ | |||
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | @ -- Add as many fields as required below this line @ login TEXT, @ username TEXT, @ mimetype TEXT, @ icomment TEXT @ ); @ CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime); ; /* ** Predefined tagid values */ #if INTERFACE # define TAG_BGCOLOR 1 /* Set the background color for display */ # define TAG_COMMENT 2 /* The check-in comment */ | > > > > > > > > > > | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | @ -- Add as many fields as required below this line @ login TEXT, @ username TEXT, @ mimetype TEXT, @ icomment TEXT @ ); @ CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime); @ @ -- Each remark artifact makes a single entry in the Remark table. @ CREATE TABLE remark( @ rid INTEGER PRIMARY KEY, -- The Remark artifact in the BLOB table @ ctime TIMESTAMP, -- Creation date. Julian day. @ target TEXT, -- UUID for check-in or name of branch @ uid TEXT -- Name of user who entered this remark @ ); @ CREATE INDEX remarkidx1 ON remark(target,ctime); ; /* ** Predefined tagid values */ #if INTERFACE # define TAG_BGCOLOR 1 /* Set the background color for display */ # define TAG_COMMENT 2 /* The check-in comment */ |
| ︙ | ︙ |
Changes to src/wiki.c.
| ︙ | ︙ | |||
1267 1268 1269 1270 1271 1272 1273 |
if( (g.argc!=3) && (g.argc!=4) ){
usage("export ?FILE? --technote DATETIME|TECHNOTE-ID");
}
rid = wiki_technote_to_rid(zETime);
if ( rid==-1 ){
fossil_fatal("ambiguous tech note id: %s", zETime);
}
| | | 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
if( (g.argc!=3) && (g.argc!=4) ){
usage("export ?FILE? --technote DATETIME|TECHNOTE-ID");
}
rid = wiki_technote_to_rid(zETime);
if ( rid==-1 ){
fossil_fatal("ambiguous tech note id: %s", zETime);
}
if( (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0 ){
zBody = pWiki->zWiki;
}
if( zBody==0 ){
fossil_fatal("technote [%s] not found",zETime);
}
zFile = (g.argc==3) ? "-" : g.argv[3];
}
|
| ︙ | ︙ | |||
1318 1319 1320 1321 1322 1323 1324 |
);
if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))!=0
&& (pWiki->zMimetype && *pWiki->zMimetype) ){
zMimeType = pWiki->zMimetype;
}
}else{
rid = wiki_technote_to_rid(zETime);
| | | 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 |
);
if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_WIKI, 0))!=0
&& (pWiki->zMimetype && *pWiki->zMimetype) ){
zMimeType = pWiki->zMimetype;
}
}else{
rid = wiki_technote_to_rid(zETime);
if( rid>0 && (pWiki = manifest_get(rid, CFTYPE_TECHNOTE, 0))!=0
&& (pWiki->zMimetype && *pWiki->zMimetype) ){
zMimeType = pWiki->zMimetype;
}
}
}else{
zMimeType = wiki_filter_mimetypes(zMimeType);
}
|
| ︙ | ︙ |
Changes to www/fileformat.wiki.
| ︙ | ︙ | |||
42 43 44 45 46 47 48 49 50 | <li> [#manifest | Manifests] </li> <li> [#cluster | Clusters] </li> <li> [#ctrl | Control Artifacts] </li> <li> [#wikichng | Wiki Pages] </li> <li> [#tktchng | Ticket Changes] </li> <li> [#attachment | Attachments] </li> <li> [#event | TechNotes] </li> </ul> | > | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | <li> [#manifest | Manifests] </li> <li> [#cluster | Clusters] </li> <li> [#ctrl | Control Artifacts] </li> <li> [#wikichng | Wiki Pages] </li> <li> [#tktchng | Ticket Changes] </li> <li> [#attachment | Attachments] </li> <li> [#event | TechNotes] </li> <li> [#remark | Remarks] </li> </ul> These eight artifact types are described in the following sections. In the current implementation (as of 2009-01-25) the artifacts that make up a fossil repository are stored as delta- and zlib-compressed blobs in an <a href="http://www.sqlite.org/">SQLite</a> database. This is an implementation detail and might change in a future release. For the purpose of this article "file format" means the format of the artifacts, not how the artifacts are stored on disk. It is the artifact format that |
| ︙ | ︙ | |||
528 529 530 531 532 533 534 535 536 | A single W card provides wiki text for the document associated with the technote. The format of the W card is exactly the same as for a [#wikichng | wiki artifact]. The Z card is the required checksum over the rest of the artifact. <a name="summary"></a> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | A single W card provides wiki text for the document associated with the technote. The format of the W card is exactly the same as for a [#wikichng | wiki artifact]. The Z card is the required checksum over the rest of the artifact. <a name="remark"></a> <h2>8.0 Remarks</h2> A remark artifact holds textual remarks that are added to a check-in or branch. Remarks can hold expanded commentary about a check-in, a description about the purpose of a branch, notes from code-reviews, information about problems discovered in a check-in or branch, or other auxiliary textual information associated with a check-in or branch. The remark artifact is a new artifact added to this specification in early 2017. The following cards are allowed on a remark artifact: <blockquote> <b>D</b> <i>time-and-date-stamp</i><br /> <b>G</b> <i>checkin-or-branch</i><br /> <b>N</b> <i>mimetype</i><br /> <b>U</b> <i>user-name</i><br /> <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> <b>Z</b> <i>checksum</i> </blockquote> A single D card is required to give the date and time when the remark artifact was created. A single G card specifies the object to which the remark is attached. If the argment is a 40-character SHA1 hash, then it identifies a check-in. Otherwise, the argument is the name of a branch. Since branch names may whitespace, the argument to the G card is encoded in the same way as a C-card. The optional N card specifies the mimetype of the text of the remark that is contained in the W card. If the N card is omitted, then the W card text mimetype is assumed to be text/x-fossil, which is the Fossil wiki format. A single W card provides wiki text for the document associated with the remark. The format of the W card is exactly the same as for a [#wikichng | wiki artifact]. The optional U card gives name of the user who entered the remark. The Z card is the required checksum over the rest of the artifact. <a name="summary"></a> <h2>9.0 Card Summary</h2> The following table summarizes the various kinds of cards that appear on Fossil artifacts. A blank entry means that combination of card and artifact is not legal. A number or range of numbers indicates the number of times a card may (or must) appear in the corresponding artifact type. e.g. a value of 1 indicates a required unique card and 1+ indicates that one or more such cards are required. <table border=1 width="100%"> <tr> <th rowspan=2 valign=bottom>Card Format</th> <th colspan=8>Used By</th> </tr> <tr> <th>Manifest</th> <th>Cluster</th> <th>Control</th> <th>Wiki</th> <th>Ticket</th> <th>Attachment</th> <th>Technote</th> <th>Remark</th> </tr> <tr> <td><b>A</b> <i>filename</i> <i>target</i> ?<i>source</i>?</td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td> </td> <td> </td> </tr> <tr> <td><b>B</b> <i>baseline</i></td> <td align=center><b>0-1*</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr><td> </td><td colspan='8'>* = Required for delta manifests</td></tr> <tr> <td><b>C</b> <i>comment-text</i></td> <td align=center><b>1</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>0-1</b></td> <td align=center><b>0-1</b></td> <td> </td> </tr> <tr> <td><b>D</b> <i>date-time-stamp</i></td> <td align=center><b>1</b></td> <td> </td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> </tr> <tr> <td><b>E</b> <i>technote-time technote-id</i></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td> </td> </tr> <tr> <td><b>F</b> <i>filename</i> ?<i>uuid</i>? ?<i>permissions</i>? ?<i>oldname</i>?</td> <td align=center><b>0+</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>G</b> <i>checkin-or-branch</i></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> </tr> <tr> <td><b>J</b> <i>name</i> ?<i>value</i>?</td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>1+</b></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>K</b> <i>ticket-uuid</i></td> <td> </td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>L</b> <i>wiki-title</i></td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>M</b> <i>uuid</i></td> <td> </td> <td align=center><b>1+</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>N</b> <i>mimetype</i></td> <td align=center><b>0-1</b></td> <td> </td> <td> </td> <td align=center><b>0-1</b></td> <td> </td> <td align=center><b>0-1</b></td> <td align=center><b>0-1</b></td> <td align=center><b>0-1</b></td> </tr> <tr> <td><b>P</b> <i>uuid ...</i></td> <td align=center><b>0-1</b></td> <td> </td> <td> </td> <td align=center><b>0-1</b></td> <td> </td> <td> </td> <td align=center><b>0-1</b></td> <td> </td> </tr> <tr> <td><b>Q</b> (<b>+</b>|<b>-</b>)<i>uuid</i> ?<i>uuid</i>?</td> <td align=center><b>0+</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><b>R</b> <i>md5sum</i></td> <td align=center><b>0-1</b></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <tr> <td><b>T</b> (<b>+</b>|<b>*</b>|<b>-</b>)<i>tagname</i> <i>uuid</i> ?<i>value</i>?</td> <td align=center><b>0+</b></td> <td> </td> <td align=center><b>1+</b></td> <td> </td> <td> </td> <td> </td> <td align=center><b>0+</b></td> <td> </td> </tr> <tr> <td><b>U</b> <i>username</i></td> <td align=center><b>1</b></td> <td> </td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>0-1</b></td> <td align=center><b>0-1</b></td> <td align=center><b>0-1</b></td> </tr> <tr> <td><b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b></td> <td> </td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td> </td> <td> </td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> </tr> <tr> <td><b>Z</b> <i>md5sum</i></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> <td align=center><b>1</b></td> |
| ︙ | ︙ |