Fossil SCM

Fix timeline limit option with path-specific request.

ashepilko 2017-02-10 23:26 trunk
Commit ffd261abfb84855c0843d720d9e04ba8a3aa4306
1 file changed +4 -2
+4 -2
--- src/timeline.c
+++ src/timeline.c
@@ -2485,16 +2485,18 @@
24852485
blob_append_sql(&sql, "\n AND event.mtime %s %s",
24862486
( mode==TIMELINE_MODE_BEFORE ||
24872487
mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/
24882488
);
24892489
2490
+ /* When zFilePattern is specified, compute complete ancestry;
2491
+ * limit later at print_timeline() */
24902492
if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){
24912493
db_multi_exec("CREATE TEMP TABLE ok(rid INTEGER PRIMARY KEY)");
24922494
if( mode==TIMELINE_MODE_CHILDREN ){
2493
- compute_descendants(objid, n);
2495
+ compute_descendants(objid, (zFilePattern ? 0 : n));
24942496
}else{
2495
- compute_ancestors(objid, n, 0);
2497
+ compute_ancestors(objid, (zFilePattern ? 0 : n), 0);
24962498
}
24972499
blob_append_sql(&sql, "\n AND blob.rid IN ok");
24982500
}
24992501
if( zType && (zType[0]!='a') ){
25002502
blob_append_sql(&sql, "\n AND event.type=%Q ", zType);
25012503
--- 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

Keyboard Shortcuts

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