Fossil SCM

Make the default start page for the "fossil ui" command on a local check-out be "timeline?c=current". The default page is still whatever default the repository specifies for "fossil server" or if using "fossil ui" on any repository other than the current check-out.

drh 2016-04-07 12:21 trunk
Commit 3602486f25d1cad01c782e206df7456458c5beb0
1 file changed +7 -1
+7 -1
--- src/main.c
+++ src/main.c
@@ -2544,11 +2544,10 @@
25442544
zPort = find_option("port", "P", 1);
25452545
isUiCmd = g.argv[1][0]=='u';
25462546
if( isUiCmd ){
25472547
zInitPage = find_option("page", 0, 1);
25482548
}
2549
- if( zInitPage==0 ) zInitPage = "";
25502549
zNotFound = find_option("notfound", 0, 1);
25512550
allowRepoList = find_option("repolist",0,0)!=0;
25522551
zAltBase = find_option("baseurl", 0, 1);
25532552
fCreate = find_option("create",0,0)!=0;
25542553
if( find_option("scgi", 0, 0)!=0 ) flags |= HTTP_SERVER_SCGI;
@@ -2574,10 +2573,17 @@
25742573
flags |= HTTP_SERVER_LOCALHOST|HTTP_SERVER_REPOLIST;
25752574
g.useLocalauth = 1;
25762575
allowRepoList = 1;
25772576
}
25782577
find_server_repository(2, fCreate);
2578
+ if( zInitPage==0 ){
2579
+ if( isUiCmd && g.localOpen ){
2580
+ zInitPage = "timeline?c=current";
2581
+ }else{
2582
+ zInitPage = "";
2583
+ }
2584
+ }
25792585
if( zPort ){
25802586
int i;
25812587
for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
25822588
if( i>0 ){
25832589
zIpAddr = mprintf("%.*s", i, zPort);
25842590
--- src/main.c
+++ src/main.c
@@ -2544,11 +2544,10 @@
2544 zPort = find_option("port", "P", 1);
2545 isUiCmd = g.argv[1][0]=='u';
2546 if( isUiCmd ){
2547 zInitPage = find_option("page", 0, 1);
2548 }
2549 if( zInitPage==0 ) zInitPage = "";
2550 zNotFound = find_option("notfound", 0, 1);
2551 allowRepoList = find_option("repolist",0,0)!=0;
2552 zAltBase = find_option("baseurl", 0, 1);
2553 fCreate = find_option("create",0,0)!=0;
2554 if( find_option("scgi", 0, 0)!=0 ) flags |= HTTP_SERVER_SCGI;
@@ -2574,10 +2573,17 @@
2574 flags |= HTTP_SERVER_LOCALHOST|HTTP_SERVER_REPOLIST;
2575 g.useLocalauth = 1;
2576 allowRepoList = 1;
2577 }
2578 find_server_repository(2, fCreate);
 
 
 
 
 
 
 
2579 if( zPort ){
2580 int i;
2581 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
2582 if( i>0 ){
2583 zIpAddr = mprintf("%.*s", i, zPort);
2584
--- src/main.c
+++ src/main.c
@@ -2544,11 +2544,10 @@
2544 zPort = find_option("port", "P", 1);
2545 isUiCmd = g.argv[1][0]=='u';
2546 if( isUiCmd ){
2547 zInitPage = find_option("page", 0, 1);
2548 }
 
2549 zNotFound = find_option("notfound", 0, 1);
2550 allowRepoList = find_option("repolist",0,0)!=0;
2551 zAltBase = find_option("baseurl", 0, 1);
2552 fCreate = find_option("create",0,0)!=0;
2553 if( find_option("scgi", 0, 0)!=0 ) flags |= HTTP_SERVER_SCGI;
@@ -2574,10 +2573,17 @@
2573 flags |= HTTP_SERVER_LOCALHOST|HTTP_SERVER_REPOLIST;
2574 g.useLocalauth = 1;
2575 allowRepoList = 1;
2576 }
2577 find_server_repository(2, fCreate);
2578 if( zInitPage==0 ){
2579 if( isUiCmd && g.localOpen ){
2580 zInitPage = "timeline?c=current";
2581 }else{
2582 zInitPage = "";
2583 }
2584 }
2585 if( zPort ){
2586 int i;
2587 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
2588 if( i>0 ){
2589 zIpAddr = mprintf("%.*s", i, zPort);
2590

Keyboard Shortcuts

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