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.

drh 2021-07-05 20:18 trunk
Commit 23b84b33cdb70a1ecbdee4dd33f726954f5cf9a9ed5612e525482d10c4b18fe6
1 file changed +2
+2
--- src/main.c
+++ src/main.c
@@ -3029,10 +3029,11 @@
30293029
iPort = db_get_int("http-port", 8080);
30303030
mxPort = iPort+100;
30313031
}
30323032
if( isUiCmd && !fNoBrowser ){
30333033
char *zBrowserArg;
3034
+ if( zRemote ) db_open_config(0,0);
30343035
zBrowser = fossil_web_browser();
30353036
if( zIpAddr==0 ){
30363037
zBrowserArg = mprintf("http://localhost:%%d/%s", zInitPage);
30373038
}else if( strchr(zIpAddr,':') ){
30383039
zBrowserArg = mprintf("http://[%s]:%%d/%s", zIpAddr, zInitPage);
@@ -3053,10 +3054,11 @@
30533054
FILE *sshIn;
30543055
Blob ssh;
30553056
char zLine[1000];
30563057
blob_init(&ssh, 0, 0);
30573058
transport_ssh_command(&ssh);
3059
+ db_close_config();
30583060
if( zFossilCmd==0 ) zFossilCmd = "fossil";
30593061
blob_appendf(&ssh,
30603062
" -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$"
30613063
" %$ ui --nobrowser --localauth --port %d",
30623064
iPort, iPort, zRemote, zFossilCmd, iPort);
30633065
--- 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

Keyboard Shortcuts

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