Fossil SCM
When using the "fossil ui" command with a remote repository, ensure that the global configuration database is opened prior to trying to acquire the "web-browser" and "ssh-command" settings.
Commit
23b84b33cdb70a1ecbdee4dd33f726954f5cf9a9ed5612e525482d10c4b18fe6
Parent
da2f1522db2a417…
1 file changed
+2
+2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3029,10 +3029,11 @@ | ||
| 3029 | 3029 | iPort = db_get_int("http-port", 8080); |
| 3030 | 3030 | mxPort = iPort+100; |
| 3031 | 3031 | } |
| 3032 | 3032 | if( isUiCmd && !fNoBrowser ){ |
| 3033 | 3033 | char *zBrowserArg; |
| 3034 | + if( zRemote ) db_open_config(0,0); | |
| 3034 | 3035 | zBrowser = fossil_web_browser(); |
| 3035 | 3036 | if( zIpAddr==0 ){ |
| 3036 | 3037 | zBrowserArg = mprintf("http://localhost:%%d/%s", zInitPage); |
| 3037 | 3038 | }else if( strchr(zIpAddr,':') ){ |
| 3038 | 3039 | zBrowserArg = mprintf("http://[%s]:%%d/%s", zIpAddr, zInitPage); |
| @@ -3053,10 +3054,11 @@ | ||
| 3053 | 3054 | FILE *sshIn; |
| 3054 | 3055 | Blob ssh; |
| 3055 | 3056 | char zLine[1000]; |
| 3056 | 3057 | blob_init(&ssh, 0, 0); |
| 3057 | 3058 | transport_ssh_command(&ssh); |
| 3059 | + db_close_config(); | |
| 3058 | 3060 | if( zFossilCmd==0 ) zFossilCmd = "fossil"; |
| 3059 | 3061 | blob_appendf(&ssh, |
| 3060 | 3062 | " -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$" |
| 3061 | 3063 | " %$ ui --nobrowser --localauth --port %d", |
| 3062 | 3064 | iPort, iPort, zRemote, zFossilCmd, iPort); |
| 3063 | 3065 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3029,10 +3029,11 @@ | |
| 3029 | iPort = db_get_int("http-port", 8080); |
| 3030 | mxPort = iPort+100; |
| 3031 | } |
| 3032 | if( isUiCmd && !fNoBrowser ){ |
| 3033 | char *zBrowserArg; |
| 3034 | zBrowser = fossil_web_browser(); |
| 3035 | if( zIpAddr==0 ){ |
| 3036 | zBrowserArg = mprintf("http://localhost:%%d/%s", zInitPage); |
| 3037 | }else if( strchr(zIpAddr,':') ){ |
| 3038 | zBrowserArg = mprintf("http://[%s]:%%d/%s", zIpAddr, zInitPage); |
| @@ -3053,10 +3054,11 @@ | |
| 3053 | FILE *sshIn; |
| 3054 | Blob ssh; |
| 3055 | char zLine[1000]; |
| 3056 | blob_init(&ssh, 0, 0); |
| 3057 | transport_ssh_command(&ssh); |
| 3058 | if( zFossilCmd==0 ) zFossilCmd = "fossil"; |
| 3059 | blob_appendf(&ssh, |
| 3060 | " -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$" |
| 3061 | " %$ ui --nobrowser --localauth --port %d", |
| 3062 | iPort, iPort, zRemote, zFossilCmd, iPort); |
| 3063 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3029,10 +3029,11 @@ | |
| 3029 | iPort = db_get_int("http-port", 8080); |
| 3030 | mxPort = iPort+100; |
| 3031 | } |
| 3032 | if( isUiCmd && !fNoBrowser ){ |
| 3033 | char *zBrowserArg; |
| 3034 | if( zRemote ) db_open_config(0,0); |
| 3035 | zBrowser = fossil_web_browser(); |
| 3036 | if( zIpAddr==0 ){ |
| 3037 | zBrowserArg = mprintf("http://localhost:%%d/%s", zInitPage); |
| 3038 | }else if( strchr(zIpAddr,':') ){ |
| 3039 | zBrowserArg = mprintf("http://[%s]:%%d/%s", zIpAddr, zInitPage); |
| @@ -3053,10 +3054,11 @@ | |
| 3054 | FILE *sshIn; |
| 3055 | Blob ssh; |
| 3056 | char zLine[1000]; |
| 3057 | blob_init(&ssh, 0, 0); |
| 3058 | transport_ssh_command(&ssh); |
| 3059 | db_close_config(); |
| 3060 | if( zFossilCmd==0 ) zFossilCmd = "fossil"; |
| 3061 | blob_appendf(&ssh, |
| 3062 | " -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$" |
| 3063 | " %$ ui --nobrowser --localauth --port %d", |
| 3064 | iPort, iPort, zRemote, zFossilCmd, iPort); |
| 3065 |