Fossil SCM

Add the --external-baseline option to the "fossil ui" command, to force the initial page to use the exbase query parameter.

drh 2024-12-15 00:15 ckout-exbase
Commit 145ca85de9314ca16dadd17057f1f3fc18657c1a28cfff6eb9f19ec31c1cb7d4
1 file changed +6
+6
--- src/main.c
+++ src/main.c
@@ -3175,10 +3175,11 @@
31753175
** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
31763176
** /doc/ckout/...
31773177
** --create Create a new REPOSITORY if it does not already exist
31783178
** --errorlog FILE Append HTTP error messages to FILE
31793179
** --extroot DIR Document root for the /ext extension mechanism
3180
+** --external-baseline DIR External baseline for the initial /ckout page.
31803181
** --files GLOBLIST Comma-separated list of glob patterns for static files
31813182
** --fossilcmd PATH The pathname of the "fossil" executable on the remote
31823183
** system when REPOSITORY is remote.
31833184
** --localauth Enable automatic login for requests from localhost
31843185
** --localhost Listen on 127.0.0.1 only (always true for "ui")
@@ -3250,10 +3251,11 @@
32503251
const char *zInitPage = 0; /* Start on this page. --page option */
32513252
int findServerArg = 2; /* argv index for find_server_repository() */
32523253
char *zRemote = 0; /* Remote host on which to run "fossil ui" */
32533254
const char *zJsMode; /* The --jsmode parameter */
32543255
const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3256
+ const char *zExBase; /* Value for --external-baseline */
32553257
32563258
32573259
#if USE_SEE
32583260
db_setup_for_saved_encryption_key();
32593261
#endif
@@ -3286,13 +3288,17 @@
32863288
g.useLocalauth = find_option("localauth", 0, 0)!=0;
32873289
Th_InitTraceLog();
32883290
zPort = find_option("port", "P", 1);
32893291
isUiCmd = g.argv[1][0]=='u';
32903292
if( isUiCmd ){
3293
+ zExBase = find_option("external-baseline", 0, 1);
32913294
zInitPage = find_option("page", "p", 1);
32923295
if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
32933296
zFossilCmd = find_option("fossilcmd", 0, 1);
3297
+ if( zExBase && zInitPage==0 ){
3298
+ zInitPage = mprintf("ckout?exbase=%T", zExBase);
3299
+ }
32943300
}
32953301
zNotFound = find_option("notfound", 0, 1);
32963302
allowRepoList = find_option("repolist",0,0)!=0;
32973303
if( find_option("nocompress",0,0)!=0 ) g.fNoHttpCompress = 1;
32983304
zAltBase = find_option("baseurl", 0, 1);
32993305
--- src/main.c
+++ src/main.c
@@ -3175,10 +3175,11 @@
3175 ** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
3176 ** /doc/ckout/...
3177 ** --create Create a new REPOSITORY if it does not already exist
3178 ** --errorlog FILE Append HTTP error messages to FILE
3179 ** --extroot DIR Document root for the /ext extension mechanism
 
3180 ** --files GLOBLIST Comma-separated list of glob patterns for static files
3181 ** --fossilcmd PATH The pathname of the "fossil" executable on the remote
3182 ** system when REPOSITORY is remote.
3183 ** --localauth Enable automatic login for requests from localhost
3184 ** --localhost Listen on 127.0.0.1 only (always true for "ui")
@@ -3250,10 +3251,11 @@
3250 const char *zInitPage = 0; /* Start on this page. --page option */
3251 int findServerArg = 2; /* argv index for find_server_repository() */
3252 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3253 const char *zJsMode; /* The --jsmode parameter */
3254 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
 
3255
3256
3257 #if USE_SEE
3258 db_setup_for_saved_encryption_key();
3259 #endif
@@ -3286,13 +3288,17 @@
3286 g.useLocalauth = find_option("localauth", 0, 0)!=0;
3287 Th_InitTraceLog();
3288 zPort = find_option("port", "P", 1);
3289 isUiCmd = g.argv[1][0]=='u';
3290 if( isUiCmd ){
 
3291 zInitPage = find_option("page", "p", 1);
3292 if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
3293 zFossilCmd = find_option("fossilcmd", 0, 1);
 
 
 
3294 }
3295 zNotFound = find_option("notfound", 0, 1);
3296 allowRepoList = find_option("repolist",0,0)!=0;
3297 if( find_option("nocompress",0,0)!=0 ) g.fNoHttpCompress = 1;
3298 zAltBase = find_option("baseurl", 0, 1);
3299
--- src/main.c
+++ src/main.c
@@ -3175,10 +3175,11 @@
3175 ** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
3176 ** /doc/ckout/...
3177 ** --create Create a new REPOSITORY if it does not already exist
3178 ** --errorlog FILE Append HTTP error messages to FILE
3179 ** --extroot DIR Document root for the /ext extension mechanism
3180 ** --external-baseline DIR External baseline for the initial /ckout page.
3181 ** --files GLOBLIST Comma-separated list of glob patterns for static files
3182 ** --fossilcmd PATH The pathname of the "fossil" executable on the remote
3183 ** system when REPOSITORY is remote.
3184 ** --localauth Enable automatic login for requests from localhost
3185 ** --localhost Listen on 127.0.0.1 only (always true for "ui")
@@ -3250,10 +3251,11 @@
3251 const char *zInitPage = 0; /* Start on this page. --page option */
3252 int findServerArg = 2; /* argv index for find_server_repository() */
3253 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3254 const char *zJsMode; /* The --jsmode parameter */
3255 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3256 const char *zExBase; /* Value for --external-baseline */
3257
3258
3259 #if USE_SEE
3260 db_setup_for_saved_encryption_key();
3261 #endif
@@ -3286,13 +3288,17 @@
3288 g.useLocalauth = find_option("localauth", 0, 0)!=0;
3289 Th_InitTraceLog();
3290 zPort = find_option("port", "P", 1);
3291 isUiCmd = g.argv[1][0]=='u';
3292 if( isUiCmd ){
3293 zExBase = find_option("external-baseline", 0, 1);
3294 zInitPage = find_option("page", "p", 1);
3295 if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
3296 zFossilCmd = find_option("fossilcmd", 0, 1);
3297 if( zExBase && zInitPage==0 ){
3298 zInitPage = mprintf("ckout?exbase=%T", zExBase);
3299 }
3300 }
3301 zNotFound = find_option("notfound", 0, 1);
3302 allowRepoList = find_option("repolist",0,0)!=0;
3303 if( find_option("nocompress",0,0)!=0 ) g.fNoHttpCompress = 1;
3304 zAltBase = find_option("baseurl", 0, 1);
3305

Keyboard Shortcuts

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