Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch selectRemoteUser Excluding Merge-Ins
This is equivalent to a diff from 5f13a2a6c6 to 817b3fea10
2012-09-19
| ||
10:28 | Merge the selectRemoteUser branch into trunk, so that now the username in the remote_url is a potential source of the user name. check-in: 24b2c6688a user: drh tags: trunk | |
04:01 | As a fallback, attempt to extract the user from the remote URL configured for the repository. Closed-Leaf check-in: 817b3fea10 user: mistachkin tags: selectRemoteUser | |
2012-09-18
| ||
23:48 | Fix comment. check-in: 5f13a2a6c6 user: mistachkin tags: trunk | |
23:31 | Fix warning message typos. check-in: f9d053a931 user: mistachkin tags: trunk | |
Changes to src/user.c.
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
**
** (3) Check the default user in the repository
**
** (4) Try the USER environment variable.
**
** (5) Try the USERNAME environment variable.
**
** The user name is stored in g.zLogin. The uid is in g.userUid.
*/
void user_select(void){
if( g.userUid ) return;
if( g.zLogin ){
if( attempt_user(g.zLogin)==0 ){
fossil_fatal("no such user: %s", g.zLogin);
}else{
return;
}
................................................................................
if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return;
if( attempt_user(db_get("default-user", 0)) ) return;
if( attempt_user(fossil_getenv("USER")) ) return;
if( attempt_user(fossil_getenv("USERNAME")) ) return;
fossil_print(
"Cannot figure out who you are! Consider using the --user\n"
"command line option, setting your USER environment variable,\n"
"or setting a default user with \"fossil user default USER\".\n"
);
fossil_fatal("cannot determine user");
|
>
>
>
>
>
>
>
>
>
>
|
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
** ** (3) Check the default user in the repository ** ** (4) Try the USER environment variable. ** ** (5) Try the USERNAME environment variable. ** ** (6) Check if the user can be extracted from the remote URL. ** ** The user name is stored in g.zLogin. The uid is in g.userUid. */ void user_select(void){ char *zUrl; if( g.userUid ) return; if( g.zLogin ){ if( attempt_user(g.zLogin)==0 ){ fossil_fatal("no such user: %s", g.zLogin); }else{ return; } ................................................................................ if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return; if( attempt_user(db_get("default-user", 0)) ) return; if( attempt_user(fossil_getenv("USER")) ) return; if( attempt_user(fossil_getenv("USERNAME")) ) return; zUrl = db_get("last-sync-url", 0); if( zUrl ){ url_parse(zUrl); if( attempt_user(g.urlUser) ) return; } fossil_print( "Cannot figure out who you are! Consider using the --user\n" "command line option, setting your USER environment variable,\n" "or setting a default user with \"fossil user default USER\".\n" ); fossil_fatal("cannot determine user"); |