| ︙ | | | ︙ | |
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
|
}
if( z==0 && g.configOpen ){
db_swap_connections();
z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
db_swap_connections();
}
if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){
/* This is a versionable setting, try and get the info from a checked out file */
z = db_get_do_versionable(zName, z);
}
if( z==0 ){
z = zDefault;
}
return z;
}
|
|
>
|
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
|
}
if( z==0 && g.configOpen ){
db_swap_connections();
z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
db_swap_connections();
}
if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){
/* This is a versionable setting, try and get the info from a
** checked out file */
z = db_get_do_versionable(zName, z);
}
if( z==0 ){
z = zDefault;
}
return z;
}
|
| ︙ | | | ︙ | |
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
|
file_canonical_name(g.argv[2], &path, 0);
db_open_repository(blob_str(&path));
#if defined(_WIN32)
# define LOCALDB_NAME "./_FOSSIL_"
#else
# define LOCALDB_NAME "./.fslckout"
#endif
db_init_database(LOCALDB_NAME, zLocalSchema, (char*)0);
db_delete_on_failure(LOCALDB_NAME);
db_open_local();
db_lset("repository", g.argv[2]);
db_record_repository_filename(blob_str(&path));
vid = db_int(0, "SELECT pid FROM plink y"
" WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
if( vid==0 ){
|
|
>
>
>
>
|
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
|
file_canonical_name(g.argv[2], &path, 0);
db_open_repository(blob_str(&path));
#if defined(_WIN32)
# define LOCALDB_NAME "./_FOSSIL_"
#else
# define LOCALDB_NAME "./.fslckout"
#endif
db_init_database(LOCALDB_NAME, zLocalSchema,
#ifdef FOSSIL_LOCAL_WAL
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
#endif
(char*)0);
db_delete_on_failure(LOCALDB_NAME);
db_open_local();
db_lset("repository", g.argv[2]);
db_record_repository_filename(blob_str(&path));
vid = db_int(0, "SELECT pid FROM plink y"
" WHERE NOT EXISTS(SELECT 1 FROM plink x WHERE x.cid=y.pid)");
if( vid==0 ){
|
| ︙ | | | ︙ | |
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
|
info_cmd();
}
}
/*
** Print the value of a setting named zName
*/
static void print_setting(const struct stControlSettings *ctrlSetting, int localOpen){
Stmt q;
if( g.repositoryOpen ){
db_prepare(&q,
"SELECT '(local)', value FROM config WHERE name=%Q"
" UNION ALL "
"SELECT '(global)', value FROM global_config WHERE name=%Q",
ctrlSetting->name, ctrlSetting->name
|
|
>
>
>
|
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
|
info_cmd();
}
}
/*
** Print the value of a setting named zName
*/
static void print_setting(
const struct stControlSettings *ctrlSetting,
int localOpen
){
Stmt q;
if( g.repositoryOpen ){
db_prepare(&q,
"SELECT '(local)', value FROM config WHERE name=%Q"
" UNION ALL "
"SELECT '(global)', value FROM global_config WHERE name=%Q",
ctrlSetting->name, ctrlSetting->name
|
| ︙ | | | ︙ | |
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
|
}else{
fossil_print("%-20s\n", ctrlSetting->name);
}
if( ctrlSetting->versionable && localOpen ){
/* Check to see if this is overridden by a versionable settings file */
Blob versionedPathname;
blob_zero(&versionedPathname);
blob_appendf(&versionedPathname, "%s/.fossil-settings/%s", g.zLocalRoot, ctrlSetting->name);
if( file_size(blob_str(&versionedPathname))>=0 ){
fossil_print(" (overridden by contents of file .fossil-settings/%s)\n", ctrlSetting->name);
}
}
db_finalize(&q);
}
/*
|
|
>
|
>
|
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
|
}else{
fossil_print("%-20s\n", ctrlSetting->name);
}
if( ctrlSetting->versionable && localOpen ){
/* Check to see if this is overridden by a versionable settings file */
Blob versionedPathname;
blob_zero(&versionedPathname);
blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
g.zLocalRoot, ctrlSetting->name);
if( file_size(blob_str(&versionedPathname))>=0 ){
fossil_print(" (overridden by contents of file .fossil-settings/%s)\n",
ctrlSetting->name);
}
}
db_finalize(&q);
}
/*
|
| ︙ | | | ︙ | |