Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Several minor code style fixes involving spacing. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
c7f5541b7d81015a64bd3a1fd78e5e76 |
| User & Date: | mistachkin 2014-06-14 21:49:30.815 |
Context
|
2014-06-14
| ||
| 22:16 | Corrections to the new TH1 'checkout' command and tests. check-in: 589b902edb user: mistachkin tags: trunk | |
| 21:52 | Refactor db_close() so that it can make use of db_close_config(). check-in: e275546215 user: mistachkin tags: dbCloseConfig | |
| 21:49 | Several minor code style fixes involving spacing. check-in: c7f5541b7d user: mistachkin tags: trunk | |
| 21:06 | Add some diagnostic messages to the 'auto.def' file. check-in: 166fa7e732 user: mistachkin tags: trunk | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
963 964 965 966 967 968 969 |
** is found, it is attached to the open database connection too.
*/
int db_open_local(const char *zDbName){
int i, n;
char zPwd[2000];
static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
| | | 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
** is found, it is attached to the open database connection too.
*/
int db_open_local(const char *zDbName){
int i, n;
char zPwd[2000];
static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
if( g.localOpen ) return 1;
file_getcwd(zPwd, sizeof(zPwd)-20);
n = strlen(zPwd);
while( n>0 ){
for(i=0; i<count(aDbName); i++){
sqlite3_snprintf(sizeof(zPwd)-n, &zPwd[n], "/%s", aDbName[i]);
if( isValidLocalDb(zPwd) ){
/* Found a valid checkout database file */
|
| ︙ | ︙ | |||
1942 1943 1944 1945 1946 1947 1948 |
int db_table_has_column( char const *zTableName, char const *zColName ){
Stmt q = empty_Stmt;
int rc = 0;
db_prepare( &q, "PRAGMA table_info(%Q)", zTableName );
while(SQLITE_ROW == db_step(&q)){
/* Columns: (cid, name, type, notnull, dflt_value, pk) */
char const * zCol = db_column_text(&q, 1);
| | | 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 |
int db_table_has_column( char const *zTableName, char const *zColName ){
Stmt q = empty_Stmt;
int rc = 0;
db_prepare( &q, "PRAGMA table_info(%Q)", zTableName );
while(SQLITE_ROW == db_step(&q)){
/* Columns: (cid, name, type, notnull, dflt_value, pk) */
char const * zCol = db_column_text(&q, 1);
if( 0==fossil_strcmp(zColName, zCol) ){
rc = 1;
break;
}
}
db_finalize(&q);
return rc;
}
|
| ︙ | ︙ | |||
2062 2063 2064 2065 2066 2067 2068 |
db_lset("repository", g.argv[2]);
db_record_repository_filename(g.argv[2]);
db_lset_int("checkout", 0);
oldArgv = g.argv;
oldArgc = g.argc;
azNewArgv[0] = g.argv[0];
g.argv = azNewArgv;
| | | 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 |
db_lset("repository", g.argv[2]);
db_record_repository_filename(g.argv[2]);
db_lset_int("checkout", 0);
oldArgv = g.argv;
oldArgc = g.argc;
azNewArgv[0] = g.argv[0];
g.argv = azNewArgv;
if( !emptyFlag ){
g.argc = 3;
if( oldArgc==4 ){
azNewArgv[g.argc-1] = oldArgv[3];
}else if( !db_exists("SELECT 1 FROM event WHERE type='ci'") ){
azNewArgv[g.argc-1] = "--latest";
}else{
azNewArgv[g.argc-1] = db_get("main-branch", "trunk");
|
| ︙ | ︙ |