Fossil SCM

Change the name of the configuration database to "fossil.db" if the database is found in the XDG_CONFIG_HOME directory. Otherwise, the configdb is still called ".fossil" on unix systems.

drh 2020-04-18 18:55 xdg-aware-config-db
Commit 09a21409f53247b07eb76fcc4a2af2a460d46d791f1b72fa0ebf0831296b8ad1
3 files changed +16 -11 +48 -31 +33 -13
+16 -11
--- 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,32 +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
1442
+ zRoot = ".fossil";
14401443
if( zHome==0 ){
14411444
zHome = fossil_getenv("XDG_CONFIG_HOME");
1442
- }
1443
- if( zHome==0 ){
1444
- zHome = fossil_getenv("HOME");
1445
- }
1446
- if( zHome==0 ){
1447
- if( isOptional ) return 0;
1448
- fossil_panic("cannot locate home directory - please set one of the "
1449
- "FOSSIL_HOME, XDG_CONFIG_HOME, or HOME environment "
1450
- "variables");
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
+ }
14511456
}
14521457
#endif
14531458
if( file_isdir(zHome, ExtFILE)!=1 ){
14541459
if( isOptional ) return 0;
14551460
fossil_panic("invalid home directory: %s", zHome);
14561461
}
14571462
#if defined(_WIN32) || defined(__CYGWIN__)
14581463
/* . filenames give some window systems problems and many apps problems */
1459
- zDbName = mprintf("%//_fossil", zHome);
1464
+ zDbName = mprintf("%//%s", zHome, zRoot);
14601465
#else
1461
- zDbName = mprintf("%s/.fossil", zHome);
1466
+ zDbName = mprintf("%s/%s", zHome, zRoot);
14621467
#endif
14631468
if( file_size(zDbName, ExtFILE)<1024*3 ){
14641469
if( file_access(zHome, W_OK) ){
14651470
if( isOptional ) return 0;
14661471
fossil_panic("home directory %s must be writeable", zHome);
14671472
--- 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,32 +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("XDG_CONFIG_HOME");
1442 }
1443 if( zHome==0 ){
1444 zHome = fossil_getenv("HOME");
1445 }
1446 if( zHome==0 ){
1447 if( isOptional ) return 0;
1448 fossil_panic("cannot locate home directory - please set one of the "
1449 "FOSSIL_HOME, XDG_CONFIG_HOME, or HOME environment "
1450 "variables");
 
 
1451 }
1452 #endif
1453 if( file_isdir(zHome, ExtFILE)!=1 ){
1454 if( isOptional ) return 0;
1455 fossil_panic("invalid home directory: %s", zHome);
1456 }
1457 #if defined(_WIN32) || defined(__CYGWIN__)
1458 /* . filenames give some window systems problems and many apps problems */
1459 zDbName = mprintf("%//_fossil", zHome);
1460 #else
1461 zDbName = mprintf("%s/.fossil", zHome);
1462 #endif
1463 if( file_size(zDbName, ExtFILE)<1024*3 ){
1464 if( file_access(zHome, W_OK) ){
1465 if( isOptional ) return 0;
1466 fossil_panic("home directory %s must be writeable", zHome);
1467
--- 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,32 +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
+48 -31
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,17 +112,21 @@
112112
113113
114114
Environment Variables
115115
---------------------
116116
117
-On most platforms, the location of the user’s account-wide `.fossil`
117
+On most platforms, the location of the user’s account-wide
118
+[configuration database][configdb]
118119
file is either `FOSSIL_HOME`, `XDG_CONFIG_HOME`, or `HOME`, in that order.
119120
This ordering lets you put this file somewhere other than at the top
120121
of your user’s home directory by defining `FOSSIL_HOME` to mask
121122
the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined
122
-by some desktop environments to be the preferred "modern" directory
123
-in which to store configuration files.
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.
124128
125129
For native Windows builds and for Cygwin builds, the file is called
126130
`_fossil` instead of `.fossil` to avoid problems with old programs that
127131
assume file names cannot begin with a dot, as was true in old versions
128132
of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
@@ -151,17 +155,13 @@
151155
local interactive user via the command line). This can be useful for
152156
local (or remote) testing of the moderation subsystem and its impact
153157
on the contents and status of wiki pages.
154158
155159
156
-`FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment
157
-variable found in the environment from the list `FOSSIL_HOME`,
158
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
159
-`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix) and
160
-`HOME` is used as the
161
-location of the `~/.fossil` file.
162
-
160
+`FOSSIL_HOME`: Location of [configuration database][configdb].
161
+See the [configuration database location][configloc] description
162
+for additional information.
163163
164164
`FOSSIL_USE_SEE_TEXTKEY`: If set, treat the encryption key string for
165165
SEE as text to be hashed into the actual encryption key. This has no
166166
effect if Fossil was not compiled with SEE support enabled.
167167
@@ -198,15 +198,12 @@
198198
199199
`GATEWAY_INTERFACE`: If present and the `--nocgi` option is not, assume
200200
fossil is invoked from a web server as a CGI command, and act
201201
accordingly.
202202
203
-`HOME`: Location of the `~/.fossil` file. The first environment
204
-variable found in the environment from the list `FOSSIL_HOME`,
205
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
206
-`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix)
207
-and `HOME` is used as the location of the `~/.fossil` file.
203
+`HOME`: Potential location of the [configuration database][configdb].
204
+See the [configuration database location][configloc] description for details.
208205
209206
`HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file.
210207
The first environment variable found in the environment from the list
211208
`FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),
212209
`HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
@@ -407,26 +404,43 @@
407404
none of those are set, then the default user name is "root".
408405
409406
410407
### Configuration Directory (often the Home Directory)
411408
412
-Fossil keeps some information interesting to each user in the user's
413
-configuration file directory. This includes the global settings and the list of
414
-repositories and checkouts used by `fossil all`. On many,
415
-but not all, systems the configuration file directory is the home directory
416
-
417
-The user's configuration file directory is specified by the first environment
418
-variable found in the environment from the list `FOSSIL_HOME`,
419
-`LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
420
-`HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix), and `HOME`.
421
-
422
-SQLite has its own notion of the user's configuration file directory,
423
-which is only exposed if the interactive SQL shell is run with the "fossil
424
-sqlite3" command. Being a separate library, SQLite uses many of the
425
-same variables to find the home directory, but uses them in a
426
-different order, and does not use the `FOSSIL_HOME` nor
427
-`XDG_CONFIG_HOME` variables.
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.
428442
429443
430444
### SQLite VFS to use
431445
432446
See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an
@@ -495,5 +509,8 @@
495509
On Apple platforms, it assumes that `open` is the command to open an
496510
URL in the user's configured default browser.
497511
498512
On Windows platforms, it assumes that `start` is the command to open
499513
an URL in the user's configured default browser.
514
+
515
+[configdb]: ./tech_overview.wiki#configdb
516
+[configloc]: ./tech_overview.wiki#configloc
500517
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,17 +112,21 @@
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`, `XDG_CONFIG_HOME`, or `HOME`, in that order.
119 This ordering lets you put this file somewhere other than at the top
120 of your user’s home directory by defining `FOSSIL_HOME` to mask
121 the always-defined `HOME`. The `XDG_CONFIG_HOME` setting is defined
122 by some desktop environments to be the preferred "modern" directory
123 in which to store configuration files.
 
 
 
124
125 For native Windows builds and for Cygwin builds, the file is called
126 `_fossil` instead of `.fossil` to avoid problems with old programs that
127 assume file names cannot begin with a dot, as was true in old versions
128 of Windows and in MS-DOS. (Newer Microsoft OSes and file systems don’t have a
@@ -151,17 +155,13 @@
151 local interactive user via the command line). This can be useful for
152 local (or remote) testing of the moderation subsystem and its impact
153 on the contents and status of wiki pages.
154
155
156 `FOSSIL_HOME`: Location of the `~/.fossil` file. The first environment
157 variable found in the environment from the list `FOSSIL_HOME`,
158 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
159 `HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix) and
160 `HOME` is used as the
161 location of the `~/.fossil` file.
162
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
@@ -198,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`: Location of the `~/.fossil` file. The first environment
204 variable found in the environment from the list `FOSSIL_HOME`,
205 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
206 `HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix)
207 and `HOME` is used as the location of the `~/.fossil` file.
208
209 `HOMEDRIVE`, `HOMEPATH`: (Windows) Location of the `~/.fossil` file.
210 The first environment variable found in the environment from the list
211 `FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),
212 `HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
@@ -407,26 +404,43 @@
407 none of those are set, then the default user name is "root".
408
409
410 ### Configuration Directory (often the Home Directory)
411
412 Fossil keeps some information interesting to each user in the user's
413 configuration file directory. This includes the global settings and the list of
414 repositories and checkouts used by `fossil all`. On many,
415 but not all, systems the configuration file directory is the home directory
416
417 The user's configuration file directory is specified by the first environment
418 variable found in the environment from the list `FOSSIL_HOME`,
419 `LOCALAPPDATA` (Windows), `APPDATA` (Windows), `HOMEDRIVE` and
420 `HOMEPATH` (Windows, used together), `XDG_CONFIG_HOME` (unix), and `HOME`.
421
422 SQLite has its own notion of the user's configuration file directory,
423 which is only exposed if the interactive SQL shell is run with the "fossil
424 sqlite3" command. Being a separate library, SQLite uses many of the
425 same variables to find the home directory, but uses them in a
426 different order, and does not use the `FOSSIL_HOME` nor
427 `XDG_CONFIG_HOME` variables.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
429
430 ### SQLite VFS to use
431
432 See [the SQLite documentation](http://www.sqlite.org/vfs.html) for an
@@ -495,5 +509,8 @@
495 On Apple platforms, it assumes that `open` is the command to open an
496 URL in the user's configured default browser.
497
498 On Windows platforms, it assumes that `start` is the command to open
499 an URL in the user's configured default browser.
 
 
 
500
--- www/env-opts.md
+++ www/env-opts.md
@@ -112,17 +112,21 @@
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
@@ -151,17 +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
@@ -198,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
@@ -407,26 +404,43 @@
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
@@ -495,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,23 +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 configuration file directory, which on most older
131
-unix systems is the user's home directory but on some "desktop" linux
132
-environments is the "~/.config" directory. On Windows, the configuration
133
-database is named "_fossil" (using an underscore as the first character
134
-instead of a dot) and is located in the directory specified by the
135
-LOCALAPPDATA, APPDATA, or HOMEPATH environment variables, in that order.
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
+
136160
You can run the [/help?cmd=info|fossil info] command from an open
137161
check-out to see the location of the configuration database.
138
-
139
-You can override this default location by defining the environment
140
-variable FOSSIL_HOME pointing to an appropriate (writable) directory.
141
-
142162
143163
<h3>2.2 Repository Databases</h3>
144164
145165
The repository database is the file that is commonly referred to as
146166
"the repository". This is because the repository database contains,
147167
--- 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,23 +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 configuration file directory, which on most older
131 unix systems is the user's home directory but on some "desktop" linux
132 environments is the "~/.config" directory. On Windows, the configuration
133 database is named "_fossil" (using an underscore as the first character
134 instead of a dot) and is located in the directory specified by the
135 LOCALAPPDATA, APPDATA, or HOMEPATH environment variables, in that order.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136 You can run the [/help?cmd=info|fossil info] command from an open
137 check-out to see the location of the configuration database.
138
139 You can override this default location by defining the environment
140 variable FOSSIL_HOME pointing to an appropriate (writable) directory.
141
142
143 <h3>2.2 Repository Databases</h3>
144
145 The repository database is the file that is commonly referred to as
146 "the repository". This is because the repository database contains,
147
--- 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,23 +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