Differences From Artifact [c0c378ca04]:
- File src/db.c — part of check-in [42a830e76d] at 2011-08-14 07:13:04 on branch ben-testing — Change the relative-paths default to 'on', after feedback from the community. (user: ben size: 62789)
To Artifact [a2dbd12e18]:
- File src/db.c — part of check-in [246ac307bb] at 2011-08-14 07:21:58 on branch ben-testing — Merge trunk into ben-testing, adjusting for versionable settings. (user: ben size: 63270) [more...]
| ︙ | ︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
/*
** Force a rollback and shutdown the database
*/
void db_force_rollback(void){
int i;
static int busy = 0;
if( busy || g.db==0 ) return;
busy = 1;
undo_rollback();
while( pAllStmt ){
db_finalize(pAllStmt);
}
if( nBegin ){
sqlite3_exec(g.db, "ROLLBACK", 0, 0, 0);
nBegin = 0;
}
| > > > > | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
/*
** Force a rollback and shutdown the database
*/
void db_force_rollback(void){
int i;
static int busy = 0;
sqlite3_stmt *pStmt = 0;
if( busy || g.db==0 ) return;
busy = 1;
undo_rollback();
while( (pStmt = sqlite3_next_stmt(g.db,pStmt))!=0 ){
sqlite3_reset(pStmt);
}
while( pAllStmt ){
db_finalize(pAllStmt);
}
if( nBegin ){
sqlite3_exec(g.db, "ROLLBACK", 0, 0, 0);
nBegin = 0;
}
|
| ︙ | ︙ | |||
1364 1365 1366 1367 1368 1369 1370 |
/*
** Return true if the string zVal represents "true" (or "false").
*/
int is_truth(const char *zVal){
static const char *azOn[] = { "on", "yes", "true", "1" };
int i;
for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){
| | | | 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 |
/*
** Return true if the string zVal represents "true" (or "false").
*/
int is_truth(const char *zVal){
static const char *azOn[] = { "on", "yes", "true", "1" };
int i;
for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){
if( fossil_stricmp(zVal,azOn[i])==0 ) return 1;
}
return 0;
}
int is_false(const char *zVal){
static const char *azOff[] = { "off", "no", "false", "0" };
int i;
for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){
if( fossil_stricmp(zVal,azOff[i])==0 ) return 1;
}
return 0;
}
/*
** Swap the g.db and g.dbConfig connections so that the various db_* routines
** work on the ~/.fossil database instead of on the repository database.
|
| ︙ | ︙ | |||
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 |
struct stControlSettings const ctrlSettings[] = {
{ "access-log", 0, 0, 0, "off" },
{ "auto-captcha", "autocaptcha", 0, 0, "on" },
{ "auto-shun", 0, 0, 0, "on" },
{ "autosync", 0, 0, 0, "on" },
{ "binary-glob", 0, 32, 1, "" },
{ "clearsign", 0, 0, 0, "off" },
{ "crnl-glob", 0, 16, 1, "" },
{ "default-perms", 0, 16, 0, "u" },
{ "diff-command", 0, 16, 0, "" },
{ "dont-push", 0, 0, 0, "off" },
{ "editor", 0, 16, 0, "" },
{ "gdiff-command", 0, 16, 0, "gdiff" },
{ "gmerge-command",0, 40, 0, "" },
| > | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 |
struct stControlSettings const ctrlSettings[] = {
{ "access-log", 0, 0, 0, "off" },
{ "auto-captcha", "autocaptcha", 0, 0, "on" },
{ "auto-shun", 0, 0, 0, "on" },
{ "autosync", 0, 0, 0, "on" },
{ "binary-glob", 0, 32, 1, "" },
{ "clearsign", 0, 0, 0, "off" },
{ "case-sensitive",0, 0, 0, "on" },
{ "crnl-glob", 0, 16, 1, "" },
{ "default-perms", 0, 16, 0, "u" },
{ "diff-command", 0, 16, 0, "" },
{ "dont-push", 0, 0, 0, "off" },
{ "editor", 0, 16, 0, "" },
{ "gdiff-command", 0, 16, 0, "gdiff" },
{ "gmerge-command",0, 40, 0, "" },
|
| ︙ | ︙ | |||
1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 | ** tag or branch creation. If the value is "pullonly" ** then only pull operations occur automatically. ** Default: on ** ** binary-glob The VALUE is a comma or newline-separated list of ** (versionable) GLOB patterns that should be treated as binary files ** for merging purposes. Example: *.xml ** ** clearsign When enabled, fossil will attempt to sign all commits ** with gpg. When disabled (the default), commits will ** be unsigned. Default: off ** ** crnl-glob A comma or newline-separated list of GLOB patterns for ** (versionable) text files in which it is ok to have CR+NL line endings. | > > > > > | 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 | ** tag or branch creation. If the value is "pullonly" ** then only pull operations occur automatically. ** Default: on ** ** binary-glob The VALUE is a comma or newline-separated list of ** (versionable) GLOB patterns that should be treated as binary files ** for merging purposes. Example: *.xml ** ** case-sensitive If TRUE, the files whose names differ only in case ** care considered distinct. If FALSE files whose names ** differ only in case are the same file. Defaults to ** TRUE for unix and FALSE for windows and mac. ** ** clearsign When enabled, fossil will attempt to sign all commits ** with gpg. When disabled (the default), commits will ** be unsigned. Default: off ** ** crnl-glob A comma or newline-separated list of GLOB patterns for ** (versionable) text files in which it is ok to have CR+NL line endings. |
| ︙ | ︙ |