Fossil SCM

Fix the manifest generator for check-ins so that when a partial commit is done and some of the uncommitted files have been renamed, the rows of the check-in manifest are ordered by the original, unchanged names of the uncommitted renamed files.

drh 2012-06-29 12:48 trunk
Commit 01e4de6b8ae936b551bd215cce1e5a0826fe4a56
3 files changed +9 -8 +34 -14 +8 -7
+9 -8
--- src/checkin.c
+++ src/checkin.c
@@ -42,11 +42,11 @@
4242
int nErr = 0;
4343
Blob rewrittenPathname;
4444
db_prepare(&q,
4545
"SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
4646
" FROM vfile "
47
- " WHERE file_is_selected(id)"
47
+ " WHERE is_selected(id)"
4848
" AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1"
4949
);
5050
blob_zero(&rewrittenPathname);
5151
while( db_step(&q)==SQLITE_ROW ){
5252
const char *zPathname = db_column_text(&q,0);
@@ -682,15 +682,16 @@
682682
zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now");
683683
blob_appendf(pOut, "D %s\n", zDate);
684684
zDate[10] = ' ';
685685
db_prepare(&q,
686686
"SELECT pathname, uuid, origname, blob.rid, isexe, islink,"
687
- " file_is_selected(vfile.id)"
687
+ " is_selected(vfile.id)"
688688
" FROM vfile JOIN blob ON vfile.mrid=blob.rid"
689
- " WHERE (NOT deleted OR NOT file_is_selected(vfile.id))"
689
+ " WHERE (NOT deleted OR NOT is_selected(vfile.id))"
690690
" AND vfile.vid=%d"
691
- " ORDER BY 1", vid);
691
+ " ORDER BY if_selected(vfile.id, pathname, origname)",
692
+ vid);
692693
blob_zero(&filename);
693694
blob_appendf(&filename, "%s", g.zLocalRoot);
694695
nBasename = blob_size(&filename);
695696
while( db_step(&q)==SQLITE_ROW ){
696697
const char *zName = db_column_text(&q, 0);
@@ -1090,11 +1091,11 @@
10901091
Blob unmodified;
10911092
memset(&unmodified, 0, sizeof(Blob));
10921093
blob_init(&unmodified, 0, 0);
10931094
db_blob(&unmodified,
10941095
"SELECT pathname FROM vfile"
1095
- " WHERE chnged = 0 AND origname IS NULL AND file_is_selected(id)"
1096
+ " WHERE chnged = 0 AND origname IS NULL AND is_selected(id)"
10961097
);
10971098
if( strlen(blob_str(&unmodified)) ){
10981099
fossil_fatal("file %s has not changed", blob_str(&unmodified));
10991100
}
11001101
}
@@ -1151,11 +1152,11 @@
11511152
** table. If there were arguments passed to this command, only
11521153
** the identified fils are inserted (if they have been modified).
11531154
*/
11541155
db_prepare(&q,
11551156
"SELECT id, %Q || pathname, mrid, %s FROM vfile "
1156
- "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
1157
+ "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
11571158
g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
11581159
);
11591160
while( db_step(&q)==SQLITE_ROW ){
11601161
int id, rid;
11611162
const char *zFullname;
@@ -1289,15 +1290,15 @@
12891290
}
12901291
12911292
12921293
/* Update the vfile and vmerge tables */
12931294
db_multi_exec(
1294
- "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
1295
+ "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND is_selected(id);"
12951296
"DELETE FROM vmerge;"
12961297
"UPDATE vfile SET vid=%d;"
12971298
"UPDATE vfile SET rid=mrid, chnged=0, deleted=0, origname=NULL"
1298
- " WHERE file_is_selected(id);"
1299
+ " WHERE is_selected(id);"
12991300
, vid, nvid
13001301
);
13011302
db_lset_int("checkout", nvid);
13021303
13031304
if( useCksum ){
13041305
--- src/checkin.c
+++ src/checkin.c
@@ -42,11 +42,11 @@
42 int nErr = 0;
43 Blob rewrittenPathname;
44 db_prepare(&q,
45 "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
46 " FROM vfile "
47 " WHERE file_is_selected(id)"
48 " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1"
49 );
50 blob_zero(&rewrittenPathname);
51 while( db_step(&q)==SQLITE_ROW ){
52 const char *zPathname = db_column_text(&q,0);
@@ -682,15 +682,16 @@
682 zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now");
683 blob_appendf(pOut, "D %s\n", zDate);
684 zDate[10] = ' ';
685 db_prepare(&q,
686 "SELECT pathname, uuid, origname, blob.rid, isexe, islink,"
687 " file_is_selected(vfile.id)"
688 " FROM vfile JOIN blob ON vfile.mrid=blob.rid"
689 " WHERE (NOT deleted OR NOT file_is_selected(vfile.id))"
690 " AND vfile.vid=%d"
691 " ORDER BY 1", vid);
 
692 blob_zero(&filename);
693 blob_appendf(&filename, "%s", g.zLocalRoot);
694 nBasename = blob_size(&filename);
695 while( db_step(&q)==SQLITE_ROW ){
696 const char *zName = db_column_text(&q, 0);
@@ -1090,11 +1091,11 @@
1090 Blob unmodified;
1091 memset(&unmodified, 0, sizeof(Blob));
1092 blob_init(&unmodified, 0, 0);
1093 db_blob(&unmodified,
1094 "SELECT pathname FROM vfile"
1095 " WHERE chnged = 0 AND origname IS NULL AND file_is_selected(id)"
1096 );
1097 if( strlen(blob_str(&unmodified)) ){
1098 fossil_fatal("file %s has not changed", blob_str(&unmodified));
1099 }
1100 }
@@ -1151,11 +1152,11 @@
1151 ** table. If there were arguments passed to this command, only
1152 ** the identified fils are inserted (if they have been modified).
1153 */
1154 db_prepare(&q,
1155 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
1156 "WHERE chnged==1 AND NOT deleted AND file_is_selected(id)",
1157 g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
1158 );
1159 while( db_step(&q)==SQLITE_ROW ){
1160 int id, rid;
1161 const char *zFullname;
@@ -1289,15 +1290,15 @@
1289 }
1290
1291
1292 /* Update the vfile and vmerge tables */
1293 db_multi_exec(
1294 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"
1295 "DELETE FROM vmerge;"
1296 "UPDATE vfile SET vid=%d;"
1297 "UPDATE vfile SET rid=mrid, chnged=0, deleted=0, origname=NULL"
1298 " WHERE file_is_selected(id);"
1299 , vid, nvid
1300 );
1301 db_lset_int("checkout", nvid);
1302
1303 if( useCksum ){
1304
--- src/checkin.c
+++ src/checkin.c
@@ -42,11 +42,11 @@
42 int nErr = 0;
43 Blob rewrittenPathname;
44 db_prepare(&q,
45 "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
46 " FROM vfile "
47 " WHERE is_selected(id)"
48 " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1"
49 );
50 blob_zero(&rewrittenPathname);
51 while( db_step(&q)==SQLITE_ROW ){
52 const char *zPathname = db_column_text(&q,0);
@@ -682,15 +682,16 @@
682 zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now");
683 blob_appendf(pOut, "D %s\n", zDate);
684 zDate[10] = ' ';
685 db_prepare(&q,
686 "SELECT pathname, uuid, origname, blob.rid, isexe, islink,"
687 " is_selected(vfile.id)"
688 " FROM vfile JOIN blob ON vfile.mrid=blob.rid"
689 " WHERE (NOT deleted OR NOT is_selected(vfile.id))"
690 " AND vfile.vid=%d"
691 " ORDER BY if_selected(vfile.id, pathname, origname)",
692 vid);
693 blob_zero(&filename);
694 blob_appendf(&filename, "%s", g.zLocalRoot);
695 nBasename = blob_size(&filename);
696 while( db_step(&q)==SQLITE_ROW ){
697 const char *zName = db_column_text(&q, 0);
@@ -1090,11 +1091,11 @@
1091 Blob unmodified;
1092 memset(&unmodified, 0, sizeof(Blob));
1093 blob_init(&unmodified, 0, 0);
1094 db_blob(&unmodified,
1095 "SELECT pathname FROM vfile"
1096 " WHERE chnged = 0 AND origname IS NULL AND is_selected(id)"
1097 );
1098 if( strlen(blob_str(&unmodified)) ){
1099 fossil_fatal("file %s has not changed", blob_str(&unmodified));
1100 }
1101 }
@@ -1151,11 +1152,11 @@
1152 ** table. If there were arguments passed to this command, only
1153 ** the identified fils are inserted (if they have been modified).
1154 */
1155 db_prepare(&q,
1156 "SELECT id, %Q || pathname, mrid, %s FROM vfile "
1157 "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
1158 g.zLocalRoot, glob_expr("pathname", db_get("crnl-glob",""))
1159 );
1160 while( db_step(&q)==SQLITE_ROW ){
1161 int id, rid;
1162 const char *zFullname;
@@ -1289,15 +1290,15 @@
1290 }
1291
1292
1293 /* Update the vfile and vmerge tables */
1294 db_multi_exec(
1295 "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND is_selected(id);"
1296 "DELETE FROM vmerge;"
1297 "UPDATE vfile SET vid=%d;"
1298 "UPDATE vfile SET rid=mrid, chnged=0, deleted=0, origname=NULL"
1299 " WHERE is_selected(id);"
1300 , vid, nvid
1301 );
1302 db_lset_int("checkout", nvid);
1303
1304 if( useCksum ){
1305
+34 -14
--- src/db.c
+++ src/db.c
@@ -1362,37 +1362,54 @@
13621362
if( zP ) sqlite3_result_text(context, zP, -1, SQLITE_TRANSIENT);
13631363
}
13641364
}
13651365
13661366
/*
1367
-** This is used by the [commit] command.
1368
-**
1369
-** Return true if either:
1370
-**
1371
-** a) Global.aCommitFile is NULL, or
1372
-** b) Global.aCommitFile contains the integer passed as an argument.
1373
-**
1374
-** Otherwise return false.
1367
+** SQL function:
1368
+**
1369
+** is_selected(id)
1370
+** if_selected(id, X, Y)
1371
+**
1372
+** On the commit command, when filenames are specified (in order to do
1373
+** a partial commit) the vfile.id values for the named files are loaded
1374
+** into the g.aCommitFile[] array. This function looks at that array
1375
+** to see if a file is named on the command-line.
1376
+**
1377
+** In the first form (1 argument) return TRUE if either no files are
1378
+** named on the command line (g.aCommitFile is NULL meaning that all
1379
+** changes are to be committed) or if id is found in g.aCommitFile[]
1380
+** (meaning that id was named on the command-line).
1381
+**
1382
+** In the second form (3 arguments) return argument X if true and Y
1383
+** if false.
13751384
*/
13761385
static void file_is_selected(
13771386
sqlite3_context *context,
13781387
int argc,
13791388
sqlite3_value **argv
13801389
){
1381
- assert(argc==1);
1390
+ int rc = 0;
1391
+
1392
+ assert(argc==1 || argc==3);
13821393
if( g.aCommitFile ){
13831394
int iId = sqlite3_value_int(argv[0]);
13841395
int ii;
13851396
for(ii=0; g.aCommitFile[ii]; ii++){
13861397
if( iId==g.aCommitFile[ii] ){
1387
- sqlite3_result_int(context, 1);
1388
- return;
1398
+ rc = 1;
1399
+ break;
13891400
}
13901401
}
1391
- sqlite3_result_int(context, 0);
1402
+ }else{
1403
+ rc = 1;
1404
+ }
1405
+ if( argc==1 ){
1406
+ sqlite3_result_int(context, rc);
13921407
}else{
1393
- sqlite3_result_int(context, 1);
1408
+ assert( argc==3 );
1409
+ assert( rc==0 || rc==1 );
1410
+ sqlite3_result_value(context, argv[2-rc]);
13941411
}
13951412
}
13961413
13971414
/*
13981415
** Convert the input string into an SHA1. Make a notation in the
@@ -1461,11 +1478,14 @@
14611478
sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
14621479
sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
14631480
sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
14641481
sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
14651482
sqlite3_create_function(
1466
- g.db, "file_is_selected", 1, SQLITE_UTF8, 0, file_is_selected,0,0
1483
+ g.db, "is_selected", 1, SQLITE_UTF8, 0, file_is_selected,0,0
1484
+ );
1485
+ sqlite3_create_function(
1486
+ g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
14671487
);
14681488
if( g.fSqlTrace ){
14691489
sqlite3_trace(g.db, db_sql_trace, 0);
14701490
}
14711491
}
14721492
--- src/db.c
+++ src/db.c
@@ -1362,37 +1362,54 @@
1362 if( zP ) sqlite3_result_text(context, zP, -1, SQLITE_TRANSIENT);
1363 }
1364 }
1365
1366 /*
1367 ** This is used by the [commit] command.
1368 **
1369 ** Return true if either:
1370 **
1371 ** a) Global.aCommitFile is NULL, or
1372 ** b) Global.aCommitFile contains the integer passed as an argument.
1373 **
1374 ** Otherwise return false.
 
 
 
 
 
 
 
 
 
1375 */
1376 static void file_is_selected(
1377 sqlite3_context *context,
1378 int argc,
1379 sqlite3_value **argv
1380 ){
1381 assert(argc==1);
 
 
1382 if( g.aCommitFile ){
1383 int iId = sqlite3_value_int(argv[0]);
1384 int ii;
1385 for(ii=0; g.aCommitFile[ii]; ii++){
1386 if( iId==g.aCommitFile[ii] ){
1387 sqlite3_result_int(context, 1);
1388 return;
1389 }
1390 }
1391 sqlite3_result_int(context, 0);
 
 
 
 
1392 }else{
1393 sqlite3_result_int(context, 1);
 
 
1394 }
1395 }
1396
1397 /*
1398 ** Convert the input string into an SHA1. Make a notation in the
@@ -1461,11 +1478,14 @@
1461 sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
1462 sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1463 sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1464 sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
1465 sqlite3_create_function(
1466 g.db, "file_is_selected", 1, SQLITE_UTF8, 0, file_is_selected,0,0
 
 
 
1467 );
1468 if( g.fSqlTrace ){
1469 sqlite3_trace(g.db, db_sql_trace, 0);
1470 }
1471 }
1472
--- src/db.c
+++ src/db.c
@@ -1362,37 +1362,54 @@
1362 if( zP ) sqlite3_result_text(context, zP, -1, SQLITE_TRANSIENT);
1363 }
1364 }
1365
1366 /*
1367 ** SQL function:
1368 **
1369 ** is_selected(id)
1370 ** if_selected(id, X, Y)
1371 **
1372 ** On the commit command, when filenames are specified (in order to do
1373 ** a partial commit) the vfile.id values for the named files are loaded
1374 ** into the g.aCommitFile[] array. This function looks at that array
1375 ** to see if a file is named on the command-line.
1376 **
1377 ** In the first form (1 argument) return TRUE if either no files are
1378 ** named on the command line (g.aCommitFile is NULL meaning that all
1379 ** changes are to be committed) or if id is found in g.aCommitFile[]
1380 ** (meaning that id was named on the command-line).
1381 **
1382 ** In the second form (3 arguments) return argument X if true and Y
1383 ** if false.
1384 */
1385 static void file_is_selected(
1386 sqlite3_context *context,
1387 int argc,
1388 sqlite3_value **argv
1389 ){
1390 int rc = 0;
1391
1392 assert(argc==1 || argc==3);
1393 if( g.aCommitFile ){
1394 int iId = sqlite3_value_int(argv[0]);
1395 int ii;
1396 for(ii=0; g.aCommitFile[ii]; ii++){
1397 if( iId==g.aCommitFile[ii] ){
1398 rc = 1;
1399 break;
1400 }
1401 }
1402 }else{
1403 rc = 1;
1404 }
1405 if( argc==1 ){
1406 sqlite3_result_int(context, rc);
1407 }else{
1408 assert( argc==3 );
1409 assert( rc==0 || rc==1 );
1410 sqlite3_result_value(context, argv[2-rc]);
1411 }
1412 }
1413
1414 /*
1415 ** Convert the input string into an SHA1. Make a notation in the
@@ -1461,11 +1478,14 @@
1478 sqlite3_create_function(g.db, "user", 0, SQLITE_ANY, 0, db_sql_user, 0, 0);
1479 sqlite3_create_function(g.db, "cgi", 1, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1480 sqlite3_create_function(g.db, "cgi", 2, SQLITE_ANY, 0, db_sql_cgi, 0, 0);
1481 sqlite3_create_function(g.db, "print", -1, SQLITE_UTF8, 0,db_sql_print,0,0);
1482 sqlite3_create_function(
1483 g.db, "is_selected", 1, SQLITE_UTF8, 0, file_is_selected,0,0
1484 );
1485 sqlite3_create_function(
1486 g.db, "if_selected", 3, SQLITE_UTF8, 0, file_is_selected,0,0
1487 );
1488 if( g.fSqlTrace ){
1489 sqlite3_trace(g.db, db_sql_trace, 0);
1490 }
1491 }
1492
+8 -7
--- src/vfile.c
+++ src/vfile.c
@@ -473,14 +473,14 @@
473473
Stmt q;
474474
char zBuf[4096];
475475
476476
db_must_be_within_tree();
477477
db_prepare(&q,
478
- "SELECT %Q || pathname, pathname, origname, file_is_selected(id), rid"
478
+ "SELECT %Q || pathname, pathname, origname, is_selected(id), rid"
479479
" FROM vfile"
480
- " WHERE (NOT deleted OR NOT file_is_selected(id)) AND vid=%d"
481
- " ORDER BY pathname /*scan*/",
480
+ " WHERE (NOT deleted OR NOT is_selected(id)) AND vid=%d"
481
+ " ORDER BY if_selected(id, pathname, origname) /*scan*/",
482482
g.zLocalRoot, vid
483483
);
484484
md5sum_init();
485485
while( db_step(&q)==SQLITE_ROW ){
486486
const char *zFullpath = db_column_text(&q, 0);
@@ -565,11 +565,12 @@
565565
char *zOut;
566566
567567
db_must_be_within_tree();
568568
db_prepare(&q,
569569
"SELECT %Q || pathname, pathname, rid FROM vfile"
570
- " WHERE NOT deleted AND vid=%d AND file_is_selected(id)",
570
+ " WHERE NOT deleted AND vid=%d AND is_selected(id)"
571
+ " ORDER BY if_selected(id, pathname, origname) /*scan*/",
571572
g.zLocalRoot, vid
572573
);
573574
md5sum_init();
574575
while( db_step(&q)==SQLITE_ROW ){
575576
const char *zFullpath = db_column_text(&q, 0);
@@ -627,15 +628,15 @@
627628
Stmt q;
628629
char zBuf[100];
629630
630631
db_must_be_within_tree();
631632
632
- db_prepare(&q, "SELECT pathname, origname, rid, file_is_selected(id)"
633
+ db_prepare(&q, "SELECT pathname, origname, rid, is_selected(id)"
633634
" FROM vfile"
634
- " WHERE (NOT deleted OR NOT file_is_selected(id))"
635
+ " WHERE (NOT deleted OR NOT is_selected(id))"
635636
" AND rid>0 AND vid=%d"
636
- " ORDER BY pathname /*scan*/",
637
+ " ORDER BY if_selected(id,pathname,origname) /*scan*/",
637638
vid);
638639
blob_zero(&file);
639640
md5sum_init();
640641
while( db_step(&q)==SQLITE_ROW ){
641642
const char *zName = db_column_text(&q, 0);
642643
--- src/vfile.c
+++ src/vfile.c
@@ -473,14 +473,14 @@
473 Stmt q;
474 char zBuf[4096];
475
476 db_must_be_within_tree();
477 db_prepare(&q,
478 "SELECT %Q || pathname, pathname, origname, file_is_selected(id), rid"
479 " FROM vfile"
480 " WHERE (NOT deleted OR NOT file_is_selected(id)) AND vid=%d"
481 " ORDER BY pathname /*scan*/",
482 g.zLocalRoot, vid
483 );
484 md5sum_init();
485 while( db_step(&q)==SQLITE_ROW ){
486 const char *zFullpath = db_column_text(&q, 0);
@@ -565,11 +565,12 @@
565 char *zOut;
566
567 db_must_be_within_tree();
568 db_prepare(&q,
569 "SELECT %Q || pathname, pathname, rid FROM vfile"
570 " WHERE NOT deleted AND vid=%d AND file_is_selected(id)",
 
571 g.zLocalRoot, vid
572 );
573 md5sum_init();
574 while( db_step(&q)==SQLITE_ROW ){
575 const char *zFullpath = db_column_text(&q, 0);
@@ -627,15 +628,15 @@
627 Stmt q;
628 char zBuf[100];
629
630 db_must_be_within_tree();
631
632 db_prepare(&q, "SELECT pathname, origname, rid, file_is_selected(id)"
633 " FROM vfile"
634 " WHERE (NOT deleted OR NOT file_is_selected(id))"
635 " AND rid>0 AND vid=%d"
636 " ORDER BY pathname /*scan*/",
637 vid);
638 blob_zero(&file);
639 md5sum_init();
640 while( db_step(&q)==SQLITE_ROW ){
641 const char *zName = db_column_text(&q, 0);
642
--- src/vfile.c
+++ src/vfile.c
@@ -473,14 +473,14 @@
473 Stmt q;
474 char zBuf[4096];
475
476 db_must_be_within_tree();
477 db_prepare(&q,
478 "SELECT %Q || pathname, pathname, origname, is_selected(id), rid"
479 " FROM vfile"
480 " WHERE (NOT deleted OR NOT is_selected(id)) AND vid=%d"
481 " ORDER BY if_selected(id, pathname, origname) /*scan*/",
482 g.zLocalRoot, vid
483 );
484 md5sum_init();
485 while( db_step(&q)==SQLITE_ROW ){
486 const char *zFullpath = db_column_text(&q, 0);
@@ -565,11 +565,12 @@
565 char *zOut;
566
567 db_must_be_within_tree();
568 db_prepare(&q,
569 "SELECT %Q || pathname, pathname, rid FROM vfile"
570 " WHERE NOT deleted AND vid=%d AND is_selected(id)"
571 " ORDER BY if_selected(id, pathname, origname) /*scan*/",
572 g.zLocalRoot, vid
573 );
574 md5sum_init();
575 while( db_step(&q)==SQLITE_ROW ){
576 const char *zFullpath = db_column_text(&q, 0);
@@ -627,15 +628,15 @@
628 Stmt q;
629 char zBuf[100];
630
631 db_must_be_within_tree();
632
633 db_prepare(&q, "SELECT pathname, origname, rid, is_selected(id)"
634 " FROM vfile"
635 " WHERE (NOT deleted OR NOT is_selected(id))"
636 " AND rid>0 AND vid=%d"
637 " ORDER BY if_selected(id,pathname,origname) /*scan*/",
638 vid);
639 blob_zero(&file);
640 md5sum_init();
641 while( db_step(&q)==SQLITE_ROW ){
642 const char *zName = db_column_text(&q, 0);
643

Keyboard Shortcuts

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