Fossil SCM
Add more comments and a changelog item. No code changes.
Commit
e690df08f4d6c862aa4b888e23171a6a015c2d03b62a0de1777064769c1e8b42
Parent
7afd4db3d3ed7d8…
2 files changed
+17
-2
+3
+17
-2
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -249,10 +249,17 @@ | ||
| 249 | 249 | ** information in the ticket artifact given in p. Attempt to create |
| 250 | 250 | ** the appropriate TICKET table entry if tktid is zero. If tktid is nonzero |
| 251 | 251 | ** then it will be the ROWID of an existing TICKET entry. |
| 252 | 252 | ** |
| 253 | 253 | ** Parameter rid is the recordID for the ticket artifact in the BLOB table. |
| 254 | +** Upon assignment of a field this rid is stored into a corresponding | |
| 255 | +** zBsln integer column (provided that it is defined within TICKET table). | |
| 256 | +** | |
| 257 | +** If a field is USEDBY_TICKETCHNG table then back-references within it | |
| 258 | +** are extracted and inserted into the BACKLINK table; otherwise | |
| 259 | +** a corresponding blob in the `fields` array is updated so that the | |
| 260 | +** caller could extract backlinks from the most recent field's values. | |
| 254 | 261 | ** |
| 255 | 262 | ** Return the new rowid of the TICKET table entry. |
| 256 | 263 | */ |
| 257 | 264 | static int ticket_insert(const Manifest *p, const int rid, int tktid, |
| 258 | 265 | Blob *fields){ |
| @@ -816,10 +823,12 @@ | ||
| 816 | 823 | return TH_OK; |
| 817 | 824 | } |
| 818 | 825 | |
| 819 | 826 | /* |
| 820 | 827 | ** Write a ticket into the repository. |
| 828 | +** Upon reassignment of fields try to delta-compress an artifact against | |
| 829 | +** all artifacts that are referenced in the corresponding zBsln fields. | |
| 821 | 830 | */ |
| 822 | 831 | static int ticket_put( |
| 823 | 832 | Blob *pTicket, /* The text of the ticket change record */ |
| 824 | 833 | const char *zTktId, /* The ticket to which this change is applied */ |
| 825 | 834 | const char *aUsed, /* Indicators for fields' modifications */ |
| @@ -1241,18 +1250,21 @@ | ||
| 1241 | 1250 | ** By default, the artifacts are decoded and formatted. Text fields |
| 1242 | 1251 | ** are formatted as text/plain, since in the general case Fossil does |
| 1243 | 1252 | ** not have knowledge of the encoding. If the "raw" query parameter |
| 1244 | 1253 | ** is present, then the undecoded and unformatted text of each artifact |
| 1245 | 1254 | ** is displayed. |
| 1255 | +** | |
| 1256 | +** Reassignments of a field of the TICKET table that has a corresponding | |
| 1257 | +** "baseline for ..." companion if rendered as unified delta. | |
| 1246 | 1258 | */ |
| 1247 | 1259 | void tkthistory_page(void){ |
| 1248 | 1260 | Stmt q; |
| 1249 | 1261 | char *zTitle; |
| 1250 | 1262 | const char *zUuid; |
| 1251 | 1263 | int tagid; |
| 1252 | 1264 | int nChng = 0; |
| 1253 | - Blob *aLastVal = 0; | |
| 1265 | + Blob *aLastVal = 0; /* holds the last rendered value for each field */ | |
| 1254 | 1266 | |
| 1255 | 1267 | login_check_credentials(); |
| 1256 | 1268 | if( !g.perm.Hyperlink || !g.perm.RdTkt ){ |
| 1257 | 1269 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 1258 | 1270 | return; |
| @@ -1368,16 +1380,19 @@ | ||
| 1368 | 1380 | } |
| 1369 | 1381 | |
| 1370 | 1382 | /* |
| 1371 | 1383 | ** The pTkt object is a ticket change artifact. Output a detailed |
| 1372 | 1384 | ** description of this object. |
| 1385 | +** | |
| 1386 | +** If `aLastVal` is not NULL then render selected fields as unified diffs | |
| 1387 | +** and update corresponding elements of that array with values from `pTkt`. | |
| 1373 | 1388 | */ |
| 1374 | 1389 | void ticket_output_change_artifact( |
| 1375 | 1390 | Manifest *pTkt, /* Parsed artifact for the ticket change */ |
| 1376 | 1391 | const char *zListType, /* Which type of list */ |
| 1377 | 1392 | int n, /* Which ticket change is this */ |
| 1378 | - Blob *aLastVal /* Array of latest values for the diffs */ | |
| 1393 | + Blob *aLastVal /* Array of the latest values for the diffs */ | |
| 1379 | 1394 | ){ |
| 1380 | 1395 | int i; |
| 1381 | 1396 | if( zListType==0 ) zListType = "1"; |
| 1382 | 1397 | getAllTicketFields(); |
| 1383 | 1398 | @ <ol type="%s(zListType)"> |
| 1384 | 1399 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -249,10 +249,17 @@ | |
| 249 | ** information in the ticket artifact given in p. Attempt to create |
| 250 | ** the appropriate TICKET table entry if tktid is zero. If tktid is nonzero |
| 251 | ** then it will be the ROWID of an existing TICKET entry. |
| 252 | ** |
| 253 | ** Parameter rid is the recordID for the ticket artifact in the BLOB table. |
| 254 | ** |
| 255 | ** Return the new rowid of the TICKET table entry. |
| 256 | */ |
| 257 | static int ticket_insert(const Manifest *p, const int rid, int tktid, |
| 258 | Blob *fields){ |
| @@ -816,10 +823,12 @@ | |
| 816 | return TH_OK; |
| 817 | } |
| 818 | |
| 819 | /* |
| 820 | ** Write a ticket into the repository. |
| 821 | */ |
| 822 | static int ticket_put( |
| 823 | Blob *pTicket, /* The text of the ticket change record */ |
| 824 | const char *zTktId, /* The ticket to which this change is applied */ |
| 825 | const char *aUsed, /* Indicators for fields' modifications */ |
| @@ -1241,18 +1250,21 @@ | |
| 1241 | ** By default, the artifacts are decoded and formatted. Text fields |
| 1242 | ** are formatted as text/plain, since in the general case Fossil does |
| 1243 | ** not have knowledge of the encoding. If the "raw" query parameter |
| 1244 | ** is present, then the undecoded and unformatted text of each artifact |
| 1245 | ** is displayed. |
| 1246 | */ |
| 1247 | void tkthistory_page(void){ |
| 1248 | Stmt q; |
| 1249 | char *zTitle; |
| 1250 | const char *zUuid; |
| 1251 | int tagid; |
| 1252 | int nChng = 0; |
| 1253 | Blob *aLastVal = 0; |
| 1254 | |
| 1255 | login_check_credentials(); |
| 1256 | if( !g.perm.Hyperlink || !g.perm.RdTkt ){ |
| 1257 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 1258 | return; |
| @@ -1368,16 +1380,19 @@ | |
| 1368 | } |
| 1369 | |
| 1370 | /* |
| 1371 | ** The pTkt object is a ticket change artifact. Output a detailed |
| 1372 | ** description of this object. |
| 1373 | */ |
| 1374 | void ticket_output_change_artifact( |
| 1375 | Manifest *pTkt, /* Parsed artifact for the ticket change */ |
| 1376 | const char *zListType, /* Which type of list */ |
| 1377 | int n, /* Which ticket change is this */ |
| 1378 | Blob *aLastVal /* Array of latest values for the diffs */ |
| 1379 | ){ |
| 1380 | int i; |
| 1381 | if( zListType==0 ) zListType = "1"; |
| 1382 | getAllTicketFields(); |
| 1383 | @ <ol type="%s(zListType)"> |
| 1384 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -249,10 +249,17 @@ | |
| 249 | ** information in the ticket artifact given in p. Attempt to create |
| 250 | ** the appropriate TICKET table entry if tktid is zero. If tktid is nonzero |
| 251 | ** then it will be the ROWID of an existing TICKET entry. |
| 252 | ** |
| 253 | ** Parameter rid is the recordID for the ticket artifact in the BLOB table. |
| 254 | ** Upon assignment of a field this rid is stored into a corresponding |
| 255 | ** zBsln integer column (provided that it is defined within TICKET table). |
| 256 | ** |
| 257 | ** If a field is USEDBY_TICKETCHNG table then back-references within it |
| 258 | ** are extracted and inserted into the BACKLINK table; otherwise |
| 259 | ** a corresponding blob in the `fields` array is updated so that the |
| 260 | ** caller could extract backlinks from the most recent field's values. |
| 261 | ** |
| 262 | ** Return the new rowid of the TICKET table entry. |
| 263 | */ |
| 264 | static int ticket_insert(const Manifest *p, const int rid, int tktid, |
| 265 | Blob *fields){ |
| @@ -816,10 +823,12 @@ | |
| 823 | return TH_OK; |
| 824 | } |
| 825 | |
| 826 | /* |
| 827 | ** Write a ticket into the repository. |
| 828 | ** Upon reassignment of fields try to delta-compress an artifact against |
| 829 | ** all artifacts that are referenced in the corresponding zBsln fields. |
| 830 | */ |
| 831 | static int ticket_put( |
| 832 | Blob *pTicket, /* The text of the ticket change record */ |
| 833 | const char *zTktId, /* The ticket to which this change is applied */ |
| 834 | const char *aUsed, /* Indicators for fields' modifications */ |
| @@ -1241,18 +1250,21 @@ | |
| 1250 | ** By default, the artifacts are decoded and formatted. Text fields |
| 1251 | ** are formatted as text/plain, since in the general case Fossil does |
| 1252 | ** not have knowledge of the encoding. If the "raw" query parameter |
| 1253 | ** is present, then the undecoded and unformatted text of each artifact |
| 1254 | ** is displayed. |
| 1255 | ** |
| 1256 | ** Reassignments of a field of the TICKET table that has a corresponding |
| 1257 | ** "baseline for ..." companion if rendered as unified delta. |
| 1258 | */ |
| 1259 | void tkthistory_page(void){ |
| 1260 | Stmt q; |
| 1261 | char *zTitle; |
| 1262 | const char *zUuid; |
| 1263 | int tagid; |
| 1264 | int nChng = 0; |
| 1265 | Blob *aLastVal = 0; /* holds the last rendered value for each field */ |
| 1266 | |
| 1267 | login_check_credentials(); |
| 1268 | if( !g.perm.Hyperlink || !g.perm.RdTkt ){ |
| 1269 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 1270 | return; |
| @@ -1368,16 +1380,19 @@ | |
| 1380 | } |
| 1381 | |
| 1382 | /* |
| 1383 | ** The pTkt object is a ticket change artifact. Output a detailed |
| 1384 | ** description of this object. |
| 1385 | ** |
| 1386 | ** If `aLastVal` is not NULL then render selected fields as unified diffs |
| 1387 | ** and update corresponding elements of that array with values from `pTkt`. |
| 1388 | */ |
| 1389 | void ticket_output_change_artifact( |
| 1390 | Manifest *pTkt, /* Parsed artifact for the ticket change */ |
| 1391 | const char *zListType, /* Which type of list */ |
| 1392 | int n, /* Which ticket change is this */ |
| 1393 | Blob *aLastVal /* Array of the latest values for the diffs */ |
| 1394 | ){ |
| 1395 | int i; |
| 1396 | if( zListType==0 ) zListType = "1"; |
| 1397 | getAllTicketFields(); |
| 1398 | @ <ol type="%s(zListType)"> |
| 1399 |
+3
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,10 +1,13 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | 3 | <h2 id='v2_20'>Changes for version 2.20 (pending)</h2> |
| 4 | 4 | * Replaced the <tt>--dryrun</tt> flag with <tt>--dry-run</tt> in all |
| 5 | 5 | commands which still used the former name, for consistency. |
| 6 | + * Improved correctness, usability and efficiency for the case | |
| 7 | + [/timeline?r=deltify-tkt-blobs|when values in a TICKET's column | |
| 8 | + tend to be long and volitile]. | |
| 6 | 9 | |
| 7 | 10 | <h2 id='v2_19'>Changes for version 2.19 (2022-07-21)</h2> |
| 8 | 11 | * On file listing pages, sort filenames using the "uintnocase" collating |
| 9 | 12 | sequence, so that filenames that contains embedded integers sort in |
| 10 | 13 | numeric order even if they contain a different number of digits. |
| 11 | 14 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,10 +1,13 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2 id='v2_20'>Changes for version 2.20 (pending)</h2> |
| 4 | * Replaced the <tt>--dryrun</tt> flag with <tt>--dry-run</tt> in all |
| 5 | commands which still used the former name, for consistency. |
| 6 | |
| 7 | <h2 id='v2_19'>Changes for version 2.19 (2022-07-21)</h2> |
| 8 | * On file listing pages, sort filenames using the "uintnocase" collating |
| 9 | sequence, so that filenames that contains embedded integers sort in |
| 10 | numeric order even if they contain a different number of digits. |
| 11 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,10 +1,13 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2 id='v2_20'>Changes for version 2.20 (pending)</h2> |
| 4 | * Replaced the <tt>--dryrun</tt> flag with <tt>--dry-run</tt> in all |
| 5 | commands which still used the former name, for consistency. |
| 6 | * Improved correctness, usability and efficiency for the case |
| 7 | [/timeline?r=deltify-tkt-blobs|when values in a TICKET's column |
| 8 | tend to be long and volitile]. |
| 9 | |
| 10 | <h2 id='v2_19'>Changes for version 2.19 (2022-07-21)</h2> |
| 11 | * On file listing pages, sort filenames using the "uintnocase" collating |
| 12 | sequence, so that filenames that contains embedded integers sort in |
| 13 | numeric order even if they contain a different number of digits. |
| 14 |