Fossil SCM
When determining the interactive user, check the FOSSIL_USER environment variable. Also, add a property to the Windows resource file indicating if markdown support was compiled into the binary.
Commit
743b64ecf2380ca7057ad97d727f0d6d27d9b23a
Parent
d48399bd3907820…
2 files changed
+7
-3
+3
+7
-3
| --- src/user.c | ||
| +++ src/user.c | ||
| @@ -303,15 +303,17 @@ | ||
| 303 | 303 | ** |
| 304 | 304 | ** (2) If the local database is open, check in VVAR. |
| 305 | 305 | ** |
| 306 | 306 | ** (3) Check the default user in the repository |
| 307 | 307 | ** |
| 308 | -** (4) Try the USER environment variable. | |
| 308 | +** (4) Try the FOSSIL_USER environment variable. | |
| 309 | +** | |
| 310 | +** (5) Try the USER environment variable. | |
| 309 | 311 | ** |
| 310 | -** (5) Try the USERNAME environment variable. | |
| 312 | +** (6) Try the USERNAME environment variable. | |
| 311 | 313 | ** |
| 312 | -** (6) Check if the user can be extracted from the remote URL. | |
| 314 | +** (7) Check if the user can be extracted from the remote URL. | |
| 313 | 315 | ** |
| 314 | 316 | ** The user name is stored in g.zLogin. The uid is in g.userUid. |
| 315 | 317 | */ |
| 316 | 318 | void user_select(void){ |
| 317 | 319 | char *zUrl; |
| @@ -326,10 +328,12 @@ | ||
| 326 | 328 | } |
| 327 | 329 | |
| 328 | 330 | if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return; |
| 329 | 331 | |
| 330 | 332 | if( attempt_user(db_get("default-user", 0)) ) return; |
| 333 | + | |
| 334 | + if( attempt_user(fossil_getenv("FOSSIL_USER")) ) return; | |
| 331 | 335 | |
| 332 | 336 | if( attempt_user(fossil_getenv("USER")) ) return; |
| 333 | 337 | |
| 334 | 338 | if( attempt_user(fossil_getenv("USERNAME")) ) return; |
| 335 | 339 | |
| 336 | 340 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -303,15 +303,17 @@ | |
| 303 | ** |
| 304 | ** (2) If the local database is open, check in VVAR. |
| 305 | ** |
| 306 | ** (3) Check the default user in the repository |
| 307 | ** |
| 308 | ** (4) Try the USER environment variable. |
| 309 | ** |
| 310 | ** (5) Try the USERNAME environment variable. |
| 311 | ** |
| 312 | ** (6) Check if the user can be extracted from the remote URL. |
| 313 | ** |
| 314 | ** The user name is stored in g.zLogin. The uid is in g.userUid. |
| 315 | */ |
| 316 | void user_select(void){ |
| 317 | char *zUrl; |
| @@ -326,10 +328,12 @@ | |
| 326 | } |
| 327 | |
| 328 | if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return; |
| 329 | |
| 330 | if( attempt_user(db_get("default-user", 0)) ) return; |
| 331 | |
| 332 | if( attempt_user(fossil_getenv("USER")) ) return; |
| 333 | |
| 334 | if( attempt_user(fossil_getenv("USERNAME")) ) return; |
| 335 | |
| 336 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -303,15 +303,17 @@ | |
| 303 | ** |
| 304 | ** (2) If the local database is open, check in VVAR. |
| 305 | ** |
| 306 | ** (3) Check the default user in the repository |
| 307 | ** |
| 308 | ** (4) Try the FOSSIL_USER environment variable. |
| 309 | ** |
| 310 | ** (5) Try the USER environment variable. |
| 311 | ** |
| 312 | ** (6) Try the USERNAME environment variable. |
| 313 | ** |
| 314 | ** (7) Check if the user can be extracted from the remote URL. |
| 315 | ** |
| 316 | ** The user name is stored in g.zLogin. The uid is in g.userUid. |
| 317 | */ |
| 318 | void user_select(void){ |
| 319 | char *zUrl; |
| @@ -326,10 +328,12 @@ | |
| 328 | } |
| 329 | |
| 330 | if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return; |
| 331 | |
| 332 | if( attempt_user(db_get("default-user", 0)) ) return; |
| 333 | |
| 334 | if( attempt_user(fossil_getenv("FOSSIL_USER")) ) return; |
| 335 | |
| 336 | if( attempt_user(fossil_getenv("USER")) ) return; |
| 337 | |
| 338 | if( attempt_user(fossil_getenv("USERNAME")) ) return; |
| 339 | |
| 340 |
+3
| --- win/fossil.rc | ||
| +++ win/fossil.rc | ||
| @@ -104,10 +104,13 @@ | ||
| 104 | 104 | #endif |
| 105 | 105 | #endif |
| 106 | 106 | #ifdef FOSSIL_ENABLE_JSON |
| 107 | 107 | VALUE "JsonEnabled", "Yes, cson\0" |
| 108 | 108 | #endif |
| 109 | +#ifdef FOSSIL_ENABLE_MARKDOWN | |
| 110 | + VALUE "MarkdownEnabled", "Yes\0" | |
| 111 | +#endif | |
| 109 | 112 | END |
| 110 | 113 | END |
| 111 | 114 | BLOCK "VarFileInfo" |
| 112 | 115 | BEGIN |
| 113 | 116 | VALUE "Translation", 0x409, 0x4B0 |
| 114 | 117 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -104,10 +104,13 @@ | |
| 104 | #endif |
| 105 | #endif |
| 106 | #ifdef FOSSIL_ENABLE_JSON |
| 107 | VALUE "JsonEnabled", "Yes, cson\0" |
| 108 | #endif |
| 109 | END |
| 110 | END |
| 111 | BLOCK "VarFileInfo" |
| 112 | BEGIN |
| 113 | VALUE "Translation", 0x409, 0x4B0 |
| 114 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -104,10 +104,13 @@ | |
| 104 | #endif |
| 105 | #endif |
| 106 | #ifdef FOSSIL_ENABLE_JSON |
| 107 | VALUE "JsonEnabled", "Yes, cson\0" |
| 108 | #endif |
| 109 | #ifdef FOSSIL_ENABLE_MARKDOWN |
| 110 | VALUE "MarkdownEnabled", "Yes\0" |
| 111 | #endif |
| 112 | END |
| 113 | END |
| 114 | BLOCK "VarFileInfo" |
| 115 | BEGIN |
| 116 | VALUE "Translation", 0x409, 0x4B0 |
| 117 |