Fossil SCM

The uf=HASH query parameter on /timeline shows all checkins that use the identified file unless there is also an n=COUNT query parameter.

drh 2020-12-31 13:26 trunk
Commit dffcebea147aa88890d6b9dbfa3f7d615582ca22f44e0215045e0d5d339a5dd8
3 files changed +1 -1 +2 -2 +18 -3
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -705,11 +705,11 @@
705705
@ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
706706
@ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
707707
@ [annotate]</a>
708708
@ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
709709
@ [blame]</a>
710
- @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
710
+ @ %z(href("%R/timeline?uf=%!S",zUuid))[check-ins&nbsp;using]</a>
711711
if( fpid>0 ){
712712
@ %z(href("%R/fdiff?v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
713713
}
714714
if( fileedit_is_editable(zFName) ){
715715
@ %z(href("%R/fileedit?filename=%T&checkin=%!S",zFName,zCkin))\
716716
--- src/finfo.c
+++ src/finfo.c
@@ -705,11 +705,11 @@
705 @ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
706 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
707 @ [annotate]</a>
708 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
709 @ [blame]</a>
710 @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
711 if( fpid>0 ){
712 @ %z(href("%R/fdiff?v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
713 }
714 if( fileedit_is_editable(zFName) ){
715 @ %z(href("%R/fileedit?filename=%T&checkin=%!S",zFName,zCkin))\
716
--- src/finfo.c
+++ src/finfo.c
@@ -705,11 +705,11 @@
705 @ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
706 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
707 @ [annotate]</a>
708 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
709 @ [blame]</a>
710 @ %z(href("%R/timeline?uf=%!S",zUuid))[check-ins&nbsp;using]</a>
711 if( fpid>0 ){
712 @ %z(href("%R/fdiff?v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
713 }
714 if( fileedit_is_editable(zFName) ){
715 @ %z(href("%R/fileedit?filename=%T&checkin=%!S",zFName,zCkin))\
716
+2 -2
--- src/info.c
+++ src/info.c
@@ -1458,11 +1458,11 @@
14581458
if( g.perm.Hyperlink ){
14591459
@ %z(href("%R/annotate?filename=%T&checkin=%!S",zName,zVers))
14601460
@ [annotate]</a>
14611461
@ %z(href("%R/blame?filename=%T&checkin=%!S",zName,zVers))
14621462
@ [blame]</a>
1463
- @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
1463
+ @ %z(href("%R/timeline?uf=%!S",zUuid))[check-ins&nbsp;using]</a>
14641464
if( fileedit_is_editable(zName) ){
14651465
@ %z(href("%R/fileedit?filename=%T&checkin=%!S",zName,zVers))[edit]</a>
14661466
}
14671467
}
14681468
cnt++;
@@ -2437,11 +2437,11 @@
24372437
}
24382438
db_finalize(&q);
24392439
}
24402440
style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName));
24412441
if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){
2442
- style_submenu_element("Check-ins Using", "%R/timeline?n=200&uf=%s", zUuid);
2442
+ style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid);
24432443
}
24442444
zMime = mimetype_from_name(blob_str(&downloadName));
24452445
if( zMime ){
24462446
if( fossil_strcmp(zMime, "text/html")==0 ){
24472447
if( asText ){
24482448
--- src/info.c
+++ src/info.c
@@ -1458,11 +1458,11 @@
1458 if( g.perm.Hyperlink ){
1459 @ %z(href("%R/annotate?filename=%T&checkin=%!S",zName,zVers))
1460 @ [annotate]</a>
1461 @ %z(href("%R/blame?filename=%T&checkin=%!S",zName,zVers))
1462 @ [blame]</a>
1463 @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
1464 if( fileedit_is_editable(zName) ){
1465 @ %z(href("%R/fileedit?filename=%T&checkin=%!S",zName,zVers))[edit]</a>
1466 }
1467 }
1468 cnt++;
@@ -2437,11 +2437,11 @@
2437 }
2438 db_finalize(&q);
2439 }
2440 style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName));
2441 if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){
2442 style_submenu_element("Check-ins Using", "%R/timeline?n=200&uf=%s", zUuid);
2443 }
2444 zMime = mimetype_from_name(blob_str(&downloadName));
2445 if( zMime ){
2446 if( fossil_strcmp(zMime, "text/html")==0 ){
2447 if( asText ){
2448
--- src/info.c
+++ src/info.c
@@ -1458,11 +1458,11 @@
1458 if( g.perm.Hyperlink ){
1459 @ %z(href("%R/annotate?filename=%T&checkin=%!S",zName,zVers))
1460 @ [annotate]</a>
1461 @ %z(href("%R/blame?filename=%T&checkin=%!S",zName,zVers))
1462 @ [blame]</a>
1463 @ %z(href("%R/timeline?uf=%!S",zUuid))[check-ins&nbsp;using]</a>
1464 if( fileedit_is_editable(zName) ){
1465 @ %z(href("%R/fileedit?filename=%T&checkin=%!S",zName,zVers))[edit]</a>
1466 }
1467 }
1468 cnt++;
@@ -2437,11 +2437,11 @@
2437 }
2438 db_finalize(&q);
2439 }
2440 style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName));
2441 if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){
2442 style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid);
2443 }
2444 zMime = mimetype_from_name(blob_str(&downloadName));
2445 if( zMime ){
2446 if( fossil_strcmp(zMime, "text/html")==0 ){
2447 if( asText ){
2448
+18 -3
--- src/timeline.c
+++ src/timeline.c
@@ -1636,10 +1636,12 @@
16361636
** c=TIMEORTAG Show events that happen "circa" TIMEORTAG
16371637
** cf=FILEHASH Show events around the time of the first use of
16381638
** the file with FILEHASH
16391639
** m=TIMEORTAG Highlight the event at TIMEORTAG
16401640
** n=COUNT Maximum number of events. "all" for no limit
1641
+** n1=COUNT Same as "n" but does not set the user-preference cookie
1642
+** Use "n1=COUNT" for a one-time display
16411643
** p=CHECKIN Parents and ancestors of CHECKIN
16421644
** bt=PRIOR ... going back to PRIOR
16431645
** d=CHECKIN Children and descendants of CHECKIN
16441646
** dp=CHECKIN The same as 'd=CHECKIN&p=CHECKIN'
16451647
** t=TAG Show only check-ins with the given TAG
@@ -1757,14 +1759,26 @@
17571759
17581760
url_initialize(&url, "timeline");
17591761
cgi_query_parameters_to_url(&url);
17601762
17611763
/* Set number of rows to display */
1762
- haveParameterN = P("n")!=0;
1763
- cookie_read_parameter("n","n");
17641764
z = P("n");
1765
- if( z==0 ) z = db_get("timeline-default-length",0);
1765
+ if( z!=0 ){
1766
+ haveParameterN = 1;
1767
+ }else{
1768
+ z = P("n1");
1769
+ if( z ){
1770
+ haveParameterN = 1;
1771
+ }else{
1772
+ haveParameterN = 0;
1773
+ cookie_read_parameter("n","n");
1774
+ z = P("n");
1775
+ if( z==0 ){
1776
+ z = db_get("timeline-default-length",0);
1777
+ }
1778
+ }
1779
+ }
17661780
if( z ){
17671781
if( fossil_strcmp(z,"all")==0 ){
17681782
nEntry = 0;
17691783
}else{
17701784
nEntry = atoi(z);
@@ -1921,10 +1935,11 @@
19211935
zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
19221936
db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
19231937
compute_uses_file("usesfile", ufid, 0);
19241938
zType = "ci";
19251939
disableY = 1;
1940
+ if( !haveParameterN ) nEntry = 0;
19261941
}else{
19271942
zUses = 0;
19281943
}
19291944
}
19301945
if( renameOnly ){
19311946
--- src/timeline.c
+++ src/timeline.c
@@ -1636,10 +1636,12 @@
1636 ** c=TIMEORTAG Show events that happen "circa" TIMEORTAG
1637 ** cf=FILEHASH Show events around the time of the first use of
1638 ** the file with FILEHASH
1639 ** m=TIMEORTAG Highlight the event at TIMEORTAG
1640 ** n=COUNT Maximum number of events. "all" for no limit
 
 
1641 ** p=CHECKIN Parents and ancestors of CHECKIN
1642 ** bt=PRIOR ... going back to PRIOR
1643 ** d=CHECKIN Children and descendants of CHECKIN
1644 ** dp=CHECKIN The same as 'd=CHECKIN&p=CHECKIN'
1645 ** t=TAG Show only check-ins with the given TAG
@@ -1757,14 +1759,26 @@
1757
1758 url_initialize(&url, "timeline");
1759 cgi_query_parameters_to_url(&url);
1760
1761 /* Set number of rows to display */
1762 haveParameterN = P("n")!=0;
1763 cookie_read_parameter("n","n");
1764 z = P("n");
1765 if( z==0 ) z = db_get("timeline-default-length",0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1766 if( z ){
1767 if( fossil_strcmp(z,"all")==0 ){
1768 nEntry = 0;
1769 }else{
1770 nEntry = atoi(z);
@@ -1921,10 +1935,11 @@
1921 zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
1922 db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
1923 compute_uses_file("usesfile", ufid, 0);
1924 zType = "ci";
1925 disableY = 1;
 
1926 }else{
1927 zUses = 0;
1928 }
1929 }
1930 if( renameOnly ){
1931
--- src/timeline.c
+++ src/timeline.c
@@ -1636,10 +1636,12 @@
1636 ** c=TIMEORTAG Show events that happen "circa" TIMEORTAG
1637 ** cf=FILEHASH Show events around the time of the first use of
1638 ** the file with FILEHASH
1639 ** m=TIMEORTAG Highlight the event at TIMEORTAG
1640 ** n=COUNT Maximum number of events. "all" for no limit
1641 ** n1=COUNT Same as "n" but does not set the user-preference cookie
1642 ** Use "n1=COUNT" for a one-time display
1643 ** p=CHECKIN Parents and ancestors of CHECKIN
1644 ** bt=PRIOR ... going back to PRIOR
1645 ** d=CHECKIN Children and descendants of CHECKIN
1646 ** dp=CHECKIN The same as 'd=CHECKIN&p=CHECKIN'
1647 ** t=TAG Show only check-ins with the given TAG
@@ -1757,14 +1759,26 @@
1759
1760 url_initialize(&url, "timeline");
1761 cgi_query_parameters_to_url(&url);
1762
1763 /* Set number of rows to display */
 
 
1764 z = P("n");
1765 if( z!=0 ){
1766 haveParameterN = 1;
1767 }else{
1768 z = P("n1");
1769 if( z ){
1770 haveParameterN = 1;
1771 }else{
1772 haveParameterN = 0;
1773 cookie_read_parameter("n","n");
1774 z = P("n");
1775 if( z==0 ){
1776 z = db_get("timeline-default-length",0);
1777 }
1778 }
1779 }
1780 if( z ){
1781 if( fossil_strcmp(z,"all")==0 ){
1782 nEntry = 0;
1783 }else{
1784 nEntry = atoi(z);
@@ -1921,10 +1935,11 @@
1935 zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
1936 db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
1937 compute_uses_file("usesfile", ufid, 0);
1938 zType = "ci";
1939 disableY = 1;
1940 if( !haveParameterN ) nEntry = 0;
1941 }else{
1942 zUses = 0;
1943 }
1944 }
1945 if( renameOnly ){
1946

Keyboard Shortcuts

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