diff --git a/ext/session/changeset.c b/ext/session/changeset.c index 9cf62949a1..7d1ae28297 100644 --- a/ext/session/changeset.c +++ b/ext/session/changeset.c @@ -28,11 +28,16 @@ static void usage(const char *argv0){ fprintf(stderr, "Usage: %s FILENAME COMMAND ...\n", argv0); fprintf(stderr, "COMMANDs:\n" - " apply DB Apply the changeset to database file DB\n" - " concat FILE2 OUT Concatenate FILENAME and FILE2 into OUT\n" - " dump Show the complete content of the changeset\n" - " invert OUT Write an inverted changeset into file OUT\n" - " sql Give a pseudo-SQL rendering of the changeset\n" + " apply DB [OPTIONS] Apply the changeset to database file DB. OPTIONS:\n" + " -n|--dryrun Test run. Don't apply changes\n" + " --nosavepoint\n" + " --invert\n" + " --ignorenoop\n" + " --fknoaction\n" + " concat FILE2 OUT Concatenate FILENAME and FILE2 into OUT\n" + " dump Show the complete content of the changeset\n" + " invert OUT Write an inverted changeset into file OUT\n" + " sql Give a pseudo-SQL rendering of the changeset\n" ); exit(1); } @@ -188,21 +193,62 @@ int main(int argc, char **argv){ */ if( strcmp(argv[2],"apply")==0 ){ sqlite3 *db; - if( argc!=4 ) usage(argv[0]); - rc = sqlite3_open(argv[3], &db); + int bDryRun = 0; + const char *zDb = 0; + int i; + int applyFlags = 0; + for(i=3; i