Fossil SCM
On the /timeline page, if the p= and bt= query parameters are both present but n= is omitted, then make n as large as it needs to be to cover all ancestors of p= back to the limiting checkin specified by bt=.
Commit
34f5ea44038583fe7bd255659bf28272b574b18bfc2e434c2ffe2ac363a93bc1
Parent
39b114c19f69d2f…
1 file changed
+3
-1
+3
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1734,12 +1734,14 @@ | ||
| 1734 | 1734 | int secondaryRid = 0; /* Show secondary highlight */ |
| 1735 | 1735 | int disableY = 0; /* Disable type selector on submenu */ |
| 1736 | 1736 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1737 | 1737 | char *zPlural; /* Ending for plural forms */ |
| 1738 | 1738 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1739 | + int haveParameterN; /* True if n= query parameter present */ | |
| 1739 | 1740 | |
| 1740 | 1741 | /* Set number of rows to display */ |
| 1742 | + haveParameterN = P("n")!=0; | |
| 1741 | 1743 | cookie_read_parameter("n","n"); |
| 1742 | 1744 | z = P("n"); |
| 1743 | 1745 | if( z==0 ) z = db_get("timeline-default-length",0); |
| 1744 | 1746 | if( z ){ |
| 1745 | 1747 | if( fossil_strcmp(z,"all")==0 ){ |
| @@ -2064,11 +2066,10 @@ | ||
| 2064 | 2066 | " WHERE mlink.mid=x" |
| 2065 | 2067 | " AND mlink.fnid=filename.fnid AND %s)", |
| 2066 | 2068 | glob_expr("filename.name", zChng) |
| 2067 | 2069 | ); |
| 2068 | 2070 | } |
| 2069 | -// tmFlags |= TIMELINE_DISJOINT; | |
| 2070 | 2071 | tmFlags |= TIMELINE_XMERGE | TIMELINE_FILLGAPS; |
| 2071 | 2072 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 2072 | 2073 | if( advancedMenu ){ |
| 2073 | 2074 | style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0); |
| 2074 | 2075 | } |
| @@ -2118,10 +2119,11 @@ | ||
| 2118 | 2119 | db_multi_exec("DELETE FROM ok"); |
| 2119 | 2120 | } |
| 2120 | 2121 | if( p_rid ){ |
| 2121 | 2122 | zBackTo = P("bt"); |
| 2122 | 2123 | ridBackTo = zBackTo ? name_to_typed_rid(zBackTo,"ci") : 0; |
| 2124 | + if( !haveParameterN ) nEntry = 0; | |
| 2123 | 2125 | compute_ancestors(p_rid, nEntry==0 ? 0 : nEntry+1, 0, ridBackTo); |
| 2124 | 2126 | np = db_int(0, "SELECT count(*)-1 FROM ok"); |
| 2125 | 2127 | if( np>0 || nd==0 ){ |
| 2126 | 2128 | if( nd>0 ) blob_appendf(&desc, " and "); |
| 2127 | 2129 | blob_appendf(&desc, "%d ancestor%s", np, (1==np)?"":"s"); |
| 2128 | 2130 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1734,12 +1734,14 @@ | |
| 1734 | int secondaryRid = 0; /* Show secondary highlight */ |
| 1735 | int disableY = 0; /* Disable type selector on submenu */ |
| 1736 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1737 | char *zPlural; /* Ending for plural forms */ |
| 1738 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1739 | |
| 1740 | /* Set number of rows to display */ |
| 1741 | cookie_read_parameter("n","n"); |
| 1742 | z = P("n"); |
| 1743 | if( z==0 ) z = db_get("timeline-default-length",0); |
| 1744 | if( z ){ |
| 1745 | if( fossil_strcmp(z,"all")==0 ){ |
| @@ -2064,11 +2066,10 @@ | |
| 2064 | " WHERE mlink.mid=x" |
| 2065 | " AND mlink.fnid=filename.fnid AND %s)", |
| 2066 | glob_expr("filename.name", zChng) |
| 2067 | ); |
| 2068 | } |
| 2069 | // tmFlags |= TIMELINE_DISJOINT; |
| 2070 | tmFlags |= TIMELINE_XMERGE | TIMELINE_FILLGAPS; |
| 2071 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 2072 | if( advancedMenu ){ |
| 2073 | style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0); |
| 2074 | } |
| @@ -2118,10 +2119,11 @@ | |
| 2118 | db_multi_exec("DELETE FROM ok"); |
| 2119 | } |
| 2120 | if( p_rid ){ |
| 2121 | zBackTo = P("bt"); |
| 2122 | ridBackTo = zBackTo ? name_to_typed_rid(zBackTo,"ci") : 0; |
| 2123 | compute_ancestors(p_rid, nEntry==0 ? 0 : nEntry+1, 0, ridBackTo); |
| 2124 | np = db_int(0, "SELECT count(*)-1 FROM ok"); |
| 2125 | if( np>0 || nd==0 ){ |
| 2126 | if( nd>0 ) blob_appendf(&desc, " and "); |
| 2127 | blob_appendf(&desc, "%d ancestor%s", np, (1==np)?"":"s"); |
| 2128 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1734,12 +1734,14 @@ | |
| 1734 | int secondaryRid = 0; /* Show secondary highlight */ |
| 1735 | int disableY = 0; /* Disable type selector on submenu */ |
| 1736 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1737 | char *zPlural; /* Ending for plural forms */ |
| 1738 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1739 | int haveParameterN; /* True if n= query parameter present */ |
| 1740 | |
| 1741 | /* Set number of rows to display */ |
| 1742 | haveParameterN = P("n")!=0; |
| 1743 | cookie_read_parameter("n","n"); |
| 1744 | z = P("n"); |
| 1745 | if( z==0 ) z = db_get("timeline-default-length",0); |
| 1746 | if( z ){ |
| 1747 | if( fossil_strcmp(z,"all")==0 ){ |
| @@ -2064,11 +2066,10 @@ | |
| 2066 | " WHERE mlink.mid=x" |
| 2067 | " AND mlink.fnid=filename.fnid AND %s)", |
| 2068 | glob_expr("filename.name", zChng) |
| 2069 | ); |
| 2070 | } |
| 2071 | tmFlags |= TIMELINE_XMERGE | TIMELINE_FILLGAPS; |
| 2072 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 2073 | if( advancedMenu ){ |
| 2074 | style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0); |
| 2075 | } |
| @@ -2118,10 +2119,11 @@ | |
| 2119 | db_multi_exec("DELETE FROM ok"); |
| 2120 | } |
| 2121 | if( p_rid ){ |
| 2122 | zBackTo = P("bt"); |
| 2123 | ridBackTo = zBackTo ? name_to_typed_rid(zBackTo,"ci") : 0; |
| 2124 | if( !haveParameterN ) nEntry = 0; |
| 2125 | compute_ancestors(p_rid, nEntry==0 ? 0 : nEntry+1, 0, ridBackTo); |
| 2126 | np = db_int(0, "SELECT count(*)-1 FROM ok"); |
| 2127 | if( np>0 || nd==0 ){ |
| 2128 | if( nd>0 ) blob_appendf(&desc, " and "); |
| 2129 | blob_appendf(&desc, "%d ancestor%s", np, (1==np)?"":"s"); |
| 2130 |