Fossil SCM

Fix the bt= query parameter on /timeline so that it is ignored if it occurs after check-in of the p= query parameter.

drh 2020-06-18 16:35 trunk
Commit 15785eec6b07ed0ea3a28c770e4a2913f7d47dad81be35b8febf2fbefb5c15b7
1 file changed +5 -2
--- src/descendants.c
+++ src/descendants.c
@@ -197,12 +197,15 @@
197197
** (3) Cherrypick merge parents.
198198
** (4) All ancestores of 1 and 2 but not of 3.
199199
*/
200200
double rLimitMtime = 0.0;
201201
if( ridBackTo ){
202
- rLimitMtime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d",
203
- ridBackTo);
202
+ rLimitMtime = db_double(0.0,
203
+ "SELECT mtime FROM event"
204
+ " WHERE objid=%d"
205
+ " AND mtime<(SELECT mtime FROM event WHERE objid=%d)",
206
+ ridBackTo, rid);
204207
}
205208
db_multi_exec(
206209
"WITH RECURSIVE "
207210
" parent(pid,cid,isCP) AS ("
208211
" SELECT plink.pid, plink.cid, 0 AS xisCP FROM plink"
209212
--- src/descendants.c
+++ src/descendants.c
@@ -197,12 +197,15 @@
197 ** (3) Cherrypick merge parents.
198 ** (4) All ancestores of 1 and 2 but not of 3.
199 */
200 double rLimitMtime = 0.0;
201 if( ridBackTo ){
202 rLimitMtime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d",
203 ridBackTo);
 
 
 
204 }
205 db_multi_exec(
206 "WITH RECURSIVE "
207 " parent(pid,cid,isCP) AS ("
208 " SELECT plink.pid, plink.cid, 0 AS xisCP FROM plink"
209
--- src/descendants.c
+++ src/descendants.c
@@ -197,12 +197,15 @@
197 ** (3) Cherrypick merge parents.
198 ** (4) All ancestores of 1 and 2 but not of 3.
199 */
200 double rLimitMtime = 0.0;
201 if( ridBackTo ){
202 rLimitMtime = db_double(0.0,
203 "SELECT mtime FROM event"
204 " WHERE objid=%d"
205 " AND mtime<(SELECT mtime FROM event WHERE objid=%d)",
206 ridBackTo, rid);
207 }
208 db_multi_exec(
209 "WITH RECURSIVE "
210 " parent(pid,cid,isCP) AS ("
211 " SELECT plink.pid, plink.cid, 0 AS xisCP FROM plink"
212

Keyboard Shortcuts

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