Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch deltify-tkt-blobs Excluding Merge-Ins
This is equivalent to a diff from 52648d0384 to 53b66cf63f
2022-10-28
| ||
17:08 | Improve correctness, usability and efficiency for the case when values in a TICKET's column tend to be long and volatile. Owner of a repository may specify one or several TICKET's columns so that delta-compression is tried for the corresponding ticket change artifacts and the corresponding changes on the <tt>/tkthistory</tt> page are rendered via unified diffs. See details in the [/wiki?name=branch/deltify-tkt-blobs&p|associated wiki]. ... (check-in: 872a3b2327 user: george tags: trunk) | |
16:28 | Add comments for auxiliary local variables inside <code>ticket_output_change_artifact()</code>. ... (Closed-Leaf check-in: 53b66cf63f user: george tags: deltify-tkt-blobs) | |
06:51 | Typo fix in changes.wiki. ... (check-in: 141793c4ab user: stephan tags: deltify-tkt-blobs) | |
06:37 | Merge trunk into deltify-tkt-blobs branch. ... (check-in: 86916df534 user: stephan tags: deltify-tkt-blobs) | |
2022-10-27
| ||
17:56 | The check for whether to continue during sync due to outstanding "uvgimme" requests was being skipped in clone -u mode due to misordered tests at the end of the client side of the sync protocol. ... (check-in: 52648d0384 user: wyoung tags: trunk) | |
17:15 | Since "fossil uv sync -v" turns on UV trace mode, made "fossil clone -u -v" enable that mode as well, since otherwise there's no way to get into UV trace mode during clone. (e.g. There is no global "--uvtrace" option.) ... (check-in: cdd58b1fbf user: wyoung tags: trunk) | |
Changes to src/backlink.c.
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | " WHEN 2 THEN (SELECT substr(tagname,6) FROM tag" " WHERE tagid=srcid AND tagname GLOB 'wiki-*')" " ELSE null END FROM backlink" ); style_table_sorter(); @ <table border="1" cellpadding="2" cellspacing="0" \ @ class='sortable' data-column-types='ttt' data-init-sort='0'> |
︙ |
Changes to src/blob.c.
︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | + + + + + | #define blob_size(X) ((X)->nUsed) /* ** The buffer holding the blob data */ #define blob_buffer(X) ((X)->aData) /* ** Number of elements that fits into the current blob's size */ #define blob_count(X,elType) (blob_size(X)/sizeof(elType)) /* ** Append blob contents to another */ #define blob_appendb(dest, src) \ blob_append((dest), blob_buffer(src), blob_size(src)) /* |
︙ | |||
925 926 927 928 929 930 931 932 933 934 935 936 937 938 | 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | + + + + + + + + + + + + + + + + + + + | int i; for(i=0; i<n; i++) blob_zero(&aBlob[i]); } void blobarray_reset(Blob *aBlob, int n){ int i; for(i=0; i<n; i++) blob_reset(&aBlob[i]); } /* ** Allocate array of n blobs and initialize each element with `empty_blob` */ Blob* blobarray_new(int n){ int i; Blob *aBlob = fossil_malloc(sizeof(Blob)*n); for(i=0; i<n; i++) aBlob[i] = empty_blob; return aBlob; } /* ** Free array of n blobs some of which may be empty (have NULL buffer) */ void blobarray_delete(Blob *aBlob, int n){ int i; for(i=0; i<n; i++){ if( blob_buffer(aBlob+i) ) blob_reset(aBlob+i); } fossil_free(aBlob); } /* ** Parse a blob into space-separated tokens. Store each token in ** an element of the blobarray aToken[]. aToken[] is nToken elements in ** size. Return the number of tokens seen. */ int blob_tokenize(Blob *pIn, Blob *aToken, int nToken){ |
︙ |
Changes to src/default.css.
︙ | |||
705 706 707 708 709 710 711 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | + + + - + + + + + + + | font-weight: bold; } td.difftxt ins > ins.edit { background-color: #c0c0ff; text-decoration: none; font-weight: bold; } body.tkt div.content li > table.udiff { margin-left: 1.5em; margin-top: 0.5em; |
︙ |
Changes to src/info.c.
︙ | |||
2781 2782 2783 2784 2785 2786 2787 | 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 | - + | zTktTitle = db_table_has_column("repository", "ticket", "title" ) ? db_text("(No title)", "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName) : 0; style_set_current_feature("tinfo"); style_header("Ticket Change Details"); style_submenu_element("Raw", "%R/artifact/%s", zUuid); |
︙ | |||
2826 2827 2828 2829 2830 2831 2832 | 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 | - + | @ <input type="submit" value="Submit"> @ </form> @ </blockquote> } @ <div class="section">Changes</div> @ <p> |
︙ |
Changes to src/tkt.c.
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + + + + + | ** use. The internal-use fields begin with "tkt_". */ static int nField = 0; static struct tktFieldInfo { char *zName; /* Name of the database field */ char *zValue; /* Value to store */ char *zAppend; /* Value to append */ char *zBsln; /* "baseline for $zName" if that field exists*/ unsigned mUsed; /* 01: TICKET 02: TICKETCHNG */ } *aField; #define USEDBY_TICKET 01 #define USEDBY_TICKETCHNG 02 #define USEDBY_BOTH 03 #define JCARD_ASSIGN ('=') #define JCARD_APPEND ('+') #define JCARD_PRIVATE ('p') static u8 haveTicket = 0; /* True if the TICKET table exists */ static u8 haveTicketCTime = 0; /* True if TICKET.TKT_CTIME exists */ static u8 haveTicketChng = 0; /* True if the TICKETCHNG table exists */ static u8 haveTicketChngRid = 0; /* True if TICKETCHNG.TKT_RID exists */ static u8 haveTicketChngUser = 0;/* True if TICKETCHNG.TKT_USER exists */ static u8 useTicketGenMt = 0; /* use generated TICKET.MIMETYPE */ static u8 useTicketChngGenMt = 0;/* use generated TICKETCHNG.MIMETYPE */ static int nTicketBslns = 0; /* number of valid "baseline for ..." */ /* ** Compare two entries in aField[] for sorting purposes */ static int nameCmpr(const void *a, const void *b){ return fossil_strcmp(((const struct tktFieldInfo*)a)->zName, |
︙ | |||
71 72 73 74 75 76 77 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + | ** in sorted order in aField[]. ** ** The haveTicket and haveTicketChng variables are set to 1 if the TICKET and ** TICKETCHANGE tables exist, respectively. */ static void getAllTicketFields(void){ Stmt q; |
︙ | |||
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | + + + + + + + + + + + + + + + + + - + + - + - + + + + | const char *z; for(i=0; (z = cgi_parameter_name(i))!=0; i++){ Th_Store(z, P(z)); } } /* ** Information about a single J-card */ struct jCardInfo { char *zValue; int mimetype; int rid; double mtime; }; /* ** Update an entry of the TICKET and TICKETCHNG tables according to the ** information in the ticket artifact given in p. Attempt to create ** the appropriate TICKET table entry if tktid is zero. If tktid is nonzero ** then it will be the ROWID of an existing TICKET entry. ** ** Parameter rid is the recordID for the ticket artifact in the BLOB table. ** Upon assignment of a field this rid is stored into a corresponding ** zBsln integer column (provided that it is defined within TICKET table). ** ** If a field is USEDBY_TICKETCHNG table then back-references within it ** are extracted and inserted into the BACKLINK table; otherwise ** a corresponding blob in the `fields` array is updated so that the ** caller could extract backlinks from the most recent field's values. ** ** Return the new rowid of the TICKET table entry. */ |
︙ | |||
325 326 327 328 329 330 331 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | - - + + + + + + + + - - - - + + + + + + + + + - + + + | } db_finalize(&q); } blob_reset(&sql2); blob_reset(&sql3); fossil_free(aUsed); if( rid>0 ){ /* extract backlinks */ |
︙ | |||
375 376 377 378 379 380 381 | 440 441 442 443 444 445 446 447 448 449 450 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 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | - + + + + + - + + + + + + + + + + + + + + + + + | ** Rebuild an entire entry in the TICKET table */ void ticket_rebuild_entry(const char *zTktUuid){ char *zTag = mprintf("tkt-%s", zTktUuid); int tagid = tag_findid(zTag, 1); Stmt q; Manifest *pTicket; |
︙ | |||
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 | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | + + + + + + + + + + + + + + + + + + | } aField[idx].zAppend = mprintf("%.*s", argl[2], argv[2]); return TH_OK; } /* ** Write a ticket into the repository. ** Upon reassignment of fields try to delta-compress an artifact against ** all artifacts that are referenced in the corresponding zBsln fields. */ static int ticket_put( Blob *pTicket, /* The text of the ticket change record */ const char *zTktId, /* The ticket to which this change is applied */ const char *aUsed, /* Indicators for fields' modifications */ int needMod /* True if moderation is needed */ ){ int result; int rid; manifest_crosslink_begin(); rid = content_put_ex(pTicket, 0, 0, 0, needMod); if( rid==0 ){ fossil_fatal("trouble committing ticket: %s", g.zErrMsg); } if( nTicketBslns ){ int i, s, buf[8], nSrc=0, *aSrc=&(buf[0]); if( nTicketBslns > count(buf) ){ aSrc = (int*)fossil_malloc(sizeof(int)*nTicketBslns); } for(i=0; i<nField; i++){ if( aField[i].zBsln && aUsed[i]==JCARD_ASSIGN ){ s = db_int(0,"SELECT \"%w\" FROM ticket WHERE tkt_uuid = '%q'", aField[i].zBsln, zTktId ); if( s > 0 ) aSrc[nSrc++] = s; } } if( nSrc ) content_deltify(rid, aSrc, nSrc, 0); if( aSrc!=&(buf[0]) ) fossil_free( aSrc ); } if( needMod ){ moderation_table_create(); db_multi_exec( "INSERT INTO modreq(objid, tktid) VALUES(%d,%Q)", rid, zTktId ); }else{ |
︙ | |||
785 786 787 788 789 790 791 | 888 889 890 891 892 893 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 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | - + - + + + + + - + - - + + + + - + | static int submitTicketCmd( Th_Interp *interp, void *pUuid, int argc, const char **argv, int *argl ){ |
︙ | |||
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 | 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 | + + + + | ** another way) show a list of artifacts associated with a single ticket. ** ** By default, the artifacts are decoded and formatted. Text fields ** are formatted as text/plain, since in the general case Fossil does ** not have knowledge of the encoding. If the "raw" query parameter ** is present, then the undecoded and unformatted text of each artifact ** is displayed. ** ** Reassignments of a field of the TICKET table that has a corresponding ** "baseline for ..." companion are rendered as unified diffs. */ void tkthistory_page(void){ Stmt q; char *zTitle; const char *zUuid; int tagid; int nChng = 0; Blob *aLastVal = 0; /* holds the last rendered value for each field */ login_check_credentials(); if( !g.perm.Hyperlink || !g.perm.RdTkt ){ login_needed(g.anon.Hyperlink && g.anon.RdTkt); return; } zUuid = PD("name",""); |
︙ | |||
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 | + + + + | style_finish_page(); return; } if( P("raw")!=0 ){ @ <h2>Raw Artifacts Associated With Ticket %h(zUuid)</h2> }else{ @ <h2>Artifacts Associated With Ticket %h(zUuid)</h2> getAllTicketFields(); if( nTicketBslns ){ aLastVal = blobarray_new(nField); } } db_prepare(&q, "SELECT datetime(mtime,toLocal()), objid, uuid, NULL, NULL, NULL" " FROM event, blob" " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" " AND blob.rid=event.objid" " UNION " |
︙ | |||
1196 1197 1198 1199 1200 1201 1202 | 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 | - + - - - + + + + - - + - + - - + + - + + + + + + - + + - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + | for(nChng=0; db_step(&q)==SQLITE_ROW; nChng++){ Manifest *pTicket; const char *zDate = db_column_text(&q, 0); int rid = db_column_int(&q, 1); const char *zChngUuid = db_column_text(&q, 2); const char *zFile = db_column_text(&q, 4); if( nChng==0 ){ |
︙ | |||
1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 | 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 | + | rptshow( zRep, zSep, zFilterUuid, tktEncoding ); } }else{ /* add a new ticket or update an existing ticket */ enum { set,add,history,err } eCmd = err; int i = 0; Blob tktchng, cksum; char *aUsed; /* get command type (set/add) and get uuid, if needed for set */ if( strncmp(g.argv[2],"set",n)==0 || strncmp(g.argv[2],"change",n)==0 || strncmp(g.argv[2],"history",n)==0 ){ if( strncmp(g.argv[2],"history",n)==0 ){ eCmd = history; }else{ |
︙ | |||
1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 | 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 | + + + + - + + + | if( append ){ aField[j].zAppend = zFValue; }else{ aField[j].zValue = zFValue; } } } aUsed = fossil_malloc_zero( nField ); /* now add the needed artifacts to the repository */ blob_zero(&tktchng); /* add the time to the ticket manifest */ blob_appendf(&tktchng, "D %s\n", zDate); /* append defined elements */ for(i=0; i<nField; i++){ char *zValue = 0; char *zPfx; if( aField[i].zAppend && aField[i].zAppend[0] ){ zPfx = " +"; zValue = aField[i].zAppend; aUsed[i] = JCARD_APPEND; }else if( aField[i].zValue && aField[i].zValue[0] ){ zPfx = " "; zValue = aField[i].zValue; aUsed[i] = JCARD_ASSIGN; }else{ continue; } if( memcmp(aField[i].zName, "private_", 8)==0 ){ zValue = db_conceal(zValue, strlen(zValue)); blob_appendf(&tktchng, "J%s%s %s\n", zPfx, aField[i].zName, zValue); aUsed[i] = JCARD_PRIVATE; }else{ blob_appendf(&tktchng, "J%s%s %#F\n", zPfx, aField[i].zName, strlen(zValue), zValue); } } blob_appendf(&tktchng, "K %s\n", zTktUuid); blob_appendf(&tktchng, "U %F\n", zUser); md5sum_blob(&tktchng, &cksum); blob_appendf(&tktchng, "Z %b\n", &cksum); |
︙ |
Changes to src/wiki.c.
︙ | |||
1865 1866 1867 1868 1869 1870 1871 | 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 | - - | } style_set_current_feature("wiki"); style_header("Changes To %s", pW1->zWikiTitle); blob_zero(&d); construct_diff_flags(1, &DCfg); DCfg.diffFlags |= DIFF_HTML | DIFF_LINENO; text_diff(&w2, &w1, &d, &DCfg); |
︙ |
Changes to www/changes.wiki.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + + + | * Replace the <tt>--dryrun</tt> flag with <tt>--dry-run</tt> in all commands which still used the former name, for consistency. * Rebuilt [/file/Dockerfile | the stock Dockerfile] to create a "from scratch" Busybox based container image via an Alpine Linux intermediary * Added [/doc/trunk/www/containers.md | a new document] describing how to customize, use, and run that container. * Added "by hour of day" report to [/reports?view=byhour|the /reports page]. * Improved correctness, usability, and efficiency for the case [/timeline?r=deltify-tkt-blobs|when values in a TICKET's column tend to be long and volatile]. <h2 id='v2_19'>Changes for version 2.19 (2022-07-21)</h2> * On file listing pages, sort filenames using the "uintnocase" collating sequence, so that filenames that contains embedded integers sort in numeric order even if they contain a different number of digits. (Example: "fossil_80_..." comes before "fossil_100.png" in the [/dir?ci=92fd091703a28c07&name=skins/blitz|/skins/blitz] directory listing.) |
︙ |