Fossil SCM
Add the --extpage option to the "fossil ui" command.
Commit
36c798413cba759aabe6d6ea64aede01ec0704ff484a891c4dd92be013764b20
Parent
9443f619b3719aa…
1 file changed
+14
-2
+14
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3204,10 +3204,13 @@ | ||
| 3204 | 3204 | ** --chroot DIR Use directory for chroot instead of repository path |
| 3205 | 3205 | ** --ckout-alias NAME Treat URIs of the form /doc/NAME/... as if they were |
| 3206 | 3206 | ** /doc/ckout/... |
| 3207 | 3207 | ** --create Create a new REPOSITORY if it does not already exist |
| 3208 | 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". | |
| 3209 | 3212 | ** --extroot DIR Document root for the /ext extension mechanism |
| 3210 | 3213 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| 3211 | 3214 | ** --fossilcmd PATH The pathname of the "fossil" executable on the remote |
| 3212 | 3215 | ** system when REPOSITORY is remote. |
| 3213 | 3216 | ** --from PATH Use PATH as the diff baseline for the /ckout page |
| @@ -3282,10 +3285,11 @@ | ||
| 3282 | 3285 | int findServerArg = 2; /* argv index for find_server_repository() */ |
| 3283 | 3286 | char *zRemote = 0; /* Remote host on which to run "fossil ui" */ |
| 3284 | 3287 | const char *zJsMode; /* The --jsmode parameter */ |
| 3285 | 3288 | const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */ |
| 3286 | 3289 | const char *zFrom; /* Value for --from */ |
| 3290 | + const char *zExtPage = 0; /* Argument to --extpage */ | |
| 3287 | 3291 | |
| 3288 | 3292 | |
| 3289 | 3293 | #if USE_SEE |
| 3290 | 3294 | db_setup_for_saved_encryption_key(); |
| 3291 | 3295 | #endif |
| @@ -3323,12 +3327,20 @@ | ||
| 3323 | 3327 | zFrom = find_option("from", 0, 1); |
| 3324 | 3328 | if( zFrom && zFrom==file_tail(zFrom) ){ |
| 3325 | 3329 | fossil_fatal("the argument to --from must be a pathname for" |
| 3326 | 3330 | " the \"ui\" command"); |
| 3327 | 3331 | } |
| 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 | + } | |
| 3330 | 3342 | zFossilCmd = find_option("fossilcmd", 0, 1); |
| 3331 | 3343 | if( zFrom && zInitPage==0 ){ |
| 3332 | 3344 | zInitPage = mprintf("ckout?exbase=%H", zFrom); |
| 3333 | 3345 | } |
| 3334 | 3346 | } |
| 3335 | 3347 |
| --- 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 |