Fossil SCM

Add more comments and a changelog item. No code changes.

george 2022-10-28 00:11 deltify-tkt-blobs
Commit e690df08f4d6c862aa4b888e23171a6a015c2d03b62a0de1777064769c1e8b42
2 files changed +17 -2 +3
+17 -2
--- src/tkt.c
+++ src/tkt.c
@@ -249,10 +249,17 @@
249249
** information in the ticket artifact given in p. Attempt to create
250250
** the appropriate TICKET table entry if tktid is zero. If tktid is nonzero
251251
** then it will be the ROWID of an existing TICKET entry.
252252
**
253253
** 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.
254261
**
255262
** Return the new rowid of the TICKET table entry.
256263
*/
257264
static int ticket_insert(const Manifest *p, const int rid, int tktid,
258265
Blob *fields){
@@ -816,10 +823,12 @@
816823
return TH_OK;
817824
}
818825
819826
/*
820827
** 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.
821830
*/
822831
static int ticket_put(
823832
Blob *pTicket, /* The text of the ticket change record */
824833
const char *zTktId, /* The ticket to which this change is applied */
825834
const char *aUsed, /* Indicators for fields' modifications */
@@ -1241,18 +1250,21 @@
12411250
** By default, the artifacts are decoded and formatted. Text fields
12421251
** are formatted as text/plain, since in the general case Fossil does
12431252
** not have knowledge of the encoding. If the "raw" query parameter
12441253
** is present, then the undecoded and unformatted text of each artifact
12451254
** 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.
12461258
*/
12471259
void tkthistory_page(void){
12481260
Stmt q;
12491261
char *zTitle;
12501262
const char *zUuid;
12511263
int tagid;
12521264
int nChng = 0;
1253
- Blob *aLastVal = 0;
1265
+ Blob *aLastVal = 0; /* holds the last rendered value for each field */
12541266
12551267
login_check_credentials();
12561268
if( !g.perm.Hyperlink || !g.perm.RdTkt ){
12571269
login_needed(g.anon.Hyperlink && g.anon.RdTkt);
12581270
return;
@@ -1368,16 +1380,19 @@
13681380
}
13691381
13701382
/*
13711383
** The pTkt object is a ticket change artifact. Output a detailed
13721384
** 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`.
13731388
*/
13741389
void ticket_output_change_artifact(
13751390
Manifest *pTkt, /* Parsed artifact for the ticket change */
13761391
const char *zListType, /* Which type of list */
13771392
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 */
13791394
){
13801395
int i;
13811396
if( zListType==0 ) zListType = "1";
13821397
getAllTicketFields();
13831398
@ <ol type="%s(zListType)">
13841399
--- 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
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,13 @@
11
<title>Change Log</title>
22
33
<h2 id='v2_20'>Changes for version 2.20 (pending)</h2>
44
* Replaced the <tt>--dryrun</tt> flag with <tt>--dry-run</tt> in all
55
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].
69
710
<h2 id='v2_19'>Changes for version 2.19 (2022-07-21)</h2>
811
* On file listing pages, sort filenames using the "uintnocase" collating
912
sequence, so that filenames that contains embedded integers sort in
1013
numeric order even if they contain a different number of digits.
1114
--- 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

Keyboard Shortcuts

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