Fossil SCM
Replaced part of [3946ff81] which was inadvertently removed via [612f6cee] (parallel edits). Removed an unused var.
Commit
4f095cdba0ad28d8fbf632c6715bea03b404e1e49ce5cff8aa45fe4b20877389
Parent
612f6cee385911c…
1 file changed
+4
-15
+4
-15
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2964,24 +2964,14 @@ | ||
| 2964 | 2964 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2965 | 2965 | if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){ |
| 2966 | 2966 | /* If REPOSITORY arg is the root of a checkout, |
| 2967 | 2967 | ** chdir to that checkout so that the current version |
| 2968 | 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); | |
| 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); | |
| 2983 | 2973 | } |
| 2984 | 2974 | findServerArg = 99; |
| 2985 | 2975 | fCreate = 0; |
| 2986 | 2976 | g.argv[2] = 0; |
| 2987 | 2977 | --g.argc; |
| @@ -3053,11 +3043,10 @@ | ||
| 3053 | 3043 | if( zRemote ){ |
| 3054 | 3044 | /* If a USER@HOST:REPO argument is supplied, then use SSH to run |
| 3055 | 3045 | ** "fossil ui --nobrowser" on the remote system and to set up a |
| 3056 | 3046 | ** tunnel from the local machine to the remote. */ |
| 3057 | 3047 | FILE *sshIn; |
| 3058 | - const char *zSkin; | |
| 3059 | 3048 | Blob ssh; |
| 3060 | 3049 | char zLine[1000]; |
| 3061 | 3050 | blob_init(&ssh, 0, 0); |
| 3062 | 3051 | transport_ssh_command(&ssh); |
| 3063 | 3052 | blob_appendf(&ssh, |
| 3064 | 3053 |
| --- 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 |