Fossil SCM

The --page option to "fossil ui" is carried through to remotes, include when the remote directory/repo is "/".

drh 2026-08-06 15:40 UTC trunk
Commit 24d6bba2d80fdc082f91c401368b58179c4fb435001a51913e729eb21258371e
2 files changed +9 -1 +4 -2
+9 -1
--- src/main.c
+++ src/main.c
@@ -3549,10 +3549,11 @@
35493549
** tunnel from the local machine to the remote. */
35503550
FILE *sshIn;
35513551
Blob ssh;
35523552
int bRunning = 0; /* True when fossil starts up on the remote */
35533553
int isRetry; /* True if on the second attempt */
3554
+ const char *zUrl = g.argv[2];
35543555
char zLine[1000];
35553556
35563557
blob_init(&ssh, 0, 0);
35573558
for(isRetry=0; isRetry<2 && !bRunning; isRetry++){
35583559
blob_reset(&ssh);
@@ -3583,11 +3584,18 @@
35833584
blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
35843585
}
35853586
if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
35863587
if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode);
35873588
if( fCreate ) blob_appendf(&ssh, " --create");
3588
- blob_appendf(&ssh, " %$", g.argv[2]);
3589
+ if( zInitPage && zInitPage[0] ){
3590
+ if( fossil_strcmp(zUrl,"/")==0 ){
3591
+ zInitPage = mprintf("/?home=%T", zInitPage);
3592
+ }else{
3593
+ blob_appendf(&ssh, " --page %!$", zInitPage);
3594
+ }
3595
+ }
3596
+ blob_appendf(&ssh, " %$", zUrl);
35893597
if( isRetry ){
35903598
fossil_print("First attempt to run \"fossil\" on %s failed\n"
35913599
"Retry: ", zRemote);
35923600
}
35933601
fossil_print("%s\n", blob_str(&ssh));
35943602
--- src/main.c
+++ src/main.c
@@ -3549,10 +3549,11 @@
3549 ** tunnel from the local machine to the remote. */
3550 FILE *sshIn;
3551 Blob ssh;
3552 int bRunning = 0; /* True when fossil starts up on the remote */
3553 int isRetry; /* True if on the second attempt */
 
3554 char zLine[1000];
3555
3556 blob_init(&ssh, 0, 0);
3557 for(isRetry=0; isRetry<2 && !bRunning; isRetry++){
3558 blob_reset(&ssh);
@@ -3583,11 +3584,18 @@
3583 blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
3584 }
3585 if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
3586 if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode);
3587 if( fCreate ) blob_appendf(&ssh, " --create");
3588 blob_appendf(&ssh, " %$", g.argv[2]);
 
 
 
 
 
 
 
3589 if( isRetry ){
3590 fossil_print("First attempt to run \"fossil\" on %s failed\n"
3591 "Retry: ", zRemote);
3592 }
3593 fossil_print("%s\n", blob_str(&ssh));
3594
--- src/main.c
+++ src/main.c
@@ -3549,10 +3549,11 @@
3549 ** tunnel from the local machine to the remote. */
3550 FILE *sshIn;
3551 Blob ssh;
3552 int bRunning = 0; /* True when fossil starts up on the remote */
3553 int isRetry; /* True if on the second attempt */
3554 const char *zUrl = g.argv[2];
3555 char zLine[1000];
3556
3557 blob_init(&ssh, 0, 0);
3558 for(isRetry=0; isRetry<2 && !bRunning; isRetry++){
3559 blob_reset(&ssh);
@@ -3583,11 +3584,18 @@
3584 blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
3585 }
3586 if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
3587 if( zJsMode ) blob_appendf(&ssh, " --jsmode %s", zJsMode);
3588 if( fCreate ) blob_appendf(&ssh, " --create");
3589 if( zInitPage && zInitPage[0] ){
3590 if( fossil_strcmp(zUrl,"/")==0 ){
3591 zInitPage = mprintf("/?home=%T", zInitPage);
3592 }else{
3593 blob_appendf(&ssh, " --page %!$", zInitPage);
3594 }
3595 }
3596 blob_appendf(&ssh, " %$", zUrl);
3597 if( isRetry ){
3598 fossil_print("First attempt to run \"fossil\" on %s failed\n"
3599 "Retry: ", zRemote);
3600 }
3601 fossil_print("%s\n", blob_str(&ssh));
3602
+4 -2
--- src/repolist.c
+++ src/repolist.c
@@ -129,18 +129,20 @@
129129
char *zSkinRepo = 0; /* Name of the repository database used for skins */
130130
char *zSkinUrl = 0; /* URL for the skin database */
131131
const char *zShow; /* Value of FOSSIL_REPOLIST_SHOW environment variable */
132132
int bShowDesc = 0; /* True to show the description column */
133133
int bShowLg = 0; /* True to show the login-group column */
134
+ const char *zHome; /* Home page */
134135
135136
assert( g.db==0 );
136137
zShow = P("FOSSIL_REPOLIST_SHOW");
137138
if( zShow ){
138139
bShowDesc = strstr(zShow,"description")!=0;
139140
bShowLg = strstr(zShow,"login-group")!=0;
140141
}
141142
blob_init(&html, 0, 0);
143
+ zHome = PD("home","home");
142144
if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
143145
/* For the special case of the "repository directory" being "/",
144146
** show all of the repositories named in the ~/.fossil database.
145147
**
146148
** On unix systems, then entries are of the form "repo:/home/..."
@@ -297,12 +299,12 @@
297299
} else if( sqlite3_strglob("*/.*", zName)==0 ){
298300
/* Do not show hyperlinks for hidden repos */
299301
blob_appendf(&html, "%h (hidden)", zName);
300302
} else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
301303
blob_appendf(&html,
302
- "<a href='%R/%T/home' target='_blank'>/%h</a>\n",
303
- zUrl, zName);
304
+ "<a href='%R/%T/%T' target='_blank'>/%h</a>\n",
305
+ zUrl, zHome, zName);
304306
}else if( file_ends_with_repository_extension(zName,1) ){
305307
/* As described in
306308
** https://fossil-scm.org/forum/info/f50f647c97c72fc1: if
307309
** foo.fossil and foo/bar.fossil both exist and we create a
308310
** link to foo/bar/... then the URI dispatcher will instead
309311
--- src/repolist.c
+++ src/repolist.c
@@ -129,18 +129,20 @@
129 char *zSkinRepo = 0; /* Name of the repository database used for skins */
130 char *zSkinUrl = 0; /* URL for the skin database */
131 const char *zShow; /* Value of FOSSIL_REPOLIST_SHOW environment variable */
132 int bShowDesc = 0; /* True to show the description column */
133 int bShowLg = 0; /* True to show the login-group column */
 
134
135 assert( g.db==0 );
136 zShow = P("FOSSIL_REPOLIST_SHOW");
137 if( zShow ){
138 bShowDesc = strstr(zShow,"description")!=0;
139 bShowLg = strstr(zShow,"login-group")!=0;
140 }
141 blob_init(&html, 0, 0);
 
142 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
143 /* For the special case of the "repository directory" being "/",
144 ** show all of the repositories named in the ~/.fossil database.
145 **
146 ** On unix systems, then entries are of the form "repo:/home/..."
@@ -297,12 +299,12 @@
297 } else if( sqlite3_strglob("*/.*", zName)==0 ){
298 /* Do not show hyperlinks for hidden repos */
299 blob_appendf(&html, "%h (hidden)", zName);
300 } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
301 blob_appendf(&html,
302 "<a href='%R/%T/home' target='_blank'>/%h</a>\n",
303 zUrl, zName);
304 }else if( file_ends_with_repository_extension(zName,1) ){
305 /* As described in
306 ** https://fossil-scm.org/forum/info/f50f647c97c72fc1: if
307 ** foo.fossil and foo/bar.fossil both exist and we create a
308 ** link to foo/bar/... then the URI dispatcher will instead
309
--- src/repolist.c
+++ src/repolist.c
@@ -129,18 +129,20 @@
129 char *zSkinRepo = 0; /* Name of the repository database used for skins */
130 char *zSkinUrl = 0; /* URL for the skin database */
131 const char *zShow; /* Value of FOSSIL_REPOLIST_SHOW environment variable */
132 int bShowDesc = 0; /* True to show the description column */
133 int bShowLg = 0; /* True to show the login-group column */
134 const char *zHome; /* Home page */
135
136 assert( g.db==0 );
137 zShow = P("FOSSIL_REPOLIST_SHOW");
138 if( zShow ){
139 bShowDesc = strstr(zShow,"description")!=0;
140 bShowLg = strstr(zShow,"login-group")!=0;
141 }
142 blob_init(&html, 0, 0);
143 zHome = PD("home","home");
144 if( fossil_strcmp(g.zRepositoryName,"/")==0 && !g.fJail ){
145 /* For the special case of the "repository directory" being "/",
146 ** show all of the repositories named in the ~/.fossil database.
147 **
148 ** On unix systems, then entries are of the form "repo:/home/..."
@@ -297,12 +299,12 @@
299 } else if( sqlite3_strglob("*/.*", zName)==0 ){
300 /* Do not show hyperlinks for hidden repos */
301 blob_appendf(&html, "%h (hidden)", zName);
302 } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){
303 blob_appendf(&html,
304 "<a href='%R/%T/%T' target='_blank'>/%h</a>\n",
305 zUrl, zHome, zName);
306 }else if( file_ends_with_repository_extension(zName,1) ){
307 /* As described in
308 ** https://fossil-scm.org/forum/info/f50f647c97c72fc1: if
309 ** foo.fossil and foo/bar.fossil both exist and we create a
310 ** link to foo/bar/... then the URI dispatcher will instead
311

Keyboard Shortcuts

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