Fossil SCM
Merge changes.wiki style update
Commit
780c0150c2939ce2e490af80477bdaca6b3756a7
Parent
1219bffce072e7c…
7 files changed
+1
-1
+35
-32
+35
-32
+2
-1
+11
-1
+11
-1
+48
-59
M
VERSION
+1
-1
| --- VERSION | ||
| +++ VERSION | ||
| @@ -1,1 +1,1 @@ | ||
| 1 | -1.36 | |
| 1 | +1.37 | |
| 2 | 2 |
| --- VERSION | |
| +++ VERSION | |
| @@ -1,1 +1,1 @@ | |
| 1 | 1.36 |
| 2 |
| --- VERSION | |
| +++ VERSION | |
| @@ -1,1 +1,1 @@ | |
| 1 | 1.37 |
| 2 |
+35
-32
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1241,29 +1241,34 @@ | ||
| 1241 | 1241 | ** the tag table to access the "tagname" column. |
| 1242 | 1242 | ** |
| 1243 | 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | 1244 | ** |
| 1245 | 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | +** | |
| 1247 | +** In addition to assembling and returning an SQL expression, this function | |
| 1248 | +** makes an English-language description of the patterns being matched, suitable | |
| 1249 | +** for display in the web interface. | |
| 1246 | 1250 | */ |
| 1247 | 1251 | static const char *tagMatchExpression( |
| 1248 | 1252 | MatchStyle matchStyle, /* Match style code */ |
| 1249 | 1253 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1250 | - int *pCount /* Pointer to match pattern count variable */ | |
| 1254 | + const char **zDesc /* Output expression description string */ | |
| 1251 | 1255 | ){ |
| 1252 | - Blob blob = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ | |
| 1256 | + Blob expr = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ | |
| 1257 | + Blob desc = BLOB_INITIALIZER; /* English description of match patterns */ | |
| 1253 | 1258 | const char *zStart; /* Text at start of expression */ |
| 1254 | 1259 | const char *zDelimiter; /* Text between expression terms */ |
| 1255 | 1260 | const char *zEnd; /* Text at end of expression */ |
| 1256 | 1261 | const char *zPrefix; /* Text before each match pattern */ |
| 1257 | 1262 | const char *zSuffix; /* Text after each match pattern */ |
| 1258 | - char cDel; /* Input delimiter character */ | |
| 1263 | + char cInputDelim; /* Input delimiter character */ | |
| 1264 | + char cDescDelim; /* Description delimiter character */ | |
| 1259 | 1265 | int i; /* Input match pattern length counter */ |
| 1260 | 1266 | |
| 1261 | 1267 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1262 | 1268 | * numeric comparison. Bypass the remainder of this function. */ |
| 1263 | 1269 | if( matchStyle==MS_EXACT ){ |
| 1264 | - *pCount = 1; | |
| 1265 | 1270 | return mprintf("(tagid=%d)", db_int(-1, |
| 1266 | 1271 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1267 | 1272 | } |
| 1268 | 1273 | |
| 1269 | 1274 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | ||
| 1285 | 1290 | zEnd = ")$')"; |
| 1286 | 1291 | zPrefix = ""; |
| 1287 | 1292 | zSuffix = ""; |
| 1288 | 1293 | } |
| 1289 | 1294 | |
| 1290 | - /* Convert the list of matches into an SQL expression. */ | |
| 1291 | - *pCount = 0; | |
| 1292 | - blob_zero(&blob); | |
| 1295 | + /* Convert the list of matches into an SQL expression and text description. */ | |
| 1296 | + blob_zero(&expr); | |
| 1297 | + blob_zero(&desc); | |
| 1293 | 1298 | while( 1 ){ |
| 1294 | 1299 | /* Skip leading delimiters. */ |
| 1295 | 1300 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1296 | 1301 | |
| 1297 | 1302 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | ||
| 1298 | 1303 | if( !*zTag ){ |
| 1299 | 1304 | /* Terminate loop at end of string. */ |
| 1300 | 1305 | break; |
| 1301 | 1306 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1302 | 1307 | /* If word is quoted, prepare to stop at end quote. */ |
| 1303 | - cDel = *zTag; | |
| 1308 | + cInputDelim = *zTag; | |
| 1304 | 1309 | ++zTag; |
| 1305 | 1310 | }else{ |
| 1306 | 1311 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1307 | - cDel = ','; | |
| 1312 | + cInputDelim = ','; | |
| 1308 | 1313 | } |
| 1309 | 1314 | |
| 1310 | 1315 | /* Find the next delimiter character or end of string. */ |
| 1311 | - for( i=0; zTag[i] && zTag[i]!=cDel; ++i ){ | |
| 1316 | + for( i=0; zTag[i] && zTag[i]!=cInputDelim; ++i ){ | |
| 1312 | 1317 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1313 | - if( cDel==',' && fossil_isspace(zTag[i]) ){ | |
| 1318 | + if( cInputDelim==',' && fossil_isspace(zTag[i]) ){ | |
| 1314 | 1319 | break; |
| 1315 | 1320 | } |
| 1316 | 1321 | |
| 1317 | 1322 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1318 | 1323 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | ||
| 1320 | 1325 | } |
| 1321 | 1326 | } |
| 1322 | 1327 | |
| 1323 | 1328 | /* Incorporate the match word into the output expression. The %q format is |
| 1324 | 1329 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1325 | - blob_appendf(&blob, "%s%s%#q%s", *pCount ? zDelimiter : zStart, | |
| 1330 | + blob_appendf(&expr, "%s%s%#q%s", blob_size(&expr) ? zDelimiter : zStart, | |
| 1326 | 1331 | zPrefix, i, zTag, zSuffix); |
| 1327 | 1332 | |
| 1328 | - /* Keep track of the number of match expressions. */ | |
| 1329 | - ++*pCount; | |
| 1330 | - | |
| 1331 | 1333 | /* Advance past all consumed input characters. */ |
| 1332 | 1334 | zTag += i; |
| 1333 | - if( cDel!=',' && *zTag==cDel ){ | |
| 1335 | + if( cInputDelim!=',' && *zTag==cInputDelim ){ | |
| 1334 | 1336 | ++zTag; |
| 1335 | 1337 | } |
| 1336 | 1338 | } |
| 1337 | 1339 | |
| 1338 | 1340 | /* Finalize and extract the SQL expression. */ |
| 1339 | - if( *pCount ){ | |
| 1340 | - blob_append(&blob, zEnd, -1); | |
| 1341 | - return blob_str(&blob); | |
| 1341 | + if( blob_size(&expr) ){ | |
| 1342 | + blob_append(&expr, zEnd, -1); | |
| 1343 | + return blob_str(&expr); | |
| 1342 | 1344 | } |
| 1343 | 1345 | |
| 1344 | 1346 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1345 | 1347 | return 0; |
| 1346 | 1348 | } |
| @@ -1404,12 +1406,12 @@ | ||
| 1404 | 1406 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1405 | 1407 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1406 | 1408 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1407 | 1409 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1408 | 1410 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1411 | + const char *zMatchDesc = 0; /* Tag match expression description text */ | |
| 1409 | 1412 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1410 | - int tagMatchCount = 0; /* Number of tag match patterns */ | |
| 1411 | 1413 | const char *zSearch = P("s"); /* Search string */ |
| 1412 | 1414 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1413 | 1415 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1414 | 1416 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1415 | 1417 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | ||
| 1488 | 1490 | } |
| 1489 | 1491 | } |
| 1490 | 1492 | |
| 1491 | 1493 | /* Construct the tag match expression. */ |
| 1492 | 1494 | if( zThisTag ){ |
| 1493 | - zTagSql = tagMatchExpression(matchStyle, zThisTag, &tagMatchCount); | |
| 1495 | + zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); | |
| 1494 | 1496 | } |
| 1495 | 1497 | |
| 1496 | 1498 | if( zTagName && g.perm.Read ){ |
| 1497 | 1499 | style_submenu_element("Related", "Related", "%s", |
| 1498 | 1500 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | ||
| 1919 | 1921 | if( zTagName ){ |
| 1920 | 1922 | blob_append(&desc, " with tags matching ", -1); |
| 1921 | 1923 | }else{ |
| 1922 | 1924 | blob_append(&desc, " related to tags matching ", -1); |
| 1923 | 1925 | } |
| 1924 | - if( matchStyle==MS_LIKE ){ | |
| 1925 | - blob_append(&desc, " SQL LIKE pattern", -1); | |
| 1926 | - }else if( matchStyle==MS_GLOB ){ | |
| 1927 | - blob_append(&desc, " glob pattern", -1); | |
| 1928 | - }else/* if( matchStyle==MS_REGEXP )*/{ | |
| 1929 | - blob_append(&desc, " regular expression", -1); | |
| 1930 | - } | |
| 1931 | - if( tagMatchCount!=1 ){ | |
| 1932 | - blob_append(&desc, "s", 1); | |
| 1933 | - } | |
| 1934 | - blob_appendf(&desc, " (%h)", zThisTag); | |
| 1926 | + blob_append(&desc, zMatchDesc, -1); | |
| 1927 | +// if( matchStyle==MS_LIKE ){ | |
| 1928 | +// blob_append(&desc, " SQL LIKE pattern", -1); | |
| 1929 | +// }else if( matchStyle==MS_GLOB ){ | |
| 1930 | +// blob_append(&desc, " glob pattern", -1); | |
| 1931 | +// }else/* if( matchStyle==MS_REGEXP )*/{ | |
| 1932 | +// blob_append(&desc, " regular expression", -1); | |
| 1933 | +// } | |
| 1934 | +// if( tagMatchCount!=1 ){ | |
| 1935 | +// blob_append(&desc, "s", 1); | |
| 1936 | +// } | |
| 1937 | +// blob_appendf(&desc, " (%h)", zThisTag); | |
| 1935 | 1938 | }else if( zTagName ){ |
| 1936 | 1939 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1937 | 1940 | }else{ |
| 1938 | 1941 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1939 | 1942 | } |
| 1940 | 1943 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1241,29 +1241,34 @@ | |
| 1241 | ** the tag table to access the "tagname" column. |
| 1242 | ** |
| 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | ** |
| 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | */ |
| 1247 | static const char *tagMatchExpression( |
| 1248 | MatchStyle matchStyle, /* Match style code */ |
| 1249 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1250 | int *pCount /* Pointer to match pattern count variable */ |
| 1251 | ){ |
| 1252 | Blob blob = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ |
| 1253 | const char *zStart; /* Text at start of expression */ |
| 1254 | const char *zDelimiter; /* Text between expression terms */ |
| 1255 | const char *zEnd; /* Text at end of expression */ |
| 1256 | const char *zPrefix; /* Text before each match pattern */ |
| 1257 | const char *zSuffix; /* Text after each match pattern */ |
| 1258 | char cDel; /* Input delimiter character */ |
| 1259 | int i; /* Input match pattern length counter */ |
| 1260 | |
| 1261 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1262 | * numeric comparison. Bypass the remainder of this function. */ |
| 1263 | if( matchStyle==MS_EXACT ){ |
| 1264 | *pCount = 1; |
| 1265 | return mprintf("(tagid=%d)", db_int(-1, |
| 1266 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1267 | } |
| 1268 | |
| 1269 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | |
| 1285 | zEnd = ")$')"; |
| 1286 | zPrefix = ""; |
| 1287 | zSuffix = ""; |
| 1288 | } |
| 1289 | |
| 1290 | /* Convert the list of matches into an SQL expression. */ |
| 1291 | *pCount = 0; |
| 1292 | blob_zero(&blob); |
| 1293 | while( 1 ){ |
| 1294 | /* Skip leading delimiters. */ |
| 1295 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1296 | |
| 1297 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | |
| 1298 | if( !*zTag ){ |
| 1299 | /* Terminate loop at end of string. */ |
| 1300 | break; |
| 1301 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1302 | /* If word is quoted, prepare to stop at end quote. */ |
| 1303 | cDel = *zTag; |
| 1304 | ++zTag; |
| 1305 | }else{ |
| 1306 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1307 | cDel = ','; |
| 1308 | } |
| 1309 | |
| 1310 | /* Find the next delimiter character or end of string. */ |
| 1311 | for( i=0; zTag[i] && zTag[i]!=cDel; ++i ){ |
| 1312 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1313 | if( cDel==',' && fossil_isspace(zTag[i]) ){ |
| 1314 | break; |
| 1315 | } |
| 1316 | |
| 1317 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1318 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | |
| 1320 | } |
| 1321 | } |
| 1322 | |
| 1323 | /* Incorporate the match word into the output expression. The %q format is |
| 1324 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1325 | blob_appendf(&blob, "%s%s%#q%s", *pCount ? zDelimiter : zStart, |
| 1326 | zPrefix, i, zTag, zSuffix); |
| 1327 | |
| 1328 | /* Keep track of the number of match expressions. */ |
| 1329 | ++*pCount; |
| 1330 | |
| 1331 | /* Advance past all consumed input characters. */ |
| 1332 | zTag += i; |
| 1333 | if( cDel!=',' && *zTag==cDel ){ |
| 1334 | ++zTag; |
| 1335 | } |
| 1336 | } |
| 1337 | |
| 1338 | /* Finalize and extract the SQL expression. */ |
| 1339 | if( *pCount ){ |
| 1340 | blob_append(&blob, zEnd, -1); |
| 1341 | return blob_str(&blob); |
| 1342 | } |
| 1343 | |
| 1344 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1345 | return 0; |
| 1346 | } |
| @@ -1404,12 +1406,12 @@ | |
| 1404 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1405 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1406 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1407 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1408 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1409 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1410 | int tagMatchCount = 0; /* Number of tag match patterns */ |
| 1411 | const char *zSearch = P("s"); /* Search string */ |
| 1412 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1413 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1414 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1415 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | |
| 1488 | } |
| 1489 | } |
| 1490 | |
| 1491 | /* Construct the tag match expression. */ |
| 1492 | if( zThisTag ){ |
| 1493 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &tagMatchCount); |
| 1494 | } |
| 1495 | |
| 1496 | if( zTagName && g.perm.Read ){ |
| 1497 | style_submenu_element("Related", "Related", "%s", |
| 1498 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | |
| 1919 | if( zTagName ){ |
| 1920 | blob_append(&desc, " with tags matching ", -1); |
| 1921 | }else{ |
| 1922 | blob_append(&desc, " related to tags matching ", -1); |
| 1923 | } |
| 1924 | if( matchStyle==MS_LIKE ){ |
| 1925 | blob_append(&desc, " SQL LIKE pattern", -1); |
| 1926 | }else if( matchStyle==MS_GLOB ){ |
| 1927 | blob_append(&desc, " glob pattern", -1); |
| 1928 | }else/* if( matchStyle==MS_REGEXP )*/{ |
| 1929 | blob_append(&desc, " regular expression", -1); |
| 1930 | } |
| 1931 | if( tagMatchCount!=1 ){ |
| 1932 | blob_append(&desc, "s", 1); |
| 1933 | } |
| 1934 | blob_appendf(&desc, " (%h)", zThisTag); |
| 1935 | }else if( zTagName ){ |
| 1936 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1937 | }else{ |
| 1938 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1939 | } |
| 1940 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1241,29 +1241,34 @@ | |
| 1241 | ** the tag table to access the "tagname" column. |
| 1242 | ** |
| 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | ** |
| 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | ** |
| 1247 | ** In addition to assembling and returning an SQL expression, this function |
| 1248 | ** makes an English-language description of the patterns being matched, suitable |
| 1249 | ** for display in the web interface. |
| 1250 | */ |
| 1251 | static const char *tagMatchExpression( |
| 1252 | MatchStyle matchStyle, /* Match style code */ |
| 1253 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1254 | const char **zDesc /* Output expression description string */ |
| 1255 | ){ |
| 1256 | Blob expr = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ |
| 1257 | Blob desc = BLOB_INITIALIZER; /* English description of match patterns */ |
| 1258 | const char *zStart; /* Text at start of expression */ |
| 1259 | const char *zDelimiter; /* Text between expression terms */ |
| 1260 | const char *zEnd; /* Text at end of expression */ |
| 1261 | const char *zPrefix; /* Text before each match pattern */ |
| 1262 | const char *zSuffix; /* Text after each match pattern */ |
| 1263 | char cInputDelim; /* Input delimiter character */ |
| 1264 | char cDescDelim; /* Description delimiter character */ |
| 1265 | int i; /* Input match pattern length counter */ |
| 1266 | |
| 1267 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1268 | * numeric comparison. Bypass the remainder of this function. */ |
| 1269 | if( matchStyle==MS_EXACT ){ |
| 1270 | return mprintf("(tagid=%d)", db_int(-1, |
| 1271 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1272 | } |
| 1273 | |
| 1274 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | |
| 1290 | zEnd = ")$')"; |
| 1291 | zPrefix = ""; |
| 1292 | zSuffix = ""; |
| 1293 | } |
| 1294 | |
| 1295 | /* Convert the list of matches into an SQL expression and text description. */ |
| 1296 | blob_zero(&expr); |
| 1297 | blob_zero(&desc); |
| 1298 | while( 1 ){ |
| 1299 | /* Skip leading delimiters. */ |
| 1300 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1301 | |
| 1302 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | |
| 1303 | if( !*zTag ){ |
| 1304 | /* Terminate loop at end of string. */ |
| 1305 | break; |
| 1306 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1307 | /* If word is quoted, prepare to stop at end quote. */ |
| 1308 | cInputDelim = *zTag; |
| 1309 | ++zTag; |
| 1310 | }else{ |
| 1311 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1312 | cInputDelim = ','; |
| 1313 | } |
| 1314 | |
| 1315 | /* Find the next delimiter character or end of string. */ |
| 1316 | for( i=0; zTag[i] && zTag[i]!=cInputDelim; ++i ){ |
| 1317 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1318 | if( cInputDelim==',' && fossil_isspace(zTag[i]) ){ |
| 1319 | break; |
| 1320 | } |
| 1321 | |
| 1322 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1323 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | |
| 1325 | } |
| 1326 | } |
| 1327 | |
| 1328 | /* Incorporate the match word into the output expression. The %q format is |
| 1329 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1330 | blob_appendf(&expr, "%s%s%#q%s", blob_size(&expr) ? zDelimiter : zStart, |
| 1331 | zPrefix, i, zTag, zSuffix); |
| 1332 | |
| 1333 | /* Advance past all consumed input characters. */ |
| 1334 | zTag += i; |
| 1335 | if( cInputDelim!=',' && *zTag==cInputDelim ){ |
| 1336 | ++zTag; |
| 1337 | } |
| 1338 | } |
| 1339 | |
| 1340 | /* Finalize and extract the SQL expression. */ |
| 1341 | if( blob_size(&expr) ){ |
| 1342 | blob_append(&expr, zEnd, -1); |
| 1343 | return blob_str(&expr); |
| 1344 | } |
| 1345 | |
| 1346 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1347 | return 0; |
| 1348 | } |
| @@ -1404,12 +1406,12 @@ | |
| 1406 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1407 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1408 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1409 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1410 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1411 | const char *zMatchDesc = 0; /* Tag match expression description text */ |
| 1412 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1413 | const char *zSearch = P("s"); /* Search string */ |
| 1414 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1415 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1416 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1417 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | |
| 1490 | } |
| 1491 | } |
| 1492 | |
| 1493 | /* Construct the tag match expression. */ |
| 1494 | if( zThisTag ){ |
| 1495 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1496 | } |
| 1497 | |
| 1498 | if( zTagName && g.perm.Read ){ |
| 1499 | style_submenu_element("Related", "Related", "%s", |
| 1500 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | |
| 1921 | if( zTagName ){ |
| 1922 | blob_append(&desc, " with tags matching ", -1); |
| 1923 | }else{ |
| 1924 | blob_append(&desc, " related to tags matching ", -1); |
| 1925 | } |
| 1926 | blob_append(&desc, zMatchDesc, -1); |
| 1927 | // if( matchStyle==MS_LIKE ){ |
| 1928 | // blob_append(&desc, " SQL LIKE pattern", -1); |
| 1929 | // }else if( matchStyle==MS_GLOB ){ |
| 1930 | // blob_append(&desc, " glob pattern", -1); |
| 1931 | // }else/* if( matchStyle==MS_REGEXP )*/{ |
| 1932 | // blob_append(&desc, " regular expression", -1); |
| 1933 | // } |
| 1934 | // if( tagMatchCount!=1 ){ |
| 1935 | // blob_append(&desc, "s", 1); |
| 1936 | // } |
| 1937 | // blob_appendf(&desc, " (%h)", zThisTag); |
| 1938 | }else if( zTagName ){ |
| 1939 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1940 | }else{ |
| 1941 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1942 | } |
| 1943 |
+35
-32
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1241,29 +1241,34 @@ | ||
| 1241 | 1241 | ** the tag table to access the "tagname" column. |
| 1242 | 1242 | ** |
| 1243 | 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | 1244 | ** |
| 1245 | 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | +** | |
| 1247 | +** In addition to assembling and returning an SQL expression, this function | |
| 1248 | +** makes an English-language description of the patterns being matched, suitable | |
| 1249 | +** for display in the web interface. | |
| 1246 | 1250 | */ |
| 1247 | 1251 | static const char *tagMatchExpression( |
| 1248 | 1252 | MatchStyle matchStyle, /* Match style code */ |
| 1249 | 1253 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1250 | - int *pCount /* Pointer to match pattern count variable */ | |
| 1254 | + const char **zDesc /* Output expression description string */ | |
| 1251 | 1255 | ){ |
| 1252 | - Blob blob = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ | |
| 1256 | + Blob expr = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ | |
| 1257 | + Blob desc = BLOB_INITIALIZER; /* English description of match patterns */ | |
| 1253 | 1258 | const char *zStart; /* Text at start of expression */ |
| 1254 | 1259 | const char *zDelimiter; /* Text between expression terms */ |
| 1255 | 1260 | const char *zEnd; /* Text at end of expression */ |
| 1256 | 1261 | const char *zPrefix; /* Text before each match pattern */ |
| 1257 | 1262 | const char *zSuffix; /* Text after each match pattern */ |
| 1258 | - char cDel; /* Input delimiter character */ | |
| 1263 | + char cInputDelim; /* Input delimiter character */ | |
| 1264 | + char cDescDelim; /* Description delimiter character */ | |
| 1259 | 1265 | int i; /* Input match pattern length counter */ |
| 1260 | 1266 | |
| 1261 | 1267 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1262 | 1268 | * numeric comparison. Bypass the remainder of this function. */ |
| 1263 | 1269 | if( matchStyle==MS_EXACT ){ |
| 1264 | - *pCount = 1; | |
| 1265 | 1270 | return mprintf("(tagid=%d)", db_int(-1, |
| 1266 | 1271 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1267 | 1272 | } |
| 1268 | 1273 | |
| 1269 | 1274 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | ||
| 1285 | 1290 | zEnd = ")$')"; |
| 1286 | 1291 | zPrefix = ""; |
| 1287 | 1292 | zSuffix = ""; |
| 1288 | 1293 | } |
| 1289 | 1294 | |
| 1290 | - /* Convert the list of matches into an SQL expression. */ | |
| 1291 | - *pCount = 0; | |
| 1292 | - blob_zero(&blob); | |
| 1295 | + /* Convert the list of matches into an SQL expression and text description. */ | |
| 1296 | + blob_zero(&expr); | |
| 1297 | + blob_zero(&desc); | |
| 1293 | 1298 | while( 1 ){ |
| 1294 | 1299 | /* Skip leading delimiters. */ |
| 1295 | 1300 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1296 | 1301 | |
| 1297 | 1302 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | ||
| 1298 | 1303 | if( !*zTag ){ |
| 1299 | 1304 | /* Terminate loop at end of string. */ |
| 1300 | 1305 | break; |
| 1301 | 1306 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1302 | 1307 | /* If word is quoted, prepare to stop at end quote. */ |
| 1303 | - cDel = *zTag; | |
| 1308 | + cInputDelim = *zTag; | |
| 1304 | 1309 | ++zTag; |
| 1305 | 1310 | }else{ |
| 1306 | 1311 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1307 | - cDel = ','; | |
| 1312 | + cInputDelim = ','; | |
| 1308 | 1313 | } |
| 1309 | 1314 | |
| 1310 | 1315 | /* Find the next delimiter character or end of string. */ |
| 1311 | - for( i=0; zTag[i] && zTag[i]!=cDel; ++i ){ | |
| 1316 | + for( i=0; zTag[i] && zTag[i]!=cInputDelim; ++i ){ | |
| 1312 | 1317 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1313 | - if( cDel==',' && fossil_isspace(zTag[i]) ){ | |
| 1318 | + if( cInputDelim==',' && fossil_isspace(zTag[i]) ){ | |
| 1314 | 1319 | break; |
| 1315 | 1320 | } |
| 1316 | 1321 | |
| 1317 | 1322 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1318 | 1323 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | ||
| 1320 | 1325 | } |
| 1321 | 1326 | } |
| 1322 | 1327 | |
| 1323 | 1328 | /* Incorporate the match word into the output expression. The %q format is |
| 1324 | 1329 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1325 | - blob_appendf(&blob, "%s%s%#q%s", *pCount ? zDelimiter : zStart, | |
| 1330 | + blob_appendf(&expr, "%s%s%#q%s", blob_size(&expr) ? zDelimiter : zStart, | |
| 1326 | 1331 | zPrefix, i, zTag, zSuffix); |
| 1327 | 1332 | |
| 1328 | - /* Keep track of the number of match expressions. */ | |
| 1329 | - ++*pCount; | |
| 1330 | - | |
| 1331 | 1333 | /* Advance past all consumed input characters. */ |
| 1332 | 1334 | zTag += i; |
| 1333 | - if( cDel!=',' && *zTag==cDel ){ | |
| 1335 | + if( cInputDelim!=',' && *zTag==cInputDelim ){ | |
| 1334 | 1336 | ++zTag; |
| 1335 | 1337 | } |
| 1336 | 1338 | } |
| 1337 | 1339 | |
| 1338 | 1340 | /* Finalize and extract the SQL expression. */ |
| 1339 | - if( *pCount ){ | |
| 1340 | - blob_append(&blob, zEnd, -1); | |
| 1341 | - return blob_str(&blob); | |
| 1341 | + if( blob_size(&expr) ){ | |
| 1342 | + blob_append(&expr, zEnd, -1); | |
| 1343 | + return blob_str(&expr); | |
| 1342 | 1344 | } |
| 1343 | 1345 | |
| 1344 | 1346 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1345 | 1347 | return 0; |
| 1346 | 1348 | } |
| @@ -1404,12 +1406,12 @@ | ||
| 1404 | 1406 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1405 | 1407 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1406 | 1408 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1407 | 1409 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1408 | 1410 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1411 | + const char *zMatchDesc = 0; /* Tag match expression description text */ | |
| 1409 | 1412 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1410 | - int tagMatchCount = 0; /* Number of tag match patterns */ | |
| 1411 | 1413 | const char *zSearch = P("s"); /* Search string */ |
| 1412 | 1414 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1413 | 1415 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1414 | 1416 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1415 | 1417 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | ||
| 1488 | 1490 | } |
| 1489 | 1491 | } |
| 1490 | 1492 | |
| 1491 | 1493 | /* Construct the tag match expression. */ |
| 1492 | 1494 | if( zThisTag ){ |
| 1493 | - zTagSql = tagMatchExpression(matchStyle, zThisTag, &tagMatchCount); | |
| 1495 | + zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); | |
| 1494 | 1496 | } |
| 1495 | 1497 | |
| 1496 | 1498 | if( zTagName && g.perm.Read ){ |
| 1497 | 1499 | style_submenu_element("Related", "Related", "%s", |
| 1498 | 1500 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | ||
| 1919 | 1921 | if( zTagName ){ |
| 1920 | 1922 | blob_append(&desc, " with tags matching ", -1); |
| 1921 | 1923 | }else{ |
| 1922 | 1924 | blob_append(&desc, " related to tags matching ", -1); |
| 1923 | 1925 | } |
| 1924 | - if( matchStyle==MS_LIKE ){ | |
| 1925 | - blob_append(&desc, " SQL LIKE pattern", -1); | |
| 1926 | - }else if( matchStyle==MS_GLOB ){ | |
| 1927 | - blob_append(&desc, " glob pattern", -1); | |
| 1928 | - }else/* if( matchStyle==MS_REGEXP )*/{ | |
| 1929 | - blob_append(&desc, " regular expression", -1); | |
| 1930 | - } | |
| 1931 | - if( tagMatchCount!=1 ){ | |
| 1932 | - blob_append(&desc, "s", 1); | |
| 1933 | - } | |
| 1934 | - blob_appendf(&desc, " (%h)", zThisTag); | |
| 1926 | + blob_append(&desc, zMatchDesc, -1); | |
| 1927 | +// if( matchStyle==MS_LIKE ){ | |
| 1928 | +// blob_append(&desc, " SQL LIKE pattern", -1); | |
| 1929 | +// }else if( matchStyle==MS_GLOB ){ | |
| 1930 | +// blob_append(&desc, " glob pattern", -1); | |
| 1931 | +// }else/* if( matchStyle==MS_REGEXP )*/{ | |
| 1932 | +// blob_append(&desc, " regular expression", -1); | |
| 1933 | +// } | |
| 1934 | +// if( tagMatchCount!=1 ){ | |
| 1935 | +// blob_append(&desc, "s", 1); | |
| 1936 | +// } | |
| 1937 | +// blob_appendf(&desc, " (%h)", zThisTag); | |
| 1935 | 1938 | }else if( zTagName ){ |
| 1936 | 1939 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1937 | 1940 | }else{ |
| 1938 | 1941 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1939 | 1942 | } |
| 1940 | 1943 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1241,29 +1241,34 @@ | |
| 1241 | ** the tag table to access the "tagname" column. |
| 1242 | ** |
| 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | ** |
| 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | */ |
| 1247 | static const char *tagMatchExpression( |
| 1248 | MatchStyle matchStyle, /* Match style code */ |
| 1249 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1250 | int *pCount /* Pointer to match pattern count variable */ |
| 1251 | ){ |
| 1252 | Blob blob = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ |
| 1253 | const char *zStart; /* Text at start of expression */ |
| 1254 | const char *zDelimiter; /* Text between expression terms */ |
| 1255 | const char *zEnd; /* Text at end of expression */ |
| 1256 | const char *zPrefix; /* Text before each match pattern */ |
| 1257 | const char *zSuffix; /* Text after each match pattern */ |
| 1258 | char cDel; /* Input delimiter character */ |
| 1259 | int i; /* Input match pattern length counter */ |
| 1260 | |
| 1261 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1262 | * numeric comparison. Bypass the remainder of this function. */ |
| 1263 | if( matchStyle==MS_EXACT ){ |
| 1264 | *pCount = 1; |
| 1265 | return mprintf("(tagid=%d)", db_int(-1, |
| 1266 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1267 | } |
| 1268 | |
| 1269 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | |
| 1285 | zEnd = ")$')"; |
| 1286 | zPrefix = ""; |
| 1287 | zSuffix = ""; |
| 1288 | } |
| 1289 | |
| 1290 | /* Convert the list of matches into an SQL expression. */ |
| 1291 | *pCount = 0; |
| 1292 | blob_zero(&blob); |
| 1293 | while( 1 ){ |
| 1294 | /* Skip leading delimiters. */ |
| 1295 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1296 | |
| 1297 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | |
| 1298 | if( !*zTag ){ |
| 1299 | /* Terminate loop at end of string. */ |
| 1300 | break; |
| 1301 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1302 | /* If word is quoted, prepare to stop at end quote. */ |
| 1303 | cDel = *zTag; |
| 1304 | ++zTag; |
| 1305 | }else{ |
| 1306 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1307 | cDel = ','; |
| 1308 | } |
| 1309 | |
| 1310 | /* Find the next delimiter character or end of string. */ |
| 1311 | for( i=0; zTag[i] && zTag[i]!=cDel; ++i ){ |
| 1312 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1313 | if( cDel==',' && fossil_isspace(zTag[i]) ){ |
| 1314 | break; |
| 1315 | } |
| 1316 | |
| 1317 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1318 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | |
| 1320 | } |
| 1321 | } |
| 1322 | |
| 1323 | /* Incorporate the match word into the output expression. The %q format is |
| 1324 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1325 | blob_appendf(&blob, "%s%s%#q%s", *pCount ? zDelimiter : zStart, |
| 1326 | zPrefix, i, zTag, zSuffix); |
| 1327 | |
| 1328 | /* Keep track of the number of match expressions. */ |
| 1329 | ++*pCount; |
| 1330 | |
| 1331 | /* Advance past all consumed input characters. */ |
| 1332 | zTag += i; |
| 1333 | if( cDel!=',' && *zTag==cDel ){ |
| 1334 | ++zTag; |
| 1335 | } |
| 1336 | } |
| 1337 | |
| 1338 | /* Finalize and extract the SQL expression. */ |
| 1339 | if( *pCount ){ |
| 1340 | blob_append(&blob, zEnd, -1); |
| 1341 | return blob_str(&blob); |
| 1342 | } |
| 1343 | |
| 1344 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1345 | return 0; |
| 1346 | } |
| @@ -1404,12 +1406,12 @@ | |
| 1404 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1405 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1406 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1407 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1408 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1409 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1410 | int tagMatchCount = 0; /* Number of tag match patterns */ |
| 1411 | const char *zSearch = P("s"); /* Search string */ |
| 1412 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1413 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1414 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1415 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | |
| 1488 | } |
| 1489 | } |
| 1490 | |
| 1491 | /* Construct the tag match expression. */ |
| 1492 | if( zThisTag ){ |
| 1493 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &tagMatchCount); |
| 1494 | } |
| 1495 | |
| 1496 | if( zTagName && g.perm.Read ){ |
| 1497 | style_submenu_element("Related", "Related", "%s", |
| 1498 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | |
| 1919 | if( zTagName ){ |
| 1920 | blob_append(&desc, " with tags matching ", -1); |
| 1921 | }else{ |
| 1922 | blob_append(&desc, " related to tags matching ", -1); |
| 1923 | } |
| 1924 | if( matchStyle==MS_LIKE ){ |
| 1925 | blob_append(&desc, " SQL LIKE pattern", -1); |
| 1926 | }else if( matchStyle==MS_GLOB ){ |
| 1927 | blob_append(&desc, " glob pattern", -1); |
| 1928 | }else/* if( matchStyle==MS_REGEXP )*/{ |
| 1929 | blob_append(&desc, " regular expression", -1); |
| 1930 | } |
| 1931 | if( tagMatchCount!=1 ){ |
| 1932 | blob_append(&desc, "s", 1); |
| 1933 | } |
| 1934 | blob_appendf(&desc, " (%h)", zThisTag); |
| 1935 | }else if( zTagName ){ |
| 1936 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1937 | }else{ |
| 1938 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1939 | } |
| 1940 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1241,29 +1241,34 @@ | |
| 1241 | ** the tag table to access the "tagname" column. |
| 1242 | ** |
| 1243 | ** Each pattern is adjusted to to start with "sym-" and be anchored at end. |
| 1244 | ** |
| 1245 | ** In MS_REGEXP mode, backslash can be used to protect delimiter characters. |
| 1246 | ** |
| 1247 | ** In addition to assembling and returning an SQL expression, this function |
| 1248 | ** makes an English-language description of the patterns being matched, suitable |
| 1249 | ** for display in the web interface. |
| 1250 | */ |
| 1251 | static const char *tagMatchExpression( |
| 1252 | MatchStyle matchStyle, /* Match style code */ |
| 1253 | const char *zTag, /* Tag name, match pattern, or list of patterns */ |
| 1254 | const char **zDesc /* Output expression description string */ |
| 1255 | ){ |
| 1256 | Blob expr = BLOB_INITIALIZER; /* SQL expression string assembly buffer */ |
| 1257 | Blob desc = BLOB_INITIALIZER; /* English description of match patterns */ |
| 1258 | const char *zStart; /* Text at start of expression */ |
| 1259 | const char *zDelimiter; /* Text between expression terms */ |
| 1260 | const char *zEnd; /* Text at end of expression */ |
| 1261 | const char *zPrefix; /* Text before each match pattern */ |
| 1262 | const char *zSuffix; /* Text after each match pattern */ |
| 1263 | char cInputDelim; /* Input delimiter character */ |
| 1264 | char cDescDelim; /* Description delimiter character */ |
| 1265 | int i; /* Input match pattern length counter */ |
| 1266 | |
| 1267 | /* Optimize exact matches by looking up the ID in advance to create a simple |
| 1268 | * numeric comparison. Bypass the remainder of this function. */ |
| 1269 | if( matchStyle==MS_EXACT ){ |
| 1270 | return mprintf("(tagid=%d)", db_int(-1, |
| 1271 | "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag)); |
| 1272 | } |
| 1273 | |
| 1274 | /* Decide pattern prefix and suffix strings according to match style. */ |
| @@ -1285,13 +1290,13 @@ | |
| 1290 | zEnd = ")$')"; |
| 1291 | zPrefix = ""; |
| 1292 | zSuffix = ""; |
| 1293 | } |
| 1294 | |
| 1295 | /* Convert the list of matches into an SQL expression and text description. */ |
| 1296 | blob_zero(&expr); |
| 1297 | blob_zero(&desc); |
| 1298 | while( 1 ){ |
| 1299 | /* Skip leading delimiters. */ |
| 1300 | for( ; fossil_isspace(*zTag) || *zTag==','; ++zTag ); |
| 1301 | |
| 1302 | /* Next non-delimiter character determines quoting. */ |
| @@ -1298,21 +1303,21 @@ | |
| 1303 | if( !*zTag ){ |
| 1304 | /* Terminate loop at end of string. */ |
| 1305 | break; |
| 1306 | }else if( *zTag=='\'' || *zTag=='"' ){ |
| 1307 | /* If word is quoted, prepare to stop at end quote. */ |
| 1308 | cInputDelim = *zTag; |
| 1309 | ++zTag; |
| 1310 | }else{ |
| 1311 | /* If word is not quoted, prepare to stop at delimiter. */ |
| 1312 | cInputDelim = ','; |
| 1313 | } |
| 1314 | |
| 1315 | /* Find the next delimiter character or end of string. */ |
| 1316 | for( i=0; zTag[i] && zTag[i]!=cInputDelim; ++i ){ |
| 1317 | /* If delimiter is comma, also recognize spaces as delimiters. */ |
| 1318 | if( cInputDelim==',' && fossil_isspace(zTag[i]) ){ |
| 1319 | break; |
| 1320 | } |
| 1321 | |
| 1322 | /* In regexp mode, ignore delimiters following backslashes. */ |
| 1323 | if( matchStyle==MS_REGEXP && zTag[i]=='\\' && zTag[i+1] ){ |
| @@ -1320,27 +1325,24 @@ | |
| 1325 | } |
| 1326 | } |
| 1327 | |
| 1328 | /* Incorporate the match word into the output expression. The %q format is |
| 1329 | * used to protect against SQL injection attacks by replacing ' with ''. */ |
| 1330 | blob_appendf(&expr, "%s%s%#q%s", blob_size(&expr) ? zDelimiter : zStart, |
| 1331 | zPrefix, i, zTag, zSuffix); |
| 1332 | |
| 1333 | /* Advance past all consumed input characters. */ |
| 1334 | zTag += i; |
| 1335 | if( cInputDelim!=',' && *zTag==cInputDelim ){ |
| 1336 | ++zTag; |
| 1337 | } |
| 1338 | } |
| 1339 | |
| 1340 | /* Finalize and extract the SQL expression. */ |
| 1341 | if( blob_size(&expr) ){ |
| 1342 | blob_append(&expr, zEnd, -1); |
| 1343 | return blob_str(&expr); |
| 1344 | } |
| 1345 | |
| 1346 | /* If execution reaches this point, the pattern was empty. Return NULL. */ |
| 1347 | return 0; |
| 1348 | } |
| @@ -1404,12 +1406,12 @@ | |
| 1406 | const char *zMark = P("m"); /* Mark this event or an event this time */ |
| 1407 | const char *zTagName = P("t"); /* Show events with this tag */ |
| 1408 | const char *zBrName = P("r"); /* Show events related to this tag */ |
| 1409 | const char *zMatchStyle = P("ms"); /* Tag/branch match style string */ |
| 1410 | MatchStyle matchStyle = MS_EXACT; /* Match style code */ |
| 1411 | const char *zMatchDesc = 0; /* Tag match expression description text */ |
| 1412 | const char *zTagSql = 0; /* Tag/branch match SQL expression */ |
| 1413 | const char *zSearch = P("s"); /* Search string */ |
| 1414 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1415 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1416 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1417 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| @@ -1488,11 +1490,11 @@ | |
| 1490 | } |
| 1491 | } |
| 1492 | |
| 1493 | /* Construct the tag match expression. */ |
| 1494 | if( zThisTag ){ |
| 1495 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1496 | } |
| 1497 | |
| 1498 | if( zTagName && g.perm.Read ){ |
| 1499 | style_submenu_element("Related", "Related", "%s", |
| 1500 | url_render(&url, "r", zTagName, "t", 0)); |
| @@ -1919,21 +1921,22 @@ | |
| 1921 | if( zTagName ){ |
| 1922 | blob_append(&desc, " with tags matching ", -1); |
| 1923 | }else{ |
| 1924 | blob_append(&desc, " related to tags matching ", -1); |
| 1925 | } |
| 1926 | blob_append(&desc, zMatchDesc, -1); |
| 1927 | // if( matchStyle==MS_LIKE ){ |
| 1928 | // blob_append(&desc, " SQL LIKE pattern", -1); |
| 1929 | // }else if( matchStyle==MS_GLOB ){ |
| 1930 | // blob_append(&desc, " glob pattern", -1); |
| 1931 | // }else/* if( matchStyle==MS_REGEXP )*/{ |
| 1932 | // blob_append(&desc, " regular expression", -1); |
| 1933 | // } |
| 1934 | // if( tagMatchCount!=1 ){ |
| 1935 | // blob_append(&desc, "s", 1); |
| 1936 | // } |
| 1937 | // blob_appendf(&desc, " (%h)", zThisTag); |
| 1938 | }else if( zTagName ){ |
| 1939 | blob_appendf(&desc, " tagged with \"%h\"", zTagName); |
| 1940 | }else{ |
| 1941 | blob_appendf(&desc, " related to \"%h\"", zBrName); |
| 1942 | } |
| 1943 |
+2
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -546,12 +546,13 @@ | ||
| 546 | 546 | Blob *pTicket, /* The text of the ticket change record */ |
| 547 | 547 | const char *zTktId, /* The ticket to which this change is applied */ |
| 548 | 548 | int needMod /* True if moderation is needed */ |
| 549 | 549 | ){ |
| 550 | 550 | int result; |
| 551 | + int rid; | |
| 551 | 552 | manifest_crosslink_begin(); |
| 552 | - int rid = content_put_ex(pTicket, 0, 0, 0, needMod); | |
| 553 | + rid = content_put_ex(pTicket, 0, 0, 0, needMod); | |
| 553 | 554 | if( rid==0 ){ |
| 554 | 555 | fossil_fatal("trouble committing ticket: %s", g.zErrMsg); |
| 555 | 556 | } |
| 556 | 557 | if( needMod ){ |
| 557 | 558 | moderation_table_create(); |
| 558 | 559 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -546,12 +546,13 @@ | |
| 546 | Blob *pTicket, /* The text of the ticket change record */ |
| 547 | const char *zTktId, /* The ticket to which this change is applied */ |
| 548 | int needMod /* True if moderation is needed */ |
| 549 | ){ |
| 550 | int result; |
| 551 | manifest_crosslink_begin(); |
| 552 | int rid = content_put_ex(pTicket, 0, 0, 0, needMod); |
| 553 | if( rid==0 ){ |
| 554 | fossil_fatal("trouble committing ticket: %s", g.zErrMsg); |
| 555 | } |
| 556 | if( needMod ){ |
| 557 | moderation_table_create(); |
| 558 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -546,12 +546,13 @@ | |
| 546 | Blob *pTicket, /* The text of the ticket change record */ |
| 547 | const char *zTktId, /* The ticket to which this change is applied */ |
| 548 | int needMod /* True if moderation is needed */ |
| 549 | ){ |
| 550 | int result; |
| 551 | int rid; |
| 552 | manifest_crosslink_begin(); |
| 553 | rid = content_put_ex(pTicket, 0, 0, 0, needMod); |
| 554 | if( rid==0 ){ |
| 555 | fossil_fatal("trouble committing ticket: %s", g.zErrMsg); |
| 556 | } |
| 557 | if( needMod ){ |
| 558 | moderation_table_create(); |
| 559 |
+11
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,12 +1,15 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | -<h2>Changes for Version 1.37 (2016-00-00)</h2> | |
| 3 | +<a name='v1_37'></a> | |
| 4 | +<h2>Changes for Version 1.37 (2017-XX-YY)</h2> | |
| 4 | 5 | |
| 5 | 6 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 6 | 7 | [/help?cmd=/timeline|/timeline] webpage. |
| 8 | + * Fix a C89-ism that previous the 1.36 release from building with MSVC. | |
| 7 | 9 | |
| 10 | +<a name='v1_36'></a> | |
| 8 | 11 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 9 | 12 | |
| 10 | 13 | * Add support for [./unvers.wiki|unversioned content], |
| 11 | 14 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 12 | 15 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | ||
| 33 | 36 | able to pull from their parent but not push. |
| 34 | 37 | * Added the -nocomplain option to the TH1 "query" command. |
| 35 | 38 | * Added support for the chng=GLOBLIST query parameter on the |
| 36 | 39 | [/help?cmd=/timeline|/timeline] webpage. |
| 37 | 40 | |
| 41 | +<a name='v1_35'></a> | |
| 38 | 42 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 39 | 43 | |
| 40 | 44 | * Enable symlinks by default on all non-Windows platforms. |
| 41 | 45 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 42 | 46 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | ||
| 76 | 80 | names in place of getpass() to read passwords and passphrases |
| 77 | 81 | * Option --baseurl now works on Windows. |
| 78 | 82 | * Numerious documentation improvements. |
| 79 | 83 | * Update the built-in SQLite to version 3.13.0. |
| 80 | 84 | |
| 85 | +<a name='v1_34'></a> | |
| 81 | 86 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 82 | 87 | |
| 83 | 88 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 84 | 89 | than 10MiB. |
| 85 | 90 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | ||
| 111 | 116 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 112 | 117 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 113 | 118 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 114 | 119 | support (both currently unused within Fossil). |
| 115 | 120 | |
| 121 | +<a name='v1_33'></a> | |
| 116 | 122 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 117 | 123 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 118 | 124 | [/help?cmd=status|fossil status] and related commands. |
| 119 | 125 | * Change the default skin to what used to be called "San Francisco Modern". |
| 120 | 126 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | ||
| 160 | 166 | field for direct entry of the user name to each applicable report. |
| 161 | 167 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 162 | 168 | already exist. |
| 163 | 169 | * Inhibit timeline links to wiki pages that have been deleted. |
| 164 | 170 | |
| 171 | +<a name='v1_33'></a> | |
| 165 | 172 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 166 | 173 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 167 | 174 | that the new repository is fully compatible with historical versions of |
| 168 | 175 | Fossil by having a valid manifest as RID 1. |
| 169 | 176 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | ||
| 176 | 183 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 177 | 184 | ranges, separate by spaces (or "+" when URL-encoded). |
| 178 | 185 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 179 | 186 | [/help?cmd=rm|fossil rm]. |
| 180 | 187 | |
| 188 | +<a name='v1_31'></a> | |
| 181 | 189 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 182 | 190 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 183 | 191 | columns to the schema, to support better drawing of file change graphs. |
| 184 | 192 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 185 | 193 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | ||
| 227 | 235 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 228 | 236 | ticket reports. |
| 229 | 237 | * Break out the components (css, footer, and header) for the |
| 230 | 238 | various built-in skins into separate files in the source tree. |
| 231 | 239 | |
| 240 | +<a name='v1_30'></a> | |
| 232 | 241 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 233 | 242 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 234 | 243 | * Added the [/help?cmd=purge|fossil purge] command. |
| 235 | 244 | * Added the [/help?cmd=publish|fossil publish] command. |
| 236 | 245 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | ||
| 297 | 306 | the correctness of printf-style formatting strings. |
| 298 | 307 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 299 | 308 | * Numerous documentation fixes and improvements. |
| 300 | 309 | * Other obscure and minor bug fixes - see the timeline for details. |
| 301 | 310 | |
| 311 | +<a name='v1_29'></a> | |
| 302 | 312 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 303 | 313 | * Add the ability to display content, diffs and annotations for UTF16 |
| 304 | 314 | text files in the web interface. |
| 305 | 315 | * Add the "SaveAs..." and "Invert" buttons |
| 306 | 316 | to the graphical diff display that results |
| 307 | 317 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,12 +1,15 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes for Version 1.37 (2016-00-00)</h2> |
| 4 | |
| 5 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 6 | [/help?cmd=/timeline|/timeline] webpage. |
| 7 | |
| 8 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 9 | |
| 10 | * Add support for [./unvers.wiki|unversioned content], |
| 11 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 12 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | |
| 33 | able to pull from their parent but not push. |
| 34 | * Added the -nocomplain option to the TH1 "query" command. |
| 35 | * Added support for the chng=GLOBLIST query parameter on the |
| 36 | [/help?cmd=/timeline|/timeline] webpage. |
| 37 | |
| 38 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 39 | |
| 40 | * Enable symlinks by default on all non-Windows platforms. |
| 41 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 42 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | |
| 76 | names in place of getpass() to read passwords and passphrases |
| 77 | * Option --baseurl now works on Windows. |
| 78 | * Numerious documentation improvements. |
| 79 | * Update the built-in SQLite to version 3.13.0. |
| 80 | |
| 81 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 82 | |
| 83 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 84 | than 10MiB. |
| 85 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | |
| 111 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 112 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 113 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 114 | support (both currently unused within Fossil). |
| 115 | |
| 116 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 117 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 118 | [/help?cmd=status|fossil status] and related commands. |
| 119 | * Change the default skin to what used to be called "San Francisco Modern". |
| 120 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | |
| 160 | field for direct entry of the user name to each applicable report. |
| 161 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 162 | already exist. |
| 163 | * Inhibit timeline links to wiki pages that have been deleted. |
| 164 | |
| 165 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 166 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 167 | that the new repository is fully compatible with historical versions of |
| 168 | Fossil by having a valid manifest as RID 1. |
| 169 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | |
| 176 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 177 | ranges, separate by spaces (or "+" when URL-encoded). |
| 178 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 179 | [/help?cmd=rm|fossil rm]. |
| 180 | |
| 181 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 182 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 183 | columns to the schema, to support better drawing of file change graphs. |
| 184 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 185 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | |
| 227 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 228 | ticket reports. |
| 229 | * Break out the components (css, footer, and header) for the |
| 230 | various built-in skins into separate files in the source tree. |
| 231 | |
| 232 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 233 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 234 | * Added the [/help?cmd=purge|fossil purge] command. |
| 235 | * Added the [/help?cmd=publish|fossil publish] command. |
| 236 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | |
| 297 | the correctness of printf-style formatting strings. |
| 298 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 299 | * Numerous documentation fixes and improvements. |
| 300 | * Other obscure and minor bug fixes - see the timeline for details. |
| 301 | |
| 302 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 303 | * Add the ability to display content, diffs and annotations for UTF16 |
| 304 | text files in the web interface. |
| 305 | * Add the "SaveAs..." and "Invert" buttons |
| 306 | to the graphical diff display that results |
| 307 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,12 +1,15 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v1_37'></a> |
| 4 | <h2>Changes for Version 1.37 (2017-XX-YY)</h2> |
| 5 | |
| 6 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 7 | [/help?cmd=/timeline|/timeline] webpage. |
| 8 | * Fix a C89-ism that previous the 1.36 release from building with MSVC. |
| 9 | |
| 10 | <a name='v1_36'></a> |
| 11 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 12 | |
| 13 | * Add support for [./unvers.wiki|unversioned content], |
| 14 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 15 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | |
| 36 | able to pull from their parent but not push. |
| 37 | * Added the -nocomplain option to the TH1 "query" command. |
| 38 | * Added support for the chng=GLOBLIST query parameter on the |
| 39 | [/help?cmd=/timeline|/timeline] webpage. |
| 40 | |
| 41 | <a name='v1_35'></a> |
| 42 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 43 | |
| 44 | * Enable symlinks by default on all non-Windows platforms. |
| 45 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 46 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | |
| 80 | names in place of getpass() to read passwords and passphrases |
| 81 | * Option --baseurl now works on Windows. |
| 82 | * Numerious documentation improvements. |
| 83 | * Update the built-in SQLite to version 3.13.0. |
| 84 | |
| 85 | <a name='v1_34'></a> |
| 86 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 87 | |
| 88 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 89 | than 10MiB. |
| 90 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | |
| 116 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 117 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 118 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 119 | support (both currently unused within Fossil). |
| 120 | |
| 121 | <a name='v1_33'></a> |
| 122 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 123 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 124 | [/help?cmd=status|fossil status] and related commands. |
| 125 | * Change the default skin to what used to be called "San Francisco Modern". |
| 126 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | |
| 166 | field for direct entry of the user name to each applicable report. |
| 167 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 168 | already exist. |
| 169 | * Inhibit timeline links to wiki pages that have been deleted. |
| 170 | |
| 171 | <a name='v1_33'></a> |
| 172 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 173 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 174 | that the new repository is fully compatible with historical versions of |
| 175 | Fossil by having a valid manifest as RID 1. |
| 176 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | |
| 183 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 184 | ranges, separate by spaces (or "+" when URL-encoded). |
| 185 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 186 | [/help?cmd=rm|fossil rm]. |
| 187 | |
| 188 | <a name='v1_31'></a> |
| 189 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 190 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 191 | columns to the schema, to support better drawing of file change graphs. |
| 192 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 193 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | |
| 235 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 236 | ticket reports. |
| 237 | * Break out the components (css, footer, and header) for the |
| 238 | various built-in skins into separate files in the source tree. |
| 239 | |
| 240 | <a name='v1_30'></a> |
| 241 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 242 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 243 | * Added the [/help?cmd=purge|fossil purge] command. |
| 244 | * Added the [/help?cmd=publish|fossil publish] command. |
| 245 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | |
| 306 | the correctness of printf-style formatting strings. |
| 307 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 308 | * Numerous documentation fixes and improvements. |
| 309 | * Other obscure and minor bug fixes - see the timeline for details. |
| 310 | |
| 311 | <a name='v1_29'></a> |
| 312 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 313 | * Add the ability to display content, diffs and annotations for UTF16 |
| 314 | text files in the web interface. |
| 315 | * Add the "SaveAs..." and "Invert" buttons |
| 316 | to the graphical diff display that results |
| 317 |
+11
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,12 +1,15 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | -<h2>Changes for Version 1.37 (2016-00-00)</h2> | |
| 3 | +<a name='v1_37'></a> | |
| 4 | +<h2>Changes for Version 1.37 (2017-XX-YY)</h2> | |
| 4 | 5 | |
| 5 | 6 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 6 | 7 | [/help?cmd=/timeline|/timeline] webpage. |
| 8 | + * Fix a C89-ism that previous the 1.36 release from building with MSVC. | |
| 7 | 9 | |
| 10 | +<a name='v1_36'></a> | |
| 8 | 11 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 9 | 12 | |
| 10 | 13 | * Add support for [./unvers.wiki|unversioned content], |
| 11 | 14 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 12 | 15 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | ||
| 33 | 36 | able to pull from their parent but not push. |
| 34 | 37 | * Added the -nocomplain option to the TH1 "query" command. |
| 35 | 38 | * Added support for the chng=GLOBLIST query parameter on the |
| 36 | 39 | [/help?cmd=/timeline|/timeline] webpage. |
| 37 | 40 | |
| 41 | +<a name='v1_35'></a> | |
| 38 | 42 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 39 | 43 | |
| 40 | 44 | * Enable symlinks by default on all non-Windows platforms. |
| 41 | 45 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 42 | 46 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | ||
| 76 | 80 | names in place of getpass() to read passwords and passphrases |
| 77 | 81 | * Option --baseurl now works on Windows. |
| 78 | 82 | * Numerious documentation improvements. |
| 79 | 83 | * Update the built-in SQLite to version 3.13.0. |
| 80 | 84 | |
| 85 | +<a name='v1_34'></a> | |
| 81 | 86 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 82 | 87 | |
| 83 | 88 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 84 | 89 | than 10MiB. |
| 85 | 90 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | ||
| 111 | 116 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 112 | 117 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 113 | 118 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 114 | 119 | support (both currently unused within Fossil). |
| 115 | 120 | |
| 121 | +<a name='v1_33'></a> | |
| 116 | 122 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 117 | 123 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 118 | 124 | [/help?cmd=status|fossil status] and related commands. |
| 119 | 125 | * Change the default skin to what used to be called "San Francisco Modern". |
| 120 | 126 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | ||
| 160 | 166 | field for direct entry of the user name to each applicable report. |
| 161 | 167 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 162 | 168 | already exist. |
| 163 | 169 | * Inhibit timeline links to wiki pages that have been deleted. |
| 164 | 170 | |
| 171 | +<a name='v1_33'></a> | |
| 165 | 172 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 166 | 173 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 167 | 174 | that the new repository is fully compatible with historical versions of |
| 168 | 175 | Fossil by having a valid manifest as RID 1. |
| 169 | 176 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | ||
| 176 | 183 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 177 | 184 | ranges, separate by spaces (or "+" when URL-encoded). |
| 178 | 185 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 179 | 186 | [/help?cmd=rm|fossil rm]. |
| 180 | 187 | |
| 188 | +<a name='v1_31'></a> | |
| 181 | 189 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 182 | 190 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 183 | 191 | columns to the schema, to support better drawing of file change graphs. |
| 184 | 192 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 185 | 193 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | ||
| 227 | 235 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 228 | 236 | ticket reports. |
| 229 | 237 | * Break out the components (css, footer, and header) for the |
| 230 | 238 | various built-in skins into separate files in the source tree. |
| 231 | 239 | |
| 240 | +<a name='v1_30'></a> | |
| 232 | 241 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 233 | 242 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 234 | 243 | * Added the [/help?cmd=purge|fossil purge] command. |
| 235 | 244 | * Added the [/help?cmd=publish|fossil publish] command. |
| 236 | 245 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | ||
| 297 | 306 | the correctness of printf-style formatting strings. |
| 298 | 307 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 299 | 308 | * Numerous documentation fixes and improvements. |
| 300 | 309 | * Other obscure and minor bug fixes - see the timeline for details. |
| 301 | 310 | |
| 311 | +<a name='v1_29'></a> | |
| 302 | 312 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 303 | 313 | * Add the ability to display content, diffs and annotations for UTF16 |
| 304 | 314 | text files in the web interface. |
| 305 | 315 | * Add the "SaveAs..." and "Invert" buttons |
| 306 | 316 | to the graphical diff display that results |
| 307 | 317 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,12 +1,15 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes for Version 1.37 (2016-00-00)</h2> |
| 4 | |
| 5 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 6 | [/help?cmd=/timeline|/timeline] webpage. |
| 7 | |
| 8 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 9 | |
| 10 | * Add support for [./unvers.wiki|unversioned content], |
| 11 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 12 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | |
| 33 | able to pull from their parent but not push. |
| 34 | * Added the -nocomplain option to the TH1 "query" command. |
| 35 | * Added support for the chng=GLOBLIST query parameter on the |
| 36 | [/help?cmd=/timeline|/timeline] webpage. |
| 37 | |
| 38 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 39 | |
| 40 | * Enable symlinks by default on all non-Windows platforms. |
| 41 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 42 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | |
| 76 | names in place of getpass() to read passwords and passphrases |
| 77 | * Option --baseurl now works on Windows. |
| 78 | * Numerious documentation improvements. |
| 79 | * Update the built-in SQLite to version 3.13.0. |
| 80 | |
| 81 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 82 | |
| 83 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 84 | than 10MiB. |
| 85 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | |
| 111 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 112 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 113 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 114 | support (both currently unused within Fossil). |
| 115 | |
| 116 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 117 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 118 | [/help?cmd=status|fossil status] and related commands. |
| 119 | * Change the default skin to what used to be called "San Francisco Modern". |
| 120 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | |
| 160 | field for direct entry of the user name to each applicable report. |
| 161 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 162 | already exist. |
| 163 | * Inhibit timeline links to wiki pages that have been deleted. |
| 164 | |
| 165 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 166 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 167 | that the new repository is fully compatible with historical versions of |
| 168 | Fossil by having a valid manifest as RID 1. |
| 169 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | |
| 176 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 177 | ranges, separate by spaces (or "+" when URL-encoded). |
| 178 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 179 | [/help?cmd=rm|fossil rm]. |
| 180 | |
| 181 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 182 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 183 | columns to the schema, to support better drawing of file change graphs. |
| 184 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 185 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | |
| 227 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 228 | ticket reports. |
| 229 | * Break out the components (css, footer, and header) for the |
| 230 | various built-in skins into separate files in the source tree. |
| 231 | |
| 232 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 233 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 234 | * Added the [/help?cmd=purge|fossil purge] command. |
| 235 | * Added the [/help?cmd=publish|fossil publish] command. |
| 236 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | |
| 297 | the correctness of printf-style formatting strings. |
| 298 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 299 | * Numerous documentation fixes and improvements. |
| 300 | * Other obscure and minor bug fixes - see the timeline for details. |
| 301 | |
| 302 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 303 | * Add the ability to display content, diffs and annotations for UTF16 |
| 304 | text files in the web interface. |
| 305 | * Add the "SaveAs..." and "Invert" buttons |
| 306 | to the graphical diff display that results |
| 307 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,12 +1,15 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v1_37'></a> |
| 4 | <h2>Changes for Version 1.37 (2017-XX-YY)</h2> |
| 5 | |
| 6 | * Added support for the ms=EXACT|LIKE|GLOB|REGEXP query parameter on the |
| 7 | [/help?cmd=/timeline|/timeline] webpage. |
| 8 | * Fix a C89-ism that previous the 1.36 release from building with MSVC. |
| 9 | |
| 10 | <a name='v1_36'></a> |
| 11 | <h2>Changes for Version 1.36 (2016-10-24)</h2> |
| 12 | |
| 13 | * Add support for [./unvers.wiki|unversioned content], |
| 14 | the [/help?cmd=unversioned|fossil unversioned] command and the |
| 15 | [/help?cmd=/uv|/uv] and [/uvlist] web pages. |
| @@ -33,10 +36,11 @@ | |
| 36 | able to pull from their parent but not push. |
| 37 | * Added the -nocomplain option to the TH1 "query" command. |
| 38 | * Added support for the chng=GLOBLIST query parameter on the |
| 39 | [/help?cmd=/timeline|/timeline] webpage. |
| 40 | |
| 41 | <a name='v1_35'></a> |
| 42 | <h2>Changes for Version 1.35 (2016-06-14)</h2> |
| 43 | |
| 44 | * Enable symlinks by default on all non-Windows platforms. |
| 45 | * Enhance the [/md_rules|Markdown formatting] so that hyperlinks that begin |
| 46 | with "/" are relative to the root of the Fossil repository. |
| @@ -76,10 +80,11 @@ | |
| 80 | names in place of getpass() to read passwords and passphrases |
| 81 | * Option --baseurl now works on Windows. |
| 82 | * Numerious documentation improvements. |
| 83 | * Update the built-in SQLite to version 3.13.0. |
| 84 | |
| 85 | <a name='v1_34'></a> |
| 86 | <h2>Changes for Version 1.34 (2015-11-02)</h2> |
| 87 | |
| 88 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 89 | than 10MiB. |
| 90 | * Update internal Unicode character tables, used in regular expression |
| @@ -111,10 +116,11 @@ | |
| 116 | * Change the mimetype for ".n" and ".man" files to text/plain. |
| 117 | * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. |
| 118 | * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 |
| 119 | support (both currently unused within Fossil). |
| 120 | |
| 121 | <a name='v1_33'></a> |
| 122 | <h2>Changes for Version 1.33 (2015-05-23)</h2> |
| 123 | * Improved fork detection on [/help?cmd=update|fossil update], |
| 124 | [/help?cmd=status|fossil status] and related commands. |
| 125 | * Change the default skin to what used to be called "San Francisco Modern". |
| 126 | * Add the [/repo-tabsize] web page |
| @@ -160,10 +166,11 @@ | |
| 166 | field for direct entry of the user name to each applicable report. |
| 167 | * Create parent directories of [/help?cmd=settings|empty-dirs] if they don't |
| 168 | already exist. |
| 169 | * Inhibit timeline links to wiki pages that have been deleted. |
| 170 | |
| 171 | <a name='v1_33'></a> |
| 172 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 173 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 174 | that the new repository is fully compatible with historical versions of |
| 175 | Fossil by having a valid manifest as RID 1. |
| 176 | * Anti-aliased rendering of arrowheads on timeline graphs. |
| @@ -176,10 +183,11 @@ | |
| 183 | * Enhance the "ln=" query parameter on artifact displays to accept multiple |
| 184 | ranges, separate by spaces (or "+" when URL-encoded). |
| 185 | * Added [/help?cmd=forget|fossil forget] as an alias for |
| 186 | [/help?cmd=rm|fossil rm]. |
| 187 | |
| 188 | <a name='v1_31'></a> |
| 189 | <h2>Changes For Version 1.31 (2015-02-23)</h2> |
| 190 | * Change the auxiliary schema by adding columns MLINK.ISAUX and MLINK.PMID |
| 191 | columns to the schema, to support better drawing of file change graphs. |
| 192 | A [/help?cmd=rebuild|fossil rebuild] is recommended but is not required. |
| 193 | so that the new graph drawing logic can work effectively. |
| @@ -227,10 +235,11 @@ | |
| 235 | * Allow the user of Common Table Expressions in the SQL that defaults |
| 236 | ticket reports. |
| 237 | * Break out the components (css, footer, and header) for the |
| 238 | various built-in skins into separate files in the source tree. |
| 239 | |
| 240 | <a name='v1_30'></a> |
| 241 | <h2>Changes For Version 1.30 (2015-01-19)</h2> |
| 242 | * Added the [/help?cmd=bundle|fossil bundle] command. |
| 243 | * Added the [/help?cmd=purge|fossil purge] command. |
| 244 | * Added the [/help?cmd=publish|fossil publish] command. |
| 245 | * Added the [/help?cmd=unpublished|fossil unpublished] command. |
| @@ -297,10 +306,11 @@ | |
| 306 | the correctness of printf-style formatting strings. |
| 307 | * Fix CVE-2014-3566, also known as the POODLE SSL 3.0 vulnerability. |
| 308 | * Numerous documentation fixes and improvements. |
| 309 | * Other obscure and minor bug fixes - see the timeline for details. |
| 310 | |
| 311 | <a name='v1_29'></a> |
| 312 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 313 | * Add the ability to display content, diffs and annotations for UTF16 |
| 314 | text files in the web interface. |
| 315 | * Add the "SaveAs..." and "Invert" buttons |
| 316 | to the graphical diff display that results |
| 317 |
+48
-59
| --- www/mkdownload.tcl | ||
| +++ www/mkdownload.tcl | ||
| @@ -1,41 +1,18 @@ | ||
| 1 | 1 | #!/usr/bin/tclsh |
| 2 | 2 | # |
| 3 | -# Run this script to build the "download.html" page. Also generate | |
| 4 | -# the fossil_download_checksums.html page. | |
| 3 | +# Run this script to build andn install the "download.html" page of | |
| 4 | +# unversioned comment. | |
| 5 | +# | |
| 6 | +# Also generate the fossil_download_checksums.html page. | |
| 5 | 7 | # |
| 6 | 8 | # |
| 7 | 9 | set out [open download.html w] |
| 8 | 10 | fconfigure $out -encoding utf-8 -translation lf |
| 9 | 11 | puts $out \ |
| 10 | 12 | {<!DOCTYPE html> |
| 11 | -<html> | |
| 12 | - <head> | |
| 13 | - <base href="https://www.fossil-scm.org/download.html" /> | |
| 14 | - <title>Fossil: Download</title> | |
| 15 | - <link rel="alternate" type="application/rss+xml" title="RSS Feed" | |
| 16 | - href="/fossil/timeline.rss" /> | |
| 17 | - <link rel="stylesheet" href="/fossil/style.css?default" type="text/css" | |
| 18 | - media="screen" /> | |
| 19 | - </head> | |
| 20 | - | |
| 21 | - <body> | |
| 22 | - <div class="header"> | |
| 23 | - <div class="title"><h1>Fossil</h1>Download</div> | |
| 24 | - </div> | |
| 25 | - <div class="mainmenu"> | |
| 26 | -<a href='/fossil/doc/trunk/www/index.wiki'>Home</a> | |
| 27 | -<a href='/fossil/timeline?y=ci'>Timeline</a> | |
| 28 | -<a href='/fossil/dir?ci=tip'>Code</a> | |
| 29 | -<a href='/fossil/doc/trunk/www/permutedindex.html'>Docs</a> | |
| 30 | -<a href='/fossil/brlist'>Branches</a> | |
| 31 | -<a href='/fossil/ticket'>Tickets</a> | |
| 32 | -<a href='/fossil/wiki'>Wiki</a> | |
| 33 | -<a href='/download.html' class='active'>Download</a> | |
| 34 | -</div> | |
| 35 | -<div class="content"> | |
| 36 | -<p> | |
| 13 | +<div class='fossil-doc' data-title='Download Page'> | |
| 37 | 14 | |
| 38 | 15 | <center><font size=4>} |
| 39 | 16 | puts $out \ |
| 40 | 17 | "<b>To install Fossil →</b> download the stand-alone executable" |
| 41 | 18 | puts $out \ |
| @@ -45,46 +22,57 @@ | ||
| 45 | 22 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 46 | 23 | here.</a> |
| 47 | 24 | Cryptographic checksums for download files are |
| 48 | 25 | <a href="http://www.hwaci.com/fossil_download_checksums.html">here</a>. |
| 49 | 26 | </small></p> |
| 50 | -</center> | |
| 51 | - | |
| 52 | 27 | <table cellpadding="10"> |
| 53 | 28 | } |
| 54 | 29 | |
| 55 | -# Find all all unique timestamps. | |
| 30 | +# Find all unique timestamps. | |
| 56 | 31 | # |
| 57 | -foreach file [glob -nocomplain download/fossil-*.zip] { | |
| 58 | - if {[regexp -- {-(\d\.\d+).zip$} $file all version]} { | |
| 32 | +set in [open {|fossil uv list} rb] | |
| 33 | +while {[gets $in line]>0} { | |
| 34 | + set fn [lindex $line 5] | |
| 35 | + set filesize($fn) [lindex $line 3] | |
| 36 | + if {[regexp -- {-(\d\.\d+)\.(tar\.gz|zip)$} $fn all version]} { | |
| 37 | + set filehash($fn) [lindex $line 1] | |
| 59 | 38 | set avers($version) 1 |
| 60 | 39 | } |
| 61 | 40 | } |
| 41 | +close $in | |
| 42 | + | |
| 43 | +set vdate(1.36) 2016-10-24 | |
| 44 | +set vdate(1.35) 2016-06-14 | |
| 45 | +set vdate(1.34) 2016-11-02 | |
| 62 | 46 | |
| 63 | 47 | # Do all versions from newest to oldest |
| 64 | 48 | # |
| 65 | 49 | foreach vers [lsort -decr -real [array names avers]] { |
| 66 | - set hr "/fossil/timeline?c=version-$vers;y=ci" | |
| 50 | + # set hr "../timeline?c=version-$vers;y=ci" | |
| 51 | + set v2 v[string map {. _} $vers] | |
| 52 | + set hr "../doc/trunk/www/changes.wiki#$v2" | |
| 67 | 53 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 68 | - puts $out "<center><b><a href=\"$hr\">Version $vers</a></b></center>" | |
| 54 | + puts $out "<center><b><a href=\"$hr\">Version $vers</a>" | |
| 55 | + if {[info exists vdate($vers)]} { | |
| 56 | + set hr2 "../timeline?c=version-$vers&y=ci" | |
| 57 | + puts $out " (<a href='$hr2'>$vdate($vers)</a>)" | |
| 58 | + } | |
| 59 | + puts $out "</b></center>" | |
| 69 | 60 | puts $out "</td></tr>" |
| 70 | 61 | puts $out "<tr>" |
| 71 | 62 | |
| 72 | 63 | foreach {prefix img desc} { |
| 73 | 64 | fossil-linux-x86 linux.gif {Linux 3.x x86} |
| 74 | - fossil-macosx-x86 mac.gif {Mac 10.x x86} | |
| 65 | + fossil-macosx mac.gif {Mac 10.x x86} | |
| 75 | 66 | fossil-openbsd-x86 openbsd.gif {OpenBSD 5.x x86} |
| 76 | 67 | fossil-w32 win32.gif {Windows} |
| 77 | 68 | fossil-src src.gif {Source Tarball} |
| 78 | 69 | } { |
| 79 | - set basename download/$prefix-$vers | |
| 80 | - set filename $basename.tar.gz | |
| 81 | - if {![file exists $basename.tar.gz]} { | |
| 82 | - set filename $basename.zip | |
| 83 | - } | |
| 84 | - if {[file exists $filename]} { | |
| 85 | - set size [file size $filename] | |
| 70 | + set glob download/$prefix*-$vers* | |
| 71 | + set filename [array names filesize $glob] | |
| 72 | + if {[info exists filesize($filename)]} { | |
| 73 | + set size [set filesize($filename)] | |
| 86 | 74 | set units bytes |
| 87 | 75 | if {$size>1024*1024} { |
| 88 | 76 | set size [format %.2f [expr {$size/(1024.0*1024.0)}]] |
| 89 | 77 | set units MiB |
| 90 | 78 | } elseif {$size>1024} { |
| @@ -97,26 +85,23 @@ | ||
| 97 | 85 | } else { |
| 98 | 86 | puts $out "<td> </td>" |
| 99 | 87 | } |
| 100 | 88 | } |
| 101 | 89 | puts $out "</tr>" |
| 102 | - if {[file exists download/releasenotes-$vers.html]} { | |
| 103 | - puts $out "<tr><td colspan=6 align=left>" | |
| 104 | - set rn [open download/releasenotes-$vers.html] | |
| 105 | - fconfigure $rn -encoding utf-8 | |
| 106 | - puts $out "[read $rn]" | |
| 107 | - close $rn | |
| 108 | - puts $out "</td></tr>" | |
| 109 | - } | |
| 90 | +# | |
| 91 | +# if {[info exists filesize(download/releasenotes-$vers.html)]} { | |
| 92 | +# puts $out "<tr><td colspan=6 align=left>" | |
| 93 | +# set rn [|open uv cat download/releasenotes-$vers.html] | |
| 94 | +# fconfigure $rn -encoding utf-8 | |
| 95 | +# puts $out "[read $rn]" | |
| 96 | +# close $rn | |
| 97 | +# puts $out "</td></tr>" | |
| 98 | +# } | |
| 110 | 99 | } |
| 111 | 100 | puts $out "<tr><td colspan=5><hr></td></tr>" |
| 112 | 101 | |
| 113 | -puts $out {</table></div> | |
| 114 | -</body> | |
| 115 | -</html> | |
| 116 | -} | |
| 117 | - | |
| 102 | +puts $out {</table></center></div>} | |
| 118 | 103 | close $out |
| 119 | 104 | |
| 120 | 105 | # Generate the checksum page |
| 121 | 106 | # |
| 122 | 107 | set out [open fossil_download_checksums.html w] |
| @@ -128,11 +113,15 @@ | ||
| 128 | 113 | <p>The following table shows the SHA1 checksums for the precompiled |
| 129 | 114 | binaries available on the |
| 130 | 115 | <a href="/download.html">Fossil website</a>.</p> |
| 131 | 116 | <pre>} |
| 132 | 117 | |
| 133 | -foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { | |
| 134 | - set sha1sum [lindex [exec sha1sum $file] 0] | |
| 135 | - puts $out "$sha1sum [file tail $file]" | |
| 118 | +foreach {line} [split [exec fossil sql "SELECT hash, name FROM unversioned\ | |
| 119 | + WHERE name GLOB '*.tar.gz' OR\ | |
| 120 | + name GLOB '*.zip'"] \n] { | |
| 121 | + set x [split $line |] | |
| 122 | + set hash [lindex $x 0] | |
| 123 | + set nm [file tail [lindex $x 1]] | |
| 124 | + puts $out "$hash $nm" | |
| 136 | 125 | } |
| 137 | 126 | puts $out {</pre></body></html>} |
| 138 | 127 | close $out |
| 139 | 128 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -1,41 +1,18 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # Run this script to build the "download.html" page. Also generate |
| 4 | # the fossil_download_checksums.html page. |
| 5 | # |
| 6 | # |
| 7 | set out [open download.html w] |
| 8 | fconfigure $out -encoding utf-8 -translation lf |
| 9 | puts $out \ |
| 10 | {<!DOCTYPE html> |
| 11 | <html> |
| 12 | <head> |
| 13 | <base href="https://www.fossil-scm.org/download.html" /> |
| 14 | <title>Fossil: Download</title> |
| 15 | <link rel="alternate" type="application/rss+xml" title="RSS Feed" |
| 16 | href="/fossil/timeline.rss" /> |
| 17 | <link rel="stylesheet" href="/fossil/style.css?default" type="text/css" |
| 18 | media="screen" /> |
| 19 | </head> |
| 20 | |
| 21 | <body> |
| 22 | <div class="header"> |
| 23 | <div class="title"><h1>Fossil</h1>Download</div> |
| 24 | </div> |
| 25 | <div class="mainmenu"> |
| 26 | <a href='/fossil/doc/trunk/www/index.wiki'>Home</a> |
| 27 | <a href='/fossil/timeline?y=ci'>Timeline</a> |
| 28 | <a href='/fossil/dir?ci=tip'>Code</a> |
| 29 | <a href='/fossil/doc/trunk/www/permutedindex.html'>Docs</a> |
| 30 | <a href='/fossil/brlist'>Branches</a> |
| 31 | <a href='/fossil/ticket'>Tickets</a> |
| 32 | <a href='/fossil/wiki'>Wiki</a> |
| 33 | <a href='/download.html' class='active'>Download</a> |
| 34 | </div> |
| 35 | <div class="content"> |
| 36 | <p> |
| 37 | |
| 38 | <center><font size=4>} |
| 39 | puts $out \ |
| 40 | "<b>To install Fossil →</b> download the stand-alone executable" |
| 41 | puts $out \ |
| @@ -45,46 +22,57 @@ | |
| 45 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 46 | here.</a> |
| 47 | Cryptographic checksums for download files are |
| 48 | <a href="http://www.hwaci.com/fossil_download_checksums.html">here</a>. |
| 49 | </small></p> |
| 50 | </center> |
| 51 | |
| 52 | <table cellpadding="10"> |
| 53 | } |
| 54 | |
| 55 | # Find all all unique timestamps. |
| 56 | # |
| 57 | foreach file [glob -nocomplain download/fossil-*.zip] { |
| 58 | if {[regexp -- {-(\d\.\d+).zip$} $file all version]} { |
| 59 | set avers($version) 1 |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | # Do all versions from newest to oldest |
| 64 | # |
| 65 | foreach vers [lsort -decr -real [array names avers]] { |
| 66 | set hr "/fossil/timeline?c=version-$vers;y=ci" |
| 67 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 68 | puts $out "<center><b><a href=\"$hr\">Version $vers</a></b></center>" |
| 69 | puts $out "</td></tr>" |
| 70 | puts $out "<tr>" |
| 71 | |
| 72 | foreach {prefix img desc} { |
| 73 | fossil-linux-x86 linux.gif {Linux 3.x x86} |
| 74 | fossil-macosx-x86 mac.gif {Mac 10.x x86} |
| 75 | fossil-openbsd-x86 openbsd.gif {OpenBSD 5.x x86} |
| 76 | fossil-w32 win32.gif {Windows} |
| 77 | fossil-src src.gif {Source Tarball} |
| 78 | } { |
| 79 | set basename download/$prefix-$vers |
| 80 | set filename $basename.tar.gz |
| 81 | if {![file exists $basename.tar.gz]} { |
| 82 | set filename $basename.zip |
| 83 | } |
| 84 | if {[file exists $filename]} { |
| 85 | set size [file size $filename] |
| 86 | set units bytes |
| 87 | if {$size>1024*1024} { |
| 88 | set size [format %.2f [expr {$size/(1024.0*1024.0)}]] |
| 89 | set units MiB |
| 90 | } elseif {$size>1024} { |
| @@ -97,26 +85,23 @@ | |
| 97 | } else { |
| 98 | puts $out "<td> </td>" |
| 99 | } |
| 100 | } |
| 101 | puts $out "</tr>" |
| 102 | if {[file exists download/releasenotes-$vers.html]} { |
| 103 | puts $out "<tr><td colspan=6 align=left>" |
| 104 | set rn [open download/releasenotes-$vers.html] |
| 105 | fconfigure $rn -encoding utf-8 |
| 106 | puts $out "[read $rn]" |
| 107 | close $rn |
| 108 | puts $out "</td></tr>" |
| 109 | } |
| 110 | } |
| 111 | puts $out "<tr><td colspan=5><hr></td></tr>" |
| 112 | |
| 113 | puts $out {</table></div> |
| 114 | </body> |
| 115 | </html> |
| 116 | } |
| 117 | |
| 118 | close $out |
| 119 | |
| 120 | # Generate the checksum page |
| 121 | # |
| 122 | set out [open fossil_download_checksums.html w] |
| @@ -128,11 +113,15 @@ | |
| 128 | <p>The following table shows the SHA1 checksums for the precompiled |
| 129 | binaries available on the |
| 130 | <a href="/download.html">Fossil website</a>.</p> |
| 131 | <pre>} |
| 132 | |
| 133 | foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { |
| 134 | set sha1sum [lindex [exec sha1sum $file] 0] |
| 135 | puts $out "$sha1sum [file tail $file]" |
| 136 | } |
| 137 | puts $out {</pre></body></html>} |
| 138 | close $out |
| 139 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -1,41 +1,18 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # Run this script to build andn install the "download.html" page of |
| 4 | # unversioned comment. |
| 5 | # |
| 6 | # Also generate the fossil_download_checksums.html page. |
| 7 | # |
| 8 | # |
| 9 | set out [open download.html w] |
| 10 | fconfigure $out -encoding utf-8 -translation lf |
| 11 | puts $out \ |
| 12 | {<!DOCTYPE html> |
| 13 | <div class='fossil-doc' data-title='Download Page'> |
| 14 | |
| 15 | <center><font size=4>} |
| 16 | puts $out \ |
| 17 | "<b>To install Fossil →</b> download the stand-alone executable" |
| 18 | puts $out \ |
| @@ -45,46 +22,57 @@ | |
| 22 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 23 | here.</a> |
| 24 | Cryptographic checksums for download files are |
| 25 | <a href="http://www.hwaci.com/fossil_download_checksums.html">here</a>. |
| 26 | </small></p> |
| 27 | <table cellpadding="10"> |
| 28 | } |
| 29 | |
| 30 | # Find all unique timestamps. |
| 31 | # |
| 32 | set in [open {|fossil uv list} rb] |
| 33 | while {[gets $in line]>0} { |
| 34 | set fn [lindex $line 5] |
| 35 | set filesize($fn) [lindex $line 3] |
| 36 | if {[regexp -- {-(\d\.\d+)\.(tar\.gz|zip)$} $fn all version]} { |
| 37 | set filehash($fn) [lindex $line 1] |
| 38 | set avers($version) 1 |
| 39 | } |
| 40 | } |
| 41 | close $in |
| 42 | |
| 43 | set vdate(1.36) 2016-10-24 |
| 44 | set vdate(1.35) 2016-06-14 |
| 45 | set vdate(1.34) 2016-11-02 |
| 46 | |
| 47 | # Do all versions from newest to oldest |
| 48 | # |
| 49 | foreach vers [lsort -decr -real [array names avers]] { |
| 50 | # set hr "../timeline?c=version-$vers;y=ci" |
| 51 | set v2 v[string map {. _} $vers] |
| 52 | set hr "../doc/trunk/www/changes.wiki#$v2" |
| 53 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 54 | puts $out "<center><b><a href=\"$hr\">Version $vers</a>" |
| 55 | if {[info exists vdate($vers)]} { |
| 56 | set hr2 "../timeline?c=version-$vers&y=ci" |
| 57 | puts $out " (<a href='$hr2'>$vdate($vers)</a>)" |
| 58 | } |
| 59 | puts $out "</b></center>" |
| 60 | puts $out "</td></tr>" |
| 61 | puts $out "<tr>" |
| 62 | |
| 63 | foreach {prefix img desc} { |
| 64 | fossil-linux-x86 linux.gif {Linux 3.x x86} |
| 65 | fossil-macosx mac.gif {Mac 10.x x86} |
| 66 | fossil-openbsd-x86 openbsd.gif {OpenBSD 5.x x86} |
| 67 | fossil-w32 win32.gif {Windows} |
| 68 | fossil-src src.gif {Source Tarball} |
| 69 | } { |
| 70 | set glob download/$prefix*-$vers* |
| 71 | set filename [array names filesize $glob] |
| 72 | if {[info exists filesize($filename)]} { |
| 73 | set size [set filesize($filename)] |
| 74 | set units bytes |
| 75 | if {$size>1024*1024} { |
| 76 | set size [format %.2f [expr {$size/(1024.0*1024.0)}]] |
| 77 | set units MiB |
| 78 | } elseif {$size>1024} { |
| @@ -97,26 +85,23 @@ | |
| 85 | } else { |
| 86 | puts $out "<td> </td>" |
| 87 | } |
| 88 | } |
| 89 | puts $out "</tr>" |
| 90 | # |
| 91 | # if {[info exists filesize(download/releasenotes-$vers.html)]} { |
| 92 | # puts $out "<tr><td colspan=6 align=left>" |
| 93 | # set rn [|open uv cat download/releasenotes-$vers.html] |
| 94 | # fconfigure $rn -encoding utf-8 |
| 95 | # puts $out "[read $rn]" |
| 96 | # close $rn |
| 97 | # puts $out "</td></tr>" |
| 98 | # } |
| 99 | } |
| 100 | puts $out "<tr><td colspan=5><hr></td></tr>" |
| 101 | |
| 102 | puts $out {</table></center></div>} |
| 103 | close $out |
| 104 | |
| 105 | # Generate the checksum page |
| 106 | # |
| 107 | set out [open fossil_download_checksums.html w] |
| @@ -128,11 +113,15 @@ | |
| 113 | <p>The following table shows the SHA1 checksums for the precompiled |
| 114 | binaries available on the |
| 115 | <a href="/download.html">Fossil website</a>.</p> |
| 116 | <pre>} |
| 117 | |
| 118 | foreach {line} [split [exec fossil sql "SELECT hash, name FROM unversioned\ |
| 119 | WHERE name GLOB '*.tar.gz' OR\ |
| 120 | name GLOB '*.zip'"] \n] { |
| 121 | set x [split $line |] |
| 122 | set hash [lindex $x 0] |
| 123 | set nm [file tail [lindex $x 1]] |
| 124 | puts $out "$hash $nm" |
| 125 | } |
| 126 | puts $out {</pre></body></html>} |
| 127 | close $out |
| 128 |