Fossil SCM
Add the N-card to control artifacts for wiki, checkins, events, and attachments, which opens up the possibility (not yet implemented) of being able to save wiki text, check-in comments, event text, and attachment descriptions in a variety of formats, such as text/plain, text/html, or text/x-markdown.
Commit
2336a2d86e3eb7b390a5fb344605fd88a6273c58
Parent
02f312e698ee699…
2 files changed
+16
+31
-1
+16
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -68,10 +68,11 @@ | ||
| 68 | 68 | double rDate; /* Date and time from D card. 0.0 if no D card. */ |
| 69 | 69 | char *zUser; /* Name of the user from the U card. */ |
| 70 | 70 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 71 | 71 | char *zWiki; /* Text of the wiki page. W card. */ |
| 72 | 72 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 73 | + char *zMimetype; /* Mime type of wiki or comment text. N card. */ | |
| 73 | 74 | double rEventDate; /* Date of an event. E card. */ |
| 74 | 75 | char *zEventId; /* UUID for an event. E card. */ |
| 75 | 76 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 76 | 77 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 77 | 78 | char *zAttachSrc; /* UUID of document being attached. A card. */ |
| @@ -642,10 +643,22 @@ | ||
| 642 | 643 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 643 | 644 | SYNTAX("M-card in the wrong order"); |
| 644 | 645 | } |
| 645 | 646 | break; |
| 646 | 647 | } |
| 648 | + | |
| 649 | + /* | |
| 650 | + ** N <uuid> | |
| 651 | + ** | |
| 652 | + ** An N-line identifies the mimetype of wiki or comment text. | |
| 653 | + */ | |
| 654 | + case 'N': { | |
| 655 | + if( p->zMimetype!=0 ) SYNTAX("more than one N-card"); | |
| 656 | + p->zMimetype = next_token(&x,0); | |
| 657 | + if( p->zMimetype==0 ) SYNTAX("missing mimetype on N-card"); | |
| 658 | + break; | |
| 659 | + } | |
| 647 | 660 | |
| 648 | 661 | /* |
| 649 | 662 | ** P <uuid> ... |
| 650 | 663 | ** |
| 651 | 664 | ** Specify one or more other artifacts where are the parents of |
| @@ -858,10 +871,11 @@ | ||
| 858 | 871 | || p->zTicketUuid |
| 859 | 872 | || p->zWiki |
| 860 | 873 | || p->zWikiTitle |
| 861 | 874 | || p->zEventId |
| 862 | 875 | || p->zAttachName |
| 876 | + || p->zMimetype | |
| 863 | 877 | ){ |
| 864 | 878 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 865 | 879 | } |
| 866 | 880 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 867 | 881 | p->type = CFTYPE_CLUSTER; |
| @@ -873,10 +887,11 @@ | ||
| 873 | 887 | if( p->nCChild>0 ) SYNTAX("M-card in ticket"); |
| 874 | 888 | if( p->nTag>0 ) SYNTAX("T-card in ticket"); |
| 875 | 889 | if( p->zTicketUuid==0 ) SYNTAX("missing K-card in ticket"); |
| 876 | 890 | if( p->zUser==0 ) SYNTAX("missing U-card in ticket"); |
| 877 | 891 | if( p->zAttachName ) SYNTAX("A-card in ticket"); |
| 892 | + if( p->zMimetype) SYNTAX("N-card in ticket"); | |
| 878 | 893 | if( !seenZ ) SYNTAX("missing Z-card in ticket"); |
| 879 | 894 | p->type = CFTYPE_TICKET; |
| 880 | 895 | }else if( p->zEventId ){ |
| 881 | 896 | if( p->rDate<=0.0 ) SYNTAX("missing date for event"); |
| 882 | 897 | if( p->nCChild>0 ) SYNTAX("M-card in event"); |
| @@ -903,10 +918,11 @@ | ||
| 903 | 918 | if( p->rDate<=0.0 ) SYNTAX("date missing on tag"); |
| 904 | 919 | if( p->nParent>0 ) SYNTAX("P-card on tag"); |
| 905 | 920 | if( p->zWikiTitle ) SYNTAX("L-card on tag"); |
| 906 | 921 | if( p->zTicketUuid ) SYNTAX("K-card in tag"); |
| 907 | 922 | if( p->zAttachName ) SYNTAX("A-card in tag"); |
| 923 | + if( p->zMimetype ) SYNTAX("N-card in tag"); | |
| 908 | 924 | if( !seenZ ) SYNTAX("missing Z-card on tag"); |
| 909 | 925 | p->type = CFTYPE_CONTROL; |
| 910 | 926 | }else if( p->zAttachName ){ |
| 911 | 927 | if( p->nCChild>0 ) SYNTAX("M-card in attachment"); |
| 912 | 928 | if( p->rDate<=0.0 ) SYNTAX("missing date in attachment"); |
| 913 | 929 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -68,10 +68,11 @@ | |
| 68 | double rDate; /* Date and time from D card. 0.0 if no D card. */ |
| 69 | char *zUser; /* Name of the user from the U card. */ |
| 70 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 71 | char *zWiki; /* Text of the wiki page. W card. */ |
| 72 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 73 | double rEventDate; /* Date of an event. E card. */ |
| 74 | char *zEventId; /* UUID for an event. E card. */ |
| 75 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 76 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 77 | char *zAttachSrc; /* UUID of document being attached. A card. */ |
| @@ -642,10 +643,22 @@ | |
| 642 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 643 | SYNTAX("M-card in the wrong order"); |
| 644 | } |
| 645 | break; |
| 646 | } |
| 647 | |
| 648 | /* |
| 649 | ** P <uuid> ... |
| 650 | ** |
| 651 | ** Specify one or more other artifacts where are the parents of |
| @@ -858,10 +871,11 @@ | |
| 858 | || p->zTicketUuid |
| 859 | || p->zWiki |
| 860 | || p->zWikiTitle |
| 861 | || p->zEventId |
| 862 | || p->zAttachName |
| 863 | ){ |
| 864 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 865 | } |
| 866 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 867 | p->type = CFTYPE_CLUSTER; |
| @@ -873,10 +887,11 @@ | |
| 873 | if( p->nCChild>0 ) SYNTAX("M-card in ticket"); |
| 874 | if( p->nTag>0 ) SYNTAX("T-card in ticket"); |
| 875 | if( p->zTicketUuid==0 ) SYNTAX("missing K-card in ticket"); |
| 876 | if( p->zUser==0 ) SYNTAX("missing U-card in ticket"); |
| 877 | if( p->zAttachName ) SYNTAX("A-card in ticket"); |
| 878 | if( !seenZ ) SYNTAX("missing Z-card in ticket"); |
| 879 | p->type = CFTYPE_TICKET; |
| 880 | }else if( p->zEventId ){ |
| 881 | if( p->rDate<=0.0 ) SYNTAX("missing date for event"); |
| 882 | if( p->nCChild>0 ) SYNTAX("M-card in event"); |
| @@ -903,10 +918,11 @@ | |
| 903 | if( p->rDate<=0.0 ) SYNTAX("date missing on tag"); |
| 904 | if( p->nParent>0 ) SYNTAX("P-card on tag"); |
| 905 | if( p->zWikiTitle ) SYNTAX("L-card on tag"); |
| 906 | if( p->zTicketUuid ) SYNTAX("K-card in tag"); |
| 907 | if( p->zAttachName ) SYNTAX("A-card in tag"); |
| 908 | if( !seenZ ) SYNTAX("missing Z-card on tag"); |
| 909 | p->type = CFTYPE_CONTROL; |
| 910 | }else if( p->zAttachName ){ |
| 911 | if( p->nCChild>0 ) SYNTAX("M-card in attachment"); |
| 912 | if( p->rDate<=0.0 ) SYNTAX("missing date in attachment"); |
| 913 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -68,10 +68,11 @@ | |
| 68 | double rDate; /* Date and time from D card. 0.0 if no D card. */ |
| 69 | char *zUser; /* Name of the user from the U card. */ |
| 70 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 71 | char *zWiki; /* Text of the wiki page. W card. */ |
| 72 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 73 | char *zMimetype; /* Mime type of wiki or comment text. N card. */ |
| 74 | double rEventDate; /* Date of an event. E card. */ |
| 75 | char *zEventId; /* UUID for an event. E card. */ |
| 76 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 77 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 78 | char *zAttachSrc; /* UUID of document being attached. A card. */ |
| @@ -642,10 +643,22 @@ | |
| 643 | if( i>0 && fossil_strcmp(p->azCChild[i-1], zUuid)>=0 ){ |
| 644 | SYNTAX("M-card in the wrong order"); |
| 645 | } |
| 646 | break; |
| 647 | } |
| 648 | |
| 649 | /* |
| 650 | ** N <uuid> |
| 651 | ** |
| 652 | ** An N-line identifies the mimetype of wiki or comment text. |
| 653 | */ |
| 654 | case 'N': { |
| 655 | if( p->zMimetype!=0 ) SYNTAX("more than one N-card"); |
| 656 | p->zMimetype = next_token(&x,0); |
| 657 | if( p->zMimetype==0 ) SYNTAX("missing mimetype on N-card"); |
| 658 | break; |
| 659 | } |
| 660 | |
| 661 | /* |
| 662 | ** P <uuid> ... |
| 663 | ** |
| 664 | ** Specify one or more other artifacts where are the parents of |
| @@ -858,10 +871,11 @@ | |
| 871 | || p->zTicketUuid |
| 872 | || p->zWiki |
| 873 | || p->zWikiTitle |
| 874 | || p->zEventId |
| 875 | || p->zAttachName |
| 876 | || p->zMimetype |
| 877 | ){ |
| 878 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 879 | } |
| 880 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 881 | p->type = CFTYPE_CLUSTER; |
| @@ -873,10 +887,11 @@ | |
| 887 | if( p->nCChild>0 ) SYNTAX("M-card in ticket"); |
| 888 | if( p->nTag>0 ) SYNTAX("T-card in ticket"); |
| 889 | if( p->zTicketUuid==0 ) SYNTAX("missing K-card in ticket"); |
| 890 | if( p->zUser==0 ) SYNTAX("missing U-card in ticket"); |
| 891 | if( p->zAttachName ) SYNTAX("A-card in ticket"); |
| 892 | if( p->zMimetype) SYNTAX("N-card in ticket"); |
| 893 | if( !seenZ ) SYNTAX("missing Z-card in ticket"); |
| 894 | p->type = CFTYPE_TICKET; |
| 895 | }else if( p->zEventId ){ |
| 896 | if( p->rDate<=0.0 ) SYNTAX("missing date for event"); |
| 897 | if( p->nCChild>0 ) SYNTAX("M-card in event"); |
| @@ -903,10 +918,11 @@ | |
| 918 | if( p->rDate<=0.0 ) SYNTAX("date missing on tag"); |
| 919 | if( p->nParent>0 ) SYNTAX("P-card on tag"); |
| 920 | if( p->zWikiTitle ) SYNTAX("L-card on tag"); |
| 921 | if( p->zTicketUuid ) SYNTAX("K-card in tag"); |
| 922 | if( p->zAttachName ) SYNTAX("A-card in tag"); |
| 923 | if( p->zMimetype ) SYNTAX("N-card in tag"); |
| 924 | if( !seenZ ) SYNTAX("missing Z-card on tag"); |
| 925 | p->type = CFTYPE_CONTROL; |
| 926 | }else if( p->zAttachName ){ |
| 927 | if( p->nCChild>0 ) SYNTAX("M-card in attachment"); |
| 928 | if( p->rDate<=0.0 ) SYNTAX("missing date in attachment"); |
| 929 |
+31
-1
| --- www/fileformat.wiki | ||
| +++ www/fileformat.wiki | ||
| @@ -99,10 +99,11 @@ | ||
| 99 | 99 | <blockquote> |
| 100 | 100 | <b>B</b> <i>baseline-manifest</i><br> |
| 101 | 101 | <b>C</b> <i>checkin-comment</i><br> |
| 102 | 102 | <b>D</b> <i>time-and-date-stamp</i><br> |
| 103 | 103 | <b>F</b> <i>filename</i> <i>SHA1-hash</i> <i>permissions</i> <i>old-name</i><br> |
| 104 | +<b>N</b> <i>mimetype</i> | |
| 104 | 105 | <b>P</b> <i>SHA1-hash</i>+<br> |
| 105 | 106 | <b>Q</b> (<b>+</b>|<b>-</b>)<i>SHA1-hash ?SHA1-hash?</i><br> |
| 106 | 107 | <b>R</b> <i>repository-checksum</i><br> |
| 107 | 108 | <b>T</b> (<b>+</b>|<b>-</b>|<b>*</b>)<i>tag-name <b>*</b> ?value?</i><br> |
| 108 | 109 | <b>U</b> <i>user-login</i><br> |
| @@ -158,10 +159,14 @@ | ||
| 158 | 159 | if desired but is optional. The file format might be extended with |
| 159 | 160 | new permission letters in the future. |
| 160 | 161 | The optional 4th argument is the name of the same file as it existed in |
| 161 | 162 | the parent check-in. If the name of the file is unchanged from its |
| 162 | 163 | parent, then the 4th argument is omitted. |
| 164 | + | |
| 165 | +A manifest has zero or one N-cards. The N-card specifies the mimetype for the | |
| 166 | +text in the comment of the C-card. If the N-card is omitted, a default mimetype | |
| 167 | +is used. | |
| 163 | 168 | |
| 164 | 169 | A manifest has zero or one P-cards. Most manifests have one P-card. |
| 165 | 170 | The P-card has a varying number of arguments that |
| 166 | 171 | defines other manifests from which the current manifest |
| 167 | 172 | is derived. Each argument is an 40-character lowercase |
| @@ -343,19 +348,23 @@ | ||
| 343 | 348 | the following card types: |
| 344 | 349 | |
| 345 | 350 | <blockquote> |
| 346 | 351 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 347 | 352 | <b>L</b> <i>wiki-title</i><br /> |
| 353 | +<b>N</b> <i>mimetype</i><br /> | |
| 348 | 354 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 349 | 355 | <b>U</b> <i>user-name</i><br /> |
| 350 | 356 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 351 | 357 | <b>Z</b> <i>checksum</i> |
| 352 | 358 | </blockquote> |
| 353 | 359 | |
| 354 | 360 | The D card is the date and time when the wiki page was edited. |
| 355 | 361 | The P card specifies the parent wiki pages, if any. The L card |
| 356 | -gives the name of the wiki page. The U card specifies the login | |
| 362 | +gives the name of the wiki page. The optional N card specifies | |
| 363 | +the mimetype of the wiki text. If the N card is omitted, the | |
| 364 | +mimetype is assumed to be text/x-fossil. | |
| 365 | +The U card specifies the login | |
| 357 | 366 | of the user who made this edit to the wiki page. The Z card is |
| 358 | 367 | the usual checksum over the either artifact and is required. |
| 359 | 368 | |
| 360 | 369 | The W card is used to specify the text of the wiki page. The |
| 361 | 370 | argument to the W card is an integer which is the number of bytes |
| @@ -422,10 +431,11 @@ | ||
| 422 | 431 | |
| 423 | 432 | <blockquote> |
| 424 | 433 | <b>A</b> <i>filename target</i> ?<i>source</i>?<br /> |
| 425 | 434 | <b>C</b> <i>comment</i><br /> |
| 426 | 435 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 436 | +<b>N</b> <i>mimetype</i><br /> | |
| 427 | 437 | <b>U</b> <i>user-name</i><br /> |
| 428 | 438 | <b>Z</b> <i>checksum</i> |
| 429 | 439 | </blockquote> |
| 430 | 440 | |
| 431 | 441 | The A card specifies a filename for the attachment in its first argument. |
| @@ -438,10 +448,14 @@ | ||
| 438 | 448 | The C card is an optional comment describing what the attachment is about. |
| 439 | 449 | The C card is optional, but there can only be one. |
| 440 | 450 | |
| 441 | 451 | A single D card is required to give the date and time when the attachment |
| 442 | 452 | was applied. |
| 453 | + | |
| 454 | +There may be zero or one N cards. The N card specifies the mimetype of the | |
| 455 | +comment text provided in the C card. If the N card is omitted, the C card | |
| 456 | +mimetype is taken to be text/plain. | |
| 443 | 457 | |
| 444 | 458 | A single U card gives the name of the user to added the attachment. |
| 445 | 459 | If an attachment is added anonymously, then the U card may be omitted. |
| 446 | 460 | |
| 447 | 461 | The Z card is the usual checksum over the rest of the attachment artifact. |
| @@ -459,10 +473,11 @@ | ||
| 459 | 473 | |
| 460 | 474 | <blockquote> |
| 461 | 475 | <b>C</b> <i>comment</i><br> |
| 462 | 476 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 463 | 477 | <b>E</b> <i>event-time</i> <i>event-id</i><br /> |
| 478 | +<b>N</b> <i>mimetype</i><br /> | |
| 464 | 479 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 465 | 480 | <b>T</b> <b>+</b><i>tag-name</i> <b>*</b> <i>value</i><br /> |
| 466 | 481 | <b>U</b> <i>user-name</i><br /> |
| 467 | 482 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 468 | 483 | <b>Z</b> <i>checksum</i> |
| @@ -478,10 +493,15 @@ | ||
| 478 | 493 | A single E card gives the time of the event (the point on the timeline |
| 479 | 494 | where the event is displayed) and a unique identifier for the event. |
| 480 | 495 | When there are multiple artifacts with the same event-id, the one with |
| 481 | 496 | the most recent D card is the only one used. The event-id must be a |
| 482 | 497 | 40-character lower-case hexadecimal string. |
| 498 | + | |
| 499 | +The optional N card specifies the mimetype of the text of the event | |
| 500 | +that is contained in the W card. If the N card is omitted, then the | |
| 501 | +W card text mimetype is assumed to be text/x-fossil, which is the | |
| 502 | +Fossil wiki format. | |
| 483 | 503 | |
| 484 | 504 | The option P card specifies a prior event with the same event-id from |
| 485 | 505 | which the current event is an edit. The P card is a hint to the system |
| 486 | 506 | that it might be space efficient to store one event as a delta of the |
| 487 | 507 | other. |
| @@ -628,10 +648,20 @@ | ||
| 628 | 648 | <td align=center> </td> |
| 629 | 649 | <td align=center> </td> |
| 630 | 650 | <td align=center> </td> |
| 631 | 651 | <td align=center> </td> |
| 632 | 652 | </tr> |
| 653 | +<tr> | |
| 654 | +<td><b>N</b> <i>mimetype</i></td> | |
| 655 | +<td align=center><b>X</b></td> | |
| 656 | +<td align=center> </td> | |
| 657 | +<td align=center> </td> | |
| 658 | +<td align=center><b>X</b></td> | |
| 659 | +<td align=center> </td> | |
| 660 | +<td align=center><b>X</b></td> | |
| 661 | +<td align=center><b>X</b></td> | |
| 662 | +</tr> | |
| 633 | 663 | <tr> |
| 634 | 664 | <td><b>P</b> <i>uuid ...</i></td> |
| 635 | 665 | <td align=center><b>X</b></td> |
| 636 | 666 | <td align=center> </td> |
| 637 | 667 | <td align=center> </td> |
| 638 | 668 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -99,10 +99,11 @@ | |
| 99 | <blockquote> |
| 100 | <b>B</b> <i>baseline-manifest</i><br> |
| 101 | <b>C</b> <i>checkin-comment</i><br> |
| 102 | <b>D</b> <i>time-and-date-stamp</i><br> |
| 103 | <b>F</b> <i>filename</i> <i>SHA1-hash</i> <i>permissions</i> <i>old-name</i><br> |
| 104 | <b>P</b> <i>SHA1-hash</i>+<br> |
| 105 | <b>Q</b> (<b>+</b>|<b>-</b>)<i>SHA1-hash ?SHA1-hash?</i><br> |
| 106 | <b>R</b> <i>repository-checksum</i><br> |
| 107 | <b>T</b> (<b>+</b>|<b>-</b>|<b>*</b>)<i>tag-name <b>*</b> ?value?</i><br> |
| 108 | <b>U</b> <i>user-login</i><br> |
| @@ -158,10 +159,14 @@ | |
| 158 | if desired but is optional. The file format might be extended with |
| 159 | new permission letters in the future. |
| 160 | The optional 4th argument is the name of the same file as it existed in |
| 161 | the parent check-in. If the name of the file is unchanged from its |
| 162 | parent, then the 4th argument is omitted. |
| 163 | |
| 164 | A manifest has zero or one P-cards. Most manifests have one P-card. |
| 165 | The P-card has a varying number of arguments that |
| 166 | defines other manifests from which the current manifest |
| 167 | is derived. Each argument is an 40-character lowercase |
| @@ -343,19 +348,23 @@ | |
| 343 | the following card types: |
| 344 | |
| 345 | <blockquote> |
| 346 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 347 | <b>L</b> <i>wiki-title</i><br /> |
| 348 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 349 | <b>U</b> <i>user-name</i><br /> |
| 350 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 351 | <b>Z</b> <i>checksum</i> |
| 352 | </blockquote> |
| 353 | |
| 354 | The D card is the date and time when the wiki page was edited. |
| 355 | The P card specifies the parent wiki pages, if any. The L card |
| 356 | gives the name of the wiki page. The U card specifies the login |
| 357 | of the user who made this edit to the wiki page. The Z card is |
| 358 | the usual checksum over the either artifact and is required. |
| 359 | |
| 360 | The W card is used to specify the text of the wiki page. The |
| 361 | argument to the W card is an integer which is the number of bytes |
| @@ -422,10 +431,11 @@ | |
| 422 | |
| 423 | <blockquote> |
| 424 | <b>A</b> <i>filename target</i> ?<i>source</i>?<br /> |
| 425 | <b>C</b> <i>comment</i><br /> |
| 426 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 427 | <b>U</b> <i>user-name</i><br /> |
| 428 | <b>Z</b> <i>checksum</i> |
| 429 | </blockquote> |
| 430 | |
| 431 | The A card specifies a filename for the attachment in its first argument. |
| @@ -438,10 +448,14 @@ | |
| 438 | The C card is an optional comment describing what the attachment is about. |
| 439 | The C card is optional, but there can only be one. |
| 440 | |
| 441 | A single D card is required to give the date and time when the attachment |
| 442 | was applied. |
| 443 | |
| 444 | A single U card gives the name of the user to added the attachment. |
| 445 | If an attachment is added anonymously, then the U card may be omitted. |
| 446 | |
| 447 | The Z card is the usual checksum over the rest of the attachment artifact. |
| @@ -459,10 +473,11 @@ | |
| 459 | |
| 460 | <blockquote> |
| 461 | <b>C</b> <i>comment</i><br> |
| 462 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 463 | <b>E</b> <i>event-time</i> <i>event-id</i><br /> |
| 464 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 465 | <b>T</b> <b>+</b><i>tag-name</i> <b>*</b> <i>value</i><br /> |
| 466 | <b>U</b> <i>user-name</i><br /> |
| 467 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 468 | <b>Z</b> <i>checksum</i> |
| @@ -478,10 +493,15 @@ | |
| 478 | A single E card gives the time of the event (the point on the timeline |
| 479 | where the event is displayed) and a unique identifier for the event. |
| 480 | When there are multiple artifacts with the same event-id, the one with |
| 481 | the most recent D card is the only one used. The event-id must be a |
| 482 | 40-character lower-case hexadecimal string. |
| 483 | |
| 484 | The option P card specifies a prior event with the same event-id from |
| 485 | which the current event is an edit. The P card is a hint to the system |
| 486 | that it might be space efficient to store one event as a delta of the |
| 487 | other. |
| @@ -628,10 +648,20 @@ | |
| 628 | <td align=center> </td> |
| 629 | <td align=center> </td> |
| 630 | <td align=center> </td> |
| 631 | <td align=center> </td> |
| 632 | </tr> |
| 633 | <tr> |
| 634 | <td><b>P</b> <i>uuid ...</i></td> |
| 635 | <td align=center><b>X</b></td> |
| 636 | <td align=center> </td> |
| 637 | <td align=center> </td> |
| 638 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -99,10 +99,11 @@ | |
| 99 | <blockquote> |
| 100 | <b>B</b> <i>baseline-manifest</i><br> |
| 101 | <b>C</b> <i>checkin-comment</i><br> |
| 102 | <b>D</b> <i>time-and-date-stamp</i><br> |
| 103 | <b>F</b> <i>filename</i> <i>SHA1-hash</i> <i>permissions</i> <i>old-name</i><br> |
| 104 | <b>N</b> <i>mimetype</i> |
| 105 | <b>P</b> <i>SHA1-hash</i>+<br> |
| 106 | <b>Q</b> (<b>+</b>|<b>-</b>)<i>SHA1-hash ?SHA1-hash?</i><br> |
| 107 | <b>R</b> <i>repository-checksum</i><br> |
| 108 | <b>T</b> (<b>+</b>|<b>-</b>|<b>*</b>)<i>tag-name <b>*</b> ?value?</i><br> |
| 109 | <b>U</b> <i>user-login</i><br> |
| @@ -158,10 +159,14 @@ | |
| 159 | if desired but is optional. The file format might be extended with |
| 160 | new permission letters in the future. |
| 161 | The optional 4th argument is the name of the same file as it existed in |
| 162 | the parent check-in. If the name of the file is unchanged from its |
| 163 | parent, then the 4th argument is omitted. |
| 164 | |
| 165 | A manifest has zero or one N-cards. The N-card specifies the mimetype for the |
| 166 | text in the comment of the C-card. If the N-card is omitted, a default mimetype |
| 167 | is used. |
| 168 | |
| 169 | A manifest has zero or one P-cards. Most manifests have one P-card. |
| 170 | The P-card has a varying number of arguments that |
| 171 | defines other manifests from which the current manifest |
| 172 | is derived. Each argument is an 40-character lowercase |
| @@ -343,19 +348,23 @@ | |
| 348 | the following card types: |
| 349 | |
| 350 | <blockquote> |
| 351 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 352 | <b>L</b> <i>wiki-title</i><br /> |
| 353 | <b>N</b> <i>mimetype</i><br /> |
| 354 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 355 | <b>U</b> <i>user-name</i><br /> |
| 356 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 357 | <b>Z</b> <i>checksum</i> |
| 358 | </blockquote> |
| 359 | |
| 360 | The D card is the date and time when the wiki page was edited. |
| 361 | The P card specifies the parent wiki pages, if any. The L card |
| 362 | gives the name of the wiki page. The optional N card specifies |
| 363 | the mimetype of the wiki text. If the N card is omitted, the |
| 364 | mimetype is assumed to be text/x-fossil. |
| 365 | The U card specifies the login |
| 366 | of the user who made this edit to the wiki page. The Z card is |
| 367 | the usual checksum over the either artifact and is required. |
| 368 | |
| 369 | The W card is used to specify the text of the wiki page. The |
| 370 | argument to the W card is an integer which is the number of bytes |
| @@ -422,10 +431,11 @@ | |
| 431 | |
| 432 | <blockquote> |
| 433 | <b>A</b> <i>filename target</i> ?<i>source</i>?<br /> |
| 434 | <b>C</b> <i>comment</i><br /> |
| 435 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 436 | <b>N</b> <i>mimetype</i><br /> |
| 437 | <b>U</b> <i>user-name</i><br /> |
| 438 | <b>Z</b> <i>checksum</i> |
| 439 | </blockquote> |
| 440 | |
| 441 | The A card specifies a filename for the attachment in its first argument. |
| @@ -438,10 +448,14 @@ | |
| 448 | The C card is an optional comment describing what the attachment is about. |
| 449 | The C card is optional, but there can only be one. |
| 450 | |
| 451 | A single D card is required to give the date and time when the attachment |
| 452 | was applied. |
| 453 | |
| 454 | There may be zero or one N cards. The N card specifies the mimetype of the |
| 455 | comment text provided in the C card. If the N card is omitted, the C card |
| 456 | mimetype is taken to be text/plain. |
| 457 | |
| 458 | A single U card gives the name of the user to added the attachment. |
| 459 | If an attachment is added anonymously, then the U card may be omitted. |
| 460 | |
| 461 | The Z card is the usual checksum over the rest of the attachment artifact. |
| @@ -459,10 +473,11 @@ | |
| 473 | |
| 474 | <blockquote> |
| 475 | <b>C</b> <i>comment</i><br> |
| 476 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 477 | <b>E</b> <i>event-time</i> <i>event-id</i><br /> |
| 478 | <b>N</b> <i>mimetype</i><br /> |
| 479 | <b>P</b> <i>parent-artifact-id</i>+<br /> |
| 480 | <b>T</b> <b>+</b><i>tag-name</i> <b>*</b> <i>value</i><br /> |
| 481 | <b>U</b> <i>user-name</i><br /> |
| 482 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 483 | <b>Z</b> <i>checksum</i> |
| @@ -478,10 +493,15 @@ | |
| 493 | A single E card gives the time of the event (the point on the timeline |
| 494 | where the event is displayed) and a unique identifier for the event. |
| 495 | When there are multiple artifacts with the same event-id, the one with |
| 496 | the most recent D card is the only one used. The event-id must be a |
| 497 | 40-character lower-case hexadecimal string. |
| 498 | |
| 499 | The optional N card specifies the mimetype of the text of the event |
| 500 | that is contained in the W card. If the N card is omitted, then the |
| 501 | W card text mimetype is assumed to be text/x-fossil, which is the |
| 502 | Fossil wiki format. |
| 503 | |
| 504 | The option P card specifies a prior event with the same event-id from |
| 505 | which the current event is an edit. The P card is a hint to the system |
| 506 | that it might be space efficient to store one event as a delta of the |
| 507 | other. |
| @@ -628,10 +648,20 @@ | |
| 648 | <td align=center> </td> |
| 649 | <td align=center> </td> |
| 650 | <td align=center> </td> |
| 651 | <td align=center> </td> |
| 652 | </tr> |
| 653 | <tr> |
| 654 | <td><b>N</b> <i>mimetype</i></td> |
| 655 | <td align=center><b>X</b></td> |
| 656 | <td align=center> </td> |
| 657 | <td align=center> </td> |
| 658 | <td align=center><b>X</b></td> |
| 659 | <td align=center> </td> |
| 660 | <td align=center><b>X</b></td> |
| 661 | <td align=center><b>X</b></td> |
| 662 | </tr> |
| 663 | <tr> |
| 664 | <td><b>P</b> <i>uuid ...</i></td> |
| 665 | <td align=center><b>X</b></td> |
| 666 | <td align=center> </td> |
| 667 | <td align=center> </td> |
| 668 |