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 304 ** 305 305 ** (3) Check the default user in the repository 306 306 ** 307 307 ** (4) Try the USER environment variable. 308 308 ** 309 309 ** (5) Try the USERNAME environment variable. 310 310 ** 311 +** (6) Check if the user can be extracted from the remote URL. 312 +** 311 313 ** The user name is stored in g.zLogin. The uid is in g.userUid. 312 314 */ 313 315 void user_select(void){ 316 + char *zUrl; 317 + 314 318 if( g.userUid ) return; 315 319 if( g.zLogin ){ 316 320 if( attempt_user(g.zLogin)==0 ){ 317 321 fossil_fatal("no such user: %s", g.zLogin); 318 322 }else{ 319 323 return; 320 324 } ................................................................................ 323 327 if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return; 324 328 325 329 if( attempt_user(db_get("default-user", 0)) ) return; 326 330 327 331 if( attempt_user(fossil_getenv("USER")) ) return; 328 332 329 333 if( attempt_user(fossil_getenv("USERNAME")) ) return; 334 + 335 + zUrl = db_get("last-sync-url", 0); 336 + if( zUrl ){ 337 + url_parse(zUrl); 338 + if( attempt_user(g.urlUser) ) return; 339 + } 330 340 331 341 fossil_print( 332 342 "Cannot figure out who you are! Consider using the --user\n" 333 343 "command line option, setting your USER environment variable,\n" 334 344 "or setting a default user with \"fossil user default USER\".\n" 335 345 ); 336 346 fossil_fatal("cannot determine user");