Fossil

Check-in [15785eec]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the bt= query parameter on /timeline so that it is ignored if it occurs after check-in of the p= query parameter.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 15785eec6b07ed0ea3a28c770e4a2913f7d47dad81be35b8febf2fbefb5c15b7
User & Date: drh 2020-06-18 16:35:42
Context
2020-06-18
17:42
Omit special characters from the search pattern for indexed search. check-in: 977bb3fd user: drh tags: trunk
16:35
Fix the bt= query parameter on /timeline so that it is ignored if it occurs after check-in of the p= query parameter. check-in: 15785eec user: drh tags: trunk
16:17
Add the bt= query parameter to /timeline. Used in conjunction with p=, the bt= entry (mnemonic: Back To) provides a limit to how far backwards in time the ancestor search will go. check-in: 8b7a979a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/descendants.c.

195
196
197
198
199
200
201



202
203
204
205
206
207
208
209
210
    **    (1)  Primary parents
    **    (2)  Merge parents
    **    (3)  Cherrypick merge parents.
    **    (4)  All ancestores of 1 and 2 but not of 3.
    */
    double rLimitMtime = 0.0;
    if( ridBackTo ){



      rLimitMtime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d",
                              ridBackTo);
    }
    db_multi_exec(
      "WITH RECURSIVE "
      "  parent(pid,cid,isCP) AS ("
      "    SELECT plink.pid, plink.cid, 0 AS xisCP FROM plink"
      "    UNION ALL"
      "    SELECT parentid, childid, 1 FROM cherrypick WHERE NOT isExclude"







>
>
>
|
|







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    **    (1)  Primary parents
    **    (2)  Merge parents
    **    (3)  Cherrypick merge parents.
    **    (4)  All ancestores of 1 and 2 but not of 3.
    */
    double rLimitMtime = 0.0;
    if( ridBackTo ){
      rLimitMtime = db_double(0.0,
         "SELECT mtime FROM event"
         " WHERE objid=%d"
         "   AND mtime<(SELECT mtime FROM event WHERE objid=%d)",
         ridBackTo, rid);
    }
    db_multi_exec(
      "WITH RECURSIVE "
      "  parent(pid,cid,isCP) AS ("
      "    SELECT plink.pid, plink.cid, 0 AS xisCP FROM plink"
      "    UNION ALL"
      "    SELECT parentid, childid, 1 FROM cherrypick WHERE NOT isExclude"