Differences From:
File
src/db.c
part of check-in
[c7278fd013]
- Win32 port now functional except network operations. This commit was done on windows :-). See win32.txt for status of all commands. No networking commands are functional yet. All path operations are now functioning.
by
jnc on
2007-09-22 06:47:11.
Also file
src/db.c
part of check-in
[3c5482959c]
- Merge in the w32 changes.
by
drh on
2007-09-22 19:43:55.
[view]
To:
File
src/db.c
part of check-in
[ff4cc5fae2]
- Fixes to the timeline webpage and the "open" and "update" commands.
by
drh on
2007-09-23 18:49:50.
[view]
@@ -873,8 +873,10 @@
** See also the "close" command.
*/
void cmd_open(void){
Blob path;
+ int vid;
+ static char *azNewArgv[] = { 0, "update", "--latest", 0 };
if( g.argc!=3 ){
usage("REPOSITORY-FILENAME");
}
if( db_open_local() ){
@@ -884,9 +886,14 @@
db_open_repository(blob_str(&path));
db_init_database("./_FOSSIL_", zLocalSchema, (char*)0);
db_open_local();
db_lset("repository", blob_str(&path));
- db_lset_int("checkout", 1);
+ vid = db_int(0, "SELECT pid FROM plink y"
+ " WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
+ db_lset_int("checkout", vid);
+ g.argv = azNewArgv;
+ g.argc = 3;
+ update_cmd();
}
/*
** COMMAND: config