Fossil SCM

Use the XDG_CONFIG_HOME environment variable (if it exists) to locate the configuration database on unix.

drh 2020-04-18 18:56 trunk merge
Commit 22f879dde64ce7bc1f0603ecd927ecf75b0ed2855818558f16a261c9ca67a569
+17 -8
--- src/db.c
+++ src/db.c
@@ -1407,17 +1407,19 @@
14071407
** case, invoke this routine with useAttach as 1.
14081408
*/
14091409
int db_open_config(int useAttach, int isOptional){
14101410
char *zDbName;
14111411
char *zHome;
1412
+ const char *zRoot;
14121413
if( g.zConfigDbName ){
14131414
int alreadyAttached = db_database_slot("configdb")>0;
14141415
if( useAttach==alreadyAttached ) return 1; /* Already open. */
14151416
db_close_config();
14161417
}
14171418
zHome = fossil_getenv("FOSSIL_HOME");
14181419
#if defined(_WIN32) || defined(__CYGWIN__)
1420
+ zRoot = "_fossil";
14191421
if( zHome==0 ){
14201422
zHome = fossil_getenv("LOCALAPPDATA");
14211423
if( zHome==0 ){
14221424
zHome = fossil_getenv("APPDATA");
14231425
if( zHome==0 ){
@@ -1435,28 +1437,35 @@
14351437
fossil_panic("cannot locate home directory - please set the "
14361438
"FOSSIL_HOME, LOCALAPPDATA, APPDATA, USERPROFILE, "
14371439
"or HOMEDRIVE / HOMEPATH environment variables");
14381440
}
14391441
#else
1440
- if( zHome==0 ){
1441
- zHome = fossil_getenv("HOME");
1442
- }
1442
+ zRoot = ".fossil";
14431443
if( zHome==0 ){
1444
- if( isOptional ) return 0;
1445
- fossil_panic("cannot locate home directory - please set the "
1446
- "FOSSIL_HOME or HOME environment variables");
1444
+ zHome = fossil_getenv("XDG_CONFIG_HOME");
1445
+ if( zHome ){
1446
+ zRoot = "fossil.db";
1447
+ }else{
1448
+ zHome = fossil_getenv("HOME");
1449
+ if( zHome==0 ){
1450
+ if( isOptional ) return 0;
1451
+ fossil_panic("cannot locate home directory - please set one of the "
1452
+ "FOSSIL_HOME, XDG_CONFIG_HOME, or HOME environment "
1453
+ "variables");
1454
+ }
1455
+ }
14471456
}
14481457
#endif
14491458
if( file_isdir(zHome, ExtFILE)!=1 ){
14501459
if( isOptional ) return 0;
14511460
fossil_panic("invalid home directory: %s", zHome);
14521461
}
14531462
#if defined(_WIN32) || defined(__CYGWIN__)
14541463
/* . filenames give some window systems problems and many apps problems */
1455
- zDbName = mprintf("%//_fossil", zHome);
1464
+ zDbName = mprintf("%//%s", zHome, zRoot);
14561465
#else
1457
- zDbName = mprintf("%s/.fossil", zHome);
1466
+ zDbName = mprintf("%s/%s", zHome, zRoot);
14581467
#endif
14591468
if( file_size(zDbName, ExtFILE)<1024*3 ){
14601469
if( file_access(zHome, W_OK) ){
14611470
if( isOptional ) return 0;
14621471
fossil_panic("home directory %s must be writeable", zHome);
14631472
--- src/db.c
+++ src/db.c
@@ -1407,17 +1407,19 @@
1407 ** case, invoke this routine with useAttach as 1.
1408 */
1409 int db_open_config(int useAttach, int isOptional){
1410 char *zDbName;
1411 char *zHome;
 
1412 if( g.zConfigDbName ){
1413 int alreadyAttached = db_database_slot("configdb")>0;
1414 if( useAttach==alreadyAttached ) return 1; /* Already open. */
1415 db_close_config();
1416 }
1417 zHome = fossil_getenv("FOSSIL_HOME");
1418 #if defined(_WIN32) || defined(__CYGWIN__)
 
1419 if( zHome==0 ){
1420 zHome = fossil_getenv("LOCALAPPDATA");
1421 if( zHome==0 ){
1422 zHome = fossil_getenv("APPDATA");
1423 if( zHome==0 ){
@@ -1435,28 +1437,35 @@
1435 fossil_panic("cannot locate home directory - please set the "
1436 "FOSSIL_HOME, LOCALAPPDATA, APPDATA, USERPROFILE, "
1437 "or HOMEDRIVE / HOMEPATH environment variables");
1438 }
1439 #else
1440 if( zHome==0 ){
1441 zHome = fossil_getenv("HOME");
1442 }
1443 if( zHome==0 ){
1444 if( isOptional ) return 0;
1445 fossil_panic("cannot locate home directory - please set the "
1446 "FOSSIL_HOME or HOME environment variables");
 
 
 
 
 
 
 
 
 
1447 }
1448 #endif
1449 if( file_isdir(zHome, ExtFILE)!=1 ){
1450 if( isOptional ) return 0;
1451 fossil_panic("invalid home directory: %s", zHome);
1452 }
1453 #if defined(_WIN32) || defined(__CYGWIN__)
1454 /* . filenames give some window systems problems and many apps problems */
1455 zDbName = mprintf("%//_fossil", zHome);
1456 #else
1457 zDbName = mprintf("%s/.fossil", zHome);
1458 #endif
1459 if( file_size(zDbName, ExtFILE)<1024*3 ){
1460 if( file_access(zHome, W_OK) ){
1461 if( isOptional ) return 0;
1462 fossil_panic("home directory %s must be writeable", zHome);
1463
--- src/db.c
+++ src/db.c
@@ -1407,17 +1407,19 @@
1407 ** case, invoke this routine with useAttach as 1.
1408 */
1409 int db_open_config(int useAttach, int isOptional){
1410 char *zDbName;
1411 char *zHome;
1412 const char *zRoot;
1413 if( g.zConfigDbName ){
1414 int alreadyAttached = db_database_slot("configdb")>0;
1415 if( useAttach==alreadyAttached ) return 1; /* Already open. */
1416 db_close_config();
1417 }
1418 zHome = fossil_getenv("FOSSIL_HOME");
1419 #if defined(_WIN32) || defined(__CYGWIN__)
1420 zRoot = "_fossil";
1421 if( zHome==0 ){
1422 zHome = fossil_getenv("LOCALAPPDATA");
1423 if( zHome==0 ){
1424 zHome = fossil_getenv("APPDATA");
1425 if( zHome==0 ){
@@ -1435,28 +1437,35 @@
1437 fossil_panic("cannot locate home directory - please set the "
1438 "FOSSIL_HOME, LOCALAPPDATA, APPDATA, USERPROFILE, "
1439 "or HOMEDRIVE / HOMEPATH environment variables");
1440 }
1441 #else
1442 zRoot = ".fossil";
 
 
1443 if( zHome==0 ){
1444 zHome = fossil_getenv("XDG_CONFIG_HOME");
1445 if( zHome ){
1446 zRoot = "fossil.db";
1447 }else{
1448 zHome = fossil_getenv("HOME");
1449 if( zHome==0 ){
1450 if( isOptional ) return 0;
1451 fossil_panic("cannot locate home directory - please set one of the "
1452 "FOSSIL_HOME, XDG_CONFIG_HOME, or HOME environment "
1453 "variables");
1454 }
1455 }
1456 }
1457 #endif
1458 if( file_isdir(zHome, ExtFILE)!=1 ){
1459 if( isOptional ) return 0;
1460 fossil_panic("invalid home directory: %s", zHome);
1461 }
1462 #if defined(_WIN32) || defined(__CYGWIN__)
1463 /* . filenames give some window systems problems and many apps problems */
1464 zDbName = mprintf("%//%s", zHome, zRoot);
1465 #else
1466 zDbName = mprintf("%s/%s", zHome, zRoot);
1467 #endif
1468 if( file_size(zDbName, ExtFILE)<1024*3 ){
1469 if( file_access(zHome, W_OK) ){
1470 if( isOptional ) return 0;
1471 fossil_panic("home directory %s must be writeable", zHome);
1472
+57 -36
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,20 +112,26 @@
112112
113113
114114
Environment Variables
115115
---------------------
116116
117
-On most platforms, the location of the user’s account-wide `.fossil`
118
-file is either `FOSSIL_HOME` or `HOME`, in that order. This ordering
119
-lets you put this file somewhere other than at the top of your user’s
120
-home directory by defining `FOSSIL_HOME` to mask the always-defined
121
-`HOME`.
117
+On most platforms, the location of the user’s account-wide
118
+[configuration database][configdb]
119
+file is either `FOSSIL_HOME`, `XDG_CONFIG_HOME`, or `HOME`, in that order.
120
+This ordering lets you put this file somewhere other than at the top
121
+of your user’s home directory by defining `FOSSIL_HOME` to mask
122
+the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined
123
+by some desktop environments as an alternative location for
124
+configuration files. If the `XDG_CONFIG_HOME` location is used, then
125
+the name of the configuration database is `fossil.db` instead of
126
+`.fossil`. See the [configuration database location][configloc] discussion
127
+for additional information.
122128
123129
For native Windows builds and for Cygwin builds, the file is called
124
-`_fossil` instead to avoid problems with old programs that assume file
125
-names cannot begin with a dot, as was true in old versions of Windows
126
-and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
130
+`_fossil` instead of `.fossil` to avoid problems with old programs that
131
+assume file names cannot begin with a dot, as was true in old versions
132
+of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
127133
problem with such files, but still we take the safe path in case you’re
128134
on a system with software that can’t cope.) We start our search with
129135
`FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead
130136
try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we
131137
concatenate `HOMEDRIVE` + `HOMEPATH`.
@@ -149,16 +155,13 @@
149155
local interactive user via the command line). This can be useful for
150156
local (or remote) testing of the moderation subsystem and its impact
151157
on the contents and status of wiki pages.
152158
153159
154
-`FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment
155
-variable found in the environment from the list `FOSSIL_HOME`,
156
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
157
-`HOMEPATH` (Windows, used together), and `HOME` is used as the
158
-location of the `~/.fossil` file.
159
-
160
+`FOSSIL_HOME`: Location of [configuration database][configdb].
161
+See the [configuration database location][configloc] description
162
+for additional information.
160163
161164
`FOSSIL_USE_SEE_TEXTKEY`: If set, treat the encryption key string for
162165
SEE as text to be hashed into the actual encryption key. This has no
163166
effect if Fossil was not compiled with SEE support enabled.
164167
@@ -195,15 +198,12 @@
195198
196199
`GATEWAY_INTERFACE`: If present and the `--nocgi` option is not, assume
197200
fossil is invoked from a web server as a CGI command, and act
198201
accordingly.
199202
200
-`HOME`: Location of the `~/.fossil` file. The first environment
201
-variable found in the environment from the list `FOSSIL_HOME`,
202
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
203
-`HOMEPATH` (Windows, used together), and `HOME` is used as the
204
-location of the `~/.fossil` file.
203
+`HOME`: Potential location of the [configuration database][configdb].
204
+See the [configuration database location][configloc] description for details.
205205
206206
`HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file.
207207
The first environment variable found in the environment from the list
208208
`FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),
209209
`HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
@@ -402,27 +402,45 @@
402402
first found environment variable from the list `FOSSIL_USER`, `USER`,
403403
`LOGNAME`, and `USERNAME`, is the user name. As a final fallback, if
404404
none of those are set, then the default user name is "root".
405405
406406
407
-### Home Directory
408
-
409
-Fossil keeps some information interesting to each user in the user's
410
-home directory. This includes the global settings and the list of
411
-repositories and checkouts used by `fossil all`.
412
-
413
-The user's home directory is specified by the first environment
414
-variable found in the environment from the list `FOSSIL_HOME`,
415
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
416
-`HOMEPATH` (Windows, used together), and `HOME`.
417
-
418
-SQLite has its own notion of the user's home directory, which is only
419
-exposed if the interactive SQL shell is run with the "fossil
420
-sqlite3" command. Being a separate library, SQLite uses many of the
421
-same variables to find the home directory, but uses them in a
422
-different order, and does not use the `FOSSIL_HOME` variable at all.
423
-
407
+### Configuration Directory (often the Home Directory)
408
+
409
+Fossil keeps some information pertinent to each user in the user's
410
+[configuration database file][configdb].
411
+The configuration database file includes the global settings
412
+and the list of repositories and checkouts used by `fossil all`.
413
+
414
+On Unix systems, the configuration database is called by one of the
415
+following names (in order):
416
+
417
+ * `$FOSSIL_HOME/.fossil`
418
+ * `$XDG_CONFIG_HOME/fossil.db`
419
+ * `$HOME/.fossil`
420
+
421
+The name used is the first in the above list for which the corresponding
422
+environment varible is defined. On most systems, the third name is the
423
+one that is used.
424
+
425
+On Windows, the configuration database is called one of these (in order)
426
+
427
+ * `%FOSSIL_HOME%/_fossil`
428
+ * `%LOCALAPPDATA%/_fossil`
429
+ * `%APPDATA%/_fossil`
430
+ * `%USERPROFILES%/_fossil`
431
+ * `%HOMEDRIVE%%HOMEPATH%/_fossil`
432
+
433
+As before, the first case in when the corresponding environment variables
434
+exist is the one used. This is ususally the second case. Note that the
435
+`FOSSIL_HOME` environment variable can always be set to determine the
436
+location of the configuration database. Note also that the configuration
437
+database file itself is called `.fossil` or `fossil.db` on unix but
438
+`_fossil` on windows.
439
+
440
+You can run the "[fossil info](/help?cmd=info)" command from an open
441
+check-out to see the location of the configuration database.
424442
425443
426444
### SQLite VFS to use
427445
428446
See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an
@@ -491,5 +509,8 @@
491509
On Apple platforms, it assumes that `open` is the command to open an
492510
URL in the user's configured default browser.
493511
494512
On Windows platforms, it assumes that `start` is the command to open
495513
an URL in the user's configured default browser.
514
+
515
+[configdb]: ./tech_overview.wiki#configdb
516
+[configloc]: ./tech_overview.wiki#configloc
496517
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,20 +112,26 @@
112
113
114 Environment Variables
115 ---------------------
116
117 On most platforms, the location of the user’s account-wide `.fossil`
118 file is either `FOSSIL_HOME` or `HOME`, in that order. This ordering
119 lets you put this file somewhere other than at the top of your user’s
120 home directory by defining `FOSSIL_HOME` to mask the always-defined
121 `HOME`.
 
 
 
 
 
 
122
123 For native Windows builds and for Cygwin builds, the file is called
124 `_fossil` instead to avoid problems with old programs that assume file
125 names cannot begin with a dot, as was true in old versions of Windows
126 and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
127 problem with such files, but still we take the safe path in case you’re
128 on a system with software that can’t cope.) We start our search with
129 `FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead
130 try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we
131 concatenate `HOMEDRIVE` + `HOMEPATH`.
@@ -149,16 +155,13 @@
149 local interactive user via the command line). This can be useful for
150 local (or remote) testing of the moderation subsystem and its impact
151 on the contents and status of wiki pages.
152
153
154 `FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment
155 variable found in the environment from the list `FOSSIL_HOME`,
156 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
157 `HOMEPATH` (Windows, used together), and `HOME` is used as the
158 location of the `~/.fossil` file.
159
160
161 `FOSSIL_USE_SEE_TEXTKEY`: If set, treat the encryption key string for
162 SEE as text to be hashed into the actual encryption key. This has no
163 effect if Fossil was not compiled with SEE support enabled.
164
@@ -195,15 +198,12 @@
195
196 `GATEWAY_INTERFACE`: If present and the `--nocgi` option is not, assume
197 fossil is invoked from a web server as a CGI command, and act
198 accordingly.
199
200 `HOME`: Location of the `~/.fossil` file. The first environment
201 variable found in the environment from the list `FOSSIL_HOME`,
202 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
203 `HOMEPATH` (Windows, used together), and `HOME` is used as the
204 location of the `~/.fossil` file.
205
206 `HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file.
207 The first environment variable found in the environment from the list
208 `FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),
209 `HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
@@ -402,27 +402,45 @@
402 first found environment variable from the list `FOSSIL_USER`, `USER`,
403 `LOGNAME`, and `USERNAME`, is the user name. As a final fallback, if
404 none of those are set, then the default user name is "root".
405
406
407 ### Home Directory
408
409 Fossil keeps some information interesting to each user in the user's
410 home directory. This includes the global settings and the list of
411 repositories and checkouts used by `fossil all`.
412
413 The user's home directory is specified by the first environment
414 variable found in the environment from the list `FOSSIL_HOME`,
415 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
416 `HOMEPATH` (Windows, used together), and `HOME`.
417
418 SQLite has its own notion of the user's home directory, which is only
419 exposed if the interactive SQL shell is run with the "fossil
420 sqlite3" command. Being a separate library, SQLite uses many of the
421 same variables to find the home directory, but uses them in a
422 different order, and does not use the `FOSSIL_HOME` variable at all.
423
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
425
426 ### SQLite VFS to use
427
428 See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an
@@ -491,5 +509,8 @@
491 On Apple platforms, it assumes that `open` is the command to open an
492 URL in the user's configured default browser.
493
494 On Windows platforms, it assumes that `start` is the command to open
495 an URL in the user's configured default browser.
 
 
 
496
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,20 +112,26 @@
112
113
114 Environment Variables
115 ---------------------
116
117 On most platforms, the location of the user’s account-wide
118 [configuration database][configdb]
119 file is either `FOSSIL_HOME`, `XDG_CONFIG_HOME`, or `HOME`, in that order.
120 This ordering lets you put this file somewhere other than at the top
121 of your user’s home directory by defining `FOSSIL_HOME` to mask
122 the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined
123 by some desktop environments as an alternative location for
124 configuration files. If the `XDG_CONFIG_HOME` location is used, then
125 the name of the configuration database is `fossil.db` instead of
126 `.fossil`. See the [configuration database location][configloc] discussion
127 for additional information.
128
129 For native Windows builds and for Cygwin builds, the file is called
130 `_fossil` instead of `.fossil` to avoid problems with old programs that
131 assume file names cannot begin with a dot, as was true in old versions
132 of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
133 problem with such files, but still we take the safe path in case you’re
134 on a system with software that can’t cope.) We start our search with
135 `FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead
136 try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we
137 concatenate `HOMEDRIVE` + `HOMEPATH`.
@@ -149,16 +155,13 @@
155 local interactive user via the command line). This can be useful for
156 local (or remote) testing of the moderation subsystem and its impact
157 on the contents and status of wiki pages.
158
159
160 `FOSSIL_HOME`: Location of [configuration database][configdb].
161 See the [configuration database location][configloc] description
162 for additional information.
 
 
 
163
164 `FOSSIL_USE_SEE_TEXTKEY`: If set, treat the encryption key string for
165 SEE as text to be hashed into the actual encryption key. This has no
166 effect if Fossil was not compiled with SEE support enabled.
167
@@ -195,15 +198,12 @@
198
199 `GATEWAY_INTERFACE`: If present and the `--nocgi` option is not, assume
200 fossil is invoked from a web server as a CGI command, and act
201 accordingly.
202
203 `HOME`: Potential location of the [configuration database][configdb].
204 See the [configuration database location][configloc] description for details.
 
 
 
205
206 `HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file.
207 The first environment variable found in the environment from the list
208 `FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),
209 `HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
@@ -402,27 +402,45 @@
402 first found environment variable from the list `FOSSIL_USER`, `USER`,
403 `LOGNAME`, and `USERNAME`, is the user name. As a final fallback, if
404 none of those are set, then the default user name is "root".
405
406
407 ### Configuration Directory (often the Home Directory)
408
409 Fossil keeps some information pertinent to each user in the user's
410 [configuration database file][configdb].
411 The configuration database file includes the global settings
412 and the list of repositories and checkouts used by `fossil all`.
413
414 On Unix systems, the configuration database is called by one of the
415 following names (in order):
416
417 * `$FOSSIL_HOME/.fossil`
418 * `$XDG_CONFIG_HOME/fossil.db`
419 * `$HOME/.fossil`
420
421 The name used is the first in the above list for which the corresponding
422 environment varible is defined. On most systems, the third name is the
423 one that is used.
424
425 On Windows, the configuration database is called one of these (in order)
426
427 * `%FOSSIL_HOME%/_fossil`
428 * `%LOCALAPPDATA%/_fossil`
429 * `%APPDATA%/_fossil`
430 * `%USERPROFILES%/_fossil`
431 * `%HOMEDRIVE%%HOMEPATH%/_fossil`
432
433 As before, the first case in when the corresponding environment variables
434 exist is the one used. This is ususally the second case. Note that the
435 `FOSSIL_HOME` environment variable can always be set to determine the
436 location of the configuration database. Note also that the configuration
437 database file itself is called `.fossil` or `fossil.db` on unix but
438 `_fossil` on windows.
439
440 You can run the "[fossil info](/help?cmd=info)" command from an open
441 check-out to see the location of the configuration database.
442
443
444 ### SQLite VFS to use
445
446 See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an
@@ -491,5 +509,8 @@
509 On Apple platforms, it assumes that `open` is the command to open an
510 URL in the user's configured default browser.
511
512 On Windows platforms, it assumes that `start` is the command to open
513 an URL in the user's configured default browser.
514
515 [configdb]: ./tech_overview.wiki#configdb
516 [configloc]: ./tech_overview.wiki#configloc
517
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -68,11 +68,12 @@
6868
database files are used by Fossil, with detailed discussion following.
6969
7070
<table border="1" width="80%" cellpadding="0" align="center">
7171
<tr>
7272
<td width="33%" valign="top">
73
-<h3 align="center">Configuration Database<br>"~/.fossil"</h3>
73
+<h3 align="center">Configuration Database<br>"~/.fossil" or<br>
74
+"~/.config/fossil.conf"</h3>
7475
<ul>
7576
<li>Global [/help/settings |settings]
7677
<li>List of active repositories used by the [/help/all | all] command
7778
</ul>
7879
</td>
@@ -87,11 +88,11 @@
8788
<li>Metadata about the global state to facilitate rapid
8889
queries
8990
</ul>
9091
</td>
9192
<td width="33%" valign="top">
92
-<h3 align="center">Checkout Database<br>"_FOSSIL_"</h3>
93
+<h3 align="center">Checkout Database<br>"_FOSSIL_" or ".fslckout"</h3>
9394
<ul>
9495
<li>The repository database used by this checkout
9596
<li>The version currently checked out
9697
<li>Other versions [/help/merge | merged] in but not
9798
yet [/help/commit | committed]
@@ -124,18 +125,42 @@
124125
125126
The configuration database also maintains a list of repositories. This
126127
list is used by the [/help/all | fossil all] command in order to run various
127128
operations such as "sync" or "rebuild" on all repositories managed by a user.
128129
129
-On Unix systems, the configuration database is named ".fossil" and is
130
-located in the user's home directory. On Windows, the configuration
131
-database is named "_fossil" (using an underscore as the first character
132
-instead of a dot) and is located in the directory specified by the
133
-LOCALAPPDATA, APPDATA, or HOMEPATH environment variables, in that order.
134
-
135
-You can override this default location by defining the environment
136
-variable FOSSIL_HOME pointing to an appropriate (writable) directory.
130
+<a name='configloc'></a>
131
+<h4>2.1.1 Location Of The Configuration Database</h4>
132
+
133
+On Unix systems, the configuration database is called by one of the
134
+following names (in order):
135
+
136
+ * $FOSSIL_HOME/.fossil
137
+ * $XDG_CONFIG_HOME/fossil.db
138
+ * $HOME/.fossil
139
+
140
+The name used is the first in the above list for which the corresponding
141
+environment varible is defined. On most systems, the third name is the
142
+one that is used.
143
+
144
+On Windows, the configuration database is called one of these
145
+names (in order):
146
+
147
+ * %FOSSIL_HOME%/_fossil
148
+ * %LOCALAPPDATA%/_fossil
149
+ * %APPDATA%/_fossil
150
+ * %USERPROFILES%/_fossil
151
+ * %HOMEDRIVE%%HOMEPATH%/_fossil
152
+
153
+As before, the first case in when the corresponding environment variables
154
+exist is the one used. This is ususally the second case. Note that the
155
+FOSSIL_HOME environment variable can always be set to determine the
156
+location of the configuration database. Note also that the configuration
157
+database file itself is called ".fossil" or "fossil.db" on unix but
158
+"_fossil" on windows.
159
+
160
+You can run the [/help?cmd=info|fossil info] command from an open
161
+check-out to see the location of the configuration database.
137162
138163
<h3>2.2 Repository Databases</h3>
139164
140165
The repository database is the file that is commonly referred to as
141166
"the repository". This is because the repository database contains,
142167
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -68,11 +68,12 @@
68 database files are used by Fossil, with detailed discussion following.
69
70 <table border="1" width="80%" cellpadding="0" align="center">
71 <tr>
72 <td width="33%" valign="top">
73 <h3 align="center">Configuration Database<br>"~/.fossil"</h3>
 
74 <ul>
75 <li>Global [/help/settings |settings]
76 <li>List of active repositories used by the [/help/all | all] command
77 </ul>
78 </td>
@@ -87,11 +88,11 @@
87 <li>Metadata about the global state to facilitate rapid
88 queries
89 </ul>
90 </td>
91 <td width="33%" valign="top">
92 <h3 align="center">Checkout Database<br>"_FOSSIL_"</h3>
93 <ul>
94 <li>The repository database used by this checkout
95 <li>The version currently checked out
96 <li>Other versions [/help/merge | merged] in but not
97 yet [/help/commit | committed]
@@ -124,18 +125,42 @@
124
125 The configuration database also maintains a list of repositories. This
126 list is used by the [/help/all | fossil all] command in order to run various
127 operations such as "sync" or "rebuild" on all repositories managed by a user.
128
129 On Unix systems, the configuration database is named ".fossil" and is
130 located in the user's home directory. On Windows, the configuration
131 database is named "_fossil" (using an underscore as the first character
132 instead of a dot) and is located in the directory specified by the
133 LOCALAPPDATA, APPDATA, or HOMEPATH environment variables, in that order.
134
135 You can override this default location by defining the environment
136 variable FOSSIL_HOME pointing to an appropriate (writable) directory.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
138 <h3>2.2 Repository Databases</h3>
139
140 The repository database is the file that is commonly referred to as
141 "the repository". This is because the repository database contains,
142
--- www/tech_overview.wiki
+++ www/tech_overview.wiki
@@ -68,11 +68,12 @@
68 database files are used by Fossil, with detailed discussion following.
69
70 <table border="1" width="80%" cellpadding="0" align="center">
71 <tr>
72 <td width="33%" valign="top">
73 <h3 align="center">Configuration Database<br>"~/.fossil" or<br>
74 "~/.config/fossil.conf"</h3>
75 <ul>
76 <li>Global [/help/settings |settings]
77 <li>List of active repositories used by the [/help/all | all] command
78 </ul>
79 </td>
@@ -87,11 +88,11 @@
88 <li>Metadata about the global state to facilitate rapid
89 queries
90 </ul>
91 </td>
92 <td width="33%" valign="top">
93 <h3 align="center">Checkout Database<br>"_FOSSIL_" or ".fslckout"</h3>
94 <ul>
95 <li>The repository database used by this checkout
96 <li>The version currently checked out
97 <li>Other versions [/help/merge | merged] in but not
98 yet [/help/commit | committed]
@@ -124,18 +125,42 @@
125
126 The configuration database also maintains a list of repositories. This
127 list is used by the [/help/all | fossil all] command in order to run various
128 operations such as "sync" or "rebuild" on all repositories managed by a user.
129
130 <a name='configloc'></a>
131 <h4>2.1.1 Location Of The Configuration Database</h4>
132
133 On Unix systems, the configuration database is called by one of the
134 following names (in order):
135
136 * $FOSSIL_HOME/.fossil
137 * $XDG_CONFIG_HOME/fossil.db
138 * $HOME/.fossil
139
140 The name used is the first in the above list for which the corresponding
141 environment varible is defined. On most systems, the third name is the
142 one that is used.
143
144 On Windows, the configuration database is called one of these
145 names (in order):
146
147 * %FOSSIL_HOME%/_fossil
148 * %LOCALAPPDATA%/_fossil
149 * %APPDATA%/_fossil
150 * %USERPROFILES%/_fossil
151 * %HOMEDRIVE%%HOMEPATH%/_fossil
152
153 As before, the first case in when the corresponding environment variables
154 exist is the one used. This is ususally the second case. Note that the
155 FOSSIL_HOME environment variable can always be set to determine the
156 location of the configuration database. Note also that the configuration
157 database file itself is called ".fossil" or "fossil.db" on unix but
158 "_fossil" on windows.
159
160 You can run the [/help?cmd=info|fossil info] command from an open
161 check-out to see the location of the configuration database.
162
163 <h3>2.2 Repository Databases</h3>
164
165 The repository database is the file that is commonly referred to as
166 "the repository". This is because the repository database contains,
167

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button