Fossil SCM

OLD_STYLE macro restores legacy display of /brtimeline

drh 2025-10-17 11:14 timeline-enhance-2025
Commit 2d94dadceb73bc91eab11329be24f04dd87681cab58163e37ad1b51891f89071
1 file changed +21 -3
+21 -3
--- src/branch.c
+++ src/branch.c
@@ -1038,23 +1038,32 @@
10381038
" AND tag.tagname GLOB 'sym-*'",
10391039
rid
10401040
);
10411041
while( db_step(&q)==SQLITE_ROW ){
10421042
const char *zTagName = db_column_text(&q, 0);
1043
+#define OLD_STYLE 1
1044
+#if OLD_STYLE
1045
+ @ %z(href("%R/timeline?r=%T",zTagName))[timeline]</a>
1046
+#else
10431047
char *zBrName = branch_of_rid(rid);
10441048
@ <strong>%h(zBrName)</strong><br>\
10451049
@ %z(href("%R/timeline?r=%T",zTagName))<button>timeline</button></a>
10461050
fossil_free(zBrName);
1051
+#endif
10471052
}
10481053
db_finalize(&q);
10491054
}
10501055
10511056
/*
10521057
** WEBPAGE: brtimeline
10531058
**
10541059
** List the first check of every branch, starting with the most recent
10551060
** and going backwards in time.
1061
+**
1062
+** Query parameters:
1063
+**
1064
+** ubg Color the graph by user, not by branch.
10561065
*/
10571066
void brtimeline_page(void){
10581067
Blob sql = empty_blob;
10591068
Stmt q;
10601069
int tmFlags; /* Timeline display flags */
@@ -1066,11 +1075,13 @@
10661075
10671076
style_set_current_feature("branch");
10681077
style_header("Branches");
10691078
style_submenu_element("Branch List", "brlist");
10701079
login_anonymous_available();
1071
- /* timeline_ss_submenu(); */
1080
+#if OLD_STYLE
1081
+ timeline_ss_submenu();
1082
+#endif
10721083
cgi_check_for_malice();
10731084
@ <h2>First check-in for every branch, starting with the most recent
10741085
@ and going backwards in time.</h2>
10751086
blob_append(&sql, timeline_query_for_www(), -1);
10761087
blob_append_sql(&sql,
@@ -1085,12 +1096,19 @@
10851096
}
10861097
db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
10871098
blob_reset(&sql);
10881099
/* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too
10891100
** many descenders to (off-screen) parents. */
1090
- tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR
1091
- | TIMELINE_BRCOLOR;
1101
+ tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
1102
+#if !OLD_STYLE
1103
+ tmFlags |= TIMELINE_COLUMNAR;
1104
+#endif
1105
+ if( PB("ubg")!=0 ){
1106
+ tmFlags |= TIMELINE_UCOLOR;
1107
+ }else{
1108
+ tmFlags |= TIMELINE_BRCOLOR;
1109
+ }
10921110
www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
10931111
db_finalize(&q);
10941112
style_finish_page();
10951113
}
10961114
10971115
--- src/branch.c
+++ src/branch.c
@@ -1038,23 +1038,32 @@
1038 " AND tag.tagname GLOB 'sym-*'",
1039 rid
1040 );
1041 while( db_step(&q)==SQLITE_ROW ){
1042 const char *zTagName = db_column_text(&q, 0);
 
 
 
 
1043 char *zBrName = branch_of_rid(rid);
1044 @ <strong>%h(zBrName)</strong><br>\
1045 @ %z(href("%R/timeline?r=%T",zTagName))<button>timeline</button></a>
1046 fossil_free(zBrName);
 
1047 }
1048 db_finalize(&q);
1049 }
1050
1051 /*
1052 ** WEBPAGE: brtimeline
1053 **
1054 ** List the first check of every branch, starting with the most recent
1055 ** and going backwards in time.
 
 
 
 
1056 */
1057 void brtimeline_page(void){
1058 Blob sql = empty_blob;
1059 Stmt q;
1060 int tmFlags; /* Timeline display flags */
@@ -1066,11 +1075,13 @@
1066
1067 style_set_current_feature("branch");
1068 style_header("Branches");
1069 style_submenu_element("Branch List", "brlist");
1070 login_anonymous_available();
1071 /* timeline_ss_submenu(); */
 
 
1072 cgi_check_for_malice();
1073 @ <h2>First check-in for every branch, starting with the most recent
1074 @ and going backwards in time.</h2>
1075 blob_append(&sql, timeline_query_for_www(), -1);
1076 blob_append_sql(&sql,
@@ -1085,12 +1096,19 @@
1085 }
1086 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
1087 blob_reset(&sql);
1088 /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too
1089 ** many descenders to (off-screen) parents. */
1090 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR
1091 | TIMELINE_BRCOLOR;
 
 
 
 
 
 
 
1092 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
1093 db_finalize(&q);
1094 style_finish_page();
1095 }
1096
1097
--- src/branch.c
+++ src/branch.c
@@ -1038,23 +1038,32 @@
1038 " AND tag.tagname GLOB 'sym-*'",
1039 rid
1040 );
1041 while( db_step(&q)==SQLITE_ROW ){
1042 const char *zTagName = db_column_text(&q, 0);
1043 #define OLD_STYLE 1
1044 #if OLD_STYLE
1045 @ %z(href("%R/timeline?r=%T",zTagName))[timeline]</a>
1046 #else
1047 char *zBrName = branch_of_rid(rid);
1048 @ <strong>%h(zBrName)</strong><br>\
1049 @ %z(href("%R/timeline?r=%T",zTagName))<button>timeline</button></a>
1050 fossil_free(zBrName);
1051 #endif
1052 }
1053 db_finalize(&q);
1054 }
1055
1056 /*
1057 ** WEBPAGE: brtimeline
1058 **
1059 ** List the first check of every branch, starting with the most recent
1060 ** and going backwards in time.
1061 **
1062 ** Query parameters:
1063 **
1064 ** ubg Color the graph by user, not by branch.
1065 */
1066 void brtimeline_page(void){
1067 Blob sql = empty_blob;
1068 Stmt q;
1069 int tmFlags; /* Timeline display flags */
@@ -1066,11 +1075,13 @@
1075
1076 style_set_current_feature("branch");
1077 style_header("Branches");
1078 style_submenu_element("Branch List", "brlist");
1079 login_anonymous_available();
1080 #if OLD_STYLE
1081 timeline_ss_submenu();
1082 #endif
1083 cgi_check_for_malice();
1084 @ <h2>First check-in for every branch, starting with the most recent
1085 @ and going backwards in time.</h2>
1086 blob_append(&sql, timeline_query_for_www(), -1);
1087 blob_append_sql(&sql,
@@ -1085,12 +1096,19 @@
1096 }
1097 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
1098 blob_reset(&sql);
1099 /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too
1100 ** many descenders to (off-screen) parents. */
1101 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
1102 #if !OLD_STYLE
1103 tmFlags |= TIMELINE_COLUMNAR;
1104 #endif
1105 if( PB("ubg")!=0 ){
1106 tmFlags |= TIMELINE_UCOLOR;
1107 }else{
1108 tmFlags |= TIMELINE_BRCOLOR;
1109 }
1110 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
1111 db_finalize(&q);
1112 style_finish_page();
1113 }
1114
1115

Keyboard Shortcuts

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