Fossil SCM
Fix existing print_timeline() calls, so they return the same output as trunk by default.
Commit
11634df5ea4146970807675979bc18a54d1234b9
Parent
0cb3ab794f9dd32…
4 files changed
+1
-1
+2
-2
+2
-2
+1
-1
+1
-1
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -329,11 +329,11 @@ | ||
| 329 | 329 | "%s" |
| 330 | 330 | " AND event.objid IN (SELECT rid FROM leaves)" |
| 331 | 331 | " ORDER BY event.mtime DESC", |
| 332 | 332 | timeline_query_for_tty() |
| 333 | 333 | ); |
| 334 | - print_timeline(&q, 20, 79, 0); | |
| 334 | + print_timeline(&q, -20, 79, 0); | |
| 335 | 335 | db_finalize(&q); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /* |
| 339 | 339 | ** COMMAND: leaves* |
| 340 | 340 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -329,11 +329,11 @@ | |
| 329 | "%s" |
| 330 | " AND event.objid IN (SELECT rid FROM leaves)" |
| 331 | " ORDER BY event.mtime DESC", |
| 332 | timeline_query_for_tty() |
| 333 | ); |
| 334 | print_timeline(&q, 20, 79, 0); |
| 335 | db_finalize(&q); |
| 336 | } |
| 337 | |
| 338 | /* |
| 339 | ** COMMAND: leaves* |
| 340 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -329,11 +329,11 @@ | |
| 329 | "%s" |
| 330 | " AND event.objid IN (SELECT rid FROM leaves)" |
| 331 | " ORDER BY event.mtime DESC", |
| 332 | timeline_query_for_tty() |
| 333 | ); |
| 334 | print_timeline(&q, -20, 79, 0); |
| 335 | db_finalize(&q); |
| 336 | } |
| 337 | |
| 338 | /* |
| 339 | ** COMMAND: leaves* |
| 340 |
+2
-2
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -189,11 +189,11 @@ | ||
| 189 | 189 | int iBest; |
| 190 | 190 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 191 | 191 | off the end of the |
| 192 | 192 | results. */ |
| 193 | 193 | char const * zLimit = find_option("limit","n",1); |
| 194 | - int const nLimit = zLimit ? atoi(zLimit) : -20; /* Max number of matching | |
| 194 | + int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching | |
| 195 | 195 | lines/entries to list */ |
| 196 | 196 | |
| 197 | 197 | db_must_be_within_tree(); |
| 198 | 198 | if( g.argc<2 ) return; |
| 199 | 199 | blob_init(&pattern, g.argv[2], -1); |
| @@ -222,8 +222,8 @@ | ||
| 222 | 222 | blob_appendf(&sql,"AND x>%d ", iBest/3); |
| 223 | 223 | } |
| 224 | 224 | blob_append(&sql, "ORDER BY x DESC, date DESC ", -1); |
| 225 | 225 | db_prepare(&q, blob_str(&sql)); |
| 226 | 226 | blob_reset(&sql); |
| 227 | - print_timeline(&q, 1000, 79, 0); | |
| 227 | + print_timeline(&q, nLimit, 79, 0); | |
| 228 | 228 | db_finalize(&q); |
| 229 | 229 | } |
| 230 | 230 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | int iBest; |
| 190 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 191 | off the end of the |
| 192 | results. */ |
| 193 | char const * zLimit = find_option("limit","n",1); |
| 194 | int const nLimit = zLimit ? atoi(zLimit) : -20; /* Max number of matching |
| 195 | lines/entries to list */ |
| 196 | |
| 197 | db_must_be_within_tree(); |
| 198 | if( g.argc<2 ) return; |
| 199 | blob_init(&pattern, g.argv[2], -1); |
| @@ -222,8 +222,8 @@ | |
| 222 | blob_appendf(&sql,"AND x>%d ", iBest/3); |
| 223 | } |
| 224 | blob_append(&sql, "ORDER BY x DESC, date DESC ", -1); |
| 225 | db_prepare(&q, blob_str(&sql)); |
| 226 | blob_reset(&sql); |
| 227 | print_timeline(&q, 1000, 79, 0); |
| 228 | db_finalize(&q); |
| 229 | } |
| 230 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | int iBest; |
| 190 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 191 | off the end of the |
| 192 | results. */ |
| 193 | char const * zLimit = find_option("limit","n",1); |
| 194 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 195 | lines/entries to list */ |
| 196 | |
| 197 | db_must_be_within_tree(); |
| 198 | if( g.argc<2 ) return; |
| 199 | blob_init(&pattern, g.argv[2], -1); |
| @@ -222,8 +222,8 @@ | |
| 222 | blob_appendf(&sql,"AND x>%d ", iBest/3); |
| 223 | } |
| 224 | blob_append(&sql, "ORDER BY x DESC, date DESC ", -1); |
| 225 | db_prepare(&q, blob_str(&sql)); |
| 226 | blob_reset(&sql); |
| 227 | print_timeline(&q, nLimit, 79, 0); |
| 228 | db_finalize(&q); |
| 229 | } |
| 230 |
+2
-2
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -389,11 +389,11 @@ | ||
| 389 | 389 | int n; |
| 390 | 390 | int fRaw = find_option("raw","",0)!=0; |
| 391 | 391 | int fPropagate = find_option("propagate","",0)!=0; |
| 392 | 392 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 393 | 393 | char const * zFindLimit = find_option("limit","n",1); |
| 394 | - int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0; | |
| 394 | + int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000; | |
| 395 | 395 | |
| 396 | 396 | db_find_and_open_repository(0, 0); |
| 397 | 397 | if( g.argc<3 ){ |
| 398 | 398 | goto tag_cmd_usage; |
| 399 | 399 | } |
| @@ -469,11 +469,11 @@ | ||
| 469 | 469 | " ORDER BY event.mtime DESC", |
| 470 | 470 | timeline_query_for_tty(), zType, tagid |
| 471 | 471 | ); |
| 472 | 472 | db_prepare(&q, "%s", blob_str(&sql)); |
| 473 | 473 | blob_reset(&sql); |
| 474 | - print_timeline(&q, 2000, 79, 0); | |
| 474 | + print_timeline(&q, nFindLimit, 79, 0); | |
| 475 | 475 | db_finalize(&q); |
| 476 | 476 | } |
| 477 | 477 | } |
| 478 | 478 | }else |
| 479 | 479 | |
| 480 | 480 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -389,11 +389,11 @@ | |
| 389 | int n; |
| 390 | int fRaw = find_option("raw","",0)!=0; |
| 391 | int fPropagate = find_option("propagate","",0)!=0; |
| 392 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 393 | char const * zFindLimit = find_option("limit","n",1); |
| 394 | int const nFindLimit = zFindLimit ? atoi(zFindLimit) : 0; |
| 395 | |
| 396 | db_find_and_open_repository(0, 0); |
| 397 | if( g.argc<3 ){ |
| 398 | goto tag_cmd_usage; |
| 399 | } |
| @@ -469,11 +469,11 @@ | |
| 469 | " ORDER BY event.mtime DESC", |
| 470 | timeline_query_for_tty(), zType, tagid |
| 471 | ); |
| 472 | db_prepare(&q, "%s", blob_str(&sql)); |
| 473 | blob_reset(&sql); |
| 474 | print_timeline(&q, 2000, 79, 0); |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -389,11 +389,11 @@ | |
| 389 | int n; |
| 390 | int fRaw = find_option("raw","",0)!=0; |
| 391 | int fPropagate = find_option("propagate","",0)!=0; |
| 392 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 393 | char const * zFindLimit = find_option("limit","n",1); |
| 394 | int const nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000; |
| 395 | |
| 396 | db_find_and_open_repository(0, 0); |
| 397 | if( g.argc<3 ){ |
| 398 | goto tag_cmd_usage; |
| 399 | } |
| @@ -469,11 +469,11 @@ | |
| 469 | " ORDER BY event.mtime DESC", |
| 470 | timeline_query_for_tty(), zType, tagid |
| 471 | ); |
| 472 | db_prepare(&q, "%s", blob_str(&sql)); |
| 473 | blob_reset(&sql); |
| 474 | print_timeline(&q, nFindLimit, 79, 0); |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 |
+1
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -188,11 +188,11 @@ | ||
| 188 | 188 | "%s " |
| 189 | 189 | " AND event.objid IN leaves" |
| 190 | 190 | " ORDER BY event.mtime DESC", |
| 191 | 191 | timeline_query_for_tty() |
| 192 | 192 | ); |
| 193 | - print_timeline(&q, 100, 79, 0); | |
| 193 | + print_timeline(&q, -100, 79, 0); | |
| 194 | 194 | db_finalize(&q); |
| 195 | 195 | fossil_fatal("Multiple descendants"); |
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 199 | 199 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -188,11 +188,11 @@ | |
| 188 | "%s " |
| 189 | " AND event.objid IN leaves" |
| 190 | " ORDER BY event.mtime DESC", |
| 191 | timeline_query_for_tty() |
| 192 | ); |
| 193 | print_timeline(&q, 100, 79, 0); |
| 194 | db_finalize(&q); |
| 195 | fossil_fatal("Multiple descendants"); |
| 196 | } |
| 197 | } |
| 198 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 199 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -188,11 +188,11 @@ | |
| 188 | "%s " |
| 189 | " AND event.objid IN leaves" |
| 190 | " ORDER BY event.mtime DESC", |
| 191 | timeline_query_for_tty() |
| 192 | ); |
| 193 | print_timeline(&q, -100, 79, 0); |
| 194 | db_finalize(&q); |
| 195 | fossil_fatal("Multiple descendants"); |
| 196 | } |
| 197 | } |
| 198 | tid = db_int(0, "SELECT rid FROM leaves, event" |
| 199 |