Fossil SCM
Expand the scope of the new Remark artifact so that it may be attached to either a check-in or a branch.
Commit
b78d1a67b732c9200515b9ff973c8518b69c2ec6
Parent
290404ec37322aa…
2 files changed
+6
-8
+14
-8
+6
-8
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -78,11 +78,11 @@ | ||
| 78 | 78 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 79 | 79 | char *zWiki; /* Text of the wiki page. W card. */ |
| 80 | 80 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 81 | 81 | char *zMimetype; /* Mime type of wiki or comment text. N card. */ |
| 82 | 82 | double rEventDate; /* Date of an event. E card. */ |
| 83 | - char *zRemCkin; /* UUID of checkin to which remark attached. G card */ | |
| 83 | + char *zRemTarget; /* Checkin or branch to which remark attached. G card */ | |
| 84 | 84 | char *zEventId; /* UUID for an event. E card. */ |
| 85 | 85 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 86 | 86 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 87 | 87 | char *zAttachSrc; /* UUID of document being attached. A card. */ |
| 88 | 88 | char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ |
| @@ -581,15 +581,13 @@ | ||
| 581 | 581 | ** |
| 582 | 582 | ** The G card records the UUID of a check-in to which a remark is |
| 583 | 583 | ** attached. |
| 584 | 584 | */ |
| 585 | 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 | - } | |
| 586 | + if( p->zRemTarget ) SYNTAX("more than one G-card"); | |
| 587 | + p->zRemTarget = next_token(&x, &sz); | |
| 588 | + defossilize(p->zRemTarget); | |
| 591 | 589 | break; |
| 592 | 590 | } |
| 593 | 591 | |
| 594 | 592 | /* |
| 595 | 593 | ** J <name> ?<value>? |
| @@ -897,11 +895,11 @@ | ||
| 897 | 895 | if( p->zAttachName |
| 898 | 896 | || p->zBaseline |
| 899 | 897 | || p->zComment |
| 900 | 898 | || p->rDate>0.0 |
| 901 | 899 | || p->zEventId |
| 902 | - || p->zRemCkin | |
| 900 | + || p->zRemTarget | |
| 903 | 901 | || p->nFile>0 |
| 904 | 902 | || p->nField>0 |
| 905 | 903 | || p->zTicketUuid |
| 906 | 904 | || p->zWikiTitle |
| 907 | 905 | || p->zMimetype |
| @@ -914,11 +912,11 @@ | ||
| 914 | 912 | ){ |
| 915 | 913 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 916 | 914 | } |
| 917 | 915 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 918 | 916 | p->type = CFTYPE_CLUSTER; |
| 919 | - }else if( p->zRemCkin ){ | |
| 917 | + }else if( p->zRemTarget ){ | |
| 920 | 918 | if( p->zAttachName ) SYNTAX("A-card in remark"); |
| 921 | 919 | if( p->zBaseline ) SYNTAX("B-card in remark"); |
| 922 | 920 | if( p->rDate<=0.0 ) SYNTAX("missing date on remark"); |
| 923 | 921 | if( p->zEventId ) SYNTAX("E-card in remark"); |
| 924 | 922 | if( p->nFile>0 ) SYNTAX("F-card in remark"); |
| 925 | 923 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -78,11 +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 */ |
| @@ -581,15 +581,13 @@ | |
| 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>? |
| @@ -897,11 +895,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 |
| @@ -914,11 +912,11 @@ | |
| 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 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -78,11 +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 *zRemTarget; /* Checkin or branch 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 */ |
| @@ -581,15 +581,13 @@ | |
| 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->zRemTarget ) SYNTAX("more than one G-card"); |
| 587 | p->zRemTarget = next_token(&x, &sz); |
| 588 | defossilize(p->zRemTarget); |
| 589 | break; |
| 590 | } |
| 591 | |
| 592 | /* |
| 593 | ** J <name> ?<value>? |
| @@ -897,11 +895,11 @@ | |
| 895 | if( p->zAttachName |
| 896 | || p->zBaseline |
| 897 | || p->zComment |
| 898 | || p->rDate>0.0 |
| 899 | || p->zEventId |
| 900 | || p->zRemTarget |
| 901 | || p->nFile>0 |
| 902 | || p->nField>0 |
| 903 | || p->zTicketUuid |
| 904 | || p->zWikiTitle |
| 905 | || p->zMimetype |
| @@ -914,11 +912,11 @@ | |
| 912 | ){ |
| 913 | SYNTAX("cluster contains a card other than M- or Z-"); |
| 914 | } |
| 915 | if( !seenZ ) SYNTAX("missing Z-card on cluster"); |
| 916 | p->type = CFTYPE_CLUSTER; |
| 917 | }else if( p->zRemTarget ){ |
| 918 | if( p->zAttachName ) SYNTAX("A-card in remark"); |
| 919 | if( p->zBaseline ) SYNTAX("B-card in remark"); |
| 920 | if( p->rDate<=0.0 ) SYNTAX("missing date on remark"); |
| 921 | if( p->zEventId ) SYNTAX("E-card in remark"); |
| 922 | if( p->nFile>0 ) SYNTAX("F-card in remark"); |
| 923 |
+14
-8
| --- www/fileformat.wiki | ||
| +++ www/fileformat.wiki | ||
| @@ -534,32 +534,38 @@ | ||
| 534 | 534 | The Z card is the required checksum over the rest of the artifact. |
| 535 | 535 | |
| 536 | 536 | <a name="remark"></a> |
| 537 | 537 | <h2>8.0 Remarks</h2> |
| 538 | 538 | |
| 539 | -A remark artifact holds textual remarks that are added to a check-in. | |
| 540 | -Remarks can hold expanded commentary about the check-in, notes from | |
| 541 | -code-reviews, information about problems discovered in the check-in, | |
| 542 | -or other auxiliary textual information about the check-in. | |
| 539 | +A remark artifact holds textual remarks that are added to a check-in | |
| 540 | +or branch. | |
| 541 | +Remarks can hold expanded commentary about the check-in, a description | |
| 542 | +about the purpose of a branch, notes from | |
| 543 | +code-reviews, information about problems discovered in the check-in | |
| 544 | +or branch, or other auxiliary textual information about the check-ins | |
| 545 | +and branches. | |
| 543 | 546 | The remark artifact is a new artifact added to this specification in |
| 544 | 547 | early 2017. |
| 545 | 548 | The following cards are allowed on a remark artifact: |
| 546 | 549 | |
| 547 | 550 | <blockquote> |
| 548 | 551 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 549 | -<b>G</b> <i>checkin-uuid</i><br /> | |
| 552 | +<b>G</b> <i>checkin-or-branch</i><br /> | |
| 550 | 553 | <b>N</b> <i>mimetype</i><br /> |
| 551 | 554 | <b>U</b> <i>user-name</i><br /> |
| 552 | 555 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 553 | 556 | <b>Z</b> <i>checksum</i> |
| 554 | 557 | </blockquote> |
| 555 | 558 | |
| 556 | 559 | A single D card is required to give the date and time when the |
| 557 | 560 | remark artifact was created. |
| 558 | 561 | |
| 559 | -A single G card specifies the check-in to which the remark is | |
| 560 | -attached. | |
| 562 | +A single G card specifies the object to which the remark is attached. | |
| 563 | +If the argment is a 40-character SHA1 hash, then it identifies a | |
| 564 | +check-in. Otherwise, the argument is the name of a branch. Since | |
| 565 | +branch names may whitespace, the argument to the G card is encoded | |
| 566 | +in the same way as a C-card. | |
| 561 | 567 | |
| 562 | 568 | The optional N card specifies the mimetype of the text of the remark |
| 563 | 569 | that is contained in the W card. If the N card is omitted, then the |
| 564 | 570 | W card text mimetype is assumed to be text/x-fossil, which is the |
| 565 | 571 | Fossil wiki format. |
| @@ -663,11 +669,11 @@ | ||
| 663 | 669 | <td> </td> |
| 664 | 670 | <td> </td> |
| 665 | 671 | <td> </td> |
| 666 | 672 | </tr> |
| 667 | 673 | <tr> |
| 668 | -<td><b>G</b> <i>checkin-uuid</i></td> | |
| 674 | +<td><b>G</b> <i>checkin-or-branch</i></td> | |
| 669 | 675 | <td> </td> |
| 670 | 676 | <td> </td> |
| 671 | 677 | <td> </td> |
| 672 | 678 | <td> </td> |
| 673 | 679 | <td> </td> |
| 674 | 680 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -534,32 +534,38 @@ | |
| 534 | The Z card is the required checksum over the rest of the artifact. |
| 535 | |
| 536 | <a name="remark"></a> |
| 537 | <h2>8.0 Remarks</h2> |
| 538 | |
| 539 | A remark artifact holds textual remarks that are added to a check-in. |
| 540 | Remarks can hold expanded commentary about the check-in, notes from |
| 541 | code-reviews, information about problems discovered in the check-in, |
| 542 | or other auxiliary textual information about the check-in. |
| 543 | The remark artifact is a new artifact added to this specification in |
| 544 | early 2017. |
| 545 | The following cards are allowed on a remark artifact: |
| 546 | |
| 547 | <blockquote> |
| 548 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 549 | <b>G</b> <i>checkin-uuid</i><br /> |
| 550 | <b>N</b> <i>mimetype</i><br /> |
| 551 | <b>U</b> <i>user-name</i><br /> |
| 552 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 553 | <b>Z</b> <i>checksum</i> |
| 554 | </blockquote> |
| 555 | |
| 556 | A single D card is required to give the date and time when the |
| 557 | remark artifact was created. |
| 558 | |
| 559 | A single G card specifies the check-in to which the remark is |
| 560 | attached. |
| 561 | |
| 562 | The optional N card specifies the mimetype of the text of the remark |
| 563 | that is contained in the W card. If the N card is omitted, then the |
| 564 | W card text mimetype is assumed to be text/x-fossil, which is the |
| 565 | Fossil wiki format. |
| @@ -663,11 +669,11 @@ | |
| 663 | <td> </td> |
| 664 | <td> </td> |
| 665 | <td> </td> |
| 666 | </tr> |
| 667 | <tr> |
| 668 | <td><b>G</b> <i>checkin-uuid</i></td> |
| 669 | <td> </td> |
| 670 | <td> </td> |
| 671 | <td> </td> |
| 672 | <td> </td> |
| 673 | <td> </td> |
| 674 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -534,32 +534,38 @@ | |
| 534 | The Z card is the required checksum over the rest of the artifact. |
| 535 | |
| 536 | <a name="remark"></a> |
| 537 | <h2>8.0 Remarks</h2> |
| 538 | |
| 539 | A remark artifact holds textual remarks that are added to a check-in |
| 540 | or branch. |
| 541 | Remarks can hold expanded commentary about the check-in, a description |
| 542 | about the purpose of a branch, notes from |
| 543 | code-reviews, information about problems discovered in the check-in |
| 544 | or branch, or other auxiliary textual information about the check-ins |
| 545 | and branches. |
| 546 | The remark artifact is a new artifact added to this specification in |
| 547 | early 2017. |
| 548 | The following cards are allowed on a remark artifact: |
| 549 | |
| 550 | <blockquote> |
| 551 | <b>D</b> <i>time-and-date-stamp</i><br /> |
| 552 | <b>G</b> <i>checkin-or-branch</i><br /> |
| 553 | <b>N</b> <i>mimetype</i><br /> |
| 554 | <b>U</b> <i>user-name</i><br /> |
| 555 | <b>W</b> <i>size</i> <b>\n</b> <i>text</i> <b>\n</b><br /> |
| 556 | <b>Z</b> <i>checksum</i> |
| 557 | </blockquote> |
| 558 | |
| 559 | A single D card is required to give the date and time when the |
| 560 | remark artifact was created. |
| 561 | |
| 562 | A single G card specifies the object to which the remark is attached. |
| 563 | If the argment is a 40-character SHA1 hash, then it identifies a |
| 564 | check-in. Otherwise, the argument is the name of a branch. Since |
| 565 | branch names may whitespace, the argument to the G card is encoded |
| 566 | in the same way as a C-card. |
| 567 | |
| 568 | The optional N card specifies the mimetype of the text of the remark |
| 569 | that is contained in the W card. If the N card is omitted, then the |
| 570 | W card text mimetype is assumed to be text/x-fossil, which is the |
| 571 | Fossil wiki format. |
| @@ -663,11 +669,11 @@ | |
| 669 | <td> </td> |
| 670 | <td> </td> |
| 671 | <td> </td> |
| 672 | </tr> |
| 673 | <tr> |
| 674 | <td><b>G</b> <i>checkin-or-branch</i></td> |
| 675 | <td> </td> |
| 676 | <td> </td> |
| 677 | <td> </td> |
| 678 | <td> </td> |
| 679 | <td> </td> |
| 680 |