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.
Commit
3602486f25d1cad01c782e206df7456458c5beb0
Parent
651f70847b2182f…
1 file changed
+7
-1
+7
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2544,11 +2544,10 @@ | ||
| 2544 | 2544 | zPort = find_option("port", "P", 1); |
| 2545 | 2545 | isUiCmd = g.argv[1][0]=='u'; |
| 2546 | 2546 | if( isUiCmd ){ |
| 2547 | 2547 | zInitPage = find_option("page", 0, 1); |
| 2548 | 2548 | } |
| 2549 | - if( zInitPage==0 ) zInitPage = ""; | |
| 2550 | 2549 | zNotFound = find_option("notfound", 0, 1); |
| 2551 | 2550 | allowRepoList = find_option("repolist",0,0)!=0; |
| 2552 | 2551 | zAltBase = find_option("baseurl", 0, 1); |
| 2553 | 2552 | fCreate = find_option("create",0,0)!=0; |
| 2554 | 2553 | if( find_option("scgi", 0, 0)!=0 ) flags |= HTTP_SERVER_SCGI; |
| @@ -2574,10 +2573,17 @@ | ||
| 2574 | 2573 | flags |= HTTP_SERVER_LOCALHOST|HTTP_SERVER_REPOLIST; |
| 2575 | 2574 | g.useLocalauth = 1; |
| 2576 | 2575 | allowRepoList = 1; |
| 2577 | 2576 | } |
| 2578 | 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 | + } | |
| 2579 | 2585 | if( zPort ){ |
| 2580 | 2586 | int i; |
| 2581 | 2587 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 2582 | 2588 | if( i>0 ){ |
| 2583 | 2589 | zIpAddr = mprintf("%.*s", i, zPort); |
| 2584 | 2590 |
| --- 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 |