Fossil SCM
Restore the "shortest" query parameter on /timeline. Make it actually show the path with the fewest number of nodes, as it was originally intended. Improve the /help for /timeline.
Commit
a91586d2563e5ff579a6c08d1e8df35cbd7bad82a10cf3e44f970b102674e083
Parent
e09d965fe0d5862…
1 file changed
+15
-14
+15
-14
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1572,14 +1572,14 @@ | ||
| 1572 | 1572 | ** dp=CHECKIN Same as 'd=CHECKIN&p=CHECKIN' |
| 1573 | 1573 | ** dp2=CKIN2 Same as 'd2=CKIN2&p2=CKIN2' |
| 1574 | 1574 | ** df=CHECKIN Same as 'd=CHECKIN&n1=all&nd'. Mnemonic: "Derived From" |
| 1575 | 1575 | ** bt=CHECKIN "Back To". Show ancenstors going back to CHECKIN |
| 1576 | 1576 | ** p=CX ... from CX back to time of CHECKIN |
| 1577 | -** from=CX ... shortest path from CX back to CHECKIN | |
| 1577 | +** from=CX ... path from CX back to CHECKIN | |
| 1578 | 1578 | ** ft=CHECKIN "Forward To": Show decendents forward to CHECKIN |
| 1579 | 1579 | ** d=CX ... from CX up to the time of CHECKIN |
| 1580 | -** from=CX ... shortest path from CX up to CHECKIN | |
| 1580 | +** from=CX ... path from CX up to CHECKIN | |
| 1581 | 1581 | ** t=TAG Show only check-ins with the given TAG |
| 1582 | 1582 | ** r=TAG Same as 't=TAG&rel'. Mnemonic: "Related" |
| 1583 | 1583 | ** tl=TAGLIST Same as 't=TAGLIST&ms=brlist'. Mnemonic: "Tag List" |
| 1584 | 1584 | ** rl=TAGLIST Same as 'r=TAGLIST&ms=brlist'. Mnemonic: "Related List" |
| 1585 | 1585 | ** ml=TAGLIST Same as 'tl=TAGLIST&mionly'. Mnemonic: "Merge-in List" |
| @@ -1600,21 +1600,21 @@ | ||
| 1600 | 1600 | ** nsm Omit the submenu |
| 1601 | 1601 | ** nc Omit all graph colors other than highlights |
| 1602 | 1602 | ** v Show details of files changed |
| 1603 | 1603 | ** vfx Show complete text of forum messages |
| 1604 | 1604 | ** f=CHECKIN Family (immediate parents and children) of CHECKIN |
| 1605 | -** from=CHECKIN Path through common ancestor from... | |
| 1606 | -** to=CHECKIN ... to this | |
| 1607 | -** to2=CHECKIN ... backup name if to= doesn't resolve | |
| 1608 | -** rel ... also show related checkins | |
| 1609 | -** min ... only show key nodes of the path | |
| 1610 | -** abd ... avoid branch detours | |
| 1611 | -** bt=PRIOR ... path from CHECKIN back to PRIOR | |
| 1612 | -** ft=LATER ... path from CHECKIN forward to LATER | |
| 1613 | -** me=CHECKIN Most direct path from... | |
| 1614 | -** you=CHECKIN ... to this | |
| 1615 | -** rel ... also show related checkins | |
| 1605 | +** from=CHECKIN Path through common ancestor from CHECKIN... | |
| 1606 | +** to=CHECKIN ... to this | |
| 1607 | +** to2=CHECKIN ... backup name if to= doesn't resolve | |
| 1608 | +** shortest ... pick path with least number of nodes | |
| 1609 | +** rel ... also show related checkins | |
| 1610 | +** min ... hide long sequences along same branch | |
| 1611 | +** bt=PRIOR ... path from CHECKIN back to PRIOR | |
| 1612 | +** ft=LATER ... path from CHECKIN forward to LATER | |
| 1613 | +** me=CHECKIN Most direct path from CHECKIN... | |
| 1614 | +** you=CHECKIN ... to this | |
| 1615 | +** rel ... also show related checkins | |
| 1616 | 1616 | ** uf=FILE_HASH Show only check-ins that contain the given file version |
| 1617 | 1617 | ** All qualifying check-ins are shown unless there is |
| 1618 | 1618 | ** also an n= or n1= query parameter. |
| 1619 | 1619 | ** chng=GLOBLIST Show only check-ins that involve changes to a file whose |
| 1620 | 1620 | ** name matches one of the comma-separate GLOBLIST |
| @@ -1697,10 +1697,11 @@ | ||
| 1697 | 1697 | const char *zThisUser = 0; /* Suppress links to this user */ |
| 1698 | 1698 | HQuery url; /* URL for various branch links */ |
| 1699 | 1699 | int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */ |
| 1700 | 1700 | const char *zTo2 = 0; |
| 1701 | 1701 | int to_rid = name_choice("to","to2",&zTo2); /* to= for path timelines */ |
| 1702 | + int bShort = P("shortest")!=0; /* shortest possible path */ | |
| 1702 | 1703 | int me_rid = name_to_typed_rid(P("me"),"ci"); /* me= for common ancestory */ |
| 1703 | 1704 | int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */ |
| 1704 | 1705 | int pd_rid; |
| 1705 | 1706 | const char *zDPName; /* Value of p=, d=, or dp= params */ |
| 1706 | 1707 | double rBefore, rAfter, rCirca; /* Boundary times */ |
| @@ -2073,11 +2074,11 @@ | ||
| 2073 | 2074 | const char *zTo = 0; |
| 2074 | 2075 | Blob ins; |
| 2075 | 2076 | int nNodeOnPath = 0; |
| 2076 | 2077 | int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */ |
| 2077 | 2078 | int earlierRid = 0, laterRid = 0; |
| 2078 | - int cost = bMin || P("abd")!=0 ? 1 : 0; | |
| 2079 | + int cost = bMin || !bShort ? 1 : 0; | |
| 2079 | 2080 | |
| 2080 | 2081 | if( from_rid && to_rid ){ |
| 2081 | 2082 | if( from_to_mode==0 ){ |
| 2082 | 2083 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2083 | 2084 | }else if( from_to_mode==1 ){ |
| 2084 | 2085 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1572,14 +1572,14 @@ | |
| 1572 | ** dp=CHECKIN Same as 'd=CHECKIN&p=CHECKIN' |
| 1573 | ** dp2=CKIN2 Same as 'd2=CKIN2&p2=CKIN2' |
| 1574 | ** df=CHECKIN Same as 'd=CHECKIN&n1=all&nd'. Mnemonic: "Derived From" |
| 1575 | ** bt=CHECKIN "Back To". Show ancenstors going back to CHECKIN |
| 1576 | ** p=CX ... from CX back to time of CHECKIN |
| 1577 | ** from=CX ... shortest path from CX back to CHECKIN |
| 1578 | ** ft=CHECKIN "Forward To": Show decendents forward to CHECKIN |
| 1579 | ** d=CX ... from CX up to the time of CHECKIN |
| 1580 | ** from=CX ... shortest path from CX up to CHECKIN |
| 1581 | ** t=TAG Show only check-ins with the given TAG |
| 1582 | ** r=TAG Same as 't=TAG&rel'. Mnemonic: "Related" |
| 1583 | ** tl=TAGLIST Same as 't=TAGLIST&ms=brlist'. Mnemonic: "Tag List" |
| 1584 | ** rl=TAGLIST Same as 'r=TAGLIST&ms=brlist'. Mnemonic: "Related List" |
| 1585 | ** ml=TAGLIST Same as 'tl=TAGLIST&mionly'. Mnemonic: "Merge-in List" |
| @@ -1600,21 +1600,21 @@ | |
| 1600 | ** nsm Omit the submenu |
| 1601 | ** nc Omit all graph colors other than highlights |
| 1602 | ** v Show details of files changed |
| 1603 | ** vfx Show complete text of forum messages |
| 1604 | ** f=CHECKIN Family (immediate parents and children) of CHECKIN |
| 1605 | ** from=CHECKIN Path through common ancestor from... |
| 1606 | ** to=CHECKIN ... to this |
| 1607 | ** to2=CHECKIN ... backup name if to= doesn't resolve |
| 1608 | ** rel ... also show related checkins |
| 1609 | ** min ... only show key nodes of the path |
| 1610 | ** abd ... avoid branch detours |
| 1611 | ** bt=PRIOR ... path from CHECKIN back to PRIOR |
| 1612 | ** ft=LATER ... path from CHECKIN forward to LATER |
| 1613 | ** me=CHECKIN Most direct path from... |
| 1614 | ** you=CHECKIN ... to this |
| 1615 | ** rel ... also show related checkins |
| 1616 | ** uf=FILE_HASH Show only check-ins that contain the given file version |
| 1617 | ** All qualifying check-ins are shown unless there is |
| 1618 | ** also an n= or n1= query parameter. |
| 1619 | ** chng=GLOBLIST Show only check-ins that involve changes to a file whose |
| 1620 | ** name matches one of the comma-separate GLOBLIST |
| @@ -1697,10 +1697,11 @@ | |
| 1697 | const char *zThisUser = 0; /* Suppress links to this user */ |
| 1698 | HQuery url; /* URL for various branch links */ |
| 1699 | int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */ |
| 1700 | const char *zTo2 = 0; |
| 1701 | int to_rid = name_choice("to","to2",&zTo2); /* to= for path timelines */ |
| 1702 | int me_rid = name_to_typed_rid(P("me"),"ci"); /* me= for common ancestory */ |
| 1703 | int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */ |
| 1704 | int pd_rid; |
| 1705 | const char *zDPName; /* Value of p=, d=, or dp= params */ |
| 1706 | double rBefore, rAfter, rCirca; /* Boundary times */ |
| @@ -2073,11 +2074,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 || P("abd")!=0 ? 1 : 0; |
| 2079 | |
| 2080 | if( from_rid && to_rid ){ |
| 2081 | if( from_to_mode==0 ){ |
| 2082 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2083 | }else if( from_to_mode==1 ){ |
| 2084 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1572,14 +1572,14 @@ | |
| 1572 | ** dp=CHECKIN Same as 'd=CHECKIN&p=CHECKIN' |
| 1573 | ** dp2=CKIN2 Same as 'd2=CKIN2&p2=CKIN2' |
| 1574 | ** df=CHECKIN Same as 'd=CHECKIN&n1=all&nd'. Mnemonic: "Derived From" |
| 1575 | ** bt=CHECKIN "Back To". Show ancenstors going back to CHECKIN |
| 1576 | ** p=CX ... from CX back to time of CHECKIN |
| 1577 | ** from=CX ... path from CX back to CHECKIN |
| 1578 | ** ft=CHECKIN "Forward To": Show decendents forward to CHECKIN |
| 1579 | ** d=CX ... from CX up to the time of CHECKIN |
| 1580 | ** from=CX ... path from CX up to CHECKIN |
| 1581 | ** t=TAG Show only check-ins with the given TAG |
| 1582 | ** r=TAG Same as 't=TAG&rel'. Mnemonic: "Related" |
| 1583 | ** tl=TAGLIST Same as 't=TAGLIST&ms=brlist'. Mnemonic: "Tag List" |
| 1584 | ** rl=TAGLIST Same as 'r=TAGLIST&ms=brlist'. Mnemonic: "Related List" |
| 1585 | ** ml=TAGLIST Same as 'tl=TAGLIST&mionly'. Mnemonic: "Merge-in List" |
| @@ -1600,21 +1600,21 @@ | |
| 1600 | ** nsm Omit the submenu |
| 1601 | ** nc Omit all graph colors other than highlights |
| 1602 | ** v Show details of files changed |
| 1603 | ** vfx Show complete text of forum messages |
| 1604 | ** f=CHECKIN Family (immediate parents and children) of CHECKIN |
| 1605 | ** from=CHECKIN Path through common ancestor from CHECKIN... |
| 1606 | ** to=CHECKIN ... to this |
| 1607 | ** to2=CHECKIN ... backup name if to= doesn't resolve |
| 1608 | ** shortest ... pick path with least number of nodes |
| 1609 | ** rel ... also show related checkins |
| 1610 | ** min ... hide long sequences along same branch |
| 1611 | ** bt=PRIOR ... path from CHECKIN back to PRIOR |
| 1612 | ** ft=LATER ... path from CHECKIN forward to LATER |
| 1613 | ** me=CHECKIN Most direct path from CHECKIN... |
| 1614 | ** you=CHECKIN ... to this |
| 1615 | ** rel ... also show related checkins |
| 1616 | ** uf=FILE_HASH Show only check-ins that contain the given file version |
| 1617 | ** All qualifying check-ins are shown unless there is |
| 1618 | ** also an n= or n1= query parameter. |
| 1619 | ** chng=GLOBLIST Show only check-ins that involve changes to a file whose |
| 1620 | ** name matches one of the comma-separate GLOBLIST |
| @@ -1697,10 +1697,11 @@ | |
| 1697 | const char *zThisUser = 0; /* Suppress links to this user */ |
| 1698 | HQuery url; /* URL for various branch links */ |
| 1699 | int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */ |
| 1700 | const char *zTo2 = 0; |
| 1701 | int to_rid = name_choice("to","to2",&zTo2); /* to= for path timelines */ |
| 1702 | int bShort = P("shortest")!=0; /* shortest possible path */ |
| 1703 | int me_rid = name_to_typed_rid(P("me"),"ci"); /* me= for common ancestory */ |
| 1704 | int you_rid = name_to_typed_rid(P("you"),"ci");/* you= for common ancst */ |
| 1705 | int pd_rid; |
| 1706 | const char *zDPName; /* Value of p=, d=, or dp= params */ |
| 1707 | double rBefore, rAfter, rCirca; /* Boundary times */ |
| @@ -2073,11 +2074,11 @@ | |
| 2074 | const char *zTo = 0; |
| 2075 | Blob ins; |
| 2076 | int nNodeOnPath = 0; |
| 2077 | int commonAncs = 0; /* Common ancestors of me_rid and you_rid. */ |
| 2078 | int earlierRid = 0, laterRid = 0; |
| 2079 | int cost = bMin || !bShort ? 1 : 0; |
| 2080 | |
| 2081 | if( from_rid && to_rid ){ |
| 2082 | if( from_to_mode==0 ){ |
| 2083 | p = path_shortest(from_rid, to_rid, 0, 0, 0, cost); |
| 2084 | }else if( from_to_mode==1 ){ |
| 2085 |