Fossil SCM

Add the "remote-permalink" setting, which if set causes the "Permalink" hyperlink on the submenu of the "bisect" timeline to reference the remote repository that was most recently synced, rather than the local repository (which is probably a pop-up using "fossil bisect ui").

drh 2026-10-13 20:17 UTC trunk
Commit afe648437872b03ececa56a3263dc3725dafd6d45f9478bf09b16ccd2043ef20
1 file changed +20 -1
+20 -1
--- src/timeline.c
+++ src/timeline.c
@@ -360,10 +360,18 @@
360360
**
361361
** The default is currently 1. Prior to 2025-10-19, the default was 2.
362362
** This setting has no effect on the "Classic" view, which always behaves
363363
** as if the setting were 2.
364364
*/
365
+/*
366
+** SETTING: remote-permalink boolean default=off
367
+**
368
+** If the remote-permalink setting is true, then the "Permalink" hyperlink
369
+** in the submenu of the "bisect" page of the timeline references the
370
+** remote repository used for the last sync (and stored in the
371
+** last-sync-url setting).
372
+*/
365373
366374
/*
367375
** Output a timeline in the web format given a query. The query
368376
** should return these columns:
369377
**
@@ -2161,15 +2169,26 @@
21612169
disableY = 1;
21622170
}
21632171
if( bisectLocal && cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
21642172
int iCurrent = db_lget_int("checkout",0);
21652173
char *zPerm = bisect_permalink();
2174
+ char *zHost = 0;
21662175
bisect_create_bilog_table(iCurrent, 0, 1);
21672176
tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
21682177
zType = "ci";
21692178
disableY = 1;
2170
- style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm);
2179
+ if( db_get_boolean("remote-permalink",0) ){
2180
+ zHost = db_text(0,
2181
+ "SELECT value FROM config WHERE name='last-sync-url'"
2182
+ " AND value GLOB 'http*'"
2183
+ );
2184
+ }
2185
+ if( zHost ){
2186
+ style_submenu_element("Permalink", "%h/timeline?bid=%z", zHost, zPerm);
2187
+ }else{
2188
+ style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm);
2189
+ }
21712190
}else{
21722191
bisectLocal = 0;
21732192
}
21742193
if( zBisect!=0 && bisect_create_bilog_table(0, zBisect, 1) ){
21752194
tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
21762195
--- src/timeline.c
+++ src/timeline.c
@@ -360,10 +360,18 @@
360 **
361 ** The default is currently 1. Prior to 2025-10-19, the default was 2.
362 ** This setting has no effect on the "Classic" view, which always behaves
363 ** as if the setting were 2.
364 */
 
 
 
 
 
 
 
 
365
366 /*
367 ** Output a timeline in the web format given a query. The query
368 ** should return these columns:
369 **
@@ -2161,15 +2169,26 @@
2161 disableY = 1;
2162 }
2163 if( bisectLocal && cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
2164 int iCurrent = db_lget_int("checkout",0);
2165 char *zPerm = bisect_permalink();
 
2166 bisect_create_bilog_table(iCurrent, 0, 1);
2167 tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
2168 zType = "ci";
2169 disableY = 1;
2170 style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm);
 
 
 
 
 
 
 
 
 
 
2171 }else{
2172 bisectLocal = 0;
2173 }
2174 if( zBisect!=0 && bisect_create_bilog_table(0, zBisect, 1) ){
2175 tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
2176
--- src/timeline.c
+++ src/timeline.c
@@ -360,10 +360,18 @@
360 **
361 ** The default is currently 1. Prior to 2025-10-19, the default was 2.
362 ** This setting has no effect on the "Classic" view, which always behaves
363 ** as if the setting were 2.
364 */
365 /*
366 ** SETTING: remote-permalink boolean default=off
367 **
368 ** If the remote-permalink setting is true, then the "Permalink" hyperlink
369 ** in the submenu of the "bisect" page of the timeline references the
370 ** remote repository used for the last sync (and stored in the
371 ** last-sync-url setting).
372 */
373
374 /*
375 ** Output a timeline in the web format given a query. The query
376 ** should return these columns:
377 **
@@ -2161,15 +2169,26 @@
2169 disableY = 1;
2170 }
2171 if( bisectLocal && cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
2172 int iCurrent = db_lget_int("checkout",0);
2173 char *zPerm = bisect_permalink();
2174 char *zHost = 0;
2175 bisect_create_bilog_table(iCurrent, 0, 1);
2176 tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
2177 zType = "ci";
2178 disableY = 1;
2179 if( db_get_boolean("remote-permalink",0) ){
2180 zHost = db_text(0,
2181 "SELECT value FROM config WHERE name='last-sync-url'"
2182 " AND value GLOB 'http*'"
2183 );
2184 }
2185 if( zHost ){
2186 style_submenu_element("Permalink", "%h/timeline?bid=%z", zHost, zPerm);
2187 }else{
2188 style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm);
2189 }
2190 }else{
2191 bisectLocal = 0;
2192 }
2193 if( zBisect!=0 && bisect_create_bilog_table(0, zBisect, 1) ){
2194 tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS;
2195

Keyboard Shortcuts

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