Fossil SCM

Add the "abd" (Avoid Branch Detours) query flag on /timeline. Better descriptions of the resulting timeline with the "min" query flag.

drh 2025-03-07 21:50 min-from-to
Commit d82b52aac459a155d75f8ce378804faf8b7eb60f5e4fef455597964649041a4c
1 file changed +5 -3
+5 -3
--- src/timeline.c
+++ src/timeline.c
@@ -1605,10 +1605,12 @@
16051605
** from=CHECKIN Path through common ancestor from...
16061606
** to=CHECKIN ... to this
16071607
** to2=CHECKIN ... backup name if to= doesn't resolve
16081608
** shortest ... show only the shortest path
16091609
** rel ... also show related checkins
1610
+** min ... only show key nodes of the path
1611
+** abd ... avoid branch detours
16101612
** bt=PRIOR ... path from CHECKIN back to PRIOR
16111613
** ft=LATER ... path from CHECKIN forward to LATER
16121614
** me=CHECKIN Most direct path from...
16131615
** you=CHECKIN ... to this
16141616
** rel ... also show related checkins
@@ -2073,11 +2075,11 @@
20732075
const char *zTo = 0;
20742076
Blob ins;
20752077
int nNodeOnPath = 0;
20762078
int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */
20772079
int earlierRid = 0, laterRid = 0;
2078
- int cost = bMin ? 100 : 0;
2080
+ int cost = bMin || P("abd")!=0 ? 100 : 0;
20792081
20802082
if( from_rid && to_rid ){
20812083
if( from_to_mode==0 ){
20822084
p = path_shortest(from_rid, to_rid, noMerge, 0, 0, cost);
20832085
}else if( from_to_mode==1 ){
@@ -2205,12 +2207,12 @@
22052207
style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0);
22062208
}
22072209
nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode");
22082210
if( nNodeOnPath==1 && from_to_mode>0 ){
22092211
blob_appendf(&desc,"Check-in ");
2210
- }else if( from_to_mode>0 ){
2211
- blob_appendf(&desc, "%d check-ins on the shorted path from ",nNodeOnPath);
2212
+ }else if( bMin ){
2213
+ blob_appendf(&desc, "%d check-ins along the path from ", nNodeOnPath);
22122214
}else{
22132215
blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath);
22142216
}
22152217
if( from_rid==selectedRid ){
22162218
blob_appendf(&desc, "<span class='timelineSelected'>");
22172219
--- src/timeline.c
+++ src/timeline.c
@@ -1605,10 +1605,12 @@
1605 ** from=CHECKIN Path through common ancestor from...
1606 ** to=CHECKIN ... to this
1607 ** to2=CHECKIN ... backup name if to= doesn't resolve
1608 ** shortest ... show only the shortest path
1609 ** rel ... also show related checkins
 
 
1610 ** bt=PRIOR ... path from CHECKIN back to PRIOR
1611 ** ft=LATER ... path from CHECKIN forward to LATER
1612 ** me=CHECKIN Most direct path from...
1613 ** you=CHECKIN ... to this
1614 ** rel ... also show related checkins
@@ -2073,11 +2075,11 @@
2073 const char *zTo = 0;
2074 Blob ins;
2075 int nNodeOnPath = 0;
2076 int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */
2077 int earlierRid = 0, laterRid = 0;
2078 int cost = bMin ? 100 : 0;
2079
2080 if( from_rid && to_rid ){
2081 if( from_to_mode==0 ){
2082 p = path_shortest(from_rid, to_rid, noMerge, 0, 0, cost);
2083 }else if( from_to_mode==1 ){
@@ -2205,12 +2207,12 @@
2205 style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0);
2206 }
2207 nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode");
2208 if( nNodeOnPath==1 && from_to_mode>0 ){
2209 blob_appendf(&desc,"Check-in ");
2210 }else if( from_to_mode>0 ){
2211 blob_appendf(&desc, "%d check-ins on the shorted path from ",nNodeOnPath);
2212 }else{
2213 blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath);
2214 }
2215 if( from_rid==selectedRid ){
2216 blob_appendf(&desc, "<span class='timelineSelected'>");
2217
--- src/timeline.c
+++ src/timeline.c
@@ -1605,10 +1605,12 @@
1605 ** from=CHECKIN Path through common ancestor from...
1606 ** to=CHECKIN ... to this
1607 ** to2=CHECKIN ... backup name if to= doesn't resolve
1608 ** shortest ... show only the shortest path
1609 ** rel ... also show related checkins
1610 ** min ... only show key nodes of the path
1611 ** abd ... avoid branch detours
1612 ** bt=PRIOR ... path from CHECKIN back to PRIOR
1613 ** ft=LATER ... path from CHECKIN forward to LATER
1614 ** me=CHECKIN Most direct path from...
1615 ** you=CHECKIN ... to this
1616 ** rel ... also show related checkins
@@ -2073,11 +2075,11 @@
2075 const char *zTo = 0;
2076 Blob ins;
2077 int nNodeOnPath = 0;
2078 int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */
2079 int earlierRid = 0, laterRid = 0;
2080 int cost = bMin || P("abd")!=0 ? 100 : 0;
2081
2082 if( from_rid && to_rid ){
2083 if( from_to_mode==0 ){
2084 p = path_shortest(from_rid, to_rid, noMerge, 0, 0, cost);
2085 }else if( from_to_mode==1 ){
@@ -2205,12 +2207,12 @@
2207 style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0);
2208 }
2209 nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode");
2210 if( nNodeOnPath==1 && from_to_mode>0 ){
2211 blob_appendf(&desc,"Check-in ");
2212 }else if( bMin ){
2213 blob_appendf(&desc, "%d check-ins along the path from ", nNodeOnPath);
2214 }else{
2215 blob_appendf(&desc, "%d check-ins going from ", nNodeOnPath);
2216 }
2217 if( from_rid==selectedRid ){
2218 blob_appendf(&desc, "<span class='timelineSelected'>");
2219

Keyboard Shortcuts

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