Fossil SCM
An off-mailing-list patch which fixes the lack of deleted files from /json/timeline/checkin's file list. Thanks to Edgardo Cruz for tracking this down.
Commit
cd55efe7754dd7e531e0c903e53a278b1ae7ccdc005446d0420825fe129c90db
Parent
917f1c21e52a299…
1 file changed
+13
-12
+13
-12
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -318,22 +318,23 @@ | ||
| 318 | 318 | cson_value * json_get_changed_files(int rid, int flags){ |
| 319 | 319 | cson_value * rowsV = NULL; |
| 320 | 320 | cson_array * rows = NULL; |
| 321 | 321 | Stmt q = empty_Stmt; |
| 322 | 322 | db_prepare(&q, |
| 323 | - "SELECT (pid==0) AS isnew," | |
| 324 | - " (fid==0) AS isdel," | |
| 325 | - " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," | |
| 326 | - " blob.uuid as uuid," | |
| 327 | - " (SELECT uuid FROM blob WHERE rid=pid) as parent," | |
| 328 | - " blob.size as size" | |
| 329 | - " FROM mlink, blob" | |
| 330 | - " WHERE mid=%d AND pid!=fid" | |
| 331 | - " AND blob.rid=fid AND NOT mlink.isaux" | |
| 332 | - " ORDER BY name /*sort*/", | |
| 333 | - rid | |
| 334 | - ); | |
| 323 | + "SELECT (pid<=0) AS isnew," | |
| 324 | + " (fid==0) AS isdel," | |
| 325 | + " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," | |
| 326 | + " (SELECT uuid FROM blob WHERE rid=fid) as uuid," | |
| 327 | + " (SELECT uuid FROM blob WHERE rid=pid) as parent," | |
| 328 | + " blob.size as size" | |
| 329 | + " FROM mlink" | |
| 330 | + " LEFT JOIN blob ON blob.rid=fid" | |
| 331 | + " WHERE mid=%d AND pid!=fid" | |
| 332 | + " AND NOT mlink.isaux" | |
| 333 | + " ORDER BY name /*sort*/", | |
| 334 | + rid | |
| 335 | + ); | |
| 335 | 336 | while( (SQLITE_ROW == db_step(&q)) ){ |
| 336 | 337 | cson_value * rowV = cson_value_new_object(); |
| 337 | 338 | cson_object * row = cson_value_get_object(rowV); |
| 338 | 339 | int const isNew = db_column_int(&q,0); |
| 339 | 340 | int const isDel = db_column_int(&q,1); |
| 340 | 341 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -318,22 +318,23 @@ | |
| 318 | cson_value * json_get_changed_files(int rid, int flags){ |
| 319 | cson_value * rowsV = NULL; |
| 320 | cson_array * rows = NULL; |
| 321 | Stmt q = empty_Stmt; |
| 322 | db_prepare(&q, |
| 323 | "SELECT (pid==0) AS isnew," |
| 324 | " (fid==0) AS isdel," |
| 325 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 326 | " blob.uuid as uuid," |
| 327 | " (SELECT uuid FROM blob WHERE rid=pid) as parent," |
| 328 | " blob.size as size" |
| 329 | " FROM mlink, blob" |
| 330 | " WHERE mid=%d AND pid!=fid" |
| 331 | " AND blob.rid=fid AND NOT mlink.isaux" |
| 332 | " ORDER BY name /*sort*/", |
| 333 | rid |
| 334 | ); |
| 335 | while( (SQLITE_ROW == db_step(&q)) ){ |
| 336 | cson_value * rowV = cson_value_new_object(); |
| 337 | cson_object * row = cson_value_get_object(rowV); |
| 338 | int const isNew = db_column_int(&q,0); |
| 339 | int const isDel = db_column_int(&q,1); |
| 340 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -318,22 +318,23 @@ | |
| 318 | cson_value * json_get_changed_files(int rid, int flags){ |
| 319 | cson_value * rowsV = NULL; |
| 320 | cson_array * rows = NULL; |
| 321 | Stmt q = empty_Stmt; |
| 322 | db_prepare(&q, |
| 323 | "SELECT (pid<=0) AS isnew," |
| 324 | " (fid==0) AS isdel," |
| 325 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 326 | " (SELECT uuid FROM blob WHERE rid=fid) as uuid," |
| 327 | " (SELECT uuid FROM blob WHERE rid=pid) as parent," |
| 328 | " blob.size as size" |
| 329 | " FROM mlink" |
| 330 | " LEFT JOIN blob ON blob.rid=fid" |
| 331 | " WHERE mid=%d AND pid!=fid" |
| 332 | " AND NOT mlink.isaux" |
| 333 | " ORDER BY name /*sort*/", |
| 334 | rid |
| 335 | ); |
| 336 | while( (SQLITE_ROW == db_step(&q)) ){ |
| 337 | cson_value * rowV = cson_value_new_object(); |
| 338 | cson_object * row = cson_value_get_object(rowV); |
| 339 | int const isNew = db_column_int(&q,0); |
| 340 | int const isDel = db_column_int(&q,1); |
| 341 |