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.

mistachkin 2012-12-13 12:31 UTC trunk
Commit 743b64ecf2380ca7057ad97d727f0d6d27d9b23a
2 files changed +7 -3 +3
+7 -3
--- src/user.c
+++ src/user.c
@@ -303,15 +303,17 @@
303303
**
304304
** (2) If the local database is open, check in VVAR.
305305
**
306306
** (3) Check the default user in the repository
307307
**
308
-** (4) Try the USER environment variable.
308
+** (4) Try the FOSSIL_USER environment variable.
309
+**
310
+** (5) Try the USER environment variable.
309311
**
310
-** (5) Try the USERNAME environment variable.
312
+** (6) Try the USERNAME environment variable.
311313
**
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.
313315
**
314316
** The user name is stored in g.zLogin. The uid is in g.userUid.
315317
*/
316318
void user_select(void){
317319
char *zUrl;
@@ -326,10 +328,12 @@
326328
}
327329
328330
if( g.localOpen && attempt_user(db_lget("default-user",0)) ) return;
329331
330332
if( attempt_user(db_get("default-user", 0)) ) return;
333
+
334
+ if( attempt_user(fossil_getenv("FOSSIL_USER")) ) return;
331335
332336
if( attempt_user(fossil_getenv("USER")) ) return;
333337
334338
if( attempt_user(fossil_getenv("USERNAME")) ) return;
335339
336340
--- 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
--- win/fossil.rc
+++ win/fossil.rc
@@ -104,10 +104,13 @@
104104
#endif
105105
#endif
106106
#ifdef FOSSIL_ENABLE_JSON
107107
VALUE "JsonEnabled", "Yes, cson\0"
108108
#endif
109
+#ifdef FOSSIL_ENABLE_MARKDOWN
110
+ VALUE "MarkdownEnabled", "Yes\0"
111
+#endif
109112
END
110113
END
111114
BLOCK "VarFileInfo"
112115
BEGIN
113116
VALUE "Translation", 0x409, 0x4B0
114117
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button