2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
|
verify_all_options();
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){
/* If REPOSITORY arg is the root of a checkout,
** chdir to that checkout so that the current version
** gets highlighted in the timeline by default. */
const char * zDir = g.argv[2];
if(dir_has_ckout_db(zDir)){
if(0!=file_chdir(zDir, 0)){
fossil_fatal("Cannot chdir to %s", zDir);
}
findServerArg = 99;
fCreate = 0;
g.argv[2] = 0;
--g.argc;
}
}
|
|
>
>
>
>
>
>
|
>
>
>
>
|
|
|
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
|
verify_all_options();
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
if( isUiCmd && 3==g.argc && file_isdir(g.argv[2], ExtFILE)>0 ){
/* If REPOSITORY arg is the root of a checkout,
** chdir to that checkout so that the current version
** gets highlighted in the timeline by default. */
const char * zArg = g.argv[2];
char * zCkoutDb = mprintf("%//.fslckout", zArg);
if(file_size(zCkoutDb, ExtFILE)<=0){
fossil_free(zCkoutDb);
zCkoutDb = mprintf("%//_FOSSIL_", zArg);
if(file_size(zCkoutDb, ExtFILE)<=0){
fossil_free(zCkoutDb);
zCkoutDb = 0;
}
}
if(zCkoutDb!=0){
fossil_free(zCkoutDb);
if(0!=file_chdir(zArg, 0)){
fossil_fatal("Cannot chdir to %s", zArg);
}
findServerArg = 99;
fCreate = 0;
g.argv[2] = 0;
--g.argc;
}
}
|
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
|
fossil_free(zBrowserArg);
}
if( zRemote ){
/* If a USER@HOST:REPO argument is supplied, then use SSH to run
** "fossil ui --nobrowser" on the remote system and to set up a
** tunnel from the local machine to the remote. */
FILE *sshIn;
Blob ssh;
char zLine[1000];
blob_init(&ssh, 0, 0);
transport_ssh_command(&ssh);
blob_appendf(&ssh,
" -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$"
" fossil ui --nobrowser --localauth --port %d %$",
iPort, iPort, zRemote, iPort, g.argv[2]);
fossil_print("%s\n", blob_str(&ssh));
sshIn = popen(blob_str(&ssh), "r");
if( sshIn==0 ){
fossil_fatal("unable to %s", blob_str(&ssh));
}
while( fgets(zLine, sizeof(zLine), sshIn) ){
fputs(zLine, stdout);
|
>
|
|
>
>
>
>
>
>
|
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
|
fossil_free(zBrowserArg);
}
if( zRemote ){
/* If a USER@HOST:REPO argument is supplied, then use SSH to run
** "fossil ui --nobrowser" on the remote system and to set up a
** tunnel from the local machine to the remote. */
FILE *sshIn;
const char *zSkin;
Blob ssh;
char zLine[1000];
blob_init(&ssh, 0, 0);
transport_ssh_command(&ssh);
blob_appendf(&ssh,
" -t -L127.0.0.1:%d:127.0.0.1:%d -- %!$"
" fossil ui --nobrowser --localauth --port %d",
iPort, iPort, zRemote, iPort);
if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);
if( g.zExtRoot ) blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
blob_appendf(&ssh, " %$", g.argv[2]);
fossil_print("%s\n", blob_str(&ssh));
sshIn = popen(blob_str(&ssh), "r");
if( sshIn==0 ){
fossil_fatal("unable to %s", blob_str(&ssh));
}
while( fgets(zLine, sizeof(zLine), sshIn) ){
fputs(zLine, stdout);
|