Fossil SCM

Add the --extpage option to the "fossil ui" command.

drh 2025-03-23 19:50 trunk
Commit 36c798413cba759aabe6d6ea64aede01ec0704ff484a891c4dd92be013764b20
1 file changed +14 -2
+14 -2
--- src/main.c
+++ src/main.c
@@ -3204,10 +3204,13 @@
32043204
** --chroot DIR Use directory for chroot instead of repository path
32053205
** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
32063206
** /doc/ckout/...
32073207
** --create Create a new REPOSITORY if it does not already exist
32083208
** --errorlog FILE Append HTTP error messages to FILE
3209
+** --extpage FILE Shortcut for "--extroot DIR --page ext/TAIL" where
3210
+** DIR is the directory holding FILE and TAIL is the
3211
+** filename at the end of FILE. Only works for "ui".
32093212
** --extroot DIR Document root for the /ext extension mechanism
32103213
** --files GLOBLIST Comma-separated list of glob patterns for static files
32113214
** --fossilcmd PATH The pathname of the "fossil" executable on the remote
32123215
** system when REPOSITORY is remote.
32133216
** --from PATH Use PATH as the diff baseline for the /ckout page
@@ -3282,10 +3285,11 @@
32823285
int findServerArg = 2; /* argv index for find_server_repository() */
32833286
char *zRemote = 0; /* Remote host on which to run "fossil ui" */
32843287
const char *zJsMode; /* The --jsmode parameter */
32853288
const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
32863289
const char *zFrom; /* Value for --from */
3290
+ const char *zExtPage = 0; /* Argument to --extpage */
32873291
32883292
32893293
#if USE_SEE
32903294
db_setup_for_saved_encryption_key();
32913295
#endif
@@ -3323,12 +3327,20 @@
33233327
zFrom = find_option("from", 0, 1);
33243328
if( zFrom && zFrom==file_tail(zFrom) ){
33253329
fossil_fatal("the argument to --from must be a pathname for"
33263330
" the \"ui\" command");
33273331
}
3328
- zInitPage = find_option("page", "p", 1);
3329
- if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
3332
+ zExtPage = find_option("extpage",0,1);
3333
+ if( zExtPage ){
3334
+ char *zFullPath = file_canonical_name_dup(zExtPage);
3335
+ g.zExtRoot = file_dirname(zFullPath);
3336
+ zInitPage = mprintf("ext/%s",file_tail(zFullPath));
3337
+ fossil_free(zFullPath);
3338
+ }else{
3339
+ zInitPage = find_option("page", "p", 1);
3340
+ if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
3341
+ }
33303342
zFossilCmd = find_option("fossilcmd", 0, 1);
33313343
if( zFrom && zInitPage==0 ){
33323344
zInitPage = mprintf("ckout?exbase=%H", zFrom);
33333345
}
33343346
}
33353347
--- src/main.c
+++ src/main.c
@@ -3204,10 +3204,13 @@
3204 ** --chroot DIR Use directory for chroot instead of repository path
3205 ** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
3206 ** /doc/ckout/...
3207 ** --create Create a new REPOSITORY if it does not already exist
3208 ** --errorlog FILE Append HTTP error messages to FILE
 
 
 
3209 ** --extroot DIR Document root for the /ext extension mechanism
3210 ** --files GLOBLIST Comma-separated list of glob patterns for static files
3211 ** --fossilcmd PATH The pathname of the "fossil" executable on the remote
3212 ** system when REPOSITORY is remote.
3213 ** --from PATH Use PATH as the diff baseline for the /ckout page
@@ -3282,10 +3285,11 @@
3282 int findServerArg = 2; /* argv index for find_server_repository() */
3283 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3284 const char *zJsMode; /* The --jsmode parameter */
3285 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3286 const char *zFrom; /* Value for --from */
 
3287
3288
3289 #if USE_SEE
3290 db_setup_for_saved_encryption_key();
3291 #endif
@@ -3323,12 +3327,20 @@
3323 zFrom = find_option("from", 0, 1);
3324 if( zFrom && zFrom==file_tail(zFrom) ){
3325 fossil_fatal("the argument to --from must be a pathname for"
3326 " the \"ui\" command");
3327 }
3328 zInitPage = find_option("page", "p", 1);
3329 if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
 
 
 
 
 
 
 
 
3330 zFossilCmd = find_option("fossilcmd", 0, 1);
3331 if( zFrom && zInitPage==0 ){
3332 zInitPage = mprintf("ckout?exbase=%H", zFrom);
3333 }
3334 }
3335
--- src/main.c
+++ src/main.c
@@ -3204,10 +3204,13 @@
3204 ** --chroot DIR Use directory for chroot instead of repository path
3205 ** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were
3206 ** /doc/ckout/...
3207 ** --create Create a new REPOSITORY if it does not already exist
3208 ** --errorlog FILE Append HTTP error messages to FILE
3209 ** --extpage FILE Shortcut for "--extroot DIR --page ext/TAIL" where
3210 ** DIR is the directory holding FILE and TAIL is the
3211 ** filename at the end of FILE. Only works for "ui".
3212 ** --extroot DIR Document root for the /ext extension mechanism
3213 ** --files GLOBLIST Comma-separated list of glob patterns for static files
3214 ** --fossilcmd PATH The pathname of the "fossil" executable on the remote
3215 ** system when REPOSITORY is remote.
3216 ** --from PATH Use PATH as the diff baseline for the /ckout page
@@ -3282,10 +3285,11 @@
3285 int findServerArg = 2; /* argv index for find_server_repository() */
3286 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
3287 const char *zJsMode; /* The --jsmode parameter */
3288 const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */
3289 const char *zFrom; /* Value for --from */
3290 const char *zExtPage = 0; /* Argument to --extpage */
3291
3292
3293 #if USE_SEE
3294 db_setup_for_saved_encryption_key();
3295 #endif
@@ -3323,12 +3327,20 @@
3327 zFrom = find_option("from", 0, 1);
3328 if( zFrom && zFrom==file_tail(zFrom) ){
3329 fossil_fatal("the argument to --from must be a pathname for"
3330 " the \"ui\" command");
3331 }
3332 zExtPage = find_option("extpage",0,1);
3333 if( zExtPage ){
3334 char *zFullPath = file_canonical_name_dup(zExtPage);
3335 g.zExtRoot = file_dirname(zFullPath);
3336 zInitPage = mprintf("ext/%s",file_tail(zFullPath));
3337 fossil_free(zFullPath);
3338 }else{
3339 zInitPage = find_option("page", "p", 1);
3340 if( zInitPage && zInitPage[0]=='/' ) zInitPage++;
3341 }
3342 zFossilCmd = find_option("fossilcmd", 0, 1);
3343 if( zFrom && zInitPage==0 ){
3344 zInitPage = mprintf("ckout?exbase=%H", zFrom);
3345 }
3346 }
3347

Keyboard Shortcuts

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