Fossil SCM

Replaced part of [3946ff81] which was inadvertently removed via [612f6cee] (parallel edits). Removed an unused var.

stephan 2021-06-30 22:58 trunk
Commit 4f095cdba0ad28d8fbf632c6715bea03b404e1e49ce5cff8aa45fe4b20877389
1 file changed +4 -15
+4 -15
--- src/main.c
+++ src/main.c
@@ -2964,24 +2964,14 @@
29642964
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
29652965
if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){
29662966
/* If REPOSITORY arg is the root of a checkout,
29672967
** chdir to that checkout so that the current version
29682968
** gets highlighted in the timeline by default. */
2969
- const char * zArg = g.argv[2];
2970
- char * zCkoutDb = mprintf("%//.fslckout", zArg);
2971
- if(file_size(zCkoutDb, ExtFILE)<=0){
2972
- fossil_free(zCkoutDb);
2973
- zCkoutDb = mprintf("%//_FOSSIL_", zArg);
2974
- if(file_size(zCkoutDb, ExtFILE)<=0){
2975
- fossil_free(zCkoutDb);
2976
- zCkoutDb = 0;
2977
- }
2978
- }
2979
- if(zCkoutDb!=0){
2980
- fossil_free(zCkoutDb);
2981
- if(0!=file_chdir(zArg, 0)){
2982
- fossil_fatal("Cannot chdir to %s", zArg);
2969
+ const char * zDir = g.argv[2];
2970
+ if(dir_has_ckout_db(zDir)){
2971
+ if(0!=file_chdir(zDir, 0)){
2972
+ fossil_fatal("Cannot chdir to %s", zDir);
29832973
}
29842974
findServerArg = 99;
29852975
fCreate = 0;
29862976
g.argv[2] = 0;
29872977
--g.argc;
@@ -3053,11 +3043,10 @@
30533043
if( zRemote ){
30543044
/* If a USER@HOST:REPO argument is supplied, then use SSH to run
30553045
** "fossil ui --nobrowser" on the remote system and to set up a
30563046
** tunnel from the local machine to the remote. */
30573047
FILE *sshIn;
3058
- const char *zSkin;
30593048
Blob ssh;
30603049
char zLine[1000];
30613050
blob_init(&ssh, 0, 0);
30623051
transport_ssh_command(&ssh);
30633052
blob_appendf(&ssh,
30643053
--- src/main.c
+++ src/main.c
@@ -2964,24 +2964,14 @@
2964 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
2965 if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){
2966 /* If REPOSITORY arg is the root of a checkout,
2967 ** chdir to that checkout so that the current version
2968 ** gets highlighted in the timeline by default. */
2969 const char * zArg = g.argv[2];
2970 char * zCkoutDb = mprintf("%//.fslckout", zArg);
2971 if(file_size(zCkoutDb, ExtFILE)<=0){
2972 fossil_free(zCkoutDb);
2973 zCkoutDb = mprintf("%//_FOSSIL_", zArg);
2974 if(file_size(zCkoutDb, ExtFILE)<=0){
2975 fossil_free(zCkoutDb);
2976 zCkoutDb = 0;
2977 }
2978 }
2979 if(zCkoutDb!=0){
2980 fossil_free(zCkoutDb);
2981 if(0!=file_chdir(zArg, 0)){
2982 fossil_fatal("Cannot chdir to %s", zArg);
2983 }
2984 findServerArg = 99;
2985 fCreate = 0;
2986 g.argv[2] = 0;
2987 --g.argc;
@@ -3053,11 +3043,10 @@
3053 if( zRemote ){
3054 /* If a USER@HOST:REPO argument is supplied, then use SSH to run
3055 ** "fossil ui --nobrowser" on the remote system and to set up a
3056 ** tunnel from the local machine to the remote. */
3057 FILE *sshIn;
3058 const char *zSkin;
3059 Blob ssh;
3060 char zLine[1000];
3061 blob_init(&ssh, 0, 0);
3062 transport_ssh_command(&ssh);
3063 blob_appendf(&ssh,
3064
--- src/main.c
+++ src/main.c
@@ -2964,24 +2964,14 @@
2964 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
2965 if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){
2966 /* If REPOSITORY arg is the root of a checkout,
2967 ** chdir to that checkout so that the current version
2968 ** gets highlighted in the timeline by default. */
2969 const char * zDir = g.argv[2];
2970 if(dir_has_ckout_db(zDir)){
2971 if(0!=file_chdir(zDir, 0)){
2972 fossil_fatal("Cannot chdir to %s", zDir);
 
 
 
 
 
 
 
 
 
 
2973 }
2974 findServerArg = 99;
2975 fCreate = 0;
2976 g.argv[2] = 0;
2977 --g.argc;
@@ -3053,11 +3043,10 @@
3043 if( zRemote ){
3044 /* If a USER@HOST:REPO argument is supplied, then use SSH to run
3045 ** "fossil ui --nobrowser" on the remote system and to set up a
3046 ** tunnel from the local machine to the remote. */
3047 FILE *sshIn;
 
3048 Blob ssh;
3049 char zLine[1000];
3050 blob_init(&ssh, 0, 0);
3051 transport_ssh_command(&ssh);
3052 blob_appendf(&ssh,
3053

Keyboard Shortcuts

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