On Mon, Apr 30, 2012 at 8:01 PM, <sky5w...@gmail.com> wrote:

> Really confused since I want #3 below to happen BEFORE #2 :(
> User Name is determined from the following rules, in order:
> 1. The value of the --user or -U command-line option.
> 2. A username set using the "fossil user default" command
> 3. The value of the USER environment variable
>

The list from the source docs says something slightly different:

301 ** (1) Use the --user and -U command-line options. 302 ** 303 ** (2) If
the local database is open, check in VVAR. 304 ** 305 ** (3) Check the
default user in the repository 306 ** 307 ** (4) Try the USER environment
variable. 308 ** 309 ** (5) Use the first user in the USER table.

i didn't compare these with the code, but i'll use these numbers below...

If we follow the often-seen conventions that config file entries can be
overridden with CLI arg, and that $ENV vars often have a precedence between
config file and CLI args (in my experience, anyway), i would argue that
swapping 3 (config file) and 4 ($USER) would be the right (well, more
conventional) thing to do. e.g. in PHP GET supersedes POST (by default),
and POST supersedes (by default) COOKIES. The order of precedence generally
(conventionally) corresponds to the ease with which a user can change these
options (passing a URL param (GET) is easy for the user, POST is a bit more
work, and working with cookies is generally even more work (or impossible,
depending on the programming environment), thus PHP's default precedence
ordering).

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to