Fossil SCM
Fix timeline limit option with path-specific request.
Commit
ffd261abfb84855c0843d720d9e04ba8a3aa4306
Parent
8e428c14c278a38…
1 file changed
+4
-2
+4
-2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2485,16 +2485,18 @@ | ||
| 2485 | 2485 | blob_append_sql(&sql, "\n AND event.mtime %s %s", |
| 2486 | 2486 | ( mode==TIMELINE_MODE_BEFORE || |
| 2487 | 2487 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 2488 | 2488 | ); |
| 2489 | 2489 | |
| 2490 | + /* When zFilePattern is specified, compute complete ancestry; | |
| 2491 | + * limit later at print_timeline() */ | |
| 2490 | 2492 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 2491 | 2493 | db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)"); |
| 2492 | 2494 | if( mode==TIMELINE_MODE_CHILDREN ){ |
| 2493 | - compute_descendants(objid, n); | |
| 2495 | + compute_descendants(objid, (zFilePattern ? 0 : n)); | |
| 2494 | 2496 | }else{ |
| 2495 | - compute_ancestors(objid, n, 0); | |
| 2497 | + compute_ancestors(objid, (zFilePattern ? 0 : n), 0); | |
| 2496 | 2498 | } |
| 2497 | 2499 | blob_append_sql(&sql, "\n AND blob.rid IN ok"); |
| 2498 | 2500 | } |
| 2499 | 2501 | if( zType && (zType[0]!='a') ){ |
| 2500 | 2502 | blob_append_sql(&sql, "\n AND event.type=%Q ", zType); |
| 2501 | 2503 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2485,16 +2485,18 @@ | |
| 2485 | blob_append_sql(&sql, "\n AND event.mtime %s %s", |
| 2486 | ( mode==TIMELINE_MODE_BEFORE || |
| 2487 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 2488 | ); |
| 2489 | |
| 2490 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 2491 | db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)"); |
| 2492 | if( mode==TIMELINE_MODE_CHILDREN ){ |
| 2493 | compute_descendants(objid, n); |
| 2494 | }else{ |
| 2495 | compute_ancestors(objid, n, 0); |
| 2496 | } |
| 2497 | blob_append_sql(&sql, "\n AND blob.rid IN ok"); |
| 2498 | } |
| 2499 | if( zType && (zType[0]!='a') ){ |
| 2500 | blob_append_sql(&sql, "\n AND event.type=%Q ", zType); |
| 2501 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2485,16 +2485,18 @@ | |
| 2485 | blob_append_sql(&sql, "\n AND event.mtime %s %s", |
| 2486 | ( mode==TIMELINE_MODE_BEFORE || |
| 2487 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 2488 | ); |
| 2489 | |
| 2490 | /* When zFilePattern is specified, compute complete ancestry; |
| 2491 | * limit later at print_timeline() */ |
| 2492 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 2493 | db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)"); |
| 2494 | if( mode==TIMELINE_MODE_CHILDREN ){ |
| 2495 | compute_descendants(objid, (zFilePattern ? 0 : n)); |
| 2496 | }else{ |
| 2497 | compute_ancestors(objid, (zFilePattern ? 0 : n), 0); |
| 2498 | } |
| 2499 | blob_append_sql(&sql, "\n AND blob.rid IN ok"); |
| 2500 | } |
| 2501 | if( zType && (zType[0]!='a') ){ |
| 2502 | blob_append_sql(&sql, "\n AND event.type=%Q ", zType); |
| 2503 |