Fossil

Check-in [15176c8a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Inserted %USERPROFILE% between %FOSSIL_HOME% and %LOCALAPPDATA% in the code that chooses where the user's account-wide _fossil file lives on Windows. (This is the Windows analog to the ~/.fossil file on POSIX systems.) Also updated the docs to match.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | windows-env-usage
Files: files | file ages | folders
SHA3-256: 15176c8ae51a1e88caa03e5d78fad892b4b485af650dda96adb784f9bab45cf1
User & Date: wyoung 2019-08-10 03:23:36.112
Context
2019-08-10
03:44
Updated the temp file and dir location documentation in www/env-opts.md to match what the current code does. ... (Closed-Leaf check-in: 1f63724e user: wyoung tags: windows-env-usage)
03:23
Inserted %USERPROFILE% between %FOSSIL_HOME% and %LOCALAPPDATA% in the code that chooses where the user's account-wide _fossil file lives on Windows. (This is the Windows analog to the ~/.fossil file on POSIX systems.) Also updated the docs to match. ... (check-in: 15176c8a user: wyoung tags: windows-env-usage)
2019-08-09
21:08
Update the /stat page to show forum statistics. ... (check-in: 29141af7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
1377
1378
1379
1380
1381
1382
1383


1384
1385
1386
1387
1388
1389
1390

1391
1392
1393
1394
1395
1396
1397
    int alreadyAttached = db_database_slot("configdb")>0;
    if( useAttach==alreadyAttached ) return 1; /* Already open. */
    db_close_config();
  }
  zHome = fossil_getenv("FOSSIL_HOME");
#if defined(_WIN32) || defined(__CYGWIN__)
  if( zHome==0 ){


    zHome = fossil_getenv("LOCALAPPDATA");
    if( zHome==0 ){
      zHome = fossil_getenv("APPDATA");
      if( zHome==0 ){
        char *zDrive = fossil_getenv("HOMEDRIVE");
        char *zPath = fossil_getenv("HOMEPATH");
        if( zDrive && zPath ) zHome = mprintf("%s%s", zDrive, zPath);

      }
    }
  }
  if( zHome==0 ){
    if( isOptional ) return 0;
    fossil_panic("cannot locate home directory - please set the "
                 "FOSSIL_HOME, LOCALAPPDATA, APPDATA, or HOMEPATH "







>
>
|
|
|
|
|
|
|
>







1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
    int alreadyAttached = db_database_slot("configdb")>0;
    if( useAttach==alreadyAttached ) return 1; /* Already open. */
    db_close_config();
  }
  zHome = fossil_getenv("FOSSIL_HOME");
#if defined(_WIN32) || defined(__CYGWIN__)
  if( zHome==0 ){
    zHome = fossil_getenv("USERPROFILE");
    if( zHome==0 ){
      zHome = fossil_getenv("LOCALAPPDATA");
      if( zHome==0 ){
        zHome = fossil_getenv("APPDATA");
        if( zHome==0 ){
          char *zDrive = fossil_getenv("HOMEDRIVE");
          char *zPath = fossil_getenv("HOMEPATH");
          if( zDrive && zPath ) zHome = mprintf("%s%s", zDrive, zPath);
        }
      }
    }
  }
  if( zHome==0 ){
    if( isOptional ) return 0;
    fossil_panic("cannot locate home directory - please set the "
                 "FOSSIL_HOME, LOCALAPPDATA, APPDATA, or HOMEPATH "
Changes to www/env-opts.md.
110
111
112
113
114
115
116





117

118

119


120

121
122
123
124
125
126
127
128
129

`--vfs VFSNAME`: Load the named VFS into SQLite.


Environment Variables
---------------------








`APPDATA`: (Windows) Location of the `~/.fossil` file. The first

environment variable found in the environment from the list


`FOSSIL_HOME`, `LOCALAPPDATA` (Windows), `APPDATA` (Windows),

`HOMEDRIVE` and `HOMEPATH` (Windows, used together), and `HOME` is
used as the location of the `~/.fossil` file.

`EDITOR`: Name the editor to use for check-in and stash comments.
Overridden by the local or global `editor` setting or the `VISUAL`
environment variable.

`FOSSIL_BREAK`: If set, an opportunity will be created to attach a
debugger to the Fossil process prior to any significant work being







>
>
>
>
>

>
|
>
|
>
>
|
>
|
<







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138

`--vfs VFSNAME`: Load the named VFS into SQLite.


Environment Variables
---------------------

On most platforms, the location of the user’s account-wide `.fossil`
file is either `FOSSIL_HOME` or `HOME`, in that order. This ordering
lets you put this file somewhere other than at the top of your user’s
home directory by defining `FOSSIL_HOME` to mask the always-defined
`HOME`.

For native Windows builds and for Cygwin builds, the file is called
`_fossil` instead to avoid problems with old programs that assume file
names cannot begin with a dot, as was true in old versions of Windows
and in MS-DOS. (Newer Microsoft OSes and file systems dont have a
problem with such files, but still we take the safe path in case you’re
on a system with software that can’t cope.) We start our search with
`FOSSIL_HOME` again, but instead of falling back to `HOME`, we instead
try `USERPROFILE`, then `LOCALAPPDATA`, then `APPDATA`, and finally we
concatenate `HOMEDRIVE` + `HOMEPATH`.


`EDITOR`: Name the editor to use for check-in and stash comments.
Overridden by the local or global `editor` setting or the `VISUAL`
environment variable.

`FOSSIL_BREAK`: If set, an opportunity will be created to attach a
debugger to the Fossil process prior to any significant work being