565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
|
-
-
+
-
-
-
-
-
|
if( db_exists("SELECT 1 FROM ok WHERE rid=%d",vid) ){
fossil_fatal("cannot purge the current checkout");
}
nCkin = db_int(0, "SELECT count(*) FROM ok");
find_checkin_associates("ok", 1);
nArtifact = db_int(0, "SELECT count(*) FROM ok");
if( explainOnly ){
i = 0;
db_prepare(&q, "SELECT rid FROM ok");
describe_artifacts_to_stdout("IN ok");
while( db_step(&q)==SQLITE_ROW ){
if( i++ > 0 ) fossil_print("%.78c\n",'-');
whatis_rid(db_column_int(&q,0), 0);
}
db_finalize(&q);
}else{
int peid = purge_artifact_list("ok","",1);
fossil_print("%d checkins and %d artifacts purged.\n", nCkin, nArtifact);
fossil_print("undoable using \"%s purge undo %d\".\n",
g.nameOfExe, peid);
}
db_end_transaction(explainOnly||dryRun);
|