Fossil SCM

Make work the "-t TYPE" flag with "after". note: "-t TYPE" was already not working with "children" and "parents" and "-p PATH" is still to be fixed with "after".

mgagnon 2025-04-03 02:51 fix-timeline-cli-after
Commit 7f1b2f1b8bc417db236e73bf184733dfe26e5d259f6ab2ebfeff245bc8513b42
1 file changed +3 -3
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -3749,10 +3749,13 @@
37493749
blob_append(&sql, timeline_query_for_tty(), -1);
37503750
blob_append_sql(&sql, "\n AND event.mtime %s %s",
37513751
( mode==TIMELINE_MODE_BEFORE ||
37523752
mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/
37533753
);
3754
+ if( zType && (zType[0]!='a') ){
3755
+ blob_append_sql(&sql, "\n AND event.type=%Q ", zType);
3756
+ }
37543757
if( mode==TIMELINE_MODE_AFTER ){
37553758
/* Complete the outer above outer select. */
37563759
blob_append_sql(&sql,
37573760
"\nORDER BY event.mtime LIMIT abs(%d)) t ORDER BY t.mDateTime DESC;", n);
37583761
}
@@ -3766,13 +3769,10 @@
37663769
}else{
37673770
compute_ancestors(objid, (zFilePattern ? 0 : n), 0, 0);
37683771
}
37693772
blob_append_sql(&sql, "\n AND blob.rid IN ok");
37703773
}
3771
- if( zType && (zType[0]!='a') ){
3772
- blob_append_sql(&sql, "\n AND event.type=%Q ", zType);
3773
- }
37743774
if( zFilePattern ){
37753775
blob_append(&sql,
37763776
"\n AND EXISTS(SELECT 1 FROM mlink\n"
37773777
" WHERE mlink.mid=event.objid\n"
37783778
" AND mlink.fnid IN ", -1);
37793779
--- src/timeline.c
+++ src/timeline.c
@@ -3749,10 +3749,13 @@
3749 blob_append(&sql, timeline_query_for_tty(), -1);
3750 blob_append_sql(&sql, "\n AND event.mtime %s %s",
3751 ( mode==TIMELINE_MODE_BEFORE ||
3752 mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/
3753 );
 
 
 
3754 if( mode==TIMELINE_MODE_AFTER ){
3755 /* Complete the outer above outer select. */
3756 blob_append_sql(&sql,
3757 "\nORDER BY event.mtime LIMIT abs(%d)) t ORDER BY t.mDateTime DESC;", n);
3758 }
@@ -3766,13 +3769,10 @@
3766 }else{
3767 compute_ancestors(objid, (zFilePattern ? 0 : n), 0, 0);
3768 }
3769 blob_append_sql(&sql, "\n AND blob.rid IN ok");
3770 }
3771 if( zType && (zType[0]!='a') ){
3772 blob_append_sql(&sql, "\n AND event.type=%Q ", zType);
3773 }
3774 if( zFilePattern ){
3775 blob_append(&sql,
3776 "\n AND EXISTS(SELECT 1 FROM mlink\n"
3777 " WHERE mlink.mid=event.objid\n"
3778 " AND mlink.fnid IN ", -1);
3779
--- src/timeline.c
+++ src/timeline.c
@@ -3749,10 +3749,13 @@
3749 blob_append(&sql, timeline_query_for_tty(), -1);
3750 blob_append_sql(&sql, "\n AND event.mtime %s %s",
3751 ( mode==TIMELINE_MODE_BEFORE ||
3752 mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/
3753 );
3754 if( zType && (zType[0]!='a') ){
3755 blob_append_sql(&sql, "\n AND event.type=%Q ", zType);
3756 }
3757 if( mode==TIMELINE_MODE_AFTER ){
3758 /* Complete the outer above outer select. */
3759 blob_append_sql(&sql,
3760 "\nORDER BY event.mtime LIMIT abs(%d)) t ORDER BY t.mDateTime DESC;", n);
3761 }
@@ -3766,13 +3769,10 @@
3769 }else{
3770 compute_ancestors(objid, (zFilePattern ? 0 : n), 0, 0);
3771 }
3772 blob_append_sql(&sql, "\n AND blob.rid IN ok");
3773 }
 
 
 
3774 if( zFilePattern ){
3775 blob_append(&sql,
3776 "\n AND EXISTS(SELECT 1 FROM mlink\n"
3777 " WHERE mlink.mid=event.objid\n"
3778 " AND mlink.fnid IN ", -1);
3779

Keyboard Shortcuts

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